aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-11-27 10:39:08 +0100
committerChristian Grothoff <christian@grothoff.org>2016-11-27 10:39:08 +0100
commite027b29ed6ce6eb04896605ccd727d4610986d67 (patch)
tree021baa5773d528c6e9904543f20979856c89e55d /src
parentc840c86c74538679db6545a169a09599bda94533 (diff)
downloadgnunet-gtk-e027b29ed6ce6eb04896605ccd727d4610986d67.tar.gz
gnunet-gtk-e027b29ed6ce6eb04896605ccd727d4610986d67.zip
eliminate tray icon functionality that was deprecated in Gtk
Diffstat (limited to 'src')
-rw-r--r--src/conversation/gnunet-conversation-gtk.c51
-rw-r--r--src/conversation/gnunet-conversation-gtk.h10
-rw-r--r--src/conversation/gnunet-conversation-gtk_phone.c10
-rw-r--r--src/fs/gnunet-fs-gtk.c22
-rw-r--r--src/identity/gnunet-identity-gtk.c22
-rw-r--r--src/include/gnunet_gtk.h32
-rw-r--r--src/lib/Makefile.am3
-rw-r--r--src/main/gnunet-gtk.c4
-rw-r--r--src/peerinfo/gnunet-peerinfo-gtk.c25
-rw-r--r--src/setup/gnunet-setup-options.c5
-rw-r--r--src/statistics/gnunet-statistics-gtk.c22
11 files changed, 13 insertions, 193 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index aca58d30..be4f07db 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -45,11 +45,6 @@ static struct GNUNET_GTK_MainLoop *ml;
45static struct GNUNET_CONFIGURATION_Handle *cfg; 45static struct GNUNET_CONFIGURATION_Handle *cfg;
46 46
47/** 47/**
48 * Should gnunet-conversation-gtk start in tray mode?
49 */
50static int tray_only;
51
52/**
53 * Desired phone line. 48 * Desired phone line.
54 */ 49 */
55static unsigned int line; 50static unsigned int line;
@@ -74,36 +69,6 @@ GCG_get_main_window_object (const char *name)
74 69
75 70
76/** 71/**
77 * Updates the status icon to the image of the given name.
78 * TODO: support animations.
79 *
80 * available icons:
81 * gnunet-conversation-offline
82 * gnunet-conversation-call-active
83 * gnunet-conversation-call-on-hold
84 * gnunet-conversation-gtk-tray-available
85 * gnunet-conversation-gtk-tray-call-pending
86 * gnunet-conversation-gtk-tray-call-ringing
87 * gnunet-conversation-gtk-tray-call-incoming
88 *
89 * @param icon_name name of the icon to use
90 */
91void
92GCG_set_status_icon (const char *icon_name)
93{
94 GtkImage *status_icon;
95
96 status_icon = GTK_IMAGE (GCG_get_main_window_object
97 ("gnunet_conversation_gtk_status_icon"));
98 gtk_image_set_from_icon_name (status_icon,
99 icon_name,
100 GTK_ICON_SIZE_BUTTON);
101 GNUNET_GTK_tray_icon_change (icon_name,
102 NULL /* tooltip */);
103}
104
105
106/**
107 * Get our configuration. 72 * Get our configuration.
108 * 73 *
109 * @return configuration handle 74 * @return configuration handle
@@ -128,7 +93,6 @@ shutdown_task (void *cls)
128 GCG_PHONE_shutdown (); 93 GCG_PHONE_shutdown ();
129 GCG_CONTACTS_shutdown (); 94 GCG_CONTACTS_shutdown ();
130 GCG_IMPORT_shutdown (); 95 GCG_IMPORT_shutdown ();
131 GNUNET_GTK_tray_icon_destroy ();
132 GNUNET_GTK_main_loop_quit (ml); 96 GNUNET_GTK_main_loop_quit (ml);
133 ml = NULL; 97 ml = NULL;
134} 98}
@@ -176,17 +140,9 @@ run (void *cls)
176 main_window = GNUNET_GTK_plug_me ("GNUNET_CONVERSATION_GTK_PLUG", 140 main_window = GNUNET_GTK_plug_me ("GNUNET_CONVERSATION_GTK_PLUG",
177 main_window); 141 main_window);
178 gtk_window_maximize (GTK_WINDOW (main_window)); 142 gtk_window_maximize (GTK_WINDOW (main_window));
179 if (NULL == getenv ("GNUNET_CONVERSATION_GTK_PLUG"))
180 GNUNET_GTK_tray_icon_create (ml,
181 GTK_WINDOW (main_window),
182 "gnunet-gtk" /* FIXME: different icon? */,
183 "gnunet-conversation-gtk");
184 /* make GUI visible */ 143 /* make GUI visible */
185 if (! tray_only) 144 gtk_widget_show (main_window);
186 { 145 gtk_window_present (GTK_WINDOW (main_window));
187 gtk_widget_show (main_window);
188 gtk_window_present (GTK_WINDOW (main_window));
189 }
190 GNUNET_SCHEDULER_add_shutdown (&shutdown_task, 146 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
191 NULL); 147 NULL);
192 if (NULL == ego_name) 148 if (NULL == ego_name)
@@ -222,9 +178,6 @@ main (int argc, char *const *argv)
222 {'e', "ego", "ego", 178 {'e', "ego", "ego",
223 gettext_noop ("select ego to use"), 1, 179 gettext_noop ("select ego to use"), 1,
224 &GNUNET_GETOPT_set_string, &ego_name}, 180 &GNUNET_GETOPT_set_string, &ego_name},
225 {'t', "tray", NULL,
226 gettext_noop ("start in tray mode"), 0,
227 &GNUNET_GETOPT_set_one, &tray_only},
228 GNUNET_GETOPT_OPTION_END 181 GNUNET_GETOPT_OPTION_END
229 }; 182 };
230 int ret; 183 int ret;
diff --git a/src/conversation/gnunet-conversation-gtk.h b/src/conversation/gnunet-conversation-gtk.h
index 9e84a178..c0c80ffa 100644
--- a/src/conversation/gnunet-conversation-gtk.h
+++ b/src/conversation/gnunet-conversation-gtk.h
@@ -79,14 +79,4 @@ void
79GCG_log (const char *message, 79GCG_log (const char *message,
80 ...); 80 ...);
81 81
82
83/**
84 * Updates the status icon to the image of the given name.
85 *
86 * @param icon_name name of the icon to use
87 */
88void
89GCG_set_status_icon (const char *icon_name);
90
91
92#endif 82#endif
diff --git a/src/conversation/gnunet-conversation-gtk_phone.c b/src/conversation/gnunet-conversation-gtk_phone.c
index b6844a84..a6cc9ff0 100644
--- a/src/conversation/gnunet-conversation-gtk_phone.c
+++ b/src/conversation/gnunet-conversation-gtk_phone.c
@@ -469,7 +469,6 @@ do_status ()
469 { 469 {
470 GCG_update_status_bar (_("The phone is ringing (%u calls waiting)"), 470 GCG_update_status_bar (_("The phone is ringing (%u calls waiting)"),
471 in_ring_counter); 471 in_ring_counter);
472 GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-incoming");
473 return; 472 return;
474 } 473 }
475 if ( (NULL == active_in) && 474 if ( (NULL == active_in) &&
@@ -479,7 +478,6 @@ do_status ()
479 { 478 {
480 GCG_update_status_bar ("%s", 479 GCG_update_status_bar ("%s",
481 _("We are listening for incoming calls")); 480 _("We are listening for incoming calls"));
482 GCG_set_status_icon ("gnunet-conversation-gtk-tray-available");
483 } 481 }
484 else 482 else
485 { 483 {
@@ -487,13 +485,11 @@ do_status ()
487 { 485 {
488 GCG_update_status_bar ("%s", 486 GCG_update_status_bar ("%s",
489 _("No ego selected, phone is down.")); 487 _("No ego selected, phone is down."));
490 GCG_set_status_icon ("gnunet-conversation-offline");
491 } 488 }
492 else 489 else
493 { 490 {
494 GCG_update_status_bar ("%s", 491 GCG_update_status_bar ("%s",
495 _("Failed to setup phone (internal error)")); 492 _("Failed to setup phone (internal error)"));
496 GCG_set_status_icon ("gnunet-conversation-offline");
497 } 493 }
498 } 494 }
499 return; 495 return;
@@ -511,7 +507,6 @@ do_status ()
511 case IN_STATE_CONNECTED: 507 case IN_STATE_CONNECTED:
512 GCG_update_status_bar (_("In a conversation with `%s'."), 508 GCG_update_status_bar (_("In a conversation with `%s'."),
513 active_in->caller_id_str); 509 active_in->caller_id_str);
514 GCG_set_status_icon ("gnunet-conversation-call-active");
515 break; 510 break;
516 case IN_STATE_SUSPENDED_LOCAL: 511 case IN_STATE_SUSPENDED_LOCAL:
517 GNUNET_break (0); 512 GNUNET_break (0);
@@ -519,7 +514,6 @@ do_status ()
519 case IN_STATE_SUSPENDED_REMOTE: 514 case IN_STATE_SUSPENDED_REMOTE:
520 GCG_update_status_bar (_("On hold in a conversation with `%s'."), 515 GCG_update_status_bar (_("On hold in a conversation with `%s'."),
521 active_in->caller_id_str); 516 active_in->caller_id_str);
522 GCG_set_status_icon ("gnunet-conversation-call-on-hold");
523 break; 517 break;
524 case IN_STATE_SUSPENDED_BOTH: 518 case IN_STATE_SUSPENDED_BOTH:
525 GNUNET_break (0); 519 GNUNET_break (0);
@@ -537,17 +531,14 @@ do_status ()
537 case OUT_STATE_RESOLVING: 531 case OUT_STATE_RESOLVING:
538 GCG_update_status_bar (_("Resolving `%s'."), 532 GCG_update_status_bar (_("Resolving `%s'."),
539 active_out->caller_id_str); 533 active_out->caller_id_str);
540 GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-pending");
541 break; 534 break;
542 case OUT_STATE_RINGING: 535 case OUT_STATE_RINGING:
543 GCG_update_status_bar (_("Calling `%s'."), 536 GCG_update_status_bar (_("Calling `%s'."),
544 active_out->caller_id_str); 537 active_out->caller_id_str);
545 GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-ringing");
546 break; 538 break;
547 case OUT_STATE_CONNECTED: 539 case OUT_STATE_CONNECTED:
548 GCG_update_status_bar (_("In a conversation with `%s'."), 540 GCG_update_status_bar (_("In a conversation with `%s'."),
549 active_out->caller_id_str); 541 active_out->caller_id_str);
550 GCG_set_status_icon ("gnunet-conversation-call-active");
551 break; 542 break;
552 case OUT_STATE_SUSPENDED_LOCAL: 543 case OUT_STATE_SUSPENDED_LOCAL:
553 GNUNET_break (0); 544 GNUNET_break (0);
@@ -555,7 +546,6 @@ do_status ()
555 case OUT_STATE_SUSPENDED_REMOTE: 546 case OUT_STATE_SUSPENDED_REMOTE:
556 GCG_update_status_bar (_("On hold in a conversation with `%s'."), 547 GCG_update_status_bar (_("On hold in a conversation with `%s'."),
557 active_out->caller_id_str); 548 active_out->caller_id_str);
558 GCG_set_status_icon ("gnunet-conversation-call-on-hold");
559 break; 549 break;
560 case OUT_STATE_SUSPENDED_BOTH: 550 case OUT_STATE_SUSPENDED_BOTH:
561 GNUNET_break (0); 551 GNUNET_break (0);
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index cbbc1984..7d39f1e3 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -52,11 +52,6 @@
52GtkTreeStore *downloads_treestore; 52GtkTreeStore *downloads_treestore;
53 53
54/** 54/**
55 * Should gnunet-fs-gtk start in tray mode?
56 */
57static int tray_only;
58
59/**
60 * Handle to our main loop. 55 * Handle to our main loop.
61 */ 56 */
62static struct GNUNET_GTK_MainLoop *ml; 57static struct GNUNET_GTK_MainLoop *ml;
@@ -240,7 +235,6 @@ shutdown_task (void *cls)
240 struct PseuLookupContext *lctx; 235 struct PseuLookupContext *lctx;
241 struct SearchResult *sr; 236 struct SearchResult *sr;
242 237
243 GNUNET_GTK_tray_icon_destroy ();
244 while (NULL != (sr = pl_head)) 238 while (NULL != (sr = pl_head))
245 { 239 {
246 GNUNET_FS_probe_stop (sr->probe); 240 GNUNET_FS_probe_stop (sr->probe);
@@ -336,7 +330,6 @@ GNUNET_FS_GTK_delete_event_cb (GtkWidget *object,
336 * just to be sure it is dead (if it isn't, application will hang up). 330 * just to be sure it is dead (if it isn't, application will hang up).
337 */ 331 */
338 GNUNET_SCHEDULER_shutdown (); 332 GNUNET_SCHEDULER_shutdown ();
339 GNUNET_GTK_tray_icon_destroy ();
340} 333}
341 334
342 335
@@ -776,11 +769,6 @@ run (void *cls)
776 (However, this needs GTK >= 3.2, we currently target 3.0) */ 769 (However, this needs GTK >= 3.2, we currently target 3.0) */
777 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview), 770 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview),
778 GTK_SELECTION_MULTIPLE); 771 GTK_SELECTION_MULTIPLE);
779 if (NULL == getenv ("GNUNET_FS_GTK_PLUG"))
780 GNUNET_GTK_tray_icon_create (ml,
781 GTK_WINDOW (main_context.main_window),
782 "gnunet-fs-gtk",
783 "gnunet-fs-gtk");
784 772
785 /* FIXME: should these '1's be here? Maybe better to put them into 773 /* FIXME: should these '1's be here? Maybe better to put them into
786 * default config files? 774 * default config files?
@@ -830,11 +818,8 @@ run (void *cls)
830 G_CALLBACK (unique_app_message_cb), &main_context); 818 G_CALLBACK (unique_app_message_cb), &main_context);
831#endif 819#endif
832 /* make GUI visible */ 820 /* make GUI visible */
833 if (!tray_only) 821 gtk_widget_show (main_context.main_window);
834 { 822 gtk_window_present (GTK_WINDOW (main_context.main_window));
835 gtk_widget_show (main_context.main_window);
836 gtk_window_present (GTK_WINDOW (main_context.main_window));
837 }
838 823
839 { 824 {
840 char *const *argv; 825 char *const *argv;
@@ -861,9 +846,6 @@ int
861main (int argc, char **argv) 846main (int argc, char **argv)
862{ 847{
863 static struct GNUNET_GETOPT_CommandLineOption options[] = { 848 static struct GNUNET_GETOPT_CommandLineOption options[] = {
864 {'t', "tray", NULL,
865 gettext_noop ("start in tray mode"), 0,
866 &GNUNET_GETOPT_set_one, &tray_only},
867 GNUNET_GETOPT_OPTION_END 849 GNUNET_GETOPT_OPTION_END
868 }; 850 };
869#if HAVE_LIBUNIQUE 851#if HAVE_LIBUNIQUE
diff --git a/src/identity/gnunet-identity-gtk.c b/src/identity/gnunet-identity-gtk.c
index 62f6c171..2daf2e0a 100644
--- a/src/identity/gnunet-identity-gtk.c
+++ b/src/identity/gnunet-identity-gtk.c
@@ -62,11 +62,6 @@ static struct GNUNET_GTK_MainLoop *ml;
62static struct GNUNET_IDENTITY_Handle *identity; 62static struct GNUNET_IDENTITY_Handle *identity;
63 63
64/** 64/**
65 * Should gnunet-identity-gtk start in tray mode?
66 */
67static int tray_only;
68
69/**
70 * Main window list store. 65 * Main window list store.
71 */ 66 */
72static GtkListStore *ls; 67static GtkListStore *ls;
@@ -401,7 +396,6 @@ shutdown_task (void *cls)
401 GNUNET_IDENTITY_disconnect (identity); 396 GNUNET_IDENTITY_disconnect (identity);
402 identity = NULL; 397 identity = NULL;
403 } 398 }
404 GNUNET_GTK_tray_icon_destroy ();
405 GNUNET_GTK_main_loop_quit (ml); 399 GNUNET_GTK_main_loop_quit (ml);
406 ml = NULL; 400 ml = NULL;
407} 401}
@@ -519,18 +513,9 @@ run (void *cls)
519 -1); 513 -1);
520 514
521 gtk_window_maximize (GTK_WINDOW (main_window)); 515 gtk_window_maximize (GTK_WINDOW (main_window));
522 if (NULL == getenv ("GNUNET_IDENTITY_GTK_PLUG"))
523 GNUNET_GTK_tray_icon_create (ml,
524 GTK_WINDOW (main_window),
525 "gnunet-gtk" /* FIXME: different icon? */ ,
526 "gnunet-identity-gtk");
527
528 /* make GUI visible */ 516 /* make GUI visible */
529 if (!tray_only) 517 gtk_widget_show (main_window);
530 { 518 gtk_window_present (GTK_WINDOW (main_window));
531 gtk_widget_show (main_window);
532 gtk_window_present (GTK_WINDOW (main_window));
533 }
534 identity = GNUNET_IDENTITY_connect (GIG_get_configuration (), 519 identity = GNUNET_IDENTITY_connect (GIG_get_configuration (),
535 &add_ego, 520 &add_ego,
536 NULL); 521 NULL);
@@ -549,9 +534,6 @@ int
549main (int argc, char *const *argv) 534main (int argc, char *const *argv)
550{ 535{
551 static struct GNUNET_GETOPT_CommandLineOption options[] = { 536 static struct GNUNET_GETOPT_CommandLineOption options[] = {
552 {'t', "tray", NULL,
553 gettext_noop ("start in tray mode"), 0,
554 &GNUNET_GETOPT_set_one, &tray_only},
555 GNUNET_GETOPT_OPTION_END 537 GNUNET_GETOPT_OPTION_END
556 }; 538 };
557 539
diff --git a/src/include/gnunet_gtk.h b/src/include/gnunet_gtk.h
index 01999b2b..582a3c39 100644
--- a/src/include/gnunet_gtk.h
+++ b/src/include/gnunet_gtk.h
@@ -162,38 +162,6 @@ GNUNET_GTK_get_tree_string (GtkTreeView *treeview,
162 162
163 163
164/** 164/**
165 * Create our tray icon.
166 *
167 * @param ml main loop
168 * @param main handle to the main window (show or hide)
169 * @param icon_name name of the tray icon file
170 * @param tooltip tooltip for the tray icon
171 */
172void
173GNUNET_GTK_tray_icon_create (struct GNUNET_GTK_MainLoop *ml,
174 GtkWindow *main,
175 const char *icon_name,
176 const char *tooltip);
177
178/**
179 * Change our tray icon.
180 *
181 * @param icon_name name of the tray icon file
182 * @param tooltip tooltip for the tray icon
183 */
184void
185GNUNET_GTK_tray_icon_change (const char *icon_name,
186 const char *tooltip);
187
188
189/**
190 * Destroy the tray icon.
191 */
192void
193GNUNET_GTK_tray_icon_destroy (void);
194
195
196/**
197 * Convert a string from the current locale to UTF-8. 165 * Convert a string from the current locale to UTF-8.
198 * 166 *
199 * @param str_loc string in current locale 167 * @param str_loc string in current locale
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index d14de7cf..521aa874 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -19,8 +19,7 @@ libgnunetgtk_la_SOURCES = \
19 glade.c \ 19 glade.c \
20 misc.c \ 20 misc.c \
21 nls.c \ 21 nls.c \
22 os_installation.c \ 22 os_installation.c
23 trayicon.c
24libgnunetgtk_la_LIBADD = \ 23libgnunetgtk_la_LIBADD = \
25 -lgnunetutil $(XLIB) \ 24 -lgnunetutil $(XLIB) \
26 @GTK_LIBS@ @GNUNET_LIBS@ @GLADE_LIBS@ $(INTLLIBS) 25 @GTK_LIBS@ @GNUNET_LIBS@ @GLADE_LIBS@ $(INTLLIBS)
diff --git a/src/main/gnunet-gtk.c b/src/main/gnunet-gtk.c
index 7837c75e..615f1a98 100644
--- a/src/main/gnunet-gtk.c
+++ b/src/main/gnunet-gtk.c
@@ -342,10 +342,6 @@ run (void *cls)
342 "GNUNET_SETUP_PLUG"); 342 "GNUNET_SETUP_PLUG");
343#endif 343#endif
344#endif 344#endif
345 GNUNET_GTK_tray_icon_create (ml,
346 GTK_WINDOW (main_window),
347 "gnunet-fs-gtk",
348 "gnunet-gtk");
349 gtk_widget_show (main_window); 345 gtk_widget_show (main_window);
350 gtk_window_present (GTK_WINDOW (main_window)); 346 gtk_window_present (GTK_WINDOW (main_window));
351} 347}
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c
index 0838fe15..2eaf102c 100644
--- a/src/peerinfo/gnunet-peerinfo-gtk.c
+++ b/src/peerinfo/gnunet-peerinfo-gtk.c
@@ -339,11 +339,6 @@ struct GNUNET_TRANSPORT_PluginMonitor *pm;
339static struct GNUNET_CORE_MonitorHandle *cm; 339static struct GNUNET_CORE_MonitorHandle *cm;
340 340
341/** 341/**
342 * Should gnunet-peerinfo-gtk start in tray mode?
343 */
344static int tray_only;
345
346/**
347 * Green status led (connected) 342 * Green status led (connected)
348 */ 343 */
349static GdkPixbuf *led_green; 344static GdkPixbuf *led_green;
@@ -493,7 +488,6 @@ free_paths (void *cts,
493static void 488static void
494shutdown_task (void *cts) 489shutdown_task (void *cts)
495{ 490{
496 GNUNET_GTK_tray_icon_destroy ();
497 GNUNET_GTK_main_loop_quit (ml); 491 GNUNET_GTK_main_loop_quit (ml);
498 ml = NULL; 492 ml = NULL;
499 if (NULL != pnc) 493 if (NULL != pnc)
@@ -1527,12 +1521,6 @@ run (void *cts)
1527 ts = GTK_TREE_STORE (get_object ("GNUNET_PEERINFO_GTK_tree_store")); 1521 ts = GTK_TREE_STORE (get_object ("GNUNET_PEERINFO_GTK_tree_store"));
1528 GNUNET_assert (NULL != ts); 1522 GNUNET_assert (NULL != ts);
1529 gtk_window_maximize (GTK_WINDOW (main_window)); 1523 gtk_window_maximize (GTK_WINDOW (main_window));
1530 if (NULL == getenv ("GNUNET_PEERINFO_GTK_PLUG"))
1531 GNUNET_GTK_tray_icon_create (ml,
1532 GTK_WINDOW (main_window),
1533 "gnunet-gtk" /* FIXME: different icon? */,
1534 "gnunet-peerinfo-gtk");
1535
1536 tv = GTK_TREE_VIEW (get_object ("GNUNET_PEERINFO_GTK_main_window_treeview")); 1524 tv = GTK_TREE_VIEW (get_object ("GNUNET_PEERINFO_GTK_main_window_treeview"));
1537 g_object_set (tv, "has-tooltip", TRUE, NULL); 1525 g_object_set (tv, "has-tooltip", TRUE, NULL);
1538 g_signal_connect (tv, "query-tooltip", 1526 g_signal_connect (tv, "query-tooltip",
@@ -1543,12 +1531,10 @@ run (void *cts)
1543 unique_app_watch_window (unique_app, GTK_WINDOW (main_window)); 1531 unique_app_watch_window (unique_app, GTK_WINDOW (main_window));
1544#endif 1532#endif
1545 /* make GUI visible */ 1533 /* make GUI visible */
1546 if (!tray_only) 1534 gtk_widget_show (main_window);
1547 { 1535 gtk_window_present (GTK_WINDOW (main_window));
1548 gtk_widget_show (main_window); 1536 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
1549 gtk_window_present (GTK_WINDOW (main_window)); 1537 NULL);
1550 }
1551 GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
1552} 1538}
1553 1539
1554 1540
@@ -1566,9 +1552,6 @@ main (int argc, char **argv)
1566 {'s', "show-inactive", NULL, 1552 {'s', "show-inactive", NULL,
1567 gettext_noop ("show peers even if the are inactive and we know nothing except their public key"), 0, 1553 gettext_noop ("show peers even if the are inactive and we know nothing except their public key"), 0,
1568 &GNUNET_GETOPT_set_one, &show_inactive}, 1554 &GNUNET_GETOPT_set_one, &show_inactive},
1569 {'t', "tray", NULL,
1570 gettext_noop ("start in tray mode"), 0,
1571 &GNUNET_GETOPT_set_one, &tray_only},
1572 GNUNET_GETOPT_OPTION_END 1555 GNUNET_GETOPT_OPTION_END
1573 }; 1556 };
1574 1557
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c
index cac4b746..34ae07a0 100644
--- a/src/setup/gnunet-setup-options.c
+++ b/src/setup/gnunet-setup-options.c
@@ -41,11 +41,6 @@
41 */ 41 */
42#define REX_NO "^NO$" 42#define REX_NO "^NO$"
43 43
44/**
45 * Color for marking invalid input
46 */
47#define INVALID_INPUT_COLOR "red"
48
49 44
50/** 45/**
51 * Structs of this type specify connection between widgets storing 46 * Structs of this type specify connection between widgets storing
diff --git a/src/statistics/gnunet-statistics-gtk.c b/src/statistics/gnunet-statistics-gtk.c
index 79d2a9a2..a2b3a71c 100644
--- a/src/statistics/gnunet-statistics-gtk.c
+++ b/src/statistics/gnunet-statistics-gtk.c
@@ -109,11 +109,6 @@ static const struct PlotInfo storage_data[] = {
109static struct GNUNET_GTK_MainLoop *ml; 109static struct GNUNET_GTK_MainLoop *ml;
110 110
111/** 111/**
112 * Should gnunet-peerinfo-gtk start in tray mode?
113 */
114static int tray_only;
115
116/**
117 * Handle to statistics subsystem. 112 * Handle to statistics subsystem.
118 */ 113 */
119static struct GNUNET_STATISTICS_Handle *statistics; 114static struct GNUNET_STATISTICS_Handle *statistics;
@@ -222,7 +217,6 @@ create_plot (const char *box_name,
222static void 217static void
223shutdown_task (void *cls) 218shutdown_task (void *cls)
224{ 219{
225 GNUNET_GTK_tray_icon_destroy ();
226 GNUNET_GTK_main_loop_quit (ml); 220 GNUNET_GTK_main_loop_quit (ml);
227 ml = NULL; 221 ml = NULL;
228 GNUNET_STATISTICS_destroy (statistics, 222 GNUNET_STATISTICS_destroy (statistics,
@@ -277,12 +271,6 @@ run (void *cls)
277 main_window = GNUNET_GTK_plug_me ("GNUNET_STATISTICS_GTK_PLUG", 271 main_window = GNUNET_GTK_plug_me ("GNUNET_STATISTICS_GTK_PLUG",
278 main_window); 272 main_window);
279 gtk_window_maximize (GTK_WINDOW (main_window)); 273 gtk_window_maximize (GTK_WINDOW (main_window));
280 if (NULL == getenv ("GNUNET_STATISTICS_GTK_PLUG"))
281 GNUNET_GTK_tray_icon_create (ml,
282 GTK_WINDOW (main_window),
283 "gnunet-gtk" /* FIXME: different icon? */,
284 "gnunet-statistics-gtk");
285
286 create_plot ("GNUNET_STATISTICS_GTK_connectivity_box", 274 create_plot ("GNUNET_STATISTICS_GTK_connectivity_box",
287 connection_data); 275 connection_data);
288 create_plot ("GNUNET_STATISTICS_GTK_traffic_box", 276 create_plot ("GNUNET_STATISTICS_GTK_traffic_box",
@@ -291,11 +279,8 @@ run (void *cls)
291 storage_data); 279 storage_data);
292 280
293 /* make GUI visible */ 281 /* make GUI visible */
294 if (! tray_only) 282 gtk_widget_show (main_window);
295 { 283 gtk_window_present (GTK_WINDOW (main_window));
296 gtk_widget_show (main_window);
297 gtk_window_present (GTK_WINDOW (main_window));
298 }
299 GNUNET_SCHEDULER_add_shutdown (&shutdown_task, 284 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
300 NULL); 285 NULL);
301} 286}
@@ -306,9 +291,6 @@ main (int argc,
306 char *const *argv) 291 char *const *argv)
307{ 292{
308 static struct GNUNET_GETOPT_CommandLineOption options[] = { 293 static struct GNUNET_GETOPT_CommandLineOption options[] = {
309 {'t', "tray", NULL,
310 gettext_noop ("start in tray mode"), 0,
311 &GNUNET_GETOPT_set_one, &tray_only},
312 GNUNET_GETOPT_OPTION_END 294 GNUNET_GETOPT_OPTION_END
313 }; 295 };
314 296