aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-12-20 09:30:43 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-12-20 09:30:43 +0000
commit53c9b26d16f9e5da01b920e3cdb16c39c981e47e (patch)
tree835650e1fccb4184ba2f26f7ddfeb24cbfd1f488 /src
parent54bf698d194e63782b70b05f37af3f72f612796d (diff)
fixed beep on folders with one message when using GTK+ 2.12.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1929 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/summaryview.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/summaryview.c b/src/summaryview.c
index 967d250e..abf71a57 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -945,7 +945,10 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
(summaryview, &iter, NULL, MSG_UNREAD, FALSE)) {
summary_select_row(summaryview, &iter,
FALSE, TRUE);
- } else if (item->total > 0) {
+ } else if ((summaryview->on_filter &&
+ summaryview->flt_msg_total > 1) ||
+ (!summaryview->on_filter &&
+ item->total > 1)) {
g_signal_emit_by_name
(treeview, "move-cursor",
GTK_MOVEMENT_BUFFER_ENDS,
@@ -953,6 +956,11 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
-1 : 1, &moved);
GTK_EVENTS_FLUSH();
summary_scroll_to_selected(summaryview, TRUE);
+ } else if (gtk_tree_model_get_iter_first
+ (GTK_TREE_MODEL(summaryview->store),
+ &iter)) {
+ summary_select_row(summaryview, &iter,
+ FALSE, TRUE);
}
}
selection_done = TRUE;
@@ -980,11 +988,20 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
FALSE, TRUE);
} else {
summary_unlock(summaryview);
- g_signal_emit_by_name
- (treeview, "move-cursor",
- GTK_MOVEMENT_BUFFER_ENDS,
- item->sort_type == SORT_DESCENDING ?
- -1 : 1, &moved);
+ if ((summaryview->on_filter &&
+ summaryview->flt_msg_total > 1) ||
+ (!summaryview->on_filter && item->total > 1)) {
+ g_signal_emit_by_name
+ (treeview, "move-cursor",
+ GTK_MOVEMENT_BUFFER_ENDS,
+ item->sort_type == SORT_DESCENDING ?
+ -1 : 1, &moved);
+ } else if (gtk_tree_model_get_iter_first
+ (GTK_TREE_MODEL(summaryview->store),
+ &iter)) {
+ summary_select_row(summaryview, &iter,
+ FALSE, TRUE);
+ }
summary_lock(summaryview);
GTK_EVENTS_FLUSH();
summary_scroll_to_selected(summaryview, TRUE);