Commit Graph

242 Commits

Author SHA1 Message Date
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