GtkSharp/panelapplet/glue/panelapplet.c
Mike Kestner 7f3171c814 merge to HEAD of jeroen and friends' work on the 2-4 branch. HEAD
is now tracking Gnome 2.6.

svn path=/trunk/gtk-sharp/; revision=35479
2004-10-29 20:33:07 +00:00

29 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);
}