[nautilus/wip/csoriano/destktop-split2: 12/33] files-view: remove unused can_rename_file vfunc



commit e7cce255d03d204bd1785ad1abdbdc786a66fd92
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Mar 18 14:00:10 2016 +0100

    files-view: remove unused can_rename_file vfunc

 src/nautilus-canvas-view.c |    7 -------
 src/nautilus-files-view.c  |   26 +-------------------------
 src/nautilus-files-view.h  |    3 ---
 3 files changed, 1 insertions(+), 35 deletions(-)
---
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 7dc7dca..073ba29 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1000,12 +1000,6 @@ layout_changed_callback (NautilusCanvasContainer *container,
        }
 }
 
-static gboolean
-nautilus_canvas_view_can_rename_file (NautilusFilesView *view, NautilusFile *file)
-{
-       return NAUTILUS_FILES_VIEW_CLASS(nautilus_canvas_view_parent_class)->can_rename_file (view, file);
-}
-
 const GActionEntry canvas_view_entries[] = {
        { "keep-aligned", NULL, NULL, "true", action_keep_aligned },
        { "reversed-order", NULL, NULL, "false", action_reversed_order },
@@ -1899,7 +1893,6 @@ nautilus_canvas_view_class_init (NautilusCanvasViewClass *klass)
        nautilus_files_view_class->add_file = nautilus_canvas_view_add_file;
        nautilus_files_view_class->begin_loading = nautilus_canvas_view_begin_loading;
        nautilus_files_view_class->bump_zoom_level = nautilus_canvas_view_bump_zoom_level;
-       nautilus_files_view_class->can_rename_file = nautilus_canvas_view_can_rename_file;
        nautilus_files_view_class->can_zoom_in = nautilus_canvas_view_can_zoom_in;
        nautilus_files_view_class->can_zoom_out = nautilus_canvas_view_can_zoom_out;
        nautilus_files_view_class->clear = nautilus_canvas_view_clear;
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 4e3f11d..135f844 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -664,22 +664,6 @@ nautilus_files_view_get_view_widget (NautilusView *view)
         return NAUTILUS_FILES_VIEW (view)->details->view_menu_widget;
 }
 
-/**
- * nautilus_files_view_can_rename_file
- *
- * Determine whether a file can be renamed.
- * @file: A NautilusFile
- *
- * Return value: TRUE if @file can be renamed, FALSE otherwise.
- *
- **/
-static gboolean
-nautilus_files_view_can_rename_file (NautilusFilesView *view,
-                                     NautilusFile      *file)
-{
-        return         NAUTILUS_FILES_VIEW_CLASS (G_OBJECT_GET_CLASS (view))->can_rename_file (view, file);
-}
-
 static gboolean
 nautilus_files_view_is_read_only (NautilusFilesView *view)
 {
@@ -4179,13 +4163,6 @@ trash_or_delete_files (GtkWindow         *parent_window,
         g_list_free_full (locations, g_object_unref);
 }
 
-static gboolean
-can_rename_file (NautilusFilesView *view,
-                 NautilusFile      *file)
-{
-        return nautilus_file_can_rename (file);
-}
-
 static void
 open_one_in_new_window (gpointer data,
                         gpointer callback_data)
@@ -6337,7 +6314,7 @@ real_update_actions_state (NautilusFilesView *view)
         } else {
                 g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
                                              selection_count == 1 &&
-                                             nautilus_files_view_can_rename_file (view, selection->data));
+                                             nautilus_file_can_rename (selection->data));
         }
 
         action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
@@ -8037,7 +8014,6 @@ nautilus_files_view_class_init (NautilusFilesViewClass *klass)
 
         klass->get_selected_icon_locations = real_get_selected_icon_locations;
         klass->is_read_only = real_is_read_only;
-        klass->can_rename_file = can_rename_file;
         klass->get_backing_uri = real_get_backing_uri;
         klass->using_manual_layout = real_using_manual_layout;
         klass->get_window = nautilus_files_view_get_window;
diff --git a/src/nautilus-files-view.h b/src/nautilus-files-view.h
index 645ead4..e16fb41 100644
--- a/src/nautilus-files-view.h
+++ b/src/nautilus-files-view.h
@@ -239,9 +239,6 @@ struct NautilusFilesViewClass {
          */
         gboolean (* is_empty)                (NautilusFilesView *view);
 
-        gboolean (* can_rename_file)         (NautilusFilesView *view,
-                                              NautilusFile      *file);
-
         /* convert *point from widget's coordinate system to a coordinate
          * system used for specifying file operation positions, which is view-specific.
          *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]