← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~dbarth/indicator-me/u1-is-back into lp:indicator-me

 

David Barth has proposed merging lp:~dbarth/indicator-me/u1-is-back into lp:indicator-me.

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


Restores the Ubuntu One menu item.
-- 
https://code.launchpad.net/~dbarth/indicator-me/u1-is-back/+merge/34972
Your team ayatana-commits is subscribed to branch lp:indicator-me.
=== modified file 'src/me-service.c'
--- src/me-service.c	2010-08-26 14:00:07 +0000
+++ src/me-service.c	2010-09-09 13:29:39 +0000
@@ -237,6 +237,7 @@
 
   DbusmenuMenuitem *im_accounts_mi = NULL;
   DbusmenuMenuitem *tw_accounts_mi = NULL;
+  DbusmenuMenuitem *u1_accounts_mi = NULL;
   gboolean at_least_one = FALSE;
 
   if (program_is_installed ("empathy-accounts")) {
@@ -257,6 +258,15 @@
     at_least_one = TRUE;
   }
 
+  if (program_is_installed ("ubuntuone-preferences")) {
+    u1_accounts_mi = dbusmenu_menuitem_new();
+    dbusmenu_menuitem_property_set(u1_accounts_mi, DBUSMENU_MENUITEM_PROP_LABEL,
+                                   _("Ubuntu One..."));
+    g_signal_connect(G_OBJECT(u1_accounts_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
+                     G_CALLBACK(spawn_on_activate_cb), "ubuntuone-preferences");
+    at_least_one = TRUE;
+  }
+
   if (at_least_one) {
     DbusmenuMenuitem *separator = dbusmenu_menuitem_new();
     dbusmenu_menuitem_property_set(separator, DBUSMENU_MENUITEM_PROP_TYPE,
@@ -267,6 +277,8 @@
       dbusmenu_menuitem_child_append(root, im_accounts_mi);
     if (tw_accounts_mi)
       dbusmenu_menuitem_child_append(root, tw_accounts_mi);
+    if (u1_accounts_mi)
+      dbusmenu_menuitem_child_append(root, u1_accounts_mi);
   }
 
 }


Follow ups