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
Matthias Clasen
6c3ffa1380
places sidebar: Allocate popovers
2019-05-28 20:25:15 +00:00
Matthias Clasen
92e21c3f1c
Drop the can-default property
...
It was added at a time when default buttons
had a very large external border that would disrupt
aligment. Not a problem nowadays.
2019-04-28 23:28:39 +00:00
segfault3
d465523f65
gtkplacessidebar: Add loop devices
2019-04-05 19:58:56 +00:00
Matthias Clasen
9e0c471b03
entry, spin button: Drop redundant API
...
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Timm Bäder
131e8d8905
Remove some unnecessary gtkwindow.h includes
2019-02-05 08:11:43 -05:00
Nelson Benítez León
65240967e4
gtkplacessidebar.c: move bookmark at the placeholder index
...
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.
https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904
2018-12-17 19:19:20 +00:00
segfault
61f50f2410
gtkplacessidebar: Improve error message when unlocking volume fails
2018-08-05 18:59:40 +02:00
segfault
791da76ae1
gtkplacessidebar: Show busy spinner in sidebar row during mount ops
2018-07-27 16:44:50 +02:00
Ernestas Kulik
4b2d63167e
placessidebar: Take a GdkDrag in _set_drop_targets_visible()
...
Since the function is usually called from GtkWidget::drag-{begin,end} handlers,
taking a GdkDrop does not work, especially given that
::drag-action-requested is emitted without checking the type.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1220
2018-07-17 19:19:14 +03:00
Matthias Clasen
b94c3166bf
dnd: Rename gtk_drag_begin_with_coordinates
...
Now that the coordiate-less variant is gone,
rename this back to the shorter gtk_drag_begin.
2018-07-12 13:02:42 +02:00
Matthias Clasen
7733f646d6
gdk: Rename GdkDragContext to GdkDrag
...
This is to go along with the newly introduced GdkDrop.
This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 14:59:26 +02:00
Matthias Clasen
8755d884f3
Remove a lot of Since annotations
...
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Carlos Garnacho
f92ec7ce41
gtkplacessidebar: Replace ::event signal handlers with gestures
...
Set up a gesture on the sidebar rows to detect pointer clicks on
it. The row DnD management has been moved to the row widget itself,
it makes more sense even if the drag is began from the sidebar widget.
2018-06-21 12:54:03 +02:00
Benjamin Otte
b00609c21c
dnd: Make drag-motion and drag-drop signals use GdkDrop
2018-06-18 23:49:52 +02:00
Benjamin Otte
6d7cb2b781
dnd: Make drag-data-received use a GdkDrop
2018-06-18 23:49:52 +02:00
Benjamin Otte
314eaf7d10
widget: Make GtkWidgetClass::drag_leave() take a GdkDrop
...
Drag Contexts are on their way out!
2018-06-18 23:49:20 +02:00
Benjamin Otte
5b0a6a52c1
dnd: Get rid of gtk_drag_finish()
...
It's just a wrapper around gdk_drag_finish(), so use that one instead.
2018-06-18 23:49:20 +02:00
Carlos Garnacho
15e00759c7
eventcontrollerkey: Port to new API model
2018-04-26 17:59:42 +02:00
Benjamin Otte
bf82149271
longpressgesture: Port to new API model
2018-04-26 17:59:42 +02:00
Carlos Garnacho
585aafc2df
gtkplacessidebar: Stop using ::key-press-event
...
Use GtkEventControllerKey for the task
2018-04-05 19:26:54 +02:00
Timm Bäder
0b9dca3d55
placessidebar: Don't create a GtkWindow for drag icons
...
Just use the drag_widget we create before, since GtkWindow drag icons
are not allowed anymore.
2018-02-23 11:08:53 +01:00
Carlos Soriano
6cef9514ae
gtkplacessidebar: Rename favorites to starred
...
To have more consistency in the name. The same was done in Nautilus in
commit 27b039b37c
.
2018-02-15 10:51:04 +01:00
Emmanuele Bassi
3a2aa2bd80
Remove unnecessary gtk-doc stanza
...
The places sidebar is not a publicly documented API, so there's no need
to use a gtk-doc stanza — especially if the syntax of the stanza is
wrong.
2018-02-01 16:08:51 +01:00
Matthias Clasen
15e67e27ca
places sidebar: Stop using ::button-press/release-event
...
We'll use a generic ::event signal instead.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f90659cde8
places sidebar: Stop using ::motion-notify-event
...
We can use the generic ::event signal here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9a3b61ec9d
Drop GtkPlacesSidebar from public API
...
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Emmanuele Bassi
f27dd8834b
docs: Add missing signal parameter
...
The `flags` parameter is missing, and the introspection scanner is
complaining about it.
2017-12-21 19:00:28 +00:00
Matthias Clasen
54a6273191
Drop gdk_atom_intern
...
Atoms are just interned strings now, so we can just
use g_intern_string.
2017-12-13 23:39:03 -05:00
Benjamin Otte
b80d14ba19
placessidebar: Don't use root coordinates
2017-12-12 00:31:49 +01:00
Benjamin Otte
04ac4c66ae
dnd: Pass device, not event
...
You don't start a dnd operation with a device, you start it with an
event.
2017-12-12 00:31:49 +01:00
Benjamin Otte
756b276070
dnd: Remove button argument from drag_begin()
...
It was unused.
2017-12-12 00:29:51 +01:00
Benjamin Otte
7a17865b22
dnd: Remove "delete" argument from gtk_drag_finish()
...
The argument is ignored by anything but X11.
It's treated like suggested_action == MOVE.
So do that in gtk_drag_finish(), too.
2017-12-10 01:33:38 +01:00
Matthias Clasen
f57aa47a40
Remove some unused includes
...
These show up in a grep for "pixbuf".
2017-11-29 23:39:06 -05:00
Daniel Boles
98c1f16002
doc: Replace uses of #NULL with %NULL
2017-11-22 20:58:28 +00:00
Benjamin Otte
fc2ce5a925
gdk: Make GdkContentFormats immutable
2017-11-20 23:13:10 +01:00
Benjamin Otte
9a6ec4e959
contentformats: Rename GtkTargetList
...
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90
dnd: Remove GtkTargetEntry and GtkTargetFlags
...
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.
This will be fixed later.
2017-11-20 23:12:33 +01:00
Matthias Clasen
a8531605db
Some more interning
...
This avoids more strdups at startup.
2017-11-18 08:18:11 -05:00
Matthias Clasen
ffd6baec42
gtk: Intern css names
...
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Benjamin Otte
3f5178dc21
selection: Remove the info uint
...
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.
The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Benjamin Otte
4c4e914806
gdk: Replace GDK_NONE with NULL
2017-11-15 19:07:17 +01:00
Benjamin Otte
5a1a11bcde
dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
...
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
77efc60a15
placessiderbar: Fix sunny compilation
...
Make compilation not warn about unused variables when compiling with
HAVE_CLOUDPROVIDERS undefined.
2017-11-13 23:45:18 +01:00
Carlos Soriano
1b1cb8295b
gtkplacessidebar: Fix new tab/window handling for cloud accounts
...
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.
To fix it, do as with the other menus and check for the availability of
new tab/window flags.
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 16:57:02 +01:00
Carlos Soriano
f54e7712c5
gtkplacessidebar: Adapt to libcloudproviders 0.2.x
...
And a few improvements on the way.
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 16:55:10 +01:00
Piotr Drąg
08d5ed5875
placessidebar: correct quotation marks in a new string
2017-11-05 21:18:53 +01:00
Alexandru Pandelea
2421e745b9
placessidebar: add starred location item
...
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag
https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 21:02:04 +01:00
Benjamin Otte
43c212ac28
build: Enable -Wswitch-enum and -Wswitch-default
...
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Matthias Clasen
5d5ae459c4
place sidebar: Use GdkEvent API
2017-09-19 18:39:03 +02:00
Carlos Garnacho
2abfc602ca
placessidebar: Update to using GdkEvent API
2017-09-19 18:39:02 +02:00
Daniel Boles
7178ab8e41
PlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS
...
The member GList *cloud_rows is only ever used if HAVE_CLOUDPROVIDERS is
defined, so don’t declare it if not.
2017-09-19 00:20:17 +01:00
Daniel Boles
94eecf57dc
PlacesSidebar: Unref cloud_manager in dispose()
...
We ref the CloudProviders singleton in init() but did not unref it in
dispose(). Do so, using g_clear_object().
https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 23:30:57 +01:00
Julius Härtl
a1635b6188
gtkplacessidebar: implement libcloudproviders support
...
Add integration of the libcloudproviders DBus API to the
GtkPlacesSidebar by showing name and sync status of the cloud providers.
The exported menu is rendered as a GtkPopover.
The sidebar will be updated if the list of cloudproviders changes e.g.
by adding or removing an account. If any cloud provider changes detailed
information like sync status only the individual sidebar row gets
updated.
Co-authored-by: Carlos Soriano <csoriano@gnome.org>
Co-authored-by: Daniel Boles <dboles@src.gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-09-04 11:32:03 -04:00
Benjamin Otte
6b7503b83e
placessidebar: Remove EventBox usage
2017-08-02 14:05:02 +01:00
Timm Bäder
0d2debad48
placessidebar: Fix css node name typo
2017-03-02 15:16:08 +01:00
Timm Bäder
ea897c6df4
Remove gtk_widget_show_all
2017-01-20 21:37:04 +01:00
Benjamin Otte
95a2a5c54c
gtk: Remove GtkJunctionSides
2016-12-20 18:01:12 +01:00
Piotr Drąg
a2da4ddceb
Use Unicode in translatable strings
...
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772371
2016-12-19 15:08:10 -05:00