Commit Graph

31497 Commits

Author SHA1 Message Date
Matthias Clasen
103637f3b9 text: Remove has-frame leftovers 2019-02-21 00:30:48 -05:00
Matthias Clasen
74f4aecef5 text: Make this a final class
No need to derive from it.
2019-02-20 13:11:17 -05:00
Matthias Clasen
2e9c7d0744 search entry: Quiet a compiler warning 2019-02-20 13:10:09 -05:00
Matthias Clasen
82bde1e10a text: Remove the ::has-frame property
This is purely GtkEntry functionality and should
remain there.
2019-02-20 10:34:42 -05:00
Matthias Clasen
eb8b1095c8 emoji chooser: Don't use entry api on search entries
Use editable api, and cut through to the text widget
where necessary.
2019-02-20 10:32:12 -05:00
Matthias Clasen
b303c20570 search entry: Add private api to get the text widget
We need this to do some custom setup in the Emoji chooser.
2019-02-20 10:29:26 -05:00
Benjamin Otte
02e856f62e widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
Lots of code does not error-check these functions, and when we add CSS
transforms, they will start failing. And we want people to check that.
2019-02-20 05:26:39 +01:00
Benjamin Otte
01f7f255b5 gtk: Check return value of compute_bounds()
Half of these calls will completely break if anybody ever uses CSS
transforms with them, but hey...
2019-02-20 05:26:31 +01:00
Benjamin Otte
514c3679dc widget: Always set out value
Don't leave memory in an unitinialized case when returning FALSE from
gtk_widget_compute_transform().

We both know that people are going to call that function without
checking the return value.
2019-02-20 04:07:34 +01:00
Benjamin Otte
8fbfa955de widget: Fail if matrix not invertible 2019-02-20 04:05:37 +01:00
Benjamin Otte
cfc7dc016e widget: Add optimizations to gtk_widget_compute_transform()
Try to catch 2 common cases with as little work as necessary.
2019-02-20 04:04:29 +01:00
Benjamin Otte
8222631d63 widget: Clean up gtk_widget_compute_transform()
The code was all over the place and being clear here is very useful.
2019-02-20 03:48:41 +01:00
Matthias Clasen
93b47c12d7 Fix gtk_widget_compute_transform
We were collecting all the transforms from widget
up to ancestor, and then trying to collect the
ones from target to ancestor, but failing.
2019-02-19 19:31:16 -05:00
Benjamin Otte
9a8082bab2 widget: Remove gtk_widget_get_allocated_size()
Use gtk_widget_get_allocated_width/height in the only user (GtkStack),
even though that isn't 100% correct.
2019-02-19 19:29:58 +01:00
Benjamin Otte
e223f16aa9 widget: Add gtk_widget_compute_point()
It's the replacement for gtk_widget_translate_coordinates()
2019-02-19 19:22:10 +01:00
Benjamin Otte
dead174d70 Remove nonexisting function from header 2019-02-19 19:22:10 +01:00
Timm Bäder
e922ec1839 widget: Compute child point directly when picking 2019-02-19 19:22:10 +01:00
Timm Bäder
63a23ed0da widget: Remove unused function 2019-02-19 19:22:09 +01:00
Timm Bäder
2ecb4003be widget: Avoid some type checks in pick() and contains()
We've already verified that the given pointer is a proper GtkWidget, so
no need to do it all over again.
2019-02-19 19:22:09 +01:00
Timm Bäder
a953fd762e widget: Add typecheck-less _is_sensitive
It adds up to a whopping 3% in gtk_widget_pick
2019-02-19 19:22:09 +01:00
Timm Bäder
dbf0654e5b widget: Add gtk_widget_compute_transform 2019-02-19 19:22:09 +01:00
Timm Bäder
4529f52c02 widget: Use CSS boxes in gtk_widget_real_contains() 2019-02-19 19:22:09 +01:00
Matthias Clasen
63a8bd06a6 stack sidebar: Fix sorting
Fix sorting, by not sorting.
2019-02-19 11:23:28 -05:00
Matthias Clasen
7c6e3e31c7 Merge branch 'portal-session-state-master' into 'master'
Portal session state

See merge request GNOME/gtk!587
2019-02-19 12:35:14 +00:00
Matthias Clasen
d006ee65f5 application: Add a query-end signal
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
2019-02-19 00:56:31 -05:00
Matthias Clasen
65e9d71da5 Application: Support sandboxed session state changes
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
2019-02-19 00:56:31 -05:00
Benjamin Otte
02bb364474 widget: Remove lefover debug code
According to someone involved with those lines, I suck at reviewing
their patches.
2019-02-19 06:50:34 +01:00
Matthias Clasen
9174616a17 Merge branch 'text' into 'master'
GtkEntry reshuffling

Closes #1483

See merge request GNOME/gtk!585
2019-02-19 05:45:44 +00:00
Matthias Clasen
0ef6c3afed search entry: Add a tooltip to th clear icon
Similar to what we do for the caps-lock warning in the
password entry.

Closes #1483
2019-02-19 00:32:35 -05:00
Matthias Clasen
b299ac8dfa Add editable delegate api to docs
And add a section that explains how to use these
functions when setting up a GtkEditable delegate.
2019-02-19 00:25:59 -05:00
Matthias Clasen
08bd6904b9 file chooser: Use editable api on the search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
37b841b59b font chooser: Use editable api on search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
7d9e63ae38 app chooser: Use editable api on search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
b8c981fb2b inspector: Work with new search entry
Don't assume a search entry is an entry, and
use the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
3a1a7c43f3 treeview: make search work
Make search work with both GtkEntry and GtkSearchEntry,
even if a GtkSearchEntry is not derived from GtkEntry
anymore.
2019-02-19 00:25:59 -05:00
Matthias Clasen
fa3d1940bf search bar: Work with the new GtkSearchEntry
Don't assume a search entry is an entry, and use
the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
667ea2dd42 search entry: Use a GtkText 2019-02-19 00:25:59 -05:00
Matthias Clasen
c6e6fb19e7 Add GtkPasswordEntry
This is a simple editable which hides the entered
text and shows a caps-lock warning.
2019-02-19 00:25:59 -05:00
Matthias Clasen
39d5f9e07b entry completion: Make this work again
Connect to GtkText signals where necessary.
2019-02-19 00:25:59 -05:00
Matthias Clasen
cbbc7dd70f treeview: use a GtkText as search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
a31da76f95 treeview: Disable some search entry functionality
This needs to be rewritten. Until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
8bb6d00ce2 search entry: temporarily disable some functions
The search entry needs to be rewritten to use a
text child until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
1930c74736 spin button: Use GtkText
We already use GtkEditable api throughout. This just
means we create a GtkText instead of a GtkEntry.
2019-02-19 00:25:59 -05:00
Matthias Clasen
ea098f8d51 entry accessible: Make this work with the text widget 2019-02-19 00:25:59 -05:00
Matthias Clasen
45fb1d06e3 entry: Delegate to GtkText
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.

Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
2019-02-19 00:25:59 -05:00
Benjamin Otte
d247e5707d widget: Fix gtk_widget_size_allocate()
Compute the matrix for adjusted sizes etc properly.
2019-02-19 05:52:11 +01:00
Benjamin Otte
36ac867ea9 recorder: Print the matrix for transform nodes 2019-02-19 05:52:11 +01:00
Matthias Clasen
936181f354 Add a GtkTextAccessible
Add an accessible implementation for GtkText.
2019-02-18 14:24:21 -05:00
Matthias Clasen
fcb58887fa Make emoji completion work for GtkText
GtkEntry will stop using it directly in the following commits.
2019-02-18 14:24:21 -05:00
Matthias Clasen
1801bf6d83 Add a GtkText widget
This is a GtkEntry without any of the extras, such as
icons, completion, progress, caps-lock warning, emoji icon.
2019-02-18 14:24:21 -05:00