← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~dbarth/indicator-me/gconf-switch into lp:indicator-me

 

David Barth has proposed merging lp:~dbarth/indicator-me/gconf-switch into lp:indicator-me.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)


Clean up the gconf option to control the appearance of the panel indicator
-- 
https://code.launchpad.net/~dbarth/indicator-me/gconf-switch/+merge/35094
Your team ayatana-commits is subscribed to branch lp:indicator-me.
=== modified file 'src/indicator-me.c'
--- src/indicator-me.c	2010-03-31 22:07:27 +0000
+++ src/indicator-me.c	2010-09-10 12:44:45 +0000
@@ -147,14 +147,11 @@
     if (label == NULL) return;
   }
 
-  if (username != NULL && username[0] != '\0') {
-    g_debug ("Updating username label");
-    gtk_label_set_text (label, username);
-    gtk_widget_show(GTK_WIDGET(label));
-  } else {
-    gtk_widget_hide(GTK_WIDGET(label));
-  }
+  gtk_label_set_text (label, username);
+  gtk_widget_show(GTK_WIDGET(label));
 
+  /* don't hide the label if the username is null,
+     as it will hide the whole indicator */
 }
 
 static GtkLabel *

=== modified file 'src/me-service.c'
--- src/me-service.c	2010-09-09 13:26:05 +0000
+++ src/me-service.c	2010-09-10 12:44:45 +0000
@@ -136,6 +136,11 @@
       dbusmenu_menuitem_property_set_bool(status_menuitems[i],
                                           DBUSMENU_MENUITEM_PROP_ENABLED,
                                           FALSE);
+      dbusmenu_menuitem_property_set_int (status_menuitems[i],
+                                          DBUSMENU_MENUITEM_PROP_TOGGLE_STATE,
+                                          (i != STATUS_PROVIDER_STATUS_OFFLINE)
+                                          ? DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED
+                                          : DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED);
     }
     return;
   }
@@ -305,8 +310,8 @@
   return FALSE;
 }
 
-#define GCONF_NAMESPACE "/system/indicator/me"
-#define GCONF_DISPLAY   "/system/indicator/me/display"
+#define GCONF_NAMESPACE "/apps/indicator-me"
+#define GCONF_DISPLAY   "/apps/indicator-me/display"
 
 static void
 display_mode_changed ()


Follow ups