[gimp] configure.ac, app: make libmypaint a hard dependency
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] configure.ac, app: make libmypaint a hard dependency
- Date: Mon, 21 Dec 2015 20:40:33 +0000 (UTC)
commit d01ba07ed62eeccd237ffc560573d15c27e7efb1
Author: Michael Natterer <mitch gimp org>
Date: Mon Dec 21 21:39:48 2015 +0100
configure.ac, app: make libmypaint a hard dependency
and move the MyPaint brush tool out of the playground.
app/actions/tools-actions.c | 15 ++++-----------
app/actions/tools-commands.c | 2 --
app/actions/tools-commands.h | 2 --
app/config/gimpguiconfig.c | 14 --------------
app/config/gimpguiconfig.h | 1 -
app/core/gimpmybrush.c | 6 ------
app/dialogs/preferences-dialog.c | 18 ------------------
app/paint/gimp-paint.c | 2 --
app/paint/gimpmybrushcore.c | 19 ++++++-------------
app/paint/gimpmybrushsurface.c | 15 ++++++++-------
app/paint/gimpmybrushsurface.h | 6 ------
app/tools/gimp-tools.c | 4 ----
app/tools/gimpmybrushtool.c | 36 +++++++++++++++---------------------
app/tools/gimppaintoptions-gui.c | 11 ++---------
configure.ac | 18 ++----------------
menus/image-menu.xml.in | 2 --
16 files changed, 37 insertions(+), 134 deletions(-)
---
diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c
index 3b15985..76a7cf6 100644
--- a/app/actions/tools-actions.c
+++ b/app/actions/tools-actions.c
@@ -26,8 +26,6 @@
#include "actions-types.h"
-#include "config/gimpguiconfig.h" /* playground */
-
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
@@ -187,7 +185,6 @@ static const GimpEnumActionEntry tools_airbrush_flow_actions[] =
NULL }
};
-#ifdef HAVE_LIBMYPAINT
static const GimpEnumActionEntry tools_mybrush_radius_actions[] =
{
{ "tools-mybrush-radius-set", GIMP_STOCK_TOOL_MYPAINT_BRUSH,
@@ -195,7 +192,6 @@ static const GimpEnumActionEntry tools_mybrush_radius_actions[] =
GIMP_ACTION_SELECT_SET, TRUE,
NULL }
};
-#endif
static const GimpEnumActionEntry tools_foreground_select_brush_size_actions[] =
{
@@ -509,13 +505,10 @@ tools_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (tools_airbrush_flow_actions),
G_CALLBACK (tools_airbrush_flow_cmd_callback));
-#ifdef HAVE_LIBMYPAINT
- if (GIMP_GUI_CONFIG (group->gimp->config)->playground_mybrush_tool)
- gimp_action_group_add_enum_actions (group, NULL,
- tools_mybrush_radius_actions,
- G_N_ELEMENTS (tools_mybrush_radius_actions),
- G_CALLBACK (tools_mybrush_radius_cmd_callback));
-#endif
+ gimp_action_group_add_enum_actions (group, NULL,
+ tools_mybrush_radius_actions,
+ G_N_ELEMENTS (tools_mybrush_radius_actions),
+ G_CALLBACK (tools_mybrush_radius_cmd_callback));
gimp_action_group_add_enum_actions (group, NULL,
tools_foreground_select_brush_size_actions,
diff --git a/app/actions/tools-commands.c b/app/actions/tools-commands.c
index d629ee7..1232c5c 100644
--- a/app/actions/tools-commands.c
+++ b/app/actions/tools-commands.c
@@ -294,7 +294,6 @@ tools_airbrush_flow_cmd_callback (GtkAction *action,
}
}
-#ifdef HAVE_LIBMYPAINT
void
tools_mybrush_radius_cmd_callback (GtkAction *action,
gint value,
@@ -315,7 +314,6 @@ tools_mybrush_radius_cmd_callback (GtkAction *action,
0.1, 0.1, 0.5, 1.0, FALSE);
}
}
-#endif
void
tools_fg_select_brush_size_cmd_callback (GtkAction *action,
diff --git a/app/actions/tools-commands.h b/app/actions/tools-commands.h
index ff5b7e3..24c2de5 100644
--- a/app/actions/tools-commands.h
+++ b/app/actions/tools-commands.h
@@ -54,11 +54,9 @@ void tools_airbrush_flow_cmd_callback (GtkAction *action,
gint value,
gpointer data);
-#ifdef HAVE_LIBMYPAINT
void tools_mybrush_radius_cmd_callback (GtkAction *action,
gint value,
gpointer data);
-#endif
void tools_fg_select_brush_size_cmd_callback (GtkAction *action,
gint value,
diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c
index c11f6b4..c087813 100644
--- a/app/config/gimpguiconfig.c
+++ b/app/config/gimpguiconfig.c
@@ -85,7 +85,6 @@ enum
PROP_PLAYGROUND_NPD_TOOL,
PROP_PLAYGROUND_HANDLE_TRANSFORM_TOOL,
- PROP_PLAYGROUND_MYBRUSH_TOOL,
PROP_PLAYGROUND_SEAMLESS_CLONE_TOOL,
PROP_HIDE_DOCKS,
@@ -305,13 +304,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class,
- PROP_PLAYGROUND_MYBRUSH_TOOL,
- "playground-mybrush-tool",
- PLAYGROUND_MYBRUSH_TOOL_BLURB,
- FALSE,
- GIMP_PARAM_STATIC_STRINGS |
- GIMP_CONFIG_PARAM_RESTART);
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class,
PROP_PLAYGROUND_SEAMLESS_CLONE_TOOL,
"playground-seamless-clone-tool",
PLAYGROUND_SEAMLESS_CLONE_TOOL_BLURB,
@@ -539,9 +531,6 @@ gimp_gui_config_set_property (GObject *object,
case PROP_PLAYGROUND_HANDLE_TRANSFORM_TOOL:
gui_config->playground_handle_transform_tool = g_value_get_boolean (value);
break;
- case PROP_PLAYGROUND_MYBRUSH_TOOL:
- gui_config->playground_mybrush_tool = g_value_get_boolean (value);
- break;
case PROP_PLAYGROUND_SEAMLESS_CLONE_TOOL:
gui_config->playground_seamless_clone_tool = g_value_get_boolean (value);
break;
@@ -692,9 +681,6 @@ gimp_gui_config_get_property (GObject *object,
case PROP_PLAYGROUND_HANDLE_TRANSFORM_TOOL:
g_value_set_boolean (value, gui_config->playground_handle_transform_tool);
break;
- case PROP_PLAYGROUND_MYBRUSH_TOOL:
- g_value_set_boolean (value, gui_config->playground_mybrush_tool);
- break;
case PROP_PLAYGROUND_SEAMLESS_CLONE_TOOL:
g_value_set_boolean (value, gui_config->playground_seamless_clone_tool);
break;
diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h
index 642025d..f5372d2 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -78,7 +78,6 @@ struct _GimpGuiConfig
/* experimental playground */
gboolean playground_npd_tool;
gboolean playground_handle_transform_tool;
- gboolean playground_mybrush_tool;
gboolean playground_seamless_clone_tool;
/* saved in sessionrc */
diff --git a/app/core/gimpmybrush.c b/app/core/gimpmybrush.c
index 04c0c62..cf0d1fc 100644
--- a/app/core/gimpmybrush.c
+++ b/app/core/gimpmybrush.c
@@ -21,9 +21,7 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gegl.h>
-#ifdef HAVE_LIBMYPAINT
#include <mypaint-brush.h>
-#endif
#include "core-types.h"
@@ -243,8 +241,6 @@ gimp_mybrush_get_standard (GimpContext *context)
static void
gimp_mybrush_load_json (GimpMybrush *brush)
{
-#ifdef HAVE_LIBMYPAINT
-
GFile *file = gimp_data_get_file (GIMP_DATA (brush));
MyPaintBrush *mypaint_brush = mypaint_brush_new ();
@@ -284,8 +280,6 @@ gimp_mybrush_load_json (GimpMybrush *brush)
mypaint_brush_unref (mypaint_brush);
-#endif
-
brush->priv->json_loaded = TRUE;
}
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index e9efbcb..5483027 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -1313,7 +1313,6 @@ prefs_dialog_new (Gimp *gimp,
GObject *object;
GimpCoreConfig *core_config;
GimpDisplayConfig *display_config;
- GimpGuiConfig *gui_config;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_CONFIG (config), NULL);
@@ -1321,7 +1320,6 @@ prefs_dialog_new (Gimp *gimp,
object = G_OBJECT (config);
core_config = GIMP_CORE_CONFIG (config);
display_config = GIMP_DISPLAY_CONFIG (config);
- gui_config = GIMP_GUI_CONFIG (config);
dialog = gimp_dialog_new (_("Preferences"), "gimp-preferences",
NULL, 0,
@@ -1600,12 +1598,6 @@ prefs_dialog_new (Gimp *gimp,
button = prefs_check_button_add (object, "playground-handle-transform-tool",
_("_Handle Transform tool"),
GTK_BOX (vbox2));
-#ifdef HAVE_LIBMYPAINT
- button = prefs_check_button_add (object, "playground-mybrush-tool",
- _("_MyPaint Brush tool"),
- GTK_BOX (vbox2));
-#endif
-
button = prefs_check_button_add (object, "playground-seamless-clone-tool",
_("_Seamless Clone tool"),
GTK_BOX (vbox2));
@@ -2755,12 +2747,10 @@ prefs_dialog_new (Gimp *gimp,
GIMP_HELP_PREFS_FOLDERS_TOOL_PRESETS,
N_("Select Tool Preset Folders"),
"tool-preset-path", "tool-preset-path-writable" },
-#ifdef HAVE_LIBMYPAINT
{ N_("MyPaint Brushes"), N_("MyPaint Brush Folders"), "folders-mypaint-brushes",
GIMP_HELP_PREFS_FOLDERS_MYPAINT_BRUSHES,
N_("Select MyPaint Brush Folders"),
"mypaint-brush-path", "mypaint-brush-path-writable" },
-#endif
{ N_("Plug-Ins"), N_("Plug-In Folders"), "folders-plug-ins",
GIMP_HELP_PREFS_FOLDERS_PLUG_INS,
N_("Select Plug-In Folders"),
@@ -2796,14 +2786,6 @@ prefs_dialog_new (Gimp *gimp,
GtkWidget *editor;
gchar *icon_name;
-#ifdef HAVE_LIBMYPAINT
- if (! gui_config->playground_mybrush_tool &&
- ! strcmp (paths[i].path_property_name, "mypaint-brush-path"))
- {
- continue;
- }
-#endif
-
icon_name = g_strconcat ("gimp-prefs-", paths[i].icon, NULL);
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
icon_name,
diff --git a/app/paint/gimp-paint.c b/app/paint/gimp-paint.c
index 5d1dc3a..deab18a 100644
--- a/app/paint/gimp-paint.c
+++ b/app/paint/gimp-paint.c
@@ -65,9 +65,7 @@ gimp_paint_init (Gimp *gimp)
gimp_perspective_clone_register,
gimp_heal_register,
gimp_clone_register,
-#ifdef HAVE_LIBMYPAINT
gimp_mybrush_core_register,
-#endif
gimp_ink_register,
gimp_airbrush_register,
gimp_eraser_register,
diff --git a/app/paint/gimpmybrushcore.c b/app/paint/gimpmybrushcore.c
index 47aeb6e..7238925 100644
--- a/app/paint/gimpmybrushcore.c
+++ b/app/paint/gimpmybrushcore.c
@@ -17,8 +17,6 @@
#include "config.h"
-#ifdef HAVE_LIBMYPAINT
-
#include <string.h>
#include <cairo.h>
@@ -38,8 +36,6 @@
#include "gegl/gimp-gegl-utils.h"
-#include "config/gimpguiconfig.h" /* playground */
-
#include "core/gimp.h"
#include "core/gimp-palettes.h"
#include "core/gimpdrawable.h"
@@ -95,13 +91,12 @@ void
gimp_mybrush_core_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
- if (GIMP_GUI_CONFIG (gimp->config)->playground_mybrush_tool)
- (* callback) (gimp,
- GIMP_TYPE_MYBRUSH_CORE,
- GIMP_TYPE_MYBRUSH_OPTIONS,
- "gimp-mybrush",
- _("Mybrush"),
- "gimp-tool-mypaint-brush");
+ (* callback) (gimp,
+ GIMP_TYPE_MYBRUSH_CORE,
+ GIMP_TYPE_MYBRUSH_OPTIONS,
+ "gimp-mybrush",
+ _("Mybrush"),
+ "gimp-tool-mypaint-brush");
}
static void
@@ -305,5 +300,3 @@ gimp_mybrush_core_motion (GimpPaintCore *paint_core,
gimp_drawable_update (drawable, rect.x, rect.y, rect.width, rect.height);
}
}
-
-#endif
diff --git a/app/paint/gimpmybrushsurface.c b/app/paint/gimpmybrushsurface.c
index 70d3ea5..6c7641c 100644
--- a/app/paint/gimpmybrushsurface.c
+++ b/app/paint/gimpmybrushsurface.c
@@ -15,15 +15,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#include "config.h"
-#ifdef HAVE_LIBMYPAINT
-
#include <gegl.h>
-#include "gimpmybrushsurface.h"
+
#include <mypaint-surface.h>
-#include <math.h>
+
+#include "paint-types.h"
+
+#include "libgimpmath/gimpmath.h"
+
+#include "gimpmybrushsurface.h"
+
struct _GimpMybrushSurface
{
@@ -455,5 +458,3 @@ gimp_mypaint_surface_new (GeglBuffer *buffer,
return surface;
}
-
-#endif
\ No newline at end of file
diff --git a/app/paint/gimpmybrushsurface.h b/app/paint/gimpmybrushsurface.h
index 124fbbc..42f0736 100644
--- a/app/paint/gimpmybrushsurface.h
+++ b/app/paint/gimpmybrushsurface.h
@@ -15,13 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_LIBMYPAINT
-
#ifndef __GIMP_MYBRUSH_SURFACE_H__
#define __GIMP_MYBRUSH_SURFACE_H__
-#include "paint-types.h"
-#include "core/gimpobject.h"
typedef struct _GimpMybrushSurface GimpMybrushSurface;
@@ -31,5 +27,3 @@ gimp_mypaint_surface_new (GeglBuffer *buffer,
#endif /* __GIMP_MYBRUSH_SURFACE_H__ */
-
-#endif
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index 87b885a..a96188f 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -145,9 +145,7 @@ gimp_tools_init (Gimp *gimp)
gimp_perspective_clone_tool_register,
gimp_heal_tool_register,
gimp_clone_tool_register,
-#ifdef HAVE_LIBMYPAINT
gimp_mybrush_tool_register,
-#endif
gimp_ink_tool_register,
gimp_airbrush_tool_register,
gimp_eraser_tool_register,
@@ -550,12 +548,10 @@ gimp_tools_register (GType tool_type,
{
paint_core_name = "gimp-ink";
}
-#ifdef HAVE_LIBMYPAINT
else if (tool_type == GIMP_TYPE_MYBRUSH_TOOL)
{
paint_core_name = "gimp-mybrush";
}
-#endif
else
{
paint_core_name = "gimp-paintbrush";
diff --git a/app/tools/gimpmybrushtool.c b/app/tools/gimpmybrushtool.c
index 34ce335..f94ec13 100644
--- a/app/tools/gimpmybrushtool.c
+++ b/app/tools/gimpmybrushtool.c
@@ -25,8 +25,6 @@
#include "tools-types.h"
-#include "config/gimpguiconfig.h" /* playground */
-
#include "paint/gimpmybrushoptions.h"
#include "core/gimp.h"
@@ -59,25 +57,21 @@ void
gimp_mybrush_tool_register (GimpToolRegisterCallback callback,
gpointer data)
{
- /* we should not know that "data" is a Gimp*, but what the heck this
- * is experimental playground stuff
- */
- if (GIMP_GUI_CONFIG (GIMP (data)->config)->playground_mybrush_tool)
- (* callback) (GIMP_TYPE_MYBRUSH_TOOL,
- GIMP_TYPE_MYBRUSH_OPTIONS,
- gimp_mybrush_options_gui,
- GIMP_CONTEXT_PROP_MASK_FOREGROUND |
- GIMP_CONTEXT_PROP_MASK_BACKGROUND |
- GIMP_CONTEXT_PROP_MASK_OPACITY |
- GIMP_CONTEXT_PROP_MASK_PAINT_MODE |
- GIMP_CONTEXT_PROP_MASK_MYBRUSH,
- "gimp-mybrush-tool",
- _("MyPaint Brush"),
- _("MyPaint Brush Tool: Use MyPaint brushes in GIMP"),
- N_("M_yPaint Brush"), "Y",
- NULL, GIMP_HELP_TOOL_MYPAINT_BRUSH,
- GIMP_STOCK_TOOL_MYPAINT_BRUSH,
- data);
+ (* callback) (GIMP_TYPE_MYBRUSH_TOOL,
+ GIMP_TYPE_MYBRUSH_OPTIONS,
+ gimp_mybrush_options_gui,
+ GIMP_CONTEXT_PROP_MASK_FOREGROUND |
+ GIMP_CONTEXT_PROP_MASK_BACKGROUND |
+ GIMP_CONTEXT_PROP_MASK_OPACITY |
+ GIMP_CONTEXT_PROP_MASK_PAINT_MODE |
+ GIMP_CONTEXT_PROP_MASK_MYBRUSH,
+ "gimp-mybrush-tool",
+ _("MyPaint Brush"),
+ _("MyPaint Brush Tool: Use MyPaint brushes in GIMP"),
+ N_("M_yPaint Brush"), "Y",
+ NULL, GIMP_HELP_TOOL_MYPAINT_BRUSH,
+ GIMP_STOCK_TOOL_MYPAINT_BRUSH,
+ data);
}
static void
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index be3d546..cc97360 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -41,9 +41,7 @@
#include "gimperasertool.h"
#include "gimphealtool.h"
#include "gimpinktool.h"
-#ifdef HAVE_LIBMYPAINT
#include "gimpmybrushtool.h"
-#endif
#include "gimppaintoptions-gui.h"
#include "gimppenciltool.h"
#include "gimpperspectiveclonetool.h"
@@ -118,9 +116,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
tool_type == GIMP_TYPE_CONVOLVE_TOOL ||
tool_type == GIMP_TYPE_DODGE_BURN_TOOL ||
tool_type == GIMP_TYPE_HEAL_TOOL ||
-#ifdef HAVE_LIBMYPAINT
tool_type == GIMP_TYPE_MYBRUSH_TOOL ||
-#endif
tool_type == GIMP_TYPE_SMUDGE_TOOL)
{
gtk_widget_set_sensitive (menu, FALSE);
@@ -135,11 +131,8 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (scale);
/* temp debug foo */
- if (g_type_is_a (tool_type, GIMP_TYPE_PAINT_TOOL)
-#ifdef HAVE_LIBMYPAINT
- && tool_type != GIMP_TYPE_MYBRUSH_TOOL
-#endif
- )
+ if (g_type_is_a (tool_type, GIMP_TYPE_PAINT_TOOL) &&
+ tool_type != GIMP_TYPE_MYBRUSH_TOOL)
{
GtkWidget *button;
diff --git a/configure.ac b/configure.ac
index bdbf535..d0aadc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1475,25 +1475,12 @@ AC_SUBST(FILE_EXR)
AM_CONDITIONAL(HAVE_OPENEXR, test "x$have_openexr" = xyes)
+
######################
# Check for libmypaint
######################
-AC_ARG_WITH(libmypaint, [ --without-libmypaint build without libmypaint support])
-
-have_libmypaint=no
-if test "x$with_libmypaint" != xno; then
- PKG_CHECK_MODULES(LIBMYPAINTGEGL,
- libmypaint-gegl >= libmypaint_required_version,
- AC_DEFINE(HAVE_LIBMYPAINT, 1, [Define to 1 if libmypaint-gegl is available])
- have_libmypaint=yes,
- [have_libmypaint="no (libmypaint-gegl not found)"])
-fi
-
-AC_SUBST(LIBMYPAINTGEGL_CFLAGS)
-AC_SUBST(LIBMYPAINTGEGL_LIBS)
-
-AM_CONDITIONAL(HAVE_LIBMYPAINT, test "x$have_libmypaint" = xyes)
+PKG_CHECK_MODULES(LIBMYPAINTGEGL, libmypaint-gegl >= libmypaint_required_version)
##################
@@ -2448,7 +2435,6 @@ Extra Binaries:
Optional Features:
Language selection: $have_iso_codes
- MyPaint brushes: $have_libmypaint
Optional Plug-Ins:
Ascii Art: $have_libaa
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index 7c2c4af..2cf4c26 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -592,9 +592,7 @@
<menuitem action="tools-eraser" />
<menuitem action="tools-airbrush" />
<menuitem action="tools-ink" />
- <!-- Enable when the tool leaves the playground
<menuitem action="tools-mybrush" />
- -->
<menuitem action="tools-clone" />
<menuitem action="tools-heal" />
<menuitem action="tools-perspective-clone" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]