moved widget initialization into a separate method
[simple-launcher] / simple-launcher.cc
index 643d788..e82b19d 100644 (file)
@@ -35,6 +35,9 @@ public:
 
   GtkWidget *getWidget() { return myWidget; }
 
+private:
+  bool initWidget();
+
   bool startApplication(const std::string& application);
 
 private:
@@ -100,8 +103,7 @@ bool SimpleLauncherApplet::doInit(void *state_data, int *state_size) {
     return false;
   }
 
-  // myWidget = mis_widget_new_with_engines_and_history();
-  if (myWidget == 0) {
+  if (!initWidget()) {
     return false;
   }
 
@@ -143,6 +145,10 @@ SimpleLauncherApplet::~SimpleLauncherApplet() {
   }
 }
 
+bool SimpleLauncherApplet::initWidget() {
+  return false;
+}
+
 int SimpleLauncherApplet::saveState(void **state_data, int *state_size) {
   if (state_data != 0) {
     *state_data = 0;