Bug 3321

Summary: selected message doesn't deselected when moving focus using up/down on keyboard
Product: Claws Mail (GTK 2) Reporter: MSulchan Darmawan <bleketux>
Component: UI/Message ListAssignee: users
Status: RESOLVED FIXED    
Severity: normal CC: andreas, crxssi
Priority: P3    
Version: 3.11.1   
Hardware: PC   
OS: Linux   

Description MSulchan Darmawan 2014-11-04 06:36:54 UTC
Reproduce :
1. Select one message on Message list.
2. Select thread or select all message on Message List.
3. Press up or down on keyboard.

Result :
Others message still selected and the focused message is not change in Message View Panel.

When I use previous version v3.10.1, the result is :
Other messages deselected and the focused message is shown in Message View Panel.

Is it on purpose behaviour ?

Thanks.
Comment 1 Paul 2014-11-04 11:50:10 UTC
Nothing changed in Claws in relation to that between 3.10.1 and 3.11.1
Comment 2 Andreas Rönnquist 2014-11-04 14:22:04 UTC
Reverting Mones commit

* 8090f02 - Remove unreachable code (4 weeks ago) <Ricardo Mones>

seems to fix it.
Comment 3 Ricardo Mones 2014-11-04 15:10:38 UTC
(In reply to comment #2)
> Reverting Mones commit
> 
> * 8090f02 - Remove unreachable code (4 weeks ago) <Ricardo Mones>
> 
> seems to fix it.

I'm curious about this. What changes the value of clist->selection_mode between the "switch (clist->selection_mode)"¹/"case GTK_SELECTION_BROWSE"² and the removed "if (clist->selection_mode == GTK_SELECTION_BROWSE)"³ ?

Because there's just a move_focus_row call which doesn't alter selection_mode AFAICS (function seems to do what it says.

Anyway, if reverting it fixes the issue, go ahead. It's just I don't like dealing with code which does magic ;)

¹ http://git.claws-mail.org/?p=claws.git;a=blob;f=src/gtk/gtkcmclist.c;h=7980b8a2#l7027
² http://git.claws-mail.org/?p=claws.git;a=blob;f=src/gtk/gtkcmclist.c;h=7980b8a2#l7032
³ http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=8090f02e
Comment 4 Ricardo Mones 2014-11-04 15:16:34 UTC
(In reply to comment #3)
>
> Anyway, if reverting it fixes the issue, go ahead. It's just I don't like
> dealing with code which does magic ;)

BTW, believe it or not I checked the behaviour of summaryview before and after and it looked the same (yes, it already was as buggy as described). But maybe I missed something :(
Comment 5 Andreas Rönnquist 2014-11-04 15:35:59 UTC
Mones, do notice the previous case:

    case GTK_SELECTION_MULTIPLE:
      if (clist->anchor >= 0)
	return;
    case GTK_SELECTION_BROWSE:

- it doesn't end with a break, so the GTK_SELECTION_BROWSE alternative will be run through for both GTK_SELECTION_BROWSE, and (some instances of) GTK_SELECTION_MULTIPLE (when it doesn't reach the return in that block).
Comment 6 Ricardo Mones 2014-11-04 15:46:48 UTC
(In reply to comment #5)
> Mones, do notice the previous case:
> 
>     case GTK_SELECTION_MULTIPLE:
>       if (clist->anchor >= 0)
> 	return;
>     case GTK_SELECTION_BROWSE:
> 
> - it doesn't end with a break, so the GTK_SELECTION_BROWSE alternative will
> be run through for both GTK_SELECTION_BROWSE, and (some instances of)
> GTK_SELECTION_MULTIPLE (when it doesn't reach the return in that block).

Yeah, I missed that :)
Many thanks Andreas!
Reverting then...
Comment 7 users 2014-11-04 15:51:02 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-11-04 16:51:02.234265590 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=77ad4f8b3c881d847642da2a2e69eb5288e4df4b
Merge: 94adca5 22f9e2e
Author: Colin Leroy <colin@colino.net>
Date:   Tue Nov 4 16:51:01 2014 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=22f9e2e5378bc05989d0c71a6ce49cc716f198d6
Author: Ricardo Mones <ricardo@mones.org>
Date:   Tue Nov 4 16:48:06 2014 +0100

    Fix bug #3321 → revert "Remove unreachable code"
    
    This reverts commit 8090f02e4d5c41be4325f0a13d6b0d98ca03684b.
    Many thanks to Andreas Rönnquist for the enlightenment!
Comment 8 Paul 2015-04-13 08:23:40 UTC
*** Bug 3331 has been marked as a duplicate of this bug. ***
Comment 9 Paul 2015-07-30 21:20:39 UTC
*** Bug 3484 has been marked as a duplicate of this bug. ***
Comment 10 MD 2015-08-20 18:40:54 UTC
This bug appears to have been fixed in 3.12.0.  At least, I can't replicate the problem in 3.12.0 like I can in 3.11.1.

Someone should mark this bug fixed unless someone else can prove it is still an issue.  (Strange, looks like my login can't change the status of bugs.  Oh well)