aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-13 00:55:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-13 04:00:54 +0800
commit0d6061a4ebf34cbe4f640e755372c38bd698ed25 (patch)
tree9ae7c1391e0103d959896b7db9b296bcb61e5f6d /modules/addressbook/e-book-shell-view-private.c
parentc4d1d29eaaae6c2668599de0c989f5fe2b189c1e (diff)
downloadgsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar.gz
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar.bz2
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar.lz
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar.xz
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.tar.zst
gsoc2013-evolution-0d6061a4ebf34cbe4f640e755372c38bd698ed25.zip
Add a "quit-requested" signal to the shutdown protocol.
The contact and contact-list editors now demonstrate this part of the shutdown protocol. They listen for the "quit-requested" signal from the shell and prompt to save changes, discard changes or cancel. If the user cancels, the editor calls e_shell_cancel_quit() to do just that.
Diffstat (limited to 'modules/addressbook/e-book-shell-view-private.c')
-rw-r--r--modules/addressbook/e-book-shell-view-private.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index ec3562e87a..95e4980c57 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -32,23 +32,30 @@ open_contact (EBookShellView *book_shell_view,
gboolean is_new_contact,
EAddressbookView *view)
{
+ EShell *shell;
+ EShellView *shell_view;
+ EShellWindow *shell_window;
EAddressbookModel *model;
- GtkWidget *editor;
+ EABEditor *editor;
EBook *book;
gboolean editable;
+ shell_view = E_SHELL_VIEW (book_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+ shell = e_shell_window_get_shell (shell_window);
+
model = e_addressbook_view_get_model (view);
book = e_addressbook_model_get_book (model);
editable = e_addressbook_model_get_editable (model);
if (e_contact_get (contact, E_CONTACT_IS_LIST))
editor = e_contact_list_editor_new (
- book, contact, is_new_contact, editable);
+ shell, book, contact, is_new_contact, editable);
else
editor = e_contact_editor_new (
- book, contact, is_new_contact, editable);
+ shell, book, contact, is_new_contact, editable);
- eab_editor_show (EAB_EDITOR (editor));
+ eab_editor_show (editor);
}
static void