diff options
author | Ted Gould <ted@canonical.com> | 2009-04-22 15:20:02 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-04-22 15:20:02 -0500 |
commit | 512db5f75c09790866f08675e2fee12afb475e7f (patch) | |
tree | 1c6ba9e18ebe3be34127ef9410f88e41e83d66e0 | |
parent | aa4253123e3e2dffada0a3016944afdac5efc26f (diff) | |
download | ayatana-indicator-messages-512db5f75c09790866f08675e2fee12afb475e7f.tar.gz ayatana-indicator-messages-512db5f75c09790866f08675e2fee12afb475e7f.tar.bz2 ayatana-indicator-messages-512db5f75c09790866f08675e2fee12afb475e7f.zip |
Breaking out into libindicator style function calls.
-rw-r--r-- | src/indicator-messages.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index c180bd4..6cb6be7 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -471,23 +471,30 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server, return; } -GtkWidget * -get_menu_item (void) +GtkLabel * +get_label (void) { - design_team_size = gtk_icon_size_register("design-team-size", 22, 22); - - listener = indicate_listener_new(); - serverList = NULL; + return NULL; +} - main_menu = gtk_menu_item_new(); - gtk_widget_set_name(main_menu, "fast-user-switch-menuitem"); +GtkImage * +get_icon (void) +{ + design_team_size = gtk_icon_size_register("design-team-size", 22, 22); main_image = gtk_image_new_from_icon_name("indicator-messages", DESIGN_TEAM_SIZE); gtk_widget_show(main_image); - gtk_container_add(GTK_CONTAINER(main_menu), main_image); + + return main_image; +} + +GtkMenu * +get_menu (void) +{ + listener = indicate_listener_new(); + serverList = NULL; GtkWidget * submenu = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(main_menu), submenu); gtk_widget_show(submenu); g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), submenu); @@ -495,6 +502,6 @@ get_menu_item (void) g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), submenu); g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), submenu); - return main_menu; + return GTK_MENU(submenu); } |