[gimp] Remove the newly added tool clipboard facility again, we don't need it
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Remove the newly added tool clipboard facility again, we don't need it
- Date: Wed, 24 Jun 2009 17:09:02 +0000 (UTC)
commit e170ad77b1127d04fc3c33278991edff7d324b66
Author: Michael Natterer <mitch gimp org>
Date: Wed Jun 24 19:08:24 2009 +0200
Remove the newly added tool clipboard facility again, we don't need it
app/actions/edit-commands.c | 32 --------------------------------
app/tools/gimptexttool.c | 32 --------------------------------
app/tools/gimptool.c | 24 ------------------------
app/tools/gimptool.h | 7 -------
app/tools/tool_manager.c | 21 ---------------------
app/tools/tool_manager.h | 3 ---
app/tools/tools-enums.c | 31 -------------------------------
app/tools/tools-enums.h | 12 ------------
8 files changed, 0 insertions(+), 162 deletions(-)
---
diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c
index c823c4f..3a7a09c 100644
--- a/app/actions/edit-commands.c
+++ b/app/actions/edit-commands.c
@@ -48,8 +48,6 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
-#include "tools/tool_manager.h"
-
#include "dialogs/dialogs.h"
#include "dialogs/fade-dialog.h"
@@ -191,20 +189,9 @@ edit_cut_cmd_callback (GtkAction *action,
{
GimpImage *image;
GimpDrawable *drawable;
- GimpDisplay *display;
GError *error = NULL;
return_if_no_drawable (image, drawable, data);
- display = action_data_get_display (data);
-
- if (display &&
- tool_manager_clipboard_action_active (display->gimp,
- GIMP_CLIPBOARD_ACTION_CUT,
- display))
- {
- return;
- }
-
if (gimp_edit_cut (image, drawable, action_data_get_context (data), &error))
{
GimpDisplay *display = action_data_get_display (data);
@@ -232,20 +219,9 @@ edit_copy_cmd_callback (GtkAction *action,
{
GimpImage *image;
GimpDrawable *drawable;
- GimpDisplay *display;
GError *error = NULL;
return_if_no_drawable (image, drawable, data);
- display = action_data_get_display (data);
-
- if (display &&
- tool_manager_clipboard_action_active (display->gimp,
- GIMP_CLIPBOARD_ACTION_COPY,
- display))
- {
- return;
- }
-
if (gimp_edit_copy (image, drawable, action_data_get_context (data), &error))
{
GimpDisplay *display = action_data_get_display (data);
@@ -302,14 +278,6 @@ edit_paste_cmd_callback (GtkAction *action,
{
GimpDisplay *display = action_data_get_display (data);
- if (display &&
- tool_manager_clipboard_action_active (display->gimp,
- GIMP_CLIPBOARD_ACTION_PASTE,
- display))
- {
- return;
- }
-
if (display && display->image)
edit_paste (display, FALSE);
else
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 2c83e43..7b397be 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -103,9 +103,6 @@ static void gimp_text_tool_motion (GimpTool *tool,
static gboolean gimp_text_tool_key_press (GimpTool *tool,
GdkEventKey *kevent,
GimpDisplay *display);
-static gboolean gimp_text_tool_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display);
static void gimp_text_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
@@ -249,7 +246,6 @@ gimp_text_tool_class_init (GimpTextToolClass *klass)
tool_class->motion = gimp_text_tool_motion;
tool_class->button_release = gimp_text_tool_button_release;
tool_class->key_press = gimp_text_tool_key_press;
- tool_class->clipboard_action = gimp_text_tool_clipboard_action;
tool_class->oper_update = gimp_text_tool_oper_update;
tool_class->cursor_update = gimp_text_tool_cursor_update;
tool_class->get_popup = gimp_text_tool_get_popup;
@@ -879,34 +875,6 @@ gimp_text_tool_key_press (GimpTool *tool,
return retval;
}
-static gboolean
-gimp_text_tool_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display)
-{
- GimpTextTool *text_tool = GIMP_TEXT_TOOL (tool);
-
- if (display != tool->display)
- return FALSE;
-
- switch (action)
- {
- case GIMP_CLIPBOARD_ACTION_CUT:
- gimp_text_tool_clipboard_cut (text_tool);
- break;
-
- case GIMP_CLIPBOARD_ACTION_COPY:
- gimp_text_tool_clipboard_copy (text_tool, TRUE);
- break;
-
- case GIMP_CLIPBOARD_ACTION_PASTE:
- gimp_text_tool_clipboard_paste (text_tool, TRUE);
- break;
- }
-
- return TRUE;
-}
-
static void
gimp_text_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index 2172f4a..e4e57a0 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -98,9 +98,6 @@ static void gimp_tool_real_active_modifier_key (GimpTool *tool,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
-static gboolean gimp_tool_real_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display);
static void gimp_tool_real_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
@@ -145,7 +142,6 @@ gimp_tool_class_init (GimpToolClass *klass)
klass->key_press = gimp_tool_real_key_press;
klass->modifier_key = gimp_tool_real_modifier_key;
klass->active_modifier_key = gimp_tool_real_active_modifier_key;
- klass->clipboard_action = gimp_tool_real_clipboard_action;
klass->oper_update = gimp_tool_real_oper_update;
klass->cursor_update = gimp_tool_real_cursor_update;
klass->get_popup = gimp_tool_real_get_popup;
@@ -355,14 +351,6 @@ gimp_tool_real_active_modifier_key (GimpTool *tool,
{
}
-static gboolean
-gimp_tool_real_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display)
-{
- return FALSE;
-}
-
static void
gimp_tool_real_oper_update (GimpTool *tool,
const GimpCoords *coords,
@@ -847,18 +835,6 @@ gimp_tool_set_active_modifier_state (GimpTool *tool,
tool->active_modifier_state = state;
}
-gboolean
-gimp_tool_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display)
-{
- g_return_val_if_fail (GIMP_IS_TOOL (tool), FALSE);
- g_return_val_if_fail (GIMP_IS_DISPLAY (display), FALSE);
- g_return_val_if_fail (display == tool->focus_display, FALSE);
-
- return GIMP_TOOL_GET_CLASS (tool)->clipboard_action (tool, action, display);
-}
-
void
gimp_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
diff --git a/app/tools/gimptool.h b/app/tools/gimptool.h
index 5cbacdb..9bdeaeb 100644
--- a/app/tools/gimptool.h
+++ b/app/tools/gimptool.h
@@ -118,9 +118,6 @@ struct _GimpToolClass
gboolean press,
GdkModifierType state,
GimpDisplay *display);
- gboolean (* clipboard_action) (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display);
void (* oper_update) (GimpTool *tool,
const GimpCoords *coords,
@@ -185,10 +182,6 @@ void gimp_tool_set_active_modifier_state (GimpTool *tool,
GdkModifierType state,
GimpDisplay *display);
-gboolean gimp_tool_clipboard_action (GimpTool *tool,
- GimpClipboardAction action,
- GimpDisplay *display);
-
void gimp_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
diff --git a/app/tools/tool_manager.c b/app/tools/tool_manager.c
index 3a8a9f8..2224f75 100644
--- a/app/tools/tool_manager.c
+++ b/app/tools/tool_manager.c
@@ -356,27 +356,6 @@ tool_manager_key_press_active (Gimp *gimp,
return FALSE;
}
-gboolean
-tool_manager_clipboard_action_active (Gimp *gimp,
- GimpClipboardAction action,
- GimpDisplay *display)
-{
- GimpToolManager *tool_manager;
-
- g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
-
- tool_manager = tool_manager_get (gimp);
-
- if (tool_manager->active_tool)
- {
- return gimp_tool_clipboard_action (tool_manager->active_tool,
- action,
- display);
- }
-
- return FALSE;
-}
-
void
tool_manager_focus_display_active (Gimp *gimp,
GimpDisplay *display)
diff --git a/app/tools/tool_manager.h b/app/tools/tool_manager.h
index 8263d13..7597a75 100644
--- a/app/tools/tool_manager.h
+++ b/app/tools/tool_manager.h
@@ -56,9 +56,6 @@ void tool_manager_motion_active (Gimp *gimp,
gboolean tool_manager_key_press_active (Gimp *gimp,
GdkEventKey *kevent,
GimpDisplay *display);
-gboolean tool_manager_clipboard_action_active (Gimp *gimp,
- GimpClipboardAction action,
- GimpDisplay *display);
void tool_manager_focus_display_active (Gimp *gimp,
GimpDisplay *display);
diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c
index 767ffeb..0f243db 100644
--- a/app/tools/tools-enums.c
+++ b/app/tools/tools-enums.c
@@ -74,37 +74,6 @@ gimp_button_release_type_get_type (void)
}
GType
-gimp_clipboard_action_get_type (void)
-{
- static const GEnumValue values[] =
- {
- { GIMP_CLIPBOARD_ACTION_CUT, "GIMP_CLIPBOARD_ACTION_CUT", "cut" },
- { GIMP_CLIPBOARD_ACTION_COPY, "GIMP_CLIPBOARD_ACTION_COPY", "copy" },
- { GIMP_CLIPBOARD_ACTION_PASTE, "GIMP_CLIPBOARD_ACTION_PASTE", "paste" },
- { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] =
- {
- { GIMP_CLIPBOARD_ACTION_CUT, "GIMP_CLIPBOARD_ACTION_CUT", NULL },
- { GIMP_CLIPBOARD_ACTION_COPY, "GIMP_CLIPBOARD_ACTION_COPY", NULL },
- { GIMP_CLIPBOARD_ACTION_PASTE, "GIMP_CLIPBOARD_ACTION_PASTE", NULL },
- { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpClipboardAction", values);
- gimp_type_set_translation_context (type, "clipboard-action");
- gimp_enum_set_value_descriptions (type, descs);
- }
-
- return type;
-}
-
-GType
gimp_rectangle_guide_get_type (void)
{
static const GEnumValue values[] =
diff --git a/app/tools/tools-enums.h b/app/tools/tools-enums.h
index fe998e0..3a508a7 100644
--- a/app/tools/tools-enums.h
+++ b/app/tools/tools-enums.h
@@ -47,18 +47,6 @@ typedef enum
} GimpButtonReleaseType;
-#define GIMP_TYPE_CLIPBOARD_ACTION (gimp_clipboard_action_get_type ())
-
-GType gimp_clipboard_action_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_CLIPBOARD_ACTION_CUT,
- GIMP_CLIPBOARD_ACTION_COPY,
- GIMP_CLIPBOARD_ACTION_PASTE
-} GimpClipboardAction;
-
-
#define GIMP_TYPE_RECTANGLE_GUIDE (gimp_rectangle_guide_get_type ())
GType gimp_rectangle_guide_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]