aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-custom.c
blob: d9763eaac4495681975cee15d7322109fa3ae2eb (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
36
37
38
39
40
41
42

#include <libindicator/indicator.h>
#include <libindicator/indicator-service-manager.h>
#include "dbus-shared.h"

INDICATOR_SET_VERSION
INDICATOR_SET_NAME("indicator-custom")

IndicatorServiceManager * sm = NULL;

void
connected (IndicatorServiceManager * sm, gboolean connected, gpointer not_used)
{

	return;
}

GtkLabel *
get_label (void)
{
	return NULL;
}

GtkImage *
get_icon (void)
{
	return GTK_IMAGE(gtk_image_new());
}

GtkMenu *
get_menu (void)
{
	GtkMenu * main_menu = GTK_MENU(gtk_menu_new());
	GtkWidget * loading_item = gtk_menu_item_new_with_label("Loading...");
	gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item);
	gtk_widget_show(GTK_WIDGET(loading_item));

	sm = indicator_service_manager_new(INDICATOR_CUSTOM_DBUS_ADDR);	
	g_signal_connect(G_OBJECT(sm), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connected), NULL);

	return main_menu;
}