diff options
author | Ted Gould <ted@canonical.com> | 2009-03-26 10:12:24 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-03-26 10:12:24 -0500 |
commit | 8fd2e25183945f41bc6174d2c5dadb68631e2825 (patch) | |
tree | 24c404847f4a5c3e448f9c2af838bf223fa3bee3 /src | |
parent | 1ec78fcf904b9d2a555da575d70ac9946bf63ba9 (diff) | |
parent | acc7f891bdccbd58d92b957a20a0cb10f6a7513e (diff) | |
download | libayatana-indicator-8fd2e25183945f41bc6174d2c5dadb68631e2825.tar.gz libayatana-indicator-8fd2e25183945f41bc6174d2c5dadb68631e2825.tar.bz2 libayatana-indicator-8fd2e25183945f41bc6174d2c5dadb68631e2825.zip |
Merging in Eitan's changes to make the applet a GNOME Program
Diffstat (limited to 'src')
-rw-r--r-- | src/applet-main.c | 24 |
1 files changed, 23 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +#include <config.h> #include <panel-applet.h> +#include <libgnomeui/gnome-ui-init.h> #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); |