Commit b9bd1bfa authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/base/base-enums.[ch] moved GimpCheckSize and GimpCheckType enums to

2004-09-02  Sven Neumann  <sven@gimp.org>

	* app/base/base-enums.[ch]
	* libgimpbase/gimpbaseenums.[ch]: moved GimpCheckSize and
	GimpCheckType enums to libgimpbase. Correctly prefix the enum
	values.

	* app/base/temp-buf.c
	* app/config/gimpdisplayconfig.c
	* app/display/gimpdisplayshell-render.c
	* app/pdb/fileops_cmds.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.
parent dc572fc9
2004-09-02 Sven Neumann <sven@gimp.org>
* app/base/base-enums.[ch]
* libgimpbase/gimpbaseenums.[ch]: moved GimpCheckSize and
GimpCheckType enums to libgimpbase. Correctly prefix the enum
values.
* app/base/temp-buf.c
* app/config/gimpdisplayconfig.c
* app/display/gimpdisplayshell-render.c
* app/pdb/fileops_cmds.c
* tools/pdbgen/pdb/fileops.pdb: changed accordingly.
2004-09-02 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/script-fu-interface.c (script_fu_ok)
......
......@@ -7,47 +7,6 @@
#include "gimp-intl.h"
/* enumerations from "./base-enums.h" */
GType
gimp_check_size_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_SMALL_CHECKS, N_("Small"), "small-checks" },
{ GIMP_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_LARGE_CHECKS, N_("Large"), "large-checks" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
type = g_enum_register_static ("GimpCheckSize", values);
return type;
}
GType
gimp_check_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
{ GIMP_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
{ GIMP_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_BLACK_ONLY, N_("Black Only"), "black-only" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
type = g_enum_register_static ("GimpCheckType", values);
return type;
}
GType
gimp_curve_type_get_type (void)
{
......
......@@ -35,33 +35,6 @@
* these enums that are registered with the type system
*/
#define GIMP_TYPE_CHECK_SIZE (gimp_check_size_get_type ())
GType gimp_check_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/
GIMP_LARGE_CHECKS = 2 /*< desc="Large" >*/
} GimpCheckSize;
#define GIMP_TYPE_CHECK_TYPE (gimp_check_type_get_type ())
GType gimp_check_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_LIGHT_CHECKS = 0, /*< desc="Light Checks" >*/
GIMP_GRAY_CHECKS = 1, /*< desc="Mid-Tone Checks" >*/
GIMP_DARK_CHECKS = 2, /*< desc="Dark Checks" >*/
GIMP_WHITE_ONLY = 3, /*< desc="White Only" >*/
GIMP_GRAY_ONLY = 4, /*< desc="Gray Only" >*/
GIMP_BLACK_ONLY = 5 /*< desc="Black Only" >*/
} GimpCheckType;
#define GIMP_TYPE_CURVE_TYPE (gimp_curve_type_get_type ())
GType gimp_curve_type_get_type (void) G_GNUC_CONST;
......
......@@ -252,15 +252,15 @@ temp_buf_new_check (gint width,
switch (check_size)
{
case GIMP_SMALL_CHECKS:
case GIMP_CHECK_SIZE_SMALL_CHECKS:
check_mod = 0x3;
check_shift = 2;
break;
case GIMP_MEDIUM_CHECKS:
case GIMP_CHECK_SIZE_MEDIUM_CHECKS:
check_mod = 0x7;
check_shift = 3;
break;
case GIMP_LARGE_CHECKS:
case GIMP_CHECK_SIZE_LARGE_CHECKS:
check_mod = 0xf;
check_shift = 4;
break;
......@@ -268,27 +268,27 @@ temp_buf_new_check (gint width,
switch (check_type)
{
case GIMP_LIGHT_CHECKS:
case GIMP_CHECK_TYPE_LIGHT_CHECKS:
fg_color = 204;
bg_color = 255;
break;
case GIMP_GRAY_CHECKS:
case GIMP_CHECK_TYPE_GRAY_CHECKS:
fg_color = 102;
bg_color = 153;
break;
case GIMP_DARK_CHECKS:
case GIMP_CHECK_TYPE_DARK_CHECKS:
fg_color = 0;
bg_color = 51;
break;
case GIMP_WHITE_ONLY:
case GIMP_CHECK_TYPE_WHITE_ONLY:
fg_color = 255;
bg_color = 255;
break;
case GIMP_GRAY_ONLY:
case GIMP_CHECK_TYPE_GRAY_ONLY:
fg_color = 127;
bg_color = 127;
break;
case GIMP_BLACK_ONLY:
case GIMP_CHECK_TYPE_BLACK_ONLY:
fg_color = 0;
bg_color = 0;
}
......
......@@ -145,11 +145,13 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TRANSPARENCY_SIZE,
"transparency-size", TRANSPARENCY_SIZE_BLURB,
GIMP_TYPE_CHECK_SIZE, GIMP_MEDIUM_CHECKS,
GIMP_TYPE_CHECK_SIZE,
GIMP_CHECK_SIZE_MEDIUM_CHECKS,
0);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TRANSPARENCY_TYPE,
"transparency-type", TRANSPARENCY_TYPE_BLURB,
GIMP_TYPE_CHECK_TYPE, GIMP_GRAY_CHECKS,
GIMP_TYPE_CHECK_TYPE,
GIMP_CHECK_TYPE_GRAY_CHECKS,
0);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_SNAP_DISTANCE,
"snap-distance", DEFAULT_SNAP_DISTANCE_BLURB,
......
......@@ -84,17 +84,18 @@ guchar *render_blend_white = NULL;
static guchar *tile_buf = NULL;
static guint tile_shift = 0;
static guint check_mod = 0;
static guint check_shift = 0;
static guint tile_shift = 0;
static guchar check_combos[6][2] =
{
{ 204, 255 },
{ 102, 153 },
{ 0, 51 },
{ 255, 255 },
{ 127, 127 },
{ 0, 0 }
{ 204, 255 }, /* LIGHT_CHECKS */
{ 102, 153 }, /* GRAY_CHECKS */
{ 0, 51 }, /* DARK_CHECKS */
{ 255, 255 }, /* WHITE_ONLY */
{ 127, 127 }, /* GRAY_ONLY */
{ 0, 0 } /* BACK_ONLY */
};
......@@ -219,15 +220,15 @@ render_setup_notify (gpointer config,
switch (check_size)
{
case GIMP_SMALL_CHECKS:
case GIMP_CHECK_SIZE_SMALL_CHECKS:
check_mod = 0x3;
check_shift = 2;
break;
case GIMP_MEDIUM_CHECKS:
case GIMP_CHECK_SIZE_MEDIUM_CHECKS:
check_mod = 0x7;
check_shift = 3;
break;
case GIMP_LARGE_CHECKS:
case GIMP_CHECK_SIZE_LARGE_CHECKS:
check_mod = 0xf;
check_shift = 4;
break;
......
......@@ -301,7 +301,7 @@ file_load_thumbnail_invoker (Gimp *gimp,
gdk_pixbuf_composite_color (pixbuf, tmp,
0, 0, width, height, 0, 0, 1.0, 1.0,
GDK_INTERP_NEAREST, 255,
0, 0, GIMP_SMALL_CHECKS,
0, 0, GIMP_CHECK_SIZE_SMALL_CHECKS,
0x66666666, 0x99999999);
g_object_unref (pixbuf);
......
2004-09-02 Sven Neumann <sven@gimp.org>
* libgimpbase/libgimpbase-sections.txt
* libgimpbase/tmpl/gimpbaseenums.sgml: added GimpCheck[Size|Type]
enums.
2004-09-01 Sven Neumann <sven@gimp.org>
* libgimp/tmpl/gimpprogressbar.sgml
......
......@@ -6,6 +6,8 @@ gimp_type_get_translation_domain
<SECTION>
<FILE>gimpbaseenums</FILE>
GimpCheckSize
GimpCheckType
GimpImageBaseType
GimpImageType
GimpMessageHandlerType
......@@ -15,6 +17,10 @@ GimpPDBStatusType
GimpProgressCommand
GimpStackTraceMode
<SUBSECTION Standard>
GIMP_TYPE_CHECK_SIZE
gimp_check_size_get_type
GIMP_TYPE_CHECK_TYPE
gimp_check_type_get_type
GIMP_TYPE_IMAGE_BASE_TYPE
gimp_image_base_type_get_type
GIMP_TYPE_IMAGE_TYPE
......
......@@ -14,6 +14,27 @@ gimpbaseenums
</para>
<!-- ##### ENUM GimpCheckSize ##### -->
<para>
</para>
@GIMP_CHECK_SIZE_SMALL_CHECKS:
@GIMP_CHECK_SIZE_MEDIUM_CHECKS:
@GIMP_CHECK_SIZE_LARGE_CHECKS:
<!-- ##### ENUM GimpCheckType ##### -->
<para>
</para>
@GIMP_CHECK_TYPE_LIGHT_CHECKS:
@GIMP_CHECK_TYPE_GRAY_CHECKS:
@GIMP_CHECK_TYPE_DARK_CHECKS:
@GIMP_CHECK_TYPE_WHITE_ONLY:
@GIMP_CHECK_TYPE_GRAY_ONLY:
@GIMP_CHECK_TYPE_BLACK_ONLY:
<!-- ##### ENUM GimpImageBaseType ##### -->
<para>
......
......@@ -7,6 +7,53 @@
#include "libgimp/libgimp-intl.h"
/* enumerations from "./gimpbaseenums.h" */
GType
gimp_check_size_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CHECK_SIZE_SMALL_CHECKS, N_("Small"), "small-checks" },
{ GIMP_CHECK_SIZE_MEDIUM_CHECKS, N_("Medium"), "medium-checks" },
{ GIMP_CHECK_SIZE_LARGE_CHECKS, N_("Large"), "large-checks" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
{
type = g_enum_register_static ("GimpCheckSize", values);
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
}
return type;
}
GType
gimp_check_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_CHECK_TYPE_LIGHT_CHECKS, N_("Light Checks"), "light-checks" },
{ GIMP_CHECK_TYPE_GRAY_CHECKS, N_("Mid-Tone Checks"), "gray-checks" },
{ GIMP_CHECK_TYPE_DARK_CHECKS, N_("Dark Checks"), "dark-checks" },
{ GIMP_CHECK_TYPE_WHITE_ONLY, N_("White Only"), "white-only" },
{ GIMP_CHECK_TYPE_GRAY_ONLY, N_("Gray Only"), "gray-only" },
{ GIMP_CHECK_TYPE_BLACK_ONLY, N_("Black Only"), "black-only" },
{ 0, NULL, NULL }
};
static GType type = 0;
if (! type)
{
type = g_enum_register_static ("GimpCheckType", values);
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
}
return type;
}
GType
gimp_image_base_type_get_type (void)
{
......
......@@ -30,6 +30,33 @@ G_BEGIN_DECLS
* these enums that are registered with the type system
*/
#define GIMP_TYPE_CHECK_SIZE (gimp_check_size_get_type ())
GType gimp_check_size_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CHECK_SIZE_SMALL_CHECKS = 0, /*< desc="Small" >*/
GIMP_CHECK_SIZE_MEDIUM_CHECKS = 1, /*< desc="Medium" >*/
GIMP_CHECK_SIZE_LARGE_CHECKS = 2 /*< desc="Large" >*/
} GimpCheckSize;
#define GIMP_TYPE_CHECK_TYPE (gimp_check_type_get_type ())
GType gimp_check_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_CHECK_TYPE_LIGHT_CHECKS = 0, /*< desc="Light Checks" >*/
GIMP_CHECK_TYPE_GRAY_CHECKS = 1, /*< desc="Mid-Tone Checks" >*/
GIMP_CHECK_TYPE_DARK_CHECKS = 2, /*< desc="Dark Checks" >*/
GIMP_CHECK_TYPE_WHITE_ONLY = 3, /*< desc="White Only" >*/
GIMP_CHECK_TYPE_GRAY_ONLY = 4, /*< desc="Gray Only" >*/
GIMP_CHECK_TYPE_BLACK_ONLY = 5 /*< desc="Black Only" >*/
} GimpCheckType;
#define GIMP_TYPE_IMAGE_BASE_TYPE (gimp_image_base_type_get_type ())
GType gimp_image_base_type_get_type (void) G_GNUC_CONST;
......
2004-09-02 Sven Neumann <sven@gimp.org>
* de.po: updated german translation.
2004-08-31 Sven Neumann <sven@gimp.org>
* POTFILES.in: added libgimpwidgets/gimppreview.c.
......
......@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: GIMP 2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-08-31 00:44+0200\n"
"PO-Revision-Date: 2004-08-31 00:47+0200\n"
"POT-Creation-Date: 2004-09-02 16:21+0200\n"
"PO-Revision-Date: 2004-09-02 16:23+0200\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
......@@ -206,34 +206,70 @@ msgid "percent"
msgstr "Prozent"
#: libgimpbase/gimpbaseenums.c:15
msgid "Small"
msgstr "Klein"
#: libgimpbase/gimpbaseenums.c:16
msgid "Medium"
msgstr "Mittel"
#: libgimpbase/gimpbaseenums.c:17
msgid "Large"
msgstr "Groß"
#: libgimpbase/gimpbaseenums.c:37
msgid "Light Checks"
msgstr "Helle Quadrate"
#: libgimpbase/gimpbaseenums.c:38
msgid "Mid-Tone Checks"
msgstr "Halbhelle Quadrate"
#: libgimpbase/gimpbaseenums.c:39
msgid "Dark Checks"
msgstr "Dunkle Quadrate"
#: libgimpbase/gimpbaseenums.c:40
msgid "White Only"
msgstr "Nur Weiß"
#: libgimpbase/gimpbaseenums.c:41
msgid "Gray Only"
msgstr "Nur Grau"
#: libgimpbase/gimpbaseenums.c:42
msgid "Black Only"
msgstr "Nur Schwarz"
#: libgimpbase/gimpbaseenums.c:62
msgid "RGB color"
msgstr "RGB Farben"
#: libgimpbase/gimpbaseenums.c:16 libgimpbase/gimpbaseenums.c:39
#: libgimpbase/gimpbaseenums.c:63 libgimpbase/gimpbaseenums.c:86
msgid "Grayscale"
msgstr "Graustufen"
#: libgimpbase/gimpbaseenums.c:17
#: libgimpbase/gimpbaseenums.c:64
msgid "Indexed color"
msgstr "Indizierte Farben"
#: libgimpbase/gimpbaseenums.c:37
#: libgimpbase/gimpbaseenums.c:84
msgid "RGB"
msgstr "RGB"
#: libgimpbase/gimpbaseenums.c:38
#: libgimpbase/gimpbaseenums.c:85
msgid "RGB-alpha"
msgstr "RGB-Alpha"
#: libgimpbase/gimpbaseenums.c:40
#: libgimpbase/gimpbaseenums.c:87
msgid "Grayscale-alpha"
msgstr "Graustufen-Alpha"
#: libgimpbase/gimpbaseenums.c:41
#: libgimpbase/gimpbaseenums.c:88
msgid "Indexed"
msgstr "Indiziert"
#: libgimpbase/gimpbaseenums.c:42
#: libgimpbase/gimpbaseenums.c:89
msgid "Indexed-alpha"
msgstr "Indiziert-Alpha"
......@@ -459,7 +495,7 @@ msgstr ""
"dessen Farbe auszuwählen."
#. a toggle button to (des)activate the instant preview
#: libgimpwidgets/gimppreview.c:236
#: libgimpwidgets/gimppreview.c:235
msgid "_Preview"
msgstr "_Vorschau"
......@@ -694,7 +730,8 @@ msgstr "Schwarzauszug:"
#: modules/colorsel_cmyk.c:208
msgid "The percentage of black to pull out of the colored inks."
msgstr "Der Prozentsatz an Schwarz, der aus den farbigen Tinten gezogen werden soll."
msgstr ""
"Der Prozentsatz an Schwarz, der aus den farbigen Tinten gezogen werden soll."
#: modules/colorsel_triangle.c:104
msgid "Painter-style triangle color selector"
......
......@@ -248,7 +248,7 @@ HELP
gdk_pixbuf_composite_color (pixbuf, tmp,
0, 0, width, height, 0, 0, 1.0, 1.0,
GDK_INTERP_NEAREST, 255,
0, 0, GIMP_SMALL_CHECKS,
0, 0, GIMP_CHECK_SIZE_SMALL_CHECKS,
0x66666666, 0x99999999);
g_object_unref (pixbuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment