app: rename GimpImageMapConfig to GimpSettings
It was misnamed from the beginning and has no relation to GimpImageMap except that it happens to be used by GimpImageMapTools. Now it feels less weird to potentially use it for other settings too.
This commit is contained in:
@ -252,8 +252,6 @@ libappcore_a_sources = \
|
|||||||
gimpimagefile.h \
|
gimpimagefile.h \
|
||||||
gimpimagemap.c \
|
gimpimagemap.c \
|
||||||
gimpimagemap.h \
|
gimpimagemap.h \
|
||||||
gimpimagemapconfig.c \
|
|
||||||
gimpimagemapconfig.h \
|
|
||||||
gimpitem.c \
|
gimpitem.c \
|
||||||
gimpitem.h \
|
gimpitem.h \
|
||||||
gimpitem-exclusive.c \
|
gimpitem-exclusive.c \
|
||||||
@ -335,6 +333,8 @@ libappcore_a_sources = \
|
|||||||
gimpscanconvert.h \
|
gimpscanconvert.h \
|
||||||
gimpselection.c \
|
gimpselection.c \
|
||||||
gimpselection.h \
|
gimpselection.h \
|
||||||
|
gimpsettings.c \
|
||||||
|
gimpsettings.h \
|
||||||
gimpstrokeoptions.c \
|
gimpstrokeoptions.c \
|
||||||
gimpstrokeoptions.h \
|
gimpstrokeoptions.h \
|
||||||
gimpsubprogress.c \
|
gimpsubprogress.c \
|
||||||
|
@ -176,12 +176,12 @@ typedef struct _GimpGuide GimpGuide;
|
|||||||
typedef struct _GimpHistogram GimpHistogram;
|
typedef struct _GimpHistogram GimpHistogram;
|
||||||
typedef struct _GimpIdTable GimpIdTable;
|
typedef struct _GimpIdTable GimpIdTable;
|
||||||
typedef struct _GimpImageMap GimpImageMap;
|
typedef struct _GimpImageMap GimpImageMap;
|
||||||
typedef struct _GimpImageMapConfig GimpImageMapConfig;
|
|
||||||
typedef struct _GimpImagefile GimpImagefile;
|
typedef struct _GimpImagefile GimpImagefile;
|
||||||
typedef struct _GimpInterpreterDB GimpInterpreterDB;
|
typedef struct _GimpInterpreterDB GimpInterpreterDB;
|
||||||
typedef struct _GimpParasiteList GimpParasiteList;
|
typedef struct _GimpParasiteList GimpParasiteList;
|
||||||
typedef struct _GimpPdbProgress GimpPdbProgress;
|
typedef struct _GimpPdbProgress GimpPdbProgress;
|
||||||
typedef struct _GimpProjection GimpProjection;
|
typedef struct _GimpProjection GimpProjection;
|
||||||
|
typedef struct _GimpSettings GimpSettings;
|
||||||
typedef struct _GimpSubProgress GimpSubProgress;
|
typedef struct _GimpSubProgress GimpSubProgress;
|
||||||
typedef struct _GimpTag GimpTag;
|
typedef struct _GimpTag GimpTag;
|
||||||
typedef struct _GimpTreeHandler GimpTreeHandler;
|
typedef struct _GimpTreeHandler GimpTreeHandler;
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
#include "gimpdrawable.h"
|
#include "gimpdrawable.h"
|
||||||
#include "gimpdrawable-operation.h"
|
#include "gimpdrawable-operation.h"
|
||||||
#include "gimpdrawable-shadow.h"
|
#include "gimpdrawable-shadow.h"
|
||||||
#include "gimpimagemapconfig.h"
|
|
||||||
#include "gimpprogress.h"
|
#include "gimpprogress.h"
|
||||||
|
#include "gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
@ -87,7 +87,7 @@ gimp_drawable_apply_operation_by_name (GimpDrawable *drawable,
|
|||||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||||
g_return_if_fail (undo_desc != NULL);
|
g_return_if_fail (undo_desc != NULL);
|
||||||
g_return_if_fail (operation_type != NULL);
|
g_return_if_fail (operation_type != NULL);
|
||||||
g_return_if_fail (config == NULL || GIMP_IS_IMAGE_MAP_CONFIG (config));
|
g_return_if_fail (config == NULL || GIMP_IS_SETTINGS (config));
|
||||||
|
|
||||||
node = g_object_new (GEGL_TYPE_NODE,
|
node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", operation_type,
|
"operation", operation_type,
|
||||||
|
@ -1,168 +0,0 @@
|
|||||||
/* GIMP - The GNU Image Manipulation Program
|
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
||||||
*
|
|
||||||
* gimpimagemapconfig.c
|
|
||||||
* Copyright (C) 2008 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <gegl.h>
|
|
||||||
|
|
||||||
#include "libgimpconfig/gimpconfig.h"
|
|
||||||
|
|
||||||
#include "core-types.h"
|
|
||||||
|
|
||||||
#include "gimpimagemapconfig.h"
|
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_TIME
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_image_map_config_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_image_map_config_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpImageMapConfig, gimp_image_map_config,
|
|
||||||
GIMP_TYPE_VIEWABLE)
|
|
||||||
|
|
||||||
#define parent_class gimp_image_map_config_parent_class
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_image_map_config_class_init (GimpImageMapConfigClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->set_property = gimp_image_map_config_set_property;
|
|
||||||
object_class->get_property = gimp_image_map_config_get_property;
|
|
||||||
|
|
||||||
GIMP_CONFIG_INSTALL_PROP_UINT (object_class, PROP_TIME,
|
|
||||||
"time",
|
|
||||||
"Time of settings creation",
|
|
||||||
0, G_MAXUINT, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_image_map_config_init (GimpImageMapConfig *config)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_image_map_config_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpImageMapConfig *config = GIMP_IMAGE_MAP_CONFIG (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_TIME:
|
|
||||||
g_value_set_uint (value, config->time);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_image_map_config_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpImageMapConfig *config = GIMP_IMAGE_MAP_CONFIG (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_TIME:
|
|
||||||
config->time = g_value_get_uint (value);
|
|
||||||
|
|
||||||
if (config->time > 0)
|
|
||||||
{
|
|
||||||
time_t t;
|
|
||||||
struct tm tm;
|
|
||||||
gchar buf[64];
|
|
||||||
gchar *name;
|
|
||||||
|
|
||||||
t = config->time;
|
|
||||||
tm = *localtime (&t);
|
|
||||||
strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S", &tm);
|
|
||||||
|
|
||||||
name = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
|
|
||||||
gimp_object_set_name (GIMP_OBJECT (config), name);
|
|
||||||
g_free (name);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
|
||||||
|
|
||||||
gint
|
|
||||||
gimp_image_map_config_compare (GimpImageMapConfig *a,
|
|
||||||
GimpImageMapConfig *b)
|
|
||||||
{
|
|
||||||
const gchar *name_a = gimp_object_get_name (a);
|
|
||||||
const gchar *name_b = gimp_object_get_name (b);
|
|
||||||
|
|
||||||
if (a->time > 0 && b->time > 0)
|
|
||||||
{
|
|
||||||
return - strcmp (name_a, name_b);
|
|
||||||
}
|
|
||||||
else if (a->time > 0)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else if (b->time > 0)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (name_a && name_b)
|
|
||||||
{
|
|
||||||
return strcmp (name_a, name_b);
|
|
||||||
}
|
|
||||||
else if (name_a)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (name_b)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/* GIMP - The GNU Image Manipulation Program
|
|
||||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
||||||
*
|
|
||||||
* gimpimagemapconfig.h
|
|
||||||
* Copyright (C) 2008 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GIMP_IMAGE_MAP_CONFIG_H__
|
|
||||||
#define __GIMP_IMAGE_MAP_CONFIG_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include "gimpviewable.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_IMAGE_MAP_CONFIG (gimp_image_map_config_get_type ())
|
|
||||||
#define GIMP_IMAGE_MAP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE_MAP_CONFIG, GimpImageMapConfig))
|
|
||||||
#define GIMP_IMAGE_MAP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE_MAP_CONFIG, GimpImageMapConfigClass))
|
|
||||||
#define GIMP_IS_IMAGE_MAP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE_MAP_CONFIG))
|
|
||||||
#define GIMP_IS_IMAGE_MAP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE_MAP_CONFIG))
|
|
||||||
#define GIMP_IMAGE_MAP_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE_MAP_CONFIG, GimpImageMapConfigClass))
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpImageMapConfigClass GimpImageMapConfigClass;
|
|
||||||
|
|
||||||
struct _GimpImageMapConfig
|
|
||||||
{
|
|
||||||
GimpViewable parent_instance;
|
|
||||||
|
|
||||||
guint time;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GimpImageMapConfigClass
|
|
||||||
{
|
|
||||||
GimpViewableClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
GType gimp_image_map_config_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
gint gimp_image_map_config_compare (GimpImageMapConfig *a,
|
|
||||||
GimpImageMapConfig *b);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_IMAGE_MAP_CONFIG_H__ */
|
|
@ -51,7 +51,7 @@ static void gimp_brightness_contrast_config_set_property (GObject *object
|
|||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpBrightnessContrastConfig,
|
G_DEFINE_TYPE_WITH_CODE (GimpBrightnessContrastConfig,
|
||||||
gimp_brightness_contrast_config,
|
gimp_brightness_contrast_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
||||||
|
|
||||||
#define parent_class gimp_brightness_contrast_config_parent_class
|
#define parent_class gimp_brightness_contrast_config_parent_class
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_BRIGHTNESS_CONTRAST_CONFIG_H__
|
#define __GIMP_BRIGHTNESS_CONTRAST_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG (gimp_brightness_contrast_config_get_type ())
|
#define GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG (gimp_brightness_contrast_config_get_type ())
|
||||||
@ -37,15 +37,15 @@ typedef struct _GimpBrightnessContrastConfigClass GimpBrightnessContrastConfigCl
|
|||||||
|
|
||||||
struct _GimpBrightnessContrastConfig
|
struct _GimpBrightnessContrastConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
gdouble brightness;
|
gdouble brightness;
|
||||||
gdouble contrast;
|
gdouble contrast;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpBrightnessContrastConfigClass
|
struct _GimpBrightnessContrastConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ static void gimp_cage_config_compute_edges_normal (GimpCageConfig *gcc);
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpCageConfig, gimp_cage_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpCageConfig, gimp_cage_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||||
NULL))
|
NULL))
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define __GIMP_CAGE_CONFIG_H__
|
#define __GIMP_CAGE_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
struct _GimpCagePoint
|
struct _GimpCagePoint
|
||||||
@ -46,18 +46,18 @@ typedef struct _GimpCageConfigClass GimpCageConfigClass;
|
|||||||
|
|
||||||
struct _GimpCageConfig
|
struct _GimpCageConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GArray *cage_points;
|
GArray *cage_points;
|
||||||
|
|
||||||
gdouble displacement_x;
|
gdouble displacement_x;
|
||||||
gdouble displacement_y;
|
gdouble displacement_y;
|
||||||
GimpCageMode cage_mode; /* Cage mode, used to commit displacement */
|
GimpCageMode cage_mode; /* Cage mode, used to commit displacement */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpCageConfigClass
|
struct _GimpCageConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ static gboolean gimp_color_balance_config_copy (GimpConfig *src,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpColorBalanceConfig, gimp_color_balance_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpColorBalanceConfig, gimp_color_balance_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||||
gimp_color_balance_config_iface_init))
|
gimp_color_balance_config_iface_init))
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_COLOR_BALANCE_CONFIG_H__
|
#define __GIMP_COLOR_BALANCE_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_COLOR_BALANCE_CONFIG (gimp_color_balance_config_get_type ())
|
#define GIMP_TYPE_COLOR_BALANCE_CONFIG (gimp_color_balance_config_get_type ())
|
||||||
@ -37,20 +37,20 @@ typedef struct _GimpColorBalanceConfigClass GimpColorBalanceConfigClass;
|
|||||||
|
|
||||||
struct _GimpColorBalanceConfig
|
struct _GimpColorBalanceConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GimpTransferMode range;
|
GimpTransferMode range;
|
||||||
|
|
||||||
gdouble cyan_red[3];
|
gdouble cyan_red[3];
|
||||||
gdouble magenta_green[3];
|
gdouble magenta_green[3];
|
||||||
gdouble yellow_blue[3];
|
gdouble yellow_blue[3];
|
||||||
|
|
||||||
gboolean preserve_luminosity;
|
gboolean preserve_luminosity;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpColorBalanceConfigClass
|
struct _GimpColorBalanceConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ static void gimp_colorize_config_set_property (GObject *object,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpColorizeConfig, gimp_colorize_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpColorizeConfig, gimp_colorize_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
||||||
|
|
||||||
#define parent_class gimp_colorize_config_parent_class
|
#define parent_class gimp_colorize_config_parent_class
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_COLORIZE_CONFIG_H__
|
#define __GIMP_COLORIZE_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_COLORIZE_CONFIG (gimp_colorize_config_get_type ())
|
#define GIMP_TYPE_COLORIZE_CONFIG (gimp_colorize_config_get_type ())
|
||||||
@ -37,16 +37,16 @@ typedef struct _GimpColorizeConfigClass GimpColorizeConfigClass;
|
|||||||
|
|
||||||
struct _GimpColorizeConfig
|
struct _GimpColorizeConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
gdouble hue;
|
gdouble hue;
|
||||||
gdouble saturation;
|
gdouble saturation;
|
||||||
gdouble lightness;
|
gdouble lightness;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpColorizeConfigClass
|
struct _GimpColorizeConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ static void gimp_curves_config_curve_dirty (GimpCurve *curve,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpCurvesConfig, gimp_curves_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpCurvesConfig, gimp_curves_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||||
gimp_curves_config_iface_init))
|
gimp_curves_config_iface_init))
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_CURVES_CONFIG_H__
|
#define __GIMP_CURVES_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_CURVES_CONFIG (gimp_curves_config_get_type ())
|
#define GIMP_TYPE_CURVES_CONFIG (gimp_curves_config_get_type ())
|
||||||
@ -37,7 +37,7 @@ typedef struct _GimpCurvesConfigClass GimpCurvesConfigClass;
|
|||||||
|
|
||||||
struct _GimpCurvesConfig
|
struct _GimpCurvesConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GimpHistogramChannel channel;
|
GimpHistogramChannel channel;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ struct _GimpCurvesConfig
|
|||||||
|
|
||||||
struct _GimpCurvesConfigClass
|
struct _GimpCurvesConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ static void gimp_desaturate_config_set_property (GObject *object,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpDesaturateConfig, gimp_desaturate_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpDesaturateConfig, gimp_desaturate_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
||||||
|
|
||||||
#define parent_class gimp_desaturate_config_parent_class
|
#define parent_class gimp_desaturate_config_parent_class
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_DESATURATE_CONFIG_H__
|
#define __GIMP_DESATURATE_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_DESATURATE_CONFIG (gimp_desaturate_config_get_type ())
|
#define GIMP_TYPE_DESATURATE_CONFIG (gimp_desaturate_config_get_type ())
|
||||||
@ -37,14 +37,14 @@ typedef struct _GimpDesaturateConfigClass GimpDesaturateConfigClass;
|
|||||||
|
|
||||||
struct _GimpDesaturateConfig
|
struct _GimpDesaturateConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GimpDesaturateMode mode;
|
GimpDesaturateMode mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpDesaturateConfigClass
|
struct _GimpDesaturateConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ static gboolean gimp_hue_saturation_config_copy (GimpConfig *src,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpHueSaturationConfig, gimp_hue_saturation_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpHueSaturationConfig, gimp_hue_saturation_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||||
gimp_hue_saturation_config_iface_init))
|
gimp_hue_saturation_config_iface_init))
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_HUE_SATURATION_CONFIG_H__
|
#define __GIMP_HUE_SATURATION_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_HUE_SATURATION_CONFIG (gimp_hue_saturation_config_get_type ())
|
#define GIMP_TYPE_HUE_SATURATION_CONFIG (gimp_hue_saturation_config_get_type ())
|
||||||
@ -37,20 +37,20 @@ typedef struct _GimpHueSaturationConfigClass GimpHueSaturationConfigClass;
|
|||||||
|
|
||||||
struct _GimpHueSaturationConfig
|
struct _GimpHueSaturationConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GimpHueRange range;
|
GimpHueRange range;
|
||||||
|
|
||||||
gdouble hue[7];
|
gdouble hue[7];
|
||||||
gdouble saturation[7];
|
gdouble saturation[7];
|
||||||
gdouble lightness[7];
|
gdouble lightness[7];
|
||||||
|
|
||||||
gdouble overlap;
|
gdouble overlap;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpHueSaturationConfigClass
|
struct _GimpHueSaturationConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ static gboolean gimp_levels_config_copy (GimpConfig *src,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpLevelsConfig, gimp_levels_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpLevelsConfig, gimp_levels_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||||
gimp_levels_config_iface_init))
|
gimp_levels_config_iface_init))
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_LEVELS_CONFIG_H__
|
#define __GIMP_LEVELS_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_LEVELS_CONFIG (gimp_levels_config_get_type ())
|
#define GIMP_TYPE_LEVELS_CONFIG (gimp_levels_config_get_type ())
|
||||||
@ -37,7 +37,7 @@ typedef struct _GimpLevelsConfigClass GimpLevelsConfigClass;
|
|||||||
|
|
||||||
struct _GimpLevelsConfig
|
struct _GimpLevelsConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
GimpHistogramChannel channel;
|
GimpHistogramChannel channel;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ struct _GimpLevelsConfig
|
|||||||
|
|
||||||
struct _GimpLevelsConfigClass
|
struct _GimpLevelsConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ static void gimp_posterize_config_set_property (GObject *object,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpPosterizeConfig, gimp_posterize_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpPosterizeConfig, gimp_posterize_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
||||||
|
|
||||||
#define parent_class gimp_posterize_config_parent_class
|
#define parent_class gimp_posterize_config_parent_class
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_POSTERIZE_CONFIG_H__
|
#define __GIMP_POSTERIZE_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_POSTERIZE_CONFIG (gimp_posterize_config_get_type ())
|
#define GIMP_TYPE_POSTERIZE_CONFIG (gimp_posterize_config_get_type ())
|
||||||
@ -37,14 +37,14 @@ typedef struct _GimpPosterizeConfigClass GimpPosterizeConfigClass;
|
|||||||
|
|
||||||
struct _GimpPosterizeConfig
|
struct _GimpPosterizeConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
gint levels;
|
gint levels;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpPosterizeConfigClass
|
struct _GimpPosterizeConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ static void gimp_threshold_config_set_property (GObject *object,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpThresholdConfig, gimp_threshold_config,
|
G_DEFINE_TYPE_WITH_CODE (GimpThresholdConfig, gimp_threshold_config,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG,
|
GIMP_TYPE_SETTINGS,
|
||||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
|
||||||
|
|
||||||
#define parent_class gimp_threshold_config_parent_class
|
#define parent_class gimp_threshold_config_parent_class
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define __GIMP_THRESHOLD_CONFIG_H__
|
#define __GIMP_THRESHOLD_CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#include "core/gimpimagemapconfig.h"
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_THRESHOLD_CONFIG (gimp_threshold_config_get_type ())
|
#define GIMP_TYPE_THRESHOLD_CONFIG (gimp_threshold_config_get_type ())
|
||||||
@ -37,15 +37,15 @@ typedef struct _GimpThresholdConfigClass GimpThresholdConfigClass;
|
|||||||
|
|
||||||
struct _GimpThresholdConfig
|
struct _GimpThresholdConfig
|
||||||
{
|
{
|
||||||
GimpImageMapConfig parent_instance;
|
GimpSettings parent_instance;
|
||||||
|
|
||||||
gdouble low;
|
gdouble low;
|
||||||
gdouble high;
|
gdouble high;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpThresholdConfigClass
|
struct _GimpThresholdConfigClass
|
||||||
{
|
{
|
||||||
GimpImageMapConfigClass parent_class;
|
GimpSettingsClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
#include "core/gimp.h"
|
#include "core/gimp.h"
|
||||||
#include "core/gimpcontext.h"
|
#include "core/gimpcontext.h"
|
||||||
#include "core/gimpimagemapconfig.h"
|
|
||||||
#include "core/gimplist.h"
|
#include "core/gimplist.h"
|
||||||
#include "core/gimptoolinfo.h"
|
#include "core/gimptoolinfo.h"
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@
|
|||||||
#include "core/gimpimage.h"
|
#include "core/gimpimage.h"
|
||||||
#include "core/gimpimage-pick-color.h"
|
#include "core/gimpimage-pick-color.h"
|
||||||
#include "core/gimpimagemap.h"
|
#include "core/gimpimagemap.h"
|
||||||
#include "core/gimpimagemapconfig.h"
|
|
||||||
#include "core/gimplist.h"
|
#include "core/gimplist.h"
|
||||||
#include "core/gimppickable.h"
|
#include "core/gimppickable.h"
|
||||||
#include "core/gimpprogress.h"
|
#include "core/gimpprogress.h"
|
||||||
#include "core/gimpprojection.h"
|
#include "core/gimpprojection.h"
|
||||||
|
#include "core/gimpsettings.h"
|
||||||
#include "core/gimptoolinfo.h"
|
#include "core/gimptoolinfo.h"
|
||||||
|
|
||||||
#include "widgets/gimpdialogfactory.h"
|
#include "widgets/gimpdialogfactory.h"
|
||||||
@ -195,9 +195,9 @@ gimp_image_map_tool_class_init (GimpImageMapToolClass *klass)
|
|||||||
static void
|
static void
|
||||||
gimp_image_map_tool_base_init (GimpImageMapToolClass *klass)
|
gimp_image_map_tool_base_init (GimpImageMapToolClass *klass)
|
||||||
{
|
{
|
||||||
klass->recent_settings = gimp_list_new (GIMP_TYPE_IMAGE_MAP_CONFIG, TRUE);
|
klass->recent_settings = gimp_list_new (GIMP_TYPE_SETTINGS, TRUE);
|
||||||
gimp_list_set_sort_func (GIMP_LIST (klass->recent_settings),
|
gimp_list_set_sort_func (GIMP_LIST (klass->recent_settings),
|
||||||
(GCompareFunc) gimp_image_map_config_compare);
|
(GCompareFunc) gimp_settings_compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
#include "core/gimperror.h"
|
#include "core/gimperror.h"
|
||||||
#include "core/gimpimage.h"
|
#include "core/gimpimage.h"
|
||||||
#include "core/gimpimagemap.h"
|
#include "core/gimpimagemap.h"
|
||||||
#include "core/gimpimagemapconfig.h"
|
|
||||||
#include "core/gimplist.h"
|
#include "core/gimplist.h"
|
||||||
#include "core/gimpparamspecs-duplicate.h"
|
#include "core/gimpparamspecs-duplicate.h"
|
||||||
|
#include "core/gimpsettings.h"
|
||||||
|
|
||||||
#include "widgets/gimphelp-ids.h"
|
#include "widgets/gimphelp-ids.h"
|
||||||
#include "widgets/gimppropwidgets.h"
|
#include "widgets/gimppropwidgets.h"
|
||||||
@ -235,7 +235,7 @@ gimp_operation_tool_get_settings_ui (GimpImageMapTool *image_map_tool,
|
|||||||
settings = gimp_gegl_get_config_container (type);
|
settings = gimp_gegl_get_config_container (type);
|
||||||
if (! gimp_list_get_sort_func (GIMP_LIST (settings)))
|
if (! gimp_list_get_sort_func (GIMP_LIST (settings)))
|
||||||
gimp_list_set_sort_func (GIMP_LIST (settings),
|
gimp_list_set_sort_func (GIMP_LIST (settings),
|
||||||
(GCompareFunc) gimp_image_map_config_compare);
|
(GCompareFunc) gimp_settings_compare);
|
||||||
|
|
||||||
basename = g_strconcat (G_OBJECT_TYPE_NAME (tool->config), ".settings", NULL);
|
basename = g_strconcat (G_OBJECT_TYPE_NAME (tool->config), ".settings", NULL);
|
||||||
filename = g_build_filename (gimp_directory (), "filters", basename, NULL);
|
filename = g_build_filename (gimp_directory (), "filters", basename, NULL);
|
||||||
@ -295,7 +295,7 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
|
|||||||
g_object_unref (tool->config);
|
g_object_unref (tool->config);
|
||||||
|
|
||||||
tool->config = gimp_gegl_get_config_proxy (tool->operation,
|
tool->config = gimp_gegl_get_config_proxy (tool->operation,
|
||||||
GIMP_TYPE_IMAGE_MAP_CONFIG);
|
GIMP_TYPE_SETTINGS);
|
||||||
|
|
||||||
gimp_image_map_tool_get_operation (GIMP_IMAGE_MAP_TOOL (tool));
|
gimp_image_map_tool_get_operation (GIMP_IMAGE_MAP_TOOL (tool));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user