Commit db4732e8 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Expose internal GtkTreeSelection

	child of GtkTreeView so that "changed" signal can be connected to. Fixes bug 383766.
parent 054032ca
......@@ -2,6 +2,9 @@
* gladeui/glade-widget.c: Dont set packing properties onto internal widgets.
* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Expose internal GtkTreeSelection
child of GtkTreeView so that "changed" signal can be connected to. Fixes bug 383766.
2011-01-09 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-design-layout.c: Fixed to not hide widgets when removing
......
......@@ -1866,6 +1866,7 @@ glade_gtk_box_replace_child (GladeWidgetAdaptor * adaptor,
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->replace_child (adaptor,
container,
current, new_widget);
gbox = glade_widget_get_from_gobject (container);
if ((gchild = glade_widget_get_from_gobject (new_widget)) != NULL)
/* The "Remove Slot" operation only makes sence on placeholders,
......@@ -1873,7 +1874,6 @@ glade_gtk_box_replace_child (GladeWidgetAdaptor * adaptor,
*/
glade_widget_set_pack_action_visible (gchild, "remove_slot", FALSE);
gbox = glade_widget_get_from_gobject (container);
fix_response_id_on_child (gbox, current, FALSE);
fix_response_id_on_child (gbox, new_widget, TRUE);
......@@ -11142,6 +11142,18 @@ glade_gtk_cell_layout_action_activate_as_widget (GladeWidgetAdaptor * adaptor,
/*--------------------------- GtkTreeView ---------------------------------*/
void
glade_gtk_treeview_post_create (GladeWidgetAdaptor *adaptor,
GObject *object,
GladeCreateReason reason)
{
GladeWidget *widget = glade_widget_get_from_gobject (object);
glade_widget_adaptor_create_internal
(widget, G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (object))),
"selection", "treeview", FALSE, reason);
}
static void
glade_gtk_treeview_launch_editor (GObject * treeview)
{
......@@ -11259,7 +11271,22 @@ GList *
glade_gtk_treeview_get_children (GladeWidgetAdaptor * adaptor,
GtkTreeView * view)
{
return gtk_tree_view_get_columns (view);
GList *children;
children = gtk_tree_view_get_columns (view);
children = g_list_prepend (children, gtk_tree_view_get_selection (view));
return children;
}
GObject *
glade_gtk_treeview_get_internal_child (GladeWidgetAdaptor * adaptor,
GtkTreeView *view, const gchar * name)
{
if (strcmp (name, "selection") == 0)
return (GObject *)gtk_tree_view_get_selection (view);
return NULL;
}
/* XXX FIXME: We should hide the actual "fixed-height-mode" setting from
......
......@@ -2012,10 +2012,11 @@ embedded in another object</_tooltip>
<glade-widget-class name="GtkTreeView" generic-name="treeview" _title="Tree View">
<post-create-function>empty</post-create-function>
<post-create-function>glade_gtk_treeview_post_create</post-create-function>
<child-set-property-function>glade_gtk_treeview_set_child_property</child-set-property-function>
<child-get-property-function>glade_gtk_treeview_get_child_property</child-get-property-function>
<get-children-function>glade_gtk_treeview_get_children</get-children-function>
<get-internal-child-function>glade_gtk_treeview_get_internal_child</get-internal-child-function>
<add-child-function>glade_gtk_treeview_add_child</add-child-function>
<replace-child-function>glade_gtk_treeview_replace_child</replace-child-function>
<remove-child-function>glade_gtk_treeview_remove_child</remove-child-function>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment