Commit 76b5dd25 authored by Mike Engber's avatar Mike Engber

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.
parent b31ea1e0
2000-12-08 Michael Engber <engber@eazel.com>
* 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.
2000-12-08 Darin Adler <darin@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
......
......@@ -953,9 +953,9 @@ global_preferences_register (void)
global_preferences_register_boolean_with_defaults (NAUTILUS_PREFERENCES_SHOW_DESKTOP,
_("Use Nautilus to draw the desktop"),
FALSE,
FALSE,
FALSE);
TRUE,
TRUE,
TRUE);
/* search tradeoffs */
global_preferences_register_boolean_with_defaults (NAUTILUS_PREFERENCES_SEARCH_METHOD,
......
......@@ -953,9 +953,9 @@ global_preferences_register (void)
global_preferences_register_boolean_with_defaults (NAUTILUS_PREFERENCES_SHOW_DESKTOP,
_("Use Nautilus to draw the desktop"),
FALSE,
FALSE,
FALSE);
TRUE,
TRUE,
TRUE);
/* search tradeoffs */
global_preferences_register_boolean_with_defaults (NAUTILUS_PREFERENCES_SEARCH_METHOD,
......
......@@ -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
};
......
......@@ -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>
......
......@@ -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 ();
......
......@@ -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);
......
......@@ -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 ();
......
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