[gimp] app: show the tool options in various other error cases.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: show the tool options in various other error cases.
- Date: Wed, 27 Jul 2022 08:47:47 +0000 (UTC)
commit 4a5acb24484374743d0267c96e61087f5f36d74c
Author: Jehan <jehan girinstud io>
Date: Wed Jul 27 10:45:40 2022 +0200
app: show the tool options in various other error cases.
Similar to the previous commit, use the new
gimp_tools_show_tool_options() before blinking various tool options
widgets since these are good hints for wrongly set options and it's nice
to be able to point at these.
app/tools/gimpeditselectiontool.c | 8 ++++++--
app/tools/gimpeditselectiontool.h | 2 +-
app/tools/gimpmovetool.c | 3 ++-
app/tools/gimppainttool.c | 5 ++++-
app/tools/gimptransformtool.c | 5 ++++-
app/tools/gimpwarptool.c | 2 ++
6 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index c0cef46ff9..f77060cefe 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -972,7 +972,7 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
GdkEventKey *kevent,
GimpTransformType translate_type,
GimpDisplay *display,
- GtkWidget *type_box)
+ GtkWidget **type_box)
{
gint inc_x = 0;
gint inc_y = 0;
@@ -1159,7 +1159,11 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
{
gimp_tool_message_literal (tool, display, null_message);
if (type_box)
- gimp_widget_blink (type_box);
+ {
+ gimp_tools_show_tool_options (display->gimp);
+ if (*type_box)
+ gimp_widget_blink (*type_box);
+ }
return TRUE;
}
else if (locked_message)
diff --git a/app/tools/gimpeditselectiontool.h b/app/tools/gimpeditselectiontool.h
index b34055c1a8..4561b37942 100644
--- a/app/tools/gimpeditselectiontool.h
+++ b/app/tools/gimpeditselectiontool.h
@@ -44,7 +44,7 @@ gboolean gimp_edit_selection_tool_translate (GimpTool *tool,
GdkEventKey *kevent,
GimpTransformType translate_type,
GimpDisplay *display,
- GtkWidget *type_box);
+ GtkWidget **type_box);
#endif /* __GIMP_EDIT_SELECTION_TOOL_H__ */
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index aa5ddefcf4..5b3d847b6a 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -375,6 +375,7 @@ gimp_move_tool_button_press (GimpTool *tool,
if (! active_item && ! selected_items)
{
gimp_tool_message_literal (tool, display, null_message);
+ gimp_tools_show_tool_options (display->gimp);
gimp_widget_blink (options->type_box);
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
return;
@@ -459,7 +460,7 @@ gimp_move_tool_key_press (GimpTool *tool,
return gimp_edit_selection_tool_translate (tool, kevent,
options->move_type,
display,
- options->type_box);
+ &options->type_box);
}
static void
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index 9f7bbba312..679c5a3c3e 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -344,7 +344,10 @@ gimp_paint_tool_button_press (GimpTool *tool,
mode_box = gimp_paint_options_gui_get_paint_mode_box (options_gui);
if (gtk_widget_is_sensitive (mode_box))
- gimp_widget_blink (mode_box);
+ {
+ gimp_tools_show_tool_options (display->gimp);
+ gimp_widget_blink (mode_box);
+ }
g_clear_error (&error);
g_list_free (drawables);
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index 1eee63db19..e2850f046f 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -742,7 +742,10 @@ gimp_transform_tool_check_selected_objects (GimpTransformTool *tr_tool,
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED, null_message);
if (error)
- gimp_widget_blink (options->type_box);
+ {
+ gimp_tools_show_tool_options (display->gimp);
+ gimp_widget_blink (options->type_box);
+ }
return NULL;
}
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 712e5d6400..6108d3f960 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -829,6 +829,7 @@ gimp_warp_tool_can_stroke (GimpWarpTool *wt,
gimp_tool_message_literal (tool, display,
_("No stroke events selected."));
+ gimp_tools_show_tool_options (display->gimp);
gimp_widget_blink (options->stroke_frame);
}
@@ -863,6 +864,7 @@ gimp_warp_tool_can_stroke (GimpWarpTool *wt,
{
gimp_tool_message_literal (tool, display, message);
+ gimp_tools_show_tool_options (display->gimp);
gimp_widget_blink (options->behavior_combo);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]