aboutsummaryrefslogtreecommitdiff
path: root/src/common/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/helper.c')
-rw-r--r--src/common/helper.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/helper.c b/src/common/helper.c
index c7f11680..52dfefe3 100644
--- a/src/common/helper.c
+++ b/src/common/helper.c
@@ -26,6 +26,7 @@
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunetgtk_common.h" 28#include "gnunetgtk_common.h"
29#include "../core/eggtrayicon.h"
29#include <GNUnet/gnunet_util_crypto.h> 30#include <GNUnet/gnunet_util_crypto.h>
30#include <GNUnet/gnunet_util_cron.h> 31#include <GNUnet/gnunet_util_cron.h>
31#include <glib.h> 32#include <glib.h>
@@ -64,6 +65,10 @@ typedef struct Plugin
64 65
65static GladeXML *mainXML; 66static GladeXML *mainXML;
66 67
68#if GTK_CHECK_VERSION(2,10,0)
69static GtkStatusIcon *trayIcon;
70#endif
71
67static char *gladeFile; 72static char *gladeFile;
68 73
69static GdkWindowState main_window_state; 74static GdkWindowState main_window_state;
@@ -178,6 +183,17 @@ GNUNET_GTK_get_main_glade_XML ()
178 return mainXML; 183 return mainXML;
179} 184}
180 185
186/**
187 * Simple accessor method.
188 */
189#if GTK_CHECK_VERSION(2,10,0)
190GtkStatusIcon *
191GNUNET_GTK_get_trayIcon ()
192{
193 return trayIcon;
194}
195#endif
196
181static void 197static void
182connector (const gchar * handler_name, 198connector (const gchar * handler_name,
183 GObject * object, 199 GObject * object,
@@ -343,6 +359,10 @@ GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e,
343 GNUNET_GE_FATAL | GNUNET_GE_USER | 359 GNUNET_GE_FATAL | GNUNET_GE_USER |
344 GNUNET_GE_IMMEDIATE, "glade_xml_new", 360 GNUNET_GE_IMMEDIATE, "glade_xml_new",
345 gladeFile); 361 gladeFile);
362#if GTK_CHECK_VERSION (2,10,0)
363 trayIcon = gtk_status_icon_new ();
364#endif
365 initTrayIcon ();
346 /* load the plugins */ 366 /* load the plugins */
347 GNUNET_GC_get_configuration_value_string (cfg, 367 GNUNET_GC_get_configuration_value_string (cfg,
348 "GNUNET-GTK", 368 "GNUNET-GTK",