diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-27 10:39:08 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-27 10:39:08 +0100 |
commit | e027b29ed6ce6eb04896605ccd727d4610986d67 (patch) | |
tree | 021baa5773d528c6e9904543f20979856c89e55d /src/peerinfo | |
parent | c840c86c74538679db6545a169a09599bda94533 (diff) | |
download | gnunet-gtk-e027b29ed6ce6eb04896605ccd727d4610986d67.tar.gz gnunet-gtk-e027b29ed6ce6eb04896605ccd727d4610986d67.zip |
eliminate tray icon functionality that was deprecated in Gtk
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/gnunet-peerinfo-gtk.c | 25 |
1 files changed, 4 insertions, 21 deletions
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; | |||
339 | static struct GNUNET_CORE_MonitorHandle *cm; | 339 | static struct GNUNET_CORE_MonitorHandle *cm; |
340 | 340 | ||
341 | /** | 341 | /** |
342 | * Should gnunet-peerinfo-gtk start in tray mode? | ||
343 | */ | ||
344 | static int tray_only; | ||
345 | |||
346 | /** | ||
347 | * Green status led (connected) | 342 | * Green status led (connected) |
348 | */ | 343 | */ |
349 | static GdkPixbuf *led_green; | 344 | static GdkPixbuf *led_green; |
@@ -493,7 +488,6 @@ free_paths (void *cts, | |||
493 | static void | 488 | static void |
494 | shutdown_task (void *cts) | 489 | shutdown_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 | ||