make the transparency related code a bit more explicit
[simple-launcher] / simple-launcher.cc
index 74d561a..2211736 100644 (file)
@@ -33,7 +33,9 @@
 
 #define SL_APPLET_DBUS_NAME  "simple-launcher"
 #define SL_APPLET_VERSION    "0.0"
-#define SL_APPLET_ICON_SIZE  26
+#define SL_APPLET_ICON_SIZE  48
+
+#define SL_APPLET_GCONF_PATH  "/apps/simple-launcher"
 
 class SimpleLauncherApplet {
 public:
@@ -68,12 +70,19 @@ private:
   static void _run_dialog(GtkMenuItem *, void *);
 
 private:
+  // GConfClientWrapper myClient;
+  // GConfKey myMainSettings;
+
   osso_context_t *myContext;
+
   GtkWidget *myWidget;
   GtkWindow *myParent;
 
   LauncherItems myItems;
 
+  bool myTransparent;
+  // bool myShowInfobanner; // FIXME: to implement
+
   static char *ourDirs[];
 };
 
@@ -123,7 +132,8 @@ char *SimpleLauncherApplet::ourDirs[] = {
   NULL
 };
 
-SimpleLauncherApplet::SimpleLauncherApplet(): myContext(NULL), myWidget(NULL), myParent(NULL) {
+// SimpleLauncherApplet::SimpleLauncherApplet() : myMainSettings(myClient.getKey(SL_APPLET_GCONF_PATH)), myContext(NULL), myWidget(NULL), myParent(NULL) {
+SimpleLauncherApplet::SimpleLauncherApplet() : myContext(NULL), myWidget(NULL), myParent(NULL), myTransparent(false) {
 }
 
 bool SimpleLauncherApplet::doInit(void *state_data, int *state_size) {
@@ -261,8 +271,7 @@ void SimpleLauncherApplet::updateWidget() {
       gtk_widget_set_events(button, GDK_BUTTON_PRESS_MASK);
       g_signal_connect(button, "button-press-event", G_CALLBACK(_button_pressed), this);
 
-      gtk_event_box_set_visible_window(GTK_EVENT_BOX(button), false);
-      // gtk_button_set_relief(GTK_BUTTON(button),GTK_RELIEF_NONE);
+      gtk_event_box_set_visible_window(GTK_EVENT_BOX(button), !myTransparent);
 
       gtk_container_add(GTK_CONTAINER(button), gtk_image_new_from_pixbuf(item->getIcon(SL_APPLET_ICON_SIZE)));