summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-05 20:54:05 +0200
committerStefano Karapetsas <[email protected]>2012-09-05 20:54:05 +0200
commite97eba684fb1b1bbe2b65624beee2402d2199004 (patch)
treebd24b3498d8f30bf1d07305bf5c80b47a1fdb298
parentbb2f625689b6ffc91ab93eecb4da96a10ecdabdc (diff)
downloadcaja-e97eba684fb1b1bbe2b65624beee2402d2199004.tar.bz2
caja-e97eba684fb1b1bbe2b65624beee2402d2199004.tar.xz
remove old file-limit preference
-rw-r--r--libcaja-private/caja-directory-async.c3
-rw-r--r--libcaja-private/caja-directory.c27
-rw-r--r--libcaja-private/caja-directory.h1
-rw-r--r--src/file-manager/fm-directory-view.c47
-rw-r--r--src/file-manager/fm-directory-view.h9
5 files changed, 1 insertions, 86 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c
index 17e16598..e1a44353 100644
--- a/libcaja-private/caja-directory-async.c
+++ b/libcaja-private/caja-directory-async.c
@@ -2324,8 +2324,7 @@ more_files_callback (GObject *source_object,
g_object_unref (info);
}
- if (caja_directory_file_list_length_reached (directory) ||
- files == NULL)
+ if (files == NULL)
{
directory_load_done (directory, error);
directory_load_state_free (state);
diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c
index faa6a22c..6479b38a 100644
--- a/libcaja-private/caja-directory.c
+++ b/libcaja-private/caja-directory.c
@@ -718,33 +718,6 @@ caja_directory_remove_file (CajaDirectory *directory, CajaFile *file)
}
}
-#define CAJA_DIRECTORY_FILE_LIST_DEFAULT_LIMIT 4000
-
-gboolean
-caja_directory_file_list_length_reached (CajaDirectory *directory)
-{
- static gboolean inited = FALSE;
- static int directory_limit = 0;
-
- if (!inited)
- {
- eel_preferences_add_auto_integer
- ("/apps/caja/preferences/directory_limit",
- &directory_limit);
- inited = TRUE;
- }
- if (directory_limit < 0) /* unlimited */
- {
- return FALSE;
- }
- if (directory_limit == 0) /* dead mateconfd */
- {
- directory_limit = CAJA_DIRECTORY_FILE_LIST_DEFAULT_LIMIT;
- }
-
- return directory->details->confirmed_file_count >= directory_limit;
-}
-
GList *
caja_directory_begin_file_name_change (CajaDirectory *directory,
CajaFile *file)
diff --git a/libcaja-private/caja-directory.h b/libcaja-private/caja-directory.h
index 7dfff85b..8136d08e 100644
--- a/libcaja-private/caja-directory.h
+++ b/libcaja-private/caja-directory.h
@@ -222,7 +222,6 @@ gboolean caja_directory_is_in_trash (CajaDirectory
* Only valid if directory is monitored. Used by the Trash monitor.
*/
gboolean caja_directory_is_not_empty (CajaDirectory *directory);
-gboolean caja_directory_file_list_length_reached (CajaDirectory *directory);
/* Convenience functions for dealing with a list of CajaDirectory objects that each have a ref.
* These are just convenient names for functions that work on lists of GtkObject *.
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 25d46819..d9a42b15 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -2487,51 +2487,6 @@ fm_directory_view_stop_loading (CajaView *caja_view)
fm_directory_view_stop (FM_DIRECTORY_VIEW (caja_view));
}
-static void
-fm_directory_view_file_limit_reached (FMDirectoryView *view)
-{
- g_assert (FM_IS_DIRECTORY_VIEW (view));
-
- EEL_CALL_METHOD (FM_DIRECTORY_VIEW_CLASS, view,
- file_limit_reached, (view));
-}
-
-static void
-real_file_limit_reached (FMDirectoryView *view)
-{
- CajaFile *file;
- GtkDialog *dialog;
- char *directory_name;
- char *message;
-
- g_assert (FM_IS_DIRECTORY_VIEW (view));
-
- file = fm_directory_view_get_directory_as_file (view);
- directory_name = caja_file_get_display_name (file);
-
- /* Note that the number of items actually displayed varies somewhat due
- * to the way files are collected in batches. So you can't assume that
- * no more than the constant limit are displayed.
- */
- message = g_strdup_printf (_("The folder \"%s\" contains more files than "
- "Caja can handle."),
- directory_name);
- g_free (directory_name);
-
- dialog = eel_show_warning_dialog (message,
- _("Some files will not be displayed."),
- fm_directory_view_get_containing_window (view));
- g_free (message);
-}
-
-static void
-check_for_directory_hard_limit (FMDirectoryView *view)
-{
- if (caja_directory_file_list_length_reached (view->details->model)) {
- fm_directory_view_file_limit_reached (view);
- }
-}
-
static gboolean
reveal_selection_idle_callback (gpointer data)
{
@@ -2565,7 +2520,6 @@ done_loading (FMDirectoryView *view,
schedule_update_menus (view);
schedule_update_status (view);
- check_for_directory_hard_limit (view);
reset_update_interval (view);
locations_selected = view->details->pending_locations_selected;
@@ -10945,7 +10899,6 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_TYPE_NONE, 2, CAJA_TYPE_FILE, CAJA_TYPE_DIRECTORY);
klass->accepts_dragged_files = real_accepts_dragged_files;
- klass->file_limit_reached = real_file_limit_reached;
klass->file_still_belongs = real_file_still_belongs;
klass->get_emblem_names_to_exclude = real_get_emblem_names_to_exclude;
klass->get_selected_icon_locations = real_get_selected_icon_locations;
diff --git a/src/file-manager/fm-directory-view.h b/src/file-manager/fm-directory-view.h
index 70718866..91c0164d 100644
--- a/src/file-manager/fm-directory-view.h
+++ b/src/file-manager/fm-directory-view.h
@@ -247,15 +247,6 @@ struct FMDirectoryViewClass
*/
char ** (* get_emblem_names_to_exclude) (FMDirectoryView *view);
- /* file_limit_reached is a function pointer that subclasses may
- * override to control what happens when a directory is loaded
- * that has more files than Caja can handle. The default
- * implmentation puts up a dialog box that is appropriate to
- * display when the user explicitly tried to visit a location that
- * they would think of as a normal directory.
- */
- void (* file_limit_reached) (FMDirectoryView *view);
-
/* supports_properties is a function pointer that subclasses may
* override to control whether the "Show Properties" menu item
* should be enabled for selected items. The default implementation