aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-02-21 04:50:10 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-02-21 04:50:10 +0800
commitfeb63a0bdc5f09b4a822ebc31f2217d1a767247a (patch)
treedcf5dcd9fd0afb86adb5663a815538725f4f4d20 /shell/main.c
parentacdca12ed11b44014082092a6ac7b8cff46e3341 (diff)
downloadgsoc2013-evolution-feb63a0bdc5f09b4a822ebc31f2217d1a767247a.tar.gz
gsoc2013-evolution-feb63a0bdc5f09b4a822ebc31f2217d1a767247a.tar.zst
gsoc2013-evolution-feb63a0bdc5f09b4a822ebc31f2217d1a767247a.zip
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
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c15
1 files changed, 14 insertions, 1 deletions
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 <config.h>
#include <fcntl.h>
#include <glib.h>
+#include <stdio.h>
#include <gtk/gtkframe.h>
#include <gtk/gtklabel.h>
@@ -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;