From 6cb0cbd0be5791aa0af1f78ce44c7a6563611d8f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 13 Aug 2010 20:49:46 -0400 Subject: Pass an EShell to EMsgComposer instances. Reduce the composer's dependency on e_shell_get_default(). --- modules/addressbook/e-book-shell-view-actions.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'modules/addressbook/e-book-shell-view-actions.c') diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index 6bb9d7036b..9008002c33 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -358,10 +358,17 @@ static void action_contact_forward_cb (GtkAction *action, EBookShellView *book_shell_view) { + EShell *shell; + EShellView *shell_view; + EShellWindow *shell_window; EBookShellContent *book_shell_content; EAddressbookView *view; GList *list, *iter; + 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); @@ -381,7 +388,8 @@ action_contact_forward_cb (GtkAction *action, iter->data = destination; } - eab_send_as_attachment (list); + eab_send_as_attachment (shell, list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); } @@ -581,10 +589,17 @@ static void action_contact_send_message_cb (GtkAction *action, EBookShellView *book_shell_view) { + EShell *shell; + EShellView *shell_view; + EShellWindow *shell_window; EBookShellContent *book_shell_content; EAddressbookView *view; GList *list, *iter; + 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); @@ -604,7 +619,8 @@ action_contact_send_message_cb (GtkAction *action, iter->data = destination; } - eab_send_as_to (list); + eab_send_as_to (shell, list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); } -- cgit v1.2.3