aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-07 09:51:55 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-07 09:51:55 +0000
commita0a0fdcef601eb96691f2230462828ecbee23fcf (patch)
treecc6db11626117663b9c0a4afa5178589b28f1b03 /src
parentfd6b862d2e6bb34e46b3e86a247188703353dbb0 (diff)
save selected attachments if mimeview has focus when 'File/Save as...' is selected.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@152 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.c9
-rw-r--r--src/mimeview.c3
-rw-r--r--src/mimeview.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index b89c99f2..27ac5969 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -49,6 +49,7 @@
#include "summaryview.h"
#include "summary_search.h"
#include "messageview.h"
+#include "mimeview.h"
#include "message_search.h"
#include "headerview.h"
#include "menu.h"
@@ -2586,7 +2587,13 @@ static void empty_trash_cb(MainWindow *mainwin, guint action,
static void save_as_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
- summary_save_as(mainwin->summaryview);
+ MessageView *messageview = mainwin->messageview;
+
+ if (messageview_get_selected_mime_part(messageview) &&
+ GTK_WIDGET_HAS_FOCUS(messageview->mimeview->ctree))
+ mimeview_save_as(messageview->mimeview);
+ else
+ summary_save_as(mainwin->summaryview);
}
static void print_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
diff --git a/src/mimeview.c b/src/mimeview.c
index a75db773..1d39448e 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -104,7 +104,6 @@ static void mimeview_drag_data_get (GtkWidget *widget,
MimeView *mimeview);
static void mimeview_display_as_text (MimeView *mimeview);
-static void mimeview_save_as (MimeView *mimeview);
static void mimeview_launch (MimeView *mimeview);
static void mimeview_open_with (MimeView *mimeview);
static void mimeview_view_file (const gchar *filename,
@@ -922,7 +921,7 @@ static void mimeview_display_as_text(MimeView *mimeview)
mimeview_show_message_part(mimeview, partinfo);
}
-static void mimeview_save_as(MimeView *mimeview)
+void mimeview_save_as(MimeView *mimeview)
{
gchar *filename;
gchar *defname = NULL;
diff --git a/src/mimeview.h b/src/mimeview.h
index de7bf5ff..8701462d 100644
--- a/src/mimeview.h
+++ b/src/mimeview.h
@@ -81,4 +81,6 @@ gboolean mimeview_step (MimeView *mimeview,
void mimeview_pass_key_press_event (MimeView *mimeview,
GdkEventKey *event);
+void mimeview_save_as (MimeView *mimeview);
+
#endif /* __MIMEVIEW_H__ */