Matthias Clasen
e67b2cb54b
composetable: Allow multiple dead keys
...
Remove the limitation on the number of dead keys
that we match, and allow the result be be multiple
characters.
Regenerate the builtin sequences, since this changes
what dead key sequences we can reproduce algorithmically.
Update tests to match.
Fixes : #10
2021-07-29 20:37:30 -04:00
Matthias Clasen
539391ce6c
composetable: Change an API
...
Make gtk_check_algorithmically take a GString
for the result. This is in preparation for allowing
multi-character results here, in the future.
Update all callers.
2021-07-29 17:29:25 -04:00
Matthias Clasen
b6c0155836
imcontext: Handle Escape in Compose sequence
...
Treat Escape the same in hex sequences and in
Compose sequence: reset the state.
2021-07-29 08:39:17 -04:00
Matthias Clasen
76d67b586c
imcontext: Tweak Compose sequence handling
...
When we don't have any matches for a Compose sequence
anymore, beep, and keep the preedit as it was for the
last match.
Fixes : #4127
2021-07-29 08:24:14 -04:00
Matthias Clasen
914edb1472
composetable: Add a prefix api
...
Add a function that computes the longest prefix
of a buffer for which a compose table has matches.
2021-07-29 08:23:40 -04:00
Matthias Clasen
dbf5033f94
composetable: Reduce the scope of a variable
...
'prefix' is not a good name for a file-scope variable,
move it into the sole function using it.
2021-07-29 08:22:52 -04:00
Matthias Clasen
b7e6922605
imcontext: Tweak Compose sequence preedit
...
When sequences contain multiple Compose keys,
don't hide the first one. This is a very fringe
case, but it matches the behavior of IBus.
Fixes : #4124
2021-07-29 07:36:48 -04:00
Matthias Clasen
db8b3419c2
Merge branch 'compose-parse-msvc' into 'master'
...
compose-parse.c: Include stdlib.h (fix build on Visual Studio)
See merge request GNOME/gtk!3794
2021-07-28 10:38:25 +00:00
Fabio Tomat
0f5ba5192a
Update Friulian translation
...
(cherry picked from commit 16aa8dbad7
)
2021-07-28 09:11:33 +00:00
Chun-wei Fan
108c423d70
compose-parse.c: Include stdlib.h
...
That is needed for exit(), and it may not have been included by the
other headers.
2021-07-28 15:18:36 +08:00
Emmanuele Bassi
dded10a396
Merge branch 'gi-fix' into 'master'
...
gdk: add missing Since annotation
See merge request GNOME/gtk!3790
2021-07-27 17:38:28 +00:00
Marc-André Lureau
1b080826db
gdk: add missing Since annotation
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-07-27 21:01:31 +04:00
Matthias Clasen
910f23ea19
Merge branch 'wip/otte/widgetfactory-dnd' into 'master'
...
Improve DND
See merge request GNOME/gtk!3785
2021-07-27 04:12:58 +00:00
Benjamin Otte
f1b50baba1
widget-factory: Add images that support dnd
...
Just use the bottom left notebook for a GtkPicture with custom drag
source and drop target.
2021-07-27 04:40:57 +02:00
Matthias Clasen
4453597946
widget-factory: Some new backgrounds
...
Snowy wasn't ideal because of the aspect ratio.
Replace it by beach and nyc.
2021-07-27 04:40:42 +02:00
Benjamin Otte
192bfa10cb
droptarget: Make formats construct-only writable
...
This way, it can be set in GtkBuilder.
Also make sure to only ever look at the GTypes set in the formats, as
GtkDropTarget cannot deal with mime types.
2021-07-27 04:28:04 +02:00
Benjamin Otte
0781429dc5
builder: Add support for GdkContentFormats
2021-07-27 04:28:04 +02:00
Benjamin Otte
d760332f00
testsuite: Add contentformat tests
2021-07-27 04:28:04 +02:00
Benjamin Otte
131be5f2e8
contentformats: Add gdk_content_formats_parse()
2021-07-27 04:13:42 +02:00
Matthias Clasen
57a95c540c
Merge branch 'matthiasc/for-master' into 'master'
...
ngl: Cosmetics
See merge request GNOME/gtk!3786
2021-07-26 18:21:56 +00:00
Matthias Clasen
09deb1d757
ngl: Cosmetics
...
Use the macro we already have to check that colors
are fully transparent.
2021-07-26 13:42:10 -04:00
Matthias Clasen
5c4aba4b9c
Merge branch 'wip/compose-parser' into 'master'
...
Clean up the GtkComposeTable api
See merge request GNOME/gtk!3746
2021-07-26 11:51:14 +00:00
Benjamin Otte
6a5d555f58
contentformats: Change the format of gdk_content_formats_to_string()
...
Now, we just print a whitespace-separated list of GTypes and mime types.
This makes this neat for 2 things:
1. Parsing it (see next commit)
2. Using it in GtkBuilder (see commits after that)
In particular, the common case of supporting a single GType (or mime
type) looks like just printing the GType (or mime type), which in
GtkBuilder looks like
<property name="formats">GdkTexture</property>
2021-07-26 02:28:49 +02:00
Benjamin Otte
f5dc71021f
dnd: Guard drags with a reference when finishing
...
Usually the "dnd-finished" signal will be used to unref the GdkDrag. In
those cases, we would lose the object, so that when we do the final
drag_drop_done() afterwards, we wouldn't have a remaining reference.
With the reference guard, this now works.
2021-07-26 02:18:54 +02:00
Matthias Clasen
39005461c5
4.3.2
2021-07-24 22:04:49 -04:00
Matthias Clasen
4dc4c00267
Merge branch 'misc-speedups' into 'master'
...
ngl: Speed up clipping calculations a bit
See merge request GNOME/gtk!3784
2021-07-25 02:03:46 +00:00
Matthias Clasen
d76460343a
sizerequest: Simplify some code
...
Avoid some repeated MAX().
2021-07-24 18:49:41 -04:00
Matthias Clasen
0d8dd0c664
sizerequest: Keep branches in sync
...
There are some unintentional differences between
the path that uses a layout manager, and the path
that uses widget vfuncs. Sync them up.
2021-07-24 18:49:41 -04:00
Matthias Clasen
ee6491f717
widget: Avoid some unnecessary back-and-forth casting
...
Avoid some unnecessary casting and a redundant early exit.
2021-07-24 18:49:27 -04:00
Matthias Clasen
7044951dab
widget: Avoid GObject data for action muxer
...
Most widget have an action muxer now, so just
store it in GtkWidgetPrivate.
2021-07-24 18:48:10 -04:00
Matthias Clasen
98986a25f9
layoutmanager: Avoid some overhead
...
Use inline getters for some things.
2021-07-24 18:48:10 -04:00
Matthias Clasen
ae3e586714
gridlayout: Avoid some unnecessary overhead
...
Use inline functions for some things.
2021-07-24 18:48:10 -04:00
Matthias Clasen
0ef12193f9
gsk: Optimize gsk_transform_to...
...
Optimize these functions for the common cases.
2021-07-24 18:48:10 -04:00
Matthias Clasen
b695ef9168
gsk: Add a shortcut for a common transform case
...
Add a private getter for the translation part of a
transform node, to avoid pulling it out of the transform
over and over.
2021-07-24 18:48:09 -04:00
Matthias Clasen
7fb1389648
gsk: Add a private getter for container children
...
No need to get them one-by-one, in our inner loop.
2021-07-24 18:48:09 -04:00
Matthias Clasen
f88efb811b
ngl: Reduce type checking overhead
...
No need to be very careful here, these are entirely
internal types.
2021-07-24 18:48:09 -04:00
Matthias Clasen
466d33ca69
ngl: Speed up clipping calculations a bit
...
Exit as early as possible from intersect_rounded_rectilinear.
2021-07-24 18:48:09 -04:00
Piotr Drąg
d44ce1987d
Update POTFILES.in
2021-07-24 14:38:51 +02:00
Emmanuele Bassi
527b2c5ab1
Merge branch 'no-pposition' into 'master'
...
gdk/x11: Do not set PPosition hint
See merge request GNOME/gtk!3781
2021-07-24 11:45:00 +00:00
Florian Müllner
4d0c2997cf
gdk/x11: Do not set PPosition hint
...
It is good practice for (floating) window managers to respect explicit
position hints from clients (as long as the window wouldn't end up
off-screen etc.).
Before commit 13d3afa56e
, GTK had a flag for setting the PPosition hint,
but now does so unconditionally. However the real intention is to *not*
request a fixed position, so don't do that.
2021-07-24 06:32:16 +02:00
Matthias Clasen
6f04ec9dae
Merge branch 'wip/exalm/gtktext-selection-fix' into 'master'
...
text: Use the widget y coordinate for gestures
See merge request GNOME/gtk!3780
2021-07-23 20:29:07 +00:00
Alexander Mikhaylenko
00cc99818d
text: Use the widget y coordinate for gestures
...
Currently we use layout coordinates and widget height when determining
where a click or drag has happened. If the widget has top padding (which it
does inside a GtkEntry, for example), the area where it's possible to select
text is shifted down, so the part of GtkText above the layout is not counted
as the draggable area and instead the equal area below the widget is counted.
Since GtkText is always single-line, there's no need to do any of that and
we can use widget coordinates. Then the draggable area matches the widget
and the problems goes away.
2021-07-23 23:37:36 +05:00
Matthias Clasen
e51fdc1c9b
Merge branch 'stack-page-name' into 'master'
...
stack: GtkStackPage:name is not construct-only
Closes #4109
See merge request GNOME/gtk!3778
2021-07-23 14:25:29 +00:00
Matthias Clasen
8d5ef4ab30
Merge branch 'matthiasc/for-master' into 'master'
...
Cosmetics
See merge request GNOME/gtk!3779
2021-07-22 21:22:55 +00:00
Matthias Clasen
7bdda15b86
Cosmetics
...
Fix a comment typo.
2021-07-22 17:03:08 -04:00
Matthias Clasen
4c41ef8de3
stack: GtkStackPage:name is not construct-only
...
We have a setter for this property, so we clearly
weren't serious when we marked it as construct-only.
Fixes : #4109
2021-07-22 16:55:15 -04:00
Matthias Clasen
7aec3b0fa1
Merge branch 'startup-profiling' into 'master'
...
Add more sysprof marks
See merge request GNOME/gtk!3777
2021-07-22 19:20:22 +00:00
Matthias Clasen
fce23c981b
Add more sysprof marks
...
Add a few more marks during gtk_init to figure out where
our startup time goes, and avoid the sysprof initialization
from distorting the first mark.
2021-07-22 14:47:02 -04:00
Matthias Clasen
351819b570
Merge branch 'startup-profiling' into 'master'
...
Add more sysprof marks
See merge request GNOME/gtk!3776
2021-07-22 17:04:27 +00:00
Matthias Clasen
a10b1b7341
Add more sysprof marks
...
Add a few more marks during gtk_init to figure out where
our startup time goes, and avoid the sysprof initialization
from distorting the first mark.
2021-07-22 12:51:32 -04:00