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 <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2016-06-14 22:23:18 +02:00
parent 3960828150
commit 0e98f93b0e
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -1825,8 +1825,6 @@ virt_viewer_app_on_application_startup(GApplication *app)
g_application_quit(app);
return;
}
g_application_hold(app);
}
static gboolean