diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-02-10 21:35:33 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-02-11 13:24:32 +0100 |
commit | c27d704741d97cd7dbf3e4628768fbf6164a3164 (patch) | |
tree | ccf2695bb4dea7593aa6ba219a07881b78278598 /src/nautilus-files-view.h | |
parent | 52a6432c19b936fde1dc2489dd9990927808f7bf (diff) | |
download | nautilus-c27d704741d97cd7dbf3e4628768fbf6164a3164.tar.gz |
search: use a separate view setting for search
So we can select what type of view do we want for search independently
of what we normally use.
This is needed since we default to switch to list view for search, but
we would like to allow users to select a different view. However,
instead of adding a preference in the preference dialog, we can do it
more straightforward and change the setting when we are in search.
On the way, rework all the enums and views id for a saner code...
Diffstat (limited to 'src/nautilus-files-view.h')
-rw-r--r-- | src/nautilus-files-view.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nautilus-files-view.h b/src/nautilus-files-view.h index 4873fa5a0..4fb1c5229 100644 --- a/src/nautilus-files-view.h +++ b/src/nautilus-files-view.h @@ -39,13 +39,13 @@ typedef struct NautilusFilesViewClass NautilusFilesViewClass; #include "nautilus-window.h" #include "nautilus-window-slot.h" -#if ENABLE_EMPTY_VIEW -#define NAUTILUS_EMPTY_VIEW_ID "empty" -#endif - -#define NAUTILUS_CANVAS_VIEW_ID "grid" -#define NAUTILUS_DESKTOP_VIEW_ID "desktop" -#define NAUTILUS_LIST_VIEW_ID "list" +enum { + NAUTILUS_VIEW_GRID_ID, + NAUTILUS_VIEW_LIST_ID, + NAUTILUS_VIEW_DESKTOP_ID, + NAUTILUS_VIEW_EMPTY_ID, + NAUTILUS_VIEW_INVALID_ID, +}; #define NAUTILUS_TYPE_FILES_VIEW nautilus_files_view_get_type() #define NAUTILUS_FILES_VIEW(obj)\ @@ -265,8 +265,8 @@ struct NautilusFilesViewClass { void (* click_policy_changed) (NautilusFilesView *view); void (* sort_directories_first_changed) (NautilusFilesView *view); - /* Get the id string for this view. Its a constant string, not memory managed */ - const char * (* get_view_id) (NautilusFilesView *view); + /* Get the id for this view. Its a guint*/ + guint (* get_view_id) (NautilusFilesView *view); /* Return the uri of the first visible file */ char * (* get_first_visible_file) (NautilusFilesView *view); @@ -285,7 +285,7 @@ struct NautilusFilesViewClass { /* GObject support */ GType nautilus_files_view_get_type (void); -NautilusFilesView * nautilus_files_view_new (const gchar *id, +NautilusFilesView * nautilus_files_view_new (guint id, NautilusWindowSlot *slot); /* Functions callable from the user interface and elsewhere. */ @@ -339,7 +339,7 @@ gboolean nautilus_files_view_is_editable (NautilusFilesV NautilusWindow * nautilus_files_view_get_window (NautilusFilesView *view); /* NautilusFilesView methods */ -const char * nautilus_files_view_get_view_id (NautilusFilesView *view); +guint nautilus_files_view_get_view_id (NautilusFilesView *view); /* file operations */ char * nautilus_files_view_get_backing_uri (NautilusFilesView *view); |