Commit Graph

367 Commits

Author SHA1 Message Date
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
Matthias Clasen
3c27774a5d places sidebar: Don't leak a reference
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:16:05 -05:00
Rico Tzschichholz
bdaa2bf531 gtkplacessidebar: Remove deprecated "show-other-locations" signal 2016-10-23 19:13:15 +02:00
Rico Tzschichholz
5c526c9926 gtkplacessidebar: Remove deprecated "show-connect-to-server" 2016-10-23 18:23:59 +02:00
Emmanuele Bassi
5880d1b990 gtk: Cast static strings assigned to non-const variables
GtkTargetEntry.target is particularly egregious, and it should really be
constified.
2016-10-17 11:44:10 +01:00
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00