Bilal Elmoussaoui
6b63868641
g-i: mark get_selected_printer as nullable
...
There is no selected printer if the user closes the dialog
Fixes https://github.com/gtk-rs/gtk4-rs/issues/882
2022-02-11 12:05:42 +01:00
Bilal Elmoussaoui
cb710f1999
g-i: mark EventController::name as nullable
...
Fixes https://github.com/gtk-rs/gtk4-rs/issues/893
2022-02-11 12:02:07 +01:00
Bilal Elmoussaoui
85bb9aaefc
g-i: add nullable annotation to gtk_single_selection_get_model
2022-02-11 11:56:40 +01:00
Bilal Elmoussaoui
6c02017212
layout manager: add a check if the widget exists
...
Avoid a crash when calling _gtk_widget_get_first_child
Fixes https://github.com/gtk-rs/gtk4-rs/issues/889
2022-02-11 11:44:16 +01:00
Matthias Clasen
9f24229f82
Merge branch 'column-view-column-new-nullable-factory' into 'main'
...
Allow passing a `NULL` factory to `gtk_column_view_column_new()`
See merge request GNOME/gtk!4454
2022-02-10 11:42:38 +00:00
Matthias Clasen
214370ee23
Merge branch 'icon-view-drag-dest-item-nullable' into 'main'
...
Mark `path` out parameter of `gtk_icon_view_get_drag_dest_item()` as `(nullable)`
See merge request GNOME/gtk!4451
2022-02-10 11:24:04 +00:00
Sebastian Dröge
878e4a34d3
Don't dereference a NULL
page in gtk_assistant_set_current_page()
if there are no pages at all
2022-02-09 17:50:55 +02:00
Sebastian Dröge
8245fd4beb
Allow passing a NULL
factory to gtk_column_view_column_new()
2022-02-08 16:25:28 +02:00
Sebastian Dröge
07d6ef13c5
Mark path
out parameter of gtk_icon_view_get_drag_dest_item()
as (nullable)
...
It can be set to `NULL` and the function body handles `NULL` explictly,
so annotate it accordingly.
2022-02-08 12:50:24 +02:00
Bilal Elmoussaoui
883e8328e0
entry completion: add checks that entry is set already
...
If any of the APIs that assumes that the entry is set already is used
before having one already set, things break pretty badly.
Fixes a downstream issue reported at https://github.com/gtk-rs/gtk4-rs/issues/873
2022-02-08 11:22:52 +01:00
Matthias Clasen
38ad56e6a1
Merge branch 'wip/jimmac/selected_text' into 'main'
...
style: legible text selections
Closes #4664
See merge request GNOME/gtk!4433
2022-02-08 00:15:45 +00:00
Matthias Clasen
84d698464c
Merge branch 'antoniof-main-patch-89408' into 'main'
...
columnviewcolumn: Define autocleanup function
See merge request GNOME/gtk!4440
2022-02-07 23:57:46 +00:00
Emmanuele Bassi
a66072f312
Merge branch 'drop-target-get-formats-transfer-none' into 'main'
...
Mark `gtk_drop_target_get_formats()` return value as `transfer none`
See merge request GNOME/gtk!4446
2022-02-07 15:17:39 +00:00
Sebastian Dröge
3ba582375d
Mark gtk_drop_target_get_formats()
return value as transfer none
...
It was wrongly inferred as `transfer full` by gobject-introspection.
2022-02-07 16:23:01 +02:00
Bastien Nocera
0621dbc745
inspector: Search by pointer address
...
Useful to find a widget that corresponds to a pointer address in gdb.
2022-02-04 18:39:56 +01:00
António Fernandes
94ef818c9a
columnviewcolumn: Define autocleanup function
2022-02-04 11:13:46 +00:00
Zander Brown
6fbcb967a0
cssprovider: from_path takes a path
...
Annotate it as such so that bindings can expose that appropriately
Related: https://github.com/gtk-rs/gtk4-rs/issues/861
2022-02-02 22:47:39 +00:00
Jakub Steiner
1f1aafd5c2
style: legible text selections
...
- follow adwaita styling
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4664
2022-02-01 17:12:52 +01:00
Emmanuele Bassi
05a53a1582
Merge branch 'infobar-xml' into 'main'
...
Escape Builder XML in GtkInfoBar docs
See merge request GNOME/gtk!4421
2022-01-28 10:49:37 +00:00
Elliott Sales de Andrade
be5873a057
Escape Builder XML in GtkInfoBar docs
2022-01-28 05:32:16 -05:00
Matthias Clasen
c9eda02fa1
Merge branch 'tiled-window-bracket-fix' into 'main'
...
theme: Drop shadow and border fixes for tiled windows
See merge request GNOME/gtk!4418
2022-01-27 17:29:13 +00:00
Timm Bäder
4be6c5b197
gesturesingle: Get rid of a fallthrough comment
...
Fixes #4663
2022-01-27 16:06:56 +01:00
Carlos Garnacho
c8460c51bd
Merge branch 'realize-vs-focus-in' into 'main'
...
gtktext: Make sure input method sees focus in
See merge request GNOME/gtk!4402
2022-01-27 14:13:55 +00:00
Joonas Henriksson
b4d0235a05
theme: Fix incorrect border color for tiled windows
2022-01-27 06:08:40 +02:00
Joonas Henriksson
a5d1f78bf2
theme: Fix drop shadow for tiled windows
...
Misplaced curly bracket prevented the :backdrop styling from getting
applied. Also fix the indentation while at it.
2022-01-27 05:50:06 +02:00
José Expósito
fe86aa5f6b
gtkgestureswipe: Don't filter hold events
...
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
34133ec1e8
gtkgesturerotate: Don't filter hold events
...
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
a99a75827c
gtkgesturezoom: Don't filter hold events
...
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
3bfcc12ec0
gtkgesture: Handle hold gestures
...
Hold gestures are used to bring existing gestures on touchpad
semantically closer to touchscreen gestures.
Touchpad gestures observe hold gestures with a matching amount of
fingers and emit their begin and end signals when fingers are detected
or removed on/from the touchpad.
When a hold cancel event is detected, it is required to wait a few
milliseconds until the next event(s) are received to avoid emitting
multiple begin signals.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
382341e1bf
gtkgesture: Add hold to EVENT_IS_TOUCHPAD_GESTURE
...
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
44b0d8b330
scrolledwindow: Stop kinetic scrolling on begin
...
Stop kinetic scrolling when a scroll begin signal is sent during the
event capture phase.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
62808722d2
kineticscrolling: Add stop function
...
Move the logic to stop kinetic scrolling to its own function and allow
to call it from the outside.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
f09338c8de
gtkeventcontrollerscroll: Handle hold gestures
...
Handle hold events:
- GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: scroll-begin is emitted.
- GDK_TOUCHPAD_GESTURE_PHASE_END: A hold gesture ends only when all
fingers are lifted from the touchpad without movement, so
scroll-end is emitted right away.
- GDK_TOUCHPAD_GESTURE_PHASE_CANCEL: A hold gesture is cancelled when
some fingers are lifted/put down or movement is detected. In this
case, scroll-end is emitted after a small timeout only if
GDK_SCROLL wasn't detected.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
ec91b2de10
gtkeventcontrollerscroll: Refactor scroll end
...
Move the logic to end scrolling to its own function to be able to
reuse it.
Refactor, no functional changes.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
5cd289dc1d
gtkeventcontrollerscroll: Refactor scroll begin
...
Move the logic to begin scrolling to its own function to be able to
reuse it.
Refactor, no functional changes.
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
José Expósito
0aa2a4ef14
gtkmain: Handle hold events
...
Part-of: <!3454>
2022-01-26 22:49:53 +01:00
Matthias Clasen
6f5210afea
Merge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'
...
Touchpad gesture fixes
See merge request GNOME/gtk!4417
2022-01-26 19:32:33 +00:00
Matthias Clasen
6b1de35c01
Merge branch 'antoniof-main-patch-39484' into 'main'
...
gtkbitset: Define autocleanup function
See merge request GNOME/gtk!4416
2022-01-26 19:29:08 +00:00
Matthias Clasen
8fccfc7a3d
Merge branch 'bilelmoussaoui/g-i' into 'main'
...
g-i: mark GtkSnapshot to_(node|paintable) as nullable
See merge request GNOME/gtk!4413
2022-01-26 19:19:42 +00:00
Carlos Garnacho
6fd3645713
gtk/gesture: Fix point info lookup on touchpad events
...
Since the addition of GdkEventSequence in touchpad events, these
are now stored in the gesture using that sequence. This bit of touchpad
gesture handling was however missing to be updated, still looking up
the special NULL sequence.
Use the last sequence here, which will be the one coming from touchpad
gesture events.
2022-01-26 16:02:00 +01:00
Carlos Garnacho
8e86e6325b
gtk/main: Do not use touchpad event sequence for pointer focus lookup
...
Despite touchpad gestures having a sequence, these must use the logical
pointer focus. Avoid using the sequence for GtkPointerFocus lookups with
those events, in order to ensure those events make it all the way to the
intended target.
This is fallout from adding GdkEventSequence information to touchpad
gestures.
2022-01-26 15:59:36 +01:00
António Fernandes
1a64eeb88e
gtkbitset: Define autocleanup function
2022-01-25 21:33:31 +00:00
Kévin Commaille
aaba777ad0
popovermenu: Fix crash when removing child
...
gtk_menu_section_box_remove_custom was looking in the wrong place for the
stack ancestor, causing an assertion error.
2022-01-25 15:31:00 +01:00
Guido Günther
a580547f47
gtktext: Make sure input method sees focus in
...
Currently when the widget is realized after the focus in event the input
method isn't activated as enable is never sent. The call trace is
gtk_text_focus_changed ->
gtk_im_context_focus_in ->
gtk_im_context_wayland_focus_in
which returns early as self->widget is NULL since it's set up in
gtk_text_realize() via gtk_im_context_set_client_widget(). Handle that
case by invoking gtk_im_context_focus_in() from gtk_text_realize() too.
A case where the above happens is a GtkSearchEntry in a GtkSearchBar.
E.g. in gtk4-demo when starting the demo and then hitting the search
button right away.
2022-01-25 11:15:29 +01:00
Bilal Elmoussaoui
b362eeefdf
g-i: mark GtkSnapshot to_(node|paintable) as nullable
...
Fixes an upstream issue reported at https://github.com/gtk-rs/gtk4-rs/issues/845
2022-01-23 22:11:07 +00:00
Matthias Clasen
6fd53f28f3
Use pango api better
...
Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.#
2022-01-23 09:55:46 -05:00
Matthias Clasen
4fe976549e
Use pango api better
...
Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.
2022-01-23 09:09:57 -05:00
Matthias Clasen
feac1e5fba
Use pango api better
...
Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.
2022-01-22 23:10:53 -05:00
Matthias Clasen
9146a21738
Merge branch 'bilelmoussaoui/g-i' into 'main'
...
g-i: mark gtk_text_iter_get_child_anchor as nullable
See merge request GNOME/gtk!4401
2022-01-19 13:48:57 +00:00
Bilal Elmoussaoui
0f67e46549
g-i: mark gtk_text_iter_get_paintable as nullable
2022-01-19 10:22:40 +00:00
Guido Günther
45397534eb
gtkimcontextwayland: Save context even when text_input isn't around yet
...
Remember the current context on focus-in even though the text-input
isn't set up yet. This helps in the case where the text-input is not yet
created but a widget already got focused. Without that the enable()
invocation in text_input_enter() woulnd't be invoked leaving the input
method disabled.
This fixes
gtk4-demo --run=search_entry
which would initially not show the on-screen keyboard when e.g using
phoc/sway as compositor.
2022-01-19 10:20:46 +00:00
Bilal Elmoussaoui
ffa93b87f8
g-i: mark gtk_text_iter_get_child_anchor as nullable
2022-01-19 10:18:40 +00:00
Alexandros Theodotou
738d962aca
gtk: document return value of ShortcutFunc
2022-01-18 10:58:47 +00:00
Philip Zander
52616dee8e
GtkIMContextIME: Ignore ASCII control characters
...
Make GtkIMContextIME ignore ASCII control characters just like other
IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
characters appearing in text input fields (old bug 676077).
2022-01-17 12:03:01 +01:00
Philip Zander
b9bc7d9166
IMContextSimple/IMContextIME: Fix AltGr not working on Win32
...
The old code assumed that any key press containing Ctrl or Alt cannot be
regular text input. This is not correct on Win32 as AltGr = Ctrl + Alt.
2022-01-13 17:26:59 +01:00
Luca Bacci
5bf5d25bc1
Merge branch 'fix-build-no-pangoft' into 'main'
...
Improve and fix building font features on Windows (was: Fix builds without PangoFT2)
Closes #4605
See merge request GNOME/gtk!4339
2022-01-12 19:53:39 +00:00
Marek Kasik
915090f118
printing: Unref old spool_io before setting new one
...
Unref private spool_io of GtkPrintJob before setting it to a new one
in gtk_print_job_set_source_file() and gtk_print_job_set_source_fd()
to prevent a leak.
Fixes : #4627
2022-01-12 12:47:28 +01:00
Chun-wei Fan
b666a767e4
language-names: Use Windows APIs to acquire language names
...
Instead of relying on the iso-codes package, use the native Windows NLS APIs to
acquire the localized (translated) language names so that we do not need to
incur an extra runtime dependency on Windows. It's not coverering 100% of the
languages that we would like to support through this, but should cover much of
the things that are required.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
ee2dd1acc7
gtk/meson.build: Fix builds without PangoFT2
...
We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.
Also always include the pangoft2 dependency in gtk_dep if it is found.
2022-01-12 17:29:28 +08:00
Matthias Clasen
21d40fc038
Merge branch 'fix-directory-list' into 'main'
...
directorylist: Fix several issues
Closes #3784
See merge request GNOME/gtk!4367
2022-01-12 02:58:25 +00:00
Matthias Clasen
b494d94bdb
Merge branch 'drop-script-names' into 'main'
...
Drop the script name data
See merge request GNOME/gtk!4361
2022-01-12 02:43:54 +00:00
Matthias Clasen
dcdcc659ef
directorylist: Fix several issues
...
We were handling events in the wrong order,
by doing async calls for some of them, but not
for all of them.
And we were not taking into account that GFileMonitors
RENAMED events may or may not move a file on top
of an existing file.
Fixes : #3784
2022-01-11 21:35:19 -05:00
Matthias Clasen
70732afb95
Drop the script name data
...
It is not used in GTK itself, and gtk4-demo
has its own copy.
2022-01-10 10:43:05 -05:00
Sebastian Dröge
1e26c352d6
Fix typo in IconView docs
...
g_lsit_free_full() -> g_list_free_full()
2022-01-09 13:59:59 +02:00
Emmanuele Bassi
bed67edd2e
Merge branch 'ebassi/docs-for-main' into 'main'
...
Document side effect of GLArea:has-depth-buffer
Closes #838
See merge request GNOME/gtk!4351
2022-01-07 19:14:59 +00:00
Emmanuele Bassi
8a6dd2805f
Document side effect of GLArea:has-depth-buffer
...
We enable depth testing when creating a depth buffer.
Fixes : #838
2022-01-07 18:30:54 +00:00
Matthias Clasen
464219c0fa
Merge branch 'wip/baedert/for-master' into 'main'
...
label: Remove a redundant assignment
See merge request GNOME/gtk!4348
2022-01-07 16:47:07 +00:00
Timm Bäder
262f2a1453
Make some code samples compile
2022-01-07 17:21:37 +01:00
Timm Bäder
b408967278
label: Remove a redundant assignment
...
clang-tidy says:
gtklabel.c:1188:15: warning: Although the value stored to 'mid' is used in the enclosing expression, the value is never actually read from 'mid'
min = mid = text_width;
^ ~~~~~~~~~~
Which seems right since mid will be assigned to at the beginning of the
next loop iteration anyway.
2022-01-07 17:21:37 +01:00
Emmanuele Bassi
1fd97fed91
docs: Clean up the ToggleButton description
...
- Use different headings
- Fix the coding style of the example
2022-01-07 15:42:08 +00:00
Matthias Clasen
46a7aaac76
Merge branch 'wip/chergert/fix-textview-dnd-move-same-view' into 'main'
...
textview: remove drag selection after dnd move action
See merge request GNOME/gtk!4346
2022-01-07 03:15:48 +00:00
Christian Hergert
e14d6fe9d5
textview: remove drag selection after dnd move action
...
If we have a GDK_ACTION_MOVE, we need to delete the selection. However,
previously this only worked when the drop target and drag source were
different applications, as the selection would get messed up along the
way.
Instead, we stash marks for the duration of the operation so that we can
delete the appropriate selection when completing the move.
2022-01-06 16:30:34 -08:00
Matthias Clasen
9dccdd1008
Merge branch 'docs-improvs-i' into 'main'
...
docs: Improve docs for four classes
See merge request GNOME/gtk!4337
2022-01-06 19:19:31 +00:00
Maximiliano Sandoval R
1229032b4e
docs: Add misc links
2022-01-05 14:06:43 +01:00
Maximiliano Sandoval R
6d80135342
docs: Improve docs for gtksnapshot.c
2022-01-05 14:06:41 +01:00
Maximiliano Sandoval R
c36a10da83
docs: Improve docs for gtkversion.h
2022-01-05 13:24:32 +01:00
Maximiliano Sandoval R
c30d09cef4
docs: Improve docs for gtkactionable.c
2022-01-05 13:24:30 +01:00
Matthias Clasen
ff862dc926
Merge branch 'wip/smcv/gresource-internal' into 'main'
...
build: Tell glib-compile-resources to make symbols internal where possible
See merge request GNOME/gtk!4334
2022-01-04 18:58:14 +00:00
Simon McVittie
17c2a1cb4e
build: Tell glib-compile-resources to make symbols internal where possible
...
Partial solution to https://gitlab.gnome.org/GNOME/gtk/-/issues/4598
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-01-04 18:08:22 +00:00
Marco Melorio
5055b41ee7
docs: Fix link to section in GtkLabel
2022-01-04 16:33:00 +01:00
Luca Bacci
063e6baa0a
Merge branch 'gtk-grab-file-chooser-native-win32' into 'main'
...
GTK grab for GtkFileChooserNativeWin32
Closes #4582
See merge request GNOME/gtk!4329
2022-01-04 13:59:08 +00:00
Matthias Clasen
d76379428d
Merge branch 'noexecstack' into 'main'
...
Make our stack noexec
Closes #4598
See merge request GNOME/gtk!4330
2022-01-04 13:09:39 +00:00
Matthias Clasen
46509b6dd2
Make our stack noexec
...
The change to use ld and objcopy for resources
had some side-effects: it leaked a few symbols
and made our stack executable. We don't want that.
Use -z nonexecstack and --strip-all to avoid this.
Fixes : #4598
2022-01-04 07:51:56 -05:00
Luca Bacci
c138aaabf3
Use a GTK grab when showing a modal GtkFileChooserNativeWin32
2022-01-04 10:46:20 +01:00
Luca Bacci
96c351e792
Merge branch 'for-main' into 'main'
...
For main
See merge request GNOME/gtk!4322
2022-01-03 09:51:10 +00:00
Matthias Clasen
234d20641c
fontbutton: Pass the fontmap to the dialog
2022-01-02 21:37:32 -05:00
Matthias Clasen
dd802f21e7
fontchooser: Cosmetics
...
Use harfbuzz api to format variations and features.
That matches what pango uses to parse them.
2022-01-02 21:37:32 -05:00
Matthias Clasen
dbbc990c72
fontchooser: Use new hb api
...
Use hb_font_get_var_coords_design if we have it.
This should fix our handling of fonts with AVAR.
2022-01-02 21:37:32 -05:00
António Fernandes
c9fa16fcfa
gtk: Define the GtkExpression autocleanup func
2022-01-02 17:49:48 +00:00
Luca Bacci
0fdf2cc195
Fix compilation with clang
...
From https://github.com/msys2/MINGW-packages/pull/9509
2022-01-02 18:42:33 +01:00
Matthias Clasen
0e86d2b345
Merge branch 'ebassi/issue-4576' into 'main'
...
Update the accessible description of MenuButton
Closes #4576
See merge request GNOME/gtk!4317
2022-01-02 01:12:53 +00:00
Emmanuele Bassi
37063e7a05
Update the accessible description of MenuButton
...
We update the labelled-by relation, but we never update the described-by
one.
Fixes : #4576
2022-01-02 00:35:53 +00:00
Matthias Clasen
791dc7b9be
fontchooser: Speed up fature examples
...
We were doing unnecessary work here, which could
get really slow with some fonts. Just compute
the reverse charmap once and reuse it.
2022-01-01 15:38:04 -05:00
Matthias Clasen
ff24dfb2e7
Revert "fontchooserwidget: Revise handling of named instances"
...
This reverts commit 2dc56a6e9b
.
This wasn't ready yet.
2022-01-01 15:36:29 -05:00
Matthias Clasen
4db60fa5a8
Revert "fontchoserwidget: Do our own face filtering"
...
This reverts commit b7b6c147f9
.
This was premature.
2022-01-01 15:36:27 -05:00
Bilal Elmoussaoui
9409b7ef7d
gtk: mark few GtkPrinterSettings as nullable
...
Everything that makes use of gtk_printer_settings_get should be nullable
Because the hashtable might not contain the key and there's no default value provided
2022-01-01 19:20:29 +01:00
Bilal Elmoussaoui
afeb7f668b
gtk: mark few GtkFileChooser functions as nullable
...
- get_file, if no file is selected returns a NULL
- get_id, if the interface doesn't implement such function returns NULL
2022-01-01 19:11:10 +01:00
Bilal Elmoussaoui
38b8da0f5f
gtk: mark gtk_flatten_list_model_get_model_for_item as nullable
2022-01-01 19:07:13 +01:00
Bilal Elmoussaoui
d029b62d23
gtk: mark gtk_mount_operation_get_parent as nullable
2022-01-01 19:05:33 +01:00
Bilal Elmoussaoui
1e9bdb4647
gtk: mark gtk_list_box_get_adjustment as nullable
...
similar to its setter function
2022-01-01 19:05:06 +01:00
Bilal Elmoussaoui
1d72024605
gtk: mark MenuButton::get_label/get_icon_name as nullable
2022-01-01 18:38:56 +01:00
Bilal Elmoussaoui
06570443b7
gtk: mark gtk_icon_view_create_drag_icon as nullable
2022-01-01 18:33:29 +01:00
Bilal Elmoussaoui
77f7caf18d
gtk: mark gtk_glarea_get_context as nullable
2022-01-01 18:26:40 +01:00
Bilal Elmoussaoui
d58b7fa779
gtk: mark gtk_text_mark_get_buffer as nullable
2022-01-01 18:19:41 +01:00
Bilal Elmoussaoui
dcbf3f8879
gtk: mark gtk_lock_button_get_permission as nullable
...
like the constructor/setter
2022-01-01 18:17:31 +01:00
Bilal Elmoussaoui
30d8c8e17c
gtk: mark buildable_get_id as nullable
...
the vfunc can return a nullable
2022-01-01 18:12:05 +01:00
Bilal Elmoussaoui
b803bb5edb
gtk: mark MultiSelection::get_model as nullable
...
the constructor & setter takes a nullable model
2022-01-01 18:04:24 +01:00
Bilal Elmoussaoui
985a39d41f
gtk: mark gtk_native_get_for_surface as nullable
2022-01-01 17:59:35 +01:00
Bilal Elmoussaoui
f846eec894
gtk: mark gtk_no_selection_get_model nullable
...
The constructor is nullable so should the getter be
2022-01-01 17:56:07 +01:00
Bilal Elmoussaoui
e7fc8ad1f5
gtk: fix PasswordEntry annotation
2022-01-01 17:49:11 +01:00
Bilal Elmoussaoui
95169ad54b
gtk: add nullable annotations to PopoverMenuBar/PopoverMenu
...
The constructor/setter accepts a null as a model so should the getter
2022-01-01 17:47:21 +01:00
Bilal Elmoussaoui
ddb2e91a42
gtk: add nullable annotations for Scrollable getters
...
The adjustment setters takes a nullable and so should the getters be annotated
2022-01-01 17:39:45 +01:00
Bilal Elmoussaoui
90357193c9
gtk: add nullable annotation to gtk_css_section_get_file
...
The constructor takes a nullable file param
2022-01-01 17:31:38 +01:00
Matthias Clasen
fcb8e4cf37
Merge branch 'fontchooser-tweaks' into 'main'
...
fontchooserwidget: Avoid a crash
See merge request GNOME/gtk!4309
2021-12-31 18:32:49 +00:00
Matthias Clasen
b7b6c147f9
fontchoserwidget: Do our own face filtering
...
Pango may not do this for us, so don't rely on it.
We only show one face with a given name, and we
prefer a variable face over a non-variable one.
The check for variable faces requires new Pango
API that will be in Pango 1.52.
2021-12-31 09:58:26 -05:00
Matthias Clasen
2dc56a6e9b
fontchooserwidget: Revise handling of named instances
...
Allowing to tweak the axes of named instances does
not do any harm. If we don't, we have to worry that
we need at least one non-named-instance in the face
list, and make it more obvious how to pick it out.
2021-12-31 09:50:47 -05:00
Matthias Clasen
e12ef76de5
fontchooserwidget: Avoid a crash
...
languages may be NULL, we need to be more careful here.
2021-12-31 09:49:40 -05:00
Matthias Clasen
536b05e35b
maplistmodel: Cosmetics
2021-12-31 09:48:34 -05:00
Timm Bäder
1354854d23
inspector: Fix coding style
...
ffs
2021-12-31 14:41:35 +01:00
Timm Bäder
2b062d60f2
baseline = -1 means no baseline
...
Fixes #4385
2021-12-31 13:08:01 +01:00
Matthias Clasen
80328e8a4f
fontchooser: Stop using pangofc api
...
Pango now has backend-independent api for all
we need, so we can drop all the ifdefs.
2021-12-30 22:52:52 -05:00
Bilal Elmoussaoui
ec58013b22
g-i: add missing nullable annotation
...
the constructor takes a nullable expression parameter, so should the getter be
2021-12-30 16:52:53 +00:00
Matthias Clasen
e2ab334636
Merge branch 'doc-window' into 'main'
...
Document built-in actions on GtkWindow
See merge request GNOME/gtk!4297
2021-12-29 17:23:16 +00:00
Matthias Clasen
dd0effe957
Merge branch 'wip/chergert/4575-fix-texthistory-selection' into 'main'
...
testsuite: ignore texthistory selection on delete/backspace
Closes #4575
See merge request GNOME/gtk!4287
2021-12-29 14:58:53 +00:00
Hofer-Julian
ac210c1765
docs: Add missing star to block comment
2021-12-29 15:46:59 +01:00
Hofer-Julian
c58e48e648
doc: Fix docs of window.minimize
2021-12-29 15:45:44 +01:00
Hofer-Julian
acdadab617
docs: Document built-in actions on GtkWindow
2021-12-29 15:45:43 +01:00
Matthias Clasen
aa19194f7b
Merge branch 'wip/exalm/inspector' into 'main'
...
inspector: Register extension on startup
See merge request GNOME/gtk!4296
2021-12-29 14:38:28 +00:00
Matthias Clasen
07c3dc6b6f
Merge branch 'nullable' into 'main'
...
popover: Add missing nullable annotation
Closes #4556
See merge request GNOME/gtk!4295
2021-12-29 00:28:09 +00:00
Matthias Clasen
fa71a2a993
Merge branch 'wip/baedert/for-master' into 'main'
...
application demo: Resolve a keyboard shortcut conflict
See merge request GNOME/gtk!4290
2021-12-29 00:24:46 +00:00
Alexander Mikhaylenko
b997d1e892
inspector: Register extension on startup
2021-12-29 04:42:51 +05:00
Alexander Mikhaylenko
4b71fba540
Revert "inspector: Export gtk_inspector_init"
...
This reverts commit 3f5107cea5
.
2021-12-29 04:12:16 +05:00
Ian Douglas Scott
48d39c0a57
popover: Add missing nullable annotation
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4556 .
Looks like the other `Popover` methods are have correct nullable
annotations.
2021-12-28 09:43:06 -08:00
Matthias Clasen
c7df5ef957
Merge branch 'get-key-capture-widget-nullable' into 'main'
...
GtkSearchBar - Mark get_key_capture_widget() return value as nullable
See merge request GNOME/gtk!4286
2021-12-27 15:06:56 +00:00
Timm Bäder
e94d5bf006
applicationwindow: Don't pass for_size < -1 to measure()
...
If the application window is measured with for_size -1 horizontally,
this code clearly passes something lower to the parent class measure()
implementation. Only subtract the menubar_height if we're passed a
for_size > -1.
2021-12-27 12:15:02 +01:00
Benjamin Otte
6da952100c
inspector: Add dnd inspection support
...
This has lots of issues:
* It randomly crashes when data is loading while the dnd goes away.
* The data gets randomly reset at the wrong time
* Can't scroll the window on Wayland
* ...
But it's better than nothing, so better get it committed.
2021-12-27 05:59:16 +01:00
Benjamin Otte
df8588e9b7
Merge branch 'wip/otte/for-main' into 'main'
...
widget: Don't queue an allocate on a nonexisting parent
See merge request GNOME/gtk!4288
2021-12-26 23:20:34 +00:00
Benjamin Otte
fce9b35e4d
css: Don't crash on invalid rotate3d()
2021-12-26 22:58:09 +01:00
Benjamin Otte
7149bfd100
widget: Don't queue an allocate on a nonexisting parent
...
No test, no idea how to trigger this reliably.
2021-12-26 22:17:54 +01:00
Christian Hergert
344ad0355e
textview: scroll insert onscreen after undo/redo
...
After performing an action such as undo/redo, we need to actually scroll
to the position where the operation occurred.
I do note that the scroll here seems to often get invalidated if it is
pages away, and we never make the full scroll. But I've seen this all over
the place elsewhere too and that needs to be handled, most likely, as a
more comprehensive fix for scrolling during line validation.
Related #4575
2021-12-26 12:56:42 -08:00
Christian Hergert
e7871fbc43
texthistory: always track selection bounds
...
It's cheap to store the selection position, so always set it even if we
are in a user section. Otherwise, we risk not having the right position
when starting a delete action within a begin_user_action(),
end_user_action() pair.
Related #4575
2021-12-26 12:47:45 -08:00
Sebastian Dröge
aa289d1023
GtkSearchBar - Mark get_key_capture_widget() return value as nullable
...
The setter allows setting NULL so this can clearly also return NULL
under normal circumstances.
Same for the corresponding API in GtkSearchEntry.
2021-12-26 11:06:34 +02:00
Emmanuele Bassi
a70988ecd5
build: Remove deprecated get_pkgconfig_variable()
...
Replace it with `get_variable(pkgconfig:...)`.
2021-12-24 15:55:26 +00:00
Matthias Clasen
de42b5bfae
sizerequest: Remove critical warning for now
...
At last as long as widgets like GtkFlowBox and
GtkGrid still trigger this, it is not a great
idea to have this warning in a stable release.
So remove it for 4.6
2021-12-23 16:59:26 -05:00
Timm Bäder
e5a88b64b1
label: Fix get_natural_wrap_mode() precondition check
2021-12-22 17:38:33 +01:00
Yuri Chornoivan
9f06f53a59
Fix minor typo
2021-12-21 23:42:12 +02:00
Matthias Clasen
69edf17c2a
Merge branch 'wip/otte/wrapping-is-natural' into 'main'
...
label: Add gtk_label_set_natural_wrap_mode()
See merge request GNOME/gtk!4267
2021-12-20 15:49:05 +00:00
Benjamin Otte
981ed22dff
label: Add gtk_label_set_natural_wrap_mode()
...
Allows influencing natural size requests so that labels can request more
width than necessary for a given height.
Related: !4245
Related: #4535
2021-12-20 02:28:37 +01:00
Marco Melorio
4b19dd46dd
progressbar: Queue allocate when setting "inverted"
2021-12-18 18:45:28 +01:00
Matthias Clasen
92ca52822c
Merge branch 'meson-msvc-cleanup' into 'main'
...
Remove Visual Studio 2013 bits from Meson files
See merge request GNOME/gtk!4249
2021-12-17 12:58:01 +00:00
Matthias Clasen
47ac080565
Merge branch 'wip/otte/for-main' into 'main'
...
label: word-char wrapping should word-wrap for natural size
Closes #4535
See merge request GNOME/gtk!4245
2021-12-17 02:11:50 +00:00
Matthias Clasen
a4760bcff7
Merge branch 'toolbar-combobox' into 'main'
...
Don't make all buttons in toolbars flat
Closes #4384
See merge request GNOME/gtk!4103
2021-12-17 00:35:18 +00:00
Matthias Clasen
2636fb7c8d
Merge branch 'wip/baedert/for-master' into 'main'
...
settings test: Print expected and seen values
See merge request GNOME/gtk!4259
2021-12-17 00:31:20 +00:00
Benjamin Otte
99c2936e90
Merge branch 'wip/otte/inspector' into 'main'
...
inspector: Add measure graph
See merge request GNOME/gtk!4260
2021-12-16 21:46:52 +00:00
Benjamin Otte
66c74d6091
inspector: Add measure graph
...
Generates a graph visualizing calls to gtk_widget_measure().
Generation of the graph can be slow - like when it forces Pango to wrap
a huge label 1000s of times.
You can dnd the graph to look at it closer or to impress people in
gitlab issues.
2021-12-16 19:36:54 +01:00
Benjamin Otte
a43ba245e2
inspector: Remove a stray g_print()
2021-12-16 19:36:54 +01:00
Benjamin Otte
810d734eda
label: Fix docs
2021-12-16 19:36:54 +01:00
Timm Bäder
ae60293c24
textlayout: Remove unused-but-set variables
2021-12-16 11:06:50 +01:00
Matthias Clasen
4f751aa53d
inspector: Highlight event sequences
...
Optionally, highlight rows of events whose
event sequences match the selected event.
2021-12-15 22:07:07 -05:00
Matthias Clasen
2772ff624f
gdk: Prepare touchpad events for sequences
...
It makes sense to connect the begin/update/end events
for touchpad swipes and pinches in a sequence. This
commit adds the plumbing for it, but not backends
are setting sequences yet.
2021-12-15 21:58:57 -05:00
Matthias Clasen
69b160cfe8
inspector: Details about touchpad events
...
Useful to have for debugging these.
2021-12-15 21:58:57 -05:00
Matthias Clasen
ee7541c032
inspector: Add axes to event details in recorder
...
This is useful information if you have devices
producing such events.
2021-12-15 21:58:57 -05:00
Matthias Clasen
9648cf226b
inspector: Show event history in recorder
...
This was instrumental in debugging why
scroll compression does not work.
2021-12-14 23:43:29 -05:00
Matthias Clasen
6bb2e5625a
inspector: Remove debug spew
2021-12-14 22:03:52 -05:00
Matthias Clasen
d57a5dffa1
inspector: Add event recording
...
Make the recorder also keep track of events,
and show them in some detail.
2021-12-14 22:01:40 -05:00
Matthias Clasen
1028ca0841
inspector: More tweaks to the recorder
...
Put the two left columns in a stack, and add
an empty page there. This will let us add
other recording types in the future, with
their own pages.
2021-12-14 19:51:35 -05:00
Matthias Clasen
6dbe6b42c2
inspector: Tweaks to the recorder
...
Don't show the profiler data in the frame list,
instead show timestamps there.
2021-12-14 19:34:53 -05:00
Matthias Clasen
7611c3ea03
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Use a listview in the recorder
See merge request GNOME/gtk!4255
2021-12-15 00:06:11 +00:00
Christian Hergert
2fa9f934b6
a11y: return -1 if parent is NULL
2021-12-14 21:18:13 +01:00
Matthias Clasen
e9fd7b7ed6
inspector: Use a listview in the recorder
...
Its the awesome new list widget, lets use it!
2021-12-14 15:10:11 -05:00
Emmanuele Bassi
3f7122b3d2
Add a boxed GType for GtkBitsetIter
...
This way language bindings have a chance at managing the memory of
GtkBitset iterators.
Fixes : #4543
2021-12-14 15:51:13 +00:00
Matthias Clasen
c5bffb9fb5
builder: Drop empty text chunks when precompiling
...
These don't add any value either.
2021-12-14 01:21:06 -05:00
Matthias Clasen
c7afa5452b
builder: Drop irrelevant whitespace in precompile
...
Drop text nodes that won't contribute to the end result.
This gets rid of a lot of text nodes in the replay.
2021-12-14 00:35:35 -05:00
Garrett Regier
fcb6adaaaa
builder: Use g_slice_free_chain() for strings in precompile
2021-12-13 23:44:02 -05:00
Garrett Regier
9c12b58e32
builder: Remove root special case from precompile
2021-12-13 23:44:02 -05:00
Garrett Regier
6c8b505f93
builder: Avoid g_hash_table_get_values() in precompile
...
Embed the GList link in the RecordDataString.
2021-12-13 23:44:02 -05:00
Garrett Regier
8b228e7471
builder: Use a flexible array for attributes in precompile
2021-12-13 23:44:02 -05:00
Garrett Regier
4ce07f41ca
builder: Reduce memory usage in precompile
...
Split the Element and Text nodes into separate structures.
2021-12-13 23:44:02 -05:00
Garrett Regier
1bfd0e5e38
builder: Use a GQueue in precompile
...
This avoids g_list_last() and
embeds the GList link in the RecordDataTree.
2021-12-13 23:44:02 -05:00
Garrett Regier
b962d37f79
builder: Use a reasonable default string size in precompile
2021-12-13 23:44:02 -05:00
Garrett Regier
c6ecf02a07
builder: Embed text length in precompile
2021-12-13 23:44:02 -05:00
Garrett Regier
8b7d4b423c
builder: Combine attribute name and value allocations
2021-12-13 23:44:02 -05:00
Garrett Regier
83dc126565
builder: Use a string chunk for precompile
...
Also use an explicit length and avoid g_strndup().
2021-12-13 23:44:02 -05:00
Garrett Regier
f2d3d7e710
builder: Avoid double string lookup in precompile
2021-12-13 23:44:02 -05:00
Matthias Clasen
f991428cb9
builder: Use GMarkup properly
...
We must call end_parse to ensure we get errors
for incomplete documents.
2021-12-13 23:42:47 -05:00
Chun-wei Fan
e2b4108377
Revert "gtk/meson.build: Fix linking on Visual Studio 2013"
...
We now require a Pango version that requires Visual Studio 2015 or later to
build, and non-UCRT-based (VS2013) binaries may not bode well with
UCRT-based binaries (VS2015+). Drop the support for VS2013 as a result.
This reverts commit e208e0e07886248d4d86118aa5591c9882f0ed5c.
2021-12-14 10:29:28 +08:00
Benjamin Otte
02c484e844
label: Fix docs
2021-12-13 18:23:32 +01:00
Benjamin Otte
5face79cd0
label: word-char wrapping should word-wrap for natural size
...
Testcase added
Fixes #4535
2021-12-13 14:49:39 +01:00
Matthias Clasen
da6f86bd79
colorbutton: No nested drag sources, please
...
This is causing trouble on X11.
2021-12-12 22:23:31 -05:00
Matthias Clasen
42fd499af4
dragicon: Make color icons work in X11
...
We need to disable the DND support in
GtkColorSwatch completely for this to work
in X11.
2021-12-12 22:09:28 -05:00
Matthias Clasen
de5b88477a
colorswatch: Make drag source optional
...
When using a colorswatch as a drag icon,
this can get in the way, so make it optional.
2021-12-12 22:09:16 -05:00
Matthias Clasen
df025fcb88
dragicon: Provide default icons for more types
...
Provide default icons for paintables and files.
This is easy to do, and makes sense.
fixup drag icon
2021-12-12 21:29:36 -05:00
Matthias Clasen
bbb1404bd3
dragicon: No events, please
...
We run into trouble on X11 if the widgets
in the drag icon have drop targets attached.
Prevent this by suppressing event delivery
to drag icons outright.
2021-12-12 21:28:34 -05:00
Matthias Clasen
dbe5e57b8e
inspector: Show more datatypes for the clipboard
...
It is easy enough to show colors, files and pixbufs.
2021-12-12 18:36:58 -05:00
Matthias Clasen
9a872f059f
droptarget: Improve the docs
...
Add the signal connection to the example.
2021-12-12 16:27:36 -05:00
Matthias Clasen
e72df9cd5f
docs: Small improvement
...
I could not find the attributes of the <binding>
element mentioned anywhere in the docs.
2021-12-12 09:03:11 -05:00
Benjamin Otte
4cd0a39794
Merge branch 'wip/otte/inspector' into 'main'
...
inspector: Add a clipboard page
See merge request GNOME/gtk!4237
2021-12-11 22:46:30 +00:00
Benjamin Otte
600ab5ba5f
inspector: Add a clipboard page
...
Shows all the formats supported by the clipboard (and primary clipboard)
and allows displaying them (by potentially downloading them)
2021-12-11 23:01:42 +01:00
Matthias Clasen
66910ed998
Restore the GtkTextchild abi
...
Move the new chars field to a private struct.
Fixes : #4531
2021-12-11 10:58:58 -05:00
Matthias Clasen
79375dd7dd
Merge branch 'fix-printer-enumeration' into 'main'
...
Fix dialog-less printing
Closes #4439
See merge request GNOME/gtk!4215
2021-12-10 18:01:59 +00:00
Matthias Clasen
0bf87281e0
Merge branch 'missing-since-tag' into 'main'
...
Add a missing since tag
See merge request GNOME/gtk!4229
2021-12-10 17:15:32 +00:00
Matthias Clasen
2d062fedd9
Add a missing since tag
...
gtk_text_child_anchor_new_with_replacement was
recently added.
2021-12-10 11:26:46 -05:00
Matthias Clasen
c6a68f3de2
Fix dialog-less printing
...
We were sometimes ending printer enumeration prematurely,
and the code was confused about the meaning of found_printer.
The new setup follows these rules:
- We *only* end the search prematurely if found_printer
is set, which indicates that we found the right printer
- We *always* call find_printer_idle exactly once, and
make it return less than perfect matches like the
default printer, or the first printer we found
Fixes : #4439
2021-12-10 11:26:23 -05:00
Jakub Steiner
d74e62886c
selections: have unfocused state
...
- text selections for unfocused elements - textview, label, entry,
spinbutton
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4393
2021-12-10 12:00:12 +01:00
Jakub Steiner
d8505f09eb
Revert "styling: Have unfocused selections"
...
This reverts commit 96f63a6bf3
.
2021-12-10 11:36:10 +01:00
Christian Hergert
99a8202015
macos: fix crash in imcontextquartz
2021-12-09 12:26:33 -08:00
Benjamin Otte
17c903e246
Merge branch 'fix-picture-natural-size-0' into 'main'
...
picture: Return natural size 0 for size 0
See merge request GNOME/gtk!4177
2021-12-08 19:33:28 +00:00
Ivan Molodetskikh
7ef54e9c53
picture: Return natural size 0 for size 0
...
It was returning the full natural size (same as -1) due to default value
handling in the code below.
Tests have been updated to match this output.
2021-12-08 19:20:24 +01:00
Matthias Clasen
12bb700c62
Merge branch 'wip/chergert/fix-recursive-action-muxer' into 'main'
...
actionmuxer: avoid duplicate and recursive work
Closes #4422 , #4519 , and gnome-text-editor#220
See merge request GNOME/gtk!4223
2021-12-08 10:47:40 +00:00
Christian Hergert
d1aec0c3f1
actionmuxer: avoid duplicate and recursive work
...
If we've already done the tracking into the parent muxer, there is no need
to do it again. This can save a great deal of recursive work when adding
items to the muxer.
This makes showing the context menu in gnome-text-editor repeatedly fast
even as spelling corrections are changed.
It is likely that this could fix #4422 as well.
Fixes #4519
Fixes https://gitlab.gnome.org/GNOME/gnome-text-editor/-/issues/220
2021-12-08 00:32:36 -08:00
Christian Hergert
00d5f72d6e
menutracker: reduce allocations and signal emission
...
When handling action-added callbacks the code was previously using a
freeze_notify/thaw_notify in all cases. This turns out to allocate a
significant amount of memory when called a lot.
That said, it shouldn't be getting called this much but given the current
state of affairs elsewhere in GtkActionMuxer, this brought temporary
allocations down from 9MiB to 9KiB in gnome-text-editor after showing
the context menu a few times.
Related #4422
2021-12-07 22:42:04 -08:00
Benjamin Otte
ce7b0656c0
viewport: Allocate properly
...
Instead of allocation width for height for width for height or whatever
that code was doing, actually allocate the size we were given or the
requested size, whatever is larger.
2021-12-08 00:12:35 +01:00
Benjamin Otte
fd0d360f9b
Revert "viewport: Actually report the size we're gonna allocate"
...
This reverts commit b8468af411
.
2021-12-07 23:52:21 +01:00
Benjamin Otte
b8468af411
viewport: Actually report the size we're gonna allocate
...
Don't just pass on measure() calls, but actually behave in the way we
behave during size allocate.
This should improve cases where GtkScrolledWindow is used with GTK_POLICY_NEVER.
2021-12-07 21:58:42 +01:00
Benjamin Otte
9fd7e319f3
viewport: Use array for member variables
...
That way we can index them by orientation in future commits.
2021-12-07 21:58:42 +01:00
Benjamin Otte
b9d4da9cfe
gtktypes: GTK_INVALID_LIST_POSITION should be an int
...
GListModel uses guint, so the macros we define for it should match that.
Related: !3738
2021-12-07 16:15:17 +01:00
Emmanuele Bassi
5bf5b58eb3
Merge branch 'gi-const' into 'main'
...
gtk: fix GTK_INVALID_LIST_POSITION type
See merge request GNOME/gtk!3738
2021-12-07 14:22:40 +00:00
Carlos Garnacho
ce1b970b46
gtkimcontextwayland: Set a higher IO extension priority
...
We want this to take precedence in the wayland platform to other
modules that might be loaded via the IO extension point. None of
those is going to bode well in this platform.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4443
2021-12-04 00:21:53 +01:00
Matthias Clasen
ceb77d6100
Merge branch 'wip/hadess/listbox-fixes' into 'main'
...
listbox: Explain behaviour of GtkListBoxCreateWidgetFunc
See merge request GNOME/gtk!4194
2021-12-03 23:05:13 +00:00
Matthias Clasen
02579a1333
Merge branch 'wip/chergert/inspector-im-module' into 'main'
...
inspector: add im-module
Closes #4512
See merge request GNOME/gtk!4214
2021-12-03 22:51:32 +00:00
Matthias Clasen
2f7fa10434
Merge branch 'textview-im-surrounding' into 'main'
...
textview: Provide more context to input methods
See merge request GNOME/gtk!4209
2021-12-03 20:26:54 +00:00
Christian Hergert
6be352f446
inspector: add im-module
...
This adds a new row to the Global/Information section which displays the
GTK im-module that is likely to be in use unless changed by an application.
It responds to updates of GtkSettings:gtk-im-module unless the
GTK_IM_MODULE environment variable is set.
Fixes #4512
2021-12-03 12:11:25 -08:00
Matthias Clasen
4d2be2e322
Merge branch 'text-scroll-test' into 'main'
...
Improve scroll-to mark behavior
Closes #4325
See merge request GNOME/gtk!4208
2021-12-03 20:00:05 +00:00
Matthias Clasen
d5c01098fd
textview: Provide more context to input methods
...
When returning surrounding context to input methods,
include at least 2 words before and after the insertion
point.
Update the affected input method tests.
2021-12-03 14:44:05 -05:00
Georg Vienna
c517e945de
textchildanchor: allow to specify replacement character
2021-12-03 16:02:48 +00:00
Matthias Clasen
be949496ac
Merge branch 'issue-4376' into 'main'
...
Update placeholder visibility when setting a buffer
Closes #4376
See merge request GNOME/gtk!4211
2021-12-02 17:38:16 +00:00
Emmanuele Bassi
b57b12fdb7
Update placeholder visibility when setting a buffer
...
If we set the placeholder text before setting a buffer, we end up with
both the placeholder *and* the buffer's contents visible at the same
time.
Fixes : #4376
2021-12-02 17:17:12 +00:00
Carlos Garnacho
c8d83b7a63
gesturestylus: Use GtkEventControllerEvent events to track changes
...
We use gtk_gesture_get_last_event() underneath at places that need to
work during ::proximity emission. Since GtkGesture only tracks events
while there are button/touch presses involved, this is not going to
bring the right result there.
Use gtk_event_controller_get_current_event() consistently inside,
which always pokes at the event being handled (which is the correct
intent here).
2021-12-02 17:06:35 +01:00
Matthias Clasen
67ad566188
textview: Improve scroll-to-mark behavior
...
The idea of within-margin is to scroll as little
as possible to bring the mark within the margins
defined by the factor. The code was achieving
that when scrolling down, but not when scrolling
up. This change makes things symmetrical.
Fixes : #4325
2021-12-01 19:35:11 -05:00
Matthias Clasen
2611a996ff
Merge branch 'matthiasc/for-main' into 'main'
...
textbuffer: Fix pasting text
Closes #4357
See merge request GNOME/gtk!4205
2021-12-01 02:59:10 +00:00
Matthias Clasen
3e7618fef7
textbuffer: Try harder to fix pasting
...
It turns out we can't just use the size returned
by the memory stream as-is, since it may contain
unfilled garbage at the end, which utf8 validation
will choke on. So, cut it off at the first '\0'
we find.
2021-11-30 21:42:19 -05:00
Matthias Clasen
5b1b75b055
textbuffer: Fix pasting text
...
The memory stolen from a memory outputstream
isn't guaranteed to be 0-terminated, so don't
make that assumption.
Fixes : #4357
2021-11-30 20:37:25 -05:00
Matthias Clasen
f1612e36ee
Merge branch 'update_focus_indicators_in_popovers' into 'main'
...
update focus indicators in popovers
See merge request GNOME/gtk!4124
2021-12-01 01:21:32 +00:00
Matthias Clasen
b3b0321620
textview: Avoid misplacing the Emoji chooser
...
When the iter is at the end of the buffer,
gtk_text_view_get_iter_location returns a
rectangle with width 0, which in turn makes
gdk_rectangle_intersect return FALSE.
Avoid that by always giving the rectangle
non-empty dimensions.
Fixes : #4503
2021-11-30 19:44:26 -05:00
Matthias Clasen
e0deacd236
inspector: Make dropdowns bigger
...
If there's enough values to warrant scrolling,
the dropdown was much too small for comfort.
2021-11-30 18:38:33 -05:00
Matthias Clasen
f66172451d
textview: Respect editability for Emoji
...
Switch the Emoji chooser keybinding to use the
action, so that disabling the action has the
desired effect.
2021-11-30 18:37:33 -05:00
Benjamin Otte
07cfdd8ca0
label: Don't set ellipsized size as natural size
...
Natural size should never ellipsize.
Tests added.
2021-11-30 15:10:02 +01:00
Matthias Clasen
ddd5704c92
Update references to master in the repository
2021-11-29 17:37:49 -05:00
Benjamin Otte
3ba6d2bd27
Merge branch 'wip/otte/hfw-min-size' into 'master'
...
window: Implement height-for-width for min size
See merge request GNOME/gtk!4183
2021-11-29 10:31:42 +00:00
Matthias Clasen
e9d8bf96e0
fontchooser: Avoid setting variations needlessly
...
Setting variations to their default value causes
them to show up in the serialization of the font
description - a font description has no idea about
the default values, so can't filter them out.
Avoid that.
2021-11-27 17:13:23 -05:00
Bastien Nocera
6b3a612bbc
listbox: Explain behaviour of GtkListBoxCreateWidgetFunc
...
It might be an interesting shortcut for applications to use, but it
needs to be documented to be useful and agreed.
2021-11-25 12:33:10 +01:00
Emmanuele Bassi
c742debea8
Merge branch 'fix_typo_gesture' into 'master'
...
gesture: fix typo in docs
See merge request GNOME/gtk!4191
2021-11-24 19:56:42 +00:00
Alexandros Theodotou
cd60ec1576
gesture: fix typo in docs
2021-11-24 19:34:49 +00:00
Benjamin Otte
0709dc7a6a
window: Add a new fancy way to compute min size
...
Try to compute a min size that matches the current aspect ratio.
This means that when interactively resizing, we adapt the min size to
the current window area dynamically.
And that means that we always have a min size that is large enough, but
users can interactively cause it to be small-width x large-height,
large-width x small-width or anything inbetween.
2021-11-21 18:52:42 +00:00
Benjamin Otte
15528599f4
Merge branch 'wip/otte/for-master' into 'master'
...
window: Always clamp to max size
See merge request GNOME/gtk!4185
2021-11-21 18:44:26 +00:00
Emmanuele Bassi
031aab3ef6
Merge branch 'ebassi/issue-4421' into 'master'
...
Unrealize ATContext on unroot
Closes #4421
See merge request GNOME/gtk!4136
2021-11-21 15:36:25 +00:00
Benjamin Otte
c990134e49
window: Properly distribute size between title and child
...
Otherwise we can end up with a window that's too small in certain corner
cases after resizing.
2021-11-21 08:19:07 +01:00
Benjamin Otte
822508f33e
widget: Clear size request cache on queue_resize()
...
... and not later.
Otherwise future calls to sizing fucntions will reuse an outdated cache
and compute wrong values.
2021-11-21 06:08:06 +01:00
Benjamin Otte
358893aa84
window: Always clamp to max size
...
When computing the window size, always try to clamp to the max size.
This will shrink a window down into a sane size if it was too big
before.
2021-11-21 05:33:28 +01:00
Benjamin Otte
c025bc5098
paned: Compute the right handle size
...
Testcase included
Fixes #4469
2021-11-21 01:49:40 +01:00