Commit Graph

69 Commits

Author SHA1 Message Date
Matthias Clasen
e499a09759 Drop gtkintl.h
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
2022-09-24 10:03:37 -04:00
Christopher Davis
9f2a621328 passwordentry: Use password input purpose
Per discussion in #gtk on Matrix
2022-07-06 13:48:25 -04:00
Sophie Herold
a546ae32d7 Remove all nicks and blurbs from param specs
Those property features don't seem to be in use anywhere.
They are redundant since the docs cover the same information
and more. They also created unnecessary translation work.

Closes #4904
2022-05-11 18:16:29 +02:00
Alexander Mikhaylenko
1ca2d41a98 icons: Use the proper eye icons
adwaita-icon-theme has more appropriate icons for showing/hiding text now.
use those, and in the process fix the fact GtkPasswordEntry has been using
them the other way around.
2022-04-22 16:22:05 +04:00
Bilal Elmoussaoui
e7fc8ad1f5 gtk: fix PasswordEntry annotation 2022-01-01 17:49:11 +01:00
Carlos Garnacho
e652054d50 gtkpasswordentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-24 01:13:29 +02:00
Carlos Garnacho
58c31b8627 gtkpasswordentry: Consume click events after pressing on icon
This may result in user actions, so the gesture should consume the
events.
2021-08-24 01:12:31 +02:00
Maximiliano Sandoval R
ead31db096
password_entry: Header Capitalization on tooltip
See https://teams.pages.gitlab.gnome.org/Design/hig-www/feedback/tooltips.html
2021-07-20 13:00:05 +02:00
Christian Hergert
d63d9b2319 joinedmenu: add helper to join menus instead of nesting
In many cases, we have an "extra-menu" property that is used to allow
applications to join menus into the native menu for the widget. Previously,
this was done by nesting that menu in a section.

Doing so increases the complexity of the rules for GtkMenuTracker as you
may want different handling from inside of the section vs toplevel
sections.

If instead we synthetically glue the menus together, we have a much more
natural joining of menus as the application developer would expect for
their menu.

This also ports GtkLabel, GtkText, GtkPasswordEntry, and GtkTextView to
use the joined menu helper.

The joined menu helper comes originally from GNOME Builder and has had
extensive use there.

Fixes #4094
2021-07-08 14:16:06 -07:00
Matthias Clasen
d8bde48b87 Make GtkPasswordEntryBuffer public 2021-06-08 11:25:11 +00:00
Matthias Clasen
91f7b9663f gtk: Clean up docs syntax
Replace leftover gtk-doc syntax (#Type) with backquotes.
2021-05-22 17:25:26 -04:00
Matthias Clasen
7fe0610b68 introspection: Stop using allow-none
allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.
2021-05-20 19:17:49 -04:00
Matthias Clasen
9e8187bdc4 a11y: Track window states more closely
Orca ignores events unless the object is inside an object
with role window and states ACTIVE and SHOWING. To arrange
for this, introduce a new ACTIVE platform state, and set it
for windows when they are active.

This gets orca to be a lot more talkative.
2021-04-19 19:22:20 +01:00
Matthias Clasen
27b338a90b passwordentry: Use markdown for css tree 2021-03-11 16:37:35 +00:00
Matthias Clasen
cf6f57b41c passwordentry: Add property annotations
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
231a19abb9 passwordentry: Convert docs
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
10d5705b70 Reduce use of GtkStyleContext
Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
2021-01-28 12:27:07 -05:00
Emmanuele Bassi
fc4402b456 docs: Ignore gtkpasswordentryprivate.h 2020-12-16 16:29:00 +00:00
Matthias Clasen
e5722fe9d2 passwordentry: Respect border spacing
We are not using a box layout here since we want
to ignore the icons for measuring. But we still
want the layout to respect border spacing that
comes from the theme.
2020-10-22 14:27:19 -04:00
Emmanuele Bassi
a83d3078c2 Allow toggling the password entry visibility programmatically
We are going to need a method for toggling the visibility from the
accessibility layer.
2020-10-16 00:34:01 +01:00
Matthias Clasen
9c28ecb0da Merge branch 'a11y/atspi' into 'master'
A11y/atspi

See merge request GNOME/gtk!2698
2020-10-15 14:59:24 +00:00
Timm Bäder
eca3eab96f Remove unneeded gtkstylecontext.h includes 2020-10-14 15:06:12 -04:00
Matthias Clasen
852c72fa28 passwordentry: Implement GtkAccessible
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
4a2c817690 docs: Document various entry ::activate signals 2020-09-29 07:04:07 -04:00
Matthias Clasen
dd0da0f3cc passwordentry: Add an ::activate signal
GtkSearchEntry has one, no reason why GtkPasswordEntry
should not as well.

Fixes: #3174
2020-09-19 13:25:03 -04:00
Matthias Clasen
48594a2d7a passwordentry: Drop the Private struct 2020-09-19 13:23:40 -04:00
Emmanuele Bassi
ae97284409 docs: Add a note on GtkPasswordEntry's secure storage 2020-09-08 23:50:12 +01:00
Emmanuele Bassi
7cda32d49e Use GtkPasswordEntryBuffer in GtkPasswordEntry
Now that we have a secure buffer, we should start using it.

Fixed: #3119
2020-09-08 23:50:12 +01:00
Matthias Clasen
1755e07af7 a11y: Set an accessible role for GtkPasswordEntry
Use the text-box accessible role for GtkPasswordEntry.
And set properties as appropriate.

Update the documentation and add a test.
2020-07-28 18:23:57 -04:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:

 - it maps to a very specific implementation, AT-SPI, which is Linux and
   Unix specific
 - it requires implementing the same functionality in three different
   layers of the stack: AT-SPI, ATK, and GTK
 - only GTK uses it; every other Linux and Unix toolkit and application
   talks to AT-SPI directly, including assistive technologies

Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:

 - add an "accessible" interface, implemented by GTK objects directly,
   which describe the accessible role and state changes for every UI
   element
 - add an "assistive technology context" to proxy a native accessibility
   API, and assign it to every widget
 - implement the AT context depending on the platform

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Matthias Clasen
fd2861d683 docs: Add css docs to entries
The various entries were missing the semi-standard
"CSS Nodes" section in their long descriptions. Add
them.
2020-06-26 16:13:02 -04:00
Matthias Clasen
c175a7a470 searchentry: Fix keynav
Shift-Tabbing was getting stuck in GtkSearchEntry and
GtkPasswordEntry, since they grab the focus to a child
of theirs. Copy the same fix that we are already using
in GtkEntry.

Fixes: #2842
2020-06-15 13:48:03 -04:00
Emmanuele Bassi
e63419fbf4 a11y: Implement GtkPasswordEntryAccessible properly
GtkPasswordEntryAccessible is not a GtkEntryAccessible any more, so it
will need a proper implementation of various interfaces and
functionality in order to work like any other entry.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
7373cd962c a11y: Split password entry accessible from GtkEntryAccessible
Use a separate accessible object.
2020-06-05 20:35:10 +01:00
Matthias Clasen
8912a6eb75 gtk: Handle seatless displays
If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.

gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
2020-05-15 14:11:53 -04:00
Matthias Clasen
b93631164f Remove lots of focus vfuncs
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00
Matthias Clasen
632524f679 Reinstate expected focus behavior
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.

This commit does that for all widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
234a21905c gtk: Stop using keymap apis
Stop using most keymap apis in GTK. Only a few calls
related to virtual modifiers are left.
2020-04-06 01:40:49 -04:00
Matthias Clasen
f27470aaf4 passwordentry: Show caps lock warning more
Show the caps lock warning regardless of whether we
have the peek icon or not.
2020-04-05 23:43:41 -04:00
Emmanuele Bassi
a9c3a33620 passwordentry: Remove unused include 2020-03-25 21:53:12 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Emmanuele Bassi
f24cf29326 passwordentry: Remove unused include 2020-03-18 23:00:50 -04:00
Timm Bäder
655711fef2 Rename gtk_widget{get,set,has}_style_class to _css_class
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28 Start using GtkWidget's new style class API 2020-02-07 13:16:32 -05:00
Matthias Clasen
7ee5779efc gtk: Remove menu code
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Benjamin Otte
427deb4f13 widget: Make gtk_widget_grab_focus() return a boolean
So now it can actually fail.

It doesn't yet though.
2019-10-15 16:33:05 +02:00
Timm Bäder
8b16e44d26 passwordentry: Fix a documentation comment parameter name 2019-08-07 13:12:57 +02:00
Timm Bäder
0d95c5dfe2 passwordentry: Normalize boolean value 2019-07-24 08:10:37 +02:00
Timm Bäder
f2a2908c59 passwordentry: Remove empty vfunc implementation 2019-07-24 08:10:26 +02:00
Matthias Clasen
ccccaa2681 password entry: Adapt to action name change
Also fix updating the icon when changing visibility
via the context menu.
2019-06-18 14:47:33 -04:00