app/tools/gimpbucketfilltool.c app/tools/gimpconvolvetool.c
2003-02-27 Manish Singh <yosh@gimp.org> * app/tools/gimpbucketfilltool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpdodgeburntool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimpinkoptions.c * app/tools/gimpmagnifytool.c * app/tools/gimpmovetool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c * app/widgets/gimpcellrendererviewable.c * app/widgets/gimpcontainertreeview.c: remove unecessary G_OBJECT() from g_object_set calls. * plug-ins/common/bumpmap.c: use g_signal_handlers_(un)block_by_func instead of gtk_signal_handler_(un)block_by_data.
This commit is contained in:

committed by
Manish Singh

parent
62052c0c62
commit
5bc3a7a31d
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2003-02-27 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* app/tools/gimpbucketfilltool.c
|
||||
* app/tools/gimpconvolvetool.c
|
||||
* app/tools/gimpcroptool.c
|
||||
* app/tools/gimpdodgeburntool.c
|
||||
* app/tools/gimperasertool.c
|
||||
* app/tools/gimpfliptool.c
|
||||
* app/tools/gimpfuzzyselecttool.c
|
||||
* app/tools/gimpinkoptions.c
|
||||
* app/tools/gimpmagnifytool.c
|
||||
* app/tools/gimpmovetool.c
|
||||
* app/tools/gimprectselecttool.c
|
||||
* app/tools/gimpselectiontool.c
|
||||
* app/tools/gimptexttool.c
|
||||
* app/tools/gimptransformtool.c
|
||||
* app/widgets/gimpcellrendererviewable.c
|
||||
* app/widgets/gimpcontainertreeview.c: remove unecessary G_OBJECT()
|
||||
from g_object_set calls.
|
||||
|
||||
* plug-ins/common/bumpmap.c: use g_signal_handlers_(un)block_by_func
|
||||
instead of gtk_signal_handler_(un)block_by_data.
|
||||
|
||||
2003-02-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpcolor/gimprgb.c: fixed gimp_rgb_intensity_uchar() which
|
||||
|
@ -632,7 +632,7 @@ brush_widget_motion_notify (GtkWidget *widget,
|
||||
|
||||
aspect = CLAMP (aspect, 1.0, 10.0);
|
||||
|
||||
g_object_set (G_OBJECT (brush_widget->ink_options),
|
||||
g_object_set (brush_widget->ink_options,
|
||||
"blob-angle", angle,
|
||||
"blob-aspect", aspect,
|
||||
NULL);
|
||||
|
@ -230,15 +230,11 @@ gimp_bucket_fill_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->fill_mode)
|
||||
{
|
||||
case GIMP_FG_BUCKET_FILL:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"fill-mode", GIMP_BG_BUCKET_FILL,
|
||||
NULL);
|
||||
g_object_set (options, "fill-mode", GIMP_BG_BUCKET_FILL, NULL);
|
||||
break;
|
||||
|
||||
case GIMP_BG_BUCKET_FILL:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"fill-mode", GIMP_FG_BUCKET_FILL,
|
||||
NULL);
|
||||
g_object_set (options, "fill-mode", GIMP_FG_BUCKET_FILL, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -174,15 +174,11 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->type)
|
||||
{
|
||||
case GIMP_BLUR_CONVOLVE:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"type", GIMP_SHARPEN_CONVOLVE,
|
||||
NULL);
|
||||
g_object_set (options, "type", GIMP_SHARPEN_CONVOLVE, NULL);
|
||||
break;
|
||||
|
||||
case GIMP_SHARPEN_CONVOLVE:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"type", GIMP_BLUR_CONVOLVE,
|
||||
NULL);
|
||||
g_object_set (options, "type", GIMP_BLUR_CONVOLVE, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -643,12 +643,12 @@ gimp_crop_tool_modifier_key (GimpTool *tool,
|
||||
if (state & GDK_MOD1_MASK)
|
||||
{
|
||||
if (! options->allow_enlarge)
|
||||
g_object_set (G_OBJECT (options), "allow-enlarge", TRUE, NULL);
|
||||
g_object_set (options, "allow-enlarge", TRUE, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (options->allow_enlarge)
|
||||
g_object_set (G_OBJECT (options), "allow-enlarge", FALSE, NULL);
|
||||
g_object_set (options, "allow-enlarge", FALSE, NULL);
|
||||
}
|
||||
|
||||
if (key == GDK_CONTROL_MASK)
|
||||
@ -656,15 +656,11 @@ gimp_crop_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->crop_type)
|
||||
{
|
||||
case GIMP_CROP:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"crop-type", GIMP_RESIZE,
|
||||
NULL);
|
||||
g_object_set (options, "crop-type", GIMP_RESIZE, NULL);
|
||||
break;
|
||||
|
||||
case GIMP_RESIZE:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"crop-type", GIMP_CROP,
|
||||
NULL);
|
||||
g_object_set (options, "crop-type", GIMP_CROP, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -149,11 +149,11 @@ gimp_dodgeburn_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->type)
|
||||
{
|
||||
case GIMP_DODGE:
|
||||
g_object_set (G_OBJECT (options), "type", GIMP_BURN, NULL);
|
||||
g_object_set (options, "type", GIMP_BURN, NULL);
|
||||
break;
|
||||
|
||||
case GIMP_BURN:
|
||||
g_object_set (G_OBJECT (options), "type", GIMP_DODGE, NULL);
|
||||
g_object_set (options, "type", GIMP_DODGE, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -148,7 +148,7 @@ gimp_eraser_tool_modifier_key (GimpTool *tool,
|
||||
if ((key == GDK_CONTROL_MASK) &&
|
||||
! (state & GDK_SHIFT_MASK)) /* leave stuff untouched in line draw mode */
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"anti-erase", ! options->anti_erase,
|
||||
NULL);
|
||||
}
|
||||
|
@ -172,13 +172,13 @@ gimp_flip_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->flip_type)
|
||||
{
|
||||
case GIMP_ORIENTATION_HORIZONTAL:
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"flip-type", GIMP_ORIENTATION_VERTICAL,
|
||||
NULL);
|
||||
break;
|
||||
|
||||
case GIMP_ORIENTATION_VERTICAL:
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"flip-type", GIMP_ORIENTATION_HORIZONTAL,
|
||||
NULL);
|
||||
break;
|
||||
|
@ -351,7 +351,7 @@ gimp_fuzzy_select_tool_motion (GimpTool *tool,
|
||||
|
||||
diff = ((ABS (diff_x) > ABS (diff_y)) ? diff_x : diff_y) / 2.0;
|
||||
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"threshold", fuzzy_sel->first_threshold + diff,
|
||||
NULL);
|
||||
|
||||
|
@ -632,7 +632,7 @@ brush_widget_motion_notify (GtkWidget *widget,
|
||||
|
||||
aspect = CLAMP (aspect, 1.0, 10.0);
|
||||
|
||||
g_object_set (G_OBJECT (brush_widget->ink_options),
|
||||
g_object_set (brush_widget->ink_options,
|
||||
"blob-angle", angle,
|
||||
"blob-aspect", aspect,
|
||||
NULL);
|
||||
|
@ -632,7 +632,7 @@ brush_widget_motion_notify (GtkWidget *widget,
|
||||
|
||||
aspect = CLAMP (aspect, 1.0, 10.0);
|
||||
|
||||
g_object_set (G_OBJECT (brush_widget->ink_options),
|
||||
g_object_set (brush_widget->ink_options,
|
||||
"blob-angle", angle,
|
||||
"blob-aspect", aspect,
|
||||
NULL);
|
||||
|
@ -322,15 +322,11 @@ gimp_magnify_tool_modifier_key (GimpTool *tool,
|
||||
switch (options->zoom_type)
|
||||
{
|
||||
case GIMP_ZOOM_IN:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"zoom-type", GIMP_ZOOM_OUT,
|
||||
NULL);
|
||||
g_object_set (options, "zoom-type", GIMP_ZOOM_OUT, NULL);
|
||||
break;
|
||||
|
||||
case GIMP_ZOOM_OUT:
|
||||
g_object_set (G_OBJECT (options),
|
||||
"zoom-type", GIMP_ZOOM_IN,
|
||||
NULL);
|
||||
g_object_set (options, "zoom-type", GIMP_ZOOM_IN, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -437,13 +437,13 @@ gimp_move_tool_modifier_key (GimpTool *tool,
|
||||
|
||||
if (key == GDK_CONTROL_MASK)
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"move-current", ! options->move_current,
|
||||
NULL);
|
||||
}
|
||||
else if (key == GDK_MOD1_MASK)
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"move-mask", ! options->move_mask,
|
||||
NULL);
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ gimp_rect_select_tool_update_options (GimpRectSelectTool *rect_sel,
|
||||
height = (gdouble) abs (rect_sel->h) * unit_factor / gimage->yresolution;
|
||||
}
|
||||
|
||||
g_object_set (G_OBJECT (GIMP_TOOL (rect_sel)->tool_info->tool_options),
|
||||
g_object_set (GIMP_TOOL (rect_sel)->tool_info->tool_options,
|
||||
"fixed-width", width,
|
||||
"fixed-height", height,
|
||||
"fixed-unit", unit,
|
||||
|
@ -351,7 +351,7 @@ gimp_fuzzy_select_tool_motion (GimpTool *tool,
|
||||
|
||||
diff = ((ABS (diff_x) > ABS (diff_y)) ? diff_x : diff_y) / 2.0;
|
||||
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"threshold", fuzzy_sel->first_threshold + diff,
|
||||
NULL);
|
||||
|
||||
|
@ -163,9 +163,7 @@ gimp_selection_tool_modifier_key (GimpTool *tool,
|
||||
|
||||
if (button_op != options->operation)
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
"operation", button_op,
|
||||
NULL);
|
||||
g_object_set (options, "operation", button_op, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -313,9 +313,7 @@ gimp_text_tool_connect (GimpTextTool *tool,
|
||||
g_object_unref (tool->text);
|
||||
tool->text = NULL;
|
||||
|
||||
g_object_set (G_OBJECT (options->text),
|
||||
"text", NULL,
|
||||
NULL);
|
||||
g_object_set (options->text, "text", NULL, NULL);
|
||||
}
|
||||
|
||||
if (text)
|
||||
|
@ -531,13 +531,13 @@ gimp_transform_tool_modifier_key (GimpTool *tool,
|
||||
|
||||
if (key == GDK_CONTROL_MASK)
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"constrain-1", ! options->constrain_1,
|
||||
NULL);
|
||||
}
|
||||
else if (key == GDK_MOD1_MASK)
|
||||
{
|
||||
g_object_set (G_OBJECT (options),
|
||||
g_object_set (options,
|
||||
"constrain-2", ! options->constrain_2,
|
||||
NULL);
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ gimp_cell_renderer_viewable_render (GtkCellRenderer *cell,
|
||||
pixbuf = scaled_pixbuf;
|
||||
}
|
||||
|
||||
g_object_set (G_OBJECT (cell), "pixbuf", pixbuf, NULL);
|
||||
g_object_set (cell, "pixbuf", pixbuf, NULL);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ gimp_container_tree_view_set_viewable_func (GtkTreeViewColumn *tree_column,
|
||||
}
|
||||
}
|
||||
|
||||
g_object_set (G_OBJECT (cell),
|
||||
g_object_set (cell,
|
||||
"viewable", viewable,
|
||||
"preview-size", preview_size,
|
||||
"pixbuf", pixbuf,
|
||||
@ -233,7 +233,7 @@ gimp_container_tree_view_init (GimpContainerTreeView *tree_view)
|
||||
G_TYPE_STRING);
|
||||
tree_view->view = GTK_TREE_VIEW
|
||||
(gtk_tree_view_new_with_model (GTK_TREE_MODEL (tree_view->list)));
|
||||
g_object_unref (G_OBJECT (tree_view->list));
|
||||
g_object_unref (tree_view->list);
|
||||
|
||||
GIMP_CONTAINER_VIEW (tree_view)->dnd_widget = GTK_WIDGET (tree_view->view);
|
||||
|
||||
|
@ -1239,40 +1239,48 @@ dialog_preview_events (GtkWidget *widget,
|
||||
bmint.preview_xofs = CLAMP (bmint.preview_xofs - dx,
|
||||
0,
|
||||
sel_width - bmint.preview_width);
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (bmint.preview_adj_x),
|
||||
&bmint.preview_xofs);
|
||||
g_signal_handlers_block_by_func (bmint.preview_adj_x,
|
||||
dialog_iscale_update_normal,
|
||||
&bmint.preview_xofs);
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (bmint.preview_adj_x),
|
||||
bmint.preview_xofs);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bmint.preview_adj_x),
|
||||
&bmint.preview_xofs);
|
||||
g_signal_handlers_unblock_by_func (bmint.preview_adj_x,
|
||||
dialog_iscale_update_normal,
|
||||
&bmint.preview_xofs);
|
||||
bmint.preview_yofs = CLAMP (bmint.preview_yofs - dy,
|
||||
0,
|
||||
sel_height - bmint.preview_height);
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (bmint.preview_adj_y),
|
||||
&bmint.preview_yofs);
|
||||
g_signal_handlers_block_by_func (bmint.preview_adj_y,
|
||||
dialog_iscale_update_normal,
|
||||
&bmint.preview_yofs);
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (bmint.preview_adj_y),
|
||||
bmint.preview_yofs);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bmint.preview_adj_y),
|
||||
&bmint.preview_yofs);
|
||||
g_signal_handlers_unblock_by_func (bmint.preview_adj_y,
|
||||
dialog_iscale_update_normal,
|
||||
&bmint.preview_yofs);
|
||||
|
||||
break;
|
||||
|
||||
case DRAG_BUMPMAP:
|
||||
bmvals.xofs = CLAMP (bmvals.xofs - dx, -1000, 1000);
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (bmint.offset_adj_x),
|
||||
&bmvals.xofs);
|
||||
g_signal_handlers_block_by_func (bmint.offset_adj_x,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.xofs);
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (bmint.offset_adj_x),
|
||||
bmvals.xofs);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bmint.offset_adj_x),
|
||||
&bmvals.xofs);
|
||||
g_signal_handlers_unblock_by_func (bmint.offset_adj_x,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.xofs);
|
||||
|
||||
bmvals.yofs = CLAMP (bmvals.yofs - dy, -1000, 1000);
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (bmint.offset_adj_y),
|
||||
&bmvals.yofs);
|
||||
g_signal_handlers_block_by_func (bmint.offset_adj_y,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.yofs);
|
||||
gtk_adjustment_set_value (GTK_ADJUSTMENT (bmint.offset_adj_y),
|
||||
bmvals.yofs);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (bmint.offset_adj_y),
|
||||
&bmvals.yofs);
|
||||
g_signal_handlers_unblock_by_func (bmint.offset_adj_y,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.yofs);
|
||||
|
||||
break;
|
||||
|
||||
@ -1335,18 +1343,26 @@ dialog_new_bumpmap (gboolean init_offsets)
|
||||
if (adj)
|
||||
{
|
||||
adj->value = bmvals.xofs;
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (adj), &bmvals.xofs);
|
||||
g_signal_handlers_block_by_func (adj,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.xofs);
|
||||
gtk_adjustment_value_changed (adj);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), &bmvals.xofs);
|
||||
g_signal_handlers_unblock_by_func (adj,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.xofs);
|
||||
}
|
||||
|
||||
adj = (GtkAdjustment *) bmint.offset_adj_y;
|
||||
if (adj)
|
||||
{
|
||||
adj->value = bmvals.yofs;
|
||||
gtk_signal_handler_block_by_data (GTK_OBJECT (adj), &bmvals.yofs);
|
||||
g_signal_handlers_block_by_func (adj,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.yofs);
|
||||
gtk_adjustment_value_changed (adj);
|
||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), &bmvals.yofs);
|
||||
g_signal_handlers_unblock_by_func (adj,
|
||||
dialog_iscale_update_normal,
|
||||
&bmvals.yofs);
|
||||
}
|
||||
|
||||
/* Initialize pixel region */
|
||||
|
Reference in New Issue
Block a user