aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-13 11:23:04 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-13 11:23:04 +0800
commit10c3ddb38138f3408044fd46115d5804f057c13a (patch)
treeb4950fe1db704f6410c4219682f4b48ac7ccacb4 /mail/em-popup.c
parent0e4972fe5dc98316c6b0406e8809f43f0a6344f4 (diff)
downloadgsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar.gz
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar.bz2
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar.lz
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar.xz
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.tar.zst
gsoc2013-evolution-10c3ddb38138f3408044fd46115d5804f057c13a.zip
Make attachment saving work everywhere.
svn path=/branches/kill-bonobo/; revision=37259
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 38f3b1426b..84d49c845e 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -404,6 +404,8 @@ emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data)
{
EPopupTarget *t = ep->target;
CamelMimePart *part = NULL;
+ GtkWidget *widget;
+ gpointer parent;
/* If it is of type EM_POPUP_TARGET_ATTACHMENTS, we can assume the length is one. */
if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
@@ -411,7 +413,11 @@ emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data)
else
part = ((EMPopupTargetPart *) t)->part;
- em_utils_save_part(ep->target->widget, _("Save As..."), part);
+ widget = ep->target->widget;
+ parent = gtk_widget_get_toplevel (widget);
+ parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+
+ em_utils_save_part (parent, _("Save As..."), part);
}
static void