Bug 4032

Summary: space does multiple things
Product: Claws Mail (GTK 2) Reporter: Michal Suchánek <msuchanek>
Component: UI/Message ListAssignee: users
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 3.16.0   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
workaround for wrong modifier detection
none
make space action unambiguous
none
make space key bindings unambiguous
none
make space handling in summaryview unambiguous
none
make space handling in summaryview unambiguous
none
fix shift handling in messageview none

Description Michal Suchánek 2018-05-28 19:13:24 UTC
When the selected message is not displayed in message view space displays it. When it is displayed space jumps to next unread message.

This is undocumented, non-configurable, and completely fucked up.

A key should do only one thing in one UI element.
Comment 1 Michal Suchánek 2018-05-28 21:18:12 UTC
Created attachment 1876 [details]
workaround for wrong modifier detection

This looks like the place where space is assigned the erratic dual purpose behavior.

Presumably this should be exclusive. That is if mod_pressed is true the mod binding should be handled and the non-mod binding not.
Comment 2 Michal Suchánek 2018-05-28 21:30:58 UTC
Created attachment 1877 [details]
make space action unambiguous

This will however disable the default action because mod_pressed is obviously always true.
Comment 3 Michal Suchánek 2018-05-28 22:14:22 UTC
ok, it's way too broken.

The mod_pressed is set properly. However, displaying the message in message view breaks out if summaryview->displayed != summaryview->selected. When the message is already displayed the handling falls through to scrolling which has both mod_pressed and !mod_pressed branches.

What is space supposed to do, exactly?

Can one of the mod_pressed or !mod_pressed branch be moved into SHIFT handling?

If it does not make sense maybe the whole overengineered switches like 
 if (!mimeview_scroll_page(messageview->mimeview, TRUE))
   summary_select_prev_unread(summaryview);
can be dropped?

Can't the key combination do just one thing?
Comment 4 Michal Suchánek 2018-05-28 22:23:50 UTC
Created attachment 1878 [details]
make space key bindings unambiguous
Comment 5 Michal Suchánek 2018-05-29 14:45:51 UTC
Created attachment 1879 [details]
make space handling in summaryview unambiguous

Existing handling:

Shift-space: mimeview_scroll_page UP
Mod1-Shift-space: mimeview_scroll_page UP
Mod1-space: mimeview_scroll_page UP || summary_select_prev_unread
space: display message || mimeview_scroll_page DOWN || summary_select_next_unread

New handling:

Mod1-space: next unread
Mod1-Shift-space: prev unread

space: display message || scroll DOWN
Shift-space: display message || scroll UP
Comment 6 Michal Suchánek 2018-05-30 17:17:39 UTC
Created attachment 1880 [details]
make space handling in summaryview unambiguous

Fix the modifier handling
Comment 7 Michal Suchánek 2018-05-30 17:36:05 UTC
Created attachment 1881 [details]
fix shift handling in messageview

Another place where the modifier handling is not exactly nice and easy to explain.

I suppose if these bindings *were* documented people would complain they do not work as described.
Comment 8 Paul 2018-05-31 13:05:09 UTC
Rather than being "completely fucked up", as you call it, it can actually be a convenient way to step through new/unread mails in a folder. It opens a msg, scrolls through the msg, and then opens the next new or unread msg.
Comment 9 Michal Suchánek 2018-05-31 15:39:43 UTC
It however means that if you press space one more time than required you jump to some random place in the inbox and there is no way to get back to what you were reading.

I call that fucked up interface.
Comment 10 Paul 2018-05-31 16:07:46 UTC
(In reply to comment #9)
> It however means that if you press space one more time than required you
> jump to some random place in the inbox and there is no way to get back to
> what you were reading.
> 
> I call that fucked up interface.

No, it's not random. It goes to the next unread or new msg.
Comment 11 Michal Suchánek 2018-05-31 18:18:37 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > It however means that if you press space one more time than required you
> > jump to some random place in the inbox and there is no way to get back to
> > what you were reading.
> > 
> > I call that fucked up interface.
> 
> No, it's not random. It goes to the next unread or new msg.

Which has nothing to do with the message I am viewing or even the part of the summary I am viewing.

So to put it another way - how do I display the message selected in the summary *without* the possibility of the selection randomly jumping somewhere completely else?
Comment 12 Andrej Kacian 2018-05-31 18:25:53 UTC
PageUp / PageDown ?
Comment 13 Michal Suchánek 2018-05-31 18:30:08 UTC
(In reply to comment #12)
> PageUp / PageDown ?

Those work once the message is displayed. I was asking about loading the selected message into the messageview.
Comment 14 Paul 2018-05-31 18:35:06 UTC
press the 'Enter' for that.

(And please stop re-opening this bug item)