Matthias Clasen
d5f4579384
dragdest: Steps towards allowing nested drop sites
2020-01-08 18:48:22 -05:00
Matthias Clasen
5206a92522
Update all callers
2020-01-08 18:48:22 -05:00
Matthias Clasen
233ec1a5d6
Add GdkDrop back to signal signatures
2020-01-08 18:48:22 -05:00
Matthias Clasen
579d8e427b
Drop gtk_drag_(un)highlight
2020-01-08 18:48:22 -05:00
Matthias Clasen
9c11c60530
filechooser: Remove code for sidebar pre-arming
...
This is just not a feature we can support currently.
Doing it properly would require infrastructure for
a generalized :drag(sensitive) state highlighting
potential drag sites everywhere.
2020-01-08 18:48:22 -05:00
Matthias Clasen
66c8da4750
listbox: Stop using gtk_drag_(un)highlight
...
This api is going away, so just do what needs to
be done manually.
2020-01-08 18:48:22 -05:00
Matthias Clasen
05a9b72fc8
calendar: Remove drag highlighting calls
...
This is happening unconditionally, anyway.
2020-01-08 18:48:22 -05:00
Matthias Clasen
4fe5710456
textview: Remove unnecessary drag highlighting
...
GTK does this unconditionally anyway, now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
ac5b4a6307
text: Remove unnecessary drag highlighting
...
GTK does this unconditionally anyway, now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
5ce7bfbbd8
notebook: Receive tab dnd on the tabs
...
Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.
2020-01-08 18:48:22 -05:00
Matthias Clasen
7646d1b22c
Adwaita: No drag highlight for placessidebar
...
It does its own custom thing.
2020-01-08 18:48:22 -05:00
Matthias Clasen
61db81ab8e
Adwaita: No dnd highlight for iconviews
...
We only want to highlight the drop location
that is rendered with a separate css node now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
24d7586163
iconview: Use a named subnode for dnd highlight
...
This is necessary because we want to style the
iconview itself and the item highlighting differently.
2020-01-08 18:48:22 -05:00
Matthias Clasen
b150625105
Adwaita: No dnd highlight for treeviews
...
We only want to highlight the drop location
that is rendered with a separate css node now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
5787146238
treeview: Use a named subnode for dnd highlight
...
This is necessary because we want to style the
treeview itself and the row highlighting differently.
2020-01-08 18:48:22 -05:00
Matthias Clasen
8a72031e99
Adwaita: No drag highlight for stack switchers
2020-01-08 18:48:22 -05:00
Matthias Clasen
201a791076
Adwaita: No drag highlight for expanders
...
This is pretty ugly, because Adwaita has a very
generic drop-highlight implementaiton that we
need to overrule.
2020-01-08 18:48:22 -05:00
Matthias Clasen
359003670a
dragdest: Rename ::armed to ::contains
2020-01-08 18:48:22 -05:00
Matthias Clasen
8a521accbc
dragsource: Change the ::prepare return type
...
Make it return the content provider to use for
the next drag. This allows just-in-time provision
of the content provider. The default handler just
returns the value of the ::content property.
2020-01-08 18:48:22 -05:00
Matthias Clasen
a053d7ddb1
dragsource: Drop gtk_drag_source_drag_begin
...
No longer used. Also, minor cleanups all over.
2020-01-08 18:48:22 -05:00
Matthias Clasen
c878f650ce
dragksource: Small doc fix
2020-01-08 18:48:22 -05:00
Matthias Clasen
2d2cdeae88
Drop GTK content formats apis
...
These functions have been superseded by better
facilities in GDK.
2020-01-08 18:48:22 -05:00
Matthias Clasen
379166e1ff
text: Use GDK content formats API
2020-01-08 18:48:22 -05:00
Matthias Clasen
a59a20c1d4
placessidebar: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
fb4b5c666b
filechooserwidget: Use GDK content formats api:
2020-01-08 18:48:22 -05:00
Matthias Clasen
b59c70aaeb
filechooserbutton: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
6fcae42dde
calendar: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
a04d314910
text: Fix dragging of text across focus changes
...
When dragging selected text from an entry over a stackswitcher
to show a different page, the focus changes, causing the selection
to be lost; we should not lose the dragged content in this case.
2020-01-08 18:48:22 -05:00
Matthias Clasen
f83f7a2b4d
Adwaita: Add drop highlight for iconview items
2020-01-08 18:48:22 -05:00
Matthias Clasen
edb175cf75
iconview: Render drop highlight properly
...
Use :drop(active) and render a frame, not focus.
2020-01-08 18:48:22 -05:00
Matthias Clasen
1eefaf8b41
dragsource: Fix cancellation
...
We need to properly end the drag.
2020-01-08 18:48:22 -05:00
Matthias Clasen
0224517806
filechooser: Stop using gtk_drag_source_get_drag
2020-01-08 18:48:22 -05:00
Matthias Clasen
27c521cce8
placessidebar: Update a comment
2020-01-08 18:48:22 -05:00
Matthias Clasen
62b87182c5
Remove an unused enum
...
We are not using GtkDragResult anymore.
2020-01-08 18:48:22 -05:00
Matthias Clasen
865fc9c925
dragsource: Rename ::drag-failed to ::drag-cancel
...
This matches the names of the GdkDrag signals.
2020-01-08 18:48:22 -05:00
Matthias Clasen
a1f4f52fcb
dragsource: Tweak docs more
2020-01-08 18:48:22 -05:00
Matthias Clasen
bdb4bf00c5
dragsource: Document prepare
2020-01-08 18:48:22 -05:00
Matthias Clasen
aca252837d
dragsource: Make ::prepare return a boolean
...
Make ::prepare return TRUE to start a drag.
The default handler simply checks that we
have a content provider and actions.
2020-01-08 18:48:22 -05:00
Matthias Clasen
8b058572f0
dragsource: Drop gtk_drag_get_source
2020-01-08 18:48:22 -05:00
Matthias Clasen
df050c51bb
notebook: Stop using gtk_drag_get_source
2020-01-08 18:48:21 -05:00
Matthias Clasen
bd20ae4fa5
dragsource: Drop gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
818b456f9f
filechooserwidget: Stop using gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
c1c8abf275
notebook: Stop using gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
134fca47e3
pathbar: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
4630dd8d68
notebook: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
d2f7d1b1d7
linkbutton: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
cfa9e6da4a
colorswatch: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
ceca2f9202
colorbutton: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
8e8254feae
filechooserwidget: wip
2020-01-08 18:48:21 -05:00
Matthias Clasen
90cda9e307
treeview: Use gdk_drag_begin
2020-01-08 18:48:21 -05:00
Matthias Clasen
fdfa371d90
iconview: Use gdk_drag_begin
...
This is a little more involved here.
2020-01-08 18:48:21 -05:00
Matthias Clasen
deb16c1a00
Make GtkDragSource a gesture
2020-01-08 18:48:21 -05:00
Matthias Clasen
8c3736709e
notebook: Use gdk_drag_begin
...
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
f459164f8a
placessidebar: Use gdk_drag_begin
...
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
00169a06bf
textview: Use gdk_drag_begin
...
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e09f2b8b56
entry: Use gdk_drag_begin
...
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
092c115ff0
text: Use gdk_drag_begin
...
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
5144d15168
calendar: Use gdk_drag_begin
...
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
5a6ab8cbd3
label: Use gdk_drag_begin
...
Use gdk_drag_begin directly for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
8c73f882af
dragsource: Use public drag icon api
2020-01-08 18:48:21 -05:00
Matthias Clasen
78832c65b5
Make GtkDragIcon public
...
This is needed if we want to use gdk_drag_begin
for one-off drags, without a GtkDragSource.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e8b830a3dd
dragsource: Reshuffle api a bit
...
Remove arguments from the constructor.
For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).
For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
2020-01-08 18:48:21 -05:00
Matthias Clasen
38974d7d2b
dragsource: Tweak api, update all callers
...
Add GdkDrag back to signals, drop ::drag-data-delete,
and replace it with a boolean in ::drag-end.
2020-01-08 18:48:21 -05:00
Carlos Garnacho
dbb3727b03
popover: Use g_signal_connect_object on parent widget signal
...
The popover may be destroyed, leaving this dangling signal. This
may cause crashes on future parent widget resizes.
2020-01-08 18:48:21 -05:00
Matthias Clasen
508570864d
Remove gtk_drop_target_get_target
...
Now that drop targets are event controllers,
we can just use gtk_event_controller_get_widget.
Update all callers.
2020-01-08 18:48:21 -05:00
Matthias Clasen
96c77b61c1
Remove an unused signal
2020-01-08 18:48:21 -05:00
Matthias Clasen
2b819c830b
docs: Tweak GtkDropTarget docs
2020-01-08 18:48:21 -05:00
Matthias Clasen
f3be49838f
Move code over
...
Move remaining code from gtkdnd.c to gtkdragdest.c
and nuke gtkdnd.c and gtkdndprivate.h.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e9067ae2db
Replace gtk_drop_target_attach/detach
...
Since drop targets are now just event controller,
gtk_widget_add/remove_controller works just fine
for them.
2020-01-08 18:48:21 -05:00
Matthias Clasen
f898bee032
Use normal event propagation for DND events
...
This works just fine, now that drop targets are
event controllers. There is only a very vestigial
gtk_drag_dest_handle_event() left that deals with
corner cases.
2020-01-08 18:48:21 -05:00
Matthias Clasen
6a7f39e6d2
Get rid of GtkDragDestInfo
...
We can just attach the GtkDropTarget directly to
the GdkDrop.
2020-01-08 18:48:21 -05:00
Matthias Clasen
dfb2cbdfdb
Turn GtkDropTarget into an event controller
...
We are still propagating the drag events manually,
but we are now calling gtk_widget_run_controllers
to pass them to drop targets.
2020-01-08 18:48:21 -05:00
Matthias Clasen
f960eb6ab4
More internal restructuring
2020-01-08 18:48:21 -05:00
Matthias Clasen
60fc2c6a7a
dnd: Another internal refactoring step
2020-01-08 18:48:21 -05:00
Matthias Clasen
532fdde720
dnd: More internal restructuring
2020-01-08 18:48:21 -05:00
Matthias Clasen
f8399588e9
dnd: Some internal restructuring
...
Nudge the code towards being like event controllers.
2020-01-08 18:48:20 -05:00
Matthias Clasen
ad019be75b
Drop an unused define
2020-01-08 18:48:20 -05:00
Matthias Clasen
e505dab487
Stop passing timestamps around
...
We were not using these in a useful way in the end,
so stop passing them around.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1262184269
droptarget: Drop the track-motion property
...
It does not have any effect anymore.
Update all callers
2020-01-08 18:48:20 -05:00
Matthias Clasen
46f42fc53d
droptarget: Drop defaults flags
...
These no longer have any effect.
Update all callers.
2020-01-08 18:48:20 -05:00
Matthias Clasen
cb26cd7391
Simplify some drag dest internals
...
Change things around to make the default handler
of GtkDropTarget::drag-motion implement the default
handling. Always emit ::drag-motion and ::drag-leave,
and always arm the drop target.
This makes the GTK_DEST_DEFAULT_MOTION flag and
the ::track-motion property unnecessary.
Drop targets that are purely after track-motion
handling for ui switching purposes, such as
GtkStackSwitcher, will have to undo the automatic
arming in a notify::armed handler.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1a3eeb1233
Drop GTK_DEST_DEFAULT_HIGHLIGHT
...
Redo highlight handling slightly. GtkDropTarget now has
a ::armed property that can be tracked to do custom highlighting,
and we always add the dnd style class to armed drop sites.
2020-01-08 18:48:20 -05:00
Matthias Clasen
e1f74c8f69
dragdest: Clean up internals
...
Remove the no-longer needed GtkDragDest struct
and just attach the GtkDropTarget directly.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1e000c3dac
Remove gtkdnd.h
2020-01-08 18:48:20 -05:00
Matthias Clasen
19ee9b4c57
Remove gdk_drag_get_data
...
This is not used anymore, so we can remove it,
and the GtkDropTarget::drag-data-received signal
that it emits.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1075607528
treeview: Stop using ::drag-data-received
2020-01-08 18:48:20 -05:00
Matthias Clasen
d2bd9b0850
iconview: Avoid drag-data-received
2020-01-08 18:48:20 -05:00
Matthias Clasen
b9034015d7
filechooser: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
c7b70b122a
placessidebar: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
6e01a49d10
iconview: Port to GtkDropTarget
...
A small api change here is that
gtk_icon_view_enable_model_drag_dest now returns
a GtkDropTarget that can be used to connect signals.
2020-01-08 18:48:20 -05:00
Matthias Clasen
c290bd6367
Add an async read function for selection
...
This is meant as a replacement for ::drag-data-received
in cases where a #GtkSelectionData object is still needed,
such as when using GtkTreeModel DND support.
2020-01-08 18:48:20 -05:00
Matthias Clasen
853063bea7
Remove old drag dest api
2020-01-08 18:48:20 -05:00
Matthias Clasen
69e3fee5e2
Move some remaining api over
2020-01-08 18:48:20 -05:00
Matthias Clasen
aa276a181e
listbox: Remove unhighlighting
...
This will have to be done differently, if necessary.
2020-01-08 18:48:20 -05:00
Matthias Clasen
583705b4ae
notebook: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
4ea18a22e6
treeview: Port to GtkDropTarget
...
A small api change here is that
gtk_tree_view_enable_model_drag_dest now returns
a GtkDropTarget that can be used to connect signals.
2020-01-08 18:48:20 -05:00
Matthias Clasen
746dc5c3a2
textview: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
17131f1137
filechoserbutton: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
07c889c5ea
stackswitcher: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
b0d9a6ff20
expander: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
802c7975e2
window: Port to GtkDragDest
2020-01-08 18:48:20 -05:00
Matthias Clasen
6e602e052b
text: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
025eee112c
colorswatch: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
70cdd4e951
colorbutton: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
75b789f20f
calendar: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
45679d7bc3
dragdest: doc improvements
2020-01-08 18:48:20 -05:00
Matthias Clasen
6dc8fc3a4d
Add a GtkDropTarget object
...
Add an explicit GtkDropTarget object, and move the destination-side
DND signals here. The object is used by connecting to its signals
and attaching it to a widget with gtk_drop_target_attach().
2020-01-08 18:48:20 -05:00
Matthias Clasen
37b849b808
Move the rest of the drag-source api over
...
Just reshuffling some source.
2020-01-08 18:48:20 -05:00
Matthias Clasen
9b01d9a784
Remove traditional drag source API
...
gtk_drag_source_set, gtk_drag_begin, related apis
and the GtkWidget source-side signals have all been
replaced by GtkDragSource.
2020-01-08 18:48:20 -05:00
Matthias Clasen
78a0913f0f
notebook: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
74722fb10e
filechooser: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
3891ce36fe
treeview: Port to GtkDragSource
...
A small api change here is that
gtk_tree_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.
2020-01-08 18:48:19 -05:00
Matthias Clasen
5a940408fe
placessidebar: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
efce8c2899
iconview: Port to GtkDragSource
...
A small api change here is that
gtk_icon_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.
2020-01-08 18:48:19 -05:00
Matthias Clasen
24ef9df0f1
pathbar: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
5d49b11ffd
colorswatch: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
8e3db48482
colorbutton: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
b15c31a3f7
textview: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
a52757874e
textbuffer: Add a content provider api
...
We need a content provider for the selection,
to implement DND, and the text buffer already
has one. Just add an api to get it.
2020-01-08 18:48:19 -05:00
Matthias Clasen
e9203eeef7
text: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
337057eb35
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-08 18:48:19 -05:00
Matthias Clasen
2803a15a51
calendar: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
d145032cb6
linkbutton: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
2612331282
label: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
d3fd071809
dnd: Patch up gtk_drag_get_source_widget
...
This is temporary until gtk_drag_dest_set users
have been ported over.
2020-01-08 18:48:19 -05:00
Matthias Clasen
303c9becf8
Add a GtkDragSource object
...
Add an explicit GtkDragSource object, and move the source-side
DND signals here. The object can be used on the spot, by calling
gtk_drag_source_drag_begin() yourself, or for static drag-source
configuration, by calling gtk_drag_source_attach(). In the latter
case, we set up and conect a drag gesture to trigger the drag_begin
call.
2020-01-08 18:48:19 -05:00
Matthias Clasen
6bf46c8f30
marshalers: Add another
2020-01-08 18:48:19 -05:00
Matthias Clasen
173952cbc8
fixed layout: Actually set child transforms
...
The code was unintentionally appending to the
existing child transform, leading to ever-moving
children when you call gtk_fixed_put.
2020-01-08 10:40:44 -05:00
Timm Bäder
8e4f0b9484
sizerequest: Remove _gtk_widget_get_preferred_size_and_baseline
...
Private and unused function.
2020-01-07 17:27:19 +01:00
Timm Bäder
a3f14a3395
rendernodepaintable: ceil() bounds for intrinsic size
...
Otherweise we floor() implicitly when casting to int, resulting in
slight scaling later.
2020-01-07 17:27:19 +01:00
Timm Bäder
73b8212bf3
label: Fix assumptions regaring link
2020-01-07 17:27:18 +01:00
Timm Bäder
726909d735
Window: Avoid some redundant assignments
2020-01-07 17:27:18 +01:00
Timm Bäder
04899e3707
colorswatch: Avoid redundant assignment
2020-01-07 17:27:18 +01:00
Timm Bäder
73ce437459
widget: Use cssnode api to get the filter value
...
it's confusing that we use GtkStyleContext here while we use the CssNode
directly elsewhere.
2020-01-07 17:27:18 +01:00
Timm Bäder
21a7dfae96
snapshot: Only normalize rectangle if we have to
...
We can even replace the comment this way.
2020-01-07 17:27:18 +01:00
Timm Bäder
6c188f7c93
bin: Move vfunc implementations before class_init
...
And avoid every single function prototype.
2020-01-07 17:27:18 +01:00
Timm Bäder
c30e0f78ad
bin: Avoid some type checks
2020-01-07 17:27:18 +01:00
Timm Bäder
c38c5c4ce1
text: Reset cursor opacity when unmapping
...
Otherwise we might get mapped again with a half-transparent cursor.
2020-01-07 17:27:18 +01:00
Timm Bäder
108aac9ee3
scrolledwindow: Don't snapshot junction if we use indicators
...
The junction doesn't make sense when we use indicators, since the
scrollbars overlap anyway. Not snappshotting it anymore has no visual
effect since it's being drawn below the scrollbars anyway.
2020-01-07 17:27:18 +01:00
Timm Bäder
c427c2b22a
cssimagelinear: Don't call get_start_end if !repeating
...
This makes it clear that the !repeating case is easier.
2020-01-07 17:27:18 +01:00
Timm Bäder
59111d100f
cssimagelinear: Avoid computing the length if we know it
...
We handlet the common easy cases manually anyway, so don't bother
sqrt()ing the x/y coords in those cases.
2020-01-07 17:27:18 +01:00
Timm Bäder
cee8f78c6e
toolitem: Remove unused members
2020-01-07 17:27:18 +01:00
Timm Bäder
0fc35b2124
toolitem: Plug memory leak
2020-01-07 17:27:18 +01:00
Timm Bäder
982d73df0b
adwaita: Solve junction problem without border image
...
This genius piece of CSS colors only the top left (or top right in RTL)
pixel of the scrollbar junction.
Doing it this way is better because we don't have to upload a cairo node
every frame.
2020-01-07 17:27:17 +01:00
Timm Bäder
1e55e01692
scrolledwindow: Remove a useless local variable
2020-01-07 17:27:17 +01:00
Timm Bäder
412fcb0330
scrolledwindow: Avoid using gtk_widget_get_preferred_size
...
This way we only measure in the direction we need.
2020-01-07 17:27:17 +01:00
Timm Bäder
4fb519f04d
renderborder: Only get border width if we really need to
...
We did this unconditionally before the if statement, but we don't need
to do it if any of the early-out checks in the not-border-image branch
hits.
2020-01-07 17:27:17 +01:00
Timm Bäder
4788f88840
snapshot: Repeat color nodes by creating a larger color node
2020-01-07 17:27:17 +01:00
Timm Bäder
d490d8f1f3
renderbackground: Try to omit a save/restore pair
2020-01-07 17:27:16 +01:00
Timm Bäder
cb2f523994
rendernodes: Use floats for everything
2020-01-07 17:27:16 +01:00
Timm Bäder
075a0ccb5e
renderbackground: Save a snapshot_translate() call
...
Just add the values manually when really using the snapshot later. Also
unifies the two if branches by pulling out getting the x/y values.
2020-01-07 17:27:16 +01:00
Timm Bäder
6a9bc5daef
Avoid a few state changes
...
We can't optimize the save/restore calls away in the snapshot code, so
do it from the caller side.
2020-01-07 17:27:16 +01:00
Timm Bäder
095a378dbc
GdkRGBA: Use floats instead of doubles
2020-01-07 17:27:15 +01:00
Timm Bäder
0956c30ee5
progressbar: Remove unnecessary snapshot implementation
2020-01-07 17:27:15 +01:00
Matthias Clasen
448a402353
widget: Remove an unused signal
...
HIERARCHY_CHANGED is no longer used.
2020-01-06 08:19:01 -05:00
Matthias Clasen
df58d0acf3
Adwaita: Make dnd marks in text views green
...
We already do this in entries, this just updates
text views to match.
2020-01-03 13:00:53 -05:00
Matthias Clasen
9c2c5665df
textview: Render visible marks better
...
The only other visible mark that is in common use
besides insert and selection_bound is dnd_mark, and
we don't want it to blink or be affected by 'cursor'
visibility.
Therefore, cache not just the cursor positions, but
also whether they are insert or selection_bound,
and take that into account when rendering them.
2020-01-03 13:00:53 -05:00
Matthias Clasen
1be9c6aa3f
Merge branch 'remove-xim' into 'master'
...
Remove the XIM input method
See merge request GNOME/gtk!1195
2020-01-03 17:56:26 +00:00
Matthias Clasen
7a1aefc7f3
Fix the previous commit
...
We need to actually use the right coordinates.
2020-01-02 00:43:27 -05:00
Matthias Clasen
f7f06f810b
stackswitcher: Fix switch-while-drag functionality
2020-01-02 00:24:54 -05:00
Matthias Clasen
e02fd80adb
dnd: Be safer
...
The contents of the selection are documented
to not be NULL if size is non-negative. So
use an empty string instead of NULL for size 0,
avoiding a crash.
2020-01-01 12:51:19 -05:00
Matthias Clasen
f8a19506ab
Merge branch 'drag-icon' into 'master'
...
Drag icon
See merge request GNOME/gtk!1274
2019-12-30 21:20:26 +00:00
Matthias Clasen
67d1d5ec80
mountoperation: Handle D-Bus missing
...
Still not great to make sync calls here, but
at least we should handle failure without criticals.
2019-12-30 16:03:47 -05:00
Matthias Clasen
772ac2b0c5
tooltip: Never set a window to be its own parent
...
We do get events on the tooltip window too, and
we better ignore them, or bad things may happen,
such as widgets that are their own parents and
cause infinite loops.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2339
2019-12-30 09:52:13 -05:00
Matthias Clasen
68b3b66c03
tooltipwindow: Cosmetic fix
2019-12-30 09:28:22 -05:00
Matthias Clasen
baf99bb868
Remove gtk_window_set_hardcoded_surface
...
It is not used anymore.
2019-12-30 00:31:32 -05:00
Matthias Clasen
538efd0cc6
container: Be more careful with roots
...
We were warning if we hit non-container
roots. Instead, call suitable naive api.
2019-12-30 00:30:01 -05:00
Matthias Clasen
9ba184adf7
widget: Be more careful with roots
...
We were assuming that all roots are windows,
and calling GtkWindow apis on them.
2019-12-30 00:29:52 -05:00
Matthias Clasen
710b8d7f40
dnd: Use GtkDragIcon
...
Use the new GtkDragIcon instead of a window
of type GTK_WINDOW_POPUP and
gtk_window_set_hardcoded_surface.
2019-12-30 00:29:10 -05:00
Matthias Clasen
a6244a95be
Add GtkDragIcon
...
This is a GtkRoot implemntation for drag icons,
using the surface provided by GdkDrag. This lets
us avoid GTK_WINDOW_POPUP and
gtk_window_set_hardcoded_surface.
2019-12-30 00:28:02 -05:00
Matthias Clasen
133b6f2f23
tooltipwindow: Cosmetic fix
2019-12-29 22:48:25 -05:00
Matthias Clasen
f31a016efb
tooltips: Stop using GTK_WINDOW_POPUP
...
Make GtkTooltipWindow a GtkNative implementation,
instead of using a GTK_WINDOW_POPUP window.
2019-12-29 22:09:13 -05:00
Matthias Clasen
de694958b5
Drop custom tooltip windows
...
We want to put tooltips into something other than
windows, so this needs to go. Custom widgets are
still possible.
2019-12-29 20:52:08 -05:00
Matthias Clasen
52e0eef6cb
docs: Touch up menu button docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
b06331218d
docs: Rewrite popover menu docs
...
These were outdated and did not reflect current api.
2019-12-29 20:31:58 -05:00
Matthias Clasen
9b165c8bec
treeview: Use a popover for search
...
This is a more modern way of doing things, and avoids a window
of type GTK_WINDOW_POPUP. With a popover, it doesn't make sense
to have a positioning function, so remove that api.
2019-12-29 20:31:58 -05:00
Matthias Clasen
3fd427cfce
win32: Use a regular window for printing
...
We never show this window, so it should not matter.
Ideally, we'd just create a surface to get handle,
anyway.
2019-12-29 20:31:58 -05:00
Matthias Clasen
3dd6cc405e
accelcellrenderer: Stop grabbing
...
Standalone grabs are going away.
2019-12-29 20:31:58 -05:00
Matthias Clasen
06860bb2be
accelcellrenderer: Fix editing
2019-12-29 20:31:58 -05:00
Matthias Clasen
7ee5779efc
gtk: Remove menu code
...
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Matthias Clasen
a2aefa83bb
accellabel: Don't mention GtkMenuItem in the docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
0854140b22
label: Stop referring to GtkMenuItem in the docs
2019-12-29 20:31:58 -05:00
Matthias Clasen
57a861723c
buildertool: Drop menu properties
2019-12-29 20:31:58 -05:00
Matthias Clasen
b59521bb82
inspector: Remove menu special-casing
2019-12-29 20:31:58 -05:00
Matthias Clasen
7e8393ba0f
widget: Remove menu special-casing
2019-12-29 20:31:58 -05:00
Matthias Clasen
9e15f3df75
label: Remove menu support code
2019-12-29 20:31:58 -05:00
Matthias Clasen
27543120f2
menubutton: Stop supporting menus
2019-12-29 20:31:57 -05:00
Matthias Clasen
901518ec25
headerbar: Stop using GtkMenuButton::use-popover
...
This property is going away.
2019-12-29 20:31:57 -05:00
Matthias Clasen
4c9b0d82af
menutoolbutton: Stop supporting menus
2019-12-29 20:31:57 -05:00
Matthias Clasen
2c5f4c5871
menutoolbutton: Fix sensitivity handling
...
We don't need to set the arrow button explicitly
to insensitive, GtkMenuButton handles that automatically.
2019-12-29 20:31:57 -05:00
Matthias Clasen
8ee44d200d
toolbar: Simplify overflow implementation
...
Do away with the proxy menu items, and instead
just have toolitems provide a label for overflow
items. We create the overflow widgets ourselves
already, as model buttons.
Also replace the toggle button used for overflow
with a menubutton, simplifying things further.
2019-12-29 20:31:57 -05:00
Matthias Clasen
e424246134
combobox: Replace GtkTreeMenu with a popover
...
This does not currently try to reproduce the exact
placement, since GtkPopover doesn't have to have
the necessary placement hints.
2019-12-29 18:45:40 -05:00
Matthias Clasen
5d821425b3
accellabel: Remove an example using menus
2019-12-29 18:45:40 -05:00
Matthias Clasen
3d4acf6360
window: Move F10 handling to popover menubars
2019-12-29 18:44:26 -05:00
Matthias Clasen
0cf1e1e106
applicationwindow: Stop using a menu bar
...
We have a replacement with popovers now.
2019-12-29 17:10:16 -05:00
Matthias Clasen
b23fbe1f39
notebook: Remove menu remnants
2019-12-29 17:10:16 -05:00
Matthias Clasen
f5e79b9bc5
appchooserwidget: Remove ::populate-popup
...
We are no longer doing menus this way; if a menu turns out to be
needed at all here, we can add a menu model later.
2019-12-29 17:10:16 -05:00
Matthias Clasen
94e238c467
placesview: Use a popover
...
Replace the context menu with a popover.
2019-12-29 17:10:16 -05:00
Matthias Clasen
22f6787283
mountoperation: Use a popover
...
Replace the context menu with a popover.
2019-12-29 17:10:16 -05:00
Matthias Clasen
6255dcd8ec
filechooserbutton: Be smarter about 'None'
...
Don't refilter the model while the combo box is popped up,
that wreaks havoc with layout and does not really work.
Instead, repurpose one of the separator rows for the 'none'
case. This works because the row separator function is not
consulted for the cellview in the button.
2019-12-29 17:10:16 -05:00