evolution r37259 - branches/kill-bonobo/mail
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37259 - branches/kill-bonobo/mail
- Date: Fri, 13 Feb 2009 03:23:04 +0000 (UTC)
Author: mbarnes
Date: Fri Feb 13 03:23:04 2009
New Revision: 37259
URL: http://svn.gnome.org/viewvc/evolution?rev=37259&view=rev
Log:
Make attachment saving work everywhere.
Modified:
branches/kill-bonobo/mail/em-format-html-display.c
branches/kill-bonobo/mail/em-popup.c
Modified: branches/kill-bonobo/mail/em-format-html-display.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-html-display.c (original)
+++ branches/kill-bonobo/mail/em-format-html-display.c Fri Feb 13 03:23:04 2009
@@ -2209,14 +2209,20 @@
EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)data;
GSList *attachment_parts, *tmp;
GSList *parts = NULL;
+ GtkWidget *widget;
+ gpointer parent;
- attachment_parts = e_attachment_bar_get_selected(E_ATTACHMENT_BAR(efhd->priv->attachment_bar));
+ widget = efhd->priv->attachment_bar;
+ parent = gtk_widget_get_toplevel (widget);
+ parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+
+ attachment_parts = e_attachment_bar_get_selected(E_ATTACHMENT_BAR(widget));
for (tmp = attachment_parts; tmp; tmp=tmp->next)
parts = g_slist_prepend(parts, ((EAttachment *)tmp->data)->body);
parts = g_slist_reverse(parts);
- em_utils_save_parts(efhd->priv->attachment_bar, _("Select folder to save selected attachments..."), parts);
+ em_utils_save_parts(parent, _("Select folder to save selected attachments..."), parts);
g_slist_free (parts);
g_slist_foreach(attachment_parts, (GFunc)g_object_unref, NULL);
Modified: branches/kill-bonobo/mail/em-popup.c
==============================================================================
--- branches/kill-bonobo/mail/em-popup.c (original)
+++ branches/kill-bonobo/mail/em-popup.c Fri Feb 13 03:23:04 2009
@@ -404,6 +404,8 @@
{
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 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]