aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-09 23:37:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-09 23:37:57 +0800
commit0f8c6c783deb1b2d61c81f8fb27c63ba3ebadc1b (patch)
tree6e13a481003020403586e22409fd683a80f2f99a
parentc943d7699c3030d5cf4ccca4eae554f6eb79aaae (diff)
downloadgsoc2013-evolution-0f8c6c783deb1b2d61c81f8fb27c63ba3ebadc1b.tar.gz
gsoc2013-evolution-0f8c6c783deb1b2d61c81f8fb27c63ba3ebadc1b.tar.zst
gsoc2013-evolution-0f8c6c783deb1b2d61c81f8fb27c63ba3ebadc1b.zip
Display the default inbox at startup, instead of an empty view.
svn path=/trunk/; revision=2944
-rw-r--r--shell/ChangeLog17
-rw-r--r--shell/e-shell-view.c12
-rw-r--r--shell/e-shell-view.h7
-rw-r--r--shell/e-shell.c5
-rw-r--r--shell/main.c17
5 files changed, 43 insertions, 15 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index c479f46f5b..90400d3fe1 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,22 @@
2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
+ * e-shell.c (e_shell_new_view): Display the specified @uri in the
+ view.
+
+ * e-shell-view.c (e_shell_view_construct): Removed arg @uri.
+ (e_shell_view_new): Likewise.
+
+ * main.c: New string constant `STARTUP_URI', specifying the URI to
+ show in the startup view.
+ (new_view_idle_cb): New callback function to create a new view for
+ `STARTUP_URI' in the idle loop. We need to do this in the idle
+ loop because the CORBA stuff cannot work until the loop starts
+ running.
+ (main): Set `new_view_idle_cb' up as the idle callback instead of
+ creating the view right away.
+
+2000-05-09 Ettore Perazzoli <ettore@helixcode.com>
+
* e-shell.c (setup_storages): Woops. Don't free the path before
the warning message, as we need to print it.
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 8d83a9fca4..922d5c301c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -247,8 +247,7 @@ init (EShellView *shell_view)
void
e_shell_view_construct (EShellView *shell_view,
- EShell *shell,
- const char *uri)
+ EShell *shell)
{
EShellViewPrivate *priv;
@@ -256,7 +255,6 @@ e_shell_view_construct (EShellView *shell_view,
g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
g_return_if_fail (shell != NULL);
g_return_if_fail (E_IS_SHELL (shell));
- g_return_if_fail (uri == NULL || ! g_path_is_absolute (uri));
gnome_app_construct (GNOME_APP (shell_view), "evolution", "Evolution");
@@ -265,24 +263,20 @@ e_shell_view_construct (EShellView *shell_view,
gtk_object_ref (GTK_OBJECT (shell));
priv->shell = shell;
- priv->uri = g_strdup (uri);
-
setup_widgets (shell_view);
setup_menus (shell_view);
}
GtkWidget *
-e_shell_view_new (EShell *shell,
- const char *uri)
+e_shell_view_new (EShell *shell)
{
GtkWidget *new;
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- g_return_val_if_fail (uri == NULL || ! g_path_is_absolute (uri), NULL);
new = gtk_type_new (e_shell_view_get_type ());
- e_shell_view_construct (E_SHELL_VIEW (new), shell, uri);
+ e_shell_view_construct (E_SHELL_VIEW (new), shell);
return new;
}
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index 2cd39ebec9..5fbef18228 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -61,10 +61,9 @@ struct _EShellViewClass {
GtkType e_shell_view_get_type (void);
void e_shell_view_construct (EShellView *shell_view,
- EShell *shell,
- const char *uri);
-GtkWidget *e_shell_view_new (EShell *shell,
- const char *uri);
+ EShell *shell);
+GtkWidget *e_shell_view_new (EShell *shell);
+
gboolean e_shell_view_display_uri (EShellView *shell_view,
const char *uri);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 1223fc3e33..fd61108a5f 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -254,11 +254,14 @@ e_shell_new_view (EShell *shell,
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
- view = e_shell_view_new (shell, uri);
+ view = e_shell_view_new (shell);
gtk_widget_show (view);
gtk_signal_connect (GTK_OBJECT (view), "destroy", GTK_SIGNAL_FUNC (view_destroy_cb), shell);
+ if (uri != NULL)
+ e_shell_view_display_uri (E_SHELL_VIEW (view), uri);
+
shell->priv->views = g_list_prepend (shell->priv->views, view);
return view;
diff --git a/shell/main.c b/shell/main.c
index 5ab33823e9..1cb31909c5 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -30,6 +30,9 @@
#include "e-shell.h"
+#define STARTUP_URI "evolution:/local/Inbox"
+
+
static void
no_views_left_cb (EShell *shell, gpointer data)
{
@@ -79,6 +82,18 @@ init_corba (int *argc, char **argv)
#endif /* USING_OAF */
+static gint
+new_view_idle_cb (gpointer data)
+{
+ EShell *shell;
+
+ shell = E_SHELL (data);
+ e_shell_new_view (shell, STARTUP_URI);
+
+ return FALSE;
+}
+
+
int
main (int argc, char **argv)
{
@@ -113,7 +128,7 @@ main (int argc, char **argv)
gtk_signal_connect (GTK_OBJECT (shell), "destroy",
GTK_SIGNAL_FUNC (destroy_cb), NULL);
- e_shell_new_view (shell, NULL);
+ gtk_idle_add (new_view_idle_cb, shell);
bonobo_main ();