gimp r27035 - in trunk: . app/actions app/menus app/widgets menus po
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27035 - in trunk: . app/actions app/menus app/widgets menus po
- Date: Tue, 23 Sep 2008 07:02:24 +0000 (UTC)
Author: neo
Date: Tue Sep 23 07:02:24 2008
New Revision: 27035
URL: http://svn.gnome.org/viewvc/gimp?rev=27035&view=rev
Log:
2008-09-23 Sven Neumann <sven gimp org>
Move the "Use GEGL" check-box to the Colors menu (bug #548760):
* app/actions/Makefile.am
* app/actions/config-actions.[ch]
* app/actions/config-commands.[ch]: new files holding the
"config"
action group that includes the "use-gegl" toggle action.
* app/actions/debug-actions.c
* app/actions/debug-commands.[ch]: removed the "use-gegl"
action
here.
* app/menus/menus.c
* app/actions/actions.c: added the new action group.
* app/widgets/gimphelp-ids.h: added a help ID for the
"use-gegl"
action.
* menus/image-menu.xml.in: moved the "Use GEGL" check-box to
the
Colors menu.
Added:
trunk/app/actions/config-actions.c
trunk/app/actions/config-actions.h
trunk/app/actions/config-commands.c
trunk/app/actions/config-commands.h
Modified:
trunk/ChangeLog
trunk/app/actions/Makefile.am
trunk/app/actions/actions.c
trunk/app/actions/debug-actions.c
trunk/app/actions/debug-commands.c
trunk/app/actions/debug-commands.h
trunk/app/menus/menus.c
trunk/app/widgets/gimphelp-ids.h
trunk/menus/image-menu.xml.in
trunk/po/ChangeLog
trunk/po/POTFILES.in
Modified: trunk/app/actions/Makefile.am
==============================================================================
--- trunk/app/actions/Makefile.am (original)
+++ trunk/app/actions/Makefile.am Tue Sep 23 07:02:24 2008
@@ -23,6 +23,10 @@
colormap-actions.h \
colormap-commands.c \
colormap-commands.h \
+ config-actions.c \
+ config-actions.h \
+ config-commands.c \
+ config-commands.h \
context-actions.c \
context-actions.h \
context-commands.c \
Modified: trunk/app/actions/actions.c
==============================================================================
--- trunk/app/actions/actions.c (original)
+++ trunk/app/actions/actions.c Tue Sep 23 07:02:24 2008
@@ -52,6 +52,7 @@
#include "buffers-actions.h"
#include "channels-actions.h"
#include "colormap-actions.h"
+#include "config-actions.h"
#include "context-actions.h"
#include "cursor-info-actions.h"
#include "debug-actions.h"
@@ -112,6 +113,9 @@
{ "colormap", N_("Colormap"), GIMP_STOCK_COLORMAP,
colormap_actions_setup,
colormap_actions_update },
+ { "config", N_("Configuration"), GTK_STOCK_PREFERENCES,
+ config_actions_setup,
+ config_actions_update },
{ "context", N_("Context"), GIMP_STOCK_TOOL_OPTIONS /* well... */,
context_actions_setup,
context_actions_update },
Added: trunk/app/actions/config-actions.c
==============================================================================
--- (empty file)
+++ trunk/app/actions/config-actions.c Tue Sep 23 07:02:24 2008
@@ -0,0 +1,84 @@
+/* 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 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 "actions-types.h"
+
+#include "config/gimpcoreconfig.h"
+
+#include "core/gimp.h"
+
+#include "widgets/gimpactiongroup.h"
+#include "widgets/gimphelp-ids.h"
+
+#include "config-actions.h"
+#include "config-commands.h"
+
+#include "gimp-intl.h"
+
+
+static const GimpToggleActionEntry config_toggle_actions[] =
+{
+ { "config-use-gegl", NULL,
+ N_("Use _GEGL"), NULL,
+ N_("If possible, use GEGL for image processing"),
+ G_CALLBACK (config_use_gegl_cmd_callback),
+ FALSE,
+ GIMP_HELP_CONFIG_USE_GEGL }
+};
+
+
+static void
+config_actions_use_gegl_notify (GObject *config,
+ GParamSpec *pspec,
+ GimpActionGroup *group)
+{
+ gboolean active;
+
+ g_object_get (config,
+ "use-gegl", &active,
+ NULL);
+
+ gimp_action_group_set_action_active (group, "config-use-gegl", active);
+}
+
+void
+config_actions_setup (GimpActionGroup *group)
+{
+ gimp_action_group_add_toggle_actions (group,
+ config_toggle_actions,
+ G_N_ELEMENTS (config_toggle_actions));
+
+ g_signal_connect_object (group->gimp->config,
+ "notify::use-gegl",
+ G_CALLBACK (config_actions_use_gegl_notify),
+ group, 0);
+}
+
+void
+config_actions_update (GimpActionGroup *group,
+ gpointer data)
+{
+#define SET_ACTIVE(action,condition) \
+ gimp_action_group_set_action_active (group, action, (condition) != 0)
+
+ SET_ACTIVE ("config-use-gegl", group->gimp->config->use_gegl);
+}
Added: trunk/app/actions/config-actions.h
==============================================================================
--- (empty file)
+++ trunk/app/actions/config-actions.h Tue Sep 23 07:02:24 2008
@@ -0,0 +1,28 @@
+/* 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 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 __CONFIG_ACTIONS_H__
+#define __CONFIG_ACTIONS_H__
+
+
+void config_actions_setup (GimpActionGroup *group);
+void config_actions_update (GimpActionGroup *group,
+ gpointer data);
+
+
+#endif /* __CONFIG_ACTIONS_H__ */
Added: trunk/app/actions/config-commands.c
==============================================================================
--- (empty file)
+++ trunk/app/actions/config-commands.c Tue Sep 23 07:02:24 2008
@@ -0,0 +1,43 @@
+/* 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 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 "actions-types.h"
+
+#include "core/gimp.h"
+
+#include "actions.h"
+#include "config-commands.h"
+
+
+/* public functions */
+
+void
+config_use_gegl_cmd_callback (GtkAction *action,
+ gpointer data)
+{
+ GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
+ Gimp *gimp = action_data_get_gimp (data);
+
+ g_object_set (gimp->config,
+ "use-gegl", gtk_toggle_action_get_active (toggle_action),
+ NULL);
+}
Added: trunk/app/actions/config-commands.h
==============================================================================
--- (empty file)
+++ trunk/app/actions/config-commands.h Tue Sep 23 07:02:24 2008
@@ -0,0 +1,27 @@
+/* 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 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 __CONFIG_COMMANDS_H__
+#define __CONFIG_COMMANDS_H__
+
+
+void config_use_gegl_cmd_callback (GtkAction *action,
+ gpointer data);
+
+
+#endif /* __CONFIG_COMMANDS_H__ */
Modified: trunk/app/actions/debug-actions.c
==============================================================================
--- trunk/app/actions/debug-actions.c (original)
+++ trunk/app/actions/debug-actions.c Tue Sep 23 07:02:24 2008
@@ -59,32 +59,8 @@
NULL }
};
-static const GimpToggleActionEntry debug_toggle_actions[] =
-{
- { "debug-use-gegl", NULL,
- "Use _GEGL", NULL,
- "If possible, use GEGL for image processing",
- G_CALLBACK (debug_use_gegl_cmd_callback),
- FALSE,
- NULL }
-};
-
#endif
-static void
-debug_actions_use_gegl_notify (GObject *config,
- GParamSpec *pspec,
- GimpActionGroup *group)
-{
- gboolean active;
-
- g_object_get (config,
- "use-gegl", &active,
- NULL);
-
- gimp_action_group_set_action_active (group, "debug-use-gegl", active);
-}
-
void
debug_actions_setup (GimpActionGroup *group)
{
@@ -92,15 +68,6 @@
gimp_action_group_add_actions (group,
debug_actions,
G_N_ELEMENTS (debug_actions));
-
- gimp_action_group_add_toggle_actions (group,
- debug_toggle_actions,
- G_N_ELEMENTS (debug_toggle_actions));
-
- g_signal_connect_object (group->gimp->config,
- "notify::use-gegl",
- G_CALLBACK (debug_actions_use_gegl_notify),
- group, 0);
#endif
}
Modified: trunk/app/actions/debug-commands.c
==============================================================================
--- trunk/app/actions/debug-commands.c (original)
+++ trunk/app/actions/debug-commands.c Tue Sep 23 07:02:24 2008
@@ -146,18 +146,6 @@
debug_print_qdata (GIMP_OBJECT (user_context));
}
-void
-debug_use_gegl_cmd_callback (GtkAction *action,
- gpointer data)
-{
- GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
- Gimp *gimp = action_data_get_gimp (data);
-
- g_object_set (gimp->config,
- "use-gegl", gtk_toggle_action_get_active (toggle_action),
- NULL);
-}
-
/* private functions */
Modified: trunk/app/actions/debug-commands.h
==============================================================================
--- trunk/app/actions/debug-commands.h (original)
+++ trunk/app/actions/debug-commands.h Tue Sep 23 07:02:24 2008
@@ -35,8 +35,6 @@
gpointer data);
void debug_dump_attached_data_cmd_callback (GtkAction *action,
gpointer data);
-void debug_use_gegl_cmd_callback (GtkAction *action,
- gpointer data);
#endif /* ENABLE_DEBUG_MENU */
Modified: trunk/app/menus/menus.c
==============================================================================
--- trunk/app/menus/menus.c (original)
+++ trunk/app/menus/menus.c Tue Sep 23 07:02:24 2008
@@ -94,6 +94,7 @@
gimp_menu_factory_manager_register (global_menu_factory, "<Image>",
"file",
+ "config",
"context",
"debug",
"help",
@@ -121,6 +122,7 @@
gimp_menu_factory_manager_register (global_menu_factory, "<Toolbox>",
"file",
+ "config",
"context",
"help",
"edit",
@@ -140,6 +142,7 @@
gimp_menu_factory_manager_register (global_menu_factory, "<Dock>",
"file",
+ "config",
"context",
"edit",
"select",
Modified: trunk/app/widgets/gimphelp-ids.h
==============================================================================
--- trunk/app/widgets/gimphelp-ids.h (original)
+++ trunk/app/widgets/gimphelp-ids.h Tue Sep 23 07:02:24 2008
@@ -499,5 +499,7 @@
#define GIMP_HELP_CONTROLLER_MIDI "gimp-controller-midi"
#define GIMP_HELP_CONTROLLER_WHEEL "gimp-controller-wheel"
+#define GIMP_HELP_CONFIG_USE_GEGL "gimp-config-use-gegl"
+
#endif /* __GIMP_HELP_IDS_H__ */
Modified: trunk/menus/image-menu.xml.in
==============================================================================
--- trunk/menus/image-menu.xml.in (original)
+++ trunk/menus/image-menu.xml.in Tue Sep 23 07:02:24 2008
@@ -29,8 +29,6 @@
<menuitem action="debug-dump-items" />
<menuitem action="debug-dump-managers" />
<menuitem action="debug-dump-attached-data" />
- <separator />
- <menuitem action="debug-use-gegl" />
</menu>
<separator />
@@ -488,6 +486,8 @@
<menuitem action="drawable-invert" />
</placeholder>
<separator />
+ <menuitem action="config-use-gegl" />
+ <separator />
<menu action="colors-auto-menu" name="Auto">
<menuitem action="drawable-equalize" />
<menuitem action="drawable-levels-stretch" />
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Tue Sep 23 07:02:24 2008
@@ -18,6 +18,7 @@
app/actions/channels-commands.c
app/actions/colormap-actions.c
app/actions/colormap-commands.c
+app/actions/config-actions.c
app/actions/context-actions.c
app/actions/cursor-info-actions.c
app/actions/data-commands.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]