Commit 2c2e542e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/tools/gimpforegroundselectoptions.c use Ctrl to switch between

2006-03-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpforegroundselectoptions.c
	* app/tools/gimpforegroundselecttool.c: use Ctrl to switch between
	foreground and background refinement.
parent 601e45ea
2006-03-27 Sven Neumann <sven@gimp.org>
* app/tools/gimpforegroundselectoptions.c
* app/tools/gimpforegroundselecttool.c: use Ctrl to switch between
foreground and background refinement.
2006-03-27 Karine Delvare <edhel@gimp.org>
 
* app/tools/gimpnewrectselecttool.c: allow modifier keys to work.
......
......@@ -29,6 +29,8 @@
#include "core/gimptoolinfo.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpforegroundselectoptions.h"
#include "gimptooloptions-gui.h"
......@@ -224,6 +226,7 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
GtkWidget *inner_frame;
GtkWidget *table;
GtkObject *adj;
gchar *title;
gint row = 0;
/* single / multiple objects */
......@@ -232,10 +235,13 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (button);
/* foreground / background */
frame = gimp_prop_boolean_radio_frame_new (config, "background",
_("Interactive refinement"),
title = g_strdup_printf (_("Interactive refinement (%s)"),
gimp_get_mod_string (GDK_CONTROL_MASK));
frame = gimp_prop_boolean_radio_frame_new (config, "background", title,
_("Mark background"),
_("Mark foreground"));
g_free (title);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......
......@@ -75,6 +75,11 @@ static void gimp_foreground_select_tool_oper_update (GimpTool *tool,
GdkModifierType state,
gboolean proximity,
GimpDisplay *gdisp);
static void gimp_foreground_select_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_foreground_select_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
......@@ -159,6 +164,7 @@ gimp_foreground_select_tool_class_init (GimpForegroundSelectToolClass *klass)
tool_class->control = gimp_foreground_select_tool_control;
tool_class->oper_update = gimp_foreground_select_tool_oper_update;
tool_class->modifier_key = gimp_foreground_select_tool_modifier_key;
tool_class->cursor_update = gimp_foreground_select_tool_cursor_update;
tool_class->key_press = gimp_foreground_select_tool_key_press;
tool_class->button_press = gimp_foreground_select_tool_button_press;
......@@ -328,6 +334,25 @@ gimp_foreground_select_tool_oper_update (GimpTool *tool,
}
}
static void
gimp_foreground_select_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *gdisp)
{
if (key == GDK_CONTROL_MASK)
{
GimpForegroundSelectOptions *options;
options = GIMP_FOREGROUND_SELECT_OPTIONS (tool->tool_info->tool_options);
g_object_set (options,
"background", ! options->background,
NULL);
}
}
static void
gimp_foreground_select_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
......
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