aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-25 14:55:35 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-25 14:55:35 +0000
commit7223b3a54cb81d5f77cb74b2ae32c27724686f87 (patch)
tree5cfe597432ddab4828a409d4336d91894b1b3f74 /src/statistics
parent5631caa73d4a0e43edc1e0320062b6337f64f25a (diff)
downloadgnunet-gtk-7223b3a54cb81d5f77cb74b2ae32c27724686f87.tar.gz
gnunet-gtk-7223b3a54cb81d5f77cb74b2ae32c27724686f87.zip
-first run of gnunet-gtk done
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/gnunet-statistics-gtk.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/statistics/gnunet-statistics-gtk.c b/src/statistics/gnunet-statistics-gtk.c
index cac4452f..4c9426a6 100644
--- a/src/statistics/gnunet-statistics-gtk.c
+++ b/src/statistics/gnunet-statistics-gtk.c
@@ -30,8 +30,6 @@
30#include <cairo.h> 30#include <cairo.h>
31#include "gtk_statistics.h" 31#include "gtk_statistics.h"
32 32
33#include <gtk/gtkx.h>
34
35#define MAX_HISTORY 1280 33#define MAX_HISTORY 1280
36 34
37 35
@@ -241,7 +239,6 @@ static void
241run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 239run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
242{ 240{
243 GtkWidget *main_window; 241 GtkWidget *main_window;
244 char *plugid;
245 242
246 ml = cls; 243 ml = cls;
247 244
@@ -264,24 +261,8 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
264 261
265 /* setup main window */ 262 /* setup main window */
266 main_window = GTK_WIDGET (get_object ("GNUNET_STATISTICS_GTK_main_window")); 263 main_window = GTK_WIDGET (get_object ("GNUNET_STATISTICS_GTK_main_window"));
267 if (NULL != (plugid = getenv ("GNUNET_STATISTICS_GTK_PLUG"))) 264 main_window = GNUNET_GTK_plug_me ("GNUNET_STATISTICS_GTK_PLUG",
268 { 265 main_window);
269 GtkWidget *plug;
270 GtkWidget *child;
271 unsigned long long id;
272
273 if (1 == sscanf (plugid,
274 "%llu",
275 &id))
276 {
277 plug = gtk_plug_new ((Window) id);
278 child = gtk_bin_get_child (GTK_BIN (main_window));
279 gtk_widget_reparent (child,
280 plug);
281 gtk_widget_destroy (main_window);
282 main_window = plug;
283 }
284 }
285 gtk_window_maximize (GTK_WINDOW (main_window)); 266 gtk_window_maximize (GTK_WINDOW (main_window));
286 GNUNET_GTK_tray_icon_create (ml, 267 GNUNET_GTK_tray_icon_create (ml,
287 GTK_WINDOW (main_window), 268 GTK_WINDOW (main_window),