Commit Graph

377 Commits

Author SHA1 Message Date
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
William Jon McCann
a4332e7f69 Set reasonable minimum size for the file chooser
At small sizes it just looks broken.
2013-07-17 20:48:59 -04:00
William Jon McCann
dae6afc847 Deprecate and ignore timeout-expand setting 2013-07-11 17:08:15 -04:00
Matthias Clasen
d0a2e06c7d places sidedbar: deal with lack of symbolics
Use g_themed_icon_new_with_default_fallbacks, so we don't end up
without icons when the theme doesn't have symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=703606
2013-07-09 07:12:18 -04:00
William Jon McCann
aef9dca9d5 Deprecate GtkIconFactory, GtkIconSet, GtkIconSource
We want to use GtkIconTheme instead. It is worth noting that
the parts that remain undeprecated are GtkIconSize and gtk_icon_size_lookup.
2013-06-26 20:02:27 -04:00
William Jon McCann
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
Alban Browaeys
b08fe39cd8 GtkPlacesSidebar: do not unref mount
Do not unref mount has we grabbed its pointer without taking
a reference.
Otherwise the following call to g_list_free_full on network_mounts
frees it a second time. Segfault in nautilus ensue.

https://bugzilla.gnome.org/show_bug.cgi?id=700979
2013-05-26 00:03:13 -04:00
Federico Mena Quintero
dc2f399dd0 GtkPlacesSidebar: Only create bookmarks for folders, not files
https://bugzilla.gnome.org/show_bug.cgi?id=561221
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-05-22 17:22:28 -05:00
Joe Pea
67c8ebc5d5 GtkPlacesSidebar: Fixed tooltip capitalization
Use sentence capitalization for the tooltip on the file system disk under Devices.
https://bugzilla.gnome.org/show_bug.cgi?id=698933
2013-05-13 05:47:05 -04:00
Kalev Lember
34c0deb006 GtkPlacesSidebar: Fix an uninitialized variable in the error code path
Initialize it to NULL early so that we won't try to free an
uninitialized variable when handling an error.
2013-05-07 14:01:54 +02:00
Matthias Clasen
c6894cd606 Try this again
When the hostnamed call is cancelled, we get a G_IO_ERROR_CANCELLED
error back. Handle it properly.
2013-05-02 09:29:35 -04:00
Matthias Clasen
f7f63ae3ee Revert "Remove a superfluous ref"
This reverts commit f326c0eac8.

Grr, turns out that cancelling is not that reliable :-(
2013-05-02 08:23:58 -04:00
Matthias Clasen
f326c0eac8 Remove a superfluous ref
If we cancel the call in dispose, no need to ref the object
we pass as userdata. Avoids the risk of leaking the ref if
the call is actually canceled.
2013-05-02 05:53:40 -04:00
Matthias Clasen
2f0a5dd541 GtkPlacesSidebar: Correct all since tags 2013-05-01 21:19:37 -04:00
Federico Mena Quintero
5322420145 Use friendlier property names for Glade 2013-04-22 15:46:59 -04:00
Federico Mena Quintero
9b91e06513 Oops, only show 'Connect to server' if the caller enabled it 2013-04-21 18:20:46 -04:00
Federico Mena Quintero
9d8e3be6d7 Add a selected_volume argument to ::populate-popup
Nautilus needs this in order to implement a Format command for a volume's popup menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-21 12:41:33 -04:00
Federico Mena Quintero
9ded1c0c99 Sync from nautilus commit 500770e8de18b07392ffa4435372525d5d03c688
Add a Connect to Server menu item, a show-connect-to-server property, and a show-connect-to-server signal.
2013-04-20 19:14:59 -04:00
Federico Mena Quintero
2d84ebeeb8 Remove the switch location timer during drag_leave
So that hovering in and out of the sidebar quickly doesn't cause a location change in the caller.
2013-04-20 16:21:33 -04:00
Cosimo Cecchi
e9c4dcd3f8 Sync from nautilus commit d2bfffc574c1e6305d862c041b35c9c45ba67674
Coding style fix.
2013-04-20 15:59:04 -04:00
Cosimo Cecchi
755e37ffdf Sync from nautilus commit 277a6a45bee8186b2493ad1b286234ac52f1aed8
Use gtk_tree_view_set_activate_on_single_click().
2013-04-20 15:58:55 -04:00
William Jon McCann
fa1f7d3f97 Sync nautilus commit 95400548176688f3d2f5e8888f48410756bd96b8
Switch location on hovering the places sidebar during a DnD operation -
kind of for spring-loaded folders.
2013-04-20 15:56:59 -04:00
Federico Mena Quintero
3b34e70f13 Remove the drop feedback row a little time after drag_leave
Since ::drag-leave gets emitted before ::drag-drop, we can't just remove the drop feedback row
in drag-leave, as we *need* it during drag-drop.  So, we use the same trick as in testdnd.c - we
install a timeout handler in our drag-leave callback, and remove the feedback in the timeout callback.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 14:53:03 -04:00
Federico Mena Quintero
9c38ff7dfb Drop in the right place when the feedback row is active
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 14:53:03 -04:00
Federico Mena Quintero
3083308d1c Actually use the drop_state, instead of encoding things in new_bookmark_index
This lets us keep the new_bookmark_index untouched even when the drop state goes from armed to unarmed.
That will in turn let us drop in the right place...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 11:42:04 -04:00
Federico Mena Quintero
a1b9bf7fbc Adjust the drag destination row when it is above the currently highlighted row
This makes the feedback accurate and without hysteresis.  Haven't I written this code ten times before?

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:24:03 -05:00
Federico Mena Quintero
3815f5d956 Dropping on the feedback row is always possible
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:24:03 -05:00
Federico Mena Quintero
bc0a9a33b0 Add a temporary row for feedback when inserting a bookmark is possible
We'll prettify this gradually.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:23:55 -05:00
Federico Mena Quintero
624b352d77 Move the drop feedback code to stub functions
For now it is the old, simple call to gtk_tree_view_set_drag_dest_row().  We'll do something
fancier in the following commits.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 11:30:23 -05:00
Federico Mena Quintero
7d52dff5ec Add a DropState enum to the internal state of the sidebar
We want to show a little animation when a DnD operation is happening and the user hovers
between existing bookmarks.  The animation should indicate the user that he's about to
create a new bookmark from the file right there.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 11:20:13 -05:00
Federico Mena Quintero
456c318f6e Remove unused #define 2013-04-11 20:42:43 -05:00
Federico Mena Quintero
d3985dec1d GtkPlacesSidebar: Hold a reference to the sidebar while a D-Bus proxy is being created
The creation is async, and the sidebar could be destroyed while the D-Bus proxy is being created.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-11 20:04:53 -05:00
Federico Mena Quintero
0ae26b94f2 Remove a NULL-GError that is no longer useful
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 18:12:20 -06:00
Federico Mena Quintero
63b9598b51 Don't use inout ints in the drag-action-requested signal
It's not friendly to bindings, and we didn't need an inout parameter anyway.
We use a simple return value from the signal handler now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:39:39 -06:00
Federico Mena Quintero
bc38811645 Remove a couple of FIXMEs 2013-02-27 14:17:10 -06:00
Federico Mena Quintero
a7213e3ccf Disallow drops on the recent:/// item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:33 -06:00
Federico Mena Quintero
3363974c09 Remove temporary debugging code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:23 -06:00
Federico Mena Quintero
6d94f8a56c Don't allow drops in unmounted volumes
Unmounted volumes don't have a URI yet, so we can use that to distinguish them
from within the DnD code.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:16:31 -06:00
Federico Mena Quintero
dbf98bcfeb Properly indicate when new bookmarks are being dropped between other bookmarks
We weren't handling the drag-URIs-as-bookmarks case in drag_motion_callback().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:08:16 -06:00
Federico Mena Quintero
936045e82b Merge branch 'master' into places-sidebar
Conflicts:
	docs/reference/gtk/gtk-docs.sgml
	gtk/gtkfilechooserdefault.c
	gtk/org.gtk.Settings.FileChooser.gschema.xml
2013-02-13 20:37:36 -06:00
Federico Mena Quintero
04dbec4191 Allow dropping URIs as bookmarks between existing bookmarks
The before-drop machinery was already in place; here we implement the actual
dropping.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-05 14:44:58 -06:00
Federico Mena Quintero
46acb933cd Remove the accept-uri-drops property
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:16:09 -06:00
Federico Mena Quintero
fafec940b3 Redo the logic for computing drop positions
Instead of having an accept_uri_drops flag, we'll always advertise as accepting URI drops.
However, we'll see if the caller actually handles the drag-action-requested signal.  If it
does, we'll indeed allow performing file operations when URIs are dropped.  Otherwise,
we'll only allow creating bookmarks from dragged URIs.

Dragging URIs directly into a places item will cause the sidebar to check if the caller
allows file operations.  Dragging URIs between places items will cause the sidebar
to create bookmarks for those URIs instead.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:14:10 -06:00
Federico Mena Quintero
2a35574067 Whitespace cleanups 2013-01-29 01:02:57 -06:00
Federico Mena Quintero
4bff4b025b Reset the treeview drag dest row if the drop is not possible
This keeps the drop indicator line from 'sticking' if you drag a bookmark above
the Bookmarks heading.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-25 18:01:42 -06:00
Federico Mena Quintero
f3fb51e96b Remove TODO items that are done 2013-01-24 18:46:07 -06:00
Federico Mena Quintero
fc9489f381 Use GFile in the DnD signals instead of URIs
The rest of the public API works in terms of GFile, so remove this last remnant
of passing URIs around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-21 17:59:44 -06:00
Cosimo Cecchi
a8f3465181 Add some missing annotations 2013-01-21 18:23:25 -05:00
Cosimo Cecchi
21a07a5760 Add GObject properties and C getters 2013-01-21 18:21:00 -05:00
Cosimo Cecchi
742a2f11a9 Remove useless style_set override 2013-01-21 18:04:14 -05:00
Cosimo Cecchi
f5b91b9176 Update TODO 2013-01-21 17:49:58 -05:00
Cosimo Cecchi
f59a618db9 Apply custom names to XDG dirs if possible
And make it possible to rename them
2013-01-21 17:49:01 -05:00
Cosimo Cecchi
03f220e4c2 Don't add built-in bookmarks twice 2013-01-21 17:49:01 -05:00
Cosimo Cecchi
7fa38fd6fb Use g_clear_object() 2013-01-21 17:07:12 -05:00
Cosimo Cecchi
a97a5d3049 Don't unconditionally unref potentially NULL objects
We already have != NULL checks here, so fold the unrefs inside.
2013-01-21 17:06:42 -05:00
Cosimo Cecchi
0523b2f719 Avoid an useless ref/unref
The GMount will be kept alive by the async operation itself.
2013-01-21 17:00:50 -05:00
Cosimo Cecchi
ceb631b60f Fix a FIXME about using symbolic icons
Use g_file_info_get_symbolic_icon() for it.
2013-01-21 16:57:27 -05:00
Cosimo Cecchi
2cf8970f91 Sync from Nautilus commit 463e8d1b1922474e4cf591a3029ea813804bd3e7
make sure to always notify when unmounting
2013-01-21 16:48:52 -05:00
Cosimo Cecchi
eea192adaa Sync from Nautilus commit 480b1daf8814063f348d0f75082353a2f6a3eab3
cancel the hostnamed proxy creation on dispose
2013-01-21 16:38:23 -05:00
Federico Mena Quintero
26a5391caa Add some missing docs for GtkPlacesSidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-18 20:05:00 -06:00
Federico Mena Quintero
52d07c9148 Add toplevel docs for the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-18 17:18:25 -06:00
Federico Mena Quintero
4cad0db95a Add docstrings for the signals
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-11 17:55:36 -06:00
Federico Mena Quintero
306dcd3956 Add missing docstrings to public functions 2013-01-10 20:07:27 -06:00
Federico Mena Quintero
da2e081786 Make the set_location()/get_location() API consistent
We used to have set_current_location() and get_selected_location(), with confusing
semantics.  Now they are symmetric, with the exception that if set_location() is
called with a location that is not shown in the sidebar, then it will both clear
the selection in the list and make get_selection() return NULL.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 18:12:15 -06:00
Federico Mena Quintero
0b4183234b New API, gtk_places_sidebar_set_open_flags()
This lets us handle the 'Open in new tab' and 'Open in new window' menu items
on our own, and allows callers to have less code to deal with each mode.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 16:19:03 -06:00
Federico Mena Quintero
439a770efa Use GtkTrashMonitor instead of an API to set the trash state
This lets us remove two entry points, gtk_places_sidebar_set_show_trash(),
and gtk_places_sidebar_set_trash_is_full().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 15:06:01 -06:00
Federico Mena Quintero
ff041608ec Remove to-do items for Nautilus; they are done now 2013-01-08 16:34:15 -06:00
Federico Mena Quintero
8dd233dfac New public function to get the selected location from menu item callbacks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-17 20:05:23 -06:00
Federico Mena Quintero
bfa1f4ac0b Emit the populate-popup signal so the caller can spice things up
Also, we factor out the process of getting the selected item's info out of
the liststore.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 21:44:50 -06:00
Federico Mena Quintero
d0d02357e0 Remove the Properties menu item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:15:49 -06:00
Federico Mena Quintero
335ce0edc6 Remove the Empty Trash menu item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:08:50 -06:00
Federico Mena Quintero
55927f273d Remove the multiple-tab/windows-supported APIs
We'll have the caller do these instead via the populate-popup signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:04:30 -06:00
Federico Mena Quintero
fc01ce0756 Rebuild the popup menu every time it is used
We'll need to rebuild it every time for the populate-popup signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 17:56:53 -06:00
Federico Mena Quintero
e00498fcd8 New signal populate-popup
Instead of conditionally creating contextual menu items like 'Show file properties',
we'll instead let the caller populate the popup menu, as is done for GtkEntry.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 11:57:49 -06:00
Federico Mena Quintero
42d239f6d5 Remove gtk_places_sidebar_set_show_cwd(), implement that in the file chooser
This removes more idiosyncratic API from the sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:52:17 -06:00
Federico Mena Quintero
c4f40a92ca Remove the GError from the shortcut-related functions
See https://bugzilla.gnome.org/show_bug.cgi?id=650363#c8 and the next comment; this
argument just makes the API harder to use without real benefit.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:29:11 -06:00
Federico Mena Quintero
72ce506cfc Rename signal location-selected to open-location
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 12:09:13 -06:00
Federico Mena Quintero
e4d5e66d44 Remove another to-do 2012-12-10 17:28:07 -06:00
Federico Mena Quintero
c26293eacd Implement the Alt-number quick bookmark shortcuts
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 16:00:42 -06:00
Federico Mena Quintero
976672ad4b Implement the application-side shortcuts in GtkFileChooserDefault
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:06:07 -06:00
Federico Mena Quintero
e4c70bb691 New machinery to add application-specific shortcuts
The file chooser needs them for gtk_file_chooser_add_shortcut_folder() and friends.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-07 13:42:39 -06:00
Federico Mena Quintero
19001bafaa One less to-do
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-06 12:11:30 -06:00
Federico Mena Quintero
489000ba9a Remove obsolete comment 2012-12-05 17:44:49 -06:00
Federico Mena Quintero
35866c8ac6 Sync from Nautilus commit bde2536ee72672c4cd58af7cbb3cf42a42962c21
Use ellipsis character instead of dots
2012-12-05 17:44:14 -06:00
Federico Mena Quintero
1bd5eeabb2 Sync from nautilus commit b2e8339d9f49770db0f6a523c8bf77b11d7eace3
Simplify setting eject icon

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-05 16:56:15 -06:00
Federico Mena Quintero
e7d6e788e3 Sync from nautilus commit 0177dd24a5f7f9f5302745a865eb970a35faa78c 2012-12-05 16:51:32 -06:00
Federico Mena Quintero
221095d287 Add list of pending things in GtkPlacesSidebar 2012-12-05 16:51:15 -06:00
Federico Mena Quintero
6fcf8a78ef Remove comments on things that Nautilus no longer needs to do 2012-12-04 18:25:44 -06:00
Federico Mena Quintero
be492a206f Use the right signal id
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 18:18:32 -06:00
Federico Mena Quintero
686814e0e6 Removed unneeded signal initiated-unmount
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 18:09:38 -06:00
Federico Mena Quintero
b22e553095 Oops, signals returning an int must be G_SIGNAL_RUN_LAST
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 17:37:45 -06:00
Federico Mena Quintero
56331a4c43 Port code to add a bookmark for a volume
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 16:16:49 -06:00
Federico Mena Quintero
10b22e0ee2 New API to set whether URI drops are accepted
The file chooser will not accept dropping URIs in a shortcut item.  However, Nautilus will,
to perform normal DnD for files.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:57:48 -06:00
Federico Mena Quintero
4fe86f1d10 Emit drag-perform-drop when we need the caller to do the drop action
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:52:44 -06:00
Federico Mena Quintero
221ea9d4c5 New signal drag-perform-drop
The caller is supposed to take action with the specified URIs.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:44:46 -06:00
Federico Mena Quintero
f46b26d245 New signal drag-action-ask
We'll ask the caller to present a popup menu (or whatever) with the possible drag actions.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 18:15:41 -06:00
Federico Mena Quintero
a5184c2eb1 Emit drag-action-requested and feed the result to gdk_drag_status()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 17:37:11 -06:00
Federico Mena Quintero
0a2f9b7313 New signal drag-action-requested
We'll use this signal to ask the caller about what drag action to indicate
when something is being hovered on an item in the places sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 17:32:10 -06:00
Federico Mena Quintero
08334f5258 Free URI lists
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 16:45:25 -06:00
Federico Mena Quintero
0a0eee816a Rename function for clarity
build_selection_list() -> build_uri_list()

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 16:41:02 -06:00
Federico Mena Quintero
e09b568b68 Remove the menu items to select recent-files or CWD
Per the gtk-devel meeting on 2012/11/29, we'll not have a UI in the file chooser dialog
to select between those modes.  Instead, we'll show that key in gtweaktool.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-30 11:08:08 -06:00
Federico Mena Quintero
c16654bb75 Ahem, read radio menu items like I knew how to do it
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-26 20:43:23 -06:00
Federico Mena Quintero
bd9532d23f Restore the originally-selected location when dynamically updating the bookmarks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 11:18:23 -06:00
Federico Mena Quintero
637bd8f2b8 Oops, actually update the internal location of the places sidebar prior to notifying the caller
This is so that the sidebar will already know the URI of the location it is showing.  When
the caller asks the sidebar to change back to the same location, the call will be idempotent.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:59:48 -06:00
Federico Mena Quintero
e0b30d013e Turn gtk_places_sidebar_set_current_uri() into _set_current_location()
To be consistent with the ::location-selected signal, which emits a GFile, we now also use a GFile
instead of a string URI in the inbound API.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:41:11 -06:00
Federico Mena Quintero
791bd3cec2 Update the widgets until all of them have been created
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:44 -06:00
Federico Mena Quintero
fe6814061d Add menu items to the places sidebar to configure the startup mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:43 -06:00
Federico Mena Quintero
ec9bdc6397 New way to show in the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-20 20:04:20 -06:00
Federico Mena Quintero
5741b0e661 Note about missing empty-trash functionality when unmounting a volume.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 18:57:24 -06:00
Federico Mena Quintero
26a29c7877 Fix code to unmount volumes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 18:53:41 -06:00
Federico Mena Quintero
de5f5b7cef Copy code from Nautilus to mount volumes
Instead of having a nested-callback scheme (to preserve internal API compatibility),
we use a direct callback from g_volume_mount().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 14:28:12 -06:00
Federico Mena Quintero
18f3c4d94c Set GTK_STYLE_CLASS_SIDEBAR on the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 12:40:42 -06:00
Federico Mena Quintero
84f218aaac Remove some more comments on things that Nautilus needs to do
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-26 18:53:09 -05:00
Federico Mena Quintero
a4cd479021 Remove some notes on things that Nautilus should do but already does
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-26 13:05:56 -05:00
Federico Mena Quintero
cdefdcb4ba Add a show-file-properties signal for Nautilus to use
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-22 18:21:17 -05:00
Federico Mena Quintero
e97869a69c Note on more things that Nautilus needs to do 2012-10-22 17:53:32 -05:00
Federico Mena Quintero
948a7be7f7 Enable code to reorder bookmarks by dragging 2012-10-20 14:00:50 -05:00
Federico Mena Quintero
eb40a6cc68 Sync from Nautilus commit b72d57b038e50172fac2fafdc6c26660378aab34
No changes (except a whitespace fix), for we already had a copy of
special_directory_get_gicon().
2012-10-20 13:34:23 -05:00
Federico Mena Quintero
2af5ce906e Add comment about missing way to get symbolic icons for bookmarks
Nautilus got the ability to do that in commit 0ed400b9c1692e42498bff3c10780073ec137f63.
Maybe we should just copy that code to here later.
2012-10-19 12:26:40 -05:00
Cosimo Cecchi
dc40569628 Sync from Nautilus: bookmark: remove unused GIcon argument to nautilus_bookmark_new()
We always pass NULL these days.
This is from nautilus commit 7aad4a33814e6e7fae5e762882db43452a575a83
2012-10-19 12:14:21 -05:00
William Jon McCann
03119a2b5d Sync from Nautilus - Fix leaks
https://bugzilla.gnome.org/show_bug.cgi?id=683769
This is from nautilus commit a755aa27c636561a1ab41066484cf9bcc97667f9
2012-10-19 12:12:19 -05:00
Federico Mena Quintero
4de4d6a6a7 Use symbolic icons
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 16:05:29 -05:00
Federico Mena Quintero
ddefb8622c I guess I can call myself a coauthor of this now
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:45:56 -05:00
Federico Mena Quintero
e3d12e8295 Add machinery for Nautilus to set up the trash state
We add a method to say whether the trash is full/empty (to use the appropriate icon),
and a signal that the sidebar can use to request that the trash be emptied when
the user selects 'Empty trash' from the context menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:44:29 -05:00
Federico Mena Quintero
6868e0e239 Remove unused field
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:21:58 -05:00
Federico Mena Quintero
6ed2217eda Implement bookmark reordering, at least the core
The drag-and-drop part is missing; that still needs de-nautilus-ifying.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:17:03 -05:00
Federico Mena Quintero
8b1eb6db99 Factor out code to find a bookmark in the list of bookmarks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:02:01 -05:00
Federico Mena Quintero
caf659e791 Add set_show_properties and set_show_trash APIs
Currently they default to false.  This also fixes warnings with uninitialized widgets
in bookmarks_check_popup_sensitivity().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 14:33:47 -05:00
Federico Mena Quintero
992602e106 Make renaming bookmarks work
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-10 15:03:13 -05:00
Federico Mena Quintero
865e8d3aa4 Make removing bookmarks work
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-10 14:43:30 -05:00
Federico Mena Quintero
f05874a1f0 If a bookmark doesn't have an explicit label, use the display name of the file
We query the file info for display name and icon synchronously.  If it becomes a problem,
we'll make it async, more in line with NautilusBookmark.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 14:36:05 -05:00
Federico Mena Quintero
a7ea37f55d Sync with NautilusPlacesSidebar
This syncs the code up to commit 4b6abf644b from Nautilus.
This only refers to nautilus-places-sidebar.[ch].

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 11:11:20 -05:00
Federico Mena Quintero
abdef8aca0 Use the correct GTK_TYPE_PLACES_OPEN_MODE instead of a generic enum type
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-05 20:13:25 -05:00
Federico Mena Quintero
e49edba462 Add missing includes 2012-09-03 21:30:38 -05:00
Federico Mena Quintero
19ef71897d Add gtkplacessidebar.[ch] to Makefile.am and fix compilation errors
Signed-off-by: Federico Mena Quintero <federico@gnome.org>

Conflicts:
	gtk/Makefile.am
2012-09-03 20:55:52 -05:00
Federico Mena Quintero
4f9b06da56 Add a bunch of '#if DO_NOT_COMPILE' to remove nautilus-isms temporarily
This is just so that I can start compiling this file and testing it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:49 -05:00
Federico Mena Quintero
b31b7e3ed4 Remove stale code to deal with preferences
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:44 -05:00
Federico Mena Quintero
5661b7b991 Don't leak the bookmarks when enumerating them
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:40 -05:00
Federico Mena Quintero
8f786e0b12 Insert bookmarks during drag-and-drop operations
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:37 -05:00
Federico Mena Quintero
9de31fc317 Replacement for nautilus_get_desktop_directory()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:32 -05:00
Federico Mena Quintero
2aaf82cb24 Replacement for eel_pop_up_context_menu()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:28 -05:00
Federico Mena Quintero
92e1b8e31f Replace eel_gtk_menu_append_separator()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:24 -05:00
Federico Mena Quintero
cbd3c6ca12 Replace eel_create_spotlight_pixbuf()
We use the normal gtk_style_context_set_state() machinery to set a
prelighted state.  Hopefully even symbolic icons will be rendered
prelighted properly.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:19 -05:00
Federico Mena Quintero
f404eb41b5 Get icons for user-special directories
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:15 -05:00
Federico Mena Quintero
c942ed77d2 Use the correct icon for trash
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:11 -05:00
Federico Mena Quintero
3e26fda89b Replace an icon name with a macro
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:07 -05:00
Federico Mena Quintero
06a9d19f9a Don't use gtk_icon_theme_get_default(); use the screen-specific theme
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:03 -05:00
Federico Mena Quintero
76ec7fb005 Replacement for the NautilusIconInfo machinery
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:57 -05:00
Federico Mena Quintero
4759365590 New signal show-error-message
We need to ask the caller to pop up error messages for us, so it can do
it with its own conventions:  pick the right transient window, use a status
bar rather than a dialog, etc.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:53 -05:00
Federico Mena Quintero
a4ac2d5958 Replacement for eel_gtk_tree_view_set_activate_on_single_click()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:49 -05:00
Federico Mena Quintero
28f44a3b71 Function to set whether to show the Desktop item
It sucks to have this as an app-settable option.  Maybe we should
make this a standard GSetting thing and be done with it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:44 -05:00
Federico Mena Quintero
7be881982f Add functions to say whether multiple tabs/windows are supported
The file chooser will leave these off by default; file managers
like Nautilus will turn them on.

These control whether the places sidebar shows 'open in new tab' and similar
items in its context menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:38 -05:00
Federico Mena Quintero
01020ccc81 Replace an icon-size macro from Nautilus 2012-09-03 20:53:33 -05:00
Federico Mena Quintero
f68609f6fe Use macros for themed icon names
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:29 -05:00
Federico Mena Quintero
d027b2d3b1 Tentatively accept any drags of URI lists
Don't try to decide if the URIs are acceptable / not duplicates; the
idea is to let the user bookmark whatever he pleases.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:22 -05:00
Federico Mena Quintero
0f2f7ae5ee Use our own function to compute icon sizes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:18 -05:00
Federico Mena Quintero
644d8e4b64 Replace nautilus_window_set_initiated_unmount() with an initiated-unmount signal
This signal just carries a boolean initiated_unmount argument, which
is meant to say True when the unmount/eject starts, and False when
the operation finishes.

We may want to rename all of this to unmount_started / stopped, etc.
I don't know if the caller needs to know about the mount_op in question,
or if it can be inferred from what the caller knows to be the current
shown location on the GtkPlacesSidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:11 -05:00
Federico Mena Quintero
acccb10fd7 Remove the use of NautilusWindow
Now we just need to see if we need to replace calls to
nautilus_window_set_initiated_unmount() with a signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:07 -05:00
Federico Mena Quintero
6287ee4e8f Remove the last use of nautilus_window_slot_get_current_uri()
This is just sidebar->uri, the current URI in the sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:01 -05:00
Federico Mena Quintero
c2a922bfcb Replacement for nautilus_get_home_directory_uri()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:55 -05:00
Federico Mena Quintero
0bc1be008c Make the main update_places() use GtkBookmarksManager
There are still some missing pieces to get the bookmark's icon,
and *maybe* to cull the list of bookmarks based on some criteria.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:51 -05:00
Federico Mena Quintero
0be8218608 Create the bookmarks manager from the places sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:46 -05:00
Federico Mena Quintero
60f8411998 Make gtk_places_sidebar_set_current_uri() handle NULL URIs to unselect all
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:42:31 -05:00
Federico Mena Quintero
91b3ad95c6 Rename NautilusShortcutsModelFilter to ShortcutsModelFilter
It's unfortunate that we need a filter model to do the DnD stuff...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:39:02 -05:00
Federico Mena Quintero
f2d46f3991 New 'location-selected' signal
Instead of directly calling the Nautilus machinery to open locations
in tabs or windows, we emit a signal which the caller must handle.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:59 -05:00
Federico Mena Quintero
5d1620f0c0 Add a GtkPlacesOpenMode enum to say how a shortcut should be opened
Nautilus lets you open things in the same tab, in a new tab, or in
a new window.  We will expose these semantics through an enum, as
part of an 'open' signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:55 -05:00
Federico Mena Quintero
4284d74b3f Remove the 'nautilus' prefix from some constants
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:51 -05:00
Federico Mena Quintero
1093e1433e Add gtk_places_sidebar_set_current_uri()
And remove the code that updated the current URI automatically based
on a NautilusWindow.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:42 -05:00
Federico Mena Quintero
554bb2e18a Connect to the volume monitor at the time of its creation
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:38 -05:00
Federico Mena Quintero
f7312ce63c Don't take a NautilusWindow argument in gtk_places_sidebar_new()
We will move the window-related initialization to ::map() or to a constructor.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:34 -05:00
Federico Mena Quintero
4484d750f5 Update the top comment in gtkplacessidebar.c
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:28 -05:00
Federico Mena Quintero
2f9964f48c Remove unused structs
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:24 -05:00
Federico Mena Quintero
c64d6b0c5a Export GtkPlacesSidebar and the Class types, for subclassing
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:20 -05:00
Federico Mena Quintero
f8fea85f9b Remove Nautilus includes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:15 -05:00
Federico Mena Quintero
660bef2ec2 Replace 'NautilusPlacesSidebar' with 'GtkPlacesSidebar'
Function names are of course of the form gtk_places_sidebar_*() now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:11 -05:00
Federico Mena Quintero
d2050e5812 Copy nautilus-places-sidebar.[ch] as gtkplacessidebar.[ch] 2012-09-03 20:38:03 -05:00