1 /* nautilus-global-preferences.c - Nautilus specific preference keys and 2 * functions. 3 * 4 * Copyright (C) 1999, 2000, 2001 Eazel, Inc. 5 * 6 * The Gnome Library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public License as 8 * published by the Free Software Foundation; either version 2 of the 9 * License, or (at your option) any later version. 10 * 11 * The Gnome Library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with the Gnome Library; see the file COPYING.LIB. If not, 18 * see <http://www.gnu.org/licenses/>. 19 * 20 * Authors: Ramiro Estrugo <ramiro@eazel.com> 21 */ 22 23 #include <config.h> 24 #include "nautilus-global-preferences.h" 25 26 #include "nautilus-file-utilities.h" 27 #include "nautilus-file.h" 28 #include "src/nautilus-files-view.h" 29 #include <eel/eel-glib-extensions.h> 30 #include <eel/eel-gtk-extensions.h> 31 #include <eel/eel-stock-dialogs.h> 32 #include <eel/eel-string.h> 33 #include <glib/gi18n.h> 34 35 GSettings *nautilus_preferences; 36 GSettings *nautilus_compression_preferences; 37 GSettings *nautilus_icon_view_preferences; 38 GSettings *nautilus_list_view_preferences; 39 GSettings *nautilus_window_state; 40 GSettings *gtk_filechooser_preferences; 41 GSettings *gnome_lockdown_preferences; 42 GSettings *gnome_background_preferences; 43 GSettings *gnome_interface_preferences; 44 GSettings *gnome_privacy_preferences; 45 46 void nautilus_global_preferences_init(void)47nautilus_global_preferences_init (void) 48 { 49 static gboolean initialized = FALSE; 50 51 if (initialized) 52 { 53 return; 54 } 55 56 initialized = TRUE; 57 58 nautilus_preferences = g_settings_new ("org.gnome.nautilus.preferences"); 59 nautilus_compression_preferences = g_settings_new ("org.gnome.nautilus.compression"); 60 nautilus_window_state = g_settings_new ("org.gnome.nautilus.window-state"); 61 nautilus_icon_view_preferences = g_settings_new ("org.gnome.nautilus.icon-view"); 62 nautilus_list_view_preferences = g_settings_new ("org.gnome.nautilus.list-view"); 63 /* Some settings such as show hidden files are shared between Nautilus and GTK file chooser */ 64 gtk_filechooser_preferences = g_settings_new_with_path ("org.gtk.Settings.FileChooser", 65 "/org/gtk/settings/file-chooser/"); 66 gnome_lockdown_preferences = g_settings_new ("org.gnome.desktop.lockdown"); 67 gnome_background_preferences = g_settings_new ("org.gnome.desktop.background"); 68 gnome_interface_preferences = g_settings_new ("org.gnome.desktop.interface"); 69 gnome_privacy_preferences = g_settings_new ("org.gnome.desktop.privacy"); 70 } 71