diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-13 00:55:10 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-13 04:00:54 +0800 |
commit | 0d6061a4ebf34cbe4f640e755372c38bd698ed25 (patch) | |
tree | 9ae7c1391e0103d959896b7db9b296bcb61e5f6d /modules/addressbook/e-book-shell-view-actions.c | |
parent | c4d1d29eaaae6c2668599de0c989f5fe2b189c1e (diff) | |
download | gsoc2013-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-actions.c')
-rw-r--r-- | modules/addressbook/e-book-shell-view-actions.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index 773eb3fa7a..9886e59dcd 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -332,6 +332,9 @@ static void action_contact_new_cb (GtkAction *action, EBookShellView *book_shell_view) { + EShell *shell; + EShellView *shell_view; + EShellWindow *shell_window; EBookShellContent *book_shell_content; EAddressbookView *view; EAddressbookModel *model; @@ -339,6 +342,10 @@ action_contact_new_cb (GtkAction *action, GtkWidget *editor; EBook *book; + 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); + book_shell_content = book_shell_view->priv->book_shell_content; view = e_book_shell_content_get_current_view (book_shell_content); g_return_if_fail (view != NULL); @@ -348,7 +355,7 @@ action_contact_new_cb (GtkAction *action, g_return_if_fail (book != NULL); contact = e_contact_new (); - editor = e_contact_editor_new (book, contact, TRUE, TRUE); + editor = e_contact_editor_new (shell, book, contact, TRUE, TRUE); eab_editor_show (EAB_EDITOR (editor)); g_object_unref (contact); } @@ -357,6 +364,9 @@ static void action_contact_new_list_cb (GtkAction *action, EBookShellView *book_shell_view) { + EShell *shell; + EShellView *shell_view; + EShellWindow *shell_window; EBookShellContent *book_shell_content; EAddressbookView *view; EAddressbookModel *model; @@ -364,6 +374,10 @@ action_contact_new_list_cb (GtkAction *action, GtkWidget *editor; EBook *book; + 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); + book_shell_content = book_shell_view->priv->book_shell_content; view = e_book_shell_content_get_current_view (book_shell_content); g_return_if_fail (view != NULL); @@ -373,7 +387,7 @@ action_contact_new_list_cb (GtkAction *action, g_return_if_fail (book != NULL); contact = e_contact_new (); - editor = e_contact_list_editor_new (book, contact, TRUE, TRUE); + editor = e_contact_list_editor_new (shell, book, contact, TRUE, TRUE); eab_editor_show (EAB_EDITOR (editor)); g_object_unref (contact); } |