diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | src/summary_search.c | 7 | ||||
-rw-r--r-- | src/summaryview.c | 17 | ||||
-rw-r--r-- | src/summaryview.h | 3 |
5 files changed, 37 insertions, 2 deletions
@@ -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, |