diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-11 06:36:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-11 06:47:29 +0800 |
commit | 10eab2350036e1c36377c93d31472125b3e7c8c7 (patch) | |
tree | 5e33457567b4fddf2f7cd6b795d0ca6e13624099 /modules/addressbook/e-book-shell-backend.c | |
parent | 6e7f42e0a60659411f2e10dbf8e84c705f0498a4 (diff) | |
download | gsoc2013-evolution-10eab2350036e1c36377c93d31472125b3e7c8c7.tar.gz 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/addressbook/e-book-shell-backend.c')
-rw-r--r-- | modules/addressbook/e-book-shell-backend.c | 30 |
1 files changed, 15 insertions, 15 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 ( |