[gimp] app: properly grab focus when targetting text input of GimpSpinScale.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: properly grab focus when targetting text input of GimpSpinScale.
- Date: Thu, 5 Nov 2020 17:19:14 +0000 (UTC)
commit 3449652fe84b3e3167ada9808801031498c1bad6
Author: Jehan <jehan girinstud io>
Date: Wed Nov 4 18:32:27 2020 +0100
app: properly grab focus when targetting text input of GimpSpinScale.
By just redirecting to parent signal handler, it was not properly
grabbing focus. In particular for a text entry with number input, we
want the text to be fully selected (because when we go for inputting
numbers, it is more often than not because we want to enter free numbers
very different from existing value).
So let's grab the entry focus, hence fully select current number
contents.
app/widgets/gimpspinscale.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index f3293803b3..624df43f79 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -818,6 +818,10 @@ gimp_spin_scale_button_press (GtkWidget *widget,
return TRUE;
+ case TARGET_NUMBER:
+ gtk_widget_grab_focus (widget);
+ return TRUE;
+
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]