gimp r25557 - in trunk: . app/tools
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25557 - in trunk: . app/tools
- Date: Fri, 2 May 2008 10:05:14 +0100 (BST)
Author: martinn
Date: Fri May 2 09:05:13 2008
New Revision: 25557
URL: http://svn.gnome.org/viewvc/gimp?rev=25557&view=rev
Log:
2008-05-02 Martin Nordholts <martinn svn gnome org>
* gimptexttool.c
* gimptexttool.h:
* gimprectangletool.c
* gimprectangletool.h
* gimprectangleselecttool.c: Renamed the "rectangle-changed"
signal to "rectangle-change-complete" which is much better name
since the signal is not emited when the rectangle is changed, but
when the change is complete.
Modified:
trunk/ChangeLog
trunk/app/tools/gimprectangleselecttool.c
trunk/app/tools/gimprectangletool.c
trunk/app/tools/gimprectangletool.h
trunk/app/tools/gimptexttool.c
trunk/app/tools/gimptexttool.h
Modified: trunk/app/tools/gimprectangleselecttool.c
==============================================================================
--- trunk/app/tools/gimprectangleselecttool.c (original)
+++ trunk/app/tools/gimprectangleselecttool.c Fri May 2 09:05:13 2008
@@ -127,7 +127,7 @@
gint w,
gint h);
static void gimp_rectangle_select_tool_cancel (GimpRectangleTool *rect_tool);
-static gboolean gimp_rectangle_select_tool_rectangle_changed
+static gboolean gimp_rectangle_select_tool_rectangle_change_complete
(GimpRectangleTool *rect_tool);
static void gimp_rectangle_select_tool_real_select (GimpRectangleSelectTool *rect_sel_tool,
GimpChannelOps operation,
@@ -202,9 +202,9 @@
static void
gimp_rectangle_select_tool_rectangle_tool_iface_init (GimpRectangleToolInterface *iface)
{
- iface->execute = gimp_rectangle_select_tool_execute;
- iface->cancel = gimp_rectangle_select_tool_cancel;
- iface->rectangle_changed = gimp_rectangle_select_tool_rectangle_changed;
+ iface->execute = gimp_rectangle_select_tool_execute;
+ iface->cancel = gimp_rectangle_select_tool_cancel;
+ iface->rectangle_change_complete = gimp_rectangle_select_tool_rectangle_change_complete;
}
static void
@@ -826,7 +826,7 @@
}
static gboolean
-gimp_rectangle_select_tool_rectangle_changed (GimpRectangleTool *rectangle)
+gimp_rectangle_select_tool_rectangle_change_complete (GimpRectangleTool *rectangle)
{
GimpTool *tool;
GimpRectangleSelectTool *rect_sel_tool;
@@ -908,7 +908,7 @@
priv->round_corners = options->round_corners;
priv->corner_radius = options->corner_radius;
- gimp_rectangle_select_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_select_tool_rectangle_change_complete (rect_tool);
gimp_draw_tool_resume (draw_tool);
}
Modified: trunk/app/tools/gimprectangletool.c
==============================================================================
--- trunk/app/tools/gimprectangletool.c (original)
+++ trunk/app/tools/gimprectangletool.c Fri May 2 09:05:13 2008
@@ -53,7 +53,7 @@
enum
{
- RECTANGLE_CHANGED,
+ RECTANGLE_CHANGE_COMPLETE,
LAST_SIGNAL
};
@@ -224,7 +224,8 @@
static void gimp_rectangle_tool_check_function (GimpRectangleTool *rect_tool);
-static void gimp_rectangle_tool_rectangle_changed (GimpRectangleTool *rect_tool);
+static void gimp_rectangle_tool_rectangle_change_complete
+ (GimpRectangleTool *rect_tool);
static void gimp_rectangle_tool_auto_shrink (GimpRectangleTool *rect_tool);
@@ -357,12 +358,12 @@
if (! initialized)
{
- gimp_rectangle_tool_signals[RECTANGLE_CHANGED] =
- g_signal_new ("rectangle-changed",
+ gimp_rectangle_tool_signals[RECTANGLE_CHANGE_COMPLETE] =
+ g_signal_new ("rectangle-change-complete",
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpRectangleToolInterface,
- rectangle_changed),
+ rectangle_change_complete),
NULL, NULL,
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -413,9 +414,9 @@
GIMP_RECTANGLE_PRECISION_INT,
GIMP_PARAM_READWRITE));
- iface->execute = NULL;
- iface->cancel = NULL;
- iface->rectangle_changed = NULL;
+ iface->execute = NULL;
+ iface->cancel = NULL;
+ iface->rectangle_change_complete = NULL;
initialized = TRUE;
}
@@ -519,7 +520,7 @@
gimp_rectangle_tool_update_highlight (tool);
gimp_rectangle_tool_update_handle_sizes (tool);
- gimp_rectangle_tool_rectangle_changed (tool);
+ gimp_rectangle_tool_rectangle_change_complete (tool);
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
@@ -961,7 +962,7 @@
switch (release_type)
{
case GIMP_BUTTON_RELEASE_NORMAL:
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
break;
case GIMP_BUTTON_RELEASE_CANCEL:
@@ -1205,7 +1206,7 @@
gimp_rectangle_tool_update_highlight (rect_tool);
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
}
}
@@ -1224,7 +1225,7 @@
gimp_rectangle_tool_update_highlight (rect_tool);
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
}
else if (button1_down)
{
@@ -1240,7 +1241,7 @@
gimp_rectangle_tool_update_highlight (rect_tool);
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
}
}
@@ -1461,7 +1462,7 @@
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
/* Evil hack to suppress oper updates. We do this because we don't
* want the rectangle tool to change function while the rectangle
@@ -2182,7 +2183,7 @@
gimp_draw_tool_resume (GIMP_DRAW_TOOL (rect_tool));
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
}
static void
@@ -2408,10 +2409,10 @@
}
static void
-gimp_rectangle_tool_rectangle_changed (GimpRectangleTool *rect_tool)
+gimp_rectangle_tool_rectangle_change_complete (GimpRectangleTool *rect_tool)
{
g_signal_emit (rect_tool,
- gimp_rectangle_tool_signals[RECTANGLE_CHANGED], 0);
+ gimp_rectangle_tool_signals[RECTANGLE_CHANGE_COMPLETE], 0);
}
static void
@@ -2464,7 +2465,7 @@
gimp_rectangle_tool_update_int_rect (rect_tool);
- gimp_rectangle_tool_rectangle_changed (rect_tool);
+ gimp_rectangle_tool_rectangle_change_complete (rect_tool);
gimp_rectangle_tool_update_handle_sizes (rect_tool);
gimp_rectangle_tool_update_highlight (rect_tool);
Modified: trunk/app/tools/gimprectangletool.h
==============================================================================
--- trunk/app/tools/gimprectangletool.h (original)
+++ trunk/app/tools/gimprectangletool.h Fri May 2 09:05:13 2008
@@ -75,7 +75,7 @@
void (* cancel) (GimpRectangleTool *rect_tool);
/* signals */
- gboolean (* rectangle_changed) (GimpRectangleTool *rect_tool);
+ gboolean (* rectangle_change_complete) (GimpRectangleTool *rect_tool);
};
Modified: trunk/app/tools/gimptexttool.c
==============================================================================
--- trunk/app/tools/gimptexttool.c (original)
+++ trunk/app/tools/gimptexttool.c Fri May 2 09:05:13 2008
@@ -133,9 +133,10 @@
GimpDrawable *drawable,
gboolean confirm);
-static gboolean gimp_text_tool_rectangle_changed (GimpRectangleTool *rect_tool);
-void gimp_rectangle_tool_frame_item (GimpRectangleTool *rect_tool,
- GimpItem *item);
+static gboolean gimp_text_tool_rectangle_change_complete
+ (GimpRectangleTool *rect_tool);
+void gimp_rectangle_tool_frame_item(GimpRectangleTool *rect_tool,
+ GimpItem *item);
G_DEFINE_TYPE_WITH_CODE (GimpTextTool, gimp_text_tool,
GIMP_TYPE_DRAW_TOOL,
@@ -193,7 +194,7 @@
{
iface->execute = NULL;
iface->cancel = NULL;
- iface->rectangle_changed = gimp_text_tool_rectangle_changed;
+ iface->rectangle_change_complete = gimp_text_tool_rectangle_change_complete;
}
static void
@@ -215,7 +216,7 @@
gimp_tool_control_set_action_object_1 (tool->control,
"context/context-font-select-set");
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
static GObject *
@@ -375,13 +376,13 @@
* yet exists there, we want to create one with the right shape.
* 2) If the user has modified the rectangle for an existing text layer,
* we want to change its shape accordingly. We do this by falling
- * through to code that causes the "rectangle-changed" signal to
- * be emitted.
+ * through to code that causes the "rectangle-change-complete" signal
+ * to be emitted.
* 3) If the rectangle that has been swept out is too small, we want to
* use dynamic text.
* 4) Otherwise, we want to use the new rectangle that the user has
* created as our text box. This again is done by causing
- * "rectangle-changed" to be emitted.
+ * "rectangle-change-complete" to be emitted.
*/
static void
gimp_text_tool_button_release (GimpTool *tool,
@@ -410,10 +411,10 @@
/* user has clicked on an existing text layer */
gimp_tool_control_halt (tool->control);
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
gimp_rectangle_tool_frame_item (rect_tool,
GIMP_ITEM (text_tool->layer));
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
return;
}
else
@@ -429,7 +430,7 @@
g_object_set (text_tool->proxy,
"box-mode", GIMP_TEXT_BOX_DYNAMIC,
NULL);
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
}
else
{
@@ -438,7 +439,7 @@
gimp_rectangle_tool_button_release (tool, coords, time, state,
release_type, display);
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
static void
@@ -626,10 +627,10 @@
{
GimpRectangleTool *rect_tool = GIMP_RECTANGLE_TOOL (text_tool);
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
gimp_rectangle_tool_frame_item (rect_tool,
GIMP_ITEM (text_tool->layer));
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
}
@@ -772,10 +773,10 @@
* shape of the rectangle */
if (layer->text->box_mode == GIMP_TEXT_BOX_DYNAMIC)
{
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
gimp_rectangle_tool_frame_item (GIMP_RECTANGLE_TOOL (text_tool),
GIMP_ITEM (layer));
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
gimp_image_flush (image);
@@ -914,10 +915,10 @@
}
else
{
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
gimp_rectangle_tool_frame_item (GIMP_RECTANGLE_TOOL (text_tool),
GIMP_ITEM (layer));
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
gimp_image_undo_group_end (image);
@@ -1123,10 +1124,10 @@
{
if (! gimp_rectangle_tool_rectangle_is_new (rect_tool))
{
- text_tool->handle_rectangle_changed = FALSE;
+ text_tool->handle_rectangle_change_complete = FALSE;
gimp_rectangle_tool_frame_item (rect_tool,
GIMP_ITEM (text_tool->layer));
- text_tool->handle_rectangle_changed = TRUE;
+ text_tool->handle_rectangle_change_complete = TRUE;
}
}
}
@@ -1265,7 +1266,7 @@
}
static gboolean
-gimp_text_tool_rectangle_changed (GimpRectangleTool *rect_tool)
+gimp_text_tool_rectangle_change_complete (GimpRectangleTool *rect_tool)
{
GimpTextTool *text_tool = GIMP_TEXT_TOOL (rect_tool);
GimpText *text = text_tool->text;
@@ -1273,7 +1274,7 @@
GimpItem *item ;
gint x1, y1, x2, y2;
- if (text_tool->handle_rectangle_changed)
+ if (text_tool->handle_rectangle_change_complete)
{
g_object_get (rect_tool,
"x1", &x1,
Modified: trunk/app/tools/gimptexttool.h
==============================================================================
--- trunk/app/tools/gimptexttool.h (original)
+++ trunk/app/tools/gimptexttool.h Fri May 2 09:05:13 2008
@@ -53,7 +53,7 @@
GtkWidget *editor;
GtkWidget *confirm_dialog;
- gboolean handle_rectangle_changed;
+ gboolean handle_rectangle_change_complete;
gboolean text_box_fixed;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]