Commit Graph

234 Commits

Author SHA1 Message Date
Cosimo Cecchi
94f412622e GtkPlacesSidebar: add support for unmount notifications
Now that we can use GNotification from here, send a notification when
umounting from GtkPlacesSidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=740896
2014-11-30 09:59:54 -08:00
Matthias Clasen
041ccd7f87 GtkPlacesSidebar: Don't crash on dnd
gtk_get_current_event() can return NULL. Don't crash if it does.

https://bugzilla.gnome.org/show_bug.cgi?id=739150
2014-10-25 16:00:00 -04:00
Matthias Clasen
c26b2c9209 GtkPlacesSidebar: Don't leak an icon
Found in valgrind.
2014-10-14 23:59:51 -04:00
Carlos Soriano
975d9d4314 gtkplacessidebar: Fix commit f6870e5b79
Commit f6870e5b79 introduced a some memory leaks and could be
improved in some areas.

Fix the memory leaks and apply the improvements.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-12 04:16:44 +02:00
Carlos Soriano
f6870e5b79 gtkplacessidebar: Open $HOME after unmounting or ejecting
When a drive is ejected or a volume unmounted the current directory
doesn't change most of the times being empty or being a directory that
user shouldn't take care about, like /run/media

Seems more useful to change to $HOME directory in that case so the user
can see something useful and familiar just after unmounting.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-10 18:17:41 +02:00
Carlos Soriano
3c29212ce3 gtkplacessidebar: Don't change location if clicked on eject button
Currently we change the current location if we click the eject button of
a mount.

Check whether the user actually clicked the eject button and don't
change location in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-10 18:17:41 +02:00
Matthias Clasen
d1fd8267ef Cosmetic formatting fix 2014-10-05 13:39:37 -04:00
Matthias Clasen
b858d45e3c GtkPlacesSidebar: Don't pile up duplicate bookmarks
We get multiple notifications from the bookmark manager when
something changes. Every time, we reconstruct the sidebar contents
completely, by clearing the store. The bookmarks are added with
async calls though, and the code was forgetting to cancel outstanding
async requests, leading to multiple instances of the same bookmark
getting added. Use the cancellable we already have to prevent that.

This could be made much more efficient by not recreating the entire
sidebar quite so often (3-5 times for a single bookmark rename).

https://bugzilla.gnome.org/show_bug.cgi?id=737679
2014-10-05 13:39:37 -04:00
Matthias Clasen
4866f0cec4 GtkPlacesSidebar: Be consistent in messages
Always quote drive/volume names.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Ross Lagerwall
08e1c8e30a GtkPlacesSidebar: Fix a memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=736512
2014-09-12 08:08:09 +01:00
Ross Lagerwall
0c12d3afcc GtkPlacesSidebar: Don't update bookmark if cancelled
If the query fails because it has been cancelled, it means that
dispose() has been called, so don't try and update anything.

This fixes a segfault with Nautilus in certain situations.

https://bugzilla.gnome.org/show_bug.cgi?id=736512
2014-09-12 08:08:09 +01:00
Ross Lagerwall
94ed54f8ad GtkPlacesSidebar: Only add shortcut if query succeeds
https://bugzilla.gnome.org/show_bug.cgi?id=736512
2014-09-12 08:08:09 +01:00
Matthias Clasen
768c0c21b5 GtkPlacesSidebar: Cancel async ops when finalized
This is the common practice for objects that start async operations.
https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Emmanuele Bassi
c68fc27719 places-sidebar: Use asynchronous API for querying bookmarks
Removes two FIXMEs, and ensures that the places sidebar does not block
while enumerating bookmarks or application shortcuts to remote volumes.

https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Yosef Or Boczko
40b50083ee places-sidebar: Refine the spacing
Based on a patch by Yosef Or Boczko,
https://bugzilla.gnome.org/show_bug.cgi?id=731443
2014-08-13 14:34:57 -04:00
Matthias Clasen
155c45eba5 GtkPlacesSidebar: Fix editing of bookmarks
This was silently broken - the code was just assuming that the
text cell renderer is item no. 6 on the list of all cells. That
doesn't work so well if the cell renderers are set up elsewhere
and get rearranged.

Fix this by keeping an explicit pointer to the the text cell.
2014-07-23 14:11:22 -04:00
Bastien Nocera
9d69ff697c placessidebar: Use symbolic name for symbolic icon
https://bugzilla.gnome.org/show_bug.cgi?id=731908
2014-06-22 12:23:52 -04:00
Evan Nemerson
07d825574f gtk: add missing type annotations ported from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Cosimo Cecchi
6ecc431c23 placessidebar: use proper canonicalization when checking if home
Instead of just checking the string. This catches things like double
slashes, relative paths and so on.

https://bugzilla.gnome.org/show_bug.cgi?id=730142
2014-05-14 16:05:44 -07:00
William Jon McCann
1e925a85ca places-sidebar: add optional enter location place
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:34:58 -04:00
William Jon McCann
5a73757cdb places-sidebar: use separators instead of heading labels
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:34:55 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Matthias Clasen
3d17e3f88c GtkPlacesSidebar: Stop drives that can be stopped
Removable USB drives or memory sticks should be powered down
when the eject button is pressed. For this, we need to call
g_drive_stop() instead of g_drive_eject(), provided the drive
can be stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=723121
2014-01-27 21:53:49 -05:00
Matthias Clasen
04e8d9fa5e GtkPlacesSidebar: Fix two copy-paste errors
Sadly, this means the code can have never been tested :-(
2014-01-27 21:53:49 -05:00
Matthias Clasen
2783395eae GtkPlacesSidebar: Remove to FIXMEs
It doesn't hurt to just add the ref here, as the FIXME suggests.
2014-01-27 21:53:49 -05:00
William Jon McCann
ce941736da docs: use correct signal name in docs 2014-01-21 18:57:38 -05:00
Matthias Clasen
0de1173600 Fix a memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=722029
2014-01-13 22:22:29 -05:00
Matthias Clasen
465d4be3cf GtkPlacesSidebar: Don't show desktop if its home
We go to extra length to set the desktop_uri to NULL when
desktop == home, but then we were adding the (non-functional)
place item anyway. Don't do that.
2013-12-19 11:22:02 -05:00
Matthias Clasen
98bdc9321e GtkPlacesSidebar: avoid a crash
Be more careful when comparing uris during DND - they may
be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=720264
2013-12-19 11:01:39 -05:00
Matthias Clasen
8eeebda1e5 places sidebar: Use a symbolic desktop icon
This was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=719505
2013-12-01 13:58:39 -05:00
Matthias Clasen
21114071ec Change the default for "show-desktop" back to TRUE
Change the GtkSettings default for "shell-shows-desktop" back to TRUE
and also change the default value of the "show-desktop" property on
GtkPlacesSidebar so that the defaultvalue test passes.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-26 14:21:01 -05:00
Cosimo Cecchi
f4f82e736c GtkPlacesSidebar: don't unref an object we don't own
gtk_settings_get_default() doesn't return a reference, so don't unref it
during dispose.
2013-11-14 18:30:47 -08:00
Ryan Lortie
c4141a2115 GtkPlacesSidebar: use shell-shows-desktop setting
Use the just-added shell-shows-desktop GtkSetting to determine if we
should also show the "Desktop" folder in the places sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Bastien Nocera
3f5af532f7 GtkPlacesSidebar: Show unmounted bookmarks
The GtkFileInfo is only used if there's no bookmark name,
or to get the icon for the remote share or local folder.

https://bugzilla.gnome.org/show_bug.cgi?id=711548
2013-11-13 23:23:50 -05:00
Matthias Clasen
8b7940c0b1 Silence a compiler warning 2013-11-09 19:26:22 -05:00
Matthias Clasen
2a6039e47f Filter out duplicate application shortcuts
The file chooser used to do this, the places sidebar
still needs to learn it.

https://bugzilla.gnome.org/show_bug.cgi?id=711636
2013-11-09 19:01:27 -05:00
Matthias Clasen
9e5a8b7ae1 GtkPlacesSidebar: Add local-only
This is necessary to implement the filechooser property
of the same name.

https://bugzilla.gnome.org/show_bug.cgi?id=711574
2013-11-09 18:32:51 -05:00
Matthias Clasen
bce6185494 Update coding style
gtkplacessidebar.c was looking foreign.
2013-11-09 18:32:51 -05:00
Matthias Clasen
3abae96740 Properly set drop targets
Pointed out in by Nelson Benitez in bug 707679.
2013-11-09 15:20:02 -05:00
Matthias Clasen
cf00c43154 Revert "GtkPlacesSidebar: support switching locations for XDS drag types"
This reverts commit 588ffa8c32.
2013-10-23 15:55:14 -04:00
Matthias Clasen
c9f8d22094 Revert "GtkPlacesSidebar: support open locations when dragging text"
This reverts commit 1b839d4b72.
2013-10-23 15:54:52 -04:00
Matthias Clasen
aa7bb22685 Revert "GtkPlacesSidebar: use gtk api to add dnd uri targets"
This reverts commit 7fa27dff25.
2013-10-23 15:54:44 -04:00
Nelson Benítez León
7fa27dff25 GtkPlacesSidebar: use gtk api to add dnd uri targets
Instead of hardcoding it in the dnd drop targets list.

Part of bug 707679
2013-10-23 20:20:33 +02:00
Nelson Benítez León
1b839d4b72 GtkPlacesSidebar: support open locations when dragging text
Make GtkPlacesSidebar also open locations when hovered by
text dnd targets.

Part of bug 707679
2013-10-23 20:20:33 +02:00
Nelson Benítez León
588ffa8c32 GtkPlacesSidebar: support switching locations for XDS drag types
Make GtkPlacesSidebar also change locations when hovered
by XDS dnd targets (eg. dragging a file from file-roller).

Part of bug 707679
2013-10-23 20:20:33 +02:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00