aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-11 06:36:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-11 06:47:29 +0800
commit10eab2350036e1c36377c93d31472125b3e7c8c7 (patch)
tree5e33457567b4fddf2f7cd6b795d0ca6e13624099 /modules
parent6e7f42e0a60659411f2e10dbf8e84c705f0498a4 (diff)
downloadgsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.gz
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.bz2
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.lz
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.xz
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.zst
gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.zip
Implement the shutdown protocol and stub in session management.
The shutdown protocol is modelled after online/offline preparation. Session management code is copied from libegg. Not yet used.
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/e-book-shell-backend.c30
-rw-r--r--modules/calendar/e-cal-shell-backend.c2
-rw-r--r--modules/calendar/e-memo-shell-backend.c2
-rw-r--r--modules/calendar/e-task-shell-backend.c2
-rw-r--r--modules/mail/e-mail-shell-backend.c2
5 files changed, 15 insertions, 23 deletions
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index 68af7ed03b..53737b538e 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -396,6 +396,16 @@ book_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
}
static void
+book_shell_backend_prepare_for_shutdown_cb (EShellBackend *shell_backend,
+ EActivity *activity)
+{
+ /* FIXME Should specify whether Cancel is allowed. Currently,
+ * clicking Cancel when prompted to save during shutdown
+ * just discards changes. */
+ eab_editor_request_close_all ();
+}
+
+static void
book_shell_backend_window_created_cb (EShellBackend *shell_backend,
GtkWindow *window)
{
@@ -476,6 +486,11 @@ book_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect_swapped (
+ shell, "prepare-for-shutdown",
+ G_CALLBACK (book_shell_backend_prepare_for_shutdown_cb),
+ shell_backend);
+
+ g_signal_connect_swapped (
shell, "window-created",
G_CALLBACK (book_shell_backend_window_created_cb),
shell_backend);
@@ -483,19 +498,6 @@ book_shell_backend_constructed (GObject *object)
autocompletion_config_init (shell);
}
-static gboolean
-book_shell_backend_is_busy (EShellBackend *shell_backend)
-{
- return !eab_editor_request_close_all ();
-}
-
-static gboolean
-book_shell_backend_shutdown (EShellBackend *shell_backend)
-{
- /* FIXME */
- return TRUE;
-}
-
static void
book_shell_backend_class_init (EBookShellBackendClass *class)
{
@@ -517,8 +519,6 @@ book_shell_backend_class_init (EBookShellBackendClass *class)
shell_backend_class->schemes = "";
shell_backend_class->sort_order = 300;
shell_backend_class->start = NULL;
- shell_backend_class->is_busy = book_shell_backend_is_busy;
- shell_backend_class->shutdown = book_shell_backend_shutdown;
shell_backend_class->migrate = e_book_shell_backend_migrate;
g_object_class_install_property (
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 675a3d4fa6..a914ae9e9e 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -607,8 +607,6 @@ cal_shell_backend_class_init (ECalShellBackendClass *class)
shell_backend_class->schemes = "calendar";
shell_backend_class->sort_order = 400;
shell_backend_class->start = NULL;
- shell_backend_class->is_busy = NULL;
- shell_backend_class->shutdown = NULL;
shell_backend_class->migrate = e_cal_shell_backend_migrate;
g_object_class_install_property (
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index d2734e066a..dc072e3062 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -554,8 +554,6 @@ memo_shell_backend_class_init (EMemoShellBackendClass *class)
shell_backend_class->schemes = "memo";
shell_backend_class->sort_order = 500;
shell_backend_class->start = NULL;
- shell_backend_class->is_busy = NULL;
- shell_backend_class->shutdown = NULL;
shell_backend_class->migrate = e_memo_shell_backend_migrate;
g_object_class_install_property (
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 6bded3e412..b9280c7373 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -562,8 +562,6 @@ task_shell_backend_class_init (ETaskShellBackendClass *class)
shell_backend_class->schemes = "task";
shell_backend_class->sort_order = 600;
shell_backend_class->start = NULL;
- shell_backend_class->is_busy = NULL;
- shell_backend_class->shutdown = NULL;
shell_backend_class->migrate = e_task_shell_backend_migrate;
g_object_class_install_property (
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 63f25219ef..6ea6284755 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -677,8 +677,6 @@ mail_shell_backend_class_init (EMailShellBackendClass *class)
shell_backend_class->schemes = "mailto:email";
shell_backend_class->sort_order = 200;
shell_backend_class->start = mail_shell_backend_start;
- shell_backend_class->is_busy = NULL;
- shell_backend_class->shutdown = NULL;
shell_backend_class->migrate = e_mail_shell_migrate;
}