After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673478 - Chain up notify implementations
Chain up notify implementations
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-04 08:07 UTC by Claudio Saavedra
Modified: 2012-08-07 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Chain up relevant GObjectClass:notify vfuncs (1.51 KB, patch)
2012-04-04 08:15 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2012-04-04 08:07:54 UTC
Out of curiosity I noticed that some widgets that implement the GObjectClass::notify vfunc are not hooking up to the parent class implementation, shall it exist. This is unlikely to cause trouble if the ancestor classes have no properties or don't implement this vfunc, but I'd say they should be there in any case. Check GtkToolItem for instance:

static void
gtk_tool_item_property_notify (GObject    *object,
			       GParamSpec *pspec)
{
  GtkToolItem *tool_item = GTK_TOOL_ITEM (object);

  if (tool_item->priv->menu_item && strcmp (pspec->name, "sensitive") == 0)
    gtk_widget_set_sensitive (tool_item->priv->menu_item,
			      gtk_widget_get_sensitive (GTK_WIDGET (tool_item)));
}
Comment 1 Claudio Saavedra 2012-04-04 08:15:47 UTC
Created attachment 211262 [details] [review]
Chain up relevant GObjectClass:notify vfuncs

These widgets have ancestors other than GObject which could eventually
implement the notify vfunc for their properties. For correctness, they
should chain up the notify vfunc.
Comment 2 Cosimo Cecchi 2012-08-07 15:23:40 UTC
Review of attachment 211262 [details] [review]:

Looks good to me
Comment 3 Claudio Saavedra 2012-08-07 15:25:11 UTC
Thank you!


Attachment 211262 [details] pushed as 560952d - Chain up relevant GObjectClass:notify vfuncs