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)
This commit is contained in:
Matthias Clasen 2004-07-06 04:08:32 +00:00 committed by Matthias Clasen
parent 264952d5ee
commit 2a74feb04c
5 changed files with 44 additions and 8 deletions

View File

@ -1,3 +1,12 @@
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)
2004-07-05 Lorenzo Gil Sanchez <lgs@sicem.biz>
* gtk/gtklayout.c (gtk_layout_add): added a default method for the add

View File

@ -1,3 +1,12 @@
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)
2004-07-05 Lorenzo Gil Sanchez <lgs@sicem.biz>
* gtk/gtklayout.c (gtk_layout_add): added a default method for the add

View File

@ -1,3 +1,12 @@
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)
2004-07-05 Lorenzo Gil Sanchez <lgs@sicem.biz>
* gtk/gtklayout.c (gtk_layout_add): added a default method for the add

View File

@ -1,3 +1,12 @@
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)
2004-07-05 Lorenzo Gil Sanchez <lgs@sicem.biz>
* gtk/gtklayout.c (gtk_layout_add): added a default method for the add

View File

@ -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