gimp r26711 - in trunk: . app/actions app/config app/widgets menus



Author: neo
Date: Fri Aug 22 15:33:02 2008
New Revision: 26711
URL: http://svn.gnome.org/viewvc/gimp?rev=26711&view=rev

Log:
2008-08-22  Sven Neumann  <sven gimp org>

	* app/widgets/gimptoolbox.c: removed the "Use GEGL" check-box
	from the toolbox.

	* app/config/gimpcoreconfig.c: changed the default for 
"use-gegl"
	to FALSE (in preparation of the 2.6 release).

	* app/actions/debug-commands.[ch]
	* app/actions/debug-actions.c
	* menus/image-menu.xml.in: added a "Use GEGL" check-box to the
	Debug menu. Temporary solution until a final decision is made.



Modified:
   trunk/ChangeLog
   trunk/app/actions/debug-actions.c
   trunk/app/actions/debug-commands.c
   trunk/app/actions/debug-commands.h
   trunk/app/config/gimpcoreconfig.c
   trunk/app/widgets/gimptoolbox.c
   trunk/menus/image-menu.xml.in

Modified: trunk/app/actions/debug-actions.c
==============================================================================
--- trunk/app/actions/debug-actions.c	(original)
+++ trunk/app/actions/debug-actions.c	Fri Aug 22 15:33:02 2008
@@ -24,6 +24,8 @@
 
 #include "actions-types.h"
 
+#include "core/gimp.h"
+
 #include "widgets/gimpactiongroup.h"
 
 #include "debug-actions.h"
@@ -57,8 +59,32 @@
     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)
 {
@@ -66,6 +92,15 @@
   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	Fri Aug 22 15:33:02 2008
@@ -146,6 +146,18 @@
   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	Fri Aug 22 15:33:02 2008
@@ -35,6 +35,8 @@
                                               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/config/gimpcoreconfig.c
==============================================================================
--- trunk/app/config/gimpcoreconfig.c	(original)
+++ trunk/app/config/gimpcoreconfig.c	Fri Aug 22 15:33:02 2008
@@ -363,9 +363,8 @@
   /*  not serialized  */
   g_object_class_install_property (object_class, PROP_USE_GEGL,
                                    g_param_spec_boolean ("use-gegl",
-                                                         "Use GEGL",
-                                                         "Use GEGL",
-                                                         TRUE,
+                                                         "Use GEGL", NULL,
+                                                         FALSE,
                                                          GIMP_PARAM_READWRITE |
                                                          G_PARAM_CONSTRUCT));
 }

Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c	(original)
+++ trunk/app/widgets/gimptoolbox.c	Fri Aug 22 15:33:02 2008
@@ -291,15 +291,6 @@
                            G_CALLBACK (toolbox_area_notify),
                            toolbox->image_area, 0);
 
-  {
-    GtkWidget *button;
-
-    button = gimp_prop_check_button_new (G_OBJECT (config), "use-gegl",
-                                         "Use GEGL");
-    gtk_box_pack_start (GTK_BOX (toolbox->vbox), button, FALSE, FALSE, 0);
-    gtk_widget_show (button);
-  }
-
   g_signal_connect_object (context, "tool-changed",
                            G_CALLBACK (toolbox_tool_changed),
                            toolbox->tool_wbox,

Modified: trunk/menus/image-menu.xml.in
==============================================================================
--- trunk/menus/image-menu.xml.in	(original)
+++ trunk/menus/image-menu.xml.in	Fri Aug 22 15:33:02 2008
@@ -29,6 +29,8 @@
         <menuitem action="debug-dump-items" />
         <menuitem action="debug-dump-managers" />
         <menuitem action="debug-dump-attached-data" />
+        <separator />
+        <menuitem action="debug-use-gegl" />
       </menu>
 
       <separator />



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]