From feb63a0bdc5f09b4a822ebc31f2217d1a767247a Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 20 Feb 2002 20:50:10 +0000 Subject: Don't show the folder bar and the shortcut bar in the new window. * e-shell-view-menu.c (command_open_folder_in_new_window): Don't show the folder bar and the shortcut bar in the new window. * e-shell-view.c (activate_shortcut_cb): Don't show the folder bar and the shortcut bar in the new window. * e-shell-view.c (e_shell_create_view): Don't flush the GTK events here. * e-shell.c (e_shell_construct): New arg @start_online. If true, invoke `e_shell_go_online()' before returning. (e_shell_new): New arg @start_online. Pass it to e_shell_construct(). (init): Default ->line_status to E_SHELL_LINE_STATUS_OFFLINE. * main.c (main): Add "--offline" and "--online" options. svn path=/trunk/; revision=15776 --- shell/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'shell/main.c') diff --git a/shell/main.c b/shell/main.c index 766d6e6d7d..db335603e8 100644 --- a/shell/main.c +++ b/shell/main.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -60,7 +61,11 @@ static EShell *shell = NULL; static char *evolution_directory = NULL; + +/* Command-line options. */ static gboolean no_splash = FALSE; +static gboolean start_online = FALSE; +static gboolean start_offline = FALSE; extern char *evolution_debug_log; @@ -190,7 +195,7 @@ idle_cb (void *data) uri_list = (GSList *) data; - shell = e_shell_new (evolution_directory, ! no_splash, &result); + shell = e_shell_new (evolution_directory, ! no_splash, ! start_offline, &result); g_free (evolution_directory); switch (result) { @@ -287,6 +292,8 @@ main (int argc, char **argv) { struct poptOption options[] = { { "no-splash", '\0', POPT_ARG_NONE, &no_splash, 0, N_("Disable splash screen"), NULL }, + { "offline", '\0', POPT_ARG_NONE, &start_offline, 0, N_("Start in offline mode"), NULL }, + { "online", '\0', POPT_ARG_NONE, &start_online, 0, N_("Start in online mode"), NULL }, { "debug", '\0', POPT_ARG_STRING, &evolution_debug_log, 0, N_("Send the debugging output of all components to a file."), NULL }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP @@ -304,6 +311,12 @@ main (int argc, char **argv) gnome_init_with_popt_table ("Evolution", VERSION " [" SUB_VERSION "]", argc, argv, options, 0, &popt_context); + if (start_online && start_offline) { + fprintf (stderr, _("%s: --online and --offline cannot be used together.\n Use %s --help for more information.\n"), + argv[0], argv[0]); + exit (1); + } + if (evolution_debug_log) { int fd; -- cgit