Commit Graph

35798 Commits

Author SHA1 Message Date
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
Matthias Clasen
770d6cb2bd paperdialog: Drop the private struct
Not needed here.
2020-06-12 12:54:21 -04:00
Matthias Clasen
74ac435ae6 printdialog: Replace the papersize combo with a dropdown
This one is more complicated, since it involves
separators and a custom item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
c80ba49a60 Adwaita: Allow separators on individual list items
Allow setting a .separator style class on list items
to put a separator before the item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
ed9941ec2c printdialog: Replace some combo boxes with drop downs
These are just the simple cases.
2020-06-12 08:49:01 -04:00
Matthias Clasen
c3b43f2ad2 printeroptionwidget: Port to GtkDropDown
Use GtkDropDown instead of GtkComboBox in the print dialog.
2020-06-12 08:49:01 -04:00
Matthias Clasen
933e373b07 dropdown: Make the stack nonhomogeneous
Without this, the (None) in the empty page forces
the button to have a large minimum width, even when
we don't put a widget in it.
2020-06-12 08:49:01 -04:00
Matthias Clasen
e6dcd55480 Fix the custom paper dialog
This broke during the container removal.
2020-06-12 08:46:18 -04:00
Matthias Clasen
90b78132d4 dropdown: Make the popup as wide as the button
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
2020-06-11 18:29:58 -04:00
Matthias Clasen
4a79ac4473 Adwaita: bring dropdown arrows back
These got lost when the css name changed from combobox
to dropdown.
2020-06-11 18:09:12 -04:00
Matthias Clasen
2a3e5422ad docs: Cosmetics
Remove a few instances of GTK+ from the docs, and
remove references to ancient versions.
2020-06-11 17:25:57 -04:00
Matthias Clasen
8c670b3b5d testcolumnview: Add recent file support
Use testcolumnview --recent to see recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
5dddec4dd9 Add GtkBookmarkList
This is a listmodel similar to GtkDirectoryList,
for tracking recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
059c45a85b propertyselection: Add getters
These were missing.
2020-06-11 07:35:20 -04:00
Matthias Clasen
63692a491d Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into 'master'
filechoosernative: Make get_filter work for (non-portal) native chooser (master, issue #1820)

Closes #1820

See merge request GNOME/gtk!2069
2020-06-10 14:47:36 +00:00
Emmanuele Bassi
bbe79c1ef9 Merge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'
gtkgesturezoom: Do not check touchpad phase on generic events

Closes #2825

See merge request GNOME/gtk!2071
2020-06-10 14:35:10 +00:00
Matthias Clasen
4b241f8da2 Merge branch 'scroll-compression' into 'master'
gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Carlos Garnacho
ba988cd899 gtkgesturezoom: Do not check touchpad phase on generic events
This gesture handles both individual touch events and touchpad gesture
events, and was checking the touchpad phase in generic code paths. This
is dubious since event methods error out on the wrong GdkEventTypes.

Check the touchpad gesture phase within the branch handling touchpad
events, and make it clear which is the gesture phase of all that we are
ignoring.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2825
2020-06-10 14:30:58 +02:00
Alexander Larsson
d2235b71f3 Merge branch 'win32-use-g-stat' into 'master'
gtkiconcache: Use g_stat instead of fstat

See merge request GNOME/gtk!2019
2020-06-10 07:19:22 +00:00
Michael Weghorn
ecc6c255ef Make gtk_file_chooser_get_filter work for portal case
This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.

In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)

Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.

* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311

This fixes #1820 for desktop portal case.

Fixes: #1820
2020-06-09 22:59:54 +02:00
Michael Weghorn
57135acd2d filechoosernative: Make get_filter work for (non-portal) native chooser
'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.

This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.

Bug: #1820
2020-06-09 22:59:34 +02:00
Matthias Clasen
c9fad25131 gdk: Rename gdk_motion_event_get_history
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.

Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Benjamin Otte
541aaa2392 selectionmodel: Add unselect_rest argument to select_callback
This is not just about consistency with other functions.

It is about avoiding reentrancy problems.

GtkListBase first doing an unselect_all() will then force the
SelectionModel to consider a state where all items are unselected
(and potentially deciding to autoselect one) and then cause a
"selection-changed" emission that unselects all items and potentially
updates all the list item widgets in the GtkListBase to the unselected
state.

After this, GtkListBase selects new items, but to the SelectionModel and
the list item widgets this looks like an enitrely new operation and
there is no way to associate it with the previous state, so the
SelectionModel cannot undo any previous actions it took when
unselecting.
And all listitem widgets will now think they were just selected and
start running animations about selecting.
2020-06-08 19:06:56 +02:00
Benjamin Otte
d294b01cee selectionmodel: Rename "exclusive" to "unselect_rest"
The name is better at explaining what this boolean is meant to do.
2020-06-08 18:26:48 +02:00
Benjamin Otte
5d9dc25115 listitemmanager: Update selections properly
Replace a previous fix with a more correct one: Update the
selected state from the model instead of reusing the old state, the
model might have updated the selected state.
2020-06-08 18:14:24 +02:00
Matthias Clasen
80c5e4a156 Merge branch 'matthiasc/for-master' into 'master'
dropdown: Use our own CSS name

See merge request GNOME/gtk!2061
2020-06-08 11:15:28 +00:00
Corentin Noël
27925fcb0e placessidebar: Fix build with libcloudproviders
Make it build with cloudproviders=true as the GtkPopover API for menus is now in GtkPopoverMenu.

Fix some leaks while looking at the code.
2020-06-08 10:40:46 +02:00
Matthias Clasen
5f4d21422a Merge branch 'fix-cell-editing' into 'master'
Fix cell editing

Closes #2831

See merge request GNOME/gtk!2060
2020-06-07 14:54:37 +00:00
Matthias Clasen
b0bb413faa dropdown: Use our own CSS name
Use the name dropdown for the css node, and document it.
2020-06-07 09:01:20 -04:00
Matthias Clasen
37633985bd Drop gtknativeprivate.h
No need to ship empty headers.
2020-06-07 08:52:45 -04:00
Matthias Clasen
6ff8f1b2fd Merge branch 'gtk-demo-tweaks' into 'master'
Gtk demo tweaks

See merge request GNOME/gtk!2059
2020-06-07 12:51:34 +00:00
Matthias Clasen
d13a3c7540 Fix cell editing
When translating coordinates from an event, we need to
take the surface transform into account. This makes
double-clicking on editable cells in treeviews work
again.

Fixes: #2831
2020-06-07 08:46:31 -04:00
Matthias Clasen
b251893030 Drop pango version checks
We are requiring pango 1.45.0 now, so no need to
Keep these ifdefs in the code any longer.
2020-06-06 21:32:55 -04:00
Emmanuele Bassi
7c382c6b47 Annotate the GtkSelectionModel callbacks
We need a scope for the select and unselect callback arguments.
2020-06-07 00:39:33 +01:00
Matthias Clasen
1567db1f02 Merge branch 'misc-multiselection' into 'master'
Misc multiselection

See merge request GNOME/gtk!2055
2020-06-06 17:54:42 +00:00