From 0e98f93b0ed0bf0e8afd4ea63bfb6ca50d7eba92 Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Jun 20 2016 15:33:15 +0000 Subject: remote-viewer: Add missing chain-up to parent's window_added() method It hasn't bitten us (so hard) so far but would from the moment we add support to app-menu/headerbar. By not chaining-up to the parent's method, gtk_window_set_application() is never called. This causes GApplication object not being able to load the app-menu, but using the "fallback" which only contains the "Quit" item. By chaining-up to the parent's method, g_application_hold() call on virt-viewer-app.c can be removed, as it is already called by the parent's window_added() method. Signed-off-by: Fabiano FidĂȘncio Acked-by: Eduardo Lima (Etrunko) Acked-by: Jonathon Jongsma --- diff --git a/src/remote-viewer.c b/src/remote-viewer.c index 11b51e9..71723cf 100644 --- a/src/remote-viewer.c +++ b/src/remote-viewer.c @@ -627,6 +627,8 @@ remote_viewer_window_added(GtkApplication *app, g_object_get_data(G_OBJECT(w), "virt-viewer-window")); spice_menu_update(REMOTE_VIEWER(app), win); spice_foreign_menu_update(REMOTE_VIEWER(app), win); + + GTK_APPLICATION_CLASS(remote_viewer_parent_class)->window_added(app, w); } #endif diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index b99ed32..4c3a373 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -1825,8 +1825,6 @@ virt_viewer_app_on_application_startup(GApplication *app) g_application_quit(app); return; } - - g_application_hold(app); } static gboolean