aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-17 13:09:06 -0600
committerTed Gould <ted@gould.cx>2010-02-17 13:09:06 -0600
commitc271f6dbdc98ab96f10b4f1cbe82e3133c8254dc (patch)
tree1bdf46926b18f3fd852b97e08fd03107d0e57abb /src
parent3d07cf168800200269449e1d5d2b3e682c8fc033 (diff)
downloadayatana-indicator-messages-c271f6dbdc98ab96f10b4f1cbe82e3133c8254dc.tar.gz
ayatana-indicator-messages-c271f6dbdc98ab96f10b4f1cbe82e3133c8254dc.tar.bz2
ayatana-indicator-messages-c271f6dbdc98ab96f10b4f1cbe82e3133c8254dc.zip
Adding the shortcuts into the menuhandling code.
Diffstat (limited to 'src')
-rw-r--r--src/messages-service.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index 52e9a48..2893313 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -800,6 +800,15 @@ resort_menu (DbusmenuMenuitem * menushell)
dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(li->menuitem), position);
position++;
+ /* Inserting the shortcuts from the launcher */
+ GList * shortcuts = launcher_menu_item_get_items(li->menuitem);
+ while (shortcuts != NULL) {
+ g_debug("\t\tMoving shortcut to position %d", position);
+ dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(shortcuts->data), position);
+ position++;
+ shortcuts = g_list_next(shortcuts);
+ }
+
/* Putting the launcher separator in */
g_debug("\tMoving launcher separator to position %d", position);
dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(li->separator), position);
@@ -856,6 +865,15 @@ resort_menu (DbusmenuMenuitem * menushell)
dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(li->menuitem), position);
position++;
+ /* Inserting the shortcuts from the launcher */
+ GList * shortcuts = launcher_menu_item_get_items(li->menuitem);
+ while (shortcuts != NULL) {
+ g_debug("\t\tMoving shortcut to position %d", position);
+ dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(shortcuts->data), position);
+ position++;
+ shortcuts = g_list_next(shortcuts);
+ }
+
/* Putting the launcher separator in */
g_debug("\tMoving launcher separator to position %d", position);
dbusmenu_menuitem_child_reorder(DBUSMENU_MENUITEM(menushell), DBUSMENU_MENUITEM(li->separator), position);
@@ -1247,6 +1265,11 @@ build_launcher_core (const gchar * desktop)
/* Add it to the menu */
dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(ll->menuitem));
+ GList * shortcuts = launcher_menu_item_get_items(li->menuitem);
+ while (shortcuts != NULL) {
+ dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(shortcuts->data));
+ shortcuts = g_list_next(shortcuts);
+ }
dbusmenu_menuitem_child_append(root_menuitem, DBUSMENU_MENUITEM(ll->separator));
/* If we're in the black list or we've gotten eclipsed