From 0d6061a4ebf34cbe4f640e755372c38bd698ed25 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 12 Jul 2009 12:55:10 -0400 Subject: 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. --- modules/addressbook/e-book-shell-view-private.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules/addressbook/e-book-shell-view-private.c') 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 -- cgit v1.2.3