diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-18 20:57:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-18 20:58:13 +0100 |
commit | c2fc6a5c46e1f3a825ba707cdd677eae7e1a688f (patch) | |
tree | 7565e851d57ee3f702053831b8d56262a0caddf0 | |
parent | 1bf276ba6e0486bc8ccc74a219dd2db8acfcff03 (diff) |
Related: fdo#48835 run everything through the uno dispatcher for clean quit
Change-Id: I175eb959e7decbabce142ecedc09f09bd9764641
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index dff6d355b3ae..0b66ce255e6e 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -539,30 +539,7 @@ static void hud_activated( gboolean hud_active, gpointer user_data ) } } -struct ImplHelp -{ - DECL_STATIC_LINK( ImplHelp, ImplHelpMsg, void* ); -}; - -IMPL_STATIC_LINK_NOINSTANCE( ImplHelp, ImplHelpMsg, void*, EMPTYARG ) -{ - Help* pHelp = Application::GetHelp(); - if (pHelp) - pHelp->Start(OUString(OOO_HELP_INDEX), NULL); - return 0; -} - -static void help_activated(GSimpleAction *, GVariant*, gpointer) -{ - Application::PostUserEvent(STATIC_LINK(NULL, ImplHelp, ImplHelpMsg)); -} - -static void quit_activated(GSimpleAction *, GVariant*, gpointer) -{ - Application::Quit(); -} - -static void dialog_activated(GSimpleAction *action, GVariant*, gpointer) +static void activate_uno(GSimpleAction *action, GVariant*, gpointer) { uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); @@ -602,10 +579,10 @@ static void dialog_activated(GSimpleAction *action, GVariant*, gpointer) } static GActionEntry app_entries[] = { - { "OptionsTreeDialog", dialog_activated, NULL, NULL, NULL, {0} }, - { "About", dialog_activated, NULL, NULL, NULL, {0} }, - { "help", help_activated, NULL, NULL, NULL, {0} }, - { "quit", quit_activated, NULL, NULL, NULL, {0} } + { "OptionsTreeDialog", activate_uno, NULL, NULL, NULL, {0} }, + { "About", activate_uno, NULL, NULL, NULL, {0} }, + { "HelpIndex", activate_uno, NULL, NULL, NULL, {0} }, + { "Quit", activate_uno, NULL, NULL, NULL, {0} } }; gboolean ensure_dbus_setup( gpointer data ) @@ -661,12 +638,12 @@ gboolean ensure_dbus_setup( gpointer data ) item = g_menu_item_new("_About", "app.About"); g_menu_append_item( secondsubmenu, item ); - item = g_menu_item_new("_Help", "app.help"); + item = g_menu_item_new("_Help", "app.HelpIndex"); g_menu_append_item( secondsubmenu, item ); g_menu_append_section( menu, NULL, G_MENU_MODEL(secondsubmenu)); GMenu *thirdsubmenu = g_menu_new (); - item = g_menu_item_new("_Quit", "app.quit"); + item = g_menu_item_new("_Quit", "app.Quit"); g_menu_append_item( thirdsubmenu, item ); g_menu_append_section( menu, NULL, G_MENU_MODEL(thirdsubmenu)); |