Commit dcbe611b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/widgets/gimpcontrollerinfo.c app/widgets/gimpcontrollerlist.c

2008-07-23  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpcontrollerinfo.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpdock.c
	* app/widgets/gimpeditor.c
	* app/widgets/gimpgrideditor.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimppluginaction.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptemplateeditor.c
	* libgimpwidgets/gimpcolorprofilecombobox.c: no need to cast the
	return value of g_value_dup_object().


svn path=/trunk/; revision=26290
parent d77ee21b
2008-07-23 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontrollerinfo.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpdasheditor.c
* app/widgets/gimpdock.c
* app/widgets/gimpeditor.c
* app/widgets/gimpgrideditor.c
* app/widgets/gimppdbdialog.c
* app/widgets/gimppluginaction.c
* app/widgets/gimpstrokeeditor.c
* app/widgets/gimptemplateeditor.c
* libgimpwidgets/gimpcolorprofilecombobox.c: no need to cast the
return value of g_value_dup_object().
2008-07-23 Sven Neumann <sven@gimp.org>
* app/core/gimpguideundo.c
......
......@@ -199,17 +199,20 @@ gimp_controller_info_set_property (GObject *object,
g_object_unref (info->controller);
}
info->controller = GIMP_CONTROLLER (g_value_dup_object (value));
info->controller = g_value_dup_object (value);
if (info->controller)
{
GimpControllerClass *controller_class;
g_signal_connect_object (info->controller, "event",
G_CALLBACK (gimp_controller_info_event),
G_OBJECT (info),
0);
controller_class = GIMP_CONTROLLER_GET_CLASS (info->controller);
gimp_viewable_set_stock_id (GIMP_VIEWABLE (info),
GIMP_CONTROLLER_GET_CLASS (info->controller)->stock_id);
controller_class->stock_id);
}
break;
case PROP_MAPPING:
......
......@@ -348,8 +348,9 @@ gimp_controller_list_set_property (GObject *object,
switch (property_id)
{
case PROP_GIMP:
list->gimp = GIMP (g_value_dup_object (value));
list->gimp = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -369,6 +370,7 @@ gimp_controller_list_get_property (GObject *object,
case PROP_GIMP:
g_value_set_object (value, list->gimp);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -170,7 +170,7 @@ gimp_dash_editor_set_property (GObject *object,
case PROP_STROKE_OPTIONS:
g_return_if_fail (editor->stroke_options == NULL);
editor->stroke_options = GIMP_STROKE_OPTIONS (g_value_dup_object (value));
editor->stroke_options = g_value_dup_object (value);
g_signal_connect_object (editor->stroke_options, "notify::dash-info",
G_CALLBACK (update_segments_from_options),
editor, G_CONNECT_SWAPPED);
......
......@@ -225,11 +225,13 @@ gimp_dock_set_property (GObject *object,
switch (property_id)
{
case PROP_CONTEXT:
dock->context = GIMP_CONTEXT (g_value_dup_object (value));
dock->context = g_value_dup_object (value);
break;
case PROP_DIALOG_FACTORY:
dock->dialog_factory = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -249,9 +251,11 @@ gimp_dock_get_property (GObject *object,
case PROP_CONTEXT:
g_value_set_object (value, dock->context);
break;
case PROP_DIALOG_FACTORY:
g_value_set_object (value, dock->dialog_factory);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -246,23 +246,29 @@ gimp_editor_set_property (GObject *object,
switch (property_id)
{
case PROP_MENU_FACTORY:
editor->menu_factory = (GimpMenuFactory *) g_value_dup_object (value);
editor->menu_factory = g_value_dup_object (value);
break;
case PROP_MENU_IDENTIFIER:
editor->menu_identifier = g_value_dup_string (value);
break;
case PROP_UI_PATH:
editor->ui_path = g_value_dup_string (value);
break;
case PROP_POPUP_DATA:
editor->popup_data = g_value_get_pointer (value);
break;
case PROP_SHOW_NAME:
g_object_set_property (G_OBJECT (editor->name_label), "visible", value);
break;
case PROP_NAME:
gimp_editor_set_name (editor, g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -282,18 +288,23 @@ gimp_editor_get_property (GObject *object,
case PROP_MENU_FACTORY:
g_value_set_object (value, editor->menu_factory);
break;
case PROP_MENU_IDENTIFIER:
g_value_set_string (value, editor->menu_identifier);
break;
case PROP_UI_PATH:
g_value_set_string (value, editor->ui_path);
break;
case PROP_POPUP_DATA:
g_value_set_pointer (value, editor->popup_data);
break;
case PROP_SHOW_NAME:
g_object_get_property (G_OBJECT (editor->name_label), "visible", value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -126,17 +126,21 @@ gimp_grid_editor_set_property (GObject *object,
switch (property_id)
{
case PROP_GRID:
editor->grid = GIMP_GRID (g_value_dup_object (value));
editor->grid = g_value_dup_object (value);
break;
case PROP_CONTEXT:
editor->context = GIMP_CONTEXT (g_value_dup_object (value));
editor->context = g_value_dup_object (value);
break;
case PROP_XRESOLUTION:
editor->xresolution = g_value_get_double (value);
break;
case PROP_YRESOLUTION:
editor->yresolution = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -156,15 +160,19 @@ gimp_grid_editor_get_property (GObject *object,
case PROP_GRID:
g_value_set_object (value, editor->grid);
break;
case PROP_CONTEXT:
g_value_set_object (value, editor->context);
break;
case PROP_XRESOLUTION:
g_value_set_double (value, editor->xresolution);
break;
case PROP_YRESOLUTION:
g_value_set_double (value, editor->yresolution);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -242,11 +242,11 @@ gimp_pdb_dialog_set_property (GObject *object,
switch (property_id)
{
case PROP_PDB:
dialog->pdb = GIMP_PDB (g_value_dup_object (value));
dialog->pdb = g_value_dup_object (value);
break;
case PROP_CONTEXT:
dialog->caller_context = GIMP_CONTEXT (g_value_dup_object (value));
dialog->caller_context = g_value_dup_object (value);
break;
case PROP_SELECT_TYPE:
......@@ -265,7 +265,7 @@ gimp_pdb_dialog_set_property (GObject *object,
break;
case PROP_MENU_FACTORY:
dialog->menu_factory = (GimpMenuFactory *) g_value_dup_object (value);
dialog->menu_factory = g_value_dup_object (value);
break;
default:
......
......@@ -150,7 +150,7 @@ gimp_plug_in_action_set_property (GObject *object,
case PROP_PROCEDURE:
if (action->procedure)
g_object_unref (action->procedure);
action->procedure = GIMP_PLUG_IN_PROCEDURE (g_value_dup_object (value));
action->procedure = g_value_dup_object (value);
break;
default:
......
......@@ -113,7 +113,7 @@ gimp_stroke_editor_set_property (GObject *object,
case PROP_OPTIONS:
if (editor->options)
g_object_unref (editor->options);
editor->options = GIMP_STROKE_OPTIONS (g_value_dup_object (value));
editor->options = g_value_dup_object (value);
break;
case PROP_RESOLUTION:
......
......@@ -437,8 +437,9 @@ gimp_template_editor_set_property (GObject *object,
switch (property_id)
{
case PROP_TEMPLATE:
editor->template = GIMP_TEMPLATE (g_value_dup_object (value));
editor->template = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -458,6 +459,7 @@ gimp_template_editor_get_property (GObject *object,
case PROP_TEMPLATE:
g_value_set_object (value, editor->template);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -169,7 +169,7 @@ gimp_color_profile_combo_box_set_property (GObject *object,
{
case PROP_DIALOG:
g_return_if_fail (combo_box->dialog == NULL);
combo_box->dialog = (GtkWidget *) g_value_dup_object (value);
combo_box->dialog = g_value_dup_object (value);
break;
case PROP_MODEL:
......
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