[gimp] app: add gegl:newsprint to Filters -> Distorts
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gegl:newsprint to Filters -> Distorts
- Date: Wed, 17 Jul 2019 16:30:58 +0000 (UTC)
commit d718da27a83f88ecb6608bfd202b7224de3278fc
Author: Michael Natterer <mitch gimp org>
Date: Wed Jul 17 18:24:33 2019 +0200
app: add gegl:newsprint to Filters -> Distorts
and add a custom GUI constructor that does nothing special (yet).
app/actions/filters-actions.c | 5 +++
app/propgui/Makefile.am | 2 ++
app/propgui/gimppropgui-newsprint.c | 62 +++++++++++++++++++++++++++++++++++++
app/propgui/gimppropgui-newsprint.h | 35 +++++++++++++++++++++
app/propgui/gimppropgui.c | 3 ++
app/sanity.c | 2 ++
app/tools/gimpgegltool.c | 1 +
app/widgets/gimphelp-ids.h | 1 +
menus/image-menu.xml.in | 1 +
po/POTFILES.in | 1 +
10 files changed, 113 insertions(+)
---
diff --git a/app/actions/filters-actions.c b/app/actions/filters-actions.c
index b45356c9d1..a0bcad12d3 100644
--- a/app/actions/filters-actions.c
+++ b/app/actions/filters-actions.c
@@ -479,6 +479,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:cell-noise",
GIMP_HELP_FILTER_NOISE_CELL },
+ { "filters-newsprint", GIMP_ICON_GEGL,
+ NC_("filters-action", "_Newsprint..."), NULL, NULL,
+ "gegl:newsprint",
+ GIMP_HELP_FILTER_NEWSPRINT },
+
{ "filters-noise-cie-lch", GIMP_ICON_GEGL,
NC_("filters-action", "CIE lch Noise..."), NULL, NULL,
"gegl:noise-cie-lch",
diff --git a/app/propgui/Makefile.am b/app/propgui/Makefile.am
index 059a0b7b0b..419fb203a3 100644
--- a/app/propgui/Makefile.am
+++ b/app/propgui/Makefile.am
@@ -43,6 +43,8 @@ libapppropgui_a_SOURCES = \
gimppropgui-motion-blur-linear.h \
gimppropgui-motion-blur-zoom.c \
gimppropgui-motion-blur-zoom.h \
+ gimppropgui-newsprint.c \
+ gimppropgui-newsprint.h \
gimppropgui-panorama-projection.c \
gimppropgui-panorama-projection.h \
gimppropgui-recursive-transform.c \
diff --git a/app/propgui/gimppropgui-newsprint.c b/app/propgui/gimppropgui-newsprint.c
new file mode 100644
index 0000000000..dfc95f937e
--- /dev/null
+++ b/app/propgui/gimppropgui-newsprint.c
@@ -0,0 +1,62 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
+ *
+ * gimppropgui-newsprint.c
+ * Copyright (C) 2019 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "propgui-types.h"
+
+#include "core/gimpcontext.h"
+
+#include "gimppropgui.h"
+#include "gimppropgui-generic.h"
+#include "gimppropgui-newsprint.h"
+
+#include "gimp-intl.h"
+
+
+GtkWidget *
+_gimp_prop_gui_new_newsprint (GObject *config,
+ GParamSpec **param_specs,
+ guint n_param_specs,
+ GeglRectangle *area,
+ GimpContext *context,
+ GimpCreatePickerFunc create_picker_func,
+ GimpCreateControllerFunc create_controller_func,
+ gpointer creator)
+{
+ g_return_val_if_fail (G_IS_OBJECT (config), NULL);
+ g_return_val_if_fail (param_specs != NULL, NULL);
+ g_return_val_if_fail (n_param_specs > 0, NULL);
+ g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
+
+ return _gimp_prop_gui_new_generic (config,
+ param_specs,
+ n_param_specs,
+ area,
+ context,
+ create_picker_func,
+ create_controller_func,
+ creator);
+}
diff --git a/app/propgui/gimppropgui-newsprint.h b/app/propgui/gimppropgui-newsprint.h
new file mode 100644
index 0000000000..90df485eca
--- /dev/null
+++ b/app/propgui/gimppropgui-newsprint.h
@@ -0,0 +1,35 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
+ *
+ * gimppropgui-newsprint.h
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_PROP_GUI_NEWSPRINT_H__
+#define __GIMP_PROP_GUI_NEWSPRINT_H__
+
+
+GtkWidget *
+_gimp_prop_gui_new_newsprint (GObject *config,
+ GParamSpec **param_specs,
+ guint n_param_specs,
+ GeglRectangle *area,
+ GimpContext *context,
+ GimpCreatePickerFunc create_picker_func,
+ GimpCreateControllerFunc create_controller_func,
+ gpointer creator);
+
+
+#endif /* __GIMP_PROP_GUI_NEWSPRINT_H__ */
diff --git a/app/propgui/gimppropgui.c b/app/propgui/gimppropgui.c
index 877aee9bb2..bc508d9435 100644
--- a/app/propgui/gimppropgui.c
+++ b/app/propgui/gimppropgui.c
@@ -57,6 +57,7 @@
#include "gimppropgui-motion-blur-circular.h"
#include "gimppropgui-motion-blur-linear.h"
#include "gimppropgui-motion-blur-zoom.h"
+#include "gimppropgui-newsprint.h"
#include "gimppropgui-panorama-projection.h"
#include "gimppropgui-recursive-transform.h"
#include "gimppropgui-shadows-highlights.h"
@@ -472,6 +473,8 @@ gui_new_funcs[] =
_gimp_prop_gui_new_motion_blur_linear },
{ "GimpGegl-gegl-motion-blur-zoom-config",
_gimp_prop_gui_new_motion_blur_zoom },
+ { "GimpGegl-gegl-newsprint-config",
+ _gimp_prop_gui_new_newsprint },
{ "GimpGegl-gegl-panorama-projection-config",
_gimp_prop_gui_new_panorama_projection },
{ "GimpGegl-gegl-recursive-transform-config",
diff --git a/app/sanity.c b/app/sanity.c
index 75fcdfb42a..ca2c116837 100644
--- a/app/sanity.c
+++ b/app/sanity.c
@@ -663,9 +663,11 @@ sanity_check_gegl_ops (void)
"gegl:median-blur",
"gegl:mirrors",
"gegl:mono-mixer",
+ "gegl:mosaic",
"gegl:motion-blur-circular",
"gegl:motion-blur-linear",
"gegl:motion-blur-zoom",
+ "gegl:newsprint",
"gegl:noise-cie-lch",
"gegl:noise-hsv",
"gegl:noise-hurl",
diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c
index 2e7b4a1656..c787d5446e 100644
--- a/app/tools/gimpgegltool.c
+++ b/app/tools/gimpgegltool.c
@@ -203,6 +203,7 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
"gegl:motion-blur-circular",
"gegl:motion-blur-linear",
"gegl:motion-blur-zoom",
+ "gegl:newsprint",
"gegl:noise-cie-lch",
"gegl:noise-hsv",
"gegl:noise-hurl",
diff --git a/app/widgets/gimphelp-ids.h b/app/widgets/gimphelp-ids.h
index 6874f5ec94..14daa9c613 100644
--- a/app/widgets/gimphelp-ids.h
+++ b/app/widgets/gimphelp-ids.h
@@ -402,6 +402,7 @@
#define GIMP_HELP_FILTER_MOTION_BLUR_CIRCULAR "gimp-filter-motion-blur-circular"
#define GIMP_HELP_FILTER_MOTION_BLUR_LINEAR "gimp-filter-motion-blur-linear"
#define GIMP_HELP_FILTER_MOTION_BLUR_ZOOM "gimp-filter-motion-blur-zoom"
+#define GIMP_HELP_FILTER_NEWSPRINT "gimp-filter-newsprint"
#define GIMP_HELP_FILTER_NOISE_CELL "gimp-filter-noise-cell"
#define GIMP_HELP_FILTER_NOISE_CIE_LCH "gimp-filter-noise-cie-lch"
#define GIMP_HELP_FILTER_NOISE_HSV "gimp-filter-noise-hsv"
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index c559d9e52a..3a1fcb8362 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -720,6 +720,7 @@
<menuitem action="filters-lens-distortion" />
<menuitem action="filters-kaleidoscope" />
<menuitem action="filters-mosaic" />
+ <menuitem action="filters-newsprint" />
<menuitem action="filters-polar-coordinates" />
<menuitem action="filters-ripple" />
<menuitem action="filters-shift" />
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cf39510431..9906e616f5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -395,6 +395,7 @@ app/propgui/gimppropgui-hue-saturation.c
app/propgui/gimppropgui-motion-blur-circular.c
app/propgui/gimppropgui-motion-blur-linear.c
app/propgui/gimppropgui-motion-blur-zoom.c
+app/propgui/gimppropgui-newsprint.c
app/propgui/gimppropgui-panorama-projection.c
app/propgui/gimppropgui-recursive-transform.c
app/propgui/gimppropgui-shadows-highlights.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]