[gimp] app: disable the foreground select tool properly: #if 0 everything



commit 513e3b6a7892395c7a0c4b3b58cad9bb62912f3a
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 21 03:09:08 2012 +0200

    app: disable the foreground select tool properly: #if 0 everything
    
    so it's not in the way of further cruft removal.

 app/actions/tools-commands.c               |    2 ++
 app/core/gimpdrawable-foreground-extract.c |   16 ++++------------
 app/core/gimpdrawable-foreground-extract.h |    4 ++++
 app/pdb/drawable-cmds.c                    |    3 +++
 app/tools/gimp-tools.c                     |    2 +-
 app/tools/gimpforegroundselectoptions.c    |    4 ++++
 app/tools/gimpforegroundselectoptions.h    |    4 ++++
 app/tools/gimpforegroundselecttool.c       |    4 ++++
 app/tools/gimpforegroundselecttool.h       |    4 ++++
 app/tools/gimpforegroundselecttoolundo.c   |    4 ++++
 app/tools/gimpforegroundselecttoolundo.h   |    4 ++++
 menus/image-menu.xml.in                    |    2 ++
 tools/pdbgen/pdb/drawable.pdb              |    3 +++
 13 files changed, 43 insertions(+), 13 deletions(-)
---
diff --git a/app/actions/tools-commands.c b/app/actions/tools-commands.c
index 9c3a41d..5f93379 100644
--- a/app/actions/tools-commands.c
+++ b/app/actions/tools-commands.c
@@ -260,6 +260,7 @@ tools_fg_select_brush_size_cmd_callback (GtkAction *action,
 
   tool_info = gimp_context_get_tool (context);
 
+#if 0
   if (tool_info && GIMP_IS_FOREGROUND_SELECT_OPTIONS (tool_info->tool_options))
     {
       action_select_property ((GimpActionSelectType) value,
@@ -268,6 +269,7 @@ tools_fg_select_brush_size_cmd_callback (GtkAction *action,
                               "stroke-width",
                               1.0, 4.0, 16.0, 0.1, FALSE);
     }
+#endif
 }
 
 void
diff --git a/app/core/gimpdrawable-foreground-extract.c b/app/core/gimpdrawable-foreground-extract.c
index 83b5061..bc0f956 100644
--- a/app/core/gimpdrawable-foreground-extract.c
+++ b/app/core/gimpdrawable-foreground-extract.c
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #include "config.h"
 
 #include <gegl.h>
@@ -23,10 +25,8 @@
 
 #include "core-types.h"
 
-#if 0
 #include "base/siox.h"
 #include "base/tile-manager.h"
-#endif
 
 #include "gegl/gimp-gegl-utils.h"
 
@@ -47,7 +47,6 @@ gimp_drawable_foreground_extract (GimpDrawable              *drawable,
                                   GimpDrawable              *mask,
                                   GimpProgress              *progress)
 {
-#if 0
   SioxState    *state;
   const gdouble sensitivity[3] = { SIOX_DEFAULT_SENSITIVITY_L,
                                    SIOX_DEFAULT_SENSITIVITY_A,
@@ -73,7 +72,6 @@ gimp_drawable_foreground_extract (GimpDrawable              *drawable,
 
       gimp_drawable_foreground_extract_siox_done (state);
     }
-#endif
 }
 
 SioxState *
@@ -83,7 +81,6 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable,
                                             gint          width,
                                             gint          height)
 {
-#if 0
   GeglBuffer   *buffer;
   const guchar *colormap = NULL;
   gboolean      intersect;
@@ -117,9 +114,6 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable,
   return siox_init (gimp_gegl_buffer_get_tiles (buffer), colormap,
                     offset_x, offset_y,
                     x, y, width, height);
-#endif
-
-  return NULL;
 }
 
 void
@@ -131,7 +125,6 @@ gimp_drawable_foreground_extract_siox (GimpDrawable       *mask,
                                        gboolean            multiblob,
                                        GimpProgress       *progress)
 {
-#if 0
   GeglBuffer *buffer;
   gint        x1, y1;
   gint        x2, y2;
@@ -171,15 +164,14 @@ gimp_drawable_foreground_extract_siox (GimpDrawable       *mask,
     gimp_progress_end (progress);
 
   gimp_drawable_update (mask, x1, y1, x2, y2);
-#endif
 }
 
 void
 gimp_drawable_foreground_extract_siox_done (SioxState *state)
 {
-#if 0
   g_return_if_fail (state != NULL);
 
   siox_done (state);
-#endif
 }
+
+#endif
diff --git a/app/core/gimpdrawable-foreground-extract.h b/app/core/gimpdrawable-foreground-extract.h
index 74c78d6..78ce386 100644
--- a/app/core/gimpdrawable-foreground-extract.h
+++ b/app/core/gimpdrawable-foreground-extract.h
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #ifndef  __GIMP_DRAWABLE_FOREGROUND_EXTRACT_H__
 #define  __GIMP_DRAWABLE_FOREGROUND_EXTRACT_H__
 
@@ -44,3 +46,5 @@ void        gimp_drawable_foreground_extract_siox_done (SioxState      *state);
 
 
 #endif  /*  __GIMP_DRAWABLE_FOREGROUND_EXTRACT_H__  */
+
+#endif
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index cf9ddf6..966d308 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -932,10 +932,13 @@ drawable_foreground_extract_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
+    /*
       if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
         gimp_drawable_foreground_extract (drawable, mode, mask, progress);
       else
         success = FALSE;
+    */
+      success = FALSE;
     }
 
   return gimp_procedure_get_return_values (procedure, success,
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index d31e1bf..ca01aed 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -172,8 +172,8 @@ gimp_tools_init (Gimp *gimp)
 
     /*  selection tools */
 
-    gimp_foreground_select_tool_register,
 #if 0
+    gimp_foreground_select_tool_register,
     gimp_iscissors_tool_register,
 #endif
     gimp_by_color_select_tool_register,
diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c
index 5f9f5c0..7449948 100644
--- a/app/tools/gimpforegroundselectoptions.c
+++ b/app/tools/gimpforegroundselectoptions.c
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #include "config.h"
 
 #include <gegl.h>
@@ -397,3 +399,5 @@ gimp_foreground_select_options_get_mask_color (GimpForegroundSelectOptions *opti
       break;
     }
 }
+
+#endif
diff --git a/app/tools/gimpforegroundselectoptions.h b/app/tools/gimpforegroundselectoptions.h
index 5423898..ab16de1 100644
--- a/app/tools/gimpforegroundselectoptions.h
+++ b/app/tools/gimpforegroundselectoptions.h
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #ifndef __GIMP_FOREGROUND_SELECT_OPTIONS_H__
 #define __GIMP_FOREGROUND_SELECT_OPTIONS_H__
 
@@ -56,3 +58,5 @@ void        gimp_foreground_select_options_get_mask_color (GimpForegroundSelectO
 
 
 #endif /* __GIMP_FOREGROUND_SELECT_OPTIONS_H__ */
+
+#endif
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 51f12a7..6085a56 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -18,6 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #include "config.h"
 
 #include <string.h>
@@ -886,3 +888,5 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
         }
     }
 }
+
+#endif
diff --git a/app/tools/gimpforegroundselecttool.h b/app/tools/gimpforegroundselecttool.h
index 5c24719..32376e4 100644
--- a/app/tools/gimpforegroundselecttool.h
+++ b/app/tools/gimpforegroundselecttool.h
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #ifndef __GIMP_FOREGROUND_SELECT_TOOL_H__
 #define __GIMP_FOREGROUND_SELECT_TOOL_H__
 
@@ -61,3 +63,5 @@ GType   gimp_foreground_select_tool_get_type (void) G_GNUC_CONST;
 
 
 #endif  /*  __GIMP_FOREGROUND_SELECT_TOOL_H__  */
+
+#endif
diff --git a/app/tools/gimpforegroundselecttoolundo.c b/app/tools/gimpforegroundselecttoolundo.c
index a735f7d..5c72a32 100644
--- a/app/tools/gimpforegroundselecttoolundo.c
+++ b/app/tools/gimpforegroundselecttoolundo.c
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #include "config.h"
 
 #include <gegl.h>
@@ -163,3 +165,5 @@ gimp_foreground_select_tool_undo_free (GimpUndo     *undo,
 
   GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);
 }
+
+#endif
diff --git a/app/tools/gimpforegroundselecttoolundo.h b/app/tools/gimpforegroundselecttoolundo.h
index 50a8996..e4910f4 100644
--- a/app/tools/gimpforegroundselecttoolundo.h
+++ b/app/tools/gimpforegroundselecttoolundo.h
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#if 0
+
 #ifndef __GIMP_FOREGROUND_SELECT_TOOL_UNDO_H__
 #define __GIMP_FOREGROUND_SELECT_TOOL_UNDO_H__
 
@@ -49,3 +51,5 @@ GType   gimp_foreground_select_tool_undo_get_type (void) G_GNUC_CONST;
 
 
 #endif /* __GIMP_FOREGROUND_SELECT_TOOL_UNDO_H__ */
+
+#endif
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index 8e6d243..99768ab 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -534,7 +534,9 @@
         <menuitem action="tools-rect-select" />
         <menuitem action="tools-ellipse-select" />
         <menuitem action="tools-free-select" />
+	<!--
         <menuitem action="tools-foreground-select" />
+	-->
         <menuitem action="tools-fuzzy-select" />
         <menuitem action="tools-by-color-select" />
 	<!--
diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb
index c3ab5dd..0efaba9 100644
--- a/tools/pdbgen/pdb/drawable.pdb
+++ b/tools/pdbgen/pdb/drawable.pdb
@@ -946,10 +946,13 @@ HELP
 	headers => [ qw("core/gimpdrawable-foreground-extract.h") ],
         code    => <<'CODE'
 {
+/*
   if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
     gimp_drawable_foreground_extract (drawable, mode, mask, progress);
   else
     success = FALSE;
+*/
+  success = FALSE;
 }
 CODE
     );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]