From 9cad320ad18a5db355e03db9fe1a2209be6ab6ae Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 30 Aug 2014 18:01:43 +0200 Subject: [PATCH] Let the gprs(1) tool exit when stand-alone (through the systray icon) --- src/plugins/gprs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/gprs.c b/src/plugins/gprs.c index 132075b..779b4f8 100644 --- a/src/plugins/gprs.c +++ b/src/plugins/gprs.c @@ -820,6 +820,14 @@ static void _gprs_on_popup_menu(GtkStatusIcon * icon, guint button, g_signal_connect_swapped(menuitem, "activate", G_CALLBACK( _gprs_settings), gprs); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); +#ifdef PROGNAME + menuitem = gtk_separator_menu_item_new(); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + /* quit */ + menuitem = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, NULL); + g_signal_connect(menuitem, "activate", G_CALLBACK(gtk_main_quit), NULL); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); +#endif gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button, time); }