From acc7f891bdccbd58d92b957a20a0cb10f6a7513e Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Thu, 26 Mar 2009 13:51:06 +0200 Subject: Add gnome_program_init with LIBGNOMEUI_MODULE. --- src/applet-main.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/applet-main.c b/src/applet-main.c index 62faab0..51e3c93 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -20,7 +20,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include #include +#include #define SYMBOL_NAME "get_menu_item" #define ICONS_DIR (DATADIR G_DIR_SEPARATOR_S "indicator-applet" G_DIR_SEPARATOR_S "icons") @@ -34,6 +36,13 @@ static void cw_panel_background_changed (PanelApplet *applet, GdkPixmap *pixmap, GtkWidget *menubar); +/* ****************** * + * Global Variables * + * ****************** */ + +static GnomeProgram *program = NULL; + + /************* * main * ***********/ @@ -172,7 +181,20 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) GtkWidget *menubar; gint i; gint indicators_loaded = 0; - + static gboolean first_time = FALSE; + + if (!first_time) + { + gint argc = 1; + gchar *argv[2] = { "indicator-applet", NULL}; + + first_time = TRUE; + program = gnome_program_init ("indicator-applet", "0.1", + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + NULL); + } + /* Set panel options */ gtk_container_set_border_width(GTK_CONTAINER (applet), 0); panel_applet_set_flags(applet, PANEL_APPLET_EXPAND_MINOR); -- cgit v1.2.3