summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserutils.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-06 04:08:32 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-06 04:08:32 +0000
commit2a74feb04c169b2beb71d6d37968d8b53cee44b8 (patch)
tree9684169cf31de4e5b6d9eec5deb8c2b8fbfecf3b /gtk/gtkfilechooserutils.c
parent264952d5ee933d97f884ddc23c110b919e76436c (diff)
downloadgtk+-2a74feb04c169b2beb71d6d37968d8b53cee44b8.tar.gz
Use the less efficient g_object_interface_find_property () instead of the
Mon Jul 5 23:47:38 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkfilechooserutils.c (delegate_notify): Use the less efficient g_object_interface_find_property () instead of the param_id range check, since the GParamSpecs we're dealing with are the overridden onces on the interface, whose param_id is always zero. (#145312, Alex Roitman, fix proposed by Owen Taylor)
Diffstat (limited to 'gtk/gtkfilechooserutils.c')
-rw-r--r--gtk/gtkfilechooserutils.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c
index cd8e850db9..2b41e36696 100644
--- a/gtk/gtkfilechooserutils.c
+++ b/gtk/gtkfilechooserutils.c
@@ -145,8 +145,8 @@ _gtk_file_chooser_delegate_iface_init (GtkFileChooserIface *iface)
/**
* _gtk_file_chooser_set_delegate:
- * @receiver: a GOobject implementing #GtkFileChooser
- * @delegate: another GObject implementing #GtkFileChooser
+ * @receiver: a #GObject implementing #GtkFileChooser
+ * @delegate: another #GObject implementing #GtkFileChooser
*
* Establishes that calls on @receiver for #GtkFileChooser
* methods should be delegated to @delegate, and that
@@ -162,7 +162,6 @@ _gtk_file_chooser_set_delegate (GtkFileChooser *receiver,
g_return_if_fail (GTK_IS_FILE_CHOOSER (delegate));
g_object_set_data (G_OBJECT (receiver), "gtk-file-chooser-delegate", delegate);
-
g_signal_connect (delegate, "notify",
G_CALLBACK (delegate_notify), receiver);
g_signal_connect (delegate, "current-folder-changed",
@@ -294,11 +293,12 @@ delegate_notify (GObject *object,
GParamSpec *pspec,
gpointer data)
{
- if (pspec->param_id >= GTK_FILE_CHOOSER_PROP_FIRST &&
- pspec->param_id <= GTK_FILE_CHOOSER_PROP_LAST)
- {
- g_object_notify (data, pspec->name);
- }
+ gpointer iface;
+
+ iface = g_type_interface_peek (g_type_class_peek (G_OBJECT_TYPE (object)),
+ gtk_file_chooser_get_type ());
+ if (g_object_interface_find_property (iface, pspec->name))
+ g_object_notify (data, pspec->name);
}
static void