aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja8
-rw-r--r--src/mainwindow.c9
-rw-r--r--src/mimeview.c3
-rw-r--r--src/mimeview.h2
5 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4570a46f..b89b0ab7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-03-07
+ * src/mainwindow.c
+ src/mimeview.[ch]: save selected attachments if mimeview has focus
+ when 'File/Save as...' is selected.
+ Made mimeview_save_as() public.
+
+2005-03-07
+
* version 1.9.5
2005-03-07
diff --git a/ChangeLog.ja b/ChangeLog.ja
index e04fa726..568a0ceb 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,13 @@
2005-03-07
+ * src/mainwindow.c
+ src/mimeview.[ch]: 「ファイル/名前を付けて保存...」が選択された
+ とき mimeview にフォーカスがあれば選択した添付ファイルを保存する
+ ようにした。
+ mimeview_save_as() を public にした。
+
+2005-03-07
+
* version 1.9.5
2005-03-07
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__ */