summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-07-12 14:29:42 +0300
committermonsta <[email protected]>2016-07-12 14:29:42 +0300
commit867e7659adacb350b2fb5c20447affd5ef54db25 (patch)
tree5ce6b893c30067475f176ca829166bfc53135758 /libcaja-private
parenta1a90ed979fe7a93a95742c0ca911f13b68d46b9 (diff)
downloadcaja-867e7659adacb350b2fb5c20447affd5ef54db25.tar.bz2
caja-867e7659adacb350b2fb5c20447affd5ef54db25.tar.xz
libcaja-private: drop some more unused code
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-directory-notify.h6
-rw-r--r--libcaja-private/caja-directory-private.h2
-rw-r--r--libcaja-private/caja-directory.c111
-rw-r--r--libcaja-private/caja-directory.h4
-rw-r--r--libcaja-private/caja-dnd.c46
-rw-r--r--libcaja-private/caja-dnd.h3
-rw-r--r--libcaja-private/caja-file.c17
-rw-r--r--libcaja-private/caja-file.h1
8 files changed, 0 insertions, 190 deletions
diff --git a/libcaja-private/caja-directory-notify.h b/libcaja-private/caja-directory-notify.h
index 63346dab..707ea8d8 100644
--- a/libcaja-private/caja-directory-notify.h
+++ b/libcaja-private/caja-directory-notify.h
@@ -55,12 +55,6 @@ void caja_directory_schedule_metadata_copy (GList *file_pairs);
void caja_directory_schedule_metadata_move (GList *file_pairs);
void caja_directory_schedule_metadata_remove (GList *files);
-/* Deprecated URI versions: to be converted */
-void caja_directory_notify_files_added_by_uri (GList *uris);
-void caja_directory_notify_files_changed_by_uri (GList *uris);
-void caja_directory_notify_files_moved_by_uri (GList *uri_pairs);
-void caja_directory_notify_files_removed_by_uri (GList *uris);
-
void caja_directory_schedule_metadata_copy_by_uri (GList *uri_pairs);
void caja_directory_schedule_metadata_move_by_uri (GList *uri_pairs);
void caja_directory_schedule_metadata_remove_by_uri (GList *uris);
diff --git a/libcaja-private/caja-directory-private.h b/libcaja-private/caja-directory-private.h
index 8f34d553..e83bd037 100644
--- a/libcaja-private/caja-directory-private.h
+++ b/libcaja-private/caja-directory-private.h
@@ -212,8 +212,6 @@ Request caja_directory_set_up_request (CajaFileAttri
/* Interface to the file list. */
CajaFile * caja_directory_find_file_by_name (CajaDirectory *directory,
const char *filename);
-CajaFile * caja_directory_find_file_by_internal_filename (CajaDirectory *directory,
- const char *internal_filename);
void caja_directory_add_file (CajaDirectory *directory,
CajaFile *file);
diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c
index ba8d7d97..fcadc2c8 100644
--- a/libcaja-private/caja-directory.c
+++ b/libcaja-private/caja-directory.c
@@ -749,29 +749,6 @@ caja_directory_find_file_by_name (CajaDirectory *directory,
return node == NULL ? NULL : CAJA_FILE (node->data);
}
-/* "." for the directory-as-file, otherwise the filename */
-CajaFile *
-caja_directory_find_file_by_internal_filename (CajaDirectory *directory,
- const char *internal_filename)
-{
- CajaFile *result;
-
- if (g_strcmp0 (internal_filename, ".") == 0)
- {
- result = caja_directory_get_existing_corresponding_file (directory);
- if (result != NULL)
- {
- caja_file_unref (result);
- }
- }
- else
- {
- result = caja_directory_find_file_by_name (directory, internal_filename);
- }
-
- return result;
-}
-
void
caja_directory_emit_files_added (CajaDirectory *directory,
GList *added_files)
@@ -1053,45 +1030,6 @@ caja_directory_notify_files_added (GList *files)
g_hash_table_destroy (parent_directories);
}
-static void
-g_file_pair_free (GFilePair *pair)
-{
- g_object_unref (pair->to);
- g_object_unref (pair->from);
- g_free (pair);
-}
-
-static GList *
-uri_pairs_to_file_pairs (GList *uri_pairs)
-{
- GList *l, *file_pair_list;
- GFilePair *file_pair;
- URIPair *uri_pair;
-
- file_pair_list = NULL;
-
- for (l = uri_pairs; l != NULL; l = l->next)
- {
- uri_pair = l->data;
- file_pair = g_new (GFilePair, 1);
- file_pair->from = g_file_new_for_uri (uri_pair->from_uri);
- file_pair->to = g_file_new_for_uri (uri_pair->to_uri);
-
- file_pair_list = g_list_prepend (file_pair_list, file_pair);
- }
- return g_list_reverse (file_pair_list);
-}
-
-void
-caja_directory_notify_files_added_by_uri (GList *uris)
-{
- GList *files;
-
- files = caja_file_list_from_uris (uris);
- caja_directory_notify_files_added (files);
- g_list_free_full (files, g_object_unref);
-}
-
void
caja_directory_notify_files_changed (GList *files)
{
@@ -1132,16 +1070,6 @@ caja_directory_notify_files_changed (GList *files)
}
void
-caja_directory_notify_files_changed_by_uri (GList *uris)
-{
- GList *files;
-
- files = caja_file_list_from_uris (uris);
- caja_directory_notify_files_changed (files);
- g_list_free_full (files, g_object_unref);
-}
-
-void
caja_directory_notify_files_removed (GList *files)
{
GHashTable *changed_lists;
@@ -1192,16 +1120,6 @@ caja_directory_notify_files_removed (GList *files)
g_hash_table_destroy (parent_directories);
}
-void
-caja_directory_notify_files_removed_by_uri (GList *uris)
-{
- GList *files;
-
- files = caja_file_list_from_uris (uris);
- caja_directory_notify_files_changed (files);
- g_list_free_full (files, g_object_unref);
-}
-
static void
set_directory_location (CajaDirectory *directory,
GFile *location)
@@ -1486,16 +1404,6 @@ caja_directory_notify_files_moved (GList *file_pairs)
}
void
-caja_directory_notify_files_moved_by_uri (GList *uri_pairs)
-{
- GList *file_pairs;
-
- file_pairs = uri_pairs_to_file_pairs (uri_pairs);
- caja_directory_notify_files_moved (file_pairs);
- g_list_free_full (file_pairs, g_file_pair_free);
-}
-
-void
caja_directory_schedule_position_set (GList *position_setting_list)
{
GList *p;
@@ -1576,25 +1484,6 @@ caja_directory_contains_file (CajaDirectory *directory,
contains_file, (directory, file));
}
-char *
-caja_directory_get_file_uri (CajaDirectory *directory,
- const char *file_name)
-{
- GFile *child;
- char *result;
-
- g_return_val_if_fail (CAJA_IS_DIRECTORY (directory), NULL);
- g_return_val_if_fail (file_name != NULL, NULL);
-
- result = NULL;
-
- child = g_file_get_child (directory->details->location, file_name);
- result = g_file_get_uri (child);
- g_object_unref (child);
-
- return result;
-}
-
void
caja_directory_call_when_ready (CajaDirectory *directory,
CajaFileAttributes file_attributes,
diff --git a/libcaja-private/caja-directory.h b/libcaja-private/caja-directory.h
index 8136d08e..9ee2a7d8 100644
--- a/libcaja-private/caja-directory.h
+++ b/libcaja-private/caja-directory.h
@@ -170,10 +170,6 @@ GFile * caja_directory_get_location (CajaDirectory
gboolean caja_directory_contains_file (CajaDirectory *directory,
CajaFile *file);
-/* Get the uri of the file in the directory, NULL if not found */
-char * caja_directory_get_file_uri (CajaDirectory *directory,
- const char *file_name);
-
/* Get (and ref) a CajaFile object for this directory. */
CajaFile * caja_directory_get_corresponding_file (CajaDirectory *directory);
diff --git a/libcaja-private/caja-dnd.c b/libcaja-private/caja-dnd.c
index af4c44e9..382d1764 100644
--- a/libcaja-private/caja-dnd.c
+++ b/libcaja-private/caja-dnd.c
@@ -121,19 +121,6 @@ caja_drag_destroy_selection_list (GList *list)
g_list_free (list);
}
-char **
-caja_drag_uri_array_from_selection_list (const GList *selection_list)
-{
- GList *uri_list;
- char **uris;
-
- uri_list = caja_drag_uri_list_from_selection_list (selection_list);
- uris = caja_drag_uri_array_from_list (uri_list);
- g_list_free_full (uri_list, g_free);
-
- return uris;
-}
-
GList *
caja_drag_uri_list_from_selection_list (const GList *selection_list)
{
@@ -154,28 +141,6 @@ caja_drag_uri_list_from_selection_list (const GList *selection_list)
return g_list_reverse (uri_list);
}
-char **
-caja_drag_uri_array_from_list (const GList *uri_list)
-{
- const GList *l;
- char **uris;
- int i;
-
- if (uri_list == NULL)
- {
- return NULL;
- }
-
- uris = g_new0 (char *, g_list_length ((GList *) uri_list));
- for (i = 0, l = uri_list; l != NULL; l = l->next)
- {
- uris[i++] = g_strdup ((char *) l->data);
- }
- uris[i] = NULL;
-
- return uris;
-}
-
GList *
caja_drag_uri_list_from_array (const char **uris)
{
@@ -344,17 +309,6 @@ caja_drag_items_local (const char *target_uri_string,
}
gboolean
-caja_drag_items_in_trash (const GList *selection_list)
-{
- /* check if the first item on the list is in trash.
- * FIXME:
- * we should really test each item but that would be slow for large selections
- * and currently dropped items can only be from the same container
- */
- return eel_uri_is_trash (((CajaDragSelectionItem *)selection_list->data)->uri);
-}
-
-gboolean
caja_drag_items_on_desktop (const GList *selection_list)
{
char *uri;
diff --git a/libcaja-private/caja-dnd.h b/libcaja-private/caja-dnd.h
index 85330a02..ae4ee675 100644
--- a/libcaja-private/caja-dnd.h
+++ b/libcaja-private/caja-dnd.h
@@ -148,17 +148,14 @@ CajaDragSelectionItem *caja_drag_selection_item_new (void);
void caja_drag_destroy_selection_list (GList *selection_list);
GList *caja_drag_build_selection_list (GtkSelectionData *data);
-char ** caja_drag_uri_array_from_selection_list (const GList *selection_list);
GList * caja_drag_uri_list_from_selection_list (const GList *selection_list);
-char ** caja_drag_uri_array_from_list (const GList *uri_list);
GList * caja_drag_uri_list_from_array (const char **uris);
gboolean caja_drag_items_local (const char *target_uri,
const GList *selection_list);
gboolean caja_drag_uris_local (const char *target_uri,
const GList *source_uri_list);
-gboolean caja_drag_items_in_trash (const GList *selection_list);
gboolean caja_drag_items_on_desktop (const GList *selection_list);
void caja_drag_default_drop_action_for_icons (GdkDragContext *context,
const char *target_uri,
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 9d915244..811d811f 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -7808,23 +7808,6 @@ caja_file_list_copy (GList *list)
return g_list_copy (caja_file_list_ref (list));
}
-GList *
-caja_file_list_from_uris (GList *uri_list)
-{
- GList *l, *file_list;
- const char *uri;
- GFile *file;
-
- file_list = NULL;
-
- for (l = uri_list; l != NULL; l = l->next) {
- uri = l->data;
- file = g_file_new_for_uri (uri);
- file_list = g_list_prepend (file_list, file);
- }
- return g_list_reverse (file_list);
-}
-
static gboolean
get_attributes_for_default_sort_type (CajaFile *file,
gboolean *is_download,
diff --git a/libcaja-private/caja-file.h b/libcaja-private/caja-file.h
index 8c66afe8..e4a2e9fb 100644
--- a/libcaja-private/caja-file.h
+++ b/libcaja-private/caja-file.h
@@ -472,7 +472,6 @@ GList * caja_file_list_ref (GList
void caja_file_list_unref (GList *file_list);
void caja_file_list_free (GList *file_list);
GList * caja_file_list_copy (GList *file_list);
-GList * caja_file_list_from_uris (GList *uri_list);
GList * caja_file_list_sort_by_display_name (GList *file_list);
void caja_file_list_call_when_ready (GList *file_list,
CajaFileAttributes attributes,