Commit 26578e75 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

define GIMP_MKENUMS for use in Makefile.am.

2002-03-17  Sven Neumann  <sven@gimp.org>

	* configure.in: define GIMP_MKENUMS for use in Makefile.am.

	* tools/Makefile.am
	* tools/gimp-mkenums: a modified version of glib-mkenums that parses
	literal descriptions for enum values out of the header file.

	* app/base/Makefile.am
	* app/base/base-enums.h: added descriptions for the InterpolationType.

	* app/base/base-enums.c: added to CVS although it is generated since
	translatable messages are extracted from this file and translators
	shouldn't need to build stuff.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpenummenu.[ch]: new widget to create a GtkMenu or a
	GtkOptionMenu directly from a registered enum.

	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.c
	* app/tools/transform_options.c: use gimp_enum_option_menu_new() for
	the Interpolation menus.
parent f8b4fbd4
2002-03-17 Sven Neumann <sven@gimp.org>
* configure.in: define GIMP_MKENUMS for use in Makefile.am.
* tools/Makefile.am
* tools/gimp-mkenums: a modified version of glib-mkenums that parses
literal descriptions for enum values out of the header file.
* app/base/Makefile.am
* app/base/base-enums.h: added descriptions for the InterpolationType.
* app/base/base-enums.c: added to CVS although it is generated since
translatable messages are extracted from this file and translators
shouldn't need to build stuff.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpenummenu.[ch]: new widget to create a GtkMenu or
GtkOptionMenu directly from a registered enum.
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.c
* app/tools/transform_options.c: use gimp_enum_option_menu_new() for
the Interpolation menus.
2002-03-17 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcolormapeditor.[ch]: namespaceified and cleaned
......
......@@ -4,4 +4,4 @@ Makefile.in
.libs
*.lo
libappbase.la
base-enums.c
......@@ -67,12 +67,12 @@ INCLUDES = @STRIP_BEGIN@ \
gen_sources = xgen-bec
CLEANFILES = $(gen_sources)
$(srcdir)/base-enums.c: $(srcdir)/base-enums.h
$(GLIB_MKENUMS) \
--fhead "#include <glib-object.h>\n#include \"base-enums.h\"" \
$(srcdir)/base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS)
$(GIMP_MKENUMS) \
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"base-enums.h\"\n#include\"libgimp/gimpintl.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \
$(srcdir)/base-enums.h > xgen-bec \
&& cp xgen-bec $(@F) \
......
/* Generated data (by gimp-mkenums) */
#include "config.h"
#include <glib-object.h>
#include "base-enums.h"
#include"libgimp/gimpintl.h"
/* enumerations from "./base-enums.h" */
static const GEnumValue gimp_interpolation_type_enum_values[] =
{
{ GIMP_INTERPOLATION_NONE, N_("None (Fastest)"), "none" },
{ GIMP_INTERPOLATION_LINEAR, N_("Linear"), "linear" },
{ GIMP_INTERPOLATION_CUBIC, N_("Cubic (Best)"), "cubic" },
{ 0, NULL, NULL }
};
GType
gimp_interpolation_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpInterpolationType", gimp_interpolation_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_layer_mode_effects_enum_values[] =
{
{ GIMP_NORMAL_MODE, NULL, "normal-mode" },
{ GIMP_DISSOLVE_MODE, NULL, "dissolve-mode" },
{ GIMP_BEHIND_MODE, NULL, "behind-mode" },
{ GIMP_MULTIPLY_MODE, NULL, "multiply-mode" },
{ GIMP_SCREEN_MODE, NULL, "screen-mode" },
{ GIMP_OVERLAY_MODE, NULL, "overlay-mode" },
{ GIMP_DIFFERENCE_MODE, NULL, "difference-mode" },
{ GIMP_ADDITION_MODE, NULL, "addition-mode" },
{ GIMP_SUBTRACT_MODE, NULL, "subtract-mode" },
{ GIMP_DARKEN_ONLY_MODE, NULL, "darken-only-mode" },
{ GIMP_LIGHTEN_ONLY_MODE, NULL, "lighten-only-mode" },
{ GIMP_HUE_MODE, NULL, "hue-mode" },
{ GIMP_SATURATION_MODE, NULL, "saturation-mode" },
{ GIMP_COLOR_MODE, NULL, "color-mode" },
{ GIMP_VALUE_MODE, NULL, "value-mode" },
{ GIMP_DIVIDE_MODE, NULL, "divide-mode" },
{ GIMP_DODGE_MODE, NULL, "dodge-mode" },
{ GIMP_BURN_MODE, NULL, "burn-mode" },
{ GIMP_HARDLIGHT_MODE, NULL, "hardlight-mode" },
{ GIMP_COLOR_ERASE_MODE, NULL, "color-erase-mode" },
{ 0, NULL, NULL }
};
GType
gimp_layer_mode_effects_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpLayerModeEffects", gimp_layer_mode_effects_enum_values);
return enum_type;
}
static const GEnumValue gimp_check_size_enum_values[] =
{
{ GIMP_SMALL_CHECKS, NULL, "small-checks" },
{ GIMP_MEDIUM_CHECKS, NULL, "medium-checks" },
{ GIMP_LARGE_CHECKS, NULL, "large-checks" },
{ 0, NULL, NULL }
};
GType
gimp_check_size_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCheckSize", gimp_check_size_enum_values);
return enum_type;
}
static const GEnumValue gimp_check_type_enum_values[] =
{
{ GIMP_LIGHT_CHECKS, NULL, "light-checks" },
{ GIMP_GRAY_CHECKS, NULL, "gray-checks" },
{ GIMP_DARK_CHECKS, NULL, "dark-checks" },
{ GIMP_WHITE_ONLY, NULL, "white-only" },
{ GIMP_GRAY_ONLY, NULL, "gray-only" },
{ GIMP_BLACK_ONLY, NULL, "black-only" },
{ 0, NULL, NULL }
};
GType
gimp_check_type_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpCheckType", gimp_check_type_enum_values);
return enum_type;
}
static const GEnumValue gimp_histogram_channel_enum_values[] =
{
{ GIMP_HISTOGRAM_VALUE, NULL, "value" },
{ GIMP_HISTOGRAM_RED, NULL, "red" },
{ GIMP_HISTOGRAM_GREEN, NULL, "green" },
{ GIMP_HISTOGRAM_BLUE, NULL, "blue" },
{ GIMP_HISTOGRAM_ALPHA, NULL, "alpha" },
{ 0, NULL, NULL }
};
GType
gimp_histogram_channel_get_type (void)
{
static GType enum_type = 0;
if (!enum_type)
enum_type = g_enum_register_static ("GimpHistogramChannel", gimp_histogram_channel_enum_values);
return enum_type;
}
/* Generated data ends here */
......@@ -42,9 +42,9 @@ GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
typedef enum /*< pdb-skip >*/
{
GIMP_INTERPOLATION_NONE,
GIMP_INTERPOLATION_LINEAR,
GIMP_INTERPOLATION_CUBIC
GIMP_INTERPOLATION_NONE, /*< desc="None (Fastest)" >*/
GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/
GIMP_INTERPOLATION_CUBIC /*< desc="Cubic (Best)" >*/
} GimpInterpolationType;
......
......@@ -44,6 +44,7 @@
#include "widgets/gimpdeviceinfo.h"
#include "widgets/gimpdevices.h"
#include "widgets/gimpenummenu.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
......@@ -2224,22 +2225,11 @@ preferences_dialog_create (Gimp *gimp)
table = prefs_table_new (1, GTK_CONTAINER (frame), TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimp->config->interpolation_type,
GINT_TO_POINTER (gimp->config->interpolation_type),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE), NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR), NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC), NULL,
NULL);
optionmenu = gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (prefs_toggle_callback),
&gimp->config->interpolation_type);
gimp_option_menu_set_history (GTK_OPTION_MENU (optionmenu),
GINT_TO_POINTER (gimp->config->interpolation_type));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Interpolation:"), 1.0, 0.5,
......
......@@ -31,6 +31,8 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "widgets/gimpenummenu.h"
#include "resize-dialog.h"
#include "libgimp/gimpintl.h"
......@@ -660,6 +662,7 @@ resize_widget_new (GimpImage *gimage,
if (type == ScaleWidget)
{
GtkWidget *hbox;
GtkWidget *option_menu;
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
......@@ -669,29 +672,15 @@ resize_widget_new (GimpImage *gimage,
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
private->interpolation_menu =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&resize->interpolation,
GINT_TO_POINTER (resize->interpolation),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), private->interpolation_menu,
private->interpolation_menu = option_menu =
gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (gimp_menu_item_update),
&resize->interpolation);
gimp_option_menu_set_history (GTK_OPTION_MENU (option_menu),
GINT_TO_POINTER (resize->interpolation));
gtk_box_pack_start (GTK_BOX (hbox), option_menu,
FALSE, FALSE, 0);
gtk_widget_show (private->interpolation_menu);
gtk_widget_show (option_menu);
}
gtk_widget_show (main_vbox);
......
......@@ -44,6 +44,7 @@
#include "widgets/gimpdeviceinfo.h"
#include "widgets/gimpdevices.h"
#include "widgets/gimpenummenu.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
......@@ -2224,22 +2225,11 @@ preferences_dialog_create (Gimp *gimp)
table = prefs_table_new (1, GTK_CONTAINER (frame), TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimp->config->interpolation_type,
GINT_TO_POINTER (gimp->config->interpolation_type),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE), NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR), NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC), NULL,
NULL);
optionmenu = gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (prefs_toggle_callback),
&gimp->config->interpolation_type);
gimp_option_menu_set_history (GTK_OPTION_MENU (optionmenu),
GINT_TO_POINTER (gimp->config->interpolation_type));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Interpolation:"), 1.0, 0.5,
......
......@@ -31,6 +31,8 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "widgets/gimpenummenu.h"
#include "resize-dialog.h"
#include "libgimp/gimpintl.h"
......@@ -660,6 +662,7 @@ resize_widget_new (GimpImage *gimage,
if (type == ScaleWidget)
{
GtkWidget *hbox;
GtkWidget *option_menu;
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
......@@ -669,29 +672,15 @@ resize_widget_new (GimpImage *gimage,
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
private->interpolation_menu =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&resize->interpolation,
GINT_TO_POINTER (resize->interpolation),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), private->interpolation_menu,
private->interpolation_menu = option_menu =
gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (gimp_menu_item_update),
&resize->interpolation);
gimp_option_menu_set_history (GTK_OPTION_MENU (option_menu),
GINT_TO_POINTER (resize->interpolation));
gtk_box_pack_start (GTK_BOX (hbox), option_menu,
FALSE, FALSE, 0);
gtk_widget_show (private->interpolation_menu);
gtk_widget_show (option_menu);
}
gtk_widget_show (main_vbox);
......
......@@ -29,6 +29,8 @@
#include "core/gimpcoreconfig.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpenummenu.h"
#include "gimprotatetool.h"
#include "gimpscaletool.h"
#include "gimptransformtool.h"
......@@ -119,27 +121,14 @@ transform_options_init (TransformOptions *options,
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
options->interpolation_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&options->interpolation,
GINT_TO_POINTER (options->interpolation),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), options->interpolation_w, FALSE, FALSE, 0);
options->interpolation_w =
gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (gimp_menu_item_update),
&options->interpolation);
gimp_option_menu_set_history (GTK_OPTION_MENU (options->interpolation_w),
GINT_TO_POINTER (options->interpolation));
gtk_box_pack_start (GTK_BOX (hbox),
options->interpolation_w, FALSE, FALSE, 0);
gtk_widget_show (options->interpolation_w);
/* the clip resulting image toggle button */
......
......@@ -29,6 +29,8 @@
#include "core/gimpcoreconfig.h"
#include "core/gimptoolinfo.h"
#include "widgets/gimpenummenu.h"
#include "gimprotatetool.h"
#include "gimpscaletool.h"
#include "gimptransformtool.h"
......@@ -119,27 +121,14 @@ transform_options_init (TransformOptions *options,
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
options->interpolation_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&options->interpolation,
GINT_TO_POINTER (options->interpolation),
_("None (Fastest)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
NULL,
_("Cubic (Slowest & Best)"),
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), options->interpolation_w, FALSE, FALSE, 0);
options->interpolation_w =
gimp_enum_option_menu_new (GIMP_TYPE_INTERPOLATION_TYPE,
G_CALLBACK (gimp_menu_item_update),
&options->interpolation);
gimp_option_menu_set_history (GTK_OPTION_MENU (options->interpolation_w),
GINT_TO_POINTER (options->interpolation));
gtk_box_pack_start (GTK_BOX (hbox),
options->interpolation_w, FALSE, FALSE, 0);
gtk_widget_show (options->interpolation_w);
/* the clip resulting image toggle button */
......
......@@ -85,6 +85,8 @@ libappwidgets_a_sources = @STRIP_BEGIN@ \
gimpdrawablepreview.h \
gimpeditor.c \
gimpeditor.h \
gimpenummenu.c \
gimpenummenu.h \
gimpfontselection.c \
gimpfontselection.h \
gimpfontselection-dialog.c \
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpenummenu.c
* Copyright (C) 2002 Sven Neumann <sven@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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "widgets-types.h"
#include "gimpenummenu.h"
static void gimp_enum_menu_class_init (GimpEnumMenuClass *klass);
static void gimp_enum_menu_init (GimpEnumMenu *enum_menu);
static void gimp_enum_menu_finalize (GObject *object);
static GtkMenuClass *parent_class = NULL;
GType
gimp_enum_menu_get_type (void)
{
static GType enum_menu_type = 0;
if (!enum_menu_type)
{
static const GTypeInfo enum_menu_info =
{
sizeof (GimpEnumMenuClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gimp_enum_menu_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpEnumMenu),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_enum_menu_init,
};
enum_menu_type = g_type_register_static (GTK_TYPE_MENU,
"GimpEnumMenu",
&enum_menu_info, 0);
}
return enum_menu_type;
}
static void
gimp_enum_menu_class_init (GimpEnumMenuClass *klass)
{
GObjectClass *object_class;
parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gimp_enum_menu_finalize;
}
static void
gimp_enum_menu_init (GimpEnumMenu *enum_menu)
{
enum_menu->enum_class = NULL;
}
static void
gimp_enum_menu_finalize (GObject *object)
{
GimpEnumMenu *enum_menu = GIMP_ENUM_MENU (object);
if (enum_menu->enum_class)
g_type_class_unref (enum_menu->enum_class);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
GtkWidget *
gimp_enum_menu_new (GType enum_type,
GCallback callback,
gpointer callback_data)
{
GimpEnumMenu *menu;
GtkWidget *menu_item;
GEnumValue *value;
g_return_val_if_fail (G_TYPE_IS_ENUM (enum_type), NULL);
menu = g_object_new (GIMP_TYPE_ENUM_MENU, NULL);
menu->enum_class = g_type_class_ref (enum_type);
for (value = menu->enum_class->values; value->value_name; value++)
{
menu_item = gtk_menu_item_new_with_label (gettext (value->value_name));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show (menu_item);
g_object_set_data (G_OBJECT (menu_item), "gimp-item-data",
GINT_TO_POINTER (value->value));
if (callback)
g_signal_connect (G_OBJECT (menu_item), "activate",
callback,
callback_data);
}
return GTK_WIDGET (menu);
}
GtkWidget *
gimp_enum_option_menu_new (GType enum_type,
GCallback callback,
gpointer callback_data)
{
GtkWidget *option_menu;
GtkWidget *menu;
g_return_val_if_fail (G_TYPE_IS_ENUM (enum_type), NULL);
menu = gimp_enum_menu_new (enum_type, callback, callback_data);
option_menu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
return option_menu;
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpenummenu.h
* Copyright (C) 2002 Sven Neumann <sven@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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_ENUM_MENU_H__
#define __GIMP_ENUM_MENU_H__
#include <gtk/gtkmenu.h>
#define GIMP_TYPE_ENUM_MENU (gimp_enum_menu_get_type ())
#define GIMP_ENUM_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_ENUM_MENU, GimpEnumMenu))
#define GIMP_ENUM_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_ENUM_MENU, GimpEnumMenuClass))
#define GIMP_IS_ENUM_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_ENUM_MENU))
#define GIMP_IS_ENUM_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_ENUM_MENU))
#define GIMP_ENUM_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ENUM_MENU, GimpEnumMenuClass))
typedef struct _GimpEnumMenuClass GimpEnumMenuClass;
struct _GimpEnumMenuClass
{
GtkMenuClass parent_instance;
};
struct _GimpEnumMenu
{
GtkMenu parent_instance;
GEnumClass *enum_class;
};
GType gimp_enum_menu_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_enum_menu_new (GType enum_type,
GCallback callback,
gpointer callback_data);
GtkWidget * gimp_enum_option_menu_new (GType enum_type,
GCallback callback,
gpointer callback_data);
#endif /* __GIMP_ENUM_MENU_H__ */
......@@ -54,6 +54,7 @@ typedef struct _GimpContainerMenu GimpContainerMenu;
typedef struct _GimpContainerMenuImpl GimpContainerMenuImpl;
typedef struct _GimpMenuItem GimpMenuItem;
typedef struct _GimpEnumMenu GimpEnumMenu;
typedef struct _GimpEditor GimpEditor;
typedef struct _GimpColormapEditor GimpColormapEditor;
......
......@@ -858,6 +858,11 @@ GIMP_MODULES=modules
AC_SUBST(GIMP_PLUGINS)
AC_SUBST(GIMP_MODULES)
dnl a tuned version of glib-mkenums
GIMP_MKENUMS="\$(top_srcdir)/tools/gimp-mkenums"
AC_SUBST(GIMP_MKENUMS)
dnl Output the Makefiles
dnl plug-ins/perl/config.pl
......
2002-03-17 Sven Neumann <sven@gimp.org>
* POTFILES.in: updated.
2002-03-13 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
* sk.po: Fix gimp_tips locale info. There are Slovak tips now.
......
......@@ -9,6 +9,8 @@ app/nav_window.c
app/undo.c
app/undo_history.c
app/base/base-enums.c
app/config/gimpconfig-deserialize.c