application window: Make menubar appear

This needed to be ported to snapshot, still.
This commit is contained in:
Matthias Clasen 2017-10-07 22:24:09 -04:00
parent de2074d3a3
commit 4903f809a6

View File

@ -798,6 +798,18 @@ gtk_application_window_init (GtkApplicationWindow *window)
G_CALLBACK (g_action_group_action_removed), window);
}
static void
gtk_application_window_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (widget);
GTK_WIDGET_CLASS (gtk_application_window_parent_class)->snapshot (widget, snapshot);
if (window->priv->menubar)
gtk_widget_snapshot_child (widget, window->priv->menubar, snapshot);
}
static void
gtk_application_window_class_init (GtkApplicationWindowClass *class)
{
@ -806,12 +818,15 @@ gtk_application_window_class_init (GtkApplicationWindowClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
container_class->forall = gtk_application_window_real_forall_internal;
widget_class->measure = gtk_application_window_measure;
widget_class->size_allocate = gtk_application_window_real_size_allocate;
widget_class->realize = gtk_application_window_real_realize;
widget_class->unrealize = gtk_application_window_real_unrealize;
widget_class->map = gtk_application_window_real_map;
widget_class->unmap = gtk_application_window_real_unmap;
widget_class->snapshot = gtk_application_window_snapshot;
object_class->get_property = gtk_application_window_get_property;
object_class->set_property = gtk_application_window_set_property;
object_class->dispose = gtk_application_window_dispose;