diff options
Diffstat (limited to 'src/lib/trayicon.c')
-rw-r--r-- | src/lib/trayicon.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/trayicon.c b/src/lib/trayicon.c index 1b8edd85..788f4f86 100644 --- a/src/lib/trayicon.c +++ b/src/lib/trayicon.c | |||
@@ -88,7 +88,9 @@ GNUNET_GTK_tray_icon_quit (GtkMenuItem *menuitem, gpointer user_data) | |||
88 | * @param user_data unused | 88 | * @param user_data unused |
89 | */ | 89 | */ |
90 | static int | 90 | static int |
91 | tray_icon_on_menu (GtkWidget *widget, GdkEvent *event, gpointer user_data) | 91 | tray_icon_on_menu (GtkWidget *widget, |
92 | GdkEvent *event, | ||
93 | gpointer user_data) | ||
92 | { | 94 | { |
93 | struct GNUNET_GTK_MainLoop *ml = user_data; | 95 | struct GNUNET_GTK_MainLoop *ml = user_data; |
94 | GtkMenu *tray_menu; | 96 | GtkMenu *tray_menu; |
@@ -103,7 +105,8 @@ tray_icon_on_menu (GtkWidget *widget, GdkEvent *event, gpointer user_data) | |||
103 | builder = | 105 | builder = |
104 | GNUNET_GTK_get_new_builder ("gnunet_gtk_status_bar_menu.glade", ml); | 106 | GNUNET_GTK_get_new_builder ("gnunet_gtk_status_bar_menu.glade", ml); |
105 | tray_menu = GTK_MENU ( | 107 | tray_menu = GTK_MENU ( |
106 | gtk_builder_get_object (builder, "GNUNET_GTK_status_bar_popup_menu")); | 108 | gtk_builder_get_object (builder, |
109 | "GNUNET_GTK_status_bar_popup_menu")); | ||
107 | g_object_ref (tray_menu); | 110 | g_object_ref (tray_menu); |
108 | gtk_menu_popup (tray_menu, | 111 | gtk_menu_popup (tray_menu, |
109 | NULL, | 112 | NULL, |
@@ -161,13 +164,17 @@ GNUNET_GTK_tray_icon_create (struct GNUNET_GTK_MainLoop *ml, | |||
161 | * @param tooltip tooltip for the tray icon | 164 | * @param tooltip tooltip for the tray icon |
162 | */ | 165 | */ |
163 | void | 166 | void |
164 | GNUNET_GTK_tray_icon_change (const char *icon_name, const char *tooltip) | 167 | GNUNET_GTK_tray_icon_change (const char *icon_name, |
168 | const char *tooltip) | ||
165 | { | 169 | { |
166 | if (NULL == tray_icon) | 170 | if (NULL == tray_icon) |
167 | return; | 171 | return; |
168 | gtk_status_icon_set_from_icon_name (tray_icon, icon_name); | 172 | gtk_status_icon_set_from_icon_name (tray_icon, |
169 | gtk_status_icon_set_tooltip_text (tray_icon, tooltip); | 173 | icon_name); |
170 | gtk_status_icon_set_visible (tray_icon, TRUE); | 174 | gtk_status_icon_set_tooltip_text (tray_icon, |
175 | tooltip); | ||
176 | gtk_status_icon_set_visible (tray_icon, | ||
177 | TRUE); | ||
171 | } | 178 | } |
172 | 179 | ||
173 | 180 | ||
@@ -184,4 +191,5 @@ GNUNET_GTK_tray_icon_destroy () | |||
184 | main_window = NULL; | 191 | main_window = NULL; |
185 | } | 192 | } |
186 | 193 | ||
194 | |||
187 | /* end of trayicon.c */ | 195 | /* end of trayicon.c */ |