Commit 98bf8d77 authored by Ramiro Estrugo's avatar Ramiro Estrugo

Add functions for hiding the preferences dialog and changing its title.

* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_create_dialog),
(global_preferences_close_dialog_callback),
(nautilus_global_preferences_show_dialog),
(nautilus_global_preferences_hide_dialog),
(nautilus_global_preferences_set_dialog_title):
* libnautilus-extensions/nautilus-global-preferences.h:
Add functions for hiding the preferences dialog and changing its
title.  Also, connect a "closed" signal to prevent the dialog from
killing itself since its singleton and lives for the entire life
of the application.

* nautilus-widgets/nautilus-user-level-manager.c:
(nautilus_user_level_manager_get_user_level),
(nautilus_user_level_manager_make_current_gconf_key),
(nautilus_user_level_manager_get_user_level_string):
* nautilus-widgets/nautilus-user-level-manager.h:
Make nautilus_user_level_manager_get_user_level_string () public.

* src/nautilus-window-menus.c: (settings_menu_customize_callback),
(nautilus_window_initialize_menus), (user_level_changed_callback),
(update_user_level_menu_items), (get_customize_user_level_string),
(get_customize_user_level_setttings_menu_string):
Change the customize menu item's label based on the user level.
Make it insensitive for the novice user level.  Close the
preferences dialog when the user level changes to novice.
parent 42cabf1b
2000-06-02 Ramiro Estrugo <ramiro@eazel.com>
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_create_dialog),
(global_preferences_close_dialog_callback),
(nautilus_global_preferences_show_dialog),
(nautilus_global_preferences_hide_dialog),
(nautilus_global_preferences_set_dialog_title):
* libnautilus-extensions/nautilus-global-preferences.h:
Add functions for hiding the preferences dialog and changing its
title. Also, connect a "closed" signal to prevent the dialog from
killing itself since its singleton and lives for the entire life
of the application.
* nautilus-widgets/nautilus-user-level-manager.c:
(nautilus_user_level_manager_get_user_level),
(nautilus_user_level_manager_make_current_gconf_key),
(nautilus_user_level_manager_get_user_level_string):
* nautilus-widgets/nautilus-user-level-manager.h:
Make nautilus_user_level_manager_get_user_level_string () public.
* src/nautilus-window-menus.c: (settings_menu_customize_callback),
(nautilus_window_initialize_menus), (user_level_changed_callback),
(update_user_level_menu_items), (get_customize_user_level_string),
(get_customize_user_level_setttings_menu_string):
Change the customize menu item's label based on the user level.
Make it insensitive for the novice user level. Close the
preferences dialog when the user level changes to novice.
2000-06-02 Ramiro Estrugo <ramiro@eazel.com> 2000-06-02 Ramiro Estrugo <ramiro@eazel.com>
* libnautilus-extensions/nautilus-string.c: * libnautilus-extensions/nautilus-string.c:
......
...@@ -47,6 +47,8 @@ static char * global_preferences_get_sidebar_panel_key (const c ...@@ -47,6 +47,8 @@ static char * global_preferences_get_sidebar_panel_key (const c
static gboolean global_preferences_is_sidebar_panel_enabled (NautilusViewIdentifier *panel_identifier, static gboolean global_preferences_is_sidebar_panel_enabled (NautilusViewIdentifier *panel_identifier,
gpointer ignore); gpointer ignore);
static GList * global_preferences_get_sidebar_panel_view_identifiers (void); static GList * global_preferences_get_sidebar_panel_view_identifiers (void);
static gboolean global_preferences_close_dialog_callback (GtkWidget *dialog,
gpointer user_data);
/* /*
* Private stuff * Private stuff
...@@ -67,6 +69,11 @@ global_preferences_create_dialog (void) ...@@ -67,6 +69,11 @@ global_preferences_create_dialog (void)
*/ */
prefs_dialog = nautilus_preferences_dialog_new (GLOBAL_PREFERENCES_DIALOG_TITLE); prefs_dialog = nautilus_preferences_dialog_new (GLOBAL_PREFERENCES_DIALOG_TITLE);
gtk_signal_connect (GTK_OBJECT (prefs_dialog),
"close",
GTK_SIGNAL_FUNC (global_preferences_close_dialog_callback),
NULL);
/* Create a preference box */ /* Create a preference box */
preference_box = NAUTILUS_PREFERENCES_BOX (nautilus_preferences_dialog_get_prefs_box preference_box = NAUTILUS_PREFERENCES_BOX (nautilus_preferences_dialog_get_prefs_box
(NAUTILUS_PREFERENCES_DIALOG (prefs_dialog))); (NAUTILUS_PREFERENCES_DIALOG (prefs_dialog)));
...@@ -398,6 +405,15 @@ global_preferences_register_for_ui (void) ...@@ -398,6 +405,15 @@ global_preferences_register_for_ui (void)
(gconstpointer) FALSE); (gconstpointer) FALSE);
} }
static gboolean
global_preferences_close_dialog_callback (GtkWidget *dialog,
gpointer user_data)
{
nautilus_global_preferences_hide_dialog ();
return TRUE;
}
#define USER_LEVEL_NOVICE 0 #define USER_LEVEL_NOVICE 0
#define USER_LEVEL_INTERMEDIATE 1 #define USER_LEVEL_INTERMEDIATE 1
#define USER_LEVEL_HACKER 2 #define USER_LEVEL_HACKER 2
...@@ -479,6 +495,25 @@ nautilus_global_preferences_show_dialog (void) ...@@ -479,6 +495,25 @@ nautilus_global_preferences_show_dialog (void)
gtk_widget_show (global_prefs_dialog); gtk_widget_show (global_prefs_dialog);
} }
void
nautilus_global_preferences_hide_dialog (void)
{
GtkWidget * global_prefs_dialog = global_preferences_get_dialog ();
gtk_widget_hide (global_prefs_dialog);
}
void
nautilus_global_preferences_set_dialog_title (const char *title)
{
GtkWidget *global_prefs_dialog;
g_return_if_fail (title != NULL);
global_prefs_dialog = global_preferences_get_dialog ();
gtk_window_set_title (GTK_WINDOW (global_prefs_dialog), title);
}
void void
nautilus_global_preferences_shutdown (void) nautilus_global_preferences_shutdown (void)
{ {
......
...@@ -77,6 +77,8 @@ void nautilus_global_preferences_startup ( ...@@ -77,6 +77,8 @@ void nautilus_global_preferences_startup (
char **argv); char **argv);
void nautilus_global_preferences_shutdown (void); void nautilus_global_preferences_shutdown (void);
void nautilus_global_preferences_show_dialog (void); void nautilus_global_preferences_show_dialog (void);
void nautilus_global_preferences_hide_dialog (void);
void nautilus_global_preferences_set_dialog_title (const char *title);
/* Sidebar */ /* Sidebar */
GList *nautilus_global_preferences_get_enabled_sidebar_panel_view_identifiers (void); GList *nautilus_global_preferences_get_enabled_sidebar_panel_view_identifiers (void);
......
...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G ...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G
static NautilusUserLevelManager *user_level_manager_new (void); static NautilusUserLevelManager *user_level_manager_new (void);
static void user_level_manager_ensure_global_manager (void); static void user_level_manager_ensure_global_manager (void);
static void user_level_set_default_if_needed (NautilusUserLevelManager *manager); static void user_level_set_default_if_needed (NautilusUserLevelManager *manager);
char * gconf_get_user_level_string (void);
/* Gconf callbacks */ /* Gconf callbacks */
...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void) ...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void)
g_assert (global_manager != NULL); g_assert (global_manager != NULL);
} }
char *
gconf_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
static void static void
user_level_set_default_if_needed (NautilusUserLevelManager *manager) user_level_set_default_if_needed (NautilusUserLevelManager *manager)
{ {
...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void) ...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string; char *user_level_string;
gint index; gint index;
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf /* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if * seems like a bad idea. It means we core dump if
* something's wrong. * something's wrong.
...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
g_return_val_if_fail (preference_name != NULL, NULL); g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL); g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s", key = g_strdup_printf ("%s/%s/%s",
...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
return key; return key;
} }
char *
nautilus_user_level_manager_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager; ...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager;
* "user_level_changed", no parameters * "user_level_changed", no parameters
* *
*/ */
NautilusUserLevelManager* nautilus_user_level_manager_get (void); NautilusUserLevelManager* nautilus_user_level_manager_get (void);
void nautilus_user_level_manager_set_user_level (guint user_level); void nautilus_user_level_manager_set_user_level (guint user_level);
guint nautilus_user_level_manager_get_user_level (void); guint nautilus_user_level_manager_get_user_level (void);
guint nautilus_user_level_manager_get_num_user_levels (void); guint nautilus_user_level_manager_get_num_user_levels (void);
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void); NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
GtkObject *nautilus_user_level_manager_get_gconf_client (void); GtkObject *nautilus_user_level_manager_get_gconf_client (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name); char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name, char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level); int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
BEGIN_GNOME_DECLS BEGIN_GNOME_DECLS
......
...@@ -47,6 +47,8 @@ static char * global_preferences_get_sidebar_panel_key (const c ...@@ -47,6 +47,8 @@ static char * global_preferences_get_sidebar_panel_key (const c
static gboolean global_preferences_is_sidebar_panel_enabled (NautilusViewIdentifier *panel_identifier, static gboolean global_preferences_is_sidebar_panel_enabled (NautilusViewIdentifier *panel_identifier,
gpointer ignore); gpointer ignore);
static GList * global_preferences_get_sidebar_panel_view_identifiers (void); static GList * global_preferences_get_sidebar_panel_view_identifiers (void);
static gboolean global_preferences_close_dialog_callback (GtkWidget *dialog,
gpointer user_data);
/* /*
* Private stuff * Private stuff
...@@ -67,6 +69,11 @@ global_preferences_create_dialog (void) ...@@ -67,6 +69,11 @@ global_preferences_create_dialog (void)
*/ */
prefs_dialog = nautilus_preferences_dialog_new (GLOBAL_PREFERENCES_DIALOG_TITLE); prefs_dialog = nautilus_preferences_dialog_new (GLOBAL_PREFERENCES_DIALOG_TITLE);
gtk_signal_connect (GTK_OBJECT (prefs_dialog),
"close",
GTK_SIGNAL_FUNC (global_preferences_close_dialog_callback),
NULL);
/* Create a preference box */ /* Create a preference box */
preference_box = NAUTILUS_PREFERENCES_BOX (nautilus_preferences_dialog_get_prefs_box preference_box = NAUTILUS_PREFERENCES_BOX (nautilus_preferences_dialog_get_prefs_box
(NAUTILUS_PREFERENCES_DIALOG (prefs_dialog))); (NAUTILUS_PREFERENCES_DIALOG (prefs_dialog)));
...@@ -398,6 +405,15 @@ global_preferences_register_for_ui (void) ...@@ -398,6 +405,15 @@ global_preferences_register_for_ui (void)
(gconstpointer) FALSE); (gconstpointer) FALSE);
} }
static gboolean
global_preferences_close_dialog_callback (GtkWidget *dialog,
gpointer user_data)
{
nautilus_global_preferences_hide_dialog ();
return TRUE;
}
#define USER_LEVEL_NOVICE 0 #define USER_LEVEL_NOVICE 0
#define USER_LEVEL_INTERMEDIATE 1 #define USER_LEVEL_INTERMEDIATE 1
#define USER_LEVEL_HACKER 2 #define USER_LEVEL_HACKER 2
...@@ -479,6 +495,25 @@ nautilus_global_preferences_show_dialog (void) ...@@ -479,6 +495,25 @@ nautilus_global_preferences_show_dialog (void)
gtk_widget_show (global_prefs_dialog); gtk_widget_show (global_prefs_dialog);
} }
void
nautilus_global_preferences_hide_dialog (void)
{
GtkWidget * global_prefs_dialog = global_preferences_get_dialog ();
gtk_widget_hide (global_prefs_dialog);
}
void
nautilus_global_preferences_set_dialog_title (const char *title)
{
GtkWidget *global_prefs_dialog;
g_return_if_fail (title != NULL);
global_prefs_dialog = global_preferences_get_dialog ();
gtk_window_set_title (GTK_WINDOW (global_prefs_dialog), title);
}
void void
nautilus_global_preferences_shutdown (void) nautilus_global_preferences_shutdown (void)
{ {
......
...@@ -77,6 +77,8 @@ void nautilus_global_preferences_startup ( ...@@ -77,6 +77,8 @@ void nautilus_global_preferences_startup (
char **argv); char **argv);
void nautilus_global_preferences_shutdown (void); void nautilus_global_preferences_shutdown (void);
void nautilus_global_preferences_show_dialog (void); void nautilus_global_preferences_show_dialog (void);
void nautilus_global_preferences_hide_dialog (void);
void nautilus_global_preferences_set_dialog_title (const char *title);
/* Sidebar */ /* Sidebar */
GList *nautilus_global_preferences_get_enabled_sidebar_panel_view_identifiers (void); GList *nautilus_global_preferences_get_enabled_sidebar_panel_view_identifiers (void);
......
...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G ...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G
static NautilusUserLevelManager *user_level_manager_new (void); static NautilusUserLevelManager *user_level_manager_new (void);
static void user_level_manager_ensure_global_manager (void); static void user_level_manager_ensure_global_manager (void);
static void user_level_set_default_if_needed (NautilusUserLevelManager *manager); static void user_level_set_default_if_needed (NautilusUserLevelManager *manager);
char * gconf_get_user_level_string (void);
/* Gconf callbacks */ /* Gconf callbacks */
...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void) ...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void)
g_assert (global_manager != NULL); g_assert (global_manager != NULL);
} }
char *
gconf_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
static void static void
user_level_set_default_if_needed (NautilusUserLevelManager *manager) user_level_set_default_if_needed (NautilusUserLevelManager *manager)
{ {
...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void) ...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string; char *user_level_string;
gint index; gint index;
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf /* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if * seems like a bad idea. It means we core dump if
* something's wrong. * something's wrong.
...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
g_return_val_if_fail (preference_name != NULL, NULL); g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL); g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s", key = g_strdup_printf ("%s/%s/%s",
...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
return key; return key;
} }
char *
nautilus_user_level_manager_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager; ...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager;
* "user_level_changed", no parameters * "user_level_changed", no parameters
* *
*/ */
NautilusUserLevelManager* nautilus_user_level_manager_get (void); NautilusUserLevelManager* nautilus_user_level_manager_get (void);
void nautilus_user_level_manager_set_user_level (guint user_level); void nautilus_user_level_manager_set_user_level (guint user_level);
guint nautilus_user_level_manager_get_user_level (void); guint nautilus_user_level_manager_get_user_level (void);
guint nautilus_user_level_manager_get_num_user_levels (void); guint nautilus_user_level_manager_get_num_user_levels (void);
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void); NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
GtkObject *nautilus_user_level_manager_get_gconf_client (void); GtkObject *nautilus_user_level_manager_get_gconf_client (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name); char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name, char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level); int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
BEGIN_GNOME_DECLS BEGIN_GNOME_DECLS
......
...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G ...@@ -88,7 +88,6 @@ static void user_level_manager_destroy (G
static NautilusUserLevelManager *user_level_manager_new (void); static NautilusUserLevelManager *user_level_manager_new (void);
static void user_level_manager_ensure_global_manager (void); static void user_level_manager_ensure_global_manager (void);
static void user_level_set_default_if_needed (NautilusUserLevelManager *manager); static void user_level_set_default_if_needed (NautilusUserLevelManager *manager);
char * gconf_get_user_level_string (void);
/* Gconf callbacks */ /* Gconf callbacks */
...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void) ...@@ -204,19 +203,6 @@ user_level_manager_ensure_global_manager (void)
g_assert (global_manager != NULL); g_assert (global_manager != NULL);
} }
char *
gconf_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
static void static void
user_level_set_default_if_needed (NautilusUserLevelManager *manager) user_level_set_default_if_needed (NautilusUserLevelManager *manager)
{ {
...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void) ...@@ -305,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string; char *user_level_string;
gint index; gint index;
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
/* FIXME: Asserting based on something that's read from GConf /* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if * seems like a bad idea. It means we core dump if
* something's wrong. * something's wrong.
...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -388,7 +374,7 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
g_return_val_if_fail (preference_name != NULL, NULL); g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = gconf_get_user_level_string (); user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL); g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s", key = g_strdup_printf ("%s/%s/%s",
...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name) ...@@ -401,3 +387,15 @@ nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
return key; return key;
} }
char *
nautilus_user_level_manager_get_user_level_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
g_assert (manager->gconf_client != NULL);
user_level_string = gconf_client_get_string (manager->gconf_client, USER_LEVEL_KEY, NULL);
return user_level_string;
}
...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager; ...@@ -39,15 +39,17 @@ typedef struct _NautilusUserLevelManager NautilusUserLevelManager;
* "user_level_changed", no parameters * "user_level_changed", no parameters
* *
*/ */
NautilusUserLevelManager* nautilus_user_level_manager_get (void); NautilusUserLevelManager* nautilus_user_level_manager_get (void);
void nautilus_user_level_manager_set_user_level (guint user_level); void nautilus_user_level_manager_set_user_level (guint user_level);
guint nautilus_user_level_manager_get_user_level (void); guint nautilus_user_level_manager_get_user_level (void);
guint nautilus_user_level_manager_get_num_user_levels (void); guint nautilus_user_level_manager_get_num_user_levels (void);
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void); NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
GtkObject *nautilus_user_level_manager_get_gconf_client (void); GtkObject *nautilus_user_level_manager_get_gconf_client (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name); char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name, char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level); int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
BEGIN_GNOME_DECLS BEGIN_GNOME_DECLS
......
...@@ -44,25 +44,33 @@ ...@@ -44,25 +44,33 @@
static GtkWindow *bookmarks_window = NULL; static GtkWindow *bookmarks_window = NULL;
static void activate_bookmark_in_menu_item (BonoboUIHandler *uih, static void activate_bookmark_in_menu_item (BonoboUIHandler *uih,
gpointer user_data, gpointer user_data,
const char *path); const char *path);
static void append_bookmark_to_menu (NautilusWindow *window, static void append_bookmark_to_menu (NautilusWindow *window,
const NautilusBookmark *bookmark, const NautilusBookmark *bookmark,
const char *menu_item_path); const char *menu_item_path);
static void clear_appended_bookmark_items (NautilusWindow *window, static void clear_appended_bookmark_items (NautilusWindow *window,
const char *menu_path, const char *menu_path,
const char *last_static_item_path); const char *last_static_item_path);
static NautilusBookmarkList *get_bookmark_list (void); static NautilusBookmarkList *get_bookmark_list (void);
static void refresh_bookmarks_in_go_menu (NautilusWindow *window); static void refresh_bookmarks_in_go_menu (NautilusWindow *window);
static void refresh_bookmarks_in_bookmarks_menu (NautilusWindow *window); static void refresh_bookmarks_in_bookmarks_menu (NautilusWindow *window);
static void update_eazel_theme_menu_item (NautilusWindow *window); static void update_eazel_theme_menu_item (NautilusWindow *window);
static void update_undo_menu_item (NautilusWindow *window); static void update_undo_menu_item (NautilusWindow *window);
static void edit_bookmarks (NautilusWindow *window); static void edit_bookmarks (NautilusWindow *window);
/* User level things */ /* User level things */
static guint convert_menu_path_to_user_level (const char *path); static guint convert_menu_path_to_user_level (const char *path);
static const char * convert_user_level_to_menu_path (guint user_level); static const char * convert_user_level_to_menu_path (guint user_level);
static char * get_customize_user_level_setttings_menu_string (void);
static void update_user_level_menu_items (NautilusWindow *window);
static void user_level_changed_callback (GtkObject *user_level_manager,
gpointer user_data);
static char * get_customize_user_level_string (void);
/* Struct that stores all the info necessary to activate a bookmark. */ /* Struct that stores all the info necessary to activate a bookmark. */
typedef struct { typedef struct {
...@@ -307,7 +315,7 @@ settings_menu_customize_callback (BonoboUIHandler *ui_handler, ...@@ -307,7 +315,7 @@ settings_menu_customize_callback (BonoboUIHandler *ui_handler,
gpointer user_data, gpointer user_data,
const char *path) const char *path)
{ {
nautilus_property_browser_new(); nautilus_property_browser_new ();
} }
static void static void
...@@ -863,8 +871,8 @@ nautilus_window_initialize_menus (NautilusWindow *window) ...@@ -863,8 +871,8 @@ nautilus_window_initialize_menus (NautilusWindow *window)