Carlos Garnacho
29d054c421
gtkwidget: Remove dead code
...
This variable got unused over time.
2020-06-24 10:47:15 +02:00
Carlos Garnacho
59a8106373
gdk: Drop supports_multidevice API
...
Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
c1d90273ca
gdk: Drop GDK_SOURCE_ERASER
...
All tools come from devices with GDK_SOURCE_PEN.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
31b95ce47f
gtkmain: Look up transient-for hierarchies to determine modality
...
Windows that are not modal, but are transient-for a modal window should
still be able to receive and handle events. Inspect the window hierarchy
in those cases, so these windows are handled just like widgets within
the modal dialog.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2851
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/2850
2020-06-23 23:42:53 +02:00
Carlos Garnacho
4fe608e423
gtkwidget: Cancel all gestures in other groups
...
When a gesture (group) claims a sequence, all other gesture groups
in the same widget should get cancelled. Not just previously claimed
ones, that shouldn't happen actually.
2020-06-23 23:42:53 +02:00
Matthias Clasen
2cfeb1048c
Merge branch 'stringlist' into 'master'
...
add a public stringlist api
See merge request GNOME/gtk!2134
2020-06-23 20:43:49 +00:00
Matthias Clasen
e8210d5865
Add GtkStringList as public api
...
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00
Matthias Clasen
fff981b220
Merge branch 'wip/jimmac/notebook-legibility' into 'master'
...
Adwaita: notebook legibility fixes
Closes #2652
See merge request GNOME/gtk!2142
2020-06-23 19:12:52 +00:00
Jakub Steiner
ec54399d89
Adwaita: notebook legibility fixes
...
- make inactive tabs more legible
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652
2020-06-23 19:54:54 +02:00
Matthias Clasen
83f22fcce2
Add a few missing includes
...
These sources are using GtkListStore apis,
but were replying on indirect includes to
get the header. Make this explicit, to prepare
for GtkEntryCompletion losing its tree view
dependencies.
2020-06-23 07:55:53 -04:00
Matthias Clasen
34a12f47f1
entry completion: Drop the Private struct
...
This is in preparation for porting GtkEntryCompletion
to use GtkListView.
2020-06-23 07:55:38 -04:00
Matthias Clasen
7ff427b456
Merge branch 'drop-entry-completion-actions' into 'master'
...
entrycompletion: Drop action support
See merge request GNOME/gtk!2136
2020-06-22 22:59:17 +00:00
Matthias Clasen
67a7ad069f
entrycompletion: Drop action support
...
This api has not really been kept up with current
user experiences in popups, and we're better off
just dropping it and letting people do their own
popups if they need custom UI.
2020-06-22 14:43:36 -04:00
Matthias Clasen
53a30eaa12
entry completion: Make keynav work again
...
Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.
2020-06-22 12:48:42 -04:00
Matthias Clasen
692cc42e10
Add gtk_widget_prepend_controller
...
Add a variant of gtk_widget_add_controller that
inserts the controller at the beginning, instead
of the end. This will be used in entry completion
to make sure the entry completion key event handling
supersedes the entry one while the popup is open.
Keep this private for now, until we determine if
it needs to be public api.
2020-06-22 12:47:27 -04:00
Matthias Clasen
9faaa5e8be
Fix change notification for event controllers
...
We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.
2020-06-22 12:46:12 -04:00
Matthias Clasen
418bbb2685
entrycompletion: Name the controllers
...
This helps with debugging.
2020-06-22 12:31:15 -04:00
Matthias Clasen
511e5f39fa
filter: Make GtkEveryFilter buildable
...
Due to an oversight, when multi filters were split into
any and every, any ended up with the listmodel and buildable
implementations, and every didn't get any.
Move the implementations up.
2020-06-21 13:10:18 -04:00
Benjamin Otte
a928ea6c57
sortlistmodel: Look at order
...
For now, we just look at SORT_ORDER_NONE to bypass any sorting.
2020-06-21 14:17:47 +02:00
Matthias Clasen
62b214ffdf
filechooserwidget: Use gtk_drop_down_get_selected_item
...
This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
2020-06-21 01:20:05 -04:00
Benjamin Otte
45167d5c0d
dropdown: emit notify for selected from the changed callback
...
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
2020-06-21 02:23:46 +02:00
Matthias Clasen
0214b98c5e
Merge branch 'matthiasc/for-master' into 'master'
...
misc listview scrolling fixes
See merge request GNOME/gtk!2119
2020-06-20 21:21:29 +00:00
Matthias Clasen
7ff35340ca
Merge branch 'drop-down-selected-item' into 'master'
...
dropdown: Add GtkDropDown:selected-item
Closes #2861
See merge request GNOME/gtk!2120
2020-06-20 18:51:18 +00:00
Matthias Clasen
79b1d24128
Merge branch 'gtk4-arb_fbo' into 'master'
...
Switch to GL_ARB_framebuffer_object
See merge request GNOME/gtk!2079
2020-06-20 17:12:52 +00:00
Matthias Clasen
ad98e72884
dropdown: Add GtkDropDown:selected-item
...
This is the same readonly property we have in
GtkSingleSelection.
Fixes : #2861
2020-06-20 13:11:48 -04:00
Matthias Clasen
2842030e59
gridview: Don't assert on a condition that can happen
...
We are currently not robust against model changes or
widget invalidations, so we can actually end up in
situations where we run out of items here. Handle
the failure a bit more gracefully, by returning NULL.
This is good enough to make scrolling work okish most
of the time. We still need a proper fix to handle
other situations.
2020-06-20 12:11:59 -04:00
Benjamin Otte
7c2d21892f
gridview: Compute right amount of items to skip
...
We only want to skip the remaining items in the current row, not since
the start of the widget.
2020-06-20 12:08:46 -04:00
Matthias Clasen
8511f25b97
editablelabel: Allow to drag text
...
If we allow editing, we should allow direct drags too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
290611f9ce
editablelabel: Accept text drops
...
This seems natural. If we allow editing, we should
allow drops too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
f054c317ee
expander: Remove a pointless return
...
GtkDropControllerMotion::enter does not expect
a boolean return value, so don't provide one.
2020-06-19 15:26:47 -04:00
Matthias Clasen
9555e611e1
treeexpander: Auto-expand during DND
...
When hovering over a tree expander during DND,
expand the tree after a timeout. This matches
the behavior of GtkTreeView and GtkExpander.
2020-06-19 15:26:47 -04:00
Matthias Clasen
110c316810
columnview: Increase the autoscroll threshold
...
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
470a1aabdd
columnview: Autoscroll during DND
...
Use a drop motion controller to autoscroll horizontally
while a drag operation is hovering over the list. The
vertical scrolling is handled by the listview.
2020-06-19 15:26:10 -04:00
Matthias Clasen
b299d62a73
columnview: separate autoscroll from headers
...
Break out an update_autoscroll() function that can
be used for other things than header DND. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
02b293b59c
listbase: Don't use adjustments for autoscrolling
...
Don't consult the adjustments when determining
scroll deltas. It isn't necessary.
2020-06-19 15:26:10 -04:00
Matthias Clasen
c659a231d6
listbase: Increase the autoscroll threshold
...
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
4e56581222
listbase: Autoscroll during DND
...
Use a drop motion controller to autoscroll while
a drag operation is hovering over the list.
2020-06-19 15:26:10 -04:00
Matthias Clasen
e8ba16d9c2
listbase: separate autoscroll from rubberband
...
Break out an update_autoscroll() function that can
be used for other things than rubberbanding. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
55936087e0
columview: Fix cell creation
...
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.
2020-06-19 11:42:58 -04:00
Matthias Clasen
69e14ba02f
Revert "notebook: Don't capture clicks"
...
This reverts commit 37eb0496b6
.
This change broke notebook scroll arrows.
2020-06-19 11:42:47 -04:00
Benjamin Otte
ff3b03c5e2
listbase: Fix copy/paste error
...
This could lead to "flickering" scroll behavior when scrolling
horizontally.
2020-06-19 15:51:52 +02:00
Timm Bäder
fbb7948c13
stack: Avoid using an uninitialized value
...
This was showing up as criticals since for_size != >= -1.
2020-06-19 05:58:52 +02:00
Timm Bäder
d81a5a8338
stack: Add missing accessors for GtkStackPage properties
2020-06-19 05:26:25 +02:00
Timm Bäder
652323a4bf
stack: Fix some documentation mishaps
2020-06-19 05:26:25 +02:00
Timm Bäder
e45518fb5f
stack: Fix :needs-attention docs
...
This is a property on GtkStackPage these days.
2020-06-19 05:26:25 +02:00
Timm Bäder
424e46849a
widget: Don't leak css transform
2020-06-19 05:26:25 +02:00
Timm Bäder
68886ba847
treeview: Remove identical if branches
...
Fixes #2725
2020-06-19 05:26:25 +02:00
Timm Bäder
3bd648e72e
stack: stop keeping a cached child render node around
...
All widgets cache their render node already. Just allocate the
last_visible_child always at 0/0 and then move its rendernode around
during snapshot.
Fixes #2678
2020-06-19 05:26:25 +02:00
Timm Bäder
2ae8ace784
cssselector: Only copy max_selector once
2020-06-19 05:26:25 +02:00
Timm Bäder
1f89f21ca9
numbervalue: Remove some leftover debugging code
2020-06-19 05:26:25 +02:00
Timm Bäder
c6921cdc9d
builder: Use default size of 8 for the ObjectProperty arrays
2020-06-19 05:26:25 +02:00
Timm Bäder
7c9f2949ce
builder: Avoid allocating things we don't use
...
We pretty often have no parameters at all, so avoid allocating
ObjectProperties+GArray+GPtrArray in that case.
2020-06-19 05:26:25 +02:00
Timm Bäder
0b13e68bca
Avoid calling g_list_model_get_n_items() all the time
...
These are used in hot paths, e.g. widget construction.
2020-06-19 05:26:25 +02:00
Timm Bäder
b2875d7b19
window: Add automatic titlebar before content widget
...
Just like we do with explicitly set titlebars
2020-06-19 05:26:24 +02:00
Timm Bäder
ddacf8cc43
window: Don't add class to css node directly
...
Use gtk_widget_add_css_class instead
2020-06-19 05:26:24 +02:00
Timm Bäder
395d13d5f1
window: Stop adding css nodes manually
...
No decoration node, no need to do this.
2020-06-19 05:26:24 +02:00
Timm Bäder
1e6e522a93
window: Remove dead code
...
There is no decoration node anymore.
2020-06-19 05:26:24 +02:00
Timm Bäder
f49a02e5b5
adwaita: Use proper transform for spinners
2020-06-19 05:26:24 +02:00
Timm Bäder
1e4dc90d62
widget: don't queue a redraw on css transform changes
2020-06-19 05:26:24 +02:00
Timm Bäder
2c3a41a81a
csstransformvalue: Make no-transform case explicit
2020-06-19 05:26:24 +02:00
Timm Bäder
203bb42cc1
widget: Re-shuffle preconditions in snapshot_child()
...
The GtkNative type check is more expensive than the mapped one, so avoid
the former for unmapped widgets
2020-06-19 05:26:24 +02:00
Timm Bäder
461497e8d4
widget: Avoid doing GtkSnapshot work just to append one node
...
We already know that a widget will have literally 1 node, not more.
Avoid doing the GtkSnapshot state stack dance and just append a new
transform node instead.
Seems to give me around 400 more icons in the fishbowl
2020-06-19 05:26:24 +02:00
Timm Bäder
9eaeb04863
Fix print dialog node name
2020-06-19 05:25:52 +02:00
Matthias Clasen
5e6c316603
Merge branch 'better-naming' into 'master'
...
Stop using loaded terms
See merge request GNOME/gtk!2109
2020-06-19 00:09:03 +00:00
Friedrich Beckmann
a614716d0f
quartz: gtk-application - inhibit openFiles events from cmdline
...
When an application is started via cmdline, then openFiles events
from MacOS are generated although gtkapplication already interprets
the cmdline arguments and opens suitable arguments as files. So they
would be opened twice. Depending on the exact situation the
openFiles event can also be issued before the startup signal
is given. Depending on the application this can result in a crash
due to unexpected behaviour. I took this idea from the
gedit-app-osx.m file. Also from Jesse van den Kieboom.
See:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2098#note_842975
https://gitlab.gnome.org/GNOME/gtk/-/commit/a3ad7fa80f764fb7bcbe
https://gitlab.gnome.org/GNOME/gedit/-/blob/master/gedit/gedit-app-osx.m#L592
2020-06-18 16:42:54 -04:00
Emmanuele Bassi
1c856a208f
Rename master and slave device
...
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
2020-06-18 19:22:20 +01:00
Emmanuele Bassi
df73bf38c2
Rename internal object for the Quartz input method context
...
Like GtkIMMultiContext, the Quartz input method object uses a delegate
object internally. Let's not use loaded terms like "slave".
2020-06-18 17:33:30 +01:00
Emmanuele Bassi
7a1df3f914
Rename delegate input method context
...
The GtkIMMultiContext uses a delegate pattern to proxy an existing input
method context. Let's not use loaded terms like "slave" when we have
perfectly fungible terms like "delegate".
2020-06-18 17:32:05 +01:00
Emmanuele Bassi
3f78199cd5
Rename (unused) argument
2020-06-18 17:31:48 +01:00
Emmanuele Bassi
0a55d4c981
docs: Clean up the GtkBuilder description
...
Drop the reference to a long since removed RNC schema file and to
GtkUIManager; clean up the typography for code elements.
2020-06-18 17:21:09 +01:00
Emmanuele Bassi
7e03288724
Fix typo in a comment
2020-06-18 17:20:56 +01:00
Yuri Chornoivan
c0cf839729
Fix minor typos
2020-06-18 10:47:16 +03:00
Matthias Clasen
e5d6bb68ce
Fix another cloudprovider include
2020-06-17 16:19:55 -04:00
Emmanuele Bassi
12c38c1d57
Use the appropriate include for libcloudproviders
...
Libcloudproviders has a single header entry point, so we shouldn't
include a sub-header.
Additionally, the include path provided by the pkg-config file is:
-I${includedir}/cloudproviders
So the include directive should be:
#include <cloudproviders.h>
The fact that it worked until now was an accident caused by the blanket:
-I${includedir}
we get for free; it broke the build when using libcloudproviders as a
subproject.
2020-06-17 20:49:57 +01:00
Matthias Clasen
985ba832fb
Merge branch 'page-setup-combos' into 'master'
...
Page setup combos
See merge request GNOME/gtk!2100
2020-06-16 20:00:13 +00:00
Jakub Steiner
019f4b6b34
Adwaita: dropdown styling
...
- selected item color
- offset dropdown form the parent control
- special styling for the top search entry
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2846
2020-06-16 21:11:28 +02:00
Matthias Clasen
5bcb01e182
pagesetupdialog: Convert the printer combo
...
Turn the printer combo into a dropdown.
2020-06-16 14:44:30 -04:00
Matthias Clasen
25c2059abb
pagesetupdialog: Port the papersize combo
...
Turn the papersize combo into a dropdown.
2020-06-16 14:34:54 -04:00
Matthias Clasen
2a9c92f8e2
Drop unused includes
...
This is just cleanup to help tracking down
remaining GtkComboBox uses.
2020-06-16 14:34:54 -04:00
Friedrich Beckmann
d468ea3efa
quartz: added open capability to gtk_application
...
This patch implements the openFiles delegate which is required
to open files which are associated with an application via the
Finder or via open on the command line. The patch has been
proposed by jessevdk@gmail.com .
See: https://gitlab.gnome.org/GNOME/gtk/-/issues/463
I tested the patch with the GNU pspp application on MacOS with
the quartz backend.
2020-06-16 12:42:48 -04:00
Benjamin Otte
9b363a62fe
Merge branch 'benzea/fix-css-update' into 'gtk-3-24'
...
Fix CSS update loop
See merge request GNOME/gtk!2093
(cherry picked from commit 947c3e9f72
)
7a5caf1b
cssnode: Don't queue_validate/deque_validate invisible nodes
2020-06-16 13:10:15 +00:00
Matthias Clasen
c8843d0730
fontchooser: Drop unused includes
2020-06-15 23:10:40 -04:00
Matthias Clasen
687da2ca6b
text: Drop unused includes
2020-06-15 23:10:32 -04:00
Matthias Clasen
990a87fd79
printdialog: Convert some leftover code
...
There was still some code expecting to deal with tree
models. Convert it to work with list models.
2020-06-15 23:10:23 -04:00
Matthias Clasen
c4215a2bec
pagesetupdialog: Drop the Private struct
...
We don't need it here.
2020-06-15 23:10:12 -04:00
Matthias Clasen
342400d155
paperdialog: Convert the printer combo
...
Use a GtkDropDown for the printer combo.
2020-06-15 22:42:03 -04:00
Matthias Clasen
1ca308a5fd
Merge branch 'fix-notebook-tabs' into 'master'
...
Fix notebook tabs
Closes #2842 and #2841
See merge request GNOME/gtk!2092
2020-06-15 20:42:53 +00:00
Matthias Clasen
37eb0496b6
notebook: Don't capture clicks
...
Using the bubble works just fine here, and keeps buttons
in notebook tabs working without side-effects.
Fixes : #2841
2020-06-15 14:16:45 -04:00
Matthias Clasen
6a13bbbfef
Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernativeportal_get_filter' into 'master'
...
Make gtk_file_chooser_get_filter work for portal case (issue #1820 , master)
Closes #1820
See merge request GNOME/gtk!2070
2020-06-15 17:49:17 +00: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
Matthias Clasen
937317e674
docs: Cosmetics
...
Remove a few instances of GTK+ in the docs.
2020-06-15 13:48:03 -04:00
Matthias Clasen
4248835ba1
Merge branch 'matthiasc/for-master' into 'master'
...
button: Center images
See merge request GNOME/gtk!2090
2020-06-15 17:01:25 +00:00
Matthias Clasen
b526722000
button: Center images
...
If we leave the valign to be the default fill, then
the images pick up baseline alignment from the environment,
which can occasionally lead to misplaced -/+ icons in
spinbuttons, for example in the "Page Setup" tab of
the print dialog.
2020-06-15 12:24:48 -04:00
Matthias Clasen
b25bba4862
paperdialog: Port to use GtkListView
...
Use GtkListView and GtkEditableLabel here.
2020-06-15 12:08:54 -04:00
Matthias Clasen
b0d2ae612f
Add a GtkEditableLabel widget
2020-06-15 12:08:54 -04:00
Matthias Clasen
14f26d2345
inspector: Don't set style classes on app widgets
...
Due to a mixup, the inspector was setting .dim-label on
widgets that get unmapped, instead of the labels representing
them in the object tree.
2020-06-15 11:22:32 -04:00
Matthias Clasen
cf2d6f6ec5
dropdown: Style fixups
...
Make the dropdown popover have a .menu style class,
and add padding to the rows in the popover. Also,
make the popover left-aligned with the button.
2020-06-15 10:25:31 -04:00
Matthias Clasen
131cc6497a
Merge branch 'mingw-x64-compiler-warnings' into 'master'
...
Fix various compiler warnings with the 64bit mingw build
See merge request GNOME/gtk!2020
2020-06-15 01:26:45 +00:00
Christoph Reiter
85d822b2e8
Fix various compiler warnings with the 64bit mingw build
...
Use better matching format modifiers/specifiers, initialise some things
which in theory wont be written to because of getters using g_return_if_fail(),
a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.
2020-06-14 20:02:36 +02:00
Matthias Clasen
b046c8d4ad
spinbutton: Bring back auto-sizing
...
We lost this when GtkSpinButton was first ported
to the new editable regime, and then the GtkBoxLayout.
Bring it back, but without text measurement, by overriding
width-chars for the GtkText inside, and only do it if
GtkSpinButton::width-chars is unset (ie -1).
Also adjust the documentation slightly to point out
how auto-sizing can be turned off.
2020-06-14 10:55:30 -04:00