Also allow exiting the application from the systray plug-in

This commit is contained in:
Pierre Pronchery 2011-08-20 23:21:23 +00:00
parent cef05cca05
commit 6cae6dcdef

View File

@ -155,10 +155,11 @@ static void _popup_menu_on_show_contacts(gpointer data);
static void _popup_menu_on_show_dialer(gpointer data); static void _popup_menu_on_show_dialer(gpointer data);
static void _popup_menu_on_show_logs(gpointer data); static void _popup_menu_on_show_logs(gpointer data);
static void _popup_menu_on_show_messages(gpointer data); static void _popup_menu_on_show_messages(gpointer data);
static void _popup_menu_on_show_settings(gpointer data);
static void _popup_menu_on_show_write(gpointer data); static void _popup_menu_on_show_write(gpointer data);
static void _popup_menu_on_show_settings(gpointer data);
static void _popup_menu_on_resume(gpointer data); static void _popup_menu_on_resume(gpointer data);
static void _popup_menu_on_suspend(gpointer data); static void _popup_menu_on_suspend(gpointer data);
static void _popup_menu_on_quit(gpointer data);
static void _systray_on_popup_menu(GtkStatusIcon * icon, guint button, static void _systray_on_popup_menu(GtkStatusIcon * icon, guint button,
guint time, gpointer data) guint time, gpointer data)
@ -180,15 +181,18 @@ static void _systray_on_popup_menu(GtkStatusIcon * icon, guint button,
{ "logviewer", "Show _logs", _popup_menu_on_show_logs }, { "logviewer", "Show _logs", _popup_menu_on_show_logs },
{ "stock_mail-compose", "Show _messages", { "stock_mail-compose", "Show _messages",
_popup_menu_on_show_messages }, _popup_menu_on_show_messages },
{ "gtk-preferences", "Show _settings",
_popup_menu_on_show_settings },
{ "stock_mail-compose", "_Write a message", { "stock_mail-compose", "_Write a message",
_popup_menu_on_show_write }, _popup_menu_on_show_write },
{ NULL, NULL, NULL }, { NULL, NULL, NULL },
{ "gtk-preferences", "_Settings",
_popup_menu_on_show_settings },
{ NULL, NULL, NULL },
{ "gtk-media-play-ltr", "_Resume telephony", { "gtk-media-play-ltr", "_Resume telephony",
_popup_menu_on_resume }, _popup_menu_on_resume },
{ "gtk-media-pause", "S_uspend telephony", { "gtk-media-pause", "S_uspend telephony",
_popup_menu_on_suspend }, _popup_menu_on_suspend },
{ NULL, NULL, NULL },
{ "gtk-quit", "_Quit", _popup_menu_on_quit },
}; };
size_t i; size_t i;
@ -283,4 +287,9 @@ static void _popup_menu_on_suspend(gpointer data)
PHONE_MESSAGE_POWER_MANAGEMENT, PHONE_MESSAGE_POWER_MANAGEMENT,
PHONE_MESSAGE_POWER_MANAGEMENT_SUSPEND); PHONE_MESSAGE_POWER_MANAGEMENT_SUSPEND);
} }
static void _popup_menu_on_quit(gpointer data)
{
gtk_main_quit();
}
#endif #endif