diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-01-28 18:52:49 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-01-28 18:52:49 +0000 |
commit | e2b730ac43a27e91217a0d5602eff948f29533f5 (patch) | |
tree | 415cc297ea4c01e4c6d889dd14c4b4cf43603b01 /gtk | |
parent | 929c8ed53e821f3f48dafc2757cb6b7cdc16cd7c (diff) | |
download | gtk+-e2b730ac43a27e91217a0d5602eff948f29533f5.tar.gz |
General property notification cleanup.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkalignment.c | 8 | ||||
-rw-r--r-- | gtk/gtkaspectframe.c | 2 | ||||
-rw-r--r-- | gtk/gtkbutton.c | 9 | ||||
-rw-r--r-- | gtk/gtkcellrenderer.c | 10 | ||||
-rw-r--r-- | gtk/gtkcellrendererpixbuf.c | 3 | ||||
-rw-r--r-- | gtk/gtkcheckmenuitem.c | 6 | ||||
-rw-r--r-- | gtk/gtkcombo.c | 32 | ||||
-rw-r--r-- | gtk/gtkcontainer.c | 1 | ||||
-rw-r--r-- | gtk/gtkcurve.c | 10 | ||||
-rw-r--r-- | gtk/gtkeventbox.c | 2 | ||||
-rw-r--r-- | gtk/gtkframe.c | 2 | ||||
-rw-r--r-- | gtk/gtkhandlebox.c | 2 | ||||
-rw-r--r-- | gtk/gtklabel.c | 2 | ||||
-rw-r--r-- | gtk/gtkmessagedialog.c | 2 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 8 | ||||
-rw-r--r-- | gtk/gtkpaned.c | 2 | ||||
-rw-r--r-- | gtk/gtkrange.c | 2 | ||||
-rw-r--r-- | gtk/gtkspinbutton.c | 21 | ||||
-rw-r--r-- | gtk/gtktable.c | 10 | ||||
-rw-r--r-- | gtk/gtktext.c | 2 | ||||
-rw-r--r-- | gtk/gtktextview.c | 35 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 10 | ||||
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 6 | ||||
-rw-r--r-- | gtk/gtkviewport.c | 6 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 5 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 6 |
26 files changed, 133 insertions, 71 deletions
diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c index 9c33fd3077..e722df37e0 100644 --- a/gtk/gtkalignment.c +++ b/gtk/gtkalignment.c @@ -264,22 +264,22 @@ gtk_alignment_set (GtkAlignment *alignment, if (alignment->xalign != xalign) { alignment->xalign = xalign; - g_object_notify (G_OBJECT(alignment), "xalign"); + g_object_notify (G_OBJECT (alignment), "xalign"); } if (alignment->yalign != yalign) { alignment->yalign = yalign; - g_object_notify (G_OBJECT(alignment), "yalign"); + g_object_notify (G_OBJECT (alignment), "yalign"); } if (alignment->xscale != xscale) { alignment->xscale = xscale; - g_object_notify (G_OBJECT(alignment), "xscale"); + g_object_notify (G_OBJECT (alignment), "xscale"); } if (alignment->yscale != yscale) { alignment->yscale = yscale; - g_object_notify (G_OBJECT(alignment), "yscale"); + g_object_notify (G_OBJECT (alignment), "yscale"); } g_object_thaw_notify (G_OBJECT (alignment)); diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c index d2e5486065..87f56749c2 100644 --- a/gtk/gtkaspectframe.c +++ b/gtk/gtkaspectframe.c @@ -277,7 +277,7 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, } g_object_thaw_notify (G_OBJECT (aspect_frame)); - gtk_widget_queue_resize (GTK_WIDGET(aspect_frame)); + gtk_widget_queue_resize (GTK_WIDGET (aspect_frame)); } } diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index fc2066e2c7..886b6abf3d 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -570,9 +570,12 @@ gtk_button_set_relief (GtkButton *button, { g_return_if_fail (GTK_IS_BUTTON (button)); - button->relief = newrelief; - g_object_notify(G_OBJECT(button), "relief"); - gtk_widget_queue_draw (GTK_WIDGET (button)); + if (newrelief != button->relief) + { + button->relief = newrelief; + g_object_notify (G_OBJECT (button), "relief"); + gtk_widget_queue_draw (GTK_WIDGET (button)); + } } GtkReliefStyle diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index e35ef4e472..f2cdb9cf2d 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -261,43 +261,33 @@ gtk_cell_renderer_set_property (GObject *object, { case PROP_MODE: cell->mode = g_value_get_enum (value); - g_object_notify (object, "mode"); break; case PROP_VISIBLE: cell->visible = g_value_get_boolean (value); - g_object_notify (object, "visible"); break; case PROP_XALIGN: cell->xalign = g_value_get_float (value); - g_object_notify (object, "xalign"); break; case PROP_YALIGN: cell->yalign = g_value_get_float (value); - g_object_notify (object, "yalign"); break; case PROP_XPAD: cell->xpad = g_value_get_uint (value); - g_object_notify (object, "xpad"); break; case PROP_YPAD: cell->ypad = g_value_get_uint (value); - g_object_notify (object, "ypad"); break; case PROP_WIDTH: cell->width = g_value_get_int (value); - g_object_notify (object, "width"); break; case PROP_HEIGHT: cell->height = g_value_get_int (value); - g_object_notify (object, "height"); break; case PROP_IS_EXPANDER: cell->is_expander = g_value_get_boolean (value); - g_object_notify (object, "is_expander"); break; case PROP_IS_EXPANDED: cell->is_expanded = g_value_get_boolean (value); - g_object_notify (object, "is_expanded"); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index 8923410481..45b93aec13 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -173,7 +173,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object, if (cellpixbuf->pixbuf) g_object_unref (G_OBJECT (cellpixbuf->pixbuf)); cellpixbuf->pixbuf = pixbuf; - g_object_notify (object, "pixbuf"); break; case PROP_PIXBUF_EXPANDER_OPEN: pixbuf = (GdkPixbuf*) g_value_get_object (value); @@ -182,7 +181,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object, if (cellpixbuf->pixbuf_expander_open) g_object_unref (G_OBJECT (cellpixbuf->pixbuf_expander_open)); cellpixbuf->pixbuf_expander_open = pixbuf; - g_object_notify (object, "pixbuf_expander_open"); break; case PROP_PIXBUF_EXPANDER_CLOSED: pixbuf = (GdkPixbuf*) g_value_get_object (value); @@ -191,7 +189,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object, if (cellpixbuf->pixbuf_expander_closed) g_object_unref (G_OBJECT (cellpixbuf->pixbuf_expander_closed)); cellpixbuf->pixbuf_expander_closed = pixbuf; - g_object_notify (object, "pixbuf_expander_closed"); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c index 9e57485f8a..36988feced 100644 --- a/gtk/gtkcheckmenuitem.c +++ b/gtk/gtkcheckmenuitem.c @@ -115,7 +115,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass) _("Active"), _("Whether the menu item is checked."), FALSE, - G_PARAM_READABLE | G_PARAM_WRITABLE)); + G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (object_class), PROP_INCONSISTENT, @@ -123,7 +123,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass) _("Inconsistent"), _("Whether to display an \"inconsistent\" state."), FALSE, - G_PARAM_READABLE | G_PARAM_WRITABLE)); + G_PARAM_READWRITE)); widget_class->expose_event = gtk_check_menu_item_expose; @@ -333,7 +333,7 @@ gtk_check_menu_item_activate (GtkMenuItem *menu_item) gtk_check_menu_item_toggled (check_menu_item); gtk_widget_queue_draw (GTK_WIDGET (check_menu_item)); - g_object_notify (G_OBJECT(check_menu_item), "active"); + g_object_notify (G_OBJECT (check_menu_item), "active"); } static void diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index dcc711b728..ab6d29b41a 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -875,12 +875,20 @@ void gtk_combo_set_value_in_list (GtkCombo * combo, gboolean val, gboolean ok_if_empty) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + ok_if_empty = ok_if_empty != FALSE; - combo->value_in_list = val; - combo->ok_if_empty = ok_if_empty; g_object_freeze_notify (G_OBJECT (combo)); + if (combo->value_in_list != val) + { + combo->value_in_list = val; g_object_notify (G_OBJECT (combo), "value_in_list"); + } + if (combo->ok_if_empty != ok_if_empty) + { + combo->ok_if_empty = ok_if_empty; g_object_notify (G_OBJECT (combo), "allow_empty"); + } g_object_thaw_notify (G_OBJECT (combo)); } @@ -888,31 +896,47 @@ void gtk_combo_set_case_sensitive (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->case_sensitive != val) + { combo->case_sensitive = val; g_object_notify (G_OBJECT (combo), "case_sensitive"); + } } void gtk_combo_set_use_arrows (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->use_arrows != val) + { combo->use_arrows = val; g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); + } } void gtk_combo_set_use_arrows_always (GtkCombo * combo, gboolean val) { g_return_if_fail (GTK_IS_COMBO (combo)); + val = val != FALSE; + if (combo->use_arrows_always != val) + { + g_object_freeze_notify (G_OBJECT (combo)); combo->use_arrows_always = val; + g_object_notify (G_OBJECT (combo), "enable_arrows_always"); + + if (combo->use_arrows != TRUE) + { combo->use_arrows = TRUE; - g_object_freeze_notify (G_OBJECT (combo)); g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); - g_object_notify (G_OBJECT (combo), "enable_arrows_always"); + } g_object_thaw_notify (G_OBJECT (combo)); + } } void diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 79cdd4de2e..4bd9b8c631 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -934,7 +934,6 @@ gtk_container_set_resize_mode (GtkContainer *container, resize_mode == GTK_RESIZE_PARENT) { resize_mode = GTK_RESIZE_QUEUE; - g_object_notify (G_OBJECT (container), "resize_mode"); } if (container->resize_mode != resize_mode) diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c index 71d47f5232..69db45bde6 100644 --- a/gtk/gtkcurve.c +++ b/gtk/gtkcurve.c @@ -782,7 +782,10 @@ gtk_curve_reset (GtkCurve *c) gtk_curve_reset_vector (c); if (old_type != GTK_CURVE_TYPE_SPLINE) - gtk_signal_emit (GTK_OBJECT (c), curve_type_changed_signal); + { + gtk_signal_emit (GTK_OBJECT (c), curve_type_changed_signal); + g_object_notify (G_OBJECT (c), "curve_type"); + } } void @@ -883,7 +886,10 @@ gtk_curve_set_vector (GtkCurve *c, int veclen, gfloat vector[]) RADIUS + height - project (ry, c->min_y, c->max_y, height); } if (old_type != GTK_CURVE_TYPE_FREE) - gtk_signal_emit (GTK_OBJECT (c), curve_type_changed_signal); + { + gtk_signal_emit (GTK_OBJECT (c), curve_type_changed_signal); + g_object_notify (G_OBJECT (curve), "curve_type"); + } gtk_curve_draw (c, c->num_points, height); } diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c index 4bca8b6ad3..5abeabaa9f 100644 --- a/gtk/gtkeventbox.c +++ b/gtk/gtkeventbox.c @@ -135,7 +135,7 @@ gtk_event_box_realize (GtkWidget *widget) static void gtk_event_box_size_request (GtkWidget *widget, - GtkRequisition *requisition) + GtkRequisition *requisition) { GtkBin *bin; diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index c2b0b6cc86..6668d63bc5 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -417,6 +417,7 @@ gtk_frame_set_label_align (GtkFrame *frame, xalign = CLAMP (xalign, 0.0, 1.0); yalign = CLAMP (yalign, 0.0, 1.0); + g_object_freeze_notify (G_OBJECT (frame)); if (xalign != frame->label_xalign) { frame->label_xalign = xalign; @@ -429,6 +430,7 @@ gtk_frame_set_label_align (GtkFrame *frame, g_object_notify (G_OBJECT (frame), "label_yalign"); } + g_object_thaw_notify (G_OBJECT (frame)); gtk_widget_queue_resize (GTK_WIDGET (frame)); } diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index 4924f07b81..33d48a2ad6 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -945,7 +945,7 @@ gtk_handle_box_button_changed (GtkWidget *widget, GtkHandleBox *hb; gboolean event_handled; GdkCursor *fleur; - + g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index f648f2d342..290ff6ac42 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -757,6 +757,8 @@ gtk_label_set_mnemonic_widget (GtkLabel *label, label->mnemonic_widget = widget; if (label->mnemonic_widget) gtk_widget_ref (label->mnemonic_widget); + + g_object_notify (G_OBJECT (label), "mnemonic_widget"); } /** diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index eea2a3bbcc..41899e19f7 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -393,6 +393,8 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog, g_warning ("Unknown GtkButtonsType"); break; } + + g_object_notify (G_OBJECT (message_dialog), "buttons"); } static void diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index ff90de2b2a..962e7f3df5 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4340,7 +4340,11 @@ gtk_notebook_set_tab_border (GtkNotebook *notebook, if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs) gtk_widget_queue_resize (GTK_WIDGET (notebook)); + g_object_freeze_notify (G_OBJECT (notebook)); g_object_notify (G_OBJECT (notebook), "tab_hborder"); + g_object_notify (G_OBJECT (notebook), "tab_vborder"); + g_object_thaw_notify (G_OBJECT (notebook)); + } /** @@ -4364,7 +4368,7 @@ gtk_notebook_set_tab_hborder (GtkNotebook *notebook, if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs) gtk_widget_queue_resize (GTK_WIDGET (notebook)); - g_object_notify (G_OBJECT (notebook), "tab_vborder"); + g_object_notify (G_OBJECT (notebook), "tab_hborder"); } /** @@ -4387,6 +4391,8 @@ gtk_notebook_set_tab_vborder (GtkNotebook *notebook, if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs) gtk_widget_queue_resize (GTK_WIDGET (notebook)); + + g_object_notify (G_OBJECT (notebook), "tab_vborder"); } /** diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 508382dfb5..b14996687d 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -286,7 +286,7 @@ static void gtk_paned_map (GtkWidget *widget) { GtkPaned *paned = GTK_PANED (widget); - + g_return_if_fail (GTK_IS_PANED (widget)); gdk_window_show (paned->handle); diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index a4e99cbed4..14bcead6f4 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -878,7 +878,7 @@ gtk_range_expose (GtkWidget *widget, GtkStateType state; GdkRectangle expose_area; /* Relative to widget->allocation */ GdkRectangle area; - + g_return_val_if_fail (GTK_IS_RANGE (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index f1909a89a2..211d748382 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -590,7 +590,7 @@ gtk_spin_button_size_request (GtkWidget *widget, GtkEntry *entry; GtkSpinButton *spin_button; gint arrow_size; - + g_return_if_fail (requisition != NULL); g_return_if_fail (GTK_IS_SPIN_BUTTON (widget)); @@ -1336,7 +1336,7 @@ gtk_spin_button_key_release (GtkWidget *widget, GtkSpinButton *spin; g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), FALSE); - + spin = GTK_SPIN_BUTTON (widget); spin->ev_time = event->time; @@ -1943,9 +1943,13 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button, { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); - spin_button->numeric = (numeric != 0); + numeric = numeric != FALSE; - g_object_notify (G_OBJECT (spin_button), "numeric"); + if (spin_button->numeric != numeric) + { + spin_button->numeric = numeric; + g_object_notify (G_OBJECT (spin_button), "numeric"); + } } /** @@ -1979,9 +1983,14 @@ gtk_spin_button_set_wrap (GtkSpinButton *spin_button, { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); - spin_button->wrap = (wrap != 0); + wrap = wrap != FALSE; + + if (spin_button->wrap != wrap) + { + spin_button->wrap = (wrap != 0); - g_object_notify (G_OBJECT (spin_button), "wrap"); + g_object_notify (G_OBJECT (spin_button), "wrap"); + } } /** diff --git a/gtk/gtktable.c b/gtk/gtktable.c index 18c697f550..eedbb7a995 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -640,8 +640,6 @@ gtk_table_set_row_spacing (GtkTable *table, if (GTK_WIDGET_VISIBLE (table)) gtk_widget_queue_resize (GTK_WIDGET (table)); } - - g_object_notify (G_OBJECT (table), "row_spacing"); } /** @@ -679,8 +677,6 @@ gtk_table_set_col_spacing (GtkTable *table, if (GTK_WIDGET_VISIBLE (table)) gtk_widget_queue_resize (GTK_WIDGET (table)); } - - g_object_notify (G_OBJECT (table), "column_spacing"); } /** @@ -717,6 +713,8 @@ gtk_table_set_row_spacings (GtkTable *table, if (GTK_WIDGET_VISIBLE (table)) gtk_widget_queue_resize (GTK_WIDGET (table)); + + g_object_notify (G_OBJECT (table), "row_spacing"); } /** @@ -751,6 +749,8 @@ gtk_table_set_col_spacings (GtkTable *table, if (GTK_WIDGET_VISIBLE (table)) gtk_widget_queue_resize (GTK_WIDGET (table)); + + g_object_notify (G_OBJECT (table), "column_spacing"); } /** @@ -784,6 +784,8 @@ gtk_table_set_homogeneous (GtkTable *table, if (GTK_WIDGET_VISIBLE (table)) gtk_widget_queue_resize (GTK_WIDGET (table)); + + g_object_notify (G_OBJECT (table), "homogeneous"); } } diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 335c4fb07a..9397c16a70 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -870,6 +870,7 @@ gtk_text_set_adjustments (GtkText *text, gtk_object_unref (GTK_OBJECT (text->vadj)); } + g_object_freeze_notify (G_OBJECT (text)); if (text->hadj != hadj) { text->hadj = hadj; @@ -909,6 +910,7 @@ gtk_text_set_adjustments (GtkText *text, g_object_notify (G_OBJECT (text), "vadjustment"); } + g_object_thaw_notify (G_OBJECT (text)); } void diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 1e72cfbd97..983541ad33 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -1934,6 +1934,7 @@ gtk_text_view_set_editable (GtkTextView *text_view, gboolean setting) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); + setting = setting != FALSE; if (text_view->editable != setting) { @@ -1944,9 +1945,9 @@ gtk_text_view_set_editable (GtkTextView *text_view, text_view->layout->default_style->editable = text_view->editable; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "editable"); + g_object_notify (G_OBJECT (text_view), "editable"); + } } /** @@ -1990,9 +1991,9 @@ gtk_text_view_set_pixels_above_lines (GtkTextView *text_view, text_view->layout->default_style->pixels_above_lines = pixels_above_lines; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "pixels_above_lines"); + g_object_notify (G_OBJECT (text_view), "pixels_above_lines"); + } } /** @@ -2036,9 +2037,9 @@ gtk_text_view_set_pixels_below_lines (GtkTextView *text_view, text_view->layout->default_style->pixels_below_lines = pixels_below_lines; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "pixels_below_lines"); + g_object_notify (G_OBJECT (text_view), "pixels_below_lines"); + } } /** @@ -2082,8 +2083,9 @@ gtk_text_view_set_pixels_inside_wrap (GtkTextView *text_view, text_view->layout->default_style->pixels_inside_wrap = pixels_inside_wrap; gtk_text_layout_default_style_changed (text_view->layout); } + + g_object_notify (G_OBJECT (text_view), "pixels_inside_wrap"); } - g_object_notify (G_OBJECT (text_view), "pixels_inside_wrap"); } /** @@ -2126,9 +2128,9 @@ gtk_text_view_set_justification (GtkTextView *text_view, text_view->layout->default_style->justification = justification; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "justification"); + g_object_notify (G_OBJECT (text_view), "justification"); + } } /** @@ -2172,9 +2174,9 @@ gtk_text_view_set_left_margin (GtkTextView *text_view, text_view->layout->default_style->left_margin = left_margin; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "left_margin"); + g_object_notify (G_OBJECT (text_view), "left_margin"); + } } /** @@ -2218,9 +2220,9 @@ gtk_text_view_set_right_margin (GtkTextView *text_view, text_view->layout->default_style->right_margin = right_margin; gtk_text_layout_default_style_changed (text_view->layout); } - } - g_object_notify (G_OBJECT (text_view), "right_margin"); + g_object_notify (G_OBJECT (text_view), "right_margin"); + } } /** @@ -2264,8 +2266,9 @@ gtk_text_view_set_indent (GtkTextView *text_view, text_view->layout->default_style->indent = indent; gtk_text_layout_default_style_changed (text_view->layout); } + + g_object_notify (G_OBJECT (text_view), "indent"); } - g_object_notify (G_OBJECT (text_view), "indent"); } /** @@ -2369,9 +2372,9 @@ gtk_text_view_set_cursor_visible (GtkTextView *text_view, gtk_text_view_check_cursor_blink (text_view); } } - } - g_object_notify (G_OBJECT (text_view), "cursor_visible"); + g_object_notify (G_OBJECT (text_view), "cursor_visible"); + } } /** diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index a2d988ff64..90f27f9f45 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -9123,7 +9123,13 @@ gtk_tree_view_set_enable_search (GtkTreeView *tree_view, { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); - tree_view->priv->enable_search = !!enable_search; + enable_search = !!enable_search; + + if (tree_view->priv->enable_search != enable_search) + { + tree_view->priv->enable_search = enable_search; + g_object_notify (G_OBJECT (tree_view), "enable_search"); + } } /** @@ -9178,7 +9184,7 @@ gtk_tree_view_set_search_column (GtkTreeView *tree_view, return; tree_view->priv->search_column = column; - + g_object_notify (G_OBJECT (tree_view), "search_column"); } /** diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 667f3fb0be..a0291277c4 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -1550,6 +1550,8 @@ gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column, { gtk_widget_queue_resize (tree_column->tree_view); } + + g_object_notify (G_OBJECT (tree_column), "fixed_width"); } /** @@ -1596,12 +1598,14 @@ gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column, } tree_column->min_width = min_width; + g_object_freeze_notify (G_OBJECT (tree_column)); if (tree_column->max_width != -1 && tree_column->max_width < min_width) { tree_column->max_width = min_width; g_object_notify (G_OBJECT (tree_column), "max_width"); } g_object_notify (G_OBJECT (tree_column), "min_width"); + g_object_thaw_notify (G_OBJECT (tree_column)); } /** @@ -1650,12 +1654,14 @@ gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column, } tree_column->max_width = max_width; + g_object_freeze_notify (G_OBJECT (tree_column)); if (max_width != -1 && max_width < tree_column->min_width) { tree_column->min_width = max_width; g_object_notify (G_OBJECT (tree_column), "min_width"); } g_object_notify (G_OBJECT (tree_column), "max_width"); + g_object_thaw_notify (G_OBJECT (tree_column)); } /** diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 2e8100b63f..e875c5cc9a 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -398,7 +398,7 @@ gtk_viewport_set_vadjustment (GtkViewport *viewport, gtk_viewport_adjustment_changed (adjustment, viewport); } - g_object_notify (G_OBJECT (viewport), "vadjustment"); + g_object_notify (G_OBJECT (viewport), "vadjustment"); } static void @@ -434,9 +434,9 @@ gtk_viewport_set_shadow_type (GtkViewport *viewport, gtk_widget_size_allocate (GTK_WIDGET (viewport), &(GTK_WIDGET (viewport)->allocation)); gtk_widget_queue_draw (GTK_WIDGET (viewport)); } - } - g_object_notify (G_OBJECT (viewport), "shadow_type"); + g_object_notify (G_OBJECT (viewport), "shadow_type"); + } } /** diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 17b2922db9..85444d181d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3446,7 +3446,10 @@ gtk_widget_grab_default (GtkWidget *widget) window = gtk_widget_get_toplevel (widget); if (window && GTK_WIDGET_TOPLEVEL (window)) - gtk_window_set_default (GTK_WINDOW (window), widget); + { + gtk_window_set_default (GTK_WINDOW (window), widget); + g_object_notify (G_OBJECT (widget), "has_default"); + } else g_warning (G_STRLOC ": widget not within a GtkWindow"); } diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 1d33ece6b3..1695bb151f 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -2887,7 +2887,7 @@ static void gtk_window_destroy (GtkObject *object) { GtkWindow *window; - + g_return_if_fail (GTK_IS_WINDOW (object)); window = GTK_WINDOW (object); @@ -3117,9 +3117,9 @@ gtk_window_unmap (GtkWidget *widget) { GtkWindow *window; GtkWindowGeometryInfo *info; - + window = GTK_WINDOW (widget); - + GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); if (window->frame) gdk_window_withdraw (window->frame); |