← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~bratsche/appmenu-gtk/activate-remote-menus into lp:appmenu-gtk

 

Cody Russell has proposed merging lp:~bratsche/appmenu-gtk/activate-remote-menus into lp:appmenu-gtk.

Requested reviews:
  Canonical Desktop Experience Team (canonical-dx-team)
Related bugs:
  #607114 [master] Support menu activation via the keyboard
  https://bugs.launchpad.net/bugs/607114

-- 
https://code.launchpad.net/~bratsche/appmenu-gtk/activate-remote-menus/+merge/33836
Your team ayatana-commits is subscribed to branch lp:appmenu-gtk.
=== modified file 'src/bridge.c'
--- src/bridge.c	2010-08-24 14:17:59 +0000
+++ src/bridge.c	2010-08-26 20:30:58 +0000
@@ -141,6 +141,33 @@
 }
 
 static void
+activate_menu (AppMenuBridge *bridge,
+               GtkWidget     *widget,
+               gpointer       user_data)
+{
+  GList *list;
+
+  for (list = bridge->priv->windows; list != NULL; list = list->next)
+    {
+      AppWindowContext *context = list->data;
+
+      if (context->lookup)
+        {
+          /*
+          DbusmenuMenuitem *mi = g_hash_table_lookup (context->lookup, widget);
+
+          if (mi != NULL)
+            {
+              dbusmenu_menuitem_show_to_user (mi, 0);
+
+              return;
+            }
+          */
+        }
+    }
+}
+
+static void
 app_menu_bridge_init (AppMenuBridge *bridge)
 {
   bridge->priv = G_TYPE_INSTANCE_GET_PRIVATE (bridge, APP_MENU_TYPE_BRIDGE, AppMenuBridgePrivate);
@@ -179,6 +206,11 @@
                                                  bridge);
     }
 
+  g_signal_connect (bridge,
+                    "activate-menu",
+                    G_CALLBACK (activate_menu),
+                    NULL);
+
   return;
 }
 


Follow ups