diff options
author | Mike Engber <engber@src.gnome.org> | 2000-12-09 00:18:31 +0000 |
---|---|---|
committer | Mike Engber <engber@src.gnome.org> | 2000-12-09 00:18:31 +0000 |
commit | 76b5dd2512312b1212a3a6d0e44518c1a82bfb32 (patch) | |
tree | 378fe0f6d69dbf56e576c96e2e7ef815af013082 /src | |
parent | b31ea1e0209acd943cc54c7c222ebb0031f64fa7 (diff) | |
download | nautilus-76b5dd2512312b1212a3a6d0e44518c1a82bfb32.tar.gz |
Remove command line args --start-desktop & --stop-desktop and the "Quit
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_register):
* src/file-manager/fm-desktop-icon-view.c: (real_merge_menus):
* src/file-manager/nautilus-desktop-icon-view-ui.xml:
* src/nautilus-application.c: (nautilus_application_startup),
(desktop_changed_callback):
* src/nautilus-application.h:
* src/nautilus-main.c: (main):
Remove command line args --start-desktop & --stop-desktop and the
"Quit Nautilus Desktop" item from the desktop right click menu.
Add the command line arg: --no-default-window. Default for the
show desktop pref is now ON.
Diffstat (limited to 'src')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 9 | ||||
-rw-r--r-- | src/file-manager/nautilus-desktop-icon-view-ui.xml | 5 | ||||
-rw-r--r-- | src/nautilus-application.c | 10 | ||||
-rw-r--r-- | src/nautilus-application.h | 2 | ||||
-rw-r--r-- | src/nautilus-main.c | 29 |
5 files changed, 10 insertions, 45 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index dec3a87e8..603068275 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -394,14 +394,6 @@ reset_background_callback (BonoboUIComponent *component, (fm_directory_view_get_background (FM_DIRECTORY_VIEW (data))); } -static void -quit_desktop_callback (BonoboUIComponent *component, - gpointer data, - const char *verb) -{ - nautilus_application_close_desktop (); -} - static gboolean trash_link_is_selection (FMDirectoryView *view) { @@ -1114,7 +1106,6 @@ real_merge_menus (FMDirectoryView *view) BONOBO_UI_VERB ("Empty Trash Conditional", empty_trash_callback), BONOBO_UI_VERB ("New Terminal", new_terminal_callback), BONOBO_UI_VERB ("Reset Background", reset_background_callback), - BONOBO_UI_VERB ("Quit Desktop", quit_desktop_callback), BONOBO_UI_VERB_END }; diff --git a/src/file-manager/nautilus-desktop-icon-view-ui.xml b/src/file-manager/nautilus-desktop-icon-view-ui.xml index 43941985f..dee53556d 100644 --- a/src/file-manager/nautilus-desktop-icon-view-ui.xml +++ b/src/file-manager/nautilus-desktop-icon-view-ui.xml @@ -9,9 +9,6 @@ <cmd name="New Terminal" _label="New Terminal" _tip="Open a new GNOME terminal window"/> - <cmd name="Quit Desktop" - _label="Quit Nautilus Desktop" - _tip="Stop letting Nautilus draw the desktop"/> <cmd name="Reset Background" _label="Reset Desktop Background" _tip="Remove any custom pattern or color from the desktop background"/> @@ -33,8 +30,6 @@ <menuitem name="Reset Background" verb="Reset Background"/> <menuitem name="Change Background" verb="Change Background"/> </placeholder> - <separator/> - <menuitem name="Quit Desktop" verb="Quit Desktop"/> </placeholder> </popup> diff --git a/src/nautilus-application.c b/src/nautilus-application.c index ba6e92e3b..096f8e9e6 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -298,8 +298,8 @@ void nautilus_application_startup (NautilusApplication *application, gboolean kill_shell, gboolean restart_shell, - gboolean stop_desktop, gboolean start_desktop, + gboolean no_default_window, const char *urls[]) { CORBA_Environment ev; @@ -425,16 +425,12 @@ nautilus_application_startup (NautilusApplication *application, Nautilus_Shell_start_desktop (shell, &ev); } - if (stop_desktop) { - Nautilus_Shell_stop_desktop (shell, &ev); - } - /* Create the other windows. */ if (urls != NULL) { url_list = nautilus_make_uri_list_from_strv (urls); Nautilus_Shell_open_windows (shell, url_list, &ev); CORBA_free (url_list); - } else if (!stop_desktop) { + } else if (!no_default_window) { Nautilus_Shell_open_default_window (shell, &ev); } } @@ -567,7 +563,7 @@ desktop_changed_callback (gpointer user_data) NautilusApplication *application; application = NAUTILUS_APPLICATION (user_data); - if ( nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP, FALSE)) { + if ( nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP, TRUE)) { nautilus_application_open_desktop (application); } else { nautilus_application_close_desktop (); diff --git a/src/nautilus-application.h b/src/nautilus-application.h index e19fb942d..751d6ffa6 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 stop_desktop, gboolean start_desktop, + gboolean no_default_window, const char *urls[]); GSList *nautilus_application_windows (void); diff --git a/src/nautilus-main.c b/src/nautilus-main.c index 979bc6570..f5ed18356 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -126,8 +126,8 @@ main (int argc, char *argv[]) { gboolean kill_shell; gboolean restart_shell; - gboolean stop_desktop; gboolean start_desktop; + gboolean no_default_window; gboolean perform_self_check; poptContext popt_context; const char **args; @@ -141,8 +141,7 @@ main (int argc, char *argv[]) #endif { "quit", '\0', POPT_ARG_NONE, &kill_shell, 0, N_("Quit Nautilus."), NULL }, { "restart", '\0', POPT_ARG_NONE, &restart_shell, 0, N_("Restart Nautilus."), NULL }, - { "stop-desktop", '\0', POPT_ARG_NONE, &stop_desktop, 0, N_("Don't draw background and icons on desktop."), NULL }, - { "start-desktop", '\0', POPT_ARG_NONE, &start_desktop, 0, N_("Draw background and icons on desktop."), NULL }, + { "no-default-window", '\0', POPT_ARG_NONE, &no_default_window, 0, N_("Only create Nautilus windows for explicity specified URIs."), NULL }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } @@ -183,8 +182,8 @@ main (int argc, char *argv[]) /* Get parameters. */ kill_shell = FALSE; restart_shell = FALSE; - stop_desktop = FALSE; start_desktop = FALSE; + no_default_window = FALSE; perform_self_check = FALSE; gnome_init_with_popt_table ("nautilus", VERSION, argc, argv, options, 0, @@ -196,7 +195,7 @@ main (int argc, char *argv[]) fprintf (stderr, _("nautilus: --check cannot be used with URIs.\n")); return EXIT_FAILURE; } - if (perform_self_check && (kill_shell || restart_shell || stop_desktop || start_desktop)) { + if (perform_self_check && (kill_shell || restart_shell || start_desktop || no_default_window)) { fprintf (stderr, _("nautilus: --check cannot be used with other options.\n")); return EXIT_FAILURE; } @@ -208,18 +207,6 @@ main (int argc, char *argv[]) fprintf (stderr, _("nautilus: --restart cannot be used with URIs.\n")); return EXIT_FAILURE; } - if (kill_shell && start_desktop) { - fprintf (stderr, _("nautilus: --quit and --start-desktop cannot be used together.\n")); - return EXIT_FAILURE; - } - if (restart_shell && start_desktop) { - fprintf (stderr, _("nautilus: --restart and --start-desktop cannot be used together.\n")); - return EXIT_FAILURE; - } - if (stop_desktop && start_desktop) { - fprintf (stderr, _("nautilus: --stop-desktop and --start-desktop cannot be used together.\n")); - return EXIT_FAILURE; - } /* Initialize the services that we use. */ LIBXML_TEST_VERSION @@ -239,10 +226,7 @@ main (int argc, char *argv[]) */ nautilus_global_preferences_initialize (); - /* if desktop flags are not explicitly specified, get it from preferences */ - if (!start_desktop && !stop_desktop) { - start_desktop = nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP, FALSE); - } + start_desktop = nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP, TRUE); /* Do either the self-check or the real work. */ if (perform_self_check) { @@ -260,8 +244,7 @@ main (int argc, char *argv[]) application = nautilus_application_new (); nautilus_application_startup (application, - kill_shell, restart_shell, - stop_desktop, start_desktop, + kill_shell, restart_shell, start_desktop, no_default_window, args); if (is_event_loop_needed ()) { bonobo_main (); |