[glade] glade-gtk-popover-menu.c: Properly derive the GtkPopover adaptor
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] glade-gtk-popover-menu.c: Properly derive the GtkPopover adaptor
- Date: Thu, 28 Jan 2016 15:51:47 +0000 (UTC)
commit 31a5461f8a4c21e9515121843fd44ae7251668d1
Author: Tristan Van Berkom <tristan upstairslabs com>
Date: Thu Jan 28 16:49:44 2016 +0100
glade-gtk-popover-menu.c: Properly derive the GtkPopover adaptor
Chain up to popover implementations, in post create dont bother
creating the placeholder, it will be done by the GtkContainer adaptor.
Chaining up in post create here lets us properly ignore the ESC key
event on popovers in the workspace as well.
plugins/gtk+/glade-gtk-popover-menu.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-popover-menu.c b/plugins/gtk+/glade-gtk-popover-menu.c
index 773d05e..76e72d5 100644
--- a/plugins/gtk+/glade-gtk-popover-menu.c
+++ b/plugins/gtk+/glade-gtk-popover-menu.c
@@ -190,8 +190,6 @@ glade_gtk_popover_menu_post_create (GladeWidgetAdaptor *adaptor,
g_signal_connect (project, "parse-finished",
G_CALLBACK (glade_gtk_popover_menu_parse_finished),
container);
- else if (reason == GLADE_CREATE_USER)
- gtk_container_add (GTK_CONTAINER (container), glade_placeholder_new ());
g_signal_connect (G_OBJECT (parent), "notify::project",
G_CALLBACK (glade_gtk_popover_menu_project_changed), NULL);
@@ -200,6 +198,8 @@ glade_gtk_popover_menu_post_create (GladeWidgetAdaptor *adaptor,
g_signal_connect (container, "notify::visible-submenu",
G_CALLBACK (glade_gtk_popover_menu_visible_submenu_changed), NULL);
+
+ GWA_GET_CLASS (GTK_TYPE_POPOVER)->post_create (adaptor, container, reason);
}
void
@@ -429,7 +429,7 @@ glade_gtk_popover_menu_set_property (GladeWidgetAdaptor * adaptor,
else if (!strcmp (id, "current"))
glade_gtk_popover_menu_set_current (object, value);
else
- GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
+ GWA_GET_CLASS (GTK_TYPE_POPOVER)->set_property (adaptor, object, id, value);
}
void
@@ -449,7 +449,7 @@ glade_gtk_popover_menu_get_property (GladeWidgetAdaptor * adaptor,
g_value_set_int (value, get_visible_child (GTK_POPOVER_MENU (object), NULL));
}
else
- GWA_GET_CLASS (GTK_TYPE_CONTAINER)->get_property (adaptor, object, id, value);
+ GWA_GET_CLASS (GTK_TYPE_POPOVER)->get_property (adaptor, object, id, value);
}
static gboolean
@@ -487,8 +487,8 @@ glade_gtk_popover_menu_verify_property (GladeWidgetAdaptor * adaptor,
return glade_gtk_popover_menu_verify_submenus (object, value);
else if (!strcmp (id, "current"))
return glade_gtk_popover_menu_verify_current (object, value);
- else if (GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property)
- return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object, id, value);
+ else if (GWA_GET_CLASS (GTK_TYPE_POPOVER)->verify_property)
+ return GWA_GET_CLASS (GTK_TYPE_POPOVER)->verify_property (adaptor, object, id, value);
return TRUE;
}
@@ -556,7 +556,7 @@ glade_gtk_popover_menu_set_child_property (GladeWidgetAdaptor * adaptor,
gtk_container_child_set_property (GTK_CONTAINER (container),
GTK_WIDGET (child), id, value);
else
- GWA_GET_CLASS (GTK_TYPE_CONTAINER)->child_set_property (adaptor, container, child, id, value);
+ GWA_GET_CLASS (GTK_TYPE_POPOVER)->child_set_property (adaptor, container, child, id, value);
}
void
@@ -577,6 +577,6 @@ glade_gtk_popover_menu_create_editable (GladeWidgetAdaptor * adaptor,
if (type == GLADE_PAGE_GENERAL)
return (GladeEditable *) glade_popover_menu_editor_new ();
else
- return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
+ return GWA_GET_CLASS (GTK_TYPE_POPOVER)->create_editable (adaptor, type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]