Bug 332586

Summary: Collapsed AttachmentView should expand a preview of message/rfc822 by default on single click
Product: [Applications] trojita Reporter: Jan Kundrát <jkt>
Component: Desktop GUIAssignee: Trojita default assignee <trojita-bugs>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jan Kundrát 2014-03-25 13:45:35 UTC
It would be cool if the default action for clicking on the attachment icon of e.g. a message/rfc822 which is currently collapsed would be to simple expand the view by default instead of forcing one to go via the submenu.
Comment 1 Thomas Lübking 2014-03-25 15:13:35 UTC
On a hybrid base (ie. open the menu after pressing the icon for some time)?
Do not try setDefaultAction - kills the icon.
Comment 2 Jan Kundrát 2014-04-03 06:22:22 UTC
Git commit 697333adc57186df168c6d583d3553a43377aea6 by Jan Kundrát.
Committed on 01/04/2014 at 12:46.
Pushed by jkt into branch 'master'.

GUI: expand previewable attachments upon first click on the attachment icon

The motivation is to make expanding of previewable attachments smooth, but at
the same time do not interfere with the way how the button has worked so far too
much.

When an attachment cannot be previewed, nothing changes and everything works as
it used to work before.

When a preview can be shown, however, clicking on the icon of the attachment at
the time the preview is collapsed will simply show the preview. When the preview
is shown, however, clicking any part of the icon will still bring up the menu as
it used to work previously.

This is an alternative implementation to review #117068.

v2: Use another approach for determining what action to take based on the actual
state of the preview in order to prevent duplicate connections. Thanks to Thomas
Lübking for pointing out a possible problem here.
REVIEW: 117295

M  +21   -3    src/Gui/AttachmentView.cpp
M  +3    -0    src/Gui/AttachmentView.h

http://commits.kde.org/trojita/697333adc57186df168c6d583d3553a43377aea6