mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 19:15:29 +00:00
574aa2ee06
* configure.in : check for panelapplet in enable_gnome and remove all the stuff for a separate panelapplet-sharp assembly. * Makefile.am : remove panelapplet dir from build. * gnome/BonoboUIVerb.cs : moved from panelapplet. * gnome/Gnome.metadata : add rules from panelapplet. * gnome/Makefile.am : add new files. * gnome/PanelApplet.custom : moved from panelapplet. * gnome/PanelAppletFactory.cs : moved from panelapplet. * gnome/glue/panelapplet.c : moved from panelapplet. * gnome/glue/Makefile.am : add new file. * gnomedb/GnomeDb.metadata : hide a newly parsed "obsolete" type. * gtk/Gtk.metadata : hide a newly parsed "obsolete" callback type. * panelapplet : kill dir. * parser/gapi2xml.pl : update callback name sanity check. * sources/gtk-sharp-sources.xml : move panelapplet parse into gnome. * */*-api.raw : regen. svn path=/trunk/gtk-sharp/; revision=38509
30 lines
756 B
C
30 lines
756 B
C
#include <panel-applet.h>
|
|
|
|
typedef struct _ContextMenuItem
|
|
{
|
|
const gchar *verb;
|
|
gpointer callback;
|
|
} ContextMenuItem;
|
|
|
|
void panelapplet_setup_menu (PanelApplet *applet, const gchar *xml, ContextMenuItem *menuitems, gint cnt);
|
|
|
|
void
|
|
panelapplet_setup_menu (PanelApplet *applet, const gchar *xml, ContextMenuItem *menuitems, gint cnt)
|
|
{
|
|
int i;
|
|
BonoboUIVerb *menu_verbs = NULL;
|
|
|
|
menu_verbs = g_new0 (BonoboUIVerb, cnt + 1);
|
|
|
|
for (i = 0; i < cnt; i++) {
|
|
menu_verbs[i].cname = menuitems[i].verb;
|
|
menu_verbs[i].cb = menuitems[i].callback;
|
|
menu_verbs[i].user_data = NULL;
|
|
}
|
|
menu_verbs[cnt].cname = NULL;
|
|
menu_verbs[cnt].cb = NULL;
|
|
menu_verbs[cnt].user_data = NULL;
|
|
panel_applet_setup_menu (applet, xml, menu_verbs, NULL);
|
|
g_free (menu_verbs);
|
|
}
|