GNOME Bugzilla – Bug 544858
Seal GtkAdjustment
Last modified: 2009-07-11 23:25:50 UTC
GtkAdjustment isn't sealed. It was requested to do this before the Gtk 2.14 API freeze.
Created attachment 115331 [details] [review] Seal GtkAdjustment This patch seals the struct and adds accessors, nothing complicated.
Created attachment 115892 [details] [review] Updated patch New patch fixes up API docs and enhances them and adds gtk_adjustment_configure() to easily set multiple values at once without having to worry about multiple emissions of "changed".
Created attachment 115900 [details] [review] Yet another one Makes sure "changed" is always emitted in configure() even if property notification is frozen externally.
+ * When setting multiple adjustment properties via their individual + * setters, multiple "changed" signals will be emitted. However, since + * the emission of the "changed" signal is tied to the emission of the + * "GObject::notify" signals of the changed properties, it's possible + * to compress the "changed" signals into one by calling + * g_object_freeze_notify() and g_object_thaw_notify() around the + * calls to the individual setters. Wouldn't it be more straightforward to recommend that people use g_object_set (adj, "lower", lower, "upper", upper,...) instead of messing with freeze/thaw ? Or just point them at gtk_adjustment_configure...
Fixed, including the doc additions suggested by Matthias: 2008-08-05 Michael Natterer <mitch@imendio.com> Bug 544858 – Seal GtkAdjustment * gtk/gtk.symbols * gtk/gtkadjustment.[ch] (struct GtkAdjustment): seal all struct members. Add accessors for all properties and additionally a new function gtk_adjustment_configure() which sets all properties at once. Patch by Christian Dywan and myself.