summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-09-05 14:19:23 +0200
committerStefano Karapetsas <[email protected]>2012-09-05 14:19:23 +0200
commitf82a305cde0842e53d7468ce37b4cd02161838c5 (patch)
tree206300706dfeb17d20417300601d5d533ff98b85 /libcaja-private
parentf3fda69cae01b52e65a5608ed7c86d2abbb8f80a (diff)
downloadcaja-f82a305cde0842e53d7468ce37b4cd02161838c5.tar.bz2
caja-f82a305cde0842e53d7468ce37b4cd02161838c5.tar.xz
convert executable-text-activation to gsettings
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-global-preferences.c29
-rw-r--r--libcaja-private/caja-global-preferences.h2
-rw-r--r--libcaja-private/caja-mime-actions.c8
3 files changed, 5 insertions, 34 deletions
diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c
index 98b96e46..00c1e743 100644
--- a/libcaja-private/caja-global-preferences.c
+++ b/libcaja-private/caja-global-preferences.c
@@ -118,25 +118,6 @@ static EelEnumerationEntry click_policy_enum_entries[] =
}
};
-static EelEnumerationEntry executable_text_activation_enum_entries[] =
-{
- {
- "launch",
- N_("E_xecute files when they are clicked"),
- CAJA_EXECUTABLE_TEXT_LAUNCH
- },
- {
- "display",
- N_("Display _files when they are clicked"),
- CAJA_EXECUTABLE_TEXT_DISPLAY
- },
- {
- "ask",
- N_("_Ask each time"),
- CAJA_EXECUTABLE_TEXT_ASK
- }
-};
-
static EelEnumerationEntry search_bar_type_enum_entries[] =
{
{
@@ -280,13 +261,6 @@ static const PreferenceDefault preference_defaults[] =
"click_policy"
},
{
- CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION,
- PREFERENCE_STRING,
- "ask",
- NULL, NULL,
- "executable_text_activation"
- },
- {
CAJA_PREFERENCES_INSTALL_MIME_ACTIVATION,
PREFERENCE_BOOLEAN,
GINT_TO_POINTER (TRUE)
@@ -607,9 +581,6 @@ global_preferences_register_enumerations (void)
eel_enumeration_register ("default_zoom_level",
default_zoom_level_enum_entries,
G_N_ELEMENTS (default_zoom_level_enum_entries));
- eel_enumeration_register ("executable_text_activation",
- executable_text_activation_enum_entries,
- G_N_ELEMENTS (executable_text_activation_enum_entries));
eel_enumeration_register ("file_size",
file_size_enum_entries,
G_N_ELEMENTS (file_size_enum_entries));
diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h
index 03c02175..45efde91 100644
--- a/libcaja-private/caja-global-preferences.h
+++ b/libcaja-private/caja-global-preferences.h
@@ -97,7 +97,7 @@ G_BEGIN_DECLS
#define CAJA_PREFERENCES_CLICK_POLICY "preferences/click_policy"
/* Activating executable text files */
-#define CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION "preferences/executable_text_activation"
+#define CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION "executable-text-activation"
/* Installing new packages when unknown mime type activated */
#define CAJA_PREFERENCES_INSTALL_MIME_ACTIVATION "preferences/install_mime_activation"
diff --git a/libcaja-private/caja-mime-actions.c b/libcaja-private/caja-mime-actions.c
index 33897f5d..9cbc2f45 100644
--- a/libcaja-private/caja-mime-actions.c
+++ b/libcaja-private/caja-mime-actions.c
@@ -822,8 +822,8 @@ get_executable_text_file_action (GtkWindow *parent_window, CajaFile *file)
g_assert (caja_file_contains_text (file));
- preferences_value = eel_preferences_get_enum
- (CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
+ preferences_value = g_settings_get_enum (caja_preferences,
+ CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
switch (preferences_value)
{
case CAJA_EXECUTABLE_TEXT_LAUNCH:
@@ -881,8 +881,8 @@ get_default_executable_text_file_action (void)
{
int preferences_value;
- preferences_value = eel_preferences_get_enum
- (CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
+ preferences_value = g_settings_get_enum (caja_preferences,
+ CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION);
switch (preferences_value)
{
case CAJA_EXECUTABLE_TEXT_LAUNCH: