Bug 3321 - selected message doesn't deselected when moving focus using up/down on keyboard
Summary: selected message doesn't deselected when moving focus using up/down on keyboard
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI/Message List (show other bugs)
Version: 3.11.1
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
: 3331 3484 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-04 07:36 CET by MSulchan Darmawan
Modified: 2015-08-20 21:18 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MSulchan Darmawan 2014-11-04 07:36:54 CET
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 12:50:10 CET
Nothing changed in Claws in relation to that between 3.10.1 and 3.11.1
Comment 2 Andreas Rönnquist 2014-11-04 15:22:04 CET
Reverting Mones commit

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

seems to fix it.
Comment 3 Ricardo Mones 2014-11-04 16:10:38 CET
(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 16:16:34 CET
(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 16:35:59 CET
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 16:46:48 CET
(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 16:51:02 CET
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 10:23:40 CEST
*** Bug 3331 has been marked as a duplicate of this bug. ***
Comment 9 Paul 2015-07-30 23:20:39 CEST
*** Bug 3484 has been marked as a duplicate of this bug. ***
Comment 10 MD 2015-08-20 20:40:54 CEST
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)