[nautilus] Convert new tab position to gsettings
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Convert new tab position to gsettings
- Date: Fri, 23 Jul 2010 10:32:53 +0000 (UTC)
commit e167d6f663fc2c420d939f5cbb24c6463b03e8c2
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jul 22 16:31:58 2010 +0200
Convert new tab position to gsettings
libnautilus-private/nautilus-global-preferences.c | 15 ---------------
libnautilus-private/nautilus-global-preferences.h | 2 +-
libnautilus-private/nautilus-mime-actions.c | 2 +-
src/nautilus-navigation-window-menus.c | 2 +-
src/nautilus-window-manage-views.c | 2 +-
5 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c
index 873c60e..7f3a083 100644
--- a/libnautilus-private/nautilus-global-preferences.c
+++ b/libnautilus-private/nautilus-global-preferences.c
@@ -139,12 +139,6 @@ static EelEnumerationEntry standard_font_size_entries[] = {
{ "24", N_("24"), 24 }
};
-/* These are not translated, because the text is not used in the ui */
-static EelEnumerationEntry new_tab_position_entries[] = {
- { "after_current_tab", "After Current Tab", NAUTILUS_NEW_TAB_POSITION_AFTER_CURRENT_TAB },
- { "end", "End", NAUTILUS_NEW_TAB_POSITION_END }
-};
-
/*
* A callback which can be used to fetch dynamic fallback values.
* For example, values that are dependent on the environment (such as user name)
@@ -262,12 +256,6 @@ static const PreferenceDefault preference_defaults[] = {
NULL, NULL,
NULL
},
- { NAUTILUS_PREFERENCES_NEW_TAB_POSITION,
- PREFERENCE_STRING,
- "after_current_tab",
- NULL, NULL,
- "new_tab_position"
- },
{ NAUTILUS_PREFERENCES_START_WITH_TOOLBAR,
PREFERENCE_BOOLEAN,
GINT_TO_POINTER (TRUE)
@@ -509,9 +497,6 @@ global_preferences_register_enumerations (void)
eel_enumeration_register ("standard_font_size",
standard_font_size_entries,
G_N_ELEMENTS (standard_font_size_entries));
- eel_enumeration_register ("new_tab_position",
- new_tab_position_entries,
- G_N_ELEMENTS (new_tab_position_entries));
/* Set the enumeration ids for preferences that need them */
for (i = 0; preference_defaults[i].name != NULL; i++) {
diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h
index b57d7fa..3f884df 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -103,7 +103,7 @@ typedef enum
/* Spatial or browser mode */
#define NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER "always-use-browser"
-#define NAUTILUS_PREFERENCES_NEW_TAB_POSITION "preferences/tabs_open_position"
+#define NAUTILUS_PREFERENCES_NEW_TAB_POSITION "tabs-open-position"
/* Which views should be displayed for new windows */
#define NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR "preferences/start_with_location_bar"
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index a24df92..d51183e 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -1796,7 +1796,7 @@ activate_files (ActivateParameters *parameters)
(flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB) != 0))) {
if ((flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB) != 0 &&
- eel_preferences_get_enum (NAUTILUS_PREFERENCES_NEW_TAB_POSITION) ==
+ g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_NEW_TAB_POSITION) ==
NAUTILUS_NEW_TAB_POSITION_AFTER_CURRENT_TAB) {
/* When inserting N tabs after the current one,
* we first open tab N, then tab N-1, ..., then tab 0.
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 2b1ff9d..192b51d 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -599,7 +599,7 @@ action_new_tab_callback (GtkAction *action,
if (location != NULL) {
flags = 0;
- new_slot_position = eel_preferences_get_enum (NAUTILUS_PREFERENCES_NEW_TAB_POSITION);
+ new_slot_position = g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_NEW_TAB_POSITION);
if (new_slot_position == NAUTILUS_NEW_TAB_POSITION_END) {
flags = NAUTILUS_WINDOW_OPEN_SLOT_APPEND;
}
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index bcdd53e..9d82472 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -584,7 +584,7 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot *slot,
slot_flags = 0;
- new_slot_position = eel_preferences_get_enum (NAUTILUS_PREFERENCES_NEW_TAB_POSITION);
+ new_slot_position = g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_NEW_TAB_POSITION);
if (new_slot_position == NAUTILUS_NEW_TAB_POSITION_END) {
slot_flags = NAUTILUS_WINDOW_OPEN_SLOT_APPEND;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]