~charlesk/appmenu-gtk/lp-788640

« back to all changes in this revision

Viewing changes to src/bridge.c

  • Committer: Cody Russell
  • Date: 2010-06-06 20:07:05 UTC
  • Revision ID: crussell@canonical.com-20100606200705-js3leroh6bx1y4sg
Implement GtkMenuProxy::show_local method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
                                            GtkWidget         *shell,
46
46
                                            GtkWidget         *child,
47
47
                                            guint              position);
 
48
static gboolean app_menu_bridge_show_local (GtkMenuProxy      *proxy);
48
49
 
49
50
struct _AppMenuBridgePrivate
50
51
{
87
88
  object_class = G_OBJECT_CLASS (class);
88
89
 
89
90
  proxy_class->insert = app_menu_bridge_insert;
 
91
  proxy_class->show_local = app_menu_bridge_show_local;
90
92
 
91
93
  object_class->finalize = app_menu_bridge_finalize;
92
94
 
357
359
    }
358
360
}
359
361
 
 
362
static gboolean
 
363
app_menu_bridge_show_local (GtkMenuProxy *proxy)
 
364
{
 
365
  const gchar *env = g_getenv ("APPMENU_DISPLAY_BOTH");
 
366
 
 
367
  return (g_strcmp0 (env, "1") == 0);
 
368
}
 
369
 
360
370
G_MODULE_EXPORT void
361
371
menu_proxy_module_load (GtkMenuProxyModule *module)
362
372
{