~vcs-imports/glade/master

« back to all changes in this revision

Viewing changes to plugins/gtk+/glade-gtk.c

  • Committer: Tristan Van Berkom
  • Date: 2011-01-10 06:57:01 UTC
  • mto: This revision was merged to the branch mainline in revision 2164.
  • Revision ID: git-v1:db4732e826b0588b77b16ae62646bd08c6e86b67
        * 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1866
1866
  GWA_GET_CLASS (GTK_TYPE_CONTAINER)->replace_child (adaptor,
1867
1867
                                                     container,
1868
1868
                                                     current, new_widget);
 
1869
  gbox = glade_widget_get_from_gobject (container);
1869
1870
 
1870
1871
  if ((gchild = glade_widget_get_from_gobject (new_widget)) != NULL)
1871
1872
    /* The "Remove Slot" operation only makes sence on placeholders,
1873
1874
     */
1874
1875
    glade_widget_set_pack_action_visible (gchild, "remove_slot", FALSE);
1875
1876
 
1876
 
  gbox = glade_widget_get_from_gobject (container);
1877
1877
  fix_response_id_on_child (gbox, current, FALSE);
1878
1878
  fix_response_id_on_child (gbox, new_widget, TRUE);
1879
1879
 
11142
11142
 
11143
11143
 
11144
11144
/*--------------------------- GtkTreeView ---------------------------------*/
 
11145
void
 
11146
glade_gtk_treeview_post_create (GladeWidgetAdaptor *adaptor,
 
11147
                                GObject            *object, 
 
11148
                                GladeCreateReason   reason)
 
11149
{
 
11150
  GladeWidget *widget = glade_widget_get_from_gobject (object);
 
11151
 
 
11152
  glade_widget_adaptor_create_internal
 
11153
    (widget, G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (object))),
 
11154
     "selection", "treeview", FALSE, reason);
 
11155
}
 
11156
 
11145
11157
static void
11146
11158
glade_gtk_treeview_launch_editor (GObject * treeview)
11147
11159
{
11259
11271
glade_gtk_treeview_get_children (GladeWidgetAdaptor * adaptor,
11260
11272
                                 GtkTreeView * view)
11261
11273
{
11262
 
  return gtk_tree_view_get_columns (view);
 
11274
  GList *children;
 
11275
 
 
11276
  children = gtk_tree_view_get_columns (view);
 
11277
  children = g_list_prepend (children, gtk_tree_view_get_selection (view));
 
11278
 
 
11279
  return children;
 
11280
}
 
11281
 
 
11282
GObject *
 
11283
glade_gtk_treeview_get_internal_child (GladeWidgetAdaptor * adaptor,
 
11284
                                       GtkTreeView *view, const gchar * name)
 
11285
{
 
11286
  if (strcmp (name, "selection") == 0)
 
11287
    return (GObject *)gtk_tree_view_get_selection (view);
 
11288
 
 
11289
  return NULL;
11263
11290
}
11264
11291
 
11265
11292
/* XXX FIXME: We should hide the actual "fixed-height-mode" setting from