RSS/Atom feed Twitter
Site is read-only, email is disabled

[PATCH] app: Get rid of config -> display module dependency

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

[PATCH] app: Get rid of config -> display module dependency Martin Nordholts 31 Jan 18:25
  [PATCH] app: Get rid of config -> display module dependency Martin Nordholts 31 Jan 18:27
   [PATCH] app: Get rid of config -> display module dependency Sven Neumann 01 Feb 20:49
    [PATCH] app: Get rid of config -> display module dependency Martin Nordholts 01 Feb 21:58
  [PATCH] app: Get rid of config -> display module dependency Martin Nordholts 31 Jan 18:31
Martin Nordholts
2010-01-31 18:25:53 UTC (almost 15 years ago)

[PATCH] app: Get rid of config -> display module dependency

Hi,,

Here is the patch that removes the config -> display dependency, as discussed in this thread:
http://lists.xcf.berkeley.edu/lists/gimp-developer/2010-January/023955.html

/ Martin

Martin Nordholts
2010-01-31 18:27:42 UTC (almost 15 years ago)

[PATCH] app: Get rid of config -> display module dependency

In order to make a clear separation between the core modules and the UI modules, move the necessary enums from display-enums.h and widgets-enums.h to config-enums.h and the files gimpdisplayoptions.[ch] from the display to the config module. This removes the config -> display dependency.

This change has three main benefits * It lets us remove includes of display files from the config module * We don't have to link gimp-console and test-config with a subset of object files from the display module * It is reflected in devel-docs/gimp-module-dependencies.svg that the application is made up of core modules and UI modules and that no core module depends on any UI module ---
app/Makefile.am | 3 - app/actions/view-actions.c | 2 +- app/actions/view-commands.c | 2 +- app/config/Makefile.am | 38 ++- app/config/config-enums.c | 226 +++++++++++ app/config/config-enums.h | 105 +++++ app/config/config-types.h | 7 +- app/config/gimpdisplayconfig.c | 9 +- app/config/gimpdisplayconfig.h | 2 - app/config/gimpdisplayoptions.c | 350 ++++++++++++++++ app/config/gimpdisplayoptions.h | 72 ++++ app/config/gimpguiconfig.h | 2 - app/config/gimppluginconfig.h | 2 - app/core/core-types.h | 3 - app/display/Makefile.am | 2 - app/display/display-enums.c | 124 ------ app/display/display-enums.h | 49 --- app/display/gimpdisplayoptions.c | 351 ---------------- app/display/gimpdisplayoptions.h | 72 ---- app/display/gimpdisplayshell-appearance.c | 3 +- app/display/gimpdisplayshell-handlers.c | 2 +- app/display/gimpdisplayshell.c | 2 +- app/widgets/widgets-enums.c | 89 ---- app/widgets/widgets-enums.h | 34 -- devel-docs/gimp-module-dependencies.svg | 618 +++++++++++++++-------------- 25 files changed, 1113 insertions(+), 1056 deletions(-) create mode 100644 app/config/config-enums.c create mode 100644 app/config/config-enums.h create mode 100644 app/config/gimpdisplayoptions.c create mode 100644 app/config/gimpdisplayoptions.h delete mode 100644 app/display/gimpdisplayoptions.c delete mode 100644 app/display/gimpdisplayoptions.h

diff --git a/app/Makefile.am b/app/Makefile.am index 3654e79..dd5ef21 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -142,9 +142,6 @@ AM_LDFLAGS = \
$(workaround_that_file_depends_on_plug_in)
gimpconsoleldadd = \
- display/gimpdisplayoptions.o \
- display/display-enums.o \
- widgets/widgets-enums.o \
xcf/libappxcf.a \
pdb/libappinternal-procs.a \
pdb/libapppdb.a \
diff --git a/app/actions/view-actions.c b/app/actions/view-actions.c index d83312b..b245653 100644
--- a/app/actions/view-actions.c
+++ b/app/actions/view-actions.c
@@ -26,6 +26,7 @@

#include "actions-types.h"

+#include "config/gimpdisplayoptions.h" #include "config/gimpguiconfig.h"

#include "core/gimp.h"
@@ -39,7 +40,6 @@
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
-#include "display/gimpdisplayoptions.h" #include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell-appearance.h" #include "display/gimpdisplayshell-scale.h" diff --git a/app/actions/view-commands.c b/app/actions/view-commands.c index cacdd16..ace7806 100644
--- a/app/actions/view-commands.c
+++ b/app/actions/view-commands.c
@@ -25,6 +25,7 @@

#include "actions-types.h"

+#include "config/gimpdisplayoptions.h" #include "config/gimpguiconfig.h"

#include "core/gimp.h"
@@ -35,7 +36,6 @@

#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h" -#include "display/gimpdisplayoptions.h" #include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell-appearance.h" #include "display/gimpdisplayshell-filter-dialog.h" diff --git a/app/config/Makefile.am b/app/config/Makefile.am index c3ad7c5..968c37c 100644
--- a/app/config/Makefile.am
+++ b/app/config/Makefile.am
@@ -21,7 +21,8 @@ INCLUDES = \

noinst_LIBRARIES = libappconfig.a

-libappconfig_a_SOURCES = \
+libappconfig_a_sources = \
+ config-enums.h \
config-types.h \
gimpconfig-dump.c \
gimpconfig-dump.h \
@@ -35,6 +36,8 @@ libappconfig_a_SOURCES = \ gimpcoreconfig.h \
gimpdisplayconfig.c \
gimpdisplayconfig.h \
+ gimpdisplayoptions.c \
+ gimpdisplayoptions.h \
gimpguiconfig.c \
gimpguiconfig.h \
gimppluginconfig.c \
@@ -51,6 +54,14 @@ libappconfig_a_SOURCES = \ gimpxmlparser.c \
gimpxmlparser.h

+libappconfig_a_built_sources = \
+ config-enums.c
+
+libappconfig_a_SOURCES = \
+ $(libappconfig_a_built_sources) \
+ $(libappconfig_a_sources)
+
+
EXTRA_PROGRAMS = test-config

EXTRA_DIST = makefile.msc
@@ -77,9 +88,6 @@ test_config_LDFLAGS = \ -u $(SYMPREFIX)gimp_image_map_config_get_type
test_config_LDADD = \
- ../display/gimpdisplayoptions.o \ - ../display/display-enums.o \
- ../widgets/widgets-enums.o \
../xcf/libappxcf.a \
../pdb/libappinternal-procs.a \
../pdb/libapppdb.a \
@@ -107,3 +115,25 @@ test_config_LDADD = \ $(GLIB_LIBS)

CLEANFILES = $(EXTRA_PROGRAMS) foorc +
+#
+# rules to generate built sources
+#
+# setup autogeneration dependencies +gen_sources = xgen-dec
+CLEANFILES += $(gen_sources)
+
+config-enums.c: $(srcdir)/config-enums.h $(GIMP_MKENUMS) + $(GIMP_MKENUMS) \
+ --fhead "#include \"config.h\"\n#include \n#include \"libgimpbase/gimpbase.h\"\n#include \"config-enums.h\"\n#include\"gimp-intl.h\"" \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n" \ + --dhead " static const Gimp@Type@Desc descs[] =\n {" \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ + $(srcdir)/config-enums.h > xgen-dec \ + && cp xgen-dec $(@F) \
+ && rm -f xgen-dec
+
diff --git a/app/config/config-enums.c b/app/config/config-enums.c new file mode 100644
index 0000000..4844f87
--- /dev/null
+++ b/app/config/config-enums.c
@@ -0,0 +1,226 @@
+
+/* Generated data (by gimp-mkenums) */ +
+#include "config.h"
+#include
+#include "libgimpbase/gimpbase.h"
+#include "config-enums.h"
+#include"gimp-intl.h"
+
+/* enumerations from "./config-enums.h" */ +GType
+gimp_cursor_mode_get_type (void)
+{
+ static const GEnumValue values[] = + {
+ { GIMP_CURSOR_MODE_TOOL_ICON, "GIMP_CURSOR_MODE_TOOL_ICON", "tool-icon" }, + { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, "GIMP_CURSOR_MODE_TOOL_CROSSHAIR", "tool-crosshair" }, + { GIMP_CURSOR_MODE_CROSSHAIR, "GIMP_CURSOR_MODE_CROSSHAIR", "crosshair" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_CURSOR_MODE_TOOL_ICON, NC_("cursor-mode", "Tool icon"), NULL }, + { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, NC_("cursor-mode", "Tool icon with crosshair"), NULL }, + { GIMP_CURSOR_MODE_CROSSHAIR, NC_("cursor-mode", "Crosshair only"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpCursorMode", values); + gimp_type_set_translation_context (type, "cursor-mode"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_canvas_padding_mode_get_type (void) +{
+ static const GEnumValue values[] = + {
+ { GIMP_CANVAS_PADDING_MODE_DEFAULT, "GIMP_CANVAS_PADDING_MODE_DEFAULT", "default" }, + { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, "GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK", "light-check" }, + { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, "GIMP_CANVAS_PADDING_MODE_DARK_CHECK", "dark-check" }, + { GIMP_CANVAS_PADDING_MODE_CUSTOM, "GIMP_CANVAS_PADDING_MODE_CUSTOM", "custom" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_CANVAS_PADDING_MODE_DEFAULT, NC_("canvas-padding-mode", "From theme"), NULL }, + { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, NC_("canvas-padding-mode", "Light check color"), NULL }, + { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, NC_("canvas-padding-mode", "Dark check color"), NULL }, + { GIMP_CANVAS_PADDING_MODE_CUSTOM, NC_("canvas-padding-mode", "Custom color"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpCanvasPaddingMode", values); + gimp_type_set_translation_context (type, "canvas-padding-mode"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_space_bar_action_get_type (void) +{
+ static const GEnumValue values[] = + {
+ { GIMP_SPACE_BAR_ACTION_NONE, "GIMP_SPACE_BAR_ACTION_NONE", "none" }, + { GIMP_SPACE_BAR_ACTION_PAN, "GIMP_SPACE_BAR_ACTION_PAN", "pan" }, + { GIMP_SPACE_BAR_ACTION_MOVE, "GIMP_SPACE_BAR_ACTION_MOVE", "move" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_SPACE_BAR_ACTION_NONE, NC_("space-bar-action", "No action"), NULL }, + { GIMP_SPACE_BAR_ACTION_PAN, NC_("space-bar-action", "Pan view"), NULL }, + { GIMP_SPACE_BAR_ACTION_MOVE, NC_("space-bar-action", "Switch to Move tool"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpSpaceBarAction", values); + gimp_type_set_translation_context (type, "space-bar-action"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_zoom_quality_get_type (void)
+{
+ static const GEnumValue values[] = + {
+ { GIMP_ZOOM_QUALITY_LOW, "GIMP_ZOOM_QUALITY_LOW", "low" }, + { GIMP_ZOOM_QUALITY_HIGH, "GIMP_ZOOM_QUALITY_HIGH", "high" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_ZOOM_QUALITY_LOW, NC_("zoom-quality", "Low"), NULL }, + { GIMP_ZOOM_QUALITY_HIGH, NC_("zoom-quality", "High"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpZoomQuality", values); + gimp_type_set_translation_context (type, "zoom-quality"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_help_browser_type_get_type (void) +{
+ static const GEnumValue values[] = + {
+ { GIMP_HELP_BROWSER_GIMP, "GIMP_HELP_BROWSER_GIMP", "gimp" }, + { GIMP_HELP_BROWSER_WEB_BROWSER, "GIMP_HELP_BROWSER_WEB_BROWSER", "web-browser" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_HELP_BROWSER_GIMP, NC_("help-browser-type", "GIMP help browser"), NULL }, + { GIMP_HELP_BROWSER_WEB_BROWSER, NC_("help-browser-type", "Web browser"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpHelpBrowserType", values); + gimp_type_set_translation_context (type, "help-browser-type"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_window_hint_get_type (void)
+{
+ static const GEnumValue values[] = + {
+ { GIMP_WINDOW_HINT_NORMAL, "GIMP_WINDOW_HINT_NORMAL", "normal" }, + { GIMP_WINDOW_HINT_UTILITY, "GIMP_WINDOW_HINT_UTILITY", "utility" }, + { GIMP_WINDOW_HINT_KEEP_ABOVE, "GIMP_WINDOW_HINT_KEEP_ABOVE", "keep-above" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_WINDOW_HINT_NORMAL, NC_("window-hint", "Normal window"), NULL }, + { GIMP_WINDOW_HINT_UTILITY, NC_("window-hint", "Utility window"), NULL }, + { GIMP_WINDOW_HINT_KEEP_ABOVE, NC_("window-hint", "Keep above"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpWindowHint", values); + gimp_type_set_translation_context (type, "window-hint"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+GType
+gimp_cursor_format_get_type (void)
+{
+ static const GEnumValue values[] = + {
+ { GIMP_CURSOR_FORMAT_BITMAP, "GIMP_CURSOR_FORMAT_BITMAP", "bitmap" }, + { GIMP_CURSOR_FORMAT_PIXBUF, "GIMP_CURSOR_FORMAT_PIXBUF", "pixbuf" }, + { 0, NULL, NULL }
+ };
+
+ static const GimpEnumDesc descs[] = + {
+ { GIMP_CURSOR_FORMAT_BITMAP, NC_("cursor-format", "Black & white"), NULL }, + { GIMP_CURSOR_FORMAT_PIXBUF, NC_("cursor-format", "Fancy"), NULL }, + { 0, NULL, NULL }
+ };
+
+ static GType type = 0;
+
+ if (G_UNLIKELY (! type))
+ {
+ type = g_enum_register_static ("GimpCursorFormat", values); + gimp_type_set_translation_context (type, "cursor-format"); + gimp_enum_set_value_descriptions (type, descs); + }
+
+ return type;
+}
+
+
+/* Generated data ends here */
+
diff --git a/app/config/config-enums.h b/app/config/config-enums.h new file mode 100644
index 0000000..0bb4778
--- /dev/null
+++ b/app/config/config-enums.h
@@ -0,0 +1,105 @@
+/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + *
+ * 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 . + */
+
+#ifndef __CONFIG_ENUMS_H__
+#define __CONFIG_ENUMS_H__
+
+
+#define GIMP_TYPE_CURSOR_MODE (gimp_cursor_mode_get_type ()) +
+GType gimp_cursor_mode_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_CURSOR_MODE_TOOL_ICON, /*< desc="Tool icon" >*/ + GIMP_CURSOR_MODE_TOOL_CROSSHAIR, /*< desc="Tool icon with crosshair" >*/ + GIMP_CURSOR_MODE_CROSSHAIR /*< desc="Crosshair only" >*/ +} GimpCursorMode;
+
+
+#define GIMP_TYPE_CANVAS_PADDING_MODE (gimp_canvas_padding_mode_get_type ()) +
+GType gimp_canvas_padding_mode_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_CANVAS_PADDING_MODE_DEFAULT, /*< desc="From theme" >*/ + GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, /*< desc="Light check color" >*/ + GIMP_CANVAS_PADDING_MODE_DARK_CHECK, /*< desc="Dark check color" >*/ + GIMP_CANVAS_PADDING_MODE_CUSTOM, /*< desc="Custom color" >*/ + GIMP_CANVAS_PADDING_MODE_RESET = -1 /*< skip >*/ +} GimpCanvasPaddingMode;
+
+
+#define GIMP_TYPE_SPACE_BAR_ACTION (gimp_space_bar_action_get_type ()) +
+GType gimp_space_bar_action_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_SPACE_BAR_ACTION_NONE, /*< desc="No action" >*/ + GIMP_SPACE_BAR_ACTION_PAN, /*< desc="Pan view" >*/ + GIMP_SPACE_BAR_ACTION_MOVE /*< desc="Switch to Move tool" >*/ +} GimpSpaceBarAction;
+
+
+#define GIMP_TYPE_ZOOM_QUALITY (gimp_zoom_quality_get_type ()) +
+GType gimp_zoom_quality_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_ZOOM_QUALITY_LOW, /*< desc="Low" >*/ + GIMP_ZOOM_QUALITY_HIGH /*< desc="High" >*/ +} GimpZoomQuality;
+
+
+#define GIMP_TYPE_HELP_BROWSER_TYPE (gimp_help_browser_type_get_type ()) +
+GType gimp_help_browser_type_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_HELP_BROWSER_GIMP, /*< desc="GIMP help browser" >*/ + GIMP_HELP_BROWSER_WEB_BROWSER /*< desc="Web browser" >*/ +} GimpHelpBrowserType;
+
+
+#define GIMP_TYPE_WINDOW_HINT (gimp_window_hint_get_type ()) +
+GType gimp_window_hint_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_WINDOW_HINT_NORMAL, /*< desc="Normal window" >*/ + GIMP_WINDOW_HINT_UTILITY, /*< desc="Utility window" >*/ + GIMP_WINDOW_HINT_KEEP_ABOVE /*< desc="Keep above" >*/ +} GimpWindowHint;
+
+
+#define GIMP_TYPE_CURSOR_FORMAT (gimp_cursor_format_get_type ()) +
+GType gimp_cursor_format_get_type (void) G_GNUC_CONST; +
+typedef enum
+{
+ GIMP_CURSOR_FORMAT_BITMAP, /*< desc="Black & white" >*/ + GIMP_CURSOR_FORMAT_PIXBUF /*< desc="Fancy" >*/ +} GimpCursorFormat;
+
+
+#endif /* __CONFIG_ENUMS_H__ */
diff --git a/app/config/config-types.h b/app/config/config-types.h index 97fa63c..eed275d 100644
--- a/app/config/config-types.h
+++ b/app/config/config-types.h
@@ -24,6 +24,12 @@

#include "libgimpconfig/gimpconfigtypes.h"
+#include "config/config-enums.h"
+
+
+#define GIMP_OPACITY_TRANSPARENT 0.0 +#define GIMP_OPACITY_OPAQUE 1.0 +

typedef struct _GimpBaseConfig GimpBaseConfig; typedef struct _GimpCoreConfig GimpCoreConfig; @@ -34,7 +40,6 @@ typedef struct _GimpRc GimpRc;
typedef struct _GimpXmlParser GimpXmlParser;
-/* should be in display/display-types.h */ typedef struct _GimpDisplayOptions GimpDisplayOptions;
/* should be in core/core-types.h */ diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c index e2f0697..5ce6399 100644
--- a/app/config/gimpdisplayconfig.c +++ b/app/config/gimpdisplayconfig.c @@ -28,16 +28,9 @@

#include "config-types.h"

-/* FIXME: If we can get rid of this dependency to the display module, - * we will greatly improve the module dependencies in the core, see - * devel-docs/gimp-module-dependencies.svg. In particular, we will get - * rid of the (transitive) dependency from the core to the UI code - */
-#include "display/display-enums.h"
-#include "display/gimpdisplayoptions.h" -
#include "gimprc-blurbs.h"
#include "gimpdisplayconfig.h"
+#include "gimpdisplayoptions.h"

#include "gimp-intl.h"

diff --git a/app/config/gimpdisplayconfig.h b/app/config/gimpdisplayconfig.h index ca184f4..cfdbdf2 100644
--- a/app/config/gimpdisplayconfig.h +++ b/app/config/gimpdisplayconfig.h @@ -21,8 +21,6 @@
#ifndef __GIMP_DISPLAY_CONFIG_H__
#define __GIMP_DISPLAY_CONFIG_H__

-#include "display/display-enums.h"
-
#include "config/gimpcoreconfig.h"


diff --git a/app/config/gimpdisplayoptions.c b/app/config/gimpdisplayoptions.c new file mode 100644
index 0000000..82eb388
--- /dev/null
+++ b/app/config/gimpdisplayoptions.c @@ -0,0 +1,350 @@
+/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + *
+ * GimpDisplayOptions
+ * Copyright (C) 2003 Sven Neumann + *
+ * 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 . + */
+
+#include "config.h"
+
+#include
+
+#include "libgimpbase/gimpbase.h"
+#include "libgimpmath/gimpmath.h"
+#include "libgimpcolor/gimpcolor.h" +#include "libgimpconfig/gimpconfig.h" +
+#include "config-types.h"
+
+#include "gimprc-blurbs.h"
+
+#include "gimpdisplayoptions.h"
+
+#include "gimp-intl.h"
+
+
+enum
+{
+ PROP_0,
+ PROP_SHOW_MENUBAR,
+ PROP_SHOW_STATUSBAR,
+ PROP_SHOW_RULERS,
+ PROP_SHOW_SCROLLBARS,
+ PROP_SHOW_SELECTION,
+ PROP_SHOW_LAYER_BOUNDARY,
+ PROP_SHOW_GUIDES,
+ PROP_SHOW_GRID,
+ PROP_SHOW_SAMPLE_POINTS,
+ PROP_PADDING_MODE,
+ PROP_PADDING_COLOR
+};
+
+
+static void gimp_display_options_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); +static void gimp_display_options_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +
+
+G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptions, + gimp_display_options, + G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) +
+typedef struct _GimpDisplayOptions GimpDisplayOptionsFullscreen; +typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsFullscreenClass; +
+#define gimp_display_options_fullscreen_init gimp_display_options_init +
+G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptionsFullscreen, + gimp_display_options_fullscreen, + GIMP_TYPE_DISPLAY_OPTIONS, + G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) +
+typedef struct _GimpDisplayOptions GimpDisplayOptionsNoImage; +typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsNoImageClass; +
+#define gimp_display_options_no_image_init gimp_display_options_init +
+G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptionsNoImage, + gimp_display_options_no_image, + GIMP_TYPE_DISPLAY_OPTIONS, + G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) +
+
+static void
+gimp_display_options_class_init (GimpDisplayOptionsClass *klass) +{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass); + GimpRGB white;
+
+ gimp_rgba_set (&white, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE); +
+ object_class->set_property = gimp_display_options_set_property; + object_class->get_property = gimp_display_options_get_property; +
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR, + "show-menubar", SHOW_MENUBAR_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR, + "show-statusbar", SHOW_STATUSBAR_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, + "show-rulers", SHOW_RULERS_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, + "show-scrollbars", SHOW_SCROLLBARS_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, + "show-selection", SHOW_SELECTION_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, + "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, + "show-guides", SHOW_GUIDES_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, + "show-grid", SHOW_GRID_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, + "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, + TRUE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE, + "padding-mode", CANVAS_PADDING_MODE_BLURB, + GIMP_TYPE_CANVAS_PADDING_MODE, + GIMP_CANVAS_PADDING_MODE_DEFAULT, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_PADDING_COLOR, + "padding-color", CANVAS_PADDING_COLOR_BLURB, + FALSE, &white, + GIMP_PARAM_STATIC_STRINGS); +}
+
+static void
+gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *klass) +{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass); + GimpRGB black;
+
+ gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE); +
+ object_class->set_property = gimp_display_options_set_property; + object_class->get_property = gimp_display_options_get_property; +
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR, + "show-menubar", SHOW_MENUBAR_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR, + "show-statusbar", SHOW_STATUSBAR_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, + "show-rulers", SHOW_RULERS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, + "show-scrollbars", SHOW_SCROLLBARS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, + "show-selection", SHOW_SELECTION_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, + "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, + "show-guides", SHOW_GUIDES_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, + "show-grid", SHOW_GRID_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, + "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE, + "padding-mode", CANVAS_PADDING_MODE_BLURB, + GIMP_TYPE_CANVAS_PADDING_MODE, + GIMP_CANVAS_PADDING_MODE_CUSTOM, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_PADDING_COLOR, + "padding-color", CANVAS_PADDING_COLOR_BLURB, + FALSE, &black, + GIMP_PARAM_STATIC_STRINGS); +}
+
+static void
+gimp_display_options_no_image_class_init (GimpDisplayOptionsNoImageClass *klass) +{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass); +
+ object_class->set_property = gimp_display_options_set_property; + object_class->get_property = gimp_display_options_get_property; +
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, + "show-rulers", SHOW_RULERS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, + "show-scrollbars", SHOW_SCROLLBARS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, + "show-selection", SHOW_SELECTION_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, + "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, + "show-guides", SHOW_GUIDES_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, + "show-grid", SHOW_GRID_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, + "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); +}
+
+static void
+gimp_display_options_init (GimpDisplayOptions *options) +{
+ options->padding_mode_set = FALSE; +}
+
+static void
+gimp_display_options_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{
+ GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object); +
+ switch (property_id)
+ {
+ case PROP_SHOW_MENUBAR:
+ options->show_menubar = g_value_get_boolean (value); + break;
+ case PROP_SHOW_STATUSBAR:
+ options->show_statusbar = g_value_get_boolean (value); + break;
+ case PROP_SHOW_RULERS:
+ options->show_rulers = g_value_get_boolean (value); + break;
+ case PROP_SHOW_SCROLLBARS:
+ options->show_scrollbars = g_value_get_boolean (value); + break;
+ case PROP_SHOW_SELECTION:
+ options->show_selection = g_value_get_boolean (value); + break;
+ case PROP_SHOW_LAYER_BOUNDARY:
+ options->show_layer_boundary = g_value_get_boolean (value); + break;
+ case PROP_SHOW_GUIDES:
+ options->show_guides = g_value_get_boolean (value); + break;
+ case PROP_SHOW_GRID:
+ options->show_grid = g_value_get_boolean (value); + break;
+ case PROP_SHOW_SAMPLE_POINTS:
+ options->show_sample_points = g_value_get_boolean (value); + break;
+ case PROP_PADDING_MODE:
+ options->padding_mode = g_value_get_enum (value); + break;
+ case PROP_PADDING_COLOR:
+ options->padding_color = *(GimpRGB *) g_value_get_boxed (value); + break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break;
+ }
+}
+
+static void
+gimp_display_options_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{
+ GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object); +
+ switch (property_id)
+ {
+ case PROP_SHOW_MENUBAR:
+ g_value_set_boolean (value, options->show_menubar); + break;
+ case PROP_SHOW_STATUSBAR:
+ g_value_set_boolean (value, options->show_statusbar); + break;
+ case PROP_SHOW_RULERS:
+ g_value_set_boolean (value, options->show_rulers); + break;
+ case PROP_SHOW_SCROLLBARS:
+ g_value_set_boolean (value, options->show_scrollbars); + break;
+ case PROP_SHOW_SELECTION:
+ g_value_set_boolean (value, options->show_selection); + break;
+ case PROP_SHOW_LAYER_BOUNDARY:
+ g_value_set_boolean (value, options->show_layer_boundary); + break;
+ case PROP_SHOW_GUIDES:
+ g_value_set_boolean (value, options->show_guides); + break;
+ case PROP_SHOW_GRID:
+ g_value_set_boolean (value, options->show_grid); + break;
+ case PROP_SHOW_SAMPLE_POINTS:
+ g_value_set_boolean (value, options->show_sample_points); + break;
+ case PROP_PADDING_MODE:
+ g_value_set_enum (value, options->padding_mode); + break;
+ case PROP_PADDING_COLOR:
+ g_value_set_boxed (value, &options->padding_color); + break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break;
+ }
+}
diff --git a/app/config/gimpdisplayoptions.h b/app/config/gimpdisplayoptions.h new file mode 100644
index 0000000..ef9bd18
--- /dev/null
+++ b/app/config/gimpdisplayoptions.h @@ -0,0 +1,72 @@
+/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + *
+ * GimpDisplayOptions
+ * Copyright (C) 2003 Sven Neumann + *
+ * 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 . + */
+
+#ifndef __GIMP_DISPLAY_OPTIONS_H__
+#define __GIMP_DISPLAY_OPTIONS_H__
+
+
+#define GIMP_TYPE_DISPLAY_OPTIONS (gimp_display_options_get_type ()) +#define GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN (gimp_display_options_fullscreen_get_type ()) +#define GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE (gimp_display_options_no_image_get_type ()) +
+#define GIMP_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptions)) +#define GIMP_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass)) +#define GIMP_IS_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DISPLAY_OPTIONS)) +#define GIMP_IS_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DISPLAY_OPTIONS)) +#define GIMP_DISPLAY_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass)) +
+
+typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsClass; +
+struct _GimpDisplayOptions
+{
+ GObject parent_instance; +
+ /* GimpImageWindow options */
+ gboolean show_menubar; + gboolean show_statusbar; +
+ /* GimpDisplayShell options */
+ gboolean show_rulers; + gboolean show_scrollbars; +
+ /* GimpCanvas options */
+ gboolean show_selection; + gboolean show_layer_boundary; + gboolean show_guides; + gboolean show_grid; + gboolean show_sample_points; + GimpCanvasPaddingMode padding_mode; + GimpRGB padding_color; + gboolean padding_mode_set; +};
+
+struct _GimpDisplayOptionsClass
+{
+ GObjectClass parent_class; +};
+
+
+GType gimp_display_options_get_type (void) G_GNUC_CONST; +GType gimp_display_options_fullscreen_get_type (void) G_GNUC_CONST; +GType gimp_display_options_no_image_get_type (void) G_GNUC_CONST; +
+
+#endif /* __GIMP_DISPLAY_OPTIONS_H__ */ diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h index 6963d74..1e6d7f7 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -21,8 +21,6 @@
#ifndef __GIMP_GUI_CONFIG_H__
#define __GIMP_GUI_CONFIG_H__

-#include "widgets/widgets-enums.h"
-
#include "config/gimpdisplayconfig.h"

diff --git a/app/config/gimppluginconfig.h b/app/config/gimppluginconfig.h index 3f27fd5..bf34fd9 100644
--- a/app/config/gimppluginconfig.h
+++ b/app/config/gimppluginconfig.h
@@ -21,8 +21,6 @@
#ifndef __GIMP_PLUGIN_CONFIG_H__
#define __GIMP_PLUGIN_CONFIG_H__

-#include "widgets/widgets-enums.h"
-
#include "config/gimpguiconfig.h"


diff --git a/app/core/core-types.h b/app/core/core-types.h index 45a1d64..3b645aa 100644
--- a/app/core/core-types.h
+++ b/app/core/core-types.h
@@ -29,9 +29,6 @@

/* defines */

-#define GIMP_OPACITY_TRANSPARENT 0.0 -#define GIMP_OPACITY_OPAQUE 1.0 -
#define GIMP_COORDS_MIN_PRESSURE 0.0 #define GIMP_COORDS_MAX_PRESSURE 1.0 #define GIMP_COORDS_DEFAULT_PRESSURE 1.0 diff --git a/app/display/Makefile.am b/app/display/Makefile.am index 031ec42..987c995 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -23,8 +23,6 @@ libappdisplay_a_sources = \ gimpcursorview.h \
gimpdisplay.c \
gimpdisplay.h \
- gimpdisplayoptions.c \
- gimpdisplayoptions.h \
gimpdisplay-foreach.c \
gimpdisplay-foreach.h \
gimpdisplay-handlers.c \
diff --git a/app/display/display-enums.c b/app/display/display-enums.c index 7e48a1e..0db113e 100644
--- a/app/display/display-enums.c
+++ b/app/display/display-enums.c
@@ -9,37 +9,6 @@

/* enumerations from "./display-enums.h" */ GType
-gimp_cursor_mode_get_type (void)
-{
- static const GEnumValue values[] = - {
- { GIMP_CURSOR_MODE_TOOL_ICON, "GIMP_CURSOR_MODE_TOOL_ICON", "tool-icon" }, - { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, "GIMP_CURSOR_MODE_TOOL_CROSSHAIR", "tool-crosshair" }, - { GIMP_CURSOR_MODE_CROSSHAIR, "GIMP_CURSOR_MODE_CROSSHAIR", "crosshair" }, - { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] = - {
- { GIMP_CURSOR_MODE_TOOL_ICON, NC_("cursor-mode", "Tool icon"), NULL }, - { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, NC_("cursor-mode", "Tool icon with crosshair"), NULL }, - { GIMP_CURSOR_MODE_CROSSHAIR, NC_("cursor-mode", "Crosshair only"), NULL }, - { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpCursorMode", values); - gimp_type_set_translation_context (type, "cursor-mode"); - gimp_enum_set_value_descriptions (type, descs); - }
-
- return type;
-}
-
-GType
gimp_cursor_precision_get_type (void) {
static const GEnumValue values[] = @@ -71,99 +40,6 @@ gimp_cursor_precision_get_type (void) }

GType
-gimp_canvas_padding_mode_get_type (void) -{
- static const GEnumValue values[] = - {
- { GIMP_CANVAS_PADDING_MODE_DEFAULT, "GIMP_CANVAS_PADDING_MODE_DEFAULT", "default" }, - { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, "GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK", "light-check" }, - { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, "GIMP_CANVAS_PADDING_MODE_DARK_CHECK", "dark-check" }, - { GIMP_CANVAS_PADDING_MODE_CUSTOM, "GIMP_CANVAS_PADDING_MODE_CUSTOM", "custom" }, - { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] = - {
- { GIMP_CANVAS_PADDING_MODE_DEFAULT, NC_("canvas-padding-mode", "From theme"), NULL }, - { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, NC_("canvas-padding-mode", "Light check color"), NULL }, - { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, NC_("canvas-padding-mode", "Dark check color"), NULL }, - { GIMP_CANVAS_PADDING_MODE_CUSTOM, NC_("canvas-padding-mode", "Custom color"), NULL }, - { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpCanvasPaddingMode", values); - gimp_type_set_translation_context (type, "canvas-padding-mode"); - gimp_enum_set_value_descriptions (type, descs); - }
-
- return type;
-}
-
-GType
-gimp_space_bar_action_get_type (void) -{
- static const GEnumValue values[] = - {
- { GIMP_SPACE_BAR_ACTION_NONE, "GIMP_SPACE_BAR_ACTION_NONE", "none" }, - { GIMP_SPACE_BAR_ACTION_PAN, "GIMP_SPACE_BAR_ACTION_PAN", "pan" }, - { GIMP_SPACE_BAR_ACTION_MOVE, "GIMP_SPACE_BAR_ACTION_MOVE", "move" }, - { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] = - {
- { GIMP_SPACE_BAR_ACTION_NONE, NC_("space-bar-action", "No action"), NULL }, - { GIMP_SPACE_BAR_ACTION_PAN, NC_("space-bar-action", "Pan view"), NULL }, - { GIMP_SPACE_BAR_ACTION_MOVE, NC_("space-bar-action", "Switch to Move tool"), NULL }, - { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpSpaceBarAction", values); - gimp_type_set_translation_context (type, "space-bar-action"); - gimp_enum_set_value_descriptions (type, descs); - }
-
- return type;
-}
-
-GType
-gimp_zoom_quality_get_type (void)
-{
- static const GEnumValue values[] = - {
- { GIMP_ZOOM_QUALITY_LOW, "GIMP_ZOOM_QUALITY_LOW", "low" }, - { GIMP_ZOOM_QUALITY_HIGH, "GIMP_ZOOM_QUALITY_HIGH", "high" }, - { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] = - {
- { GIMP_ZOOM_QUALITY_LOW, NC_("zoom-quality", "Low"), NULL }, - { GIMP_ZOOM_QUALITY_HIGH, NC_("zoom-quality", "High"), NULL }, - { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpZoomQuality", values); - gimp_type_set_translation_context (type, "zoom-quality"); - gimp_enum_set_value_descriptions (type, descs); - }
-
- return type;
-}
-
-GType
gimp_zoom_focus_get_type (void)
{
static const GEnumValue values[] = diff --git a/app/display/display-enums.h b/app/display/display-enums.h index 9455ace..28a1ae1 100644
--- a/app/display/display-enums.h
+++ b/app/display/display-enums.h
@@ -19,18 +19,6 @@
#define __DISPLAY_ENUMS_H__


-#define GIMP_TYPE_CURSOR_MODE (gimp_cursor_mode_get_type ()) -
-GType gimp_cursor_mode_get_type (void) G_GNUC_CONST; -
-typedef enum
-{
- GIMP_CURSOR_MODE_TOOL_ICON, /*< desc="Tool icon" >*/ - GIMP_CURSOR_MODE_TOOL_CROSSHAIR, /*< desc="Tool icon with crosshair" >*/ - GIMP_CURSOR_MODE_CROSSHAIR /*< desc="Crosshair only" >*/ -} GimpCursorMode;
-
-
#define GIMP_TYPE_CURSOR_PRECISION (gimp_cursor_precision_get_type ())
GType gimp_cursor_precision_get_type (void) G_GNUC_CONST; @@ -43,43 +31,6 @@ typedef enum
} GimpCursorPrecision;


-#define GIMP_TYPE_CANVAS_PADDING_MODE (gimp_canvas_padding_mode_get_type ()) -
-GType gimp_canvas_padding_mode_get_type (void) G_GNUC_CONST; -
-typedef enum
-{
- GIMP_CANVAS_PADDING_MODE_DEFAULT, /*< desc="From theme" >*/ - GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, /*< desc="Light check color" >*/ - GIMP_CANVAS_PADDING_MODE_DARK_CHECK, /*< desc="Dark check color" >*/ - GIMP_CANVAS_PADDING_MODE_CUSTOM, /*< desc="Custom color" >*/ - GIMP_CANVAS_PADDING_MODE_RESET = -1 /*< skip >*/ -} GimpCanvasPaddingMode;
-
-
-#define GIMP_TYPE_SPACE_BAR_ACTION (gimp_space_bar_action_get_type ()) -
-GType gimp_space_bar_action_get_type (void) G_GNUC_CONST; -
-typedef enum
-{
- GIMP_SPACE_BAR_ACTION_NONE, /*< desc="No action" >*/ - GIMP_SPACE_BAR_ACTION_PAN, /*< desc="Pan view" >*/ - GIMP_SPACE_BAR_ACTION_MOVE /*< desc="Switch to Move tool" >*/ -} GimpSpaceBarAction;
-
-
-#define GIMP_TYPE_ZOOM_QUALITY (gimp_zoom_quality_get_type ()) -
-GType gimp_zoom_quality_get_type (void) G_GNUC_CONST; -
-typedef enum
-{
- GIMP_ZOOM_QUALITY_LOW, /*< desc="Low" >*/ - GIMP_ZOOM_QUALITY_HIGH /*< desc="High" >*/ -} GimpZoomQuality;
-
-
#define GIMP_TYPE_ZOOM_FOCUS (gimp_zoom_focus_get_type ())
GType gimp_zoom_focus_get_type (void) G_GNUC_CONST; diff --git a/app/display/gimpdisplayoptions.c b/app/display/gimpdisplayoptions.c deleted file mode 100644
index 5cff716..0000000
--- a/app/display/gimpdisplayoptions.c +++ /dev/null
@@ -1,351 +0,0 @@
-/* GIMP - The GNU Image Manipulation Program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - *
- * GimpDisplayOptions
- * Copyright (C) 2003 Sven Neumann - *
- * 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 . - */
-
-#include "config.h"
-
-#include
-
-#include "libgimpbase/gimpbase.h"
-#include "libgimpmath/gimpmath.h"
-#include "libgimpcolor/gimpcolor.h" -#include "libgimpconfig/gimpconfig.h" -
-#include "core/core-types.h"
-#include "display-enums.h"
-
-#include "config/gimprc-blurbs.h"
-
-#include "gimpdisplayoptions.h"
-
-#include "gimp-intl.h"
-
-
-enum
-{
- PROP_0,
- PROP_SHOW_MENUBAR,
- PROP_SHOW_STATUSBAR,
- PROP_SHOW_RULERS,
- PROP_SHOW_SCROLLBARS,
- PROP_SHOW_SELECTION,
- PROP_SHOW_LAYER_BOUNDARY,
- PROP_SHOW_GUIDES,
- PROP_SHOW_GRID,
- PROP_SHOW_SAMPLE_POINTS,
- PROP_PADDING_MODE,
- PROP_PADDING_COLOR
-};
-
-
-static void gimp_display_options_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec); -static void gimp_display_options_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec); -
-
-G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptions, - gimp_display_options, - G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) -
-typedef struct _GimpDisplayOptions GimpDisplayOptionsFullscreen; -typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsFullscreenClass; -
-#define gimp_display_options_fullscreen_init gimp_display_options_init -
-G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptionsFullscreen, - gimp_display_options_fullscreen, - GIMP_TYPE_DISPLAY_OPTIONS, - G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) -
-typedef struct _GimpDisplayOptions GimpDisplayOptionsNoImage; -typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsNoImageClass; -
-#define gimp_display_options_no_image_init gimp_display_options_init -
-G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptionsNoImage, - gimp_display_options_no_image, - GIMP_TYPE_DISPLAY_OPTIONS, - G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) -
-
-static void
-gimp_display_options_class_init (GimpDisplayOptionsClass *klass) -{
- GObjectClass *object_class = G_OBJECT_CLASS (klass); - GimpRGB white;
-
- gimp_rgba_set (&white, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE); -
- object_class->set_property = gimp_display_options_set_property; - object_class->get_property = gimp_display_options_get_property; -
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR, - "show-menubar", SHOW_MENUBAR_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR, - "show-statusbar", SHOW_STATUSBAR_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, - "show-rulers", SHOW_RULERS_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, - "show-scrollbars", SHOW_SCROLLBARS_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, - "show-selection", SHOW_SELECTION_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, - "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, - "show-guides", SHOW_GUIDES_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, - "show-grid", SHOW_GRID_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, - "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, - TRUE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE, - "padding-mode", CANVAS_PADDING_MODE_BLURB, - GIMP_TYPE_CANVAS_PADDING_MODE, - GIMP_CANVAS_PADDING_MODE_DEFAULT, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_PADDING_COLOR, - "padding-color", CANVAS_PADDING_COLOR_BLURB, - FALSE, &white, - GIMP_PARAM_STATIC_STRINGS); -}
-
-static void
-gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *klass) -{
- GObjectClass *object_class = G_OBJECT_CLASS (klass); - GimpRGB black;
-
- gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE); -
- object_class->set_property = gimp_display_options_set_property; - object_class->get_property = gimp_display_options_get_property; -
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_MENUBAR, - "show-menubar", SHOW_MENUBAR_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR, - "show-statusbar", SHOW_STATUSBAR_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, - "show-rulers", SHOW_RULERS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, - "show-scrollbars", SHOW_SCROLLBARS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, - "show-selection", SHOW_SELECTION_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, - "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, - "show-guides", SHOW_GUIDES_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, - "show-grid", SHOW_GRID_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, - "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PADDING_MODE, - "padding-mode", CANVAS_PADDING_MODE_BLURB, - GIMP_TYPE_CANVAS_PADDING_MODE, - GIMP_CANVAS_PADDING_MODE_CUSTOM, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_PADDING_COLOR, - "padding-color", CANVAS_PADDING_COLOR_BLURB, - FALSE, &black, - GIMP_PARAM_STATIC_STRINGS); -}
-
-static void
-gimp_display_options_no_image_class_init (GimpDisplayOptionsNoImageClass *klass) -{
- GObjectClass *object_class = G_OBJECT_CLASS (klass); -
- object_class->set_property = gimp_display_options_set_property; - object_class->get_property = gimp_display_options_get_property; -
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS, - "show-rulers", SHOW_RULERS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SCROLLBARS, - "show-scrollbars", SHOW_SCROLLBARS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION, - "show-selection", SHOW_SELECTION_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_LAYER_BOUNDARY, - "show-layer-boundary", SHOW_LAYER_BOUNDARY_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GUIDES, - "show-guides", SHOW_GUIDES_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_GRID, - "show-grid", SHOW_GRID_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SAMPLE_POINTS, - "show-sample-points", SHOW_SAMPLE_POINTS_BLURB, - FALSE, - GIMP_PARAM_STATIC_STRINGS); -}
-
-static void
-gimp_display_options_init (GimpDisplayOptions *options) -{
- options->padding_mode_set = FALSE; -}
-
-static void
-gimp_display_options_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{
- GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object); -
- switch (property_id)
- {
- case PROP_SHOW_MENUBAR:
- options->show_menubar = g_value_get_boolean (value); - break;
- case PROP_SHOW_STATUSBAR:
- options->show_statusbar = g_value_get_boolean (value); - break;
- case PROP_SHOW_RULERS:
- options->show_rulers = g_value_get_boolean (value); - break;
- case PROP_SHOW_SCROLLBARS:
- options->show_scrollbars = g_value_get_boolean (value); - break;
- case PROP_SHOW_SELECTION:
- options->show_selection = g_value_get_boolean (value); - break;
- case PROP_SHOW_LAYER_BOUNDARY:
- options->show_layer_boundary = g_value_get_boolean (value); - break;
- case PROP_SHOW_GUIDES:
- options->show_guides = g_value_get_boolean (value); - break;
- case PROP_SHOW_GRID:
- options->show_grid = g_value_get_boolean (value); - break;
- case PROP_SHOW_SAMPLE_POINTS:
- options->show_sample_points = g_value_get_boolean (value); - break;
- case PROP_PADDING_MODE:
- options->padding_mode = g_value_get_enum (value); - break;
- case PROP_PADDING_COLOR:
- options->padding_color = *(GimpRGB *) g_value_get_boxed (value); - break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break;
- }
-}
-
-static void
-gimp_display_options_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{
- GimpDisplayOptions *options = GIMP_DISPLAY_OPTIONS (object); -
- switch (property_id)
- {
- case PROP_SHOW_MENUBAR:
- g_value_set_boolean (value, options->show_menubar); - break;
- case PROP_SHOW_STATUSBAR:
- g_value_set_boolean (value, options->show_statusbar); - break;
- case PROP_SHOW_RULERS:
- g_value_set_boolean (value, options->show_rulers); - break;
- case PROP_SHOW_SCROLLBARS:
- g_value_set_boolean (value, options->show_scrollbars); - break;
- case PROP_SHOW_SELECTION:
- g_value_set_boolean (value, options->show_selection); - break;
- case PROP_SHOW_LAYER_BOUNDARY:
- g_value_set_boolean (value, options->show_layer_boundary); - break;
- case PROP_SHOW_GUIDES:
- g_value_set_boolean (value, options->show_guides); - break;
- case PROP_SHOW_GRID:
- g_value_set_boolean (value, options->show_grid); - break;
- case PROP_SHOW_SAMPLE_POINTS:
- g_value_set_boolean (value, options->show_sample_points); - break;
- case PROP_PADDING_MODE:
- g_value_set_enum (value, options->padding_mode); - break;
- case PROP_PADDING_COLOR:
- g_value_set_boxed (value, &options->padding_color); - break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break;
- }
-}
diff --git a/app/display/gimpdisplayoptions.h b/app/display/gimpdisplayoptions.h deleted file mode 100644
index ef9bd18..0000000
--- a/app/display/gimpdisplayoptions.h +++ /dev/null
@@ -1,72 +0,0 @@
-/* GIMP - The GNU Image Manipulation Program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - *
- * GimpDisplayOptions
- * Copyright (C) 2003 Sven Neumann - *
- * 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 . - */
-
-#ifndef __GIMP_DISPLAY_OPTIONS_H__
-#define __GIMP_DISPLAY_OPTIONS_H__
-
-
-#define GIMP_TYPE_DISPLAY_OPTIONS (gimp_display_options_get_type ()) -#define GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN (gimp_display_options_fullscreen_get_type ()) -#define GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE (gimp_display_options_no_image_get_type ()) -
-#define GIMP_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptions)) -#define GIMP_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass)) -#define GIMP_IS_DISPLAY_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DISPLAY_OPTIONS)) -#define GIMP_IS_DISPLAY_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DISPLAY_OPTIONS)) -#define GIMP_DISPLAY_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DISPLAY_OPTIONS, GimpDisplayOptionsClass)) -
-
-typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsClass; -
-struct _GimpDisplayOptions
-{
- GObject parent_instance; -
- /* GimpImageWindow options */
- gboolean show_menubar; - gboolean show_statusbar; -
- /* GimpDisplayShell options */
- gboolean show_rulers; - gboolean show_scrollbars; -
- /* GimpCanvas options */
- gboolean show_selection; - gboolean show_layer_boundary; - gboolean show_guides; - gboolean show_grid; - gboolean show_sample_points; - GimpCanvasPaddingMode padding_mode; - GimpRGB padding_color; - gboolean padding_mode_set; -};
-
-struct _GimpDisplayOptionsClass
-{
- GObjectClass parent_class; -};
-
-
-GType gimp_display_options_get_type (void) G_GNUC_CONST; -GType gimp_display_options_fullscreen_get_type (void) G_GNUC_CONST; -GType gimp_display_options_no_image_get_type (void) G_GNUC_CONST; -
-
-#endif /* __GIMP_DISPLAY_OPTIONS_H__ */ diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c index 3bc5bbd..269d3d9 100644
--- a/app/display/gimpdisplayshell-appearance.c +++ b/app/display/gimpdisplayshell-appearance.c @@ -25,6 +25,8 @@

#include "display-types.h"

+#include "config/gimpdisplayoptions.h" +
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
@@ -39,7 +41,6 @@

#include "gimpcanvas.h"
#include "gimpdisplay.h"
-#include "gimpdisplayoptions.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h" #include "gimpdisplayshell-expose.h" diff --git a/app/display/gimpdisplayshell-handlers.c b/app/display/gimpdisplayshell-handlers.c index 79e77d4..58b8cb8 100644
--- a/app/display/gimpdisplayshell-handlers.c +++ b/app/display/gimpdisplayshell-handlers.c @@ -27,6 +27,7 @@
#include "display-types.h"

#include "config/gimpdisplayconfig.h" +#include "config/gimpdisplayoptions.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
@@ -39,7 +40,6 @@
#include "widgets/gimpwidgets-utils.h"
#include "gimpdisplay.h"
-#include "gimpdisplayoptions.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h" #include "gimpdisplayshell-callbacks.h" diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index dddca53..e6c9d31 100644
--- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -33,6 +33,7 @@

#include "config/gimpcoreconfig.h"
#include "config/gimpdisplayconfig.h" +#include "config/gimpdisplayoptions.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
@@ -53,7 +54,6 @@

#include "gimpcanvas.h"
#include "gimpdisplay.h"
-#include "gimpdisplayoptions.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"

Martin Nordholts
2010-01-31 18:31:43 UTC (almost 15 years ago)

[PATCH] app: Get rid of config -> display module dependency

On 01/31/2010 06:27 PM, Martin Nordholts wrote:

Here is the patch that removes the config -> display dependency

... I thought. It was >40kb and requires moderator approval, so we'll have to wait for that.

/ Martin

Sven Neumann
2010-02-01 20:49:39 UTC (almost 15 years ago)

[PATCH] app: Get rid of config -> display module dependency

Hi,

On Sun, 2010-01-31 at 18:27 +0100, Martin Nordholts wrote:

In order to make a clear separation between the core modules and the UI modules, move the necessary enums from display-enums.h and widgets-enums.h to config-enums.h and the files gimpdisplayoptions.[ch] from the display to the config module. This removes the config -> display dependency.

This change has three main benefits * It lets us remove includes of display files from the config module * We don't have to link gimp-console and test-config with a subset of object files from the display module * It is reflected in devel-docs/gimp-module-dependencies.svg that the application is made up of core modules and UI modules and that no core module depends on any UI module ---
app/Makefile.am | 3 - app/actions/view-actions.c | 2 +- app/actions/view-commands.c | 2 +- app/config/Makefile.am | 38 ++- app/config/config-enums.c | 226 +++++++++++ app/config/config-enums.h | 105 +++++ app/config/config-types.h | 7 +- app/config/gimpdisplayconfig.c | 9 +- app/config/gimpdisplayconfig.h | 2 - app/config/gimpdisplayoptions.c | 350 ++++++++++++++++ app/config/gimpdisplayoptions.h | 72 ++++ app/config/gimpguiconfig.h | 2 - app/config/gimppluginconfig.h | 2 - app/core/core-types.h | 3 - app/display/Makefile.am | 2 - app/display/display-enums.c | 124 ------ app/display/display-enums.h | 49 --- app/display/gimpdisplayoptions.c | 351 ---------------- app/display/gimpdisplayoptions.h | 72 ---- app/display/gimpdisplayshell-appearance.c | 3 +- app/display/gimpdisplayshell-handlers.c | 2 +- app/display/gimpdisplayshell.c | 2 +- app/widgets/widgets-enums.c | 89 ---- app/widgets/widgets-enums.h | 34 -- devel-docs/gimp-module-dependencies.svg | 618 +++++++++++++++-------------- 25 files changed, 1113 insertions(+), 1056 deletions(-)

As far as I can see there are no enums with translations left in display-enums.h after your patch. So you could remove it from po/POTFILES.in. Other than that, the patch looks good. Even though I still don't quite follow your argumentation that it is an improvement, I won't object to this change.

Sven

Martin Nordholts
2010-02-01 21:58:20 UTC (almost 15 years ago)

[PATCH] app: Get rid of config -> display module dependency

On 02/01/2010 08:50 PM, Sven Neumann wrote:

As far as I can see there are no enums with translations left in display-enums.h after your patch. So you could remove it from po/POTFILES.in.

Well spotted. I have adjusted POTFILES.in and commited the patch.

/ Martin