Commit 40703f4b authored by Ramiro Estrugo's avatar Ramiro Estrugo
Browse files

Update for naming changes in the preferences api.

parent 9e8ada12
2000-03-12 Ramiro Estrugo <ramiro@eazel.com>
* src/nautilus-window-menus.c:
* src/ntl-window-state.c:
* src/ntl-app.c:
Update for naming changes in the preferences api.
2000-03-12 Ramiro Estrugo <ramiro@eazel.com>
* nautilus-widgets/nautilus-preferences-box.c,
......
......@@ -29,6 +29,7 @@
#include <bonobo.h>
#include "file-manager/fm-directory-view-icons.h"
#include "file-manager/fm-directory-view-list.h"
#include <libnautilus/nautilus-global-preferences.h>
typedef struct {
POA_Nautilus_Application servant;
......@@ -243,6 +244,8 @@ nautilus_app_destroy(GtkObject *object)
{
/* Do those things that gotta be done just once before quitting */
nautilus_prefs_save();
nautilus_global_preferences_shutdown ();
nautilus_bookmarks_exiting();
GTK_OBJECT_CLASS(app_parent_class)->destroy(object);
}
......@@ -254,6 +257,7 @@ nautilus_app_startup(NautilusApp *app, const char *initial_url)
nautilus_navinfo_init();
nautilus_prefs_load();
nautilus_global_preferences_initialize ();
/* Set default configuration */
mainwin = nautilus_app_create_window(app);
......
......@@ -29,12 +29,12 @@
#include "ntl-app.h"
#include "ntl-prefs.h"
#include "ntl-window-private.h"
#include "nautilus-global-preferences.h"
#include <libnautilus/nautilus-gtk-extensions.h>
#include <libnautilus/nautilus-icon-factory.h>
#include <libnautilus/nautilus-string.h>
#include <libnautilus/nautilus-global-preferences.h>
static void activate_bookmark_in_menu_item (BonoboUIHandler *uih,
gpointer user_data,
......@@ -105,9 +105,7 @@ static void
general_settings_cb (GtkWidget *widget,
GtkWindow *mainwin)
{
/* nautilus_prefs_ui_show (mainwin); */
nautilus_prefs_global_show_dialog ();
nautilus_global_preferences_show_dialog ();
}
static GnomeUIInfo file_menu_info[] = {
......
......@@ -29,12 +29,12 @@
#include "ntl-app.h"
#include "ntl-prefs.h"
#include "ntl-window-private.h"
#include "nautilus-global-preferences.h"
#include <libnautilus/nautilus-gtk-extensions.h>
#include <libnautilus/nautilus-icon-factory.h>
#include <libnautilus/nautilus-string.h>
#include <libnautilus/nautilus-global-preferences.h>
static void activate_bookmark_in_menu_item (BonoboUIHandler *uih,
gpointer user_data,
......@@ -105,9 +105,7 @@ static void
general_settings_cb (GtkWidget *widget,
GtkWindow *mainwin)
{
/* nautilus_prefs_ui_show (mainwin); */
nautilus_prefs_global_show_dialog ();
nautilus_global_preferences_show_dialog ();
}
static GnomeUIInfo file_menu_info[] = {
......
......@@ -25,7 +25,7 @@
*/
#include "nautilus.h"
#include "nautilus-global-preferences.h"
#include <libnautilus/nautilus-global-preferences.h>
void
nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_url)
......@@ -41,15 +41,15 @@ nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_u
path_name = g_string_new ("file://");
user_level = nautilus_prefs_get_enum (nautilus_prefs_global_get_prefs (),
NAUTILUS_PREFS_USER_LEVEL);
user_level = nautilus_preferences_get_enum (nautilus_preferences_get_global_preferences (),
NAUTILUS_GLOBAL_PREFERENCES_USER_LEVEL);
#if ANDY_WILL_FIX_THIS_IN_A_BIT
switch (user_level)
{
case NAUTILUS_USER_LEVEL_NOVICE:
case NAUTILUS_USER_LEVEL_INTERMEDIATE:
g_string_append (path_name, "/tmp");
/* Will be something better soon */
g_string_append (path_name, g_get_home_dir ());
break;
case NAUTILUS_USER_LEVEL_HACKER:
......@@ -57,9 +57,6 @@ nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_u
g_string_append (path_name, g_get_home_dir ());
break;
}
#else
g_string_append (path_name, g_get_home_dir ());
#endif
nautilus_window_goto_uri (window, path_name->str);
......
......@@ -29,6 +29,7 @@
#include <bonobo.h>
#include "file-manager/fm-directory-view-icons.h"
#include "file-manager/fm-directory-view-list.h"
#include <libnautilus/nautilus-global-preferences.h>
typedef struct {
POA_Nautilus_Application servant;
......@@ -243,6 +244,8 @@ nautilus_app_destroy(GtkObject *object)
{
/* Do those things that gotta be done just once before quitting */
nautilus_prefs_save();
nautilus_global_preferences_shutdown ();
nautilus_bookmarks_exiting();
GTK_OBJECT_CLASS(app_parent_class)->destroy(object);
}
......@@ -254,6 +257,7 @@ nautilus_app_startup(NautilusApp *app, const char *initial_url)
nautilus_navinfo_init();
nautilus_prefs_load();
nautilus_global_preferences_initialize ();
/* Set default configuration */
mainwin = nautilus_app_create_window(app);
......
......@@ -25,7 +25,7 @@
*/
#include "nautilus.h"
#include "nautilus-global-preferences.h"
#include <libnautilus/nautilus-global-preferences.h>
void
nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_url)
......@@ -41,15 +41,15 @@ nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_u
path_name = g_string_new ("file://");
user_level = nautilus_prefs_get_enum (nautilus_prefs_global_get_prefs (),
NAUTILUS_PREFS_USER_LEVEL);
user_level = nautilus_preferences_get_enum (nautilus_preferences_get_global_preferences (),
NAUTILUS_GLOBAL_PREFERENCES_USER_LEVEL);
#if ANDY_WILL_FIX_THIS_IN_A_BIT
switch (user_level)
{
case NAUTILUS_USER_LEVEL_NOVICE:
case NAUTILUS_USER_LEVEL_INTERMEDIATE:
g_string_append (path_name, "/tmp");
/* Will be something better soon */
g_string_append (path_name, g_get_home_dir ());
break;
case NAUTILUS_USER_LEVEL_HACKER:
......@@ -57,9 +57,6 @@ nautilus_window_set_initial_state (NautilusWindow *window, const char *initial_u
g_string_append (path_name, g_get_home_dir ());
break;
}
#else
g_string_append (path_name, g_get_home_dir ());
#endif
nautilus_window_goto_uri (window, path_name->str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment