talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 22f9e2e5378bc05989d0c71a6ce49cc716f198d6
parent 723df44ba2e39b3b54e2fa688281c55613430e56
Author: Ricardo Mones <ricardo@mones.org>
Date:   Tue,  4 Nov 2014 16:48:06 +0100

Fix bug #3321 → revert "Remove unreachable code"

This reverts commit 8090f02e4d5c41be4325f0a13d6b0d98ca03684b.
Many thanks to Andreas Rönnquist for the enlightenment!

Diffstat:
Msrc/gtk/gtkcmclist.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c @@ -7035,8 +7035,16 @@ scroll_vertical (GtkCMCList *clist, move_focus_row (clist, scroll_type, position); if (old_focus_row != clist->focus_row) - g_signal_emit (G_OBJECT (clist), clist_signals[UNSELECT_ROW], 0, - old_focus_row, -1, NULL); + { + if (clist->selection_mode == GTK_SELECTION_BROWSE) + g_signal_emit (G_OBJECT (clist), clist_signals[UNSELECT_ROW], 0, + old_focus_row, -1, NULL); + else if (!GTK_CMCLIST_ADD_MODE(clist)) + { + gtk_cmclist_unselect_all (clist); + clist->undo_anchor = old_focus_row; + } + } switch (gtk_cmclist_row_is_visible (clist, clist->focus_row)) {