]> Pileus Git - ~andy/gtk/blobdiff - tests/prop-editor.c
Use gtk_box_new() instead gtk_[v|h]box_new()
[~andy/gtk] / tests / prop-editor.c
index 22f6ad2fd6405b3a1c010f6466fbac9d3c2165b4..be99e827ee9ff7dac00ec900d8c061dd9372e192 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <string.h>
 
-#undef GTK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 
 #include "prop-editor.h"
@@ -29,7 +28,7 @@ typedef struct
 {
   gpointer instance;
   GObject *alive_object;
-  guint id;
+  gulong id;
 } DisconnectData;
 
 static void
@@ -103,7 +102,7 @@ typedef struct
 {
   GObject *obj;
   GParamSpec *spec;
-  gint modified_id;
+  gulong modified_id;
 } ObjectProperty;
 
 static void
@@ -113,11 +112,11 @@ free_object_property (ObjectProperty *p)
 }
 
 static void
-connect_controller (GObject       *controller,
-                    const gchar   *signal,
-                    GObject       *model,
-                   GParamSpec    *spec,
-                    GtkSignalFunc  func)
+connect_controller (GObject     *controller,
+                    const gchar *signal,
+                    GObject     *model,
+                   GParamSpec  *spec,
+                    GCallback    func)
 {
   ObjectProperty *p;
 
@@ -365,47 +364,51 @@ bool_modified (GtkToggleButton *tb, gpointer data)
       GtkWidget *widget = GTK_WIDGET (p->obj);
       GtkWidget *parent = gtk_widget_get_parent (widget);
 
-      gtk_container_child_set (GTK_CONTAINER (parent), 
-                              widget, p->spec->name, (int) tb->active, NULL);
+      gtk_container_child_set (GTK_CONTAINER (parent), widget,
+                               p->spec->name, (int) gtk_toggle_button_get_active (tb),
+                               NULL);
     }
   else
-    g_object_set (p->obj, p->spec->name, (int) tb->active, NULL);
+    g_object_set (p->obj, p->spec->name, (int) gtk_toggle_button_get_active (tb), NULL);
 }
 
 static void
 bool_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkToggleButton *tb = GTK_TOGGLE_BUTTON (data);
+  GtkWidget *child;
   GValue val = { 0, };  
   
   g_value_init (&val, G_TYPE_BOOLEAN);
   get_property_value (object, pspec, &val);
 
-  if (g_value_get_boolean (&val) != tb->active)
+  if (g_value_get_boolean (&val) != gtk_toggle_button_get_active (tb))
     {
       block_controller (G_OBJECT (tb));
       gtk_toggle_button_set_active (tb, g_value_get_boolean (&val));
       unblock_controller (G_OBJECT (tb));
     }
 
-  gtk_label_set_text (GTK_LABEL (GTK_BIN (tb)->child), g_value_get_boolean (&val) ?
-                      "TRUE" : "FALSE");
+  child = gtk_bin_get_child (GTK_BIN (tb));
+  gtk_label_set_text (GTK_LABEL (child),
+                      g_value_get_boolean (&val) ? "TRUE" : "FALSE");
   
   g_value_unset (&val);
 }
 
 
 static void
-enum_modified (GtkOptionMenu *om, gpointer data)
+enum_modified (GtkComboBox *cb, gpointer data)
 {
   ObjectProperty *p = data;
   gint i;
   GEnumClass *eclass;
   
   eclass = G_ENUM_CLASS (g_type_class_peek (p->spec->value_type));
-  
-  i = gtk_option_menu_get_history (om);
-  
+
+  i = gtk_combo_box_get_active (cb);
+
+
   if (is_child_property (p->spec))
     {
       GtkWidget *widget = GTK_WIDGET (p->obj);
@@ -421,7 +424,7 @@ enum_modified (GtkOptionMenu *om, gpointer data)
 static void
 enum_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
-  GtkOptionMenu *om = GTK_OPTION_MENU (data);
+  GtkComboBox *cb = GTK_COMBO_BOX (data);
   GValue val = { 0, };  
   GEnumClass *eclass;
   gint i;
@@ -439,11 +442,11 @@ enum_changed (GObject *object, GParamSpec *pspec, gpointer data)
       ++i;
     }
   
-  if (gtk_option_menu_get_history (om) != i)
+  if (gtk_combo_box_get_active (cb) != i)
     {
-      block_controller (G_OBJECT (om));
-      gtk_option_menu_set_history (om, i);
-      unblock_controller (G_OBJECT (om));
+      block_controller (G_OBJECT (cb));
+      gtk_combo_box_set_active (cb, i);
+      unblock_controller (G_OBJECT (cb));
     }
   
   g_value_unset (&val);
@@ -593,13 +596,15 @@ pointer_changed (GObject *object, GParamSpec *pspec, gpointer data)
   g_free (str);
 }
 
-gchar *
-object_label (GObject *obj)
+static gchar *
+object_label (GObject *obj, GParamSpec *pspec)
 {
   const gchar *name;
 
   if (obj)
     name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
+  else if (pspec)
+    name = g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec));
   else
     name = "unknown";
   return g_strdup_printf ("Object: %p (%s)", obj, name);
@@ -618,7 +623,7 @@ object_changed (GObject *object, GParamSpec *pspec, gpointer data)
   g_object_get (object, pspec->name, &obj, NULL);
   g_list_free (children);
 
-  str = object_label (obj);
+  str = object_label (obj, pspec);
   
   gtk_label_set_text (GTK_LABEL (label), str);
   gtk_widget_set_sensitive (button, G_IS_OBJECT (obj));
@@ -655,6 +660,50 @@ object_properties (GtkWidget *button,
     create_prop_editor (obj, 0);
 }
  
+static void
+color_modified (GtkColorButton *cb, gpointer data)
+{
+  ObjectProperty *p = data;
+  GdkColor color;
+
+  gtk_color_button_get_color (cb, &color);
+
+  if (is_child_property (p->spec))
+    {
+      GtkWidget *widget = GTK_WIDGET (p->obj);
+      GtkWidget *parent = gtk_widget_get_parent (widget);
+
+      gtk_container_child_set (GTK_CONTAINER (parent),
+                              widget, p->spec->name, &color, NULL);
+    }
+  else
+    g_object_set (p->obj, p->spec->name, &color, NULL);
+}
+
+static void
+color_changed (GObject *object, GParamSpec *pspec, gpointer data)
+{
+  GtkColorButton *cb = GTK_COLOR_BUTTON (data);
+  GValue val = { 0, };
+  GdkColor *color;
+  GdkColor cb_color;
+
+  g_value_init (&val, GDK_TYPE_COLOR);
+  get_property_value (object, pspec, &val);
+
+  color = g_value_get_boxed (&val);
+  gtk_color_button_get_color (cb, &cb_color);
+
+  if (color != NULL && !gdk_color_equal (color, &cb_color))
+    {
+      block_controller (G_OBJECT (cb));
+      gtk_color_button_set_color (cb, color);
+      unblock_controller (G_OBJECT (cb));
+    }
+
+  g_value_unset (&val);
+}
+
 static GtkWidget *
 property_widget (GObject    *object, 
                 GParamSpec *spec, 
@@ -667,14 +716,13 @@ property_widget (GObject    *object,
 
   if (type == G_TYPE_PARAM_INT)
     {
-      adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_INT (spec)->default_value,
-                                               G_PARAM_SPEC_INT (spec)->minimum,
-                                               G_PARAM_SPEC_INT (spec)->maximum,
-                                               1,
-                                               MAX ((G_PARAM_SPEC_INT (spec)->maximum -
-                                                     G_PARAM_SPEC_INT (spec)->minimum) / 10, 1),
-                                               0.0));
-      
+      adj = gtk_adjustment_new (G_PARAM_SPEC_INT (spec)->default_value,
+                                G_PARAM_SPEC_INT (spec)->minimum,
+                                G_PARAM_SPEC_INT (spec)->maximum,
+                                1,
+                                MAX ((G_PARAM_SPEC_INT (spec)->maximum - G_PARAM_SPEC_INT (spec)->minimum) / 10, 1),
+                                0.0);
+
       prop_edit = gtk_spin_button_new (adj, 1.0, 0);
       
       g_object_connect_property (object, spec, 
@@ -683,19 +731,17 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (adj), "value_changed",
-                           object, spec, (GtkSignalFunc) int_modified);
+                           object, spec, G_CALLBACK (int_modified));
     }
   else if (type == G_TYPE_PARAM_UINT)
     {
-      adj = GTK_ADJUSTMENT (
-                           gtk_adjustment_new (G_PARAM_SPEC_UINT (spec)->default_value,
-                                               G_PARAM_SPEC_UINT (spec)->minimum,
-                                               G_PARAM_SPEC_UINT (spec)->maximum,
-                                               1,
-                                               MAX ((G_PARAM_SPEC_UINT (spec)->maximum -
-                                                     G_PARAM_SPEC_UINT (spec)->minimum) / 10, 1),
-                                               0.0));
-      
+      adj = gtk_adjustment_new (G_PARAM_SPEC_UINT (spec)->default_value,
+                                G_PARAM_SPEC_UINT (spec)->minimum,
+                                G_PARAM_SPEC_UINT (spec)->maximum,
+                                1,
+                                MAX ((G_PARAM_SPEC_UINT (spec)->maximum - G_PARAM_SPEC_UINT (spec)->minimum) / 10, 1),
+                                0.0);
+
       prop_edit = gtk_spin_button_new (adj, 1.0, 0);
       
       g_object_connect_property (object, spec, 
@@ -704,19 +750,17 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (adj), "value_changed",
-                           object, spec, (GtkSignalFunc) uint_modified);
+                           object, spec, G_CALLBACK (uint_modified));
     }
   else if (type == G_TYPE_PARAM_FLOAT)
     {
+      adj = gtk_adjustment_new (G_PARAM_SPEC_FLOAT (spec)->default_value,
+                                G_PARAM_SPEC_FLOAT (spec)->minimum,
+                                G_PARAM_SPEC_FLOAT (spec)->maximum,
+                                0.1,
+                                MAX ((G_PARAM_SPEC_FLOAT (spec)->maximum - G_PARAM_SPEC_FLOAT (spec)->minimum) / 10, 0.1),
+                                0.0);
 
-      adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_FLOAT (spec)->default_value,
-                                               G_PARAM_SPEC_FLOAT (spec)->minimum,
-                                               G_PARAM_SPEC_FLOAT (spec)->maximum,
-                                               0.1,
-                                               MAX ((G_PARAM_SPEC_FLOAT (spec)->maximum -
-                                                     G_PARAM_SPEC_FLOAT (spec)->minimum) / 10, 0.1),
-                                               0.0));
-      
       prop_edit = gtk_spin_button_new (adj, 0.1, 2);
       
       g_object_connect_property (object, spec, 
@@ -725,18 +769,17 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (adj), "value_changed",
-                           object, spec, (GtkSignalFunc) float_modified);
+                           object, spec, G_CALLBACK (float_modified));
     }
   else if (type == G_TYPE_PARAM_DOUBLE)
     {
-      adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_DOUBLE (spec)->default_value,
-                                               G_PARAM_SPEC_DOUBLE (spec)->minimum,
-                                               G_PARAM_SPEC_DOUBLE (spec)->maximum,
-                                               0.1,
-                                               MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum -
-                                                     G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1),
-                                               0.0));
-      
+      adj = gtk_adjustment_new (G_PARAM_SPEC_DOUBLE (spec)->default_value,
+                                G_PARAM_SPEC_DOUBLE (spec)->minimum,
+                                G_PARAM_SPEC_DOUBLE (spec)->maximum,
+                                0.1,
+                                MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum - G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1),
+                                0.0);
+
       prop_edit = gtk_spin_button_new (adj, 0.1, 2);
       
       g_object_connect_property (object, spec, 
@@ -745,7 +788,7 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (adj), "value_changed",
-                           object, spec, (GtkSignalFunc) double_modified);
+                           object, spec, G_CALLBACK (double_modified));
     }
   else if (type == G_TYPE_PARAM_STRING)
     {
@@ -757,7 +800,7 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (prop_edit), "changed",
-                           object, spec, (GtkSignalFunc) string_modified);
+                           object, spec, G_CALLBACK (string_modified));
     }
   else if (type == G_TYPE_PARAM_BOOLEAN)
     {
@@ -769,46 +812,35 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (prop_edit), "toggled",
-                           object, spec, (GtkSignalFunc) bool_modified);
+                           object, spec, G_CALLBACK (bool_modified));
     }
   else if (type == G_TYPE_PARAM_ENUM)
     {
       {
-       GtkWidget *menu;
        GEnumClass *eclass;
        gint j;
        
-       prop_edit = gtk_option_menu_new ();
-       
-       menu = gtk_menu_new ();
+       prop_edit = gtk_combo_box_text_new ();
        
        eclass = G_ENUM_CLASS (g_type_class_ref (spec->value_type));
        
        j = 0;
        while (j < eclass->n_values)
          {
-           GtkWidget *mi;
-           
-           mi = gtk_menu_item_new_with_label (eclass->values[j].value_name);
-           
-           gtk_widget_show (mi);
-           
-           gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-           
+           gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (prop_edit),
+                                           eclass->values[j].value_name);
            ++j;
          }
        
        g_type_class_unref (eclass);
        
-       gtk_option_menu_set_menu (GTK_OPTION_MENU (prop_edit), menu);
-       
        g_object_connect_property (object, spec,
                                   G_CALLBACK (enum_changed),
                                   prop_edit, G_OBJECT (prop_edit));
        
        if (can_modify)
          connect_controller (G_OBJECT (prop_edit), "changed",
-                             object, spec, (GtkSignalFunc) enum_modified);
+                             object, spec, G_CALLBACK (enum_modified));
       }
     }
   else if (type == G_TYPE_PARAM_FLAGS)
@@ -817,7 +849,7 @@ property_widget (GObject    *object,
        GFlagsClass *fclass;
        gint j;
        
-       prop_edit = gtk_vbox_new (FALSE, 0);
+       prop_edit = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
        
        fclass = G_FLAGS_CLASS (g_type_class_ref (spec->value_type));
        
@@ -831,7 +863,7 @@ property_widget (GObject    *object,
            gtk_box_pack_start (GTK_BOX (prop_edit), b, FALSE, FALSE, 0);
            if (can_modify) 
              connect_controller (G_OBJECT (b), "toggled",
-                                 object, spec, (GtkSignalFunc) flags_modified);
+                                 object, spec, G_CALLBACK (flags_modified));
          }
        
        g_type_class_unref (fclass);
@@ -852,7 +884,7 @@ property_widget (GObject    *object,
       
       if (can_modify)
        connect_controller (G_OBJECT (prop_edit), "changed",
-                           object, spec, (GtkSignalFunc) unichar_modified);
+                           object, spec, G_CALLBACK (unichar_modified));
     }
   else if (type == G_TYPE_PARAM_POINTER)
     {
@@ -866,7 +898,7 @@ property_widget (GObject    *object,
     {
       GtkWidget *label, *button;
 
-      prop_edit = gtk_hbox_new (FALSE, 5);
+      prop_edit = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 5);
 
       label = gtk_label_new ("");
       button = gtk_button_new_with_label ("Properties");
@@ -882,6 +914,19 @@ property_widget (GObject    *object,
                                 G_CALLBACK (object_changed),
                                 prop_edit, G_OBJECT (label));
     }
+  else if (type == G_TYPE_PARAM_BOXED &&
+           G_PARAM_SPEC_VALUE_TYPE (spec) == GDK_TYPE_COLOR)
+    {
+      prop_edit = gtk_color_button_new ();
+
+      g_object_connect_property (object, spec,
+                                G_CALLBACK (color_changed),
+                                prop_edit, G_OBJECT (prop_edit));
+
+      if (can_modify)
+       connect_controller (G_OBJECT (prop_edit), "color-set",
+                           object, spec, G_CALLBACK (color_modified));
+    }
   else
     {  
       msg = g_strdup_printf ("uneditable property type: %s",
@@ -895,9 +940,8 @@ property_widget (GObject    *object,
 }
 
 static GtkWidget *
-properties_from_type (GObject     *object,
-                     GType        type,
-                     GtkTooltips *tips)
+properties_from_type (GObject *object,
+                     GType    type)
 {
   GtkWidget *prop_edit;
   GtkWidget *label;
@@ -919,8 +963,10 @@ properties_from_type (GObject     *object,
       specs = g_object_class_list_properties (class, &n_specs);
     }
         
-  if (n_specs == 0)
+  if (n_specs == 0) {
+    g_free (specs);
     return NULL;
+  }
   
   table = gtk_table_new (n_specs, 2, FALSE);
   gtk_table_set_col_spacing (GTK_TABLE (table), 0, 10);
@@ -964,8 +1010,8 @@ properties_from_type (GObject     *object,
             gtk_widget_set_sensitive (prop_edit, FALSE);
 
          if (g_param_spec_get_blurb (spec))
-           gtk_tooltips_set_tip (tips, prop_edit, g_param_spec_get_blurb (spec), NULL);
-         
+           gtk_widget_set_tooltip_text (prop_edit, g_param_spec_get_blurb (spec));
+
           /* set initial value */
           g_object_notify (object, spec->name);
         }
@@ -974,7 +1020,7 @@ properties_from_type (GObject     *object,
     }
 
 
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
 
   sw = gtk_scrolled_window_new (NULL, NULL);
@@ -989,8 +1035,7 @@ properties_from_type (GObject     *object,
 }
 
 static GtkWidget *
-child_properties_from_object (GObject     *object,
-                             GtkTooltips *tips)
+child_properties_from_object (GObject *object)
 {
   GtkWidget *prop_edit;
   GtkWidget *label;
@@ -1048,8 +1093,8 @@ child_properties_from_object (GObject     *object,
             gtk_widget_set_sensitive (prop_edit, FALSE);
 
          if (g_param_spec_get_blurb (spec))
-           gtk_tooltips_set_tip (tips, prop_edit, g_param_spec_get_blurb (spec), NULL);
-         
+           gtk_widget_set_tooltip_text (prop_edit, g_param_spec_get_blurb (spec));
+
           /* set initial value */
           gtk_widget_child_notify (GTK_WIDGET (object), spec->name);
         }
@@ -1057,7 +1102,7 @@ child_properties_from_object (GObject     *object,
       ++i;
     }
 
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
 
   sw = gtk_scrolled_window_new (NULL, NULL);
@@ -1079,8 +1124,7 @@ child_properties (GtkWidget *button,
 }
 
 static GtkWidget *
-children_from_object (GObject     *object,
-                     GtkTooltips *tips)
+children_from_object (GObject *object)
 {
   GList *children, *c;
   GtkWidget *table, *label, *prop_edit, *button, *vbox, *sw;
@@ -1104,9 +1148,9 @@ children_from_object (GObject     *object,
       gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
       gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, i, i + 1);
 
-      prop_edit = gtk_hbox_new (FALSE, 5);
+      prop_edit = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 5);
 
-      str = object_label (object);
+      str = object_label (object, NULL);
       label = gtk_label_new (str);
       g_free (str);
       button = gtk_button_new_with_label ("Properties");
@@ -1120,7 +1164,7 @@ children_from_object (GObject     *object,
       gtk_table_attach_defaults (GTK_TABLE (table), prop_edit, 1, 2, i, i + 1);
     }
 
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
 
   sw = gtk_scrolled_window_new (NULL, NULL);
@@ -1135,8 +1179,7 @@ children_from_object (GObject     *object,
 }
 
 static GtkWidget *
-cells_from_object (GObject     *object,
-                   GtkTooltips *tips)
+cells_from_object (GObject *object)
 {
   GList *cells, *c;
   GtkWidget *table, *label, *prop_edit, *button, *vbox, *sw;
@@ -1160,9 +1203,9 @@ cells_from_object (GObject     *object,
       gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
       gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, i, i + 1);
 
-      prop_edit = gtk_hbox_new (FALSE, 5);
+      prop_edit = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 5);
 
-      str = object_label (object);
+      str = object_label (object, NULL);
       label = gtk_label_new (str);
       g_free (str);
       button = gtk_button_new_with_label ("Properties");
@@ -1176,7 +1219,7 @@ cells_from_object (GObject     *object,
       gtk_table_attach_defaults (GTK_TABLE (table), prop_edit, 1, 2, i, i + 1);
     }
 
-  vbox = gtk_vbox_new (FALSE, 0);
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
 
   sw = gtk_scrolled_window_new (NULL, NULL);
@@ -1189,12 +1232,6 @@ cells_from_object (GObject     *object,
 
   return sw;
 }
-static void
-kill_tips (GtkWindow *win, GtkObject *tips)
-{
-  gtk_object_destroy (tips);
-  g_object_unref (tips);
-}
 
 /* Pass zero for type if you want all properties */
 GtkWidget*
@@ -1203,7 +1240,6 @@ create_prop_editor (GObject   *object,
 {
   GtkWidget *win;
   GtkWidget *notebook;
-  GtkTooltips *tips;
   GtkWidget *properties;
   GtkWidget *label;
   gchar *title;
@@ -1221,13 +1257,6 @@ create_prop_editor (GObject   *object,
     gtk_window_set_screen (GTK_WINDOW (win),
                           gtk_widget_get_screen (GTK_WIDGET (object)));
 
-  tips = gtk_tooltips_new ();
-  g_object_ref (tips);
-  gtk_object_sink (GTK_OBJECT (tips));
-
-  /* Kill the tips when the widget goes away.  */
-  g_signal_connect (win, "destroy", G_CALLBACK (kill_tips), tips);
-
   /* hold a weak ref to the object we're editing */
   g_object_set_data_full (G_OBJECT (object), "prop-editor-win", win, model_destroy);
   g_object_set_data_full (G_OBJECT (win), "model-object", object, window_destroy);
@@ -1247,7 +1276,7 @@ create_prop_editor (GObject   *object,
       
       while (type)
        {
-         properties = properties_from_type (object, type, tips);
+         properties = properties_from_type (object, type);
          if (properties)
            {
              label = gtk_label_new (g_type_name (type));
@@ -1261,7 +1290,7 @@ create_prop_editor (GObject   *object,
       ifaces = g_type_interfaces (G_TYPE_FROM_INSTANCE (object), &n_ifaces);
       while (n_ifaces--)
        {
-         properties = properties_from_type (object, ifaces[n_ifaces], tips);
+         properties = properties_from_type (object, ifaces[n_ifaces]);
          if (properties)
            {
              label = gtk_label_new (g_type_name (ifaces[n_ifaces]));
@@ -1272,7 +1301,7 @@ create_prop_editor (GObject   *object,
 
       g_free (ifaces);
 
-      properties = child_properties_from_object (object, tips);
+      properties = child_properties_from_object (object);
       if (properties)
        {
          label = gtk_label_new ("Child properties");
@@ -1280,7 +1309,7 @@ create_prop_editor (GObject   *object,
                                    properties, label);
        }
 
-      properties = children_from_object (object, tips);
+      properties = children_from_object (object);
       if (properties)
        {
          label = gtk_label_new ("Children");
@@ -1288,7 +1317,7 @@ create_prop_editor (GObject   *object,
                                    properties, label);
        }
 
-      properties = cells_from_object (object, tips);
+      properties = cells_from_object (object);
       if (properties)
        {
          label = gtk_label_new ("Cell renderers");
@@ -1298,7 +1327,7 @@ create_prop_editor (GObject   *object,
     }
   else
     {
-      properties = properties_from_type (object, type, tips);
+      properties = properties_from_type (object, type);
       gtk_container_add (GTK_CONTAINER (win), properties);
       title = g_strdup_printf ("Properties of %s", g_type_name (type));
       gtk_window_set_title (GTK_WINDOW (win), title);