ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01615
[Merge] lp:~dbarth/appmenu-gtk/blacklist-hack into lp:appmenu-gtk
David Barth has proposed merging lp:~dbarth/appmenu-gtk/blacklist-hack into lp:appmenu-gtk.
Requested reviews:
Canonical Desktop Experience Team (canonical-dx-team)
block indicator-applet* from loading the menu proxy module
--
https://code.launchpad.net/~dbarth/appmenu-gtk/blacklist-hack/+merge/27831
Your team ayatana-commits is subscribed to branch lp:appmenu-gtk.
=== modified file 'src/bridge.c'
--- src/bridge.c 2010-06-15 14:56:13 +0000
+++ src/bridge.c 2010-06-17 13:27:29 +0000
@@ -675,11 +675,31 @@
return (g_strcmp0 (env, "1") == 0);
}
+/* crude blacklist to avoid to much patching for now */
+static gboolean
+app_menu_brige_shouldnt_load (void)
+{
+ const char *prg = g_get_prgname ();
+
+ if (g_strrstr (prg, "indicator-applet") != NULL) {
+ g_print ("*** Warning: menu proxy blacklisting: %s\n", prg);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
G_MODULE_EXPORT void
menu_proxy_module_load (UbuntuMenuProxyModule *module)
{
static gboolean registered = FALSE;
+ /* Prevent well-known applications to re-export
+ their own dbusmenus */
+ if (app_menu_brige_shouldnt_load ())
+ return;
+
if (!registered)
{
app_menu_bridge_register_type (G_TYPE_MODULE (module));
Follow ups