← Back to team overview

ayatana-commits team mailing list archive

[Branch ~indicator-applet-developers/indicator-me/trunk] Rev 103: restores the u1 menu item

 

Merge authors:
  David Barth (dbarth)
Related merge proposals:
  https://code.launchpad.net/~dbarth/indicator-me/u1-is-back/+merge/34972
  proposed by: David Barth (dbarth)
  review: Approve - Conor Curran (cjcurran)
------------------------------------------------------------
revno: 103 [merge]
committer: David Barth <david.barth@xxxxxxxxxxxxx>
branch nick: indicator-me
timestamp: Thu 2010-09-09 15:41:22 +0200
message:
  restores the u1 menu item
modified:
  src/me-service.c


--
lp:indicator-me
https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk

Your team ayatana-commits is subscribed to branch lp:indicator-me.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk/+edit-subscription
=== 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:26:05 +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);
   }
 
 }