[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet-gtk] branch master updated: eliminate tray icon fun
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet-gtk] branch master updated: eliminate tray icon functionality that was deprecated in Gtk |
Date: |
Sun, 27 Nov 2016 10:39:14 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet-gtk.
The following commit(s) were added to refs/heads/master by this push:
new e027b29 eliminate tray icon functionality that was deprecated in Gtk
e027b29 is described below
commit e027b29ed6ce6eb04896605ccd727d4610986d67
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Nov 27 10:39:08 2016 +0100
eliminate tray icon functionality that was deprecated in Gtk
---
src/conversation/gnunet-conversation-gtk.c | 51 +-----------------------
src/conversation/gnunet-conversation-gtk.h | 10 -----
src/conversation/gnunet-conversation-gtk_phone.c | 10 -----
src/fs/gnunet-fs-gtk.c | 22 +---------
src/identity/gnunet-identity-gtk.c | 22 +---------
src/include/gnunet_gtk.h | 32 ---------------
src/lib/Makefile.am | 3 +-
src/main/gnunet-gtk.c | 4 --
src/peerinfo/gnunet-peerinfo-gtk.c | 25 ++----------
src/setup/gnunet-setup-options.c | 5 ---
src/statistics/gnunet-statistics-gtk.c | 22 +---------
11 files changed, 13 insertions(+), 193 deletions(-)
diff --git a/src/conversation/gnunet-conversation-gtk.c
b/src/conversation/gnunet-conversation-gtk.c
index aca58d3..be4f07d 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;
static struct GNUNET_CONFIGURATION_Handle *cfg;
/**
- * Should gnunet-conversation-gtk start in tray mode?
- */
-static int tray_only;
-
-/**
* Desired phone line.
*/
static unsigned int line;
@@ -74,36 +69,6 @@ GCG_get_main_window_object (const char *name)
/**
- * Updates the status icon to the image of the given name.
- * TODO: support animations.
- *
- * available icons:
- * gnunet-conversation-offline
- * gnunet-conversation-call-active
- * gnunet-conversation-call-on-hold
- * gnunet-conversation-gtk-tray-available
- * gnunet-conversation-gtk-tray-call-pending
- * gnunet-conversation-gtk-tray-call-ringing
- * gnunet-conversation-gtk-tray-call-incoming
- *
- * @param icon_name name of the icon to use
- */
-void
-GCG_set_status_icon (const char *icon_name)
-{
- GtkImage *status_icon;
-
- status_icon = GTK_IMAGE (GCG_get_main_window_object
- ("gnunet_conversation_gtk_status_icon"));
- gtk_image_set_from_icon_name (status_icon,
- icon_name,
- GTK_ICON_SIZE_BUTTON);
- GNUNET_GTK_tray_icon_change (icon_name,
- NULL /* tooltip */);
-}
-
-
-/**
* Get our configuration.
*
* @return configuration handle
@@ -128,7 +93,6 @@ shutdown_task (void *cls)
GCG_PHONE_shutdown ();
GCG_CONTACTS_shutdown ();
GCG_IMPORT_shutdown ();
- GNUNET_GTK_tray_icon_destroy ();
GNUNET_GTK_main_loop_quit (ml);
ml = NULL;
}
@@ -176,17 +140,9 @@ run (void *cls)
main_window = GNUNET_GTK_plug_me ("GNUNET_CONVERSATION_GTK_PLUG",
main_window);
gtk_window_maximize (GTK_WINDOW (main_window));
- if (NULL == getenv ("GNUNET_CONVERSATION_GTK_PLUG"))
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_window),
- "gnunet-gtk" /* FIXME: different icon? */,
- "gnunet-conversation-gtk");
/* make GUI visible */
- if (! tray_only)
- {
- gtk_widget_show (main_window);
- gtk_window_present (GTK_WINDOW (main_window));
- }
+ gtk_widget_show (main_window);
+ gtk_window_present (GTK_WINDOW (main_window));
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
if (NULL == ego_name)
@@ -222,9 +178,6 @@ main (int argc, char *const *argv)
{'e', "ego", "ego",
gettext_noop ("select ego to use"), 1,
&GNUNET_GETOPT_set_string, &ego_name},
- {'t', "tray", NULL,
- gettext_noop ("start in tray mode"), 0,
- &GNUNET_GETOPT_set_one, &tray_only},
GNUNET_GETOPT_OPTION_END
};
int ret;
diff --git a/src/conversation/gnunet-conversation-gtk.h
b/src/conversation/gnunet-conversation-gtk.h
index 9e84a17..c0c80ff 100644
--- a/src/conversation/gnunet-conversation-gtk.h
+++ b/src/conversation/gnunet-conversation-gtk.h
@@ -79,14 +79,4 @@ void
GCG_log (const char *message,
...);
-
-/**
- * Updates the status icon to the image of the given name.
- *
- * @param icon_name name of the icon to use
- */
-void
-GCG_set_status_icon (const char *icon_name);
-
-
#endif
diff --git a/src/conversation/gnunet-conversation-gtk_phone.c
b/src/conversation/gnunet-conversation-gtk_phone.c
index b6844a8..a6cc9ff 100644
--- a/src/conversation/gnunet-conversation-gtk_phone.c
+++ b/src/conversation/gnunet-conversation-gtk_phone.c
@@ -469,7 +469,6 @@ do_status ()
{
GCG_update_status_bar (_("The phone is ringing (%u calls waiting)"),
in_ring_counter);
- GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-incoming");
return;
}
if ( (NULL == active_in) &&
@@ -479,7 +478,6 @@ do_status ()
{
GCG_update_status_bar ("%s",
_("We are listening for incoming calls"));
- GCG_set_status_icon ("gnunet-conversation-gtk-tray-available");
}
else
{
@@ -487,13 +485,11 @@ do_status ()
{
GCG_update_status_bar ("%s",
_("No ego selected, phone is down."));
- GCG_set_status_icon ("gnunet-conversation-offline");
}
else
{
GCG_update_status_bar ("%s",
_("Failed to setup phone (internal error)"));
- GCG_set_status_icon ("gnunet-conversation-offline");
}
}
return;
@@ -511,7 +507,6 @@ do_status ()
case IN_STATE_CONNECTED:
GCG_update_status_bar (_("In a conversation with `%s'."),
active_in->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-call-active");
break;
case IN_STATE_SUSPENDED_LOCAL:
GNUNET_break (0);
@@ -519,7 +514,6 @@ do_status ()
case IN_STATE_SUSPENDED_REMOTE:
GCG_update_status_bar (_("On hold in a conversation with `%s'."),
active_in->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-call-on-hold");
break;
case IN_STATE_SUSPENDED_BOTH:
GNUNET_break (0);
@@ -537,17 +531,14 @@ do_status ()
case OUT_STATE_RESOLVING:
GCG_update_status_bar (_("Resolving `%s'."),
active_out->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-pending");
break;
case OUT_STATE_RINGING:
GCG_update_status_bar (_("Calling `%s'."),
active_out->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-gtk-tray-call-ringing");
break;
case OUT_STATE_CONNECTED:
GCG_update_status_bar (_("In a conversation with `%s'."),
active_out->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-call-active");
break;
case OUT_STATE_SUSPENDED_LOCAL:
GNUNET_break (0);
@@ -555,7 +546,6 @@ do_status ()
case OUT_STATE_SUSPENDED_REMOTE:
GCG_update_status_bar (_("On hold in a conversation with `%s'."),
active_out->caller_id_str);
- GCG_set_status_icon ("gnunet-conversation-call-on-hold");
break;
case OUT_STATE_SUSPENDED_BOTH:
GNUNET_break (0);
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index cbbc198..7d39f1e 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -52,11 +52,6 @@
GtkTreeStore *downloads_treestore;
/**
- * Should gnunet-fs-gtk start in tray mode?
- */
-static int tray_only;
-
-/**
* Handle to our main loop.
*/
static struct GNUNET_GTK_MainLoop *ml;
@@ -240,7 +235,6 @@ shutdown_task (void *cls)
struct PseuLookupContext *lctx;
struct SearchResult *sr;
- GNUNET_GTK_tray_icon_destroy ();
while (NULL != (sr = pl_head))
{
GNUNET_FS_probe_stop (sr->probe);
@@ -336,7 +330,6 @@ GNUNET_FS_GTK_delete_event_cb (GtkWidget *object,
* just to be sure it is dead (if it isn't, application will hang up).
*/
GNUNET_SCHEDULER_shutdown ();
- GNUNET_GTK_tray_icon_destroy ();
}
@@ -776,11 +769,6 @@ run (void *cls)
(However, this needs GTK >= 3.2, we currently target 3.0) */
gtk_tree_selection_set_mode (gtk_tree_view_get_selection
(main_context.md_treeview),
GTK_SELECTION_MULTIPLE);
- if (NULL == getenv ("GNUNET_FS_GTK_PLUG"))
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_context.main_window),
- "gnunet-fs-gtk",
- "gnunet-fs-gtk");
/* FIXME: should these '1's be here? Maybe better to put them into
* default config files?
@@ -830,11 +818,8 @@ run (void *cls)
G_CALLBACK (unique_app_message_cb), &main_context);
#endif
/* make GUI visible */
- if (!tray_only)
- {
- gtk_widget_show (main_context.main_window);
- gtk_window_present (GTK_WINDOW (main_context.main_window));
- }
+ gtk_widget_show (main_context.main_window);
+ gtk_window_present (GTK_WINDOW (main_context.main_window));
{
char *const *argv;
@@ -861,9 +846,6 @@ int
main (int argc, char **argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'t', "tray", NULL,
- gettext_noop ("start in tray mode"), 0,
- &GNUNET_GETOPT_set_one, &tray_only},
GNUNET_GETOPT_OPTION_END
};
#if HAVE_LIBUNIQUE
diff --git a/src/identity/gnunet-identity-gtk.c
b/src/identity/gnunet-identity-gtk.c
index 62f6c17..2daf2e0 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;
static struct GNUNET_IDENTITY_Handle *identity;
/**
- * Should gnunet-identity-gtk start in tray mode?
- */
-static int tray_only;
-
-/**
* Main window list store.
*/
static GtkListStore *ls;
@@ -401,7 +396,6 @@ shutdown_task (void *cls)
GNUNET_IDENTITY_disconnect (identity);
identity = NULL;
}
- GNUNET_GTK_tray_icon_destroy ();
GNUNET_GTK_main_loop_quit (ml);
ml = NULL;
}
@@ -519,18 +513,9 @@ run (void *cls)
-1);
gtk_window_maximize (GTK_WINDOW (main_window));
- if (NULL == getenv ("GNUNET_IDENTITY_GTK_PLUG"))
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_window),
- "gnunet-gtk" /* FIXME: different icon? */ ,
- "gnunet-identity-gtk");
-
/* make GUI visible */
- if (!tray_only)
- {
- gtk_widget_show (main_window);
- gtk_window_present (GTK_WINDOW (main_window));
- }
+ gtk_widget_show (main_window);
+ gtk_window_present (GTK_WINDOW (main_window));
identity = GNUNET_IDENTITY_connect (GIG_get_configuration (),
&add_ego,
NULL);
@@ -549,9 +534,6 @@ int
main (int argc, char *const *argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'t', "tray", NULL,
- gettext_noop ("start in tray mode"), 0,
- &GNUNET_GETOPT_set_one, &tray_only},
GNUNET_GETOPT_OPTION_END
};
diff --git a/src/include/gnunet_gtk.h b/src/include/gnunet_gtk.h
index 01999b2..582a3c3 100644
--- a/src/include/gnunet_gtk.h
+++ b/src/include/gnunet_gtk.h
@@ -162,38 +162,6 @@ GNUNET_GTK_get_tree_string (GtkTreeView *treeview,
/**
- * Create our tray icon.
- *
- * @param ml main loop
- * @param main handle to the main window (show or hide)
- * @param icon_name name of the tray icon file
- * @param tooltip tooltip for the tray icon
- */
-void
-GNUNET_GTK_tray_icon_create (struct GNUNET_GTK_MainLoop *ml,
- GtkWindow *main,
- const char *icon_name,
- const char *tooltip);
-
-/**
- * Change our tray icon.
- *
- * @param icon_name name of the tray icon file
- * @param tooltip tooltip for the tray icon
- */
-void
-GNUNET_GTK_tray_icon_change (const char *icon_name,
- const char *tooltip);
-
-
-/**
- * Destroy the tray icon.
- */
-void
-GNUNET_GTK_tray_icon_destroy (void);
-
-
-/**
* Convert a string from the current locale to UTF-8.
*
* @param str_loc string in current locale
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index d14de7c..521aa87 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -19,8 +19,7 @@ libgnunetgtk_la_SOURCES = \
glade.c \
misc.c \
nls.c \
- os_installation.c \
- trayicon.c
+ os_installation.c
libgnunetgtk_la_LIBADD = \
-lgnunetutil $(XLIB) \
@GTK_LIBS@ @GNUNET_LIBS@ @GLADE_LIBS@ $(INTLLIBS)
diff --git a/src/main/gnunet-gtk.c b/src/main/gnunet-gtk.c
index 7837c75..615f1a9 100644
--- a/src/main/gnunet-gtk.c
+++ b/src/main/gnunet-gtk.c
@@ -342,10 +342,6 @@ run (void *cls)
"GNUNET_SETUP_PLUG");
#endif
#endif
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_window),
- "gnunet-fs-gtk",
- "gnunet-gtk");
gtk_widget_show (main_window);
gtk_window_present (GTK_WINDOW (main_window));
}
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c
b/src/peerinfo/gnunet-peerinfo-gtk.c
index 0838fe1..2eaf102 100644
--- a/src/peerinfo/gnunet-peerinfo-gtk.c
+++ b/src/peerinfo/gnunet-peerinfo-gtk.c
@@ -339,11 +339,6 @@ struct GNUNET_TRANSPORT_PluginMonitor *pm;
static struct GNUNET_CORE_MonitorHandle *cm;
/**
- * Should gnunet-peerinfo-gtk start in tray mode?
- */
-static int tray_only;
-
-/**
* Green status led (connected)
*/
static GdkPixbuf *led_green;
@@ -493,7 +488,6 @@ free_paths (void *cts,
static void
shutdown_task (void *cts)
{
- GNUNET_GTK_tray_icon_destroy ();
GNUNET_GTK_main_loop_quit (ml);
ml = NULL;
if (NULL != pnc)
@@ -1527,12 +1521,6 @@ run (void *cts)
ts = GTK_TREE_STORE (get_object ("GNUNET_PEERINFO_GTK_tree_store"));
GNUNET_assert (NULL != ts);
gtk_window_maximize (GTK_WINDOW (main_window));
- if (NULL == getenv ("GNUNET_PEERINFO_GTK_PLUG"))
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_window),
- "gnunet-gtk" /* FIXME: different icon? */,
- "gnunet-peerinfo-gtk");
-
tv = GTK_TREE_VIEW (get_object ("GNUNET_PEERINFO_GTK_main_window_treeview"));
g_object_set (tv, "has-tooltip", TRUE, NULL);
g_signal_connect (tv, "query-tooltip",
@@ -1543,12 +1531,10 @@ run (void *cts)
unique_app_watch_window (unique_app, GTK_WINDOW (main_window));
#endif
/* make GUI visible */
- if (!tray_only)
- {
- gtk_widget_show (main_window);
- gtk_window_present (GTK_WINDOW (main_window));
- }
- GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
+ gtk_widget_show (main_window);
+ gtk_window_present (GTK_WINDOW (main_window));
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+ NULL);
}
@@ -1566,9 +1552,6 @@ main (int argc, char **argv)
{'s', "show-inactive", NULL,
gettext_noop ("show peers even if the are inactive and we know nothing
except their public key"), 0,
&GNUNET_GETOPT_set_one, &show_inactive},
- {'t', "tray", NULL,
- gettext_noop ("start in tray mode"), 0,
- &GNUNET_GETOPT_set_one, &tray_only},
GNUNET_GETOPT_OPTION_END
};
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c
index cac4b74..34ae07a 100644
--- a/src/setup/gnunet-setup-options.c
+++ b/src/setup/gnunet-setup-options.c
@@ -41,11 +41,6 @@
*/
#define REX_NO "^NO$"
-/**
- * Color for marking invalid input
- */
-#define INVALID_INPUT_COLOR "red"
-
/**
* 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 79d2a9a..a2b3a71 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[] = {
static struct GNUNET_GTK_MainLoop *ml;
/**
- * Should gnunet-peerinfo-gtk start in tray mode?
- */
-static int tray_only;
-
-/**
* Handle to statistics subsystem.
*/
static struct GNUNET_STATISTICS_Handle *statistics;
@@ -222,7 +217,6 @@ create_plot (const char *box_name,
static void
shutdown_task (void *cls)
{
- GNUNET_GTK_tray_icon_destroy ();
GNUNET_GTK_main_loop_quit (ml);
ml = NULL;
GNUNET_STATISTICS_destroy (statistics,
@@ -277,12 +271,6 @@ run (void *cls)
main_window = GNUNET_GTK_plug_me ("GNUNET_STATISTICS_GTK_PLUG",
main_window);
gtk_window_maximize (GTK_WINDOW (main_window));
- if (NULL == getenv ("GNUNET_STATISTICS_GTK_PLUG"))
- GNUNET_GTK_tray_icon_create (ml,
- GTK_WINDOW (main_window),
- "gnunet-gtk" /* FIXME: different icon? */,
- "gnunet-statistics-gtk");
-
create_plot ("GNUNET_STATISTICS_GTK_connectivity_box",
connection_data);
create_plot ("GNUNET_STATISTICS_GTK_traffic_box",
@@ -291,11 +279,8 @@ run (void *cls)
storage_data);
/* make GUI visible */
- if (! tray_only)
- {
- gtk_widget_show (main_window);
- gtk_window_present (GTK_WINDOW (main_window));
- }
+ gtk_widget_show (main_window);
+ gtk_window_present (GTK_WINDOW (main_window));
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
}
@@ -306,9 +291,6 @@ main (int argc,
char *const *argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'t', "tray", NULL,
- gettext_noop ("start in tray mode"), 0,
- &GNUNET_GETOPT_set_one, &tray_only},
GNUNET_GETOPT_OPTION_END
};
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet-gtk] branch master updated: eliminate tray icon functionality that was deprecated in Gtk,
gnunet <=