Matthias Clasen
2d8fddc1e9
filefilter: Drop GtkFileFilterFlags
...
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
2020-07-05 15:10:13 -04:00
Matthias Clasen
644d522d19
filefilter: Drop custom filters
...
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1
filefilter: Drop GtkFileFilterInfo
...
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
2020-07-05 13:55:42 -04:00
Matthias Clasen
acccac516e
filefiler: No more floating
...
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
2020-07-05 12:36:47 -04:00
Benjamin Otte
1dbb8df95f
stringlist: Export gtk_string_object_new()
...
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f6c2c2edbd
stringlist: Call splice() for adding items after construction
...
This has the benefit of actually allowing NULL to be passed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
c4e4de36f6
stringlist: Remove n_additions argument from gtk_string_list_splice()
...
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
2020-07-05 02:59:21 +02:00
Benjamin Otte
67cbb2a7d3
stringlist: Clarify docs for gtk_string_list_get_string()
...
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
2020-07-05 02:59:21 +02:00
Benjamin Otte
a979daa8ea
stringlist: Make one constructor call the other
...
Simplifies code.
2020-07-05 02:59:21 +02:00
Benjamin Otte
fb14f50ec1
stringlist: Make property not construct-only
...
Massively speeds up creation of long stringlists.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6099fbafc1
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-05 02:59:21 +02:00
Benjamin Otte
795d3122cc
selectionmodels: Add set_model() support
...
Now that we don't care about item types anymore, we can make the child
models settable.
We try to retain the selection, even when the model changes.
2020-07-05 02:59:21 +02:00
Benjamin Otte
5080730728
listmodels: Stop respecting item-type
...
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f75a3a0e95
stringlist: Take a const char const * argument
...
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
2020-07-05 02:34:42 +02:00
Benjamin Otte
b75db7d1c6
stringfilter: Don't crash if the expression returns ""
2020-07-05 00:34:21 +02:00
Benjamin Otte
b03069bdf6
a11y: Remove double initialization of variables
2020-07-05 00:34:21 +02:00
Matthias Clasen
9332d0dcc8
Merge branch 'typo' into 'master'
...
Fixes typos
See merge request GNOME/gtk!2188
2020-07-04 15:48:29 +00:00
Matthias Clasen
69975627e9
filechooser: Make filtering work again
...
One too many lines were dropped when this filter combo
was converted to a dropdown. Bring it back, to make
filtering work again.
2020-07-04 10:28:10 -04:00
Jordi Mas
599b807726
Fixes typos
2020-07-04 10:00:25 +02:00
Matthias Clasen
c2da2f7ecd
selectionfilter: Fix bugs in signal translation
...
When the position is 0, we can't check for unchanged
elements below with gtk_bitset_size_in_range. And
we don't need to, either.
And be careful when translating [start,length]
intervals to [first,last] ones. Off-by-one errors
lurk everywhere.
2020-07-03 11:12:55 -04:00
Matthias Clasen
130bd5937c
docs: Add guidance about list model performance
...
Add a section about the performance tradeoffs between
different list model implementations.
2020-07-03 09:29:19 -04:00
Matthias Clasen
f01d695e6c
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix the monitor list width
Closes #2909
See merge request GNOME/gtk!2185
2020-07-03 05:51:29 +00:00
Matthias Clasen
619b2465c1
inspector: Fix the monitor list width
...
Fixes #2909
2020-07-03 01:07:13 -04:00
Matthias Clasen
cc18191a8e
Merge branch 'wip/exalm/show-title-buttons' into 'master'
...
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
2020-07-03 05:05:24 +00:00
Matthias Clasen
76533513c2
Add a selection filter model
...
This model presents the selection of a GtkSelectionModel
as its own list model.
2020-07-02 22:59:03 -04:00
Matthias Clasen
0d3988365b
filterlistmodel: Make model not construct-only
...
This property wasn't meant to be construct-only.
2020-07-02 22:59:03 -04:00
Benjamin Otte
0966636803
bitset: Add APIs needed for a filterlistmodel
2020-07-02 17:19:16 -04:00
Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
988901294d
Merge branch 'matthiasc/for-master' into 'master'
...
Add gtk_multi_selection_get_model
See merge request GNOME/gtk!2179
2020-07-01 01:36:47 +00:00
Matthias Clasen
43b9fc6981
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2162
2020-07-01 01:35:56 +00:00
Benjamin Otte
25f670faae
Merge branch 'wip/chergert/gtk4-remove-textlayout-vtable' into 'master'
...
textlayout: remove virtual table indirection
See merge request GNOME/gtk!2178
2020-07-01 01:19:12 +00:00
Matthias Clasen
d0068a036f
Add gtk_multi_selection_get_model
...
This getter was missing.
2020-06-30 20:47:03 -04:00
Christian Hergert
fae014eb45
textlayout: remove virtual table indirection
...
GtkTextLayout is private now and therefore we can drop all of
the indirection through the class vtable. Instead, just call the
implementations directly and remove the unused vtable entries
for default signal handlers.
2020-06-30 17:38:31 -07:00
Matthias Clasen
f0ea0be15d
Merge branch 'matthiasc/for-master' into 'master'
...
Drop unnecessary uses of gtk_style_context_add_class
See merge request GNOME/gtk!2177
2020-06-30 22:52:18 +00:00
Matthias Clasen
c0e2d7c62f
Drop unnecessary uses of gtk_style_context_add_class
...
We can use gtk_widget_add_css_class instead, most places.
2020-06-30 17:42:30 -04:00
Matthias Clasen
cc072eb7cd
inspector: Avoid a use of gtk_style_context_add_class
...
We have gtk_widget_add_css_class for this now.
2020-06-30 17:10:05 -04:00
Matthias Clasen
613213f597
inspector: proper list model support
...
Add a data tab for list models that allows exploring
the objects in the model.
2020-06-30 17:09:55 -04:00
Matthias Clasen
52666d6fe5
inspector: Rename DataList -> TreeData
...
Rename the DataList object to TreeData, in preparation
for adding a ListData object for list models. While
we are touching it, modernize it a bit (drop the Private
struct, use a layout manager, etc).
2020-06-30 15:18:37 -04:00
Matthias Clasen
bbb28196e5
inspector: Remove list model support from the property editor
...
This makes the inspector lock up when used with any production
size list model, and blocks access to properties of the model
itself. Instead, we'll make the model available as an object
and add a data tab for list model contents, like we already
do for tree models.
2020-06-30 14:22:01 -04:00
Emmanuele Bassi
f2853ffa8e
Add nullable annotations for gtk_cclosure_expression_new()
...
Fixes : #2904
2020-06-30 12:11:21 +01:00
Matthias Clasen
fca2ba963d
gtklistitemfactory: Cosmetic documentation fixes
2020-06-29 22:11:44 -04:00
Matthias Clasen
806779769e
builderlistitemfactory: Documentation fixes
2020-06-29 22:11:36 -04:00
Matthias Clasen
82aa0d1f7c
expression: Add to the docs
...
Add some more long-form explanation of what expressions
are about and where they are used.
2020-06-29 22:10:34 -04:00
Matthias Clasen
72f1d34eca
Drop GtkFunctionsListItemFactory
...
It has been superseded by GtkSignalsListItemFactory.
2020-06-29 22:10:34 -04:00
Matthias Clasen
c267a75eef
Stop using GtkFunctionsListItemFactory
...
This was an early attempt at a factory, and has been
superseded by GtkSignalsListItemFactory. Port all users
the the newer one.
2020-06-29 22:10:34 -04:00
Jehan
7ccf32db57
gtk: focus out the GtkIMContextWayland upon finalization.
...
In particular, it will NULL-ified the current global context if this is
the finalized one, avoiding dangling invalid pointers.
Would have been a cherry-pick from branch gtk-3-24 of commit
b592ded80a
, but files moved.
2020-06-29 22:17:08 +02:00
Matthias Clasen
b77110c35a
bitset: Fix documentation syntax
2020-06-28 22:38:23 -04:00
Matthias Clasen
c8b57154cb
bitset: Correct preconditions in gtk_bitset_add_rectangle
...
We want to make sure that the rectangle fits in the grid.
2020-06-28 22:38:22 -04:00
Matthias Clasen
c4b2112f16
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2743
See merge request GNOME/gtk!2161
2020-06-28 23:47:09 +00:00
Matthias Clasen
6a6146a9e0
bitset: Fix the right-shift implementation
...
This was not doing the right thing at all.
This commit also adds tests for left- and
right-shift.
2020-06-28 16:37:30 -04:00
Matthias Clasen
5229069101
widget: Avoid uninitialized access
...
Initialize all field in the GtkCrossingData struct
when synthesizing crossing events.
Fixes : #2743
2020-06-28 13:42:02 -04:00
Matthias Clasen
a6752bd3e0
gtk: Better help for GTK_DEBUG
...
Reuse the newly introduced gdk_parse_debug_var for
GTK_DEBUG.
2020-06-28 13:42:02 -04:00
Matthias Clasen
30eca5a523
Drop GTK_DEBUG_SHORTCUTS
...
It is unused.
2020-06-28 13:42:02 -04:00
Matthias Clasen
4fa71fd82a
shortcuts: Use GTK_DEBUG_KEYBINDINGS
...
There was just a single message under GTK_DEBUG_SHORTCUTS.
Consolidate with GTK_DEBUG_KEYBINDINGS.
2020-06-28 13:42:02 -04:00
Matthias Clasen
5d9bcfb64a
stringlist: Cosmetic documentation fix
2020-06-28 12:43:16 -04:00
Matthias Clasen
334f95479b
sorter: Some doc corrections
...
The docs were referring to some non-existing enum value.
Fix things up to match the current code.
2020-06-28 12:43:11 -04:00
Matthias Clasen
9dff4d6ff3
stack: Remove nonexisting api from headers
...
The homogeneous property was dropped a while ago.
2020-06-28 12:43:11 -04:00
Matthias Clasen
7c98af6358
stack: Cosmetic documentation fixes
...
Fix parameter mismatches.
2020-06-28 12:23:52 -04:00
Matthias Clasen
ddcba4d33f
bitset: Cosmetic documentation changes
2020-06-28 12:23:52 -04:00
Emmanuele Bassi
24d6a190af
Add pre-condition check on nullable argument
...
Even if `gtk_expression_watch()` will do the same, we're calling public
API, so we should perform a check at the point of use, to ensure that
warnings are easily debuggable.
2020-06-28 13:42:03 +01:00
Emmanuele Bassi
6a4b5ead86
Annotate nullable argument
...
The `this_` argument is passed to `gtk_expression_watch()`, which
accepts it as nullable.
Fixes : #2900
2020-06-28 13:41:54 +01:00
Matthias Clasen
8a269de89a
multiselection: Update docs
...
Remove information that is no longer true. GtkMultiSelection
is persistent across sorting changes since 3d8b6f6b79
.
2020-06-27 21:40:26 -04:00
Matthias Clasen
65902367c6
builder: Documentation tweaks
...
Don't use no-longer-existing enums as examples,
and drop the +.
2020-06-27 17:28:15 -04:00
Matthias Clasen
4fb495d0fe
builder: Warn about dropped objects
...
Use GTK_DEBUG=builder-objects to make GtkBuilder warn
if a named object from a ui files doesn't get claimed
by gtk_builder_get_object(). This is useful for finding
dead wood in .ui files.
2020-06-27 09:47:00 -04:00
Timm Bäder
83543423e2
widget: Don't get the frame clock if we don't use it
2020-06-27 11:47:42 +02:00
Timm Bäder
d0bb72a2aa
label: Only care about clipboard in unrealize of we need to
2020-06-27 11:47:39 +02:00
Timm Bäder
8cc2a44268
recorder: Don't select new row when adding recording
...
This is what makes the recorder slow. We might want to scroll down in
the list though.
2020-06-27 11:30:02 +02:00
Timm Bäder
2534310ce9
recorder: Remove frame time from recording rows
...
We should bring this back in a different way, e.g. in a way that doesn't
just use the time of the previous recording.
2020-06-27 11:15:51 +02:00
Timm Bäder
3a4fbc5e50
recorder: Remove Full/Partial render distinction
...
It doesn't exist anymore these days
2020-06-27 11:08:09 +02:00
Timm Bäder
89a67ac719
recorder: s/gint/int/g
2020-06-27 11:04:03 +02:00
Timm Bäder
21b84b1890
recorder: Remove some debug spew
...
Stop printing the number of nodes we have
2020-06-27 11:01:28 +02:00
Timm Bäder
20935f678b
scale: Rearrange child widgets
...
Always keep the order:
- [value]
- [marks.top]
- [marks.bottom]
- trough
Which makes sense given the rendering order. Slider should be drawn
after the marks.
Makes it possible to simply remove the custom snapshot implementations
in scale and range. And Adwaita does not depend on the node order
anyway.
2020-06-27 10:51:06 +02:00
Timm Bäder
c41b4130c6
textview: Remove unused define
2020-06-27 10:51:06 +02:00
Timm Bäder
f1b010af66
Add .view to view widgets
2020-06-27 10:51:06 +02:00
Timm Bäder
ec1133d6e1
renderbackground: Only query number of layers once
...
We did it once in snapshot_background and then again in snapshot_color.
2020-06-27 10:51:06 +02:00
Timm Bäder
8fcf1b78a4
renderbackground: Only query h/vrepeat if we need to
2020-06-27 10:51:06 +02:00
Matthias Clasen
3a70ca9d03
listitem: Correct the docs
2020-06-26 23:10:21 -04:00
Matthias Clasen
0d10982379
text: Support reverse selection
...
Take ordering of cursor_position and selection_bound
into account when copying text to the clipboard, and
ensure that both orders work the same.
Fixes : #2898
2020-06-26 22:22:47 -04:00
Matthias Clasen
c20a966f06
text: Update action enabled state correctly
...
Take the editable property into account when updating
the emoji.insert action state, and update the action
when it changes.
Fixes : #2897
2020-06-26 22:13:12 -04:00
Matthias Clasen
64db05d3dd
shortcutcontroller: Add some debug spew
...
This helps in debugging event routing and keyboard
shortcut issues.
2020-06-26 22:12:42 -04:00
Matthias Clasen
913cd91df0
widget: Fix an oversight
...
g_message comes with a builtin newline, don't add one
to the message.
2020-06-26 22:12:14 -04:00
Matthias Clasen
cfdc81af02
Adwaita: Fix block cursors in spinbuttons
...
Fix block cursors in vertical spinbuttons with Adwaita.
Fixes : #2871
2020-06-26 19:56:10 -04:00
Matthias Clasen
fd2861d683
docs: Add css docs to entries
...
The various entries were missing the semi-standard
"CSS Nodes" section in their long descriptions. Add
them.
2020-06-26 16:13:02 -04:00
Matthias Clasen
cd9f5733b3
text: Be more selective when selecting on focus-in
...
We don't want to select on focus-in when the focus
comes from a child. The case where this does harm
is when you activate copy or paste actions from the
context menu. We close the menu before triggering the
action, and if that causes the text in the entry to
be selected, unexpected things happen, since the action
applies to the current selection.
Fixes : #2869
2020-06-26 15:49:39 -04:00
Matthias Clasen
8b4560cbfb
Revert "text: Avoid creating a PangoAttrList we don't need"
...
This reverts commit 67c2665028
.
The splicing we do here has the important side-effect
of shifting the preedit attributes to the right position.
Without it, we end up always underlining the first chars
in the entry, regardless where the preedit happens.
2020-06-26 15:27:17 -04:00
Matthias Clasen
2d914d52be
text: Handle key events in the target phase
...
This makes sure that we do actual key input right
in the middle between all the capture and bubble
event controllers, and are not dependent on the
ordering of those controllers.
The bug that triggered this change was that the
shortcut for activation (Enter) was getting triggered
before the key input, causing Ctrl-Shift-u hex
to stop working, since it never received the enter
to commit the sequence.
2020-06-26 14:08:35 -04:00
Matthias Clasen
a26865e741
widget: Add a debug message for consumed key events
...
Run the application with GTK_DEBUG=keybindings to
get some hints where key events get lost.
2020-06-26 14:08:14 -04:00
Matthias Clasen
3558beaa61
text: Give names to event controllers
...
It helps with debugging.
2020-06-26 14:08:11 -04:00
Carlos Garnacho
0ce4f66976
gtktext: Don't accept (twice!) all press actions
...
The gesture should claim the sequence after triggering uncancellable
actions, like pasting, showing a menu or selecting words/lines. A
single first button press initiating a drag does not trigger
anything yet, so it should avoid claiming the sequence.
2020-06-26 17:48:10 +02:00
Carlos Garnacho
b81bbde7c8
gtkswitch: Don't be eager in accepting the gesture
...
The gesture should be accepted whenever it triggers uncancellable
actions in the widget. This means it should be accepted if the
click does result in toggling the switch.
This leaves the pan gesture room to handle dragging the handle.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2895
2020-06-26 17:48:10 +02:00
Matthias Clasen
3f55bfe2cb
Merge branch 'matthiasc/for-master' into 'master'
...
main: Avoid a warning
Closes #2894
See merge request GNOME/gtk!2153
2020-06-26 14:31:20 +00:00
Matthias Clasen
e04191a5ea
Merge branch 'wip/otte/bitset' into 'master'
...
Improve selection handling API for rubberbanding
See merge request GNOME/gtk!2086
2020-06-26 12:43:49 +00:00
Matthias Clasen
f07d304f19
main: Avoid a warning
...
transient-for relationships only exist between
windows, so check that both candidates are such.
Fixes : #2894
2020-06-26 08:19:32 -04:00
Emmanuele Bassi
1d1f618a13
Merge branch 'tintou/dropdown-annotations' into 'master'
...
dropdown: Annotate the get_selected_item method
See merge request GNOME/gtk!2152
2020-06-26 08:48:51 +00:00
Corentin Noël
721396b6d6
dropdown: Annotate the get_selected_item method
...
We need to specify the type as we already know that it is at least a GObject and in case of no selection, NULL is returned.
2020-06-26 10:00:59 +02:00
Benjamin Otte
dc1dbe6158
listbase: Make rubberbanding a threshold drag
2020-06-26 07:13:32 +02:00
Benjamin Otte
30488e60e2
listbase: Only compute the modifiers when releasing the rubberband
...
... and do the right things:
nothing: selection = rubberband
ctrl: selection = selection OR rubberband
shift: selection = selection AND (NOT rubberband)
ctrl+shift: selection = selection XOR rubberband
(not sure this one makes sense, but toggling is fun)
2020-06-26 07:13:32 +02:00
Benjamin Otte
a5949960bc
listbase: Compute rubberband region on-demand
...
Instead of storing the active items as we go, compute the affected items
whenever the rubberband changes and in particular when the rubberband
ends.
That way, the rubberband is guaranteed to select a rectangle even
after scrolling very far.
This is achieved by having a get_items_in_rect() vfunc that selects all
the items in the rubberbanded rectangle and returns them as a bitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
ec4a489093
listview: Allocate rubberband at end of size_allocate()
...
Otherwise the rubberband uses the wrong scroll offsets.
2020-06-26 07:13:32 +02:00
Benjamin Otte
7c52e03815
listbase: Flip autoscroll deltas if adjustments are flipped
...
Fixes autoscroll on RTL languages.
2020-06-26 07:13:32 +02:00
Benjamin Otte
724c9361f3
listbase: Allocate gridview items properly on RTL
...
We need to flip the items.
2020-06-26 07:13:32 +02:00
Benjamin Otte
147388e69a
multiselection: Implement get_selection_in_range()
2020-06-26 07:13:32 +02:00
Benjamin Otte
64aa281c97
listbase: Allocate rubberband according to list coords
...
The rubberband is now handled on the list coordinate system.
When starting the rubberband, we track the item under the pointer and
follow it when it is moving.
This may lead to the rubberband start position changing position and
while this may be confusing, it alerts users to the fact that something
crazy is going on.
2020-06-26 07:13:32 +02:00
Benjamin Otte
c2b0330c56
listbase: Move a common function from the children into GtkListBase
...
We want to use it for the rubberband later.
2020-06-26 07:13:32 +02:00
Benjamin Otte
de4803bb21
listbase: Don't do extra work
...
Scrolling causes a queue_resize() which will update the rubberband in
size_allocate() and queue a draw.
2020-06-26 07:13:32 +02:00
Benjamin Otte
e574dcb091
Fix indentation
2020-06-26 07:13:32 +02:00
Benjamin Otte
488b0cbb69
gtk: Remove GtkPropertySelection
...
GtkMultiSelection is so much faster than this that it isn't needed.
2020-06-26 07:13:32 +02:00
Benjamin Otte
3d8b6f6b79
multiselection: Track items across resorts
...
In particular, track which items remain in ::items-changed
signal emissions.
But the main use case is sorting, which causes items-changed(0, n, n)
to be emitted.
2020-06-26 07:13:32 +02:00
Benjamin Otte
58d3213eef
Remove GtkSet
...
It's been superceded by GtkBitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
006dfdc55a
selectionmodel: Remove select_callback() functions
...
gtk_selection_model_set_selection() takes care of those now.
2020-06-26 07:13:32 +02:00
Benjamin Otte
a38c423ddb
listbase: Port rubberband to gtk_selection_model_set_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
fa0295629b
selectionmodel: Add gtk_selection_model_set_selection()
...
Also port the testsuite.
2020-06-26 07:13:32 +02:00
Benjamin Otte
8395698090
selectionmodel: Replace query_range() with get_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
277a91dbf8
multiselection: Port to GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
db452f0c45
Add GtkBitset
2020-06-26 07:13:32 +02:00
Rico Tzschichholz
5b1195f874
gtk: Add some g-i annotations to GtkStringList
2020-06-26 06:36:23 +02:00
Benjamin Otte
d830724d4f
Add amalgamated roaring bitmaps source code
...
Taken from https://github.com/RoaringBitmap/CRoaring and fixed to
not spew warnings.
2020-06-26 06:19:56 +02:00
Matthias Clasen
0ec868bd69
inspector: Adapt to dropdown api change
...
The suppported syntax for dropdowns in ui files
has changed. Get with the program.
2020-06-25 16:42:30 -04:00
Matthias Clasen
1f410faccb
searchentry: Update the docs slightly
...
Update the docs to get closer to describing reality.
2020-06-25 14:27:44 -04:00
Matthias Clasen
d0e56106fe
Drop unused includes
...
Don't include gtkfilechooserentry.h where it
isn't used.
2020-06-25 14:27:31 -04:00
Matthias Clasen
3d3d7dbc59
stringfilter: Fix a typo
2020-06-25 14:27:23 -04:00
Matthias Clasen
db82eaec0a
Merge branch 'wip/carlosg/input-cleanups' into 'master'
...
Some input cleanups
Closes #2851
See merge request GNOME/gtk!2147
2020-06-24 21:32:30 +00:00
Matthias Clasen
f4e200708d
Merge branch 'scrolled-window-api' into 'master'
...
scrolledwindow: Don't take adjustments in new()
See merge request GNOME/gtk!2146
2020-06-24 19:58:03 +00:00
Carlos Garnacho
8eeef54b2e
gtktextview: Remove child textview items last
...
The function tries to go through every child, so it's convenient
to remove all internal ones first.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
8e549d73a0
gtkwidget: Drop _gtk_widget_[gs]et_shadowed()
...
This API is meaningless now, with grab-notify being handled internally.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
102d2a36f3
gtkwidget: Avoid use of shadowed flag
...
This is going away, look up whether there is a grab, and whether
the widget is within it, instead.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
f046e27bb4
gtkwidget: Drop gtk_widget_device_is_shadowed()
...
A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1c5cf17f1c
gtkwidget: Drop internal checks in grab-notify
...
There's no need to check if the widget is already shadowed, we
implicitly have that from the signal argument.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
ddb3a4be3e
gtkmain: Make grab-notify notifications more targeted
...
We only want to send grab-notify to widgets that might have been
interacting with devices via events. Instead of going through all
widgets in all toplevels, we have the window/pointer focus information,
so we can just traverse the widget stacks for every involved foci.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
994f32704b
gtkwidget: Drop ::grab-notify signal and vfunc
...
We don't expect widgets to react directly to these anymore.
Internally we still reset the controllers.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1f798643c8
gtkprintoperation-win32: Don't track grab-notify
...
Further grabs could presumably only come from events handled within
the dialog itself. It seems overeager to do this.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
2f8d5e2dcd
gtkvideo: Track child focus to determine whether controls should autohide
...
Move away from grab_notify, and use the set_child_focus() vfunc to track
child widgets being set the keyboard focus. This is not 1:1, but seems
good enough at the moment.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
df30741535
gtkbutton: Drop grab_notify handler
...
The click gesture already has a ::cancel handler, and does almost
everything it should. Move the last bits and remove the grab_notify
handler.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
762748028a
gtkspinbutton: Drop grab_notify handler
...
The press gesture on the buttons already has a ::cancel handler,
this is redundant.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
f7c5cf137c
gtknotebook: Move away from grab_notify
...
Connect to ::cancel on the relevant gesture instead.
2020-06-24 20:35:22 +02:00
Matthias Clasen
e834e51c0f
Install gtkstringlist.h
2020-06-24 13:02:50 -04:00
Matthias Clasen
bce518b214
entrycompletion: Various fixes
...
Fix various issues that prevented inline completion
and inline selection from working reliably. We were
passing byte counts to gtk_editable_select_region in
one place, but that function expects char counts.
We were listening for GtkEditable::insert-text on
the GtkText widget, but that does not emit those signals,
so listen for GtkEntryBuffer::inserted-text instead.
Finally, we were not clearing the stored completion_prefix
enough, leading to situations where the stored prefix
does not match the text in the entry anymore.
2020-06-24 13:02:50 -04:00
Matthias Clasen
386b63b85d
scrolledwindow: Don't take adjustments in new()
...
In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.
2020-06-24 11:25:09 -04:00
Carlos Garnacho
803103640a
gtkwindowhandle: Drop has-grab checks
...
While it's worth thinking about bringing the "windows can be dragged
with open popovers" behavior back, this does not kick in anymore, nor
should be the way to handle this given all the autoclose surface
semantic changes.
2020-06-24 13:41:28 +02:00
Carlos Garnacho
f401b05e7b
gtkwidget: Avoid poking surfaces and events in gtk_widget_list_devices()
...
This got stuck in ancient times when widgets were windowed, so the devices
in a window to know the devices in that widget would pan out. We do only
want here the devices that are inside the widget, not spread over the
surface, so rewrite this helper function to poke the toplevel foci, and
look they are contained inside the widget.
2020-06-24 11:14:52 +02:00
Carlos Garnacho
42ed8a2748
gtkwidget: Drop _gtk_widget_get_device_surface()
...
A widget cannot have multiple surfaces anymore, nor needs to
fetch the last event surface as it ought to handle its own.
2020-06-24 10:47:15 +02:00
Carlos Garnacho
f872eb64b5
gtkmain: Drop unused struct field
...
Grabs are, ironically, not about devices anymore. This struct field
is never set.
2020-06-24 10:47:15 +02:00
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
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
Emmanuel Gil Peyrot
404d79153e
Switch to GL_ARB_framebuffer_object
...
GTK 4.0 was currently using GL_EXT_framebuffer_object, which is
deprecated as the ARB version has been merged into OpenGL 3.0 as well as
OpenGL ES 2.0, and provides laxer requirements.
This is a port of !2076 for 4.x.
2020-06-12 15:08:44 +02: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