Matthias Clasen
e637693131
columnviewlayout: Use header allocation for titles
...
Normally, this will be identical to the column
allocation, but we will temporarily change it
during column reordering.
2020-06-03 13:31:39 -04:00
Matthias Clasen
c9d5b77403
columnviewcolumn: Add reordering helpers
...
Add helper functions that let us temporarily give
a different allocation to headers. These will be
used to implement interactive column reordering
in GtkColumnView.
2020-06-03 13:31:39 -04:00
Matthias Clasen
574595993c
columnviewtitle: Trigger action on release
...
This is necessary to make drag-to-reorder work
without triggering resorting.
2020-06-03 13:31:31 -04:00
Matthias Clasen
ac082e5504
gtk-demo: Make some columns resizable
...
Make the columns in the List > Settings demo
resizable, to demonstrate this functionality.
2020-06-03 12:49:40 -04:00
Matthias Clasen
f65f9591a1
columnview: Interactive column resizing
...
This copies just enough of the treeview code to
get columns moving.
2020-06-03 12:49:40 -04:00
Matthias Clasen
a1eadde25b
columnviewcolumn: Add a helper
...
We need to check whether clicks are in the headers
of columns, so let the column view get at the the
header widget.
2020-06-03 12:49:40 -04:00
Matthias Clasen
66e5027756
columnview: Add a GtkColumnViewColumn:resizable property
...
This will be used for interactive column resizing
in the future.
2020-06-03 12:49:38 -04:00
Matthias Clasen
aa2d339508
columnview: Add a helper
...
The column code needs to get access to the
listitem widgets that are children of the listview,
so add a getter.
2020-06-03 12:48:56 -04:00
Matthias Clasen
d43aacefc9
columnview: Add GtkColumnViewColumn:fixed-width
...
Add a fixed-width property similar to the same property
of GtkTreeViewColumn.
2020-06-03 12:48:39 -04:00
Matthias Clasen
f0a0e20b2f
columnview: Implement horizontal scrolling
...
The listview inside always thinks it gets its full size,
and updates its horizontal adjustment accordingly.
So keep our own adjustment, and update it when allocating.
2020-06-03 12:48:20 -04:00
Matthias Clasen
befdd8bb66
columnview: Revise scroll-minimum handling
...
Tweak the behavior slightly. We don't show
a scrollbar as long as we have at least
min-size available, but we still give the
entire size to the child, up to nat-size.
This matches how viewports handle scroll-minimum.
2020-06-03 12:48:20 -04:00
Benjamin Otte
27ed2cc009
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2022
2020-06-03 16:33:54 +00:00
Matthias Clasen
19da93b675
Merge branch 'columnview-menu' into 'master'
...
columnview: Add header menus
See merge request GNOME/gtk!2001
2020-06-03 15:51:26 +00:00
Matthias Clasen
ab2c8de4de
Merge branch 'matthiasc/for-master' into 'master'
...
selection model: Further documentation tweaks
See merge request GNOME/gtk!2021
2020-06-03 15:11:59 +00:00
Benjamin Otte
00f2b134e3
columnview: Make sure focus can move into cells
...
The cells themselves should never be focusable though.
2020-06-03 16:55:39 +02:00
Benjamin Otte
0b8cebd6ef
ffmediafile: Add fixes for recent cflags changes
...
Related: #2771
2020-06-03 16:23:49 +02:00
Matthias Clasen
53a9b7f6c0
selection model: Further documentation tweaks
...
Reword this to use plain language instead of throwing
arond reentrancy and ordering.
2020-06-03 07:51:29 -04:00
Matthias Clasen
667fd927ee
Merge branch 'selection-model-docs' into 'master'
...
selectionmodel: Clarify docs
Closes #2806
See merge request GNOME/gtk!2017
2020-06-03 05:27:46 +00:00
Matthias Clasen
a8956838d3
selectionmodel: Clarify docs
...
Clarify some things that were not clear to me before
discussing them.
Fixes : #2806
2020-06-02 15:09:16 -04:00
Matthias Clasen
f6be407e33
Merge branch 'carlosgc/emoji-chooser-fixes' into 'master'
...
Fix emoji chooser warnings on destroy
See merge request GNOME/gtk!2016
2020-06-02 16:06:47 +00:00
Carlos Garcia Campos
2bf9b37e59
emojichooser: Unparent the variations popup on dispose and before adding a new one
...
This was causing warnings when destroying the emoji chooser because it
had children left.
2020-06-02 16:47:56 +02:00
Carlos Garcia Campos
d2e0ada794
textview: Unparent the emoji chooser on dispose
...
This was causing the warning "GtkEmojiChooser is not a child of
GtkTextView" when destroying a GtkTextView if the emoji chooser was
shown.
2020-06-02 16:47:56 +02:00
Matthias Clasen
c07ae5806e
Merge branch 'matthiasc/for-master' into 'master'
...
Cosmetic improvements to the filebrowser demo
See merge request GNOME/gtk!2015
2020-06-02 04:30:29 +00:00
Matthias Clasen
5afe6f7825
Cosmetic improvements to the filebrowser demo
...
Make it look good.
2020-06-01 23:13:20 -04:00
Matthias Clasen
d02c48f987
Add more columns to the settings demo
...
Flesh out this demo more, so we can have a
non-trivial column editor here at some point.
2020-06-01 22:10:53 -04:00
Matthias Clasen
c835214540
Add a header menu to settings demo
...
Allow toggling column visibility from here.
2020-06-01 22:10:53 -04:00
Matthias Clasen
cb2901ec40
columnviewtitle: Display a context menu
...
When the ::header-menu property is set on the
column, use the menu model to create and show
a context menu.
2020-06-01 22:10:53 -04:00
Matthias Clasen
f27bd061fb
columnviewcolumn: Add a menu property
...
Add a ::header-menu property that will be used
to create a context menu for the header of the
column.
2020-06-01 22:10:53 -04:00
Matthias Clasen
572386e4ce
Merge branch 'matthiasc/for-master' into 'master'
...
print backend: Fix list model handling in dispose
See merge request GNOME/gtk!2013
2020-06-02 00:07:45 +00:00
Matthias Clasen
67a972182e
Merge branch 'ebassi/expression-type' into 'master'
...
Ebassi/expression type
See merge request GNOME/gtk!2014
2020-06-01 22:48:26 +00:00
Matej Urbančič
5955e11a5a
Added Slovenian translation
2020-06-01 22:19:55 +02:00
Emmanuele Bassi
8daaafc864
Document how to define properties using GtkExpression
...
Use the GtkParamSpecExpression type to describe the property, and the
GValue API to set and get the expression instance.
2020-06-01 21:17:34 +01:00
Emmanuele Bassi
ebaa96c0fa
Turn GtkExpression into a GTypeInstance
...
Since it's a type with sub-classes, we need to use GTypeInstance (at the
very least), otherwise we won't be able to address each sub-class as
such.
This is similar to how GskRenderNode and GdkEvent are handled, with the
added difficulty that GtkExpression is meant to be used in properties,
in order to be deserialised by GtkBuilder. This requires adding a
GParamSpec sub-class that we can match on from within GtkBuilder,
alongside some convenience API for storing a GtkExpression inside a
GValue.
2020-06-01 21:07:53 +01:00
Emmanuele Bassi
fb3d08c651
Print out the file name we're testing
...
We're printing out the file we're testing once we succeed, but it's hard
to know which file caused a failure. Let's add a g_test_message()
directive so we can look in our logs.
2020-06-01 21:06:04 +01:00
Matthias Clasen
9d15e64f0b
gtk-demo: Plug a leak
...
We were leaking a reference to the settings demo.
This showed up as gtk4-demo --run listview_settings
not exiting when the window is closed.
2020-06-01 15:17:21 -04:00
Matthias Clasen
b62564fd98
columnviewcolumn: Fix visibility implementation
...
We were not properly syncing initial visibility
with widgets.
2020-06-01 14:47:12 -04:00
Matthias Clasen
0266bcab7a
Add a test for the previous fix
...
This checks that action muxer hierarchy is properly
updated when muxers appear in the middle.
2020-06-01 13:52:50 -04:00
Matthias Clasen
6652e14662
Update action muxer hierarchy propertly
...
When a new muxer appears, we must not only make it
inherit from the parent, we also have to update all
children to inherit from it.
2020-06-01 13:52:42 -04:00
Matthias Clasen
7a50f86f3f
print backend: Fix list model handling in dispose
...
The print backends do some complicated dispose handling
where the implementations call gtk_print_backend_destroy().
Our tests (in particular, the templates test) trigger
situations where we use print backends after dispose,
and they can't handle the printers listmodel being
NULL at that time. So just remove the printers in
dispose, keep the empty liststore until finalize.
2020-06-01 13:52:21 -04:00
Kukuh Syafaat
59218d02c8
Update Indonesian translation
2020-06-01 13:29:20 +00:00
Matthias Clasen
fe73730d21
Merge branch 'gtk-demo-run-no-main-window' into 'master'
...
gtk-demo: Don't show main window if --run is passed in
See merge request GNOME/gtk!1979
2020-06-01 12:26:15 +00:00
Matthias Clasen
b814970bdd
Merge branch 'fix-frameclock-going-backwards' into 'master'
...
Fix frameclock going backwards
See merge request GNOME/gtk!2011
2020-06-01 12:25:20 +00:00
Matthias Clasen
8dfbef5e6f
Merge branch 'matthiasc/for-master' into 'master'
...
columnview: Add column reordering
See merge request GNOME/gtk!2005
2020-06-01 11:28:28 +00:00
Emmanuele Bassi
0b9a3fc160
Merge branch 'ebassi/scroll-position' into 'master'
...
Remove position from GdkScrollEvent
See merge request GNOME/gtk!2012
2020-06-01 10:32:55 +00:00
Emmanuele Bassi
79105962a7
Remove position from GdkScrollEvent
...
Scroll events do not have a position, so they shouldn't implement the
GdkEventClass.get_position() virtual function; nor they should have an x
and y fields that never get updated.
2020-06-01 10:49:33 +01:00
Alexander Larsson
a36e2bc764
Fix frameclock going backwards
...
When we run the frameclock RUN_FLUSH_IDLE idle before the paint,
then gdk_frame_clock_flush_idle() sets
```
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT
```
at the end if there is a paint comming.
But, before doing the paint cycle it may handle other X events, and
during that time the phase is set to BEFORE_PAINT. This means that the
current check on whether we're inside a paint is wrong:
```
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
return priv->smoothed_frame_time_base;
```
This caused us to sometimes use this smoothed_frame_time_base even
though we previously reported a later value during PHASE_NONE, thus
being non-monotonic.
We can't just additionally check for the BEGIN_PAINT phase though,
becasue if we are in the paint loop actually doing that phase we
should use the time base. Instead we check for `!(BEFORE_PAINT &&
in_paint_idle)`.
2020-06-01 10:53:24 +02:00
Matthias Clasen
cc878160bd
gtk-demo: Fix a crash in the puzzle
...
Avoid a crash when clicking the refresh button
after solving the puzzle.
2020-06-01 00:11:50 -04:00
Matthias Clasen
382153e82d
gtk-demo: Fix keynav in the puzzle
...
We need to make shortcut controller have global
scope, otherwise the shortcuts lose against the
window keybindings.
2020-06-01 00:11:43 -04:00
Matthias Clasen
e195341e30
gtk-demo: Flesh out the settings demo
...
Add columns for type and default value.
2020-05-31 23:43:58 -04:00
Matthias Clasen
c6c8263704
columnview: Add column reordering
...
Add an API to allow reordering columns.
2020-05-31 21:56:30 -04:00