Closed Bug 172203 Opened 22 years ago Closed 19 years ago

Use GTK2 setting to determine if textfields should be selected when tabbed to

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: blizzard)

References

Details

(Keywords: helpwanted)

Attachments

(2 files)

In bug 28583, we are implementing select text field contents on keyboard focus.

GTK2 has an OS-wide setting that should be exposed through
widget/src/gtk2/nsLookAndFeel.cpp
at case eMetric_SelectTextfieldsOnKeyFocus:

Akkana, on IRC you mentioned something about ~/.gtkrc-2.0
gtk-entry-select-on-focus = 0
Blocks: 28583
Blocks: gtk2
I need to figure out how to get that setting - I don't think it's that hard to
figure out.
It's a gtksetting, just use

settings = gtk_settings_get_default ();
gboolean bool;

g_object_get (settings, "settings_name", &boolean, NULL);

You can also monitor any changes to the setting by connecting to the
"notify::settings_name" signal of the GtkSettings object.
Great, thanks.
The dependency bug 28583 is ready for sr=
No longer blocks: 28583
Depends on: 28583
I can make a patch for this if you want blizzard...
Sure, go right ahead!
-> blizzard@mozilla.org
Assignee: akkana → blizzard
Attached patch PatchSplinter Review
This patch seems to work for me, although text in the bookmark name entry will
always be selected. That seems to be an issue with the bookmark dialog.
Comment on attachment 104133 [details] [diff] [review]
Patch

From 2002 and it hasn't bitrot a bit! Let's get this one checked in.
Attachment #104133 - Flags: superreview?(blizzard)
Attachment #104133 - Flags: review?(pavlov)
Attachment #104133 - Flags: superreview?(blizzard) → superreview?(bryner)
Attachment #104133 - Flags: review?(pavlov) → review?(blizzard)
Attachment #104133 - Flags: review?(blizzard) → review+
Comment on attachment 104133 [details] [diff] [review]
Patch

Hm, is all the ref/sink/unref stuff really needed?  Blizzard would know better
than me.  One nit: space after "if".
Attachment #104133 - Flags: superreview?(bryner) → superreview+
I would expect that stuff to be required, yeah.
the patch has been r/sr'd --but I'm not sure how much of it has bit-rotted.
nominating for the 1.8a5 train, in case it's can easily be cleaned up (if
needed) and checked in.
Flags: blocking1.8a5?
Let's try for 1.8a6.
Flags: blocking1.8a5? → blocking1.8a5-
Flags: blocking1.8a6?
this would be nice to have but it's not a blocker. 
Flags: blocking1.8a6? → blocking1.8a6-
Flags: blocking1.8b?
Attached patch patch (updated)Splinter Review
The patch is quite old, so I redo a patch without any change.
It works well.
Shall we commit it?
Looking at the patch I don't see any reason why we shouldn't commit it still.
Not a blocker, but please do check in once the tree opens for 1.8b2.
Flags: blocking1.8b? → blocking1.8b-
Checking in nsLookAndFeel.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsLookAndFeel.cpp,v  <--  nsLookAndFeel.cpp
new revision: 1.22; previous revision: 1.21
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: