[gtk+] application window: Make menubar appear
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] application window: Make menubar appear
- Date: Sun, 8 Oct 2017 02:24:46 +0000 (UTC)
commit 4903f809a683329985b1529fd8712110a22e399b
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 7 22:24:09 2017 -0400
application window: Make menubar appear
This needed to be ported to snapshot, still.
gtk/gtkapplicationwindow.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 37c87e3..8eda444 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -799,6 +799,18 @@ gtk_application_window_init (GtkApplicationWindow *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)
{
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]