summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-desktop-link-monitor.c64
-rw-r--r--libcaja-private/caja-desktop-link-monitor.h3
-rw-r--r--libcaja-private/caja-entry.c11
-rw-r--r--libcaja-private/caja-entry.h1
-rw-r--r--libcaja-private/caja-file-utilities.c193
-rw-r--r--libcaja-private/caja-file-utilities.h11
-rw-r--r--libcaja-private/caja-file.c29
-rw-r--r--libcaja-private/caja-file.h2
-rw-r--r--libcaja-private/caja-icon-canvas-item.c1
-rw-r--r--libcaja-private/caja-icon-names.h8
-rw-r--r--libcaja-private/caja-mime-actions.c37
-rw-r--r--libcaja-private/caja-mime-actions.h1
-rw-r--r--libcaja-private/caja-trash-monitor.c6
-rw-r--r--libcaja-private/caja-trash-monitor.h2
14 files changed, 0 insertions, 369 deletions
diff --git a/libcaja-private/caja-desktop-link-monitor.c b/libcaja-private/caja-desktop-link-monitor.c
index 5a959d20..05cb7f4a 100644
--- a/libcaja-private/caja-desktop-link-monitor.c
+++ b/libcaja-private/caja-desktop-link-monitor.c
@@ -89,70 +89,6 @@ caja_desktop_link_monitor_get (void)
return the_link_monitor;
}
-static void
-volume_delete_dialog (GtkWidget *parent_view,
- CajaDesktopLink *link)
-{
- GMount *mount;
- char *dialog_str;
- char *display_name;
-
- mount = caja_desktop_link_get_mount (link);
-
- if (mount != NULL)
- {
- display_name = caja_desktop_link_get_display_name (link);
- dialog_str = g_strdup_printf (_("You cannot move the volume \"%s\" to the trash."),
- display_name);
- g_free (display_name);
-
- if (g_mount_can_eject (mount))
- {
- eel_run_simple_dialog
- (parent_view,
- FALSE,
- GTK_MESSAGE_ERROR,
- dialog_str,
- _("If you want to eject the volume, please use \"Eject\" in the "
- "popup menu of the volume."),
- GTK_STOCK_OK, NULL);
- }
- else
- {
- eel_run_simple_dialog
- (parent_view,
- FALSE,
- GTK_MESSAGE_ERROR,
- dialog_str,
- _("If you want to unmount the volume, please use \"Unmount Volume\" in the "
- "popup menu of the volume."),
- GTK_STOCK_OK, NULL);
- }
-
- g_object_unref (mount);
- g_free (dialog_str);
- }
-}
-
-void
-caja_desktop_link_monitor_delete_link (CajaDesktopLinkMonitor *monitor,
- CajaDesktopLink *link,
- GtkWidget *parent_view)
-{
- switch (caja_desktop_link_get_link_type (link))
- {
- case CAJA_DESKTOP_LINK_HOME:
- case CAJA_DESKTOP_LINK_COMPUTER:
- case CAJA_DESKTOP_LINK_TRASH:
- case CAJA_DESKTOP_LINK_NETWORK:
- /* just ignore. We don't allow you to delete these */
- break;
- default:
- volume_delete_dialog (parent_view, link);
- break;
- }
-}
-
static gboolean
volume_file_name_used (CajaDesktopLinkMonitor *monitor,
const char *name)
diff --git a/libcaja-private/caja-desktop-link-monitor.h b/libcaja-private/caja-desktop-link-monitor.h
index e962386e..bcf89c0d 100644
--- a/libcaja-private/caja-desktop-link-monitor.h
+++ b/libcaja-private/caja-desktop-link-monitor.h
@@ -56,9 +56,6 @@ typedef struct
GType caja_desktop_link_monitor_get_type (void);
CajaDesktopLinkMonitor * caja_desktop_link_monitor_get (void);
-void caja_desktop_link_monitor_delete_link (CajaDesktopLinkMonitor *monitor,
- CajaDesktopLink *link,
- GtkWidget *parent_view);
/* Used by caja-desktop-link.c */
char * caja_desktop_link_monitor_make_filename_unique (CajaDesktopLinkMonitor *monitor,
diff --git a/libcaja-private/caja-entry.c b/libcaja-private/caja-entry.c
index a4baa8c8..698954f8 100644
--- a/libcaja-private/caja-entry.c
+++ b/libcaja-private/caja-entry.c
@@ -77,17 +77,6 @@ caja_entry_new (void)
return gtk_widget_new (CAJA_TYPE_ENTRY, NULL);
}
-GtkWidget *
-caja_entry_new_with_max_length (guint16 max)
-{
- GtkWidget *widget;
-
- widget = gtk_widget_new (CAJA_TYPE_ENTRY, NULL);
- gtk_entry_set_max_length (GTK_ENTRY (widget), max);
-
- return widget;
-}
-
static void
caja_entry_finalize (GObject *object)
{
diff --git a/libcaja-private/caja-entry.h b/libcaja-private/caja-entry.h
index afe2204a..3784c097 100644
--- a/libcaja-private/caja-entry.h
+++ b/libcaja-private/caja-entry.h
@@ -63,7 +63,6 @@ extern "C" {
GType caja_entry_get_type (void);
GtkWidget *caja_entry_new (void);
- GtkWidget *caja_entry_new_with_max_length (guint16 max);
void caja_entry_set_text (CajaEntry *entry,
const char *text);
void caja_entry_select_all (CajaEntry *entry);
diff --git a/libcaja-private/caja-file-utilities.c b/libcaja-private/caja-file-utilities.c
index 48cdb68a..41f80c29 100644
--- a/libcaja-private/caja-file-utilities.c
+++ b/libcaja-private/caja-file-utilities.c
@@ -40,20 +40,16 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <unistd.h>
#include <stdlib.h>
-#define CAJA_USER_DIRECTORY_NAME ".config/caja"
#define DEFAULT_CAJA_DIRECTORY_MODE (0755)
#define DESKTOP_DIRECTORY_NAME "Desktop"
-#define LEGACY_DESKTOP_DIRECTORY_NAME ".mate-desktop"
#define DEFAULT_DESKTOP_DIRECTORY_MODE (0755)
static void update_xdg_dir_cache (void);
static void schedule_user_dirs_changed (void);
static void desktop_dir_changed (void);
-static GFile *caja_find_file_insensitive_next (GFile *parent, const gchar *name);
char *
caja_compute_title_for_location (GFile *location)
@@ -588,19 +584,6 @@ caja_get_desktop_directory_uri (void)
}
char *
-caja_get_desktop_directory_uri_no_create (void)
-{
- char *desktop_path;
- char *desktop_uri;
-
- desktop_path = get_desktop_path ();
- desktop_uri = g_filename_to_uri (desktop_path, NULL, NULL);
- g_free (desktop_path);
-
- return desktop_uri;
-}
-
-char *
caja_get_home_directory_uri (void)
{
return g_filename_to_uri (g_get_home_dir (), NULL, NULL);
@@ -649,22 +632,6 @@ caja_get_templates_directory_uri (void)
return uri;
}
-char *
-caja_get_searches_directory (void)
-{
- char *user_dir;
- char *searches_dir;
-
- user_dir = caja_get_user_directory ();
- searches_dir = g_build_filename (user_dir, "searches", NULL);
- g_free (user_dir);
-
- if (!g_file_test (searches_dir, G_FILE_TEST_EXISTS))
- g_mkdir (searches_dir, DEFAULT_CAJA_DIRECTORY_MODE);
-
- return searches_dir;
-}
-
/* These need to be reset to NULL when desktop_is_home_dir changes */
static GFile *desktop_dir = NULL;
static GFile *desktop_dir_dir = NULL;
@@ -800,20 +767,6 @@ caja_is_desktop_directory (GFile *dir)
return g_file_equal (dir, desktop_dir);
}
-
-/**
- * caja_get_gmc_desktop_directory:
- *
- * Get the path for the directory containing the legacy gmc desktop.
- *
- * Return value: the directory path.
- **/
-char *
-caja_get_gmc_desktop_directory (void)
-{
- return g_build_filename (g_get_home_dir (), LEGACY_DESKTOP_DIRECTORY_NAME, NULL);
-}
-
/**
* caja_get_pixmap_directory
*
@@ -929,29 +882,6 @@ caja_ensure_unique_file_name (const char *directory_uri,
return res;
}
-char *
-caja_unique_temporary_file_name (void)
-{
- const char *prefix = "/tmp/caja-temp-file";
- char *file_name;
- int fd;
-
- file_name = g_strdup_printf ("%sXXXXXX", prefix);
-
- fd = g_mkstemp (file_name);
- if (fd == -1)
- {
- g_free (file_name);
- file_name = NULL;
- }
- else
- {
- close (fd);
- }
-
- return file_name;
-}
-
GFile *
caja_find_existing_uri_in_hierarchy (GFile *location)
{
@@ -979,129 +909,6 @@ caja_find_existing_uri_in_hierarchy (GFile *location)
return location;
}
-/**
- * caja_find_file_insensitive
- *
- * Attempt to find a file case-insentively. If the path can be found, the
- * returned file maps directly to it. Otherwise, a file using the
- * originally-cased path is returned. This function performs might perform
- * I/O.
- *
- * Return value: a #GFile to a child specified by @name.
- **/
-GFile *
-caja_find_file_insensitive (GFile *parent, const gchar *name)
-{
- gchar **split_path;
- gchar *component;
- GFile *file, *next;
- gint i;
-
- split_path = g_strsplit (name, G_DIR_SEPARATOR_S, -1);
-
- file = g_object_ref (parent);
-
- for (i = 0; (component = split_path[i]) != NULL; i++)
- {
- if (!(next = caja_find_file_insensitive_next (file,
- component)))
- {
- /* File does not exist */
- g_object_unref (file);
- file = NULL;
- break;
- }
- g_object_unref (file);
- file = next;
- }
- g_strfreev (split_path);
-
- if (file)
- {
- return file;
- }
- return g_file_get_child (parent, name);
-}
-
-static GFile *
-caja_find_file_insensitive_next (GFile *parent, const gchar *name)
-{
- GFileEnumerator *children;
- GFileInfo *info;
- gboolean use_utf8, found;
- char *filename, *case_folded_name, *utf8_collation_key, *ascii_collation_key, *child_key;
- GFile *file;
- const char *child_name, *compare_key;
-
- /* First check the given version */
- file = g_file_get_child (parent, name);
- if (g_file_query_exists (file, NULL))
- {
- return file;
- }
- g_object_unref (file);
-
- ascii_collation_key = g_ascii_strdown (name, -1);
- use_utf8 = g_utf8_validate (name, -1, NULL);
- utf8_collation_key = NULL;
- if (use_utf8)
- {
- case_folded_name = g_utf8_casefold (name, -1);
- utf8_collation_key = g_utf8_collate_key (case_folded_name, -1);
- g_free (case_folded_name);
- }
-
- /* Enumerate and compare insensitive */
- filename = NULL;
- children = g_file_enumerate_children (parent,
- G_FILE_ATTRIBUTE_STANDARD_NAME,
- 0, NULL, NULL);
- if (children != NULL)
- {
- while ((info = g_file_enumerator_next_file (children, NULL, NULL)))
- {
- child_name = g_file_info_get_name (info);
-
- if (use_utf8 && g_utf8_validate (child_name, -1, NULL))
- {
- gchar *case_folded;
-
- case_folded = g_utf8_casefold (child_name, -1);
- child_key = g_utf8_collate_key (case_folded, -1);
- g_free (case_folded);
- compare_key = utf8_collation_key;
- }
- else
- {
- child_key = g_ascii_strdown (child_name, -1);
- compare_key = ascii_collation_key;
- }
-
- found = strcmp (child_key, compare_key) == 0;
- g_free (child_key);
- if (found)
- {
- filename = g_strdup (child_name);
- break;
- }
- }
- g_file_enumerator_close (children, NULL, NULL);
- g_object_unref (children);
- }
-
- g_free (ascii_collation_key);
- g_free (utf8_collation_key);
-
- if (filename)
- {
- file = g_file_get_child (parent, filename);
- g_free (filename);
- return file;
- }
-
- return NULL;
-}
-
gboolean
caja_is_engrampa_installed (void)
{
diff --git a/libcaja-private/caja-file-utilities.h b/libcaja-private/caja-file-utilities.h
index 3dd0e1a3..370cec02 100644
--- a/libcaja-private/caja-file-utilities.h
+++ b/libcaja-private/caja-file-utilities.h
@@ -48,7 +48,6 @@ gboolean caja_is_home_directory (GFile *dir);
gboolean caja_is_home_directory_file (GFile *dir,
const char *filename);
gboolean caja_is_in_system_dir (GFile *location);
-char * caja_get_gmc_desktop_directory (void);
char * caja_get_pixmap_directory (void);
gboolean caja_should_use_templates_directory (void);
@@ -56,14 +55,8 @@ char * caja_get_templates_directory (void);
char * caja_get_templates_directory_uri (void);
void caja_create_templates_directory (void);
-char * caja_get_searches_directory (void);
-
char * caja_compute_title_for_location (GFile *file);
-/* This function returns something that needs to be freed with g_free,
- * is not NULL, but is not garaunteed to exist */
-char * caja_get_desktop_directory_uri_no_create (void);
-
/* A version of mate's mate_pixmap_file that works for the caja prefix.
* Otherwise similar to mate_pixmap_file in that it checks to see if the file
* exists and returns NULL if it doesn't.
@@ -90,13 +83,9 @@ void caja_uninhibit_power_manager (int cookie);
char * caja_ensure_unique_file_name (const char *directory_uri,
const char *base_name,
const char *extension);
-char * caja_unique_temporary_file_name (void);
GFile * caja_find_existing_uri_in_hierarchy (GFile *location);
-GFile *
-caja_find_file_insensitive (GFile *parent, const gchar *name);
-
char * caja_get_accel_map_file (void);
GHashTable * caja_trashed_files_get_original_directories (GList *files,
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 811d811f..93a4d17c 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -4941,35 +4941,6 @@ caja_file_recompute_deep_counts (CajaFile *file)
}
}
-
-/**
- * caja_file_get_directory_item_mime_types
- *
- * Get the list of mime-types present in a directory.
- * @file: CajaFile representing a directory. It is an error to
- * call this function on a file that is not a directory.
- * @mime_list: Place to put the list of mime-types.
- *
- * Returns: TRUE if mime-type list is available.
- *
- **/
-gboolean
-caja_file_get_directory_item_mime_types (CajaFile *file,
- GList **mime_list)
-{
- g_return_val_if_fail (CAJA_IS_FILE (file), FALSE);
- g_return_val_if_fail (mime_list != NULL, FALSE);
-
- if (!caja_file_is_directory (file)
- || !file->details->got_mime_list) {
- *mime_list = NULL;
- return FALSE;
- }
-
- *mime_list = eel_g_str_list_copy (file->details->mime_list);
- return TRUE;
-}
-
gboolean
caja_file_can_get_size (CajaFile *file)
{
diff --git a/libcaja-private/caja-file.h b/libcaja-private/caja-file.h
index e4a2e9fb..5aba9726 100644
--- a/libcaja-private/caja-file.h
+++ b/libcaja-private/caja-file.h
@@ -226,8 +226,6 @@ char * caja_file_get_top_left_text (CajaFile
char * caja_file_peek_top_left_text (CajaFile *file,
gboolean need_large_text,
gboolean *got_top_left_text);
-gboolean caja_file_get_directory_item_mime_types (CajaFile *file,
- GList **mime_list);
void caja_file_set_attributes (CajaFile *file,
GFileInfo *attributes,
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index 21da113f..dbe6a7ff 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -43,7 +43,6 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib/gi18n.h>
-#include <eel/eel-canvas-util.h>
#include <atk/atkimage.h>
#include <atk/atkcomponent.h>
#include <atk/atknoopobject.h>
diff --git a/libcaja-private/caja-icon-names.h b/libcaja-private/caja-icon-names.h
index 20aee326..b4a7278f 100644
--- a/libcaja-private/caja-icon-names.h
+++ b/libcaja-private/caja-icon-names.h
@@ -15,11 +15,6 @@
#define CAJA_ICON_TRASH_FULL "user-trash-full"
#define CAJA_ICON_DELETE "edit-delete"
-/* Icons for emblems */
-#define CAJA_ICON_EMBLEM_READONLY "emblem-readonly"
-#define CAJA_ICON_EMBLEM_UNREADABLE "emblem-unreadable"
-#define CAJA_ICON_EMBLEM_SYMLINK "emblem-symbolic-link"
-
#define CAJA_ICON_FOLDER_DESKTOP "user-desktop"
#define CAJA_ICON_FOLDER_DOCUMENTS "folder-documents"
#define CAJA_ICON_FOLDER_DOWNLOAD "folder-download"
@@ -32,8 +27,5 @@
/* Other icons */
#define CAJA_ICON_TEMPLATE "text-x-generic-template"
-/* Icons not provided by fd.o naming spec or caja itself */
-#define CAJA_ICON_BURN "caja-cd-burner"
-
#endif /* CAJA_ICON_NAMES_H */
diff --git a/libcaja-private/caja-mime-actions.c b/libcaja-private/caja-mime-actions.c
index 2a303f72..46e3bdc3 100644
--- a/libcaja-private/caja-mime-actions.c
+++ b/libcaja-private/caja-mime-actions.c
@@ -676,43 +676,6 @@ caja_mime_get_applications_for_files (GList *files)
return ret;
}
-gboolean
-caja_mime_has_any_applications_for_files (GList *files)
-{
- GList *l, *sorted_files;
- CajaFile *file;
- gboolean ret;
-
- g_assert (files != NULL);
-
- sorted_files = g_list_sort (g_list_copy (files), (GCompareFunc) file_compare_by_mime_type);
-
- ret = TRUE;
- for (l = sorted_files; l != NULL; l = l->next)
- {
- file = CAJA_FILE (l->data);
-
- if (l->prev &&
- file_compare_by_mime_type (file, l->prev->data) == 0 &&
- file_compare_by_parent_uri (file, l->prev->data) == 0)
- {
- continue;
- }
-
- if (!caja_mime_has_any_applications_for_file (file))
- {
- ret = FALSE;
- break;
- }
- }
-
- g_list_free (sorted_files);
-
- return ret;
-}
-
-
-
static void
trash_or_delete_files (GtkWindow *parent_window,
const GList *files,
diff --git a/libcaja-private/caja-mime-actions.h b/libcaja-private/caja-mime-actions.h
index 863491b8..3a8ba638 100644
--- a/libcaja-private/caja-mime-actions.h
+++ b/libcaja-private/caja-mime-actions.h
@@ -40,7 +40,6 @@ GAppInfo * caja_mime_get_default_application_for_files (GList
GList * caja_mime_get_applications_for_files (GList *file);
gboolean caja_mime_has_any_applications_for_file (CajaFile *file);
-gboolean caja_mime_has_any_applications_for_files (GList *files);
gboolean caja_mime_file_opens_in_view (CajaFile *file);
gboolean caja_mime_file_opens_in_external_app (CajaFile *file);
diff --git a/libcaja-private/caja-trash-monitor.c b/libcaja-private/caja-trash-monitor.c
index b7c3b8b7..2e6aeb78 100644
--- a/libcaja-private/caja-trash-monitor.c
+++ b/libcaja-private/caja-trash-monitor.c
@@ -242,9 +242,3 @@ caja_trash_monitor_get_icon (void)
}
return NULL;
}
-
-void
-caja_trash_monitor_add_new_trash_directories (void)
-{
- /* We trashed something... */
-}
diff --git a/libcaja-private/caja-trash-monitor.h b/libcaja-private/caja-trash-monitor.h
index e420d064..c3aa7c9a 100644
--- a/libcaja-private/caja-trash-monitor.h
+++ b/libcaja-private/caja-trash-monitor.h
@@ -65,6 +65,4 @@ CajaTrashMonitor *caja_trash_monitor_get (void);
gboolean caja_trash_monitor_is_empty (void);
GIcon *caja_trash_monitor_get_icon (void);
-void caja_trash_monitor_add_new_trash_directories (void);
-
#endif