aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-06 10:00:01 -0600
committerTed Gould <ted@gould.cx>2010-01-06 10:00:01 -0600
commit5c079eafcd0d20554dcdd7a6f39ec600e04c8aac (patch)
tree3cbf840db2383ef1caa1b22257f4faf1f2d2a1a7 /src
parent51208eb3ccbaa0388a340b74191e3d0890fd166c (diff)
downloadayatana-indicator-datetime-5c079eafcd0d20554dcdd7a6f39ec600e04c8aac.tar.gz
ayatana-indicator-datetime-5c079eafcd0d20554dcdd7a6f39ec600e04c8aac.tar.bz2
ayatana-indicator-datetime-5c079eafcd0d20554dcdd7a6f39ec600e04c8aac.zip
Building a simple menu.
Diffstat (limited to 'src')
-rw-r--r--src/indicator-datetime.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 3e16e07..9b4bec4 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -47,6 +47,7 @@ static void indicator_datetime_init (IndicatorDatetime *self);
static void indicator_datetime_dispose (GObject *object);
static void indicator_datetime_finalize (GObject *object);
static GtkLabel * get_label (IndicatorObject * io);
+static GtkMenu * get_menu (IndicatorObject * io);
/* Indicator Module Config */
INDICATOR_SET_VERSION
@@ -67,6 +68,7 @@ indicator_datetime_class_init (IndicatorDatetimeClass *klass)
IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
io_class->get_label = get_label;
+ io_class->get_menu = get_menu;
return;
}
@@ -174,3 +176,21 @@ get_label (IndicatorObject * io)
return self->priv->label;
}
+
+/* Build a dummy menu for now */
+static GtkMenu *
+get_menu (IndicatorObject * io)
+{
+ GtkWidget * menu = NULL;
+ GtkWidget * item = NULL;
+
+ menu = gtk_menu_new();
+
+ item = gtk_menu_item_new_with_label("No menu yet.");
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
+ gtk_widget_show(item);
+
+ gtk_widget_show(menu);
+
+ return GTK_MENU(menu);
+}