Matthias Clasen
d06cdf6318
droptarget: Fix confusion around ::leave signal
...
The leave signal should not take any arguments,
don't pass the GdkDrop. Update the documentation,
fix the emission and update users to match.
This was showing up as crash when dragging files
over the places sidebar.
2020-05-08 08:50:44 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
8e261056b9
Use gtk_popover_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_popover_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
285aa226e5
scrolledwindow: Drop shadow-type
...
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
0ee58e9ef4
gtk: Port widgets away from gtk_get_current_ apis
...
Use the event controller equivalents where needed.
This commit covers the simple cases.
2020-04-11 17:29:27 -04:00
Matthias Clasen
b02db72e17
Rename GDK_MOD1_MASK to GDK_ALT_MASK
...
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
2020-04-06 01:40:49 -04:00
Matthias Clasen
a197b202b8
places sidebar: Fix the popovers
...
We need to check-resize the popovers.
2020-03-21 18:28:57 -04:00
Benjamin Otte
a411959c91
droptarget: Redo
...
This is a huge reorganization of GtkDropTarget. I did not know how to
split this up, so it's unfortunately all one commit.
Highlights:
- Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync
GtkDropTarget is the simple one that only works with GTypes and offers
a synchronous interface.
GtkDropTargetAsync retains the full old functionality and allows
handling mime types.
- Drop events are handled differently
Instead of picking a single drop target and sending all DND events to
it, every event is sent to every drop target. The first one to handle
the event gets to call gdk_drop_status(), further handlers do not
interact with the GdkDrop.
Of course, for the ultimate GDK_DROP_STARTING event, only the first
one to accept the drop gets to handle it.
This allows stacking DND event controllers that aren't necessarily
interested in handling the event or that might decide later to drop
it.
- Port all widgets to either of those
Both have a somewhat changed API due to the new event handling.
For the ones who should use the sync version, lots of cleanup was
involved to operate on a sync API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
f4ac74795c
placessidebar: Don't use the GdkDrag
...
First, it should have been a GdkDrop, but even then, proper DND code
should not rely on internals.
It's only been used in an unused signal emission anyway.
2020-03-02 03:18:55 +01:00
Piotr Drąg
810d567cc9
placessidebar: Fix a couple of typos and thinkos in menu labels
2020-03-01 15:05:28 +01:00
Krzesimir Nowak
8df045537e
Fix a typo in gtkplacessidebar.c
...
Some mistyped vim command got into the code in commit 60d2813247
.
2020-02-27 10:02:56 +00:00
Matthias Clasen
b5bacb3be6
Drop the margin property
...
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Timm Bäder
60d2813247
placessidebar: Convert popover menu to proper GtkPopoverMenu
2020-02-25 11:08:23 +01:00
Timm Bäder
995277f57d
placessidebar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Matthias Clasen
a43d13aa74
popover: Drop ::relative-to
...
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Matthias Clasen
7f46b25c04
Merge branch 'wip/ebassi/filechooser-new' into 'master'
...
Clean up the GtkFileChooser API
Closes #2455
See merge request GNOME/gtk!1454
2020-02-24 00:32:23 +00:00
Benjamin Otte
a62d78bf70
selection: Remove GtkSelectionData
2020-02-23 01:59:00 +01:00
Emmanuele Bassi
ebd23737c0
Remove GtkPlacesSidebar:local-only
...
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Benjamin Otte
1145da3ea5
placessidebar: Modernize DND
...
No more shooting pointers through pipes
2020-02-17 21:56:16 +01:00
Benjamin Otte
f5e3584b5b
placessidebar: Don't claim to support text dnd
...
Because you don't. And never did.
2020-02-17 04:04:21 +01:00
Benjamin Otte
80ba7fd682
dragdest: Make gtk_drop_target_new() args be transfer full
...
Saves tons of code.
2020-02-17 04:04:21 +01:00
Emmanuele Bassi
cdd7e4c5ec
Add a notify function to GdkContentProvider
...
The callback-based content providers need a GDestroyNotify function to
free the data passed to them on construction, otherwise they are going
to leak.
2020-02-13 14:53:25 +00:00
Timm Bäder
655711fef2
Rename gtk_widget{get,set,has}_style_class to _css_class
...
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28
Start using GtkWidget's new style class API
2020-02-07 13:16:32 -05:00
Matthias Clasen
85ad943832
placessidebar: Change some initial property values
...
Giving these properties the initial value that the file
chooser wants for them avoids some calls to update_places
in the setup code.
2020-02-05 01:01:47 -05:00
Benjamin Otte
544cd1acfc
icontheme: Clean up includes
2020-02-04 16:43:59 +01:00
Matthias Clasen
ec255f9bb1
Update all callers
2020-01-11 00:50:22 -05:00
Matthias Clasen
1c03bbeb9c
Update all users
2020-01-08 18:48:23 -05:00
Matthias Clasen
5206a92522
Update all callers
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
27c521cce8
placessidebar: Update a comment
2020-01-08 18:48:22 -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
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
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
46f42fc53d
droptarget: Drop defaults flags
...
These no longer have any effect.
Update all callers.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1e000c3dac
Remove gtkdnd.h
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
5a940408fe
placessidebar: Port to GtkDragSource
2020-01-08 18:48:19 -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
bfa0509f08
Privatize popover menu pieces
...
Don't allow manual creation of popover menus
anymore. This lets us also make GtkModelButton
private
2019-11-11 12:42:06 +01:00
Timm Bäder
aaaa3e141b
placessidebar: Remove some unused members
2019-10-22 09:37:08 +02:00
Timm Bäder
ce72154913
Rename gtkbookmarkmanager.h to gtkbookmarksmanagerprivate.h
...
It's a private type, so gets a private header file name.
2019-09-11 08:12:31 +02:00
Дилян Палаузов
6ded38de2b
Minor typos in the Documentation (a/an)
2019-08-25 12:52:46 +00:00
Timm Bäder
002abc6d48
placessidebar: Remove popover using gtk_widget_unparent()
...
the gtk_widget_destroy() does not work anymore.
2019-08-06 17:39:01 +02:00
Matthias Clasen
bc56860fa1
places sidebar: Stop using gtk_widget_get_action_group
...
We create this action group ourselves,
we can keep track of it.
2019-06-15 21:41:03 -04:00
Matthias Clasen
0509f8cff3
places sidebar: remove populate-popup
2019-06-13 11:59:51 +00:00
Matthias Clasen
7f65e5f96b
Rename GtkGestureMultiPress to GtkGestureClick
...
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Matthias Clasen
461e8e0218
places sidebar: Don't derive from scrolled window
...
We can just have a scrolled window, instead.
2019-05-28 22:35:36 +00:00
Matthias Clasen
7447abb52b
Stop using gtk_widget_get_toplevel
...
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00