summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-application.c6
-rw-r--r--src/nautilus-application.h2
-rw-r--r--src/nautilus-first-time-druid.c8
-rw-r--r--src/nautilus-first-time-druid.h3
-rw-r--r--src/nautilus-main.c27
5 files changed, 22 insertions, 24 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 7e9a138b4..57410b58c 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -338,8 +338,8 @@ void
nautilus_application_startup (NautilusApplication *application,
gboolean kill_shell,
gboolean restart_shell,
- gboolean start_desktop,
gboolean no_default_window,
+ gboolean no_desktop,
gboolean do_first_time_druid_check,
const char *geometry,
const char *urls[])
@@ -371,7 +371,7 @@ nautilus_application_startup (NautilusApplication *application,
/* Run the first time startup druid if needed. */
if (do_first_time_druid_check && need_to_show_first_time_druid ()) {
- nautilus_first_time_druid_show (application, start_desktop, urls);
+ nautilus_first_time_druid_show (application, urls);
return;
}
@@ -489,7 +489,7 @@ nautilus_application_startup (NautilusApplication *application,
} else if (restart_shell) {
Nautilus_Shell_restart (shell, &ev);
} else {
- if (start_desktop) {
+ if (!no_desktop && nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP)) {
Nautilus_Shell_start_desktop (shell, &ev);
}
diff --git a/src/nautilus-application.h b/src/nautilus-application.h
index d8f4d020e..064205022 100644
--- a/src/nautilus-application.h
+++ b/src/nautilus-application.h
@@ -57,8 +57,8 @@ NautilusApplication *nautilus_application_new (void);
void nautilus_application_startup (NautilusApplication *application,
gboolean kill_shell,
gboolean restart_shell,
- gboolean start_desktop,
gboolean no_default_window,
+ gboolean no_desktop,
gboolean do_first_time_druid_check,
const char *default_geometry,
const char *urls[]);
diff --git a/src/nautilus-first-time-druid.c b/src/nautilus-first-time-druid.c
index 49fed066f..3009d4612 100644
--- a/src/nautilus-first-time-druid.c
+++ b/src/nautilus-first-time-druid.c
@@ -97,7 +97,6 @@ enum {
/* globals */
static NautilusApplication *save_application;
-static gboolean save_manage_desktop;
static GtkWidget *start_page;
static GtkWidget *finish_page;
@@ -292,7 +291,7 @@ set_up_background (NautilusDruidPageEazel *page, const char *background_color)
}
static void
-update_draw_desktop_checkbox_state ()
+update_draw_desktop_checkbox_state (void)
{
if (current_user_level == NAUTILUS_USER_LEVEL_NOVICE) {
gtk_widget_hide (draw_desktop_checkbox_widget);
@@ -897,7 +896,7 @@ set_up_gmc_transition_page (NautilusDruidPageEazel *page)
GtkWidget *checkbox, *label;
GtkWidget *container, *main_box, *hbox;
- draw_desktop = save_manage_desktop;
+ draw_desktop = TRUE;
add_to_session = TRUE;
transfer_gmc_icons = TRUE;
@@ -1037,7 +1036,7 @@ update_finished_label (void)
}
GtkWidget *
-nautilus_first_time_druid_show (NautilusApplication *application, gboolean manage_desktop, const char *urls[])
+nautilus_first_time_druid_show (NautilusApplication *application, const char *urls[])
{
GtkWidget *dialog;
GtkWidget *druid;
@@ -1046,7 +1045,6 @@ nautilus_first_time_druid_show (NautilusApplication *application, gboolean manag
/* remember parameters for later window invocation */
save_application = application;
- save_manage_desktop = manage_desktop;
current_user_level = nautilus_preferences_get_user_level ();
diff --git a/src/nautilus-first-time-druid.h b/src/nautilus-first-time-druid.h
index 4ae24c710..a2892b47d 100644
--- a/src/nautilus-first-time-druid.h
+++ b/src/nautilus-first-time-druid.h
@@ -33,7 +33,6 @@
#include "nautilus-application.h"
GtkWidget *nautilus_first_time_druid_show (NautilusApplication *application,
- gboolean manage_desktop,
- const char *urls[]);
+ const char *urls[]);
#endif /* NAUTILUS_FIRST_TIME_DRUID_H */
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index d4303df99..ac055ef7a 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -128,8 +128,8 @@ main (int argc, char *argv[])
{
gboolean kill_shell;
gboolean restart_shell;
- gboolean start_desktop;
gboolean no_default_window;
+ gboolean no_desktop;
char *geometry;
gboolean perform_self_check;
poptContext popt_context;
@@ -147,6 +147,8 @@ main (int argc, char *argv[])
N_("Create the initial window with the given geometry."), N_("GEOMETRY") },
{ "no-default-window", 'n', POPT_ARG_NONE, &no_default_window, 0,
N_("Only create windows for explicitly specified URIs."), NULL },
+ { "no-desktop", '\0', POPT_ARG_NONE, &no_desktop, 0,
+ N_("Do not manage the desktop (ignore the preference set in the preferences dialog)."), NULL },
{ "quit", 'q', POPT_ARG_NONE, &kill_shell, 0,
N_("Quit Nautilus."), NULL },
{ "restart", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, &restart_shell, 0,
@@ -190,6 +192,7 @@ main (int argc, char *argv[])
geometry = NULL;
kill_shell = FALSE;
no_default_window = FALSE;
+ no_desktop = FALSE;
perform_self_check = FALSE;
restart_shell = FALSE;
@@ -239,26 +242,24 @@ main (int argc, char *argv[])
/* Initialize preferences. This is needed so that proper
* defaults are available before any preference peeking
- * happens. Do this only if we are not goinh to kill the
+ * happens. Do this only if we are not going to kill the
* nautilus shell.
*/
if (!kill_shell) {
nautilus_global_preferences_initialize ();
- start_desktop = nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP);
- } else {
- start_desktop = FALSE;
+ if (no_desktop) {
+ nautilus_preferences_set_is_invisible
+ (NAUTILUS_PREFERENCES_SHOW_DESKTOP, TRUE);
+ nautilus_preferences_set_is_invisible
+ (NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, TRUE);
+ }
}
/* Do either the self-check or the real work. */
if (perform_self_check) {
#ifndef NAUTILUS_OMIT_SELF_CHECK
- /* Run the checks (each twice) for:
- *
- * nautilus
- * eel
- * libnautilus-extensions
- *
- */
+ /* Run the checks (each twice) for nautilus and libnautilus-extensions. */
+
nautilus_directory_use_self_contained_metafile_factory ();
nautilus_run_self_checks ();
@@ -274,7 +275,7 @@ main (int argc, char *argv[])
application = nautilus_application_new ();
nautilus_application_startup
(application,
- kill_shell, restart_shell, start_desktop, no_default_window,
+ kill_shell, restart_shell, no_default_window, no_desktop,
!(kill_shell || restart_shell),
geometry,
args);