Commit 7a4af383 authored by Cosimo Cecchi's avatar Cosimo Cecchi

view: don't check for allow_moves in the view superclass

The property is only used by the icon view, so it's better to move the
check there.
parent be2d9bba
......@@ -1200,18 +1200,21 @@ fm_icon_view_begin_loading (FMDirectoryView *view)
GtkWidget *icon_container;
NautilusFile *file;
int level;
char *sort_name;
char *sort_name, *uri;
g_return_if_fail (FM_IS_ICON_VIEW (view));
icon_view = FM_ICON_VIEW (view);
file = fm_directory_view_get_directory_as_file (view);
uri = nautilus_file_get_uri (file);
icon_container = GTK_WIDGET (get_icon_container (icon_view));
nautilus_icon_container_begin_loading (NAUTILUS_ICON_CONTAINER (icon_container));
nautilus_icon_container_set_allow_moves (NAUTILUS_ICON_CONTAINER (icon_container),
fm_directory_view_get_allow_moves (view));
!eel_uri_is_search (uri));
g_free (uri);
/* kill any sound preview process that is ongoing */
preview_audio (icon_view, NULL, FALSE);
......@@ -252,8 +252,6 @@ struct FMDirectoryViewDetails
GList *subdirectory_list;
gboolean allow_moves;
GdkPoint context_menu_position;
......@@ -2994,30 +2992,14 @@ fm_directory_view_send_selection_change (FMDirectoryView *view)
view->details->send_selection_change_to_shell = FALSE;
fm_directory_view_get_allow_moves (FMDirectoryView *view)
return view->details->allow_moves;
nautilus_view_load_location (NautilusView *nautilus_view,
GFile *location)
NautilusDirectory *directory;
FMDirectoryView *directory_view;
gchar *uri;
directory_view = FM_DIRECTORY_VIEW (nautilus_view);
uri = g_file_get_uri (location);
if (eel_uri_is_search (uri)) {
directory_view->details->allow_moves = FALSE;
} else {
directory_view->details->allow_moves = TRUE;
g_free (uri);
directory = nautilus_directory_get (location);
load_directory (directory_view, directory);
......@@ -377,7 +377,6 @@ GtkUIManager * fm_directory_view_get_ui_manager (FMDirect
char ** fm_directory_view_get_emblem_names_to_exclude (FMDirectoryView *view);
NautilusDirectory *fm_directory_view_get_model (FMDirectoryView *view);
NautilusFile *fm_directory_view_get_directory_as_file (FMDirectoryView *view);
gboolean fm_directory_view_get_allow_moves (FMDirectoryView *view);
void fm_directory_view_pop_up_background_context_menu (FMDirectoryView *view,
GdkEventButton *event);
void fm_directory_view_pop_up_selection_context_menu (FMDirectoryView *view,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment