Bug 503417 - Middle click should close tab
Summary: Middle click should close tab
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-27 07:11 UTC by Kishore Gopalakrishnan
Modified: 2025-05-01 09:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2025-04-27 07:11:26 UTC
SUMMARY
Middle-clicking on a tab in the tab bar currently does nothing. I would expect it to close the clicked tab.

I seem to remember this working some time ago, but I don't remember when it changed.

SOFTWARE/OS VERSIONS
Lokalize: 25.04.0
Operating System: Arch Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-arch1-1 (64-bit)
Graphics Platform: X11
Comment 1 Karl Ove Hufthammer 2025-04-27 11:35:12 UTC
Confirmed. According to git bisect, the bug / behaviour change was introduced in this commit:

commit 053fb00b5ec5d26e3e42be5039b2e3e8291a5597 (HEAD)
Author: Finley Watson <fin-w@tutanota.com>
Date:   Mon Feb 24 00:57:28 2025 +0000

    Port from QMdiSubWindows

https://invent.kde.org/sdk/lokalize/-/commit/053fb00b5ec5d26e3e42be5039b2e3e8291a5597
Comment 2 Finley Watson 2025-04-27 18:11:22 UTC
Thanks for reporting. Yes, it's something I didn't manage to get working in the commit Karl mentions. Not sure how to do it, it's probably possible though.
Comment 3 Albert Astals Cid 2025-04-28 22:40:10 UTC
You can get inspired by Okular's ./shell/shell.cpp:358 

Tell me if you need help
Comment 4 Bug Janitor Service 2025-04-30 20:42:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/234
Comment 5 Finley Watson 2025-05-01 09:10:40 UTC
Git commit 766f3165f45e434b844d171c321feab8d4d0f45e by Finley Watson.
Committed on 01/05/2025 at 09:10.
Pushed by finw into branch 'master'.

Close the tab page on middle mouse click over tab

M  +19   -0    src/lokalizemainwindow.cpp
M  +1    -0    src/lokalizemainwindow.h

https://invent.kde.org/sdk/lokalize/-/commit/766f3165f45e434b844d171c321feab8d4d0f45e
Comment 6 Finley Watson 2025-05-01 09:21:28 UTC
Git commit bfebd852c09052838739c90838c135fe800dba90 by Finley Watson.
Committed on 01/05/2025 at 09:19.
Pushed by finw into branch 'release/25.04'.

Close the tab page on middle mouse click over tab
(cherry picked from commit 766f3165f45e434b844d171c321feab8d4d0f45e)

M  +19   -0    src/lokalizemainwindow.cpp
M  +1    -0    src/lokalizemainwindow.h

https://invent.kde.org/sdk/lokalize/-/commit/bfebd852c09052838739c90838c135fe800dba90