Commit e2b730ac authored by Matthias Clasen's avatar Matthias Clasen
Browse files

General property notification cleanup.

parent 929c8ed5
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
2002-01-28 Matthias Clasen <matthiasc@poet.de>
* gtk/{gtkalignment.c,gtkaspectframe.c,gtkbutton.c,
gtkcellrenderer.c,gtkcellrendererpixbuf.c,gtkcombo.c,
gtkcontainer.c,gtkcurve.c,gtkframe.c,gtklabel.c,
gtkmessagedialog.c,gtknotebook.c,gtkspinbutton.c,gtktable.c,
gtktext.c,gtktextview.c,gtktreeview.c,gtktreeviewcolumn.c,
gtkviewport.c,gtkwidget.c}: General property notification
cleanup. (#69066)
2002-01-28 Anders Carlsson <andersca@gnu.org>
 
* gtk/gtkaccelgroup.c (gtk_accel_groups_activate): & with the
......
......@@ -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));
......
......@@ -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));
}
}
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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));
}
......
......@@ -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);
......
......@@ -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");
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment