summaryrefslogtreecommitdiff
path: root/src/nautilus-window-slot.h
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-03-22 17:20:21 +0100
committerCarlos Soriano <csoriano@gnome.org>2016-04-14 10:35:15 +0200
commit5f295bd92cb4dabc44e76dd76e83df8190373bd8 (patch)
treee4a10e5a68d8db865cc9e0adb984c723f770d677 /src/nautilus-window-slot.h
parentef1d15273b12b9f292d50d734dbb6c1cee2520d9 (diff)
downloadnautilus-5f295bd92cb4dabc44e76dd76e83df8190373bd8.tar.gz
window-slot: use inheritance for other locations view
We need to special case the other locations view when using that location, since it's not a files-view and doesn't support several things that we usually support, like the changes between icon view and list view. Also we specifically special case its creation in window slot and we disable few actions that are not available on it. This patch creates a other locations slot, which will handle all of it. The class that is responsible of creating one type of slot or another is the window, and will use a vfunc that will request whether the slot handles a location or not and will act accordingly. In upcoming patches we will move all the special casing of this and the desktop in the window slot to its respective subclasses now that we have everything ready. https://bugzilla.gnome.org/show_bug.cgi?id=712620
Diffstat (limited to 'src/nautilus-window-slot.h')
-rw-r--r--src/nautilus-window-slot.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
index 9345f8741..ed4c5eb1f 100644
--- a/src/nautilus-window-slot.h
+++ b/src/nautilus-window-slot.h
@@ -55,6 +55,11 @@ struct _NautilusWindowSlotClass {
*/
NautilusView* (* get_view_for_location) (NautilusWindowSlot *slot,
GFile *location);
+ /* Whether this type of slot handles the location or not. This can be used
+ * for the special slots which handle special locations like the desktop
+ * or the other locations. */
+ gboolean (* handles_location) (NautilusWindowSlot *slot,
+ GFile *location);
};
NautilusWindowSlot * nautilus_window_slot_new (NautilusWindow *window);
@@ -101,6 +106,9 @@ gboolean nautilus_window_slot_get_loading (NautilusWindowSlot *
void nautilus_window_slot_search (NautilusWindowSlot *slot,
const gchar *text);
+gboolean nautilus_window_slot_handles_location (NautilusWindowSlot *self,
+ GFile *location);
+
/* Only used by slot-dnd */
NautilusView* nautilus_window_slot_get_current_view (NautilusWindowSlot *slot);