aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-22 06:58:44 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-22 06:58:44 +0000
commitd80a3b56dd4f6cf9a16510402b9122a75116b90c (patch)
treeb38c11535d6609e02ed670afc5616341afd4b838
parente86d3c6ac6d6f59a66743c5b86ca9f5a8e9b20e6 (diff)
select activated message on search dialog in summary view if possible.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@852 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--src/summary_search.c7
-rw-r--r--src/summaryview.c17
-rw-r--r--src/summaryview.h3
5 files changed, 37 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c7ce94de..423c68e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-12-22
+ * src/summaryview.[ch]
+ src/summary_search.c: select activated message in summary view if
+ possible.
+
+2005-12-22
+
* src/summaryview.c: summary_row_expanded(): disable workaround with
GTK+ 2.8.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 134f1009..9e51c7b7 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,11 @@
2005-12-22
+ * src/summaryview.[ch]
+ src/summary_search.c: 可能であれば指定したメッセージをサマリビュー
+ で選択するようにした。
+
+2005-12-22
+
* src/summaryview.c: summary_row_expanded(): GTK+ 2.8 で workaround
を無効にした。
diff --git a/src/summary_search.c b/src/summary_search.c
index a5ff8f76..be16a2ce 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -695,8 +695,11 @@ static void row_activated(GtkTreeView *treeview, GtkTreePath *path,
return;
gtk_tree_model_get(model, &iter, COL_MSGINFO, &msginfo, -1);
- msgview = messageview_create_with_new_window();
- messageview_show(msgview, msginfo, FALSE);
+ if (!summary_select_by_msginfo(main_window_get()->summaryview,
+ msginfo)) {
+ msgview = messageview_create_with_new_window();
+ messageview_show(msgview, msginfo, FALSE);
+ }
}
static gboolean row_selected(GtkTreeSelection *selection,
diff --git a/src/summaryview.c b/src/summaryview.c
index 50562742..bc7e2588 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1302,6 +1302,23 @@ void summary_select_by_msgnum(SummaryView *summaryview, guint msgnum)
summary_select_row(summaryview, &iter, FALSE, TRUE);
}
+gboolean summary_select_by_msginfo(SummaryView *summaryview, MsgInfo *msginfo)
+{
+ GtkTreeIter iter;
+
+ if (summaryview->folder_item != msginfo->folder)
+ return FALSE;
+
+ if (summary_find_msg_by_msgnum(summaryview, msginfo->msgnum, &iter)) {
+ summary_select_row(summaryview, &iter,
+ messageview_is_visible(summaryview->messageview),
+ TRUE);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/**
* summary_select_row:
* @summaryview: Summary view.
diff --git a/src/summaryview.h b/src/summaryview.h
index d2688d89..bcf18ef9 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -39,6 +39,7 @@ typedef struct _SummaryColumnState SummaryColumnState;
#include "compose.h"
#include "filter.h"
#include "folder.h"
+#include "procmsg.h"
typedef enum
{
@@ -165,6 +166,8 @@ void summary_select_prev_labeled (SummaryView *summaryview);
void summary_select_next_labeled (SummaryView *summaryview);
void summary_select_by_msgnum (SummaryView *summaryview,
guint msgnum);
+gboolean summary_select_by_msginfo(SummaryView *summaryview,
+ MsgInfo *msginfo);
void summary_select_row (SummaryView *summaryview,
GtkTreeIter *iter,
gboolean display_msg,