diff options
author | Ted Gould <ted@canonical.com> | 2008-12-03 19:50:17 -0800 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2008-12-03 19:50:17 -0800 |
commit | 854bab06f1fedf7081515ba9de7be7244e5e6a72 (patch) | |
tree | 38cc085c5153dd9a780f4d382152cc26a1108a89 /src/applet-main.c | |
parent | e1092dabd7b0642bdba407780fd78a494a920233 (diff) | |
download | libayatana-indicator-854bab06f1fedf7081515ba9de7be7244e5e6a72.tar.gz libayatana-indicator-854bab06f1fedf7081515ba9de7be7244e5e6a72.tar.bz2 libayatana-indicator-854bab06f1fedf7081515ba9de7be7244e5e6a72.zip |
Making the applet a lot more sparce. Now we're going to load things dynamically. Let them have their own problems.
Diffstat (limited to 'src/applet-main.c')
-rw-r--r-- | src/applet-main.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/applet-main.c b/src/applet-main.c index 31204df..b439bc8 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -1,8 +1,7 @@ #include <panel-applet.h> -#include "indicator-messages.h" - +#define SYMBOL_NAME "get_menu_item" #define ICONS_DIR (DATADIR G_DIR_SEPARATOR_S "indicator-applet" G_DIR_SEPARATOR_S "icons") static gboolean applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data); @@ -17,13 +16,6 @@ PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorApplet_Factory", "indicator-applet", "0", applet_fill_cb, NULL); -typedef GtkWidget * (*menuitem_func) (void); - -menuitem_func indicators[] = { - indicator_messages_menuitem, - NULL -}; - /************* * init function * ***********/ @@ -40,9 +32,13 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) gtk_container_add(GTK_CONTAINER(applet), menubar); gtk_widget_show(menubar); - for (i = 0; indicators[i] != NULL; i++) { - GtkWidget * item = indicators[i](); - if (item == NULL) continue; + int indicators_loaded = 0; + + /* load 'em */ + + if (indicators_loaded == 0) { + GtkWidget * item = gtk_menu_item_new_with_label("No Indicators"); + gtk_widget_set_sensitive(item, FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), item); gtk_widget_show(item); } |