aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--shell/ChangeLog25
-rw-r--r--shell/e-shell-view-menu.c3
-rw-r--r--shell/e-shell-view.c2
-rw-r--r--shell/e-shell.c17
-rw-r--r--shell/e-shell.h4
-rw-r--r--shell/main.c15
6 files changed, 58 insertions, 8 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index dcca98d85f..8449daf4ec 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,28 @@
+2002-02-20 Ettore Perazzoli <ettore@ximian.com>
+
+ [Fix #20311, new window from Shortcuts should not show the folder
+ bar and the shortcut bar. Also do the same for right-click on the
+ folder bar.]
+
+ * 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.
+
+2002-02-20 Ettore Perazzoli <ettore@ximian.com>
+
+ * 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.
+
2002-01-30 Not Zed <NotZed@Ximian.com>
* e-storage-set-view.c (popup_folder_menu): Use
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index e972184df4..649e37b016 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -313,6 +313,9 @@ command_open_folder_in_new_window (BonoboUIComponent *uih,
uri = g_strconcat (E_SHELL_URI_PREFIX, get_path_for_folder_op (shell_view), NULL);
new_view = e_shell_create_view (shell, uri, shell_view);
g_free (uri);
+
+ e_shell_view_show_shortcut_bar (new_view, FALSE);
+ e_shell_view_show_folder_bar (new_view, FALSE);
}
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 6545af81bd..caf11c9044 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -665,6 +665,8 @@ activate_shortcut_cb (EShortcutsView *shortcut_view,
EShellView *new_view;
new_view = e_shell_create_view (e_shell_view_get_shell (shell_view), uri, shell_view);
+ e_shell_view_show_shortcut_bar (new_view, FALSE);
+ e_shell_view_show_folder_bar (new_view, FALSE);
} else {
e_shell_view_display_uri (shell_view, uri);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 1923226ca0..a1f26576fe 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1040,7 +1040,7 @@ init (EShell *shell)
priv->corba_shortcuts = NULL;
priv->offline_handler = NULL;
priv->crash_type_names = NULL;
- priv->line_status = E_SHELL_LINE_STATUS_ONLINE;
+ priv->line_status = E_SHELL_LINE_STATUS_OFFLINE;
priv->db = CORBA_OBJECT_NIL;
priv->is_initialized = FALSE;
priv->is_interactive = FALSE;
@@ -1055,6 +1055,7 @@ init (EShell *shell)
* @iid: OAFIID for registering the shell into the name server
* @local_directory: Local directory for storing local information and folders
* @show_splash: Whether to display a splash screen.
+ * @start_online: Whether to start up in on-line mode.
*
* Construct @shell so that it uses the specified @local_directory and
* @corba_object.
@@ -1065,7 +1066,8 @@ EShellConstructResult
e_shell_construct (EShell *shell,
const char *iid,
const char *local_directory,
- gboolean show_splash)
+ gboolean show_splash,
+ gboolean start_online)
{
GtkWidget *splash;
EShellPrivate *priv;
@@ -1078,7 +1080,7 @@ e_shell_construct (EShell *shell,
g_return_val_if_fail (g_path_is_absolute (local_directory), E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
priv = shell->priv;
-
+
priv->iid = g_strdup (iid);
priv->local_directory = g_strdup (local_directory);
priv->folder_type_registry = e_folder_type_registry_new ();
@@ -1178,6 +1180,9 @@ e_shell_construct (EShell *shell,
priv->is_initialized = TRUE;
+ if (start_online)
+ e_shell_go_online (shell, NULL);
+
return E_SHELL_CONSTRUCT_RESULT_OK;
}
@@ -1185,6 +1190,7 @@ e_shell_construct (EShell *shell,
* e_shell_new:
* @local_directory: Local directory for storing local information and folders.
* @show_splash: Whether to display a splash screen.
+ * @start_online: Whether to start in on-line mode or not.
* @construct_result_return: A pointer to an EShellConstructResult variable into
* which the result of the operation will be stored.
*
@@ -1195,6 +1201,7 @@ e_shell_construct (EShell *shell,
EShell *
e_shell_new (const char *local_directory,
gboolean show_splash,
+ gboolean start_online,
EShellConstructResult *construct_result_return)
{
EShell *new;
@@ -1206,7 +1213,7 @@ e_shell_new (const char *local_directory,
new = gtk_type_new (e_shell_get_type ());
- construct_result = e_shell_construct (new, E_SHELL_OAFIID, local_directory, show_splash);
+ construct_result = e_shell_construct (new, E_SHELL_OAFIID, local_directory, show_splash, start_online);
if (construct_result != E_SHELL_CONSTRUCT_RESULT_OK) {
*construct_result_return = construct_result;
@@ -1254,8 +1261,6 @@ e_shell_create_view (EShell *shell,
view = create_view (shell, uri, template_view);
gtk_widget_show (GTK_WIDGET (view));
- while (gtk_events_pending ())
- gtk_main_iteration ();
set_interactive (shell, TRUE);
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 70f5c203d1..44f7f72034 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -94,9 +94,11 @@ GtkType e_shell_get_type (void);
EShellConstructResult e_shell_construct (EShell *shell,
const char *iid,
const char *local_directory,
- gboolean show_splash);
+ gboolean show_splash,
+ gboolean start_online);
EShell *e_shell_new (const char *local_directory,
gboolean show_splash,
+ gboolean start_online,
EShellConstructResult *construct_result_return);
EShellView *e_shell_create_view (EShell *shell,
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;