Commit 4c28ce08 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Use canonical names for g_object_notify() as well.

2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
parent 6323876b
2005-03-26 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c:
* gdk/gdkdisplaymanager.c:
Use canonical names for g_object_notify() as well.
2005-03-24 Tor Lillqvist <tml@novell.com>
* configure.in (GTK_EXTRA_CFLAGS): Include the -mms-bitfields flag
......
2005-03-26 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c:
* gdk/gdkdisplaymanager.c:
Use canonical names for g_object_notify() as well.
2005-03-24 Tor Lillqvist <tml@novell.com>
* configure.in (GTK_EXTRA_CFLAGS): Include the -mms-bitfields flag
......
2005-03-26 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c:
* gdk/gdkdisplaymanager.c:
Use canonical names for g_object_notify() as well.
2005-03-24 Tor Lillqvist <tml@novell.com>
* configure.in (GTK_EXTRA_CFLAGS): Include the -mms-bitfields flag
......
2005-03-25 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Use canonical
property names.
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf.c (gdk_pixbuf_class_init): Mark param spec strings
......
......@@ -64,9 +64,9 @@ gdk_pixbuf_new_from_data (const guchar *data, GdkColorspace colorspace, gboolean
pixbuf = g_object_new (GDK_TYPE_PIXBUF,
"colorspace", colorspace,
"n_channels", has_alpha ? 4 : 3,
"bits_per_sample", bits_per_sample,
"has_alpha", has_alpha ? TRUE : FALSE,
"n-channels", has_alpha ? 4 : 3,
"bits-per-sample", bits_per_sample,
"has-alpha", has_alpha ? TRUE : FALSE,
"width", width,
"height", height,
"rowstride", rowstride,
......
......@@ -260,7 +260,7 @@ gdk_display_manager_set_default_display (GdkDisplayManager *display_manager,
_gdk_windowing_set_default_display (display);
g_object_notify (G_OBJECT (display_manager), "default_display");
g_object_notify (G_OBJECT (display_manager), "default-display");
}
/**
......
......@@ -1147,7 +1147,7 @@ gtk_about_dialog_set_website_label (GtkAboutDialog *about,
}
g_free (tmp);
g_object_notify (G_OBJECT (about), "website_label");
g_object_notify (G_OBJECT (about), "website-label");
}
/**
......@@ -1455,7 +1455,7 @@ gtk_about_dialog_set_logo (GtkAboutDialog *about,
g_object_freeze_notify (G_OBJECT (about));
if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_ICON_NAME)
g_object_notify (G_OBJECT (about), "logo_icon_name");
g_object_notify (G_OBJECT (about), "logo-icon-name");
if (logo != NULL)
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->logo_image), logo);
......@@ -1537,7 +1537,7 @@ gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about,
gtk_image_set_from_icon_name (GTK_IMAGE (priv->logo_image), icon_name,
GTK_ICON_SIZE_DIALOG);
g_object_notify (G_OBJECT (about), "logo_icon_name");
g_object_notify (G_OBJECT (about), "logo-icon-name");
g_object_thaw_notify (G_OBJECT (about));
}
......
......@@ -433,7 +433,7 @@ gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
accel_label, G_CONNECT_SWAPPED);
refetch_widget_accel_closure (accel_label);
}
g_object_notify (G_OBJECT (accel_label), "accel_widget");
g_object_notify (G_OBJECT (accel_label), "accel-widget");
}
}
......@@ -496,7 +496,7 @@ gtk_accel_label_set_accel_closure (GtkAccelLabel *accel_label,
accel_label, 0);
}
gtk_accel_label_reset (accel_label);
g_object_notify (G_OBJECT (accel_label), "accel_closure");
g_object_notify (G_OBJECT (accel_label), "accel-closure");
}
}
......
......@@ -447,7 +447,7 @@ gtk_action_set_property (GObject *object,
tmp = action->private_data->short_label;
action->private_data->short_label = g_strdup (action->private_data->label);
g_free (tmp);
g_object_notify (object, "short_label");
g_object_notify (object, "short-label");
}
break;
case PROP_SHORT_LABEL:
......@@ -487,7 +487,7 @@ gtk_action_set_property (GObject *object,
tmp = action->private_data->short_label;
action->private_data->short_label = g_strdup (action->private_data->label);
g_free (tmp);
g_object_notify (object, "short_label");
g_object_notify (object, "short-label");
}
break;
case PROP_VISIBLE_HORIZONTAL:
......@@ -716,7 +716,7 @@ gtk_action_sync_short_label (GtkAction *action,
GValue value = { 0, };
g_value_init (&value, G_TYPE_STRING);
g_object_get_property (G_OBJECT (action), "short_label", &value);
g_object_get_property (G_OBJECT (action), "short-label", &value);
g_object_set_property (G_OBJECT (proxy), "label", &value);
g_value_unset (&value);
......
......@@ -251,7 +251,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
static void
remove_action (GtkAction *action)
{
g_object_set (action, "action_group", NULL, NULL);
g_object_set (action, "action-group", NULL, NULL);
g_object_unref (action);
}
......@@ -546,7 +546,7 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
g_hash_table_insert (action_group->private_data->actions,
g_strdup (gtk_action_get_name (action)),
g_object_ref (action));
g_object_set (action, "action_group", action_group, NULL);
g_object_set (action, "action-group", action_group, NULL);
}
/**
......@@ -579,7 +579,7 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
gchar *name;
gchar *stock_id;
g_object_get (action, "name", &name, "stock_id", &stock_id, NULL);
g_object_get (action, "name", &name, "stock-id", &stock_id, NULL);
accel_path = g_strconcat ("<Actions>/",
action_group->private_data->name, "/", name, NULL);
......
......@@ -339,7 +339,7 @@ gtk_adjustment_new (gdouble value,
"upper", upper,
"step-increment", step_increment,
"page-increment", page_increment,
"page_size", page_size,
"page-size", page_size,
"value", value,
NULL);
}
......
......@@ -559,22 +559,22 @@ gtk_alignment_set_padding (GtkAlignment *alignment,
if (priv->padding_top != padding_top)
{
priv->padding_top = padding_top;
g_object_notify (G_OBJECT (alignment), "top_padding");
g_object_notify (G_OBJECT (alignment), "top-padding");
}
if (priv->padding_bottom != padding_bottom)
{
priv->padding_bottom = padding_bottom;
g_object_notify (G_OBJECT (alignment), "bottom_padding");
g_object_notify (G_OBJECT (alignment), "bottom-padding");
}
if (priv->padding_left != padding_left)
{
priv->padding_left = padding_left;
g_object_notify (G_OBJECT (alignment), "left_padding");
g_object_notify (G_OBJECT (alignment), "left-padding");
}
if (priv->padding_right != padding_right)
{
priv->padding_right = padding_right;
g_object_notify (G_OBJECT (alignment), "right_padding");
g_object_notify (G_OBJECT (alignment), "right-padding");
}
g_object_thaw_notify (G_OBJECT (alignment));
......
......@@ -208,13 +208,13 @@ gtk_arrow_set (GtkArrow *arrow,
if ((GtkArrowType) arrow->arrow_type != arrow_type)
{
arrow->arrow_type = arrow_type;
g_object_notify (G_OBJECT (arrow), "arrow_type");
g_object_notify (G_OBJECT (arrow), "arrow-type");
}
if ((GtkShadowType) arrow->shadow_type != shadow_type)
{
arrow->shadow_type = shadow_type;
g_object_notify (G_OBJECT (arrow), "shadow_type");
g_object_notify (G_OBJECT (arrow), "shadow-type");
}
g_object_thaw_notify (G_OBJECT (arrow));
......
......@@ -277,7 +277,7 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
if (aspect_frame->obey_child != obey_child)
{
aspect_frame->obey_child = obey_child;
g_object_notify (G_OBJECT (aspect_frame), "obey_child");
g_object_notify (G_OBJECT (aspect_frame), "obey-child");
}
g_object_thaw_notify (G_OBJECT (aspect_frame));
......
......@@ -287,7 +287,7 @@ gtk_button_box_set_layout (GtkButtonBox *widget,
if (widget->layout_style != layout_style)
{
widget->layout_style = layout_style;
g_object_notify (G_OBJECT (widget), "layout_style");
g_object_notify (G_OBJECT (widget), "layout-style");
gtk_widget_queue_resize (GTK_WIDGET (widget));
}
}
......@@ -449,14 +449,11 @@ _gtk_button_box_child_requisition (GtkWidget *widget,
bbox = GTK_BUTTON_BOX (widget);
gtk_widget_style_get (widget,
"child_min_width",
&width_default,
"child_min_height",
&height_default,
"child_internal_pad_x",
&ipad_x_default,
"child_internal_pad_y",
&ipad_y_default, NULL);
"child-min-width", &width_default,
"child-min-height", &height_default,
"child-internal-pad-x", &ipad_x_default,
"child-internal-pad-y", &ipad_y_default,
NULL);
child_min_width = bbox->child_min_width != GTK_BUTTONBOX_DEFAULT
? bbox->child_min_width : width_default;
......
......@@ -392,7 +392,7 @@ gtk_box_pack_start (GtkBox *box,
gtk_widget_child_notify (child, "expand");
gtk_widget_child_notify (child, "fill");
gtk_widget_child_notify (child, "padding");
gtk_widget_child_notify (child, "pack_type");
gtk_widget_child_notify (child, "pack-type");
gtk_widget_child_notify (child, "position");
gtk_widget_thaw_child_notify (child);
}
......@@ -427,7 +427,7 @@ gtk_box_pack_end (GtkBox *box,
gtk_widget_child_notify (child, "expand");
gtk_widget_child_notify (child, "fill");
gtk_widget_child_notify (child, "padding");
gtk_widget_child_notify (child, "pack_type");
gtk_widget_child_notify (child, "pack-type");
gtk_widget_child_notify (child, "position");
gtk_widget_thaw_child_notify (child);
}
......@@ -625,7 +625,7 @@ gtk_box_set_child_packing (GtkBox *box,
child_info->pack = GTK_PACK_END;
else
child_info->pack = GTK_PACK_START;
gtk_widget_child_notify (child, "pack_type");
gtk_widget_child_notify (child, "pack-type");
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
gtk_widget_queue_resize (child);
......
......@@ -673,7 +673,7 @@ gtk_button_construct_child (GtkButton *button)
g_object_set (priv->image,
"visible", show_image (button),
"no_show_all", TRUE,
"no-show-all", TRUE,
NULL);
hbox = gtk_hbox_new (FALSE, 2);
......@@ -734,8 +734,8 @@ gtk_button_new_from_stock (const gchar *stock_id)
{
return g_object_new (GTK_TYPE_BUTTON,
"label", stock_id,
"use_stock", TRUE,
"use_underline", TRUE,
"use-stock", TRUE,
"use-underline", TRUE,
NULL);
}
......@@ -755,7 +755,7 @@ gtk_button_new_from_stock (const gchar *stock_id)
GtkWidget*
gtk_button_new_with_mnemonic (const gchar *label)
{
return g_object_new (GTK_TYPE_BUTTON, "label", label, "use_underline", TRUE, NULL);
return g_object_new (GTK_TYPE_BUTTON, "label", label, "use-underline", TRUE, NULL);
}
void
......@@ -909,7 +909,7 @@ gtk_button_get_props (GtkButton *button,
if (default_border)
{
gtk_widget_style_get (widget, "default_border", &tmp_border, NULL);
gtk_widget_style_get (widget, "default-border", &tmp_border, NULL);
if (tmp_border)
{
......@@ -922,7 +922,7 @@ gtk_button_get_props (GtkButton *button,
if (default_outside_border)
{
gtk_widget_style_get (widget, "default_outside_border", &tmp_border, NULL);
gtk_widget_style_get (widget, "default-outside-border", &tmp_border, NULL);
if (tmp_border)
{
......@@ -934,7 +934,7 @@ gtk_button_get_props (GtkButton *button,
}
if (interior_focus)
gtk_widget_style_get (widget, "interior_focus", interior_focus, NULL);
gtk_widget_style_get (widget, "interior-focus", interior_focus, NULL);
}
static void
......@@ -1039,8 +1039,8 @@ gtk_button_size_allocate (GtkWidget *widget,
gint child_displacement_y;
gtk_widget_style_get (widget,
"child_displacement_x", &child_displacement_x,
"child_displacement_y", &child_displacement_y,
"child-displacement-x", &child_displacement_x,
"child-displacement-y", &child_displacement_y,
NULL);
child_allocation.x += child_displacement_x;
child_allocation.y += child_displacement_y;
......@@ -1127,9 +1127,9 @@ _gtk_button_paint (GtkButton *button,
gboolean displace_focus;
gtk_widget_style_get (GTK_WIDGET (widget),
"child_displacement_y", &child_displacement_y,
"child_displacement_x", &child_displacement_x,
"displace_focus", &displace_focus,
"child-displacement-y", &child_displacement_y,
"child-displacement-x", &child_displacement_x,
"displace-focus", &displace_focus,
NULL);
if (interior_focus)
......@@ -1425,7 +1425,7 @@ gtk_button_set_use_underline (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "use_underline");
g_object_notify (G_OBJECT (button), "use-underline");
}
}
......@@ -1469,7 +1469,7 @@ gtk_button_set_use_stock (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "use_stock");
g_object_notify (G_OBJECT (button), "use-stock");
}
}
......@@ -1515,7 +1515,7 @@ gtk_button_set_focus_on_click (GtkButton *button,
{
button->focus_on_click = focus_on_click;
g_object_notify (G_OBJECT (button), "focus_on_click");
g_object_notify (G_OBJECT (button), "focus-on-click");
}
}
......
......@@ -2447,13 +2447,13 @@ gtk_calendar_set_display_options (GtkCalendar *calendar,
g_object_freeze_notify (G_OBJECT (calendar));
if ((old_flags ^ calendar->display_flags) & GTK_CALENDAR_SHOW_HEADING)
g_object_notify (G_OBJECT (calendar), "show_heading");
g_object_notify (G_OBJECT (calendar), "show-heading");
if ((old_flags ^ calendar->display_flags) & GTK_CALENDAR_SHOW_DAY_NAMES)
g_object_notify (G_OBJECT (calendar), "show_day_names");
g_object_notify (G_OBJECT (calendar), "show-day-names");
if ((old_flags ^ calendar->display_flags) & GTK_CALENDAR_NO_MONTH_CHANGE)
g_object_notify (G_OBJECT (calendar), "no_month_change");
g_object_notify (G_OBJECT (calendar), "no-month-change");
if ((old_flags ^ calendar->display_flags) & GTK_CALENDAR_SHOW_WEEK_NUMBERS)
g_object_notify (G_OBJECT (calendar), "show_week_numbers");
g_object_notify (G_OBJECT (calendar), "show-week-numbers");
g_object_thaw_notify (G_OBJECT (calendar));
}
......
......@@ -447,7 +447,7 @@ gtk_cell_renderer_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (object, "cell_background_gdk");
g_object_notify (object, "cell-background-gdk");
}
break;
case PROP_CELL_BACKGROUND_GDK:
......@@ -473,7 +473,7 @@ set_cell_bg_color (GtkCellRenderer *cell,
if (!cell->cell_background_set)
{
cell->cell_background_set = TRUE;
g_object_notify (G_OBJECT (cell), "cell_background_set");
g_object_notify (G_OBJECT (cell), "cell-background-set");
}
priv->cell_background.red = color->red;
......@@ -485,7 +485,7 @@ set_cell_bg_color (GtkCellRenderer *cell,
if (cell->cell_background_set)
{
cell->cell_background_set = FALSE;
g_object_notify (G_OBJECT (cell), "cell_background_set");
g_object_notify (G_OBJECT (cell), "cell-background-set");
}
}
}
......
......@@ -376,7 +376,7 @@ gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell,
&(search_data.iter));
}
g_object_set (combo, "has_frame", FALSE, NULL);
g_object_set (combo, "has-frame", FALSE, NULL);
g_object_set_data_full (G_OBJECT (combo),
GTK_CELL_RENDERER_COMBO_PATH,
g_strdup (path), g_free);
......
......@@ -821,7 +821,7 @@ set_bg_color (GtkCellRendererText *celltext,
if (!celltext->background_set)
{
celltext->background_set = TRUE;
g_object_notify (G_OBJECT (celltext), "background_set");
g_object_notify (G_OBJECT (celltext), "background-set");
}
celltext->background.red = color->red;
......@@ -833,7 +833,7 @@ set_bg_color (GtkCellRendererText *celltext,
if (celltext->background_set)
{
celltext->background_set = FALSE;
g_object_notify (G_OBJECT (celltext), "background_set");
g_object_notify (G_OBJECT (celltext), "background-set");
}
}
}
......@@ -848,7 +848,7 @@ set_fg_color (GtkCellRendererText *celltext,
if (!celltext->foreground_set)
{
celltext->foreground_set = TRUE;
g_object_notify (G_OBJECT (celltext), "foreground_set");
g_object_notify (G_OBJECT (celltext), "foreground-set");
}
celltext->foreground.red = color->red;
......@@ -860,7 +860,7 @@ set_fg_color (GtkCellRendererText *celltext,
if (celltext->foreground_set)
{
celltext->foreground_set = FALSE;
g_object_notify (G_OBJECT (celltext), "foreground_set");
g_object_notify (G_OBJECT (celltext), "foreground-set");
}
}
}
......@@ -910,17 +910,17 @@ notify_set_changed (GObject *object,
PangoFontMask changed_mask)
{
if (changed_mask & PANGO_FONT_MASK_FAMILY)
g_object_notify (object, "family_set");
g_object_notify (object, "family-set");
if (changed_mask & PANGO_FONT_MASK_STYLE)
g_object_notify (object, "style_set");
g_object_notify (object, "style-set");
if (changed_mask & PANGO_FONT_MASK_VARIANT)
g_object_notify (object, "variant_set");
g_object_notify (object, "variant-set");
if (changed_mask & PANGO_FONT_MASK_WEIGHT)
g_object_notify (object, "weight_set");
g_object_notify (object, "weight-set");
if (changed_mask & PANGO_FONT_MASK_STRETCH)
g_object_notify (object, "stretch_set");
g_object_notify (object, "stretch-set");
if (changed_mask & PANGO_FONT_MASK_SIZE)
g_object_notify (object, "size_set");
g_object_notify (object, "size-set");
}
static void
......@@ -965,7 +965,7 @@ set_font_description (GtkCellRendererText *celltext,
g_object_freeze_notify (object);
g_object_notify (object, "font_desc");
g_object_notify (object, "font-desc");
g_object_notify (object, "font");
if (changed_mask & PANGO_FONT_MASK_FAMILY)
......@@ -981,7 +981,7 @@ set_font_description (GtkCellRendererText *celltext,
if (changed_mask & PANGO_FONT_MASK_SIZE)
{
g_object_notify (object, "size");
g_object_notify (object, "size_points");
g_object_notify (object, "size-points");
}
notify_set_changed (object, set_changed_mask);
......@@ -1075,7 +1075,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (object, "background_gdk");
g_object_notify (object, "background-gdk");
}
break;
......@@ -1090,7 +1090,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (object, "foreground_gdk");
g_object_notify (object, "foreground-gdk");
}
break;
......@@ -1165,7 +1165,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
case PROP_SIZE:
pango_font_description_set_size (celltext->font,
g_value_get_int (value));
g_object_notify (object, "size_points");
g_object_notify (object, "size-points");
break;
case PROP_SIZE_POINTS:
pango_font_description_set_size (celltext->font,
......@@ -1178,7 +1178,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
celltext->calc_fixed_height = TRUE;
notify_set_changed (object, old_set_mask & pango_font_description_get_set_fields (celltext->font));
g_object_notify (object, "font_desc");
g_object_notify (object, "font-desc");
g_object_notify (object, "font");
break;
......@@ -1189,7 +1189,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
celltext->scale_set = TRUE;
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
g_object_notify (object, "scale_set");
g_object_notify (object, "scale-set");
break;
case PROP_EDITABLE:
......@@ -1199,26 +1199,26 @@ gtk_cell_renderer_text_set_property (GObject *object,
GTK_CELL_RENDERER (celltext)->mode = GTK_CELL_RENDERER_MODE_EDITABLE;
else
GTK_CELL_RENDERER (celltext)->mode = GTK_CELL_RENDERER_MODE_INERT;
g_object_notify (object, "editable_set");
g_object_notify (object, "editable-set");
break;
case PROP_STRIKETHROUGH:
celltext->strikethrough = g_value_get_boolean (value);
celltext->strikethrough_set = TRUE;
g_object_notify (object, "strikethrough_set");
g_object_notify (object, "strikethrough-set");
break;
case PROP_UNDERLINE:
celltext->underline_style = g_value_get_enum (value);
celltext->underline_set = TRUE;
g_object_notify (object, "underline_set");
g_object_notify (object, "underline-set");
break;
case PROP_RISE:
celltext->rise = g_value_get_int (value);
celltext->rise_set = TRUE;
g_object_notify (object, "rise_set");
g_object_notify (object, "rise-set");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
......@@ -1228,13 +1228,13 @@ gtk_cell_renderer_text_set_property (GObject *object,
if (priv->language)
g_object_unref (priv->language);
priv->language = pango_language_from_string (g_value_get_string (value));
g_object_notify (object, "language_set");
g_object_notify (object, "language-set");
break;