[HELP REQUEST] property notifies and coalescing them
- From: Tim Janik <timj gtk org>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: [HELP REQUEST] property notifies and coalescing them
- Date: Fri, 10 Aug 2001 17:11:56 +0200 (CEST)
hi all,
could people, when adding property notification, please
make an attempt at coalescing them where possible?
the only place where this is not required is inside of _set_property()
implementations. for other functions that call g_object_notify() multiple
times, or funcitons that call multiple subroutines which notify
properties, adding g_object_freeze_notify/g_object_thaw_notify
is appropriate.
if some volounteer has time to investigate multiple property
notifies without freezing/thawing the queue and missing property
notification in general (that is, a property ::foo being changed on
an object without ::foo being notified, e.g. in a object_set_foo()
function), that would be apprechiated.
the changes required are pretty easy to do, e.g.:
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.2166
diff -u -p -u -r1.2166 ChangeLog
--- ChangeLog 2001/08/10 03:45:43 1.2166
+++ ChangeLog 2001/08/10 14:57:45
@@ -1,3 +1,8 @@
+Fri Aug 10 16:55:53 2001 Tim Janik <timj gtk org>
+
+ * gtk/gtkwindow.c (gtk_window_set_policy): coalesce multiple
+ property notifies.
+
2001-08-07 Havoc Pennington <hp pobox com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
Index: gtk/gtkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.139
diff -u -p -u -r1.139 gtkwindow.c
--- gtk/gtkwindow.c 2001/08/10 03:46:08 1.139
+++ gtk/gtkwindow.c 2001/08/10 14:57:52
@@ -964,9 +964,11 @@ gtk_window_set_policy (GtkWindow *window
window->allow_shrink = (allow_shrink != FALSE);
window->allow_grow = (allow_grow != FALSE);
+ g_object_freeze_notify (G_OBJECT (window));
g_object_notify (G_OBJECT (window), "allow_shrink");
g_object_notify (G_OBJECT (window), "allow_grow");
g_object_notify (G_OBJECT (window), "resizable");
+ g_object_thaw_notify (G_OBJECT (window));
gtk_widget_queue_resize (GTK_WIDGET (window));
}
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]