aboutsummaryrefslogtreecommitdiff
path: root/src/applet-main.c
blob: dc24c7573c89bb226e1b074c2c90d87489d54d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#include <panel-applet.h>


static gboolean     applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data);


/*************
 * main
 * ***********/

PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorApplet_Factory",
               PANEL_TYPE_APPLET,
               "indicator-applet", "0",
               applet_fill_cb, NULL);

/*************
 * init function
 * ***********/

static gboolean
applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data)
{
	GtkWidget * menubar = gtk_menu_bar_new();
	gtk_widget_set_name (menubar, "indicator-applet-menubar");
	gtk_container_add(GTK_CONTAINER(applet), menubar);
	gtk_widget_show(menubar);

	GtkWidget * item = gtk_menu_item_new_with_label("Test");
	gtk_menu_shell_append(GTK_MENU_SHELL(menubar), item);
	gtk_widget_show(item);

	gtk_widget_show(GTK_WIDGET(applet));
	return TRUE;
}