diff options
author | Stefano Karapetsas <[email protected]> | 2012-09-05 12:36:04 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-09-05 12:36:04 +0200 |
commit | 6f15dc7cc1be8b98bbc1f5edd963ff89076295ee (patch) | |
tree | 04a0b2971e10ce57880360f63147b2d137b84b2a /libcaja-private | |
parent | 373da58a33a4242f3d91771fd304ba8bb3d55e61 (diff) | |
download | caja-6f15dc7cc1be8b98bbc1f5edd963ff89076295ee.tar.bz2 caja-6f15dc7cc1be8b98bbc1f5edd963ff89076295ee.tar.xz |
start migration to gsettings
Diffstat (limited to 'libcaja-private')
25 files changed, 669 insertions, 322 deletions
diff --git a/libcaja-private/Makefile.am b/libcaja-private/Makefile.am index 7749f200..93d67834 100644 --- a/libcaja-private/Makefile.am +++ b/libcaja-private/Makefile.am @@ -214,26 +214,17 @@ caja-marshal-guts.c: caja-marshal.list $(GLIB_GENMARSHAL) $(libcaja_private_la_OBJECTS): $(marshal_sources) +gsettingsschema_in_files = org.mate.caja.gschema.xml.in org.mate.media-handling.gschema.xml.in +gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) +.PRECIOUS: $(gsettings_SCHEMAS) -schema_in_files = apps_caja_preferences.schemas.in -schemadir = $(MATECONF_SCHEMA_FILE_DIR) -schema_DATA = $(schema_in_files:.schemas.in=.schemas) +@INTLTOOL_XML_NOMERGE_RULE@ -@INTLTOOL_SCHEMAS_RULE@ - -# don't do this if we are building in eg. rpm -if MATECONF_SCHEMAS_INSTALL -install-data-local: - if test -z "$(DESTDIR)" ; then \ - for p in $(schema_DATA) ; do \ - MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $$p; \ - done \ - fi -endif +@GSETTINGS_RULES@ EXTRA_DIST = \ caja-marshal.list \ - $(schema_in_files) \ + $(gsettingsschema_in_files) \ $(BEAGLE_SOURCES) \ $(TRACKER_SOURCES) \ $(NULL) @@ -241,6 +232,7 @@ EXTRA_DIST = \ CLEANFILES = \ $(marshal_sources) \ $(schema_DATA) \ + $(gsettings_SCHEMAS) \ $(NULL) dist-hook: diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index 78340c5e..cf801b08 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -83,9 +83,9 @@ caja_autorun_get_preferences (const char *x_content_type, *pref_start_app = FALSE; *pref_ignore = FALSE; *pref_open_folder = FALSE; - x_content_start_app = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP); - x_content_ignore = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE); - x_content_open_folder = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER); + x_content_start_app = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP); + x_content_ignore = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE); + x_content_open_folder = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER); if (x_content_start_app != NULL) { *pref_start_app = eel_g_strv_find (x_content_start_app, x_content_type) != -1; @@ -156,30 +156,30 @@ caja_autorun_set_preferences (const char *x_content_type, g_assert (x_content_type != NULL); - x_content_start_app = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP); - x_content_ignore = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE); - x_content_open_folder = eel_preferences_get_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER); + x_content_start_app = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP); + x_content_ignore = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE); + x_content_open_folder = g_settings_get_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER); remove_elem_from_str_array (x_content_start_app, x_content_type); if (pref_start_app) { x_content_start_app = add_elem_to_str_array (x_content_start_app, x_content_type); } - eel_preferences_set_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP, x_content_start_app); + g_settings_set_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP, (const gchar * const*) x_content_start_app); remove_elem_from_str_array (x_content_ignore, x_content_type); if (pref_ignore) { x_content_ignore = add_elem_to_str_array (x_content_ignore, x_content_type); } - eel_preferences_set_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE, x_content_ignore); + g_settings_set_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE, (const gchar * const*) x_content_ignore); remove_elem_from_str_array (x_content_open_folder, x_content_type); if (pref_open_folder) { x_content_open_folder = add_elem_to_str_array (x_content_open_folder, x_content_type); } - eel_preferences_set_string_array (CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER, x_content_open_folder); + g_settings_set_strv (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER, (const gchar * const*) x_content_open_folder); g_strfreev (x_content_open_folder); g_strfreev (x_content_ignore); @@ -1217,7 +1217,7 @@ autorun_guessed_content_type_callback (GObject *source_object, } else { - if (eel_preferences_get_boolean (CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN)) + if (g_settings_get_boolean (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN)) open_folder = TRUE; } } @@ -1238,7 +1238,7 @@ caja_autorun (GMount *mount, CajaAutorunOpenWindow open_window_func, gpointer us AutorunData *data; if (!should_autorun_mount (mount) || - eel_preferences_get_boolean (CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER)) + g_settings_get_boolean (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER)) { return; } diff --git a/libcaja-private/caja-desktop-directory-file.c b/libcaja-private/caja-desktop-directory-file.c index 0adf239f..8cddf779 100644 --- a/libcaja-private/caja-desktop-directory-file.c +++ b/libcaja-private/caja-desktop-directory-file.c @@ -174,7 +174,7 @@ desktop_directory_file_monitor_add (CajaFile *file, /* Do the rest ourself */ caja_directory_monitor_add_internal (file->details->directory, file, - client, TRUE, TRUE, + client, TRUE, monitor->non_delegated_attributes, NULL, NULL); } diff --git a/libcaja-private/caja-desktop-directory.c b/libcaja-private/caja-desktop-directory.c index 1b334f1f..bb03f06a 100644 --- a/libcaja-private/caja-desktop-directory.c +++ b/libcaja-private/caja-desktop-directory.c @@ -62,7 +62,6 @@ typedef struct CajaDesktopDirectory *desktop_dir; gboolean monitor_hidden_files; - gboolean monitor_backup_files; CajaFileAttributes monitor_attributes; } MergedMonitor; @@ -296,7 +295,6 @@ static void desktop_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -323,7 +321,6 @@ desktop_monitor_add (CajaDirectory *directory, (gpointer) client, monitor); } monitor->monitor_hidden_files = monitor_hidden_files; - monitor->monitor_backup_files = monitor_backup_files; monitor->monitor_attributes = file_attributes; /* Call through to the real directory add calls. */ @@ -332,7 +329,7 @@ desktop_monitor_add (CajaDirectory *directory, /* Call up to real dir */ caja_directory_file_monitor_add (desktop->details->real_directory, monitor, - monitor_hidden_files, monitor_backup_files, + monitor_hidden_files, file_attributes, build_merged_callback_list, &merged_callback_list); @@ -442,9 +439,9 @@ desktop_finalize (GObject *object) g_hash_table_destroy (desktop->details->monitors); g_free (desktop->details); - eel_preferences_remove_callback (CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, - desktop_directory_changed_callback, - desktop); + g_signal_handlers_disconnect_by_func (caja_preferences, + desktop_directory_changed_callback, + desktop); G_OBJECT_CLASS (caja_desktop_directory_parent_class)->finalize (object); } @@ -529,9 +526,9 @@ caja_desktop_directory_init (CajaDesktopDirectory *desktop) update_desktop_directory (CAJA_DESKTOP_DIRECTORY (desktop)); - eel_preferences_add_callback (CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, - desktop_directory_changed_callback, - desktop); + g_signal_connect_swapped (caja_preferences, "changed::" CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, + G_CALLBACK(desktop_directory_changed_callback), + desktop); } static void diff --git a/libcaja-private/caja-desktop-icon-file.c b/libcaja-private/caja-desktop-icon-file.c index fa5ad094..7e24f6dc 100644 --- a/libcaja-private/caja-desktop-icon-file.c +++ b/libcaja-private/caja-desktop-icon-file.c @@ -54,7 +54,7 @@ desktop_icon_file_monitor_add (CajaFile *file, { caja_directory_monitor_add_internal (file->details->directory, file, - client, TRUE, TRUE, attributes, NULL, NULL); + client, TRUE, attributes, NULL, NULL); } static void diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index 3baa3f75..17e16598 100644 --- a/libcaja-private/caja-directory-async.c +++ b/libcaja-private/caja-directory-async.c @@ -172,7 +172,6 @@ typedef struct { CajaFile *file; /* Which file, NULL means all. */ gboolean monitor_hidden_files; /* defines whether "all" includes hidden files */ - gboolean monitor_backup_files; /* defines whether "all" includes backup files */ gconstpointer client; Request request; } Monitor; @@ -809,7 +808,6 @@ caja_directory_monitor_add_internal (CajaDirectory *directory, CajaFile *file, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -826,7 +824,6 @@ caja_directory_monitor_add_internal (CajaDirectory *directory, monitor = g_new (Monitor, 1); monitor->file = file; monitor->monitor_hidden_files = monitor_hidden_files; - monitor->monitor_backup_files = monitor_backup_files; monitor->client = client; monitor->request = caja_directory_set_up_request (file_attributes); @@ -906,52 +903,34 @@ set_file_unconfirmed (CajaFile *file, gboolean unconfirmed) } static gboolean show_hidden_files = TRUE; -static gboolean show_backup_files = TRUE; static void show_hidden_files_changed_callback (gpointer callback_data) { - show_hidden_files = eel_preferences_get_boolean (CAJA_PREFERENCES_SHOW_HIDDEN_FILES); -} - -static void -show_backup_files_changed_callback (gpointer callback_data) -{ - show_backup_files = eel_preferences_get_boolean (CAJA_PREFERENCES_SHOW_BACKUP_FILES); + show_hidden_files = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_HIDDEN_FILES); } static gboolean should_skip_file (CajaDirectory *directory, GFileInfo *info) { static gboolean show_hidden_files_changed_callback_installed = FALSE; - static gboolean show_backup_files_changed_callback_installed = FALSE; /* Add the callback once for the life of our process */ if (!show_hidden_files_changed_callback_installed) { - eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_HIDDEN_FILES, - show_hidden_files_changed_callback, - NULL); + g_signal_connect_swapped (caja_preferences, + "changed::" CAJA_PREFERENCES_SHOW_HIDDEN_FILES, + G_CALLBACK(show_hidden_files_changed_callback), + NULL); show_hidden_files_changed_callback_installed = TRUE; /* Peek for the first time */ show_hidden_files_changed_callback (NULL); } - /* Add the callback once for the life of our process */ - if (!show_backup_files_changed_callback_installed) - { - eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_BACKUP_FILES, - show_backup_files_changed_callback, - NULL); - show_backup_files_changed_callback_installed = TRUE; - - /* Peek for the first time */ - show_backup_files_changed_callback (NULL); - } - if (!show_hidden_files && (g_file_info_get_is_hidden (info) || + g_file_info_get_is_backup (info) || (directory != NULL && directory->details->hidden_file_hash != NULL && g_hash_table_lookup (directory->details->hidden_file_hash, g_file_info_get_name (info)) != NULL))) @@ -959,11 +938,6 @@ should_skip_file (CajaDirectory *directory, GFileInfo *info) return TRUE; } - if (!show_backup_files && g_file_info_get_is_backup (info)) - { - return TRUE; - } - return FALSE; } @@ -2607,7 +2581,6 @@ monitor_includes_file (const Monitor *monitor, } return caja_file_should_show (file, monitor->monitor_hidden_files, - monitor->monitor_backup_files, TRUE); } diff --git a/libcaja-private/caja-directory-background.c b/libcaja-private/caja-directory-background.c index 69c792d6..38927b24 100644 --- a/libcaja-private/caja-directory-background.c +++ b/libcaja-private/caja-directory-background.c @@ -48,7 +48,9 @@ static void saved_settings_changed_callback (CajaFile *file, static void caja_file_background_receive_mateconf_changes (EelBackground *background); -static void caja_file_background_theme_changed (gpointer user_data); +static void caja_file_background_theme_changed (GSettings *settings, + const gchar *key, + gpointer user_data); void caja_connect_desktop_background_to_file_metadata (CajaIconContainer *icon_container, @@ -80,17 +82,16 @@ caja_file_background_get_default_settings (char **color, { gboolean background_set; - background_set = eel_preferences_get_boolean - (CAJA_PREFERENCES_BACKGROUND_SET); + background_set = g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_BACKGROUND_SET); if (background_set && color) { - *color = eel_preferences_get (CAJA_PREFERENCES_BACKGROUND_COLOR); + *color = g_settings_get_string (caja_preferences, CAJA_PREFERENCES_BACKGROUND_COLOR); } if (background_set && image) { - *image = eel_preferences_get (CAJA_PREFERENCES_BACKGROUND_FILENAME); + *image = g_settings_get_string (caja_preferences, CAJA_PREFERENCES_BACKGROUND_URI); } if (placement) @@ -449,12 +450,17 @@ background_changed_callback (EelBackground *background, NULL, NULL); - eel_preferences_set - (CAJA_PREFERENCES_BACKGROUND_COLOR, color ? color : ""); - eel_preferences_set - (CAJA_PREFERENCES_BACKGROUND_FILENAME, image ? image : ""); - eel_preferences_set_boolean - (CAJA_PREFERENCES_BACKGROUND_SET, TRUE); + g_signal_handlers_block_by_func (caja_preferences, G_CALLBACK (caja_file_background_theme_changed), background); + + g_settings_set_string (caja_preferences, + CAJA_PREFERENCES_BACKGROUND_COLOR, color ? color : ""); + g_settings_set_string (caja_preferences, + CAJA_PREFERENCES_BACKGROUND_URI, + image ? image : ""); + g_settings_set_boolean (caja_preferences, + CAJA_PREFERENCES_BACKGROUND_SET, TRUE); + + g_signal_handlers_unblock_by_func (caja_preferences, G_CALLBACK (caja_file_background_theme_changed), background); } else { @@ -545,7 +551,9 @@ saved_settings_changed_callback (CajaFile *file, /* handle the theme changing */ static void -caja_file_background_theme_changed (gpointer user_data) +caja_file_background_theme_changed (GSettings *settings, + const gchar *key, + gpointer user_data) { CajaFile *file; EelBackground *background; @@ -588,8 +596,11 @@ background_reset_callback (EelBackground *background, NULL); if (!color && !image) { - eel_preferences_set_boolean (CAJA_PREFERENCES_BACKGROUND_SET, - FALSE); + g_signal_handlers_block_by_func (caja_preferences, G_CALLBACK (caja_file_background_theme_changed), background); + g_settings_set_boolean (caja_preferences, + CAJA_PREFERENCES_BACKGROUND_SET, + FALSE); + g_signal_handlers_unblock_by_func (caja_preferences, G_CALLBACK (caja_file_background_theme_changed), background); } else { @@ -626,18 +637,9 @@ background_destroyed_callback (EelBackground *background, (file, G_CALLBACK (saved_settings_changed_callback), background); caja_file_monitor_remove (file, background); - eel_preferences_remove_callback (CAJA_PREFERENCES_THEME, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_SET, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_COLOR, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_FILENAME, - caja_file_background_theme_changed, - background); + g_signal_handlers_disconnect_by_func (caja_preferences, + caja_file_background_theme_changed, + background); } /* key routine that hooks up a background and location */ @@ -676,18 +678,9 @@ caja_connect_background_to_file_metadata (GtkWidget *widget, (old_file, G_CALLBACK (saved_settings_changed_callback), background); caja_file_monitor_remove (old_file, background); - eel_preferences_remove_callback (CAJA_PREFERENCES_THEME, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_SET, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_COLOR, - caja_file_background_theme_changed, - background); - eel_preferences_remove_callback (CAJA_PREFERENCES_BACKGROUND_FILENAME, - caja_file_background_theme_changed, - background); + g_signal_handlers_disconnect_by_func (caja_preferences, + caja_file_background_theme_changed, + background); } @@ -716,14 +709,18 @@ caja_connect_background_to_file_metadata (GtkWidget *widget, CAJA_FILE_ATTRIBUTE_INFO); /* arrange for notification when the theme changes */ - eel_preferences_add_callback (CAJA_PREFERENCES_THEME, - caja_file_background_theme_changed, background); - eel_preferences_add_callback (CAJA_PREFERENCES_BACKGROUND_SET, - caja_file_background_theme_changed, background); - eel_preferences_add_callback (CAJA_PREFERENCES_BACKGROUND_COLOR, - caja_file_background_theme_changed, background); - eel_preferences_add_callback (CAJA_PREFERENCES_BACKGROUND_FILENAME, - caja_file_background_theme_changed, background); + g_signal_connect (caja_preferences, + "changed::" CAJA_PREFERENCES_BACKGROUND_SET, + G_CALLBACK(caja_file_background_theme_changed), + background); + g_signal_connect (caja_preferences, + "changed::" CAJA_PREFERENCES_BACKGROUND_COLOR, + G_CALLBACK(caja_file_background_theme_changed), + background); + g_signal_connect (caja_preferences, + "changed::" CAJA_PREFERENCES_BACKGROUND_URI, + G_CALLBACK(caja_file_background_theme_changed), + background); } /* Update the background based on the file metadata. */ diff --git a/libcaja-private/caja-directory-private.h b/libcaja-private/caja-directory-private.h index e5c2d201..8f34d553 100644 --- a/libcaja-private/caja-directory-private.h +++ b/libcaja-private/caja-directory-private.h @@ -166,7 +166,6 @@ void caja_directory_monitor_add_internal (CajaDirectory CajaFile *file, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes attributes, CajaDirectoryCallback callback, gpointer callback_data); diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c index fb047567..a3bc7fc0 100644 --- a/libcaja-private/caja-directory.c +++ b/libcaja-private/caja-directory.c @@ -327,12 +327,10 @@ add_preferences_callbacks (void) { caja_global_preferences_init (); - eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_HIDDEN_FILES, - filtering_changed_callback, - NULL); - eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_BACKUP_FILES, - filtering_changed_callback, - NULL); + g_signal_connect_swapped (caja_preferences, + "changed::" CAJA_PREFERENCES_SHOW_HIDDEN_FILES, + G_CALLBACK(filtering_changed_callback), + NULL); eel_preferences_add_callback (CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS, async_data_preference_changed_callback, NULL); @@ -1659,7 +1657,6 @@ void caja_directory_file_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -1671,7 +1668,6 @@ caja_directory_file_monitor_add (CajaDirectory *directory, (CAJA_DIRECTORY_CLASS, directory, file_monitor_add, (directory, client, monitor_hidden_files, - monitor_backup_files, file_attributes, callback, callback_data)); } @@ -1926,7 +1922,7 @@ caja_self_check_directory (void) caja_directory_file_monitor_add (directory, &data_dummy, - TRUE, TRUE, 0, NULL, NULL); + TRUE, 0, NULL, NULL); /* FIXME: these need to be updated to the new metadata infrastructure * as make check doesn't pass. diff --git a/libcaja-private/caja-directory.h b/libcaja-private/caja-directory.h index 5beda869..7dfff85b 100644 --- a/libcaja-private/caja-directory.h +++ b/libcaja-private/caja-directory.h @@ -118,7 +118,6 @@ typedef struct void (* file_monitor_add) (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes monitor_attributes, CajaDirectoryCallback initial_files_callback, gpointer callback_data); @@ -195,7 +194,6 @@ void caja_directory_cancel_callback (CajaDirectory void caja_directory_file_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes attributes, CajaDirectoryCallback initial_files_callback, gpointer callback_data); diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index 6fc9ba8c..f89e00cc 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -70,8 +70,6 @@ #include "caja-file-conflict-dialog.h" #include "caja-undostack-manager.h" -static gboolean confirm_trash_auto_value; - /* TODO: TESTING!!! */ typedef struct { @@ -1018,17 +1016,6 @@ should_skip_readdir_error (CommonJob *common, return FALSE; } -static void -setup_autos (void) -{ - static gboolean setup_autos = FALSE; - if (!setup_autos) { - setup_autos = TRUE; - eel_preferences_add_auto_boolean (CAJA_PREFERENCES_CONFIRM_TRASH, - &confirm_trash_auto_value); - } -} - static gboolean can_delete_without_confirm (GFile *file) { @@ -1285,6 +1272,19 @@ abort_job (CommonJob *job) } +/* Since this happens on a thread we can't use the global prefs object */ +static gboolean +should_confirm_trash (void) +{ + GSettings *prefs; + gboolean confirm_trash; + + prefs = g_settings_new ("org.mate.caja.preferences"); + confirm_trash = g_settings_get_boolean (prefs, CAJA_PREFERENCES_CONFIRM_TRASH); + g_object_unref (prefs); + return confirm_trash; +} + static gboolean job_aborted (CommonJob *job) { @@ -1300,7 +1300,7 @@ confirm_delete_from_trash (CommonJob *job, int response; /* Just Say Yes if the preference says not to confirm. */ - if (!confirm_trash_auto_value) { + if (!should_confirm_trash ()) { return TRUE; } @@ -1337,7 +1337,7 @@ confirm_empty_trash (CommonJob *job) int response; /* Just Say Yes if the preference says not to confirm. */ - if (!confirm_trash_auto_value) { + if (!should_confirm_trash ()) { return TRUE; } @@ -1363,7 +1363,7 @@ confirm_delete_directly (CommonJob *job, int response; /* Just Say Yes if the preference says not to confirm. */ - if (!confirm_trash_auto_value) { + if (!should_confirm_trash ()) { return TRUE; } @@ -1964,8 +1964,6 @@ trash_or_delete_internal (GList *files, { DeleteJob *job; - setup_autos (); - /* TODO: special case desktop icon link files ... */ job = op_job_new (DeleteJob, parent_window); @@ -6310,8 +6308,6 @@ caja_file_operations_empty_trash (GtkWidget *parent_view) parent_window = (GtkWindow *)gtk_widget_get_ancestor (parent_view, GTK_TYPE_WINDOW); } - setup_autos (); - job = op_job_new (EmptyTrashJob, parent_window); job->trash_dirs = g_list_prepend (job->trash_dirs, g_file_new_for_uri ("trash:")); diff --git a/libcaja-private/caja-file-private.h b/libcaja-private/caja-file-private.h index 2c0c76c1..7e973e41 100644 --- a/libcaja-private/caja-file-private.h +++ b/libcaja-private/caja-file-private.h @@ -206,7 +206,6 @@ struct CajaFileDetails eel_boolean_bit is_symlink : 1; eel_boolean_bit is_mountpoint : 1; eel_boolean_bit is_hidden : 1; - eel_boolean_bit is_backup : 1; eel_boolean_bit has_permissions : 1; diff --git a/libcaja-private/caja-file-utilities.c b/libcaja-private/caja-file-utilities.c index 0748364a..7b0647a8 100644 --- a/libcaja-private/caja-file-utilities.c +++ b/libcaja-private/caja-file-utilities.c @@ -510,7 +510,7 @@ caja_get_xdg_dir (const char *type) static char * get_desktop_path (void) { - if (eel_preferences_get_boolean (CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR)) + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR)) { return g_strdup (g_get_home_dir()); } @@ -535,7 +535,7 @@ caja_get_desktop_directory (void) desktop_directory = get_desktop_path (); /* Don't try to create a home directory */ - if (!eel_preferences_get_boolean (CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR)) + if (!g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR)) { if (!g_file_test (desktop_directory, G_FILE_TEST_EXISTS)) { @@ -765,9 +765,9 @@ caja_is_desktop_directory_file (GFile *dir, if (!desktop_dir_changed_callback_installed) { - eel_preferences_add_callback (CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, - desktop_dir_changed_callback, - NULL); + g_signal_connect_swapped (caja_preferences, "changed::" CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, + G_CALLBACK(desktop_dir_changed_callback), + NULL); desktop_dir_changed_callback_installed = TRUE; } diff --git a/libcaja-private/caja-file-utilities.h b/libcaja-private/caja-file-utilities.h index 81600ef8..3dd0e1a3 100644 --- a/libcaja-private/caja-file-utilities.h +++ b/libcaja-private/caja-file-utilities.h @@ -31,10 +31,6 @@ #define CAJA_SAVED_SEARCH_EXTENSION ".savedSearch" #define CAJA_SAVED_SEARCH_MIMETYPE "application/x-mate-saved-search" -/* Recognizing special file names. */ -gboolean caja_file_name_matches_hidden_pattern (const char *name_or_relative_uri); -gboolean caja_file_name_matches_backup_pattern (const char *name_or_relative_uri); - /* These functions all return something something that needs to be * freed with g_free, is not NULL, and is guaranteed to exist. */ diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c index 839940fa..65bbaa38 100644 --- a/libcaja-private/caja-file.c +++ b/libcaja-private/caja-file.c @@ -99,7 +99,6 @@ typedef enum { SHOW_HIDDEN = 1 << 0, - SHOW_BACKUP = 1 << 1 } FilterOptions; typedef void (* ModifyListFunction) (GList **list, CajaFile *file); @@ -444,7 +443,6 @@ caja_file_clear_info (CajaFile *file) file->details->is_trusted_link = FALSE; file->details->is_symlink = FALSE; file->details->is_hidden = FALSE; - file->details->is_backup = FALSE; file->details->is_mountpoint = FALSE; file->details->uid = -1; file->details->gid = -1; @@ -2087,7 +2085,7 @@ update_info_internal (CajaFile *file, { GList *node; gboolean changed; - gboolean is_symlink, is_hidden, is_backup, is_mountpoint; + gboolean is_symlink, is_hidden, is_mountpoint; gboolean has_permissions; guint32 permissions; gboolean can_read, can_write, can_execute, can_delete, can_trash, can_rename, can_mount, can_unmount, can_eject; @@ -2177,18 +2175,12 @@ update_info_internal (CajaFile *file, } file->details->is_symlink = is_symlink; - is_hidden = g_file_info_get_is_hidden (info); + is_hidden = g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info); if (file->details->is_hidden != is_hidden) { changed = TRUE; } file->details->is_hidden = is_hidden; - is_backup = g_file_info_get_is_backup (info); - if (file->details->is_backup != is_backup) { - changed = TRUE; - } - file->details->is_backup = is_backup; - is_mountpoint = g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT); if (file->details->is_mountpoint != is_mountpoint) { changed = TRUE; @@ -3397,12 +3389,6 @@ caja_file_is_hidden_file (CajaFile *file) return file->details->is_hidden; } -gboolean -caja_file_is_backup_file (CajaFile *file) -{ - return file->details->is_backup; -} - static gboolean is_file_hidden (CajaFile *file) { @@ -3416,7 +3402,6 @@ is_file_hidden (CajaFile *file) * caja_file_should_show: * @file: the file to check. * @show_hidden: whether we want to show hidden files or not. - * @show_backup: whether we want to show backup files or not. * * Determines if a #CajaFile should be shown. Note that when browsing * a trash directory, this function will always return %TRUE. @@ -3426,7 +3411,6 @@ is_file_hidden (CajaFile *file) gboolean caja_file_should_show (CajaFile *file, gboolean show_hidden, - gboolean show_backup, gboolean show_foreign) { /* Never hide any files in trash. */ @@ -3434,7 +3418,6 @@ caja_file_should_show (CajaFile *file, return TRUE; } else { return (show_hidden || (!caja_file_is_hidden_file (file) && !is_file_hidden (file))) && - (show_backup || !caja_file_is_backup_file (file)) && (show_foreign || !(caja_file_is_in_desktop (file) && caja_file_is_foreign_link (file))); } } @@ -3464,7 +3447,7 @@ caja_file_is_in_desktop (CajaFile *file) } static gboolean -filter_hidden_and_backup_partition_callback (gpointer data, +filter_hidden_partition_callback (gpointer data, gpointer callback_data) { CajaFile *file; @@ -3475,14 +3458,12 @@ filter_hidden_and_backup_partition_callback (gpointer data, return caja_file_should_show (file, options & SHOW_HIDDEN, - options & SHOW_BACKUP, TRUE); } GList * -caja_file_list_filter_hidden_and_backup (GList *files, - gboolean show_hidden, - gboolean show_backup) +caja_file_list_filter_hidden (GList *files, + gboolean show_hidden) { GList *filtered_files; GList *removed_files; @@ -3493,9 +3474,8 @@ caja_file_list_filter_hidden_and_backup (GList *files, filtered_files = caja_file_list_copy (files); filtered_files = eel_g_list_partition (filtered_files, - filter_hidden_and_backup_partition_callback, - GINT_TO_POINTER ((show_hidden ? SHOW_HIDDEN : 0) | - (show_backup ? SHOW_BACKUP : 0)), + filter_hidden_partition_callback, + GINT_TO_POINTER ((show_hidden ? SHOW_HIDDEN : 0)), &removed_files); caja_file_list_free (removed_files); diff --git a/libcaja-private/caja-file.h b/libcaja-private/caja-file.h index f1b64643..8c66afe8 100644 --- a/libcaja-private/caja-file.h +++ b/libcaja-private/caja-file.h @@ -425,14 +425,11 @@ int caja_file_compare_location (CajaFile /* filtering functions for use by various directory views */ gboolean caja_file_is_hidden_file (CajaFile *file); -gboolean caja_file_is_backup_file (CajaFile *file); gboolean caja_file_should_show (CajaFile *file, gboolean show_hidden, - gboolean show_backup, gboolean show_foreign); -GList *caja_file_list_filter_hidden_and_backup (GList *files, - gboolean show_hidden, - gboolean show_backup); +GList *caja_file_list_filter_hidden (GList *files, + gboolean show_hidden); /* Get the URI that's used when activating the file. diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c index 3097793f..88e8736a 100644 --- a/libcaja-private/caja-global-preferences.c +++ b/libcaja-private/caja-global-preferences.c @@ -49,7 +49,6 @@ static const char *EXTRA_MONITOR_PATHS[] = { "/desktop/mate/file_views", /* Forward declarations */ static void global_preferences_install_defaults (void); static void global_preferences_register_enumerations (void); -static gpointer default_font_callback (void); static gpointer default_home_link_name (void); static gpointer default_computer_link_name (void); static gpointer default_trash_link_name (void); @@ -262,26 +261,6 @@ static const PreferenceDefault preference_defaults[] = GINT_TO_POINTER (TRUE) }, { - CAJA_PREFERENCES_SHOW_HIDDEN_FILES, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { - CAJA_PREFERENCES_SHOW_BACKUP_FILES, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { - CAJA_PREFERENCES_CONFIRM_TRASH, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_ENABLE_DELETE, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS, PREFERENCE_STRING, "local_only", @@ -320,11 +299,6 @@ static const PreferenceDefault preference_defaults[] = GINT_TO_POINTER (TRUE) }, { - CAJA_PREFERENCES_THEME, - PREFERENCE_STRING, - "default" - }, - { CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS, PREFERENCE_STRING, "local_only", @@ -356,16 +330,6 @@ static const PreferenceDefault preference_defaults[] = GINT_TO_POINTER (FALSE) }, { - CAJA_PREFERENCES_SHOW_DESKTOP, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { CAJA_PREFERENCES_SEARCH_BAR_TYPE, PREFERENCE_STRING, "search_by_text", @@ -380,11 +344,6 @@ static const PreferenceDefault preference_defaults[] = NULL }, { - CAJA_PREFERENCES_SIDEBAR_WIDTH, - PREFERENCE_INTEGER, - GINT_TO_POINTER (148) - }, - { CAJA_PREFERENCES_ALWAYS_USE_BROWSER, PREFERENCE_BOOLEAN, GINT_TO_POINTER (TRUE) @@ -450,11 +409,6 @@ static const PreferenceDefault preference_defaults[] = NULL, NULL, "default_folder_viewer" }, - { - CAJA_PREFERENCES_DESKTOP_FONT, - PREFERENCE_STRING, - NULL, default_font_callback, g_free - }, /* Icon View Default Preferences */ { @@ -595,36 +549,6 @@ static const PreferenceDefault preference_defaults[] = }, { - CAJA_PREFERENCES_MEDIA_AUTOMOUNT, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { - CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP, - PREFERENCE_STRING_ARRAY, - "", NULL, NULL, NULL - }, - { - CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE, - PREFERENCE_STRING_ARRAY, - "", NULL, NULL, NULL - }, - { - CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER, - PREFERENCE_STRING_ARRAY, - "", NULL, NULL, NULL - }, - { CAJA_PREFERENCES_DESKTOP_TEXT_ELLIPSIS_LIMIT, PREFERENCE_INTEGER, GINT_TO_POINTER (3) @@ -838,12 +762,6 @@ global_preferences_install_defaults (void) } } -static gpointer -default_font_callback (void) -{ - return g_strdup ("sans 12"); -} - /* * Public functions */ @@ -928,6 +846,9 @@ caja_global_preferences_init (void) { eel_preferences_monitor_directory (EXTRA_MONITOR_PATHS[i]); } + + caja_preferences = g_settings_new("org.mate.caja.preferences"); + caja_media_preferences = g_settings_new("org.mate.media-handling"); /* Set up storage for values accessed in this file */ eel_preferences_add_callback (CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER_OR_MANUAL_LAYOUT, diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index 534f36a3..05dd797a 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -27,52 +27,47 @@ #define CAJA_GLOBAL_PREFERENCES_H #include <eel/eel-preferences.h> +#include <gio/gio.h> -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS /* Whether exit when last window destroyed */ #define CAJA_PREFERENCES_EXIT_WITH_LAST_WINDOW "preferences/exit_with_last_window" - /* Which theme is active */ -#define CAJA_PREFERENCES_THEME "/desktop/mate/file_views/icon_theme" - /* Desktop Background options */ -#define CAJA_PREFERENCES_BACKGROUND_SET "preferences/background_set" -#define CAJA_PREFERENCES_BACKGROUND_COLOR "preferences/background_color" -#define CAJA_PREFERENCES_BACKGROUND_FILENAME "preferences/background_filename" +#define CAJA_PREFERENCES_BACKGROUND_SET "background-set" +#define CAJA_PREFERENCES_BACKGROUND_COLOR "background-color" +#define CAJA_PREFERENCES_BACKGROUND_URI "background-uri" /* Side Pane Background options */ -#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_SET "preferences/side_pane_background_set" -#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_COLOR "preferences/side_pane_background_color" -#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_FILENAME "preferences/side_pane_background_filename" +#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_SET "side-pane-background-set" +#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_COLOR "side-pane-background-color" +#define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_URI "side-pane-background-uri" /* How wide the sidebar is (or how wide it will be when expanded) */ -#define CAJA_PREFERENCES_SIDEBAR_WIDTH "preferences/sidebar_width" +#define CAJA_PREFERENCES_SIDEBAR_WIDTH "sidebar-width" /* Automount options */ -#define CAJA_PREFERENCES_MEDIA_AUTOMOUNT "preferences/media_automount" -#define CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN "preferences/media_automount_open" +#define CAJA_PREFERENCES_MEDIA_AUTOMOUNT "media-automount" +#define CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN "media-automount-open" /* Autorun options */ -#define CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER "preferences/media_autorun_never" -#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP "preferences/media_autorun_x_content_start_app" -#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE "preferences/media_autorun_x_content_ignore" -#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER "preferences/media_autorun_x_content_open_folder" +#define CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER "media-autorun-never" +#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP "media-autorun-x-content-start-app" +#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE "media-autorun-x-content-ignore" +#define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER "media-autorun-x-content-open-folder" /* Trash options */ -#define CAJA_PREFERENCES_CONFIRM_TRASH "preferences/confirm_trash" -#define CAJA_PREFERENCES_ENABLE_DELETE "preferences/enable_delete" +#define CAJA_PREFERENCES_CONFIRM_TRASH "confirm-trash" +#define CAJA_PREFERENCES_ENABLE_DELETE "enable-delete" /* Desktop options */ -#define CAJA_PREFERENCES_SHOW_DESKTOP "preferences/show_desktop" -#define CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR "preferences/desktop_is_home_dir" -#define CAJA_PREFERENCES_DESKTOP_FONT "preferences/desktop_font" +#define CAJA_PREFERENCES_SHOW_DESKTOP "show-desktop" +#define CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR "desktop-is-home-dir" +#define CAJA_PREFERENCES_DESKTOP_FONT "desktop-font" /* Display */ -#define CAJA_PREFERENCES_SHOW_HIDDEN_FILES "/desktop/mate/file_views/show_hidden_files" -#define CAJA_PREFERENCES_SHOW_BACKUP_FILES "/desktop/mate/file_views/show_backup_files" +#define CAJA_PREFERENCES_SHOW_HIDDEN_FILES "show-hidden-files" #define CAJA_PREFERENCES_SHOW_ADVANCED_PERMISSIONS "preferences/show_advanced_permissions" #define CAJA_PREFERENCES_DATE_FORMAT "preferences/date_format" @@ -233,10 +228,12 @@ extern "C" { /* Lockdown */ #define CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE "/desktop/mate/lockdown/disable_command_line" - void caja_global_preferences_init (void); - char *caja_global_preferences_get_default_folder_viewer_preference_as_iid (void); -#ifdef __cplusplus -} -#endif +void caja_global_preferences_init (void); +char *caja_global_preferences_get_default_folder_viewer_preference_as_iid (void); + +GSettings *caja_preferences; +GSettings *caja_media_preferences; + +G_END_DECLS #endif /* CAJA_GLOBAL_PREFERENCES_H */ diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index df56d0f1..39aab446 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -4452,10 +4452,6 @@ finalize (GObject *object) details = CAJA_ICON_CONTAINER (object)->details; - eel_preferences_remove_callback (CAJA_PREFERENCES_THEME, - caja_icon_container_theme_changed, - object); - g_hash_table_destroy (details->icon_set); details->icon_set = NULL; @@ -6891,9 +6887,6 @@ caja_icon_container_init (CajaIconContainer *container) /* read in theme-dependent data */ caja_icon_container_theme_changed (container); - eel_preferences_add_callback (CAJA_PREFERENCES_THEME, - caja_icon_container_theme_changed, - container); if (!setup_prefs) { diff --git a/libcaja-private/caja-merged-directory.c b/libcaja-private/caja-merged-directory.c index f3d4cf01..0dc1b10c 100644 --- a/libcaja-private/caja-merged-directory.c +++ b/libcaja-private/caja-merged-directory.c @@ -59,7 +59,6 @@ typedef struct CajaMergedDirectory *merged; gboolean monitor_hidden_files; - gboolean monitor_backup_files; CajaFileAttributes monitor_attributes; } MergedMonitor; @@ -268,7 +267,6 @@ static void merged_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -296,7 +294,6 @@ merged_monitor_add (CajaDirectory *directory, (gpointer) client, monitor); } monitor->monitor_hidden_files = monitor_hidden_files; - monitor->monitor_backup_files = monitor_backup_files; monitor->monitor_attributes = file_attributes; /* Call through to the real directory add calls. */ @@ -305,7 +302,7 @@ merged_monitor_add (CajaDirectory *directory, { caja_directory_file_monitor_add (node->data, monitor, - monitor_hidden_files, monitor_backup_files, + monitor_hidden_files, file_attributes, build_merged_callback_list, &merged_callback_list); } @@ -488,7 +485,6 @@ monitor_add_directory (gpointer key, caja_directory_file_monitor_add (CAJA_DIRECTORY (callback_data), monitor, monitor->monitor_hidden_files, - monitor->monitor_backup_files, monitor->monitor_attributes, forward_files_added_cover, monitor->merged); } diff --git a/libcaja-private/caja-search-directory.c b/libcaja-private/caja-search-directory.c index 56cc4bec..ff010881 100644 --- a/libcaja-private/caja-search-directory.c +++ b/libcaja-private/caja-search-directory.c @@ -57,7 +57,6 @@ struct CajaSearchDirectoryDetails typedef struct { gboolean monitor_hidden_files; - gboolean monitor_backup_files; CajaFileAttributes monitor_attributes; gconstpointer client; @@ -181,7 +180,6 @@ static void search_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -195,7 +193,6 @@ search_monitor_add (CajaDirectory *directory, monitor = g_new0 (SearchMonitor, 1); monitor->monitor_hidden_files = monitor_hidden_files; - monitor->monitor_backup_files = monitor_backup_files; monitor->monitor_attributes = file_attributes; monitor->client = client; diff --git a/libcaja-private/caja-vfs-directory.c b/libcaja-private/caja-vfs-directory.c index 9915889a..2475909e 100644 --- a/libcaja-private/caja-vfs-directory.c +++ b/libcaja-private/caja-vfs-directory.c @@ -94,7 +94,6 @@ static void vfs_file_monitor_add (CajaDirectory *directory, gconstpointer client, gboolean monitor_hidden_files, - gboolean monitor_backup_files, CajaFileAttributes file_attributes, CajaDirectoryCallback callback, gpointer callback_data) @@ -106,7 +105,6 @@ vfs_file_monitor_add (CajaDirectory *directory, (directory, NULL, client, monitor_hidden_files, - monitor_backup_files, file_attributes, callback, callback_data); } diff --git a/libcaja-private/caja-vfs-file.c b/libcaja-private/caja-vfs-file.c index 5959dfe8..0dec6da0 100644 --- a/libcaja-private/caja-vfs-file.c +++ b/libcaja-private/caja-vfs-file.c @@ -48,7 +48,7 @@ vfs_file_monitor_add (CajaFile *file, { caja_directory_monitor_add_internal (file->details->directory, file, - client, TRUE, TRUE, attributes, NULL, NULL); + client, TRUE, attributes, NULL, NULL); } static void diff --git a/libcaja-private/org.mate.caja.gschema.xml.in b/libcaja-private/org.mate.caja.gschema.xml.in new file mode 100644 index 00000000..35df20ec --- /dev/null +++ b/libcaja-private/org.mate.caja.gschema.xml.in @@ -0,0 +1,491 @@ +<schemalist> + <enum id="org.mate.caja.SpeedTradeoff"> + <value nick="always" value="0"/> + <value nick="local-only" value="1"/> + <value nick="never" value="2"/> + </enum> + + <enum id="org.mate.caja.ClickPolicy"> + <value nick="single" value="0"/> + <value nick="double" value="1"/> + </enum> + + <enum id="org.mate.caja.ActivationChoice"> + <value nick="launch" value="0"/> + <value nick="display" value="1"/> + <value nick="ask" value="2"/> + </enum> + + <enum id="org.mate.caja.FolderView"> + <value nick="icon-view" value="0"/> + <value nick="compact-view" value="1"/> + <value nick="list-view" value="2"/> + </enum> + + <enum id="org.mate.caja.DateFormat"> + <value nick="locale" value="0"/> + <value nick="iso" value="1"/> + <value nick="informal" value="2"/> + </enum> + + <enum id="org.mate.caja.SortOrder"> + <value nick="manually" value="0"/> + <value nick="name" value="1"/> + <value nick="directory" value="2"/> + <value nick="size" value="3"/> + <value nick="type" value="4"/> + <value nick="mtime" value="5"/> + <value nick="atime" value="6"/> + <value nick="emblems" value="7"/> + <value nick="trash-time" value="8"/> + </enum> + + <enum id="org.mate.caja.ZoomLevel"> + <value nick="smallest" value="0"/> + <value nick="smaller" value="1"/> + <value nick="small" value="2"/> + <value nick="standard" value="3"/> + <value nick="large" value="4"/> + <value nick="larger" value="5"/> + <value nick="largest" value="6"/> + </enum> + + <enum id="org.mate.caja.TabPosition"> + <value nick="after-current-tab" value="0"/> + <value nick="end" value="1"/> + </enum> + + <schema id="org.mate.caja" path="/apps/caja/" gettext-domain="caja"> + <child name="preferences" schema="org.mate.caja.preferences"/> + <child name="icon-view" schema="org.mate.caja.icon-view"/> + <child name="compact-view" schema="org.mate.caja.compact-view"/> + <child name="list-view" schema="org.mate.caja.list-view"/> + <child name="sidebar-panels" schema="org.mate.caja.sidebar-panels"/> + <child name="desktop" schema="org.mate.caja.desktop"/> + <child name="window-state" schema="org.mate.caja.window-state"/> + </schema> + + <schema id="org.mate.caja.preferences" path="/apps/caja/preferences/" gettext-domain="caja"> + <key name="tabs-open-position" enum="org.mate.caja.TabPosition"> + <aliases> + <alias value='after_current_tab' target='after-current-tab'/> + </aliases> + <default>'after-current-tab'</default> + <_summary>Where to position newly open tabs in browser windows.</_summary> + <_description>If set to "after-current-tab", then new tabs are inserted after the current tab. If set to "end", then new tabs are appended to the end of the tab list.</_description> + </key> + <key name="exit-with-last-window" type="b"> + <default>false</default> + <_summary>Caja will exit when last window destroyed.</_summary> + <_description>If set to true, then Caja will exit when all windows are destroyed. This is the default setting. If set to false, it can be started without any window, so caja can serve as a daemon to monitor media automount, or similar tasks.</_description> + </key> + <key name="always-use-browser" type="b"> + <default>true</default> + <_summary>Enables the classic Caja behavior, where all windows are browsers</_summary> + <_description>If set to true, then all Caja windows will be browser windows. This is how Caja used to behave before version 2.6, and some people prefer this behavior.</_description> + </key> + <key name="always-use-location-entry" type="b"> + <default>false</default> + <_summary>Always use the location entry, instead of the pathbar</_summary> + <_description>If set to true, then Caja browser windows will always use a textual input entry for the location toolbar, instead of the pathbar.</_description> + </key> + <key name="confirm-trash" type="b"> + <default>true</default> + <_summary>Whether to ask for confirmation when deleting files, or emptying Trash</_summary> + <_description>If set to true, then Caja will ask for confirmation when you attempt to delete files, or empty the Trash.</_description> + </key> + <key name="enable-delete" type="b"> + <default>false</default> + <_summary>Whether to enable immediate deletion</_summary> + <_description>If set to true, then Caja will have a feature allowing you to delete a file immediately and in-place, instead of moving it to the trash. This feature can be dangerous, so use caution.</_description> + </key> + <key name="show-icon-text" enum="org.mate.caja.SpeedTradeoff"> + <aliases><alias value='local_only' target='local-only'/></aliases> + <default>'local-only'</default> + <_summary>When to show preview text in icons</_summary> + <_description>Speed tradeoff for when to show a preview of text file contents in the file's icon. If set to "always" then always show previews, even if the folder is on a remote server. If set to "local-only" then only show previews for local file systems. If set to "never" then never bother to read preview data.</_description> + </key> + <key name="show-directory-item-counts" enum="org.mate.caja.SpeedTradeoff"> + <aliases><alias value='local_only' target='local-only'/></aliases> + <default>'local-only'</default> + <_summary>When to show number of items in a folder</_summary> + <_description>Speed tradeoff for when to show the number of items in a folder. If set to "always" then always show item counts, even if the folder is on a remote server. If set to "local-only" then only show counts for local file systems. If set to "never" then never bother to compute item counts.</_description> + </key> + <key name="click-policy" enum="org.mate.caja.ClickPolicy"> + <default>'double'</default> + <_summary>Type of click used to launch/open files</_summary> + <_description>Possible values are "single" to launch files on a single click, or "double" to launch them on a double click.</_description> + </key> + <key name="executable-text-activation" enum="org.mate.caja.ActivationChoice"> + <default>'ask'</default> + <_summary>What to do with executable text files when activated</_summary> + <_description>What to do with executable text files when they are activated (single or double clicked). Possible values are "launch" to launch them as programs, "ask" to ask what to do via a dialog, and "display" to display them as text files.</_description> + </key> + <key name="install-mime-activation" type="b"> + <default>true</default> + <_summary>Show the package installer for unknown mime types</_summary> + <_description>Whether to show the user a package installer dialog in case an unknown mime type is opened, in order to search for an application to handle it.</_description> + </key> + <key name="mouse-use-extra-buttons" type="b"> + <default>true</default> + <_summary>Use extra mouse button events in Caja' browser window</_summary> + <_description>For users with mice that have "Forward" and "Back" buttons, this key will determine if any action is taken inside of Caja when either is pressed.</_description> + </key> + <key name="mouse-forward-button" type="i"> + <default>9</default> + <_summary>Mouse button to activate the "Forward" command in browser window</_summary> + <_description>For users with mice that have buttons for "Forward" and "Back", this key will set which button activates the "Forward" command in a browser window. Possible values range between 6 and 14.</_description> + </key> + <key name="mouse-back-button" type="i"> + <default>8</default> + <_summary>Mouse button to activate the "Back" command in browser window</_summary> + <_description>For users with mice that have buttons for "Forward" and "Back", this key will set which button activates the "Back" command in a browser window. Possible values range between 6 and 14.</_description> + </key> + <key name="show-image-thumbnails" enum="org.mate.caja.SpeedTradeoff"> + <aliases><alias value='local_only' target='local-only'/></aliases> + <default>'local-only'</default> + <_summary>When to show thumbnails of image files</_summary> + <_description>Speed tradeoff for when to show an image file as a thumbnail. If set to "always" then always thumbnail, even if the folder is on a remote server. If set to "local-only" then only show thumbnails for local file systems. If set to "never" then never bother to thumbnail images, just use a generic icon.</_description> + </key> + <key name="thumbnail-limit" type="t"> + <default>10485760</default> + <_summary>Maximum image size for thumbnailing</_summary> + <_description>Images over this size (in bytes) won't be thumbnailed. The purpose of this setting is to avoid thumbnailing large images that may take a long time to load or use lots of memory.</_description> + </key> + <key name="preview-sound" enum="org.mate.caja.SpeedTradeoff"> + <aliases><alias value='local_only' target='local-only'/></aliases> + <default>'local-only'</default> + <_summary>Whether to preview sounds when mousing over an icon</_summary> + <_description>Speed tradeoff for when to preview a sound file when mousing over a files icon. If set to "always" then always plays the sound, even if the file is on a remote server. If set to "local-only" then only plays previews on local file systems. If set to "never" then it never previews sound.</_description> + </key> + <key name="show-advanced-permissions" type="b"> + <default>false</default> + <_summary>Show advanced permissions in the file property dialog</_summary> + <_description>If set to true, then Caja lets you edit and display file permissions in a more unix-like way, accessing some more esoteric options.</_description> + </key> + <key name="sort-directories-first" type="b"> + <default>true</default> + <_summary>Show folders first in windows</_summary> + <_description>If set to true, then Caja shows folders prior to showing files in the icon and list views.</_description> + </key> + <key name="show-desktop" type="b"> + <default>true</default> + <_summary>Caja handles drawing the desktop</_summary> + <_description>If set to true, then Caja will draw the icons on the desktop.</_description> + </key> + <key name="desktop-font" type="s"> + <default l10n="messages" context="desktop-font">''</default> + <_summary>Desktop font</_summary> + <_description>The font _description used for the icons on the desktop.</_description> + </key> + <key name="desktop-is-home-dir" type="b"> + <default>false</default> + <_summary>Caja uses the users home folder as the desktop</_summary> + <_description>If set to true, then Caja will use the user's home folder as the desktop. If it is false, then it will use ~/Desktop as the desktop.</_description> + </key> + <key name="background-set" type="b"> + <default>false</default> + <_summary>Custom Background</_summary> + <_description>Whether a custom default folder background has been set.</_description> + </key> + <key name="background-color" type="s"> + <default>'#ffffff'</default> + <_summary>Default Background Color</_summary> + <_description>Color for the default folder background. Only used if background_set is true.</_description> + </key> + <key name="background-uri" type="s"> + <default>''</default> + <_summary>Default Background Filename</_summary> + <_description>Uri of the default folder background. Only used if background_set is true.</_description> + </key> + <key name="side-pane-background-set" type="b"> + <default>false</default> + <_summary>Custom Side Pane Background Set</_summary> + <_description>Whether a custom default side pane background has been set.</_description> + </key> + <key name="side-pane-background-color" type="s"> + <default>'#ffffff'</default> + <_summary>Default Side Pane Background Color</_summary> + <_description>Filename for the default side pane background. Only used if side_pane_background_set is true.</_description> + </key> + <key name="side-pane-background-uri" type="s"> + <default>""</default> + <_summary>Default Side Pane Background Filename</_summary> + <_description>Uri of the default side pane background. Only used if side_pane_background_set is true.</_description> + </key> + <key name="default-folder-viewer" enum="org.mate.caja.FolderView"> + <aliases> + <alias value='icon_view' target='icon-view'/> + <alias value='compact_view' target='compact-view'/> + <alias value='list_view' target='list-view'/> + </aliases> + <default>'icon-view'</default> + <_summary>Default folder viewer</_summary> + <_description>When a folder is visited this viewer is used unless you have selected another view for that particular folder. Possible values are "list-view", "icon-view" and "compact-view".</_description> + </key> + <key name="date-format" enum="org.mate.caja.DateFormat"> + <default>'locale'</default> + <_summary>Date Format</_summary> + <_description>The format of file dates. Possible values are "locale", "iso", and "informal".</_description> + </key> + <key name="show-hidden-files" type="b"> + <default>false</default> + <_summary>Whether to show hidden files</_summary> + <_description>If set to true, then hidden files are shown by default in the file manager. Hidden files are either dotfiles, listed in the folder's .hidden file or backup files ending with a tilde (~).</_description> + </key> + </schema> + + <schema id="org.mate.caja.icon-view" path="/apps/caja/icon-view/" gettext-domain="caja"> + <key name="captions" type="as"> + <default>[ 'none', 'size', 'date_modified' ]</default> + <_summary>List of possible captions on icons</_summary> + <_description>A list of captions below an icon in the icon view and + the desktop. The actual number of captions shown depends on + the zoom level. Some possible values are: + "size", "type", "date_modified", "date_changed", "date_accessed", "owner", + "group", "permissions", "octal_permissions" and "mime_type".</_description> + </key> + <key name="default-sort-order" enum="org.mate.caja.SortOrder"> + <aliases> + <alias value='modification_date' target='mtime'/> + </aliases> + <default>'name'</default> + <_summary>Default sort order</_summary> + <_description>The default sort-order for items in the icon view. Possible values are "name", "size", "type", "mtime", and "emblems".</_description> + </key> + <key name="default-sort-in-reverse-order" type="b"> + <default>false</default> + <_summary>Reverse sort order in new windows</_summary> + <_description>If true, files in new windows will be sorted in reverse order. ie, if sorted by name, then instead of sorting the files from "a" to "z", they will be sorted from "z" to "a"; if sorted by size, instead of being incrementally they will be sorted decrementally.</_description> + </key> + <key name="default-use-tighter-layout" type="b"> + <default>false</default> + <_summary>Use tighter layout in new windows</_summary> + <_description>If true, icons will be laid out tighter by default in new windows.</_description> + </key> + <key name="labels-beside-icons" type="b"> + <default>false</default> + <_summary>Put labels beside icons</_summary> + <_description>If true, labels will be placed beside icons rather than underneath them.</_description> + </key> + <key name="default-use-manual-layout" type="b"> + <default>false</default> + <_summary>Use manual layout in new windows</_summary> + <_description>If true, new windows will use manual layout by default.</_description> + </key> + <key name="default-zoom-level" enum="org.mate.caja.ZoomLevel"> + <default>'standard'</default> + <_summary>Default icon zoom level</_summary> + <_description>Default zoom level used by the icon view.</_description> + </key> + <key name="thumbnail-size" type="i"> + <default>64</default> + <_summary>Default Thumbnail Icon Size</_summary> + <_description>The default size of an icon for a thumbnail in the icon view.</_description> + </key> + <key name="text-ellipsis-limit" type="as"> + <default>[ '3' ]</default> + <_summary>Text Ellipsis Limit</_summary> + <_description>A string specifying how parts of overlong file names + should be replaced by ellipses, depending on the zoom + level. + Each of the list entries is of the form "Zoom Level:Integer". + For each specified zoom level, if the given integer is + larger than 0, the file name will not exceed the given number of lines. + If the integer is 0 or smaller, no limit is imposed on the specified zoom level. + A default entry of the form "Integer" without any specified zoom level + is also allowed. It defines the maximum number of lines for all other zoom levels. + Examples: + 0 - always display overlong file names; + 3 - shorten file names if they exceed three lines; + smallest:5,smaller:4,0 - shorten file names if they exceed five lines + for zoom level "smallest". Shorten file names if they exceed four lines + for zoom level "smaller". Do not shorten file names for other zoom levels. + + Available zoom levels: + smallest (33%), smaller (50%), small (66%), standard (100%), large (150%), + larger (200%), largest (400%)</_description> + </key> + </schema> + + <schema id="org.mate.caja.compact-view" path="/apps/caja/compact-view/" gettext-domain="caja"> + <key name="default-zoom-level" enum="org.mate.caja.ZoomLevel"> + <default>'standard'</default> + <_summary>Default compact view zoom level</_summary> + <_description>Default zoom level used by the compact view.</_description> + </key> + <key name="all-columns-have-same-width" type="b"> + <default>true</default> + <_summary>All columns have same width</_summary> + <_description>If this preference is set, all columns in the compact view have the same width. Otherwise, the width of each column is determined seperately.</_description> + </key> + </schema> + + <schema id="org.mate.caja.list-view" path="/apps/caja/list-view/" gettext-domain="caja"> + <key name="default-sort-order" enum="org.mate.caja.SortOrder"> + <aliases> + <alias value='modification_date' target='mtime'/> + </aliases> + <default>'name'</default> + <_summary>Default sort order</_summary> + <_description>The default sort-order for the items in the list view. Possible values are "name", "size", "type", and "mtime".</_description> + </key> + <key name="default-sort-in-reverse-order" type="b"> + <default>false</default> + <_summary>Reverse sort order in new windows</_summary> + <_description>If true, files in new windows will be sorted in reverse order. ie, if sorted by name, then instead of sorting the files from "a" to "z", they will be sorted from "z" to "a".</_description> + </key> + <key name="default-zoom-level" enum="org.mate.caja.ZoomLevel"> + <default>'smaller'</default> + <_summary>Default list zoom level</_summary> + <_description>Default zoom level used by the list view.</_description> + </key> + <key name="default-visible-columns" type="as"> + <default>[ 'name', 'size', 'type', 'date_modified' ]</default> + <_summary>Default list of columns visible in the list view</_summary> + <_description>Default list of columns visible in the list view.</_description> + </key> + <key name="default-column-order" type="as"> + <default>[ 'name', 'size', 'type', 'date_modified' ]</default> + <_summary>Default column order in the list view</_summary> + <_description>Default column order in the list view.</_description> + </key> + </schema> + + <schema id="org.mate.caja.sidebar-panels" path="/apps/caja/sidebar-panels/" gettext-domain="caja"> + <child name="tree" schema="org.mate.caja.sidebar-panels.tree"/> + </schema> + + <schema id="org.mate.caja.sidebar-panels.tree" path="/apps/caja/sidebar-panels/tree/" gettext-domain="caja"> + <key name="show-only-directories" type="b"> + <default>true</default> + <_summary>Only show folders in the tree side pane</_summary> + <_description>If set to true, Caja will only show folders in the tree side pane. Otherwise it will show both folders and files.</_description> + </key> + </schema> + + <schema id="org.mate.caja.desktop" path="/apps/caja/desktop/" gettext-domain="caja"> + <key name="home-icon-visible" type="b"> + <default>true</default> + <_summary>Home icon visible on desktop</_summary> + <_description>If this is set to true, an icon linking to the home folder will be put on the desktop.</_description> + </key> + <key name="computer-icon-visible" type="b"> + <default>true</default> + <_summary>Computer icon visible on desktop</_summary> + <_description>If this is set to true, an icon linking to the computer location will be put on the desktop.</_description> + </key> + <key name="trash-icon-visible" type="b"> + <default>true</default> + <_summary>Trash icon visible on desktop</_summary> + <_description>If this is set to true, an icon linking to the trash will be put on the desktop.</_description> + </key> + <key name="volumes-visible" type="b"> + <default>true</default> + <_summary>Show mounted volumes on the desktop</_summary> + <_description>If this is set to true, icons linking to mounted volumes will be put on the desktop.</_description> + </key> + <key name="network-icon-visible" type="b"> + <default>false</default> + <_summary>Network Servers icon visible on the desktop</_summary> + <_description>If this is set to true, an icon linking to the Network Servers view will be put on the desktop.</_description> + </key> + <key name="computer-icon-name" type="s"> + <default>''</default> + <_summary>Desktop computer icon name</_summary> + <_description>This name can be set if you want a custom name for the computer icon on the desktop.</_description> + </key> + <key name="home-icon-name" type="s"> + <default>''</default> + <_summary>Desktop home icon name</_summary> + <_description>This name can be set if you want a custom name for the home icon on the desktop.</_description> + </key> + <key name="trash-icon-name" type="s"> + <default>''</default> + <_summary>Desktop trash icon name</_summary> + <_description>This name can be set if you want a custom name for the trash icon on the desktop.</_description> + </key> + <key name="network-icon-name" type="s"> + <default>''</default> + <_summary>Network servers icon name</_summary> + <_description>This name can be set if you want a custom name for the network servers icon on the desktop.</_description> + </key> + <key name="text-ellipsis-limit" type="i"> + <default>3</default> + <_summary>Text Ellipsis Limit</_summary> + <_description>An integer specifying how parts of overlong file names should be replaced by ellipses on the desktop. If the number is larger than 0, the file name will not exceed the given number of lines. If the number is 0 or smaller, no limit is imposed on the number of displayed lines.</_description> + </key> + </schema> + + <schema id="org.mate.caja.file-views" path="/desktop/mate/file-views/" gettext-domain="caja"> + <key name="show-hidden-files" type="b"> + <default>false</default> + <_summary>Whether to show hidden files</_summary> + <_description>If set to true, then hidden files are shown in the file manager. Hidden files are either dotfiles or are listed in the folder's .hidden file.</_description> + </key> + <key name="show-backup-files" type="b"> + <default>false</default> + <_summary>Whether to show backup files</_summary> + <_description>If set to true, then backup files such as those created by Emacs are displayed. Currently, only files ending in a tilde (~) are considered backup files.</_description> + </key> + </schema> + + <schema id="org.mate.caja.window-state" path="/apps/caja/window-state/" gettext-domain="caja"> + <key name="geometry" type="s"> + <default>''</default> + <_summary>The geometry string for a navigation window.</_summary> + <_description>A string containing the saved geometry and coordinates string for navigation windows.</_description> + </key> + <key name="maximized" type="b"> + <default>false</default> + <_summary>Whether the navigation window should be maximized.</_summary> + <_description>Whether the navigation window should be maximized by default.</_description> + </key> + <key name="sidebar-width" type="i"> + <default>148</default> + <_summary>Width of the side pane</_summary> + <_description>The default width of the side pane in new windows.</_description> + </key> + <key name="start-with-toolbar" type="b"> + <default>true</default> + <_summary>Show toolbar in new windows</_summary> + <_description>If set to true, newly opened windows will have toolbars visible.</_description> + </key> + <key name="start-with-location-bar" type="b"> + <default>true</default> + <_summary>Show location bar in new windows</_summary> + <_description>If set to true, newly opened windows will have the location bar visible.</_description> + </key> + <key name="start-with-status-bar" type="b"> + <default>true</default> + <_summary>Show status bar in new windows</_summary> + <_description>If set to true, newly opened windows will have the status bar visible.</_description> + </key> + <key name="start-with-sidebar" type="b"> + <default>true</default> + <_summary>Show side pane in new windows</_summary> + <_description>If set to true, newly opened windows will have the side pane visible.</_description> + </key> + <key name="side-pane-view" type="s"> + <choices> + <choice value='emblems'/> + <choice value='history'/> + <choice value='information'/> + <choice value='notes'/> + <choice value='places'/> + <choice value='tree'/> + </choices> + <aliases> + <alias value='CajaEmblemSidebar' target='emblems'/> + <alias value='CajaHistorySidebar' target='history'/> + <alias value='CajaInformationPanel' target='information'/> + <alias value='CajaNotesSidebar' target='notes'/> + <alias value='CajaPlacesSidebar' target='places'/> + <alias value='CajaTreeSidebar' target='tree'/> + </aliases> + <default>'places'</default> + <_summary>Side pane view</_summary> + <_description>The side pane view to show in newly opened windows.</_description> + </key> + </schema> +</schemalist> diff --git a/libcaja-private/org.mate.media-handling.gschema.xml.in b/libcaja-private/org.mate.media-handling.gschema.xml.in new file mode 100644 index 00000000..5482bc9a --- /dev/null +++ b/libcaja-private/org.mate.media-handling.gschema.xml.in @@ -0,0 +1,34 @@ +<schemalist> + <schema id="org.mate.media-handling" path="/desktop/mate/media-handling/" gettext-domain="caja"> + <key name="automount" type="b"> + <default>true</default> + <_summary>Whether to automatically mount media</_summary> + <_description>If set to true, then Caja will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.</_description> + </key> + <key name="automount-open" type="b"> + <default>true</default> + <_summary>Whether to automatically open a folder for automounted media</_summary> + <_description>If set to true, then Caja will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead.</_description> + </key> + <key name="autorun-never" type="b"> + <default>false</default> + <_summary>Never prompt or autorun/autostart programs when media are inserted</_summary> + <_description>If set to true, then Caja will never prompt nor autorun/autostart programs when a medium is inserted.</_description> + </key> + <key name="autorun-x-content-start-app" type="as"> + <default>[ 'x-content/software' ]</default> + <_summary>List of x-content/* types where the preferred application will be launched</_summary> + <_description>List of x-content/* types for which the user have chosen to start an application in the preference capplet. The preferred application for the given type will be started on insertion on media matching these types.</_description> + </key> + <key name="autorun-x-content-ignore" type="as"> + <default>[]</default> + <_summary>List of x-content/* types set to "Do Nothing"</_summary> + <_description>List of x-content/* types for which the user have chosen "Do Nothing" in the preference capplet. No prompt will be shown nor will any matching application be started on insertion of media matching these types.</_description> + </key> + <key name="autorun-x-content-open-folder" type="as"> + <default>[]</default> + <_summary>List of x-content/* types set to "Open Folder"</_summary> + <_description>List of x-content/* types for which the user have chosen "Open Folder" in the preferences capplet. A folder window will be opened on insertion of media matching these types.</_description> + </key> + </schema> +</schemalist> |