Bug 453111 - Digital clock > Right mouse button click > "Copy to clipboard" > submenu inconsistencies
Summary: Digital clock > Right mouse button click > "Copy to clipboard" > submenu inco...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (other bugs)
Version First Reported In: 5.24.4
Platform: Debian testing Other
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-28 03:37 UTC by local10
Modified: 2022-04-30 04:19 UTC (History)
2 users (show)

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


Attachments
Digital Clock "Copy to clipboard" > submenu inconsistencies (23.97 KB, image/jpeg)
2022-04-28 03:37 UTC, local10
Details

Note You need to log in before you can comment on or make changes to this bug.
Description local10 2022-04-28 03:37:28 UTC
Created attachment 148422 [details]
Digital Clock "Copy to clipboard" > submenu inconsistencies

SUMMARY
Digital clock > Right mouse button click > "Copy to clipboard" > submenu shows inconsistencies. Look at the submenu marked by green "4" in the enclosed screenshot. There are two issues here:

1. Where it shows "4:51 PM" (highlighted) the time should've been show **with seconds**, for example "4:51:35 PM". That's how it used to work some releases back in Debian 10 Buster but then the next release in the Debian 11 Bullseye the seconds were dropped for some reason.

2. Where it shows "4:51 PM 4:51 PM" twice (the item just below the highlighted "4" item), it should show "4:51 PM" once, there's absolutely no sense in repeating it twice.

Operating System: Debian 12 Bookworm GNU/Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.0-6-amd64 (64-bit)
Graphics Platform: X11
Comment 1 Felipe Kinoshita 2022-04-28 21:14:26 UTC
Apparently it only shows seconds when the "show seconds" option is enabled in the applet settings
Comment 2 local10 2022-04-28 22:55:22 UTC
> Apparently it only shows seconds when the "show seconds" option is enabled in the applet settings

That's not how it used to work. In Debian 10 Buster, the "Copy to clipboard" submenu had one option that showed time with seconds (for example, 16:51:25) even if the "show seconds" config option was disabled. I know this because I used that feature and was annoyed when it disappeared in the next release.

Please return this functionality as showing time with seconds only when the "show seconds" config setting is enabled makes no sense: the "Copy to clipboard" submenu shows date/time in multiple formats and it currently shows time without seconds twice (see the item marked '4" in the enclosed attachement and the item below it).
Comment 3 Felipe Kinoshita 2022-04-29 00:18:03 UTC
I've submitted a fix for the duplicate options in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1693

About always showing the seconds, how would you like it? like always show the seconds in all options or just a new option with the seconds?
Comment 4 local10 2022-04-29 04:13:49 UTC
> About always showing the seconds, how would you like it? like always show the seconds in all options or just a new option with the seconds?

The way it used to work the time with seconds was shown only once in the menu option marked by "4" in the enclosed pic. In all other menu options time was shown without seconds. That's how I would like to see it implemented.
Comment 5 Felipe Kinoshita 2022-04-30 01:09:31 UTC
Git commit 13c6cb3a21635b89e9cdb89836fe80632f9d7a9b by Felipe Kinoshita.
Committed on 30/04/2022 at 00:04.
Pushed by fhek into branch 'master'.

applets/digital-clock: make "Copy to Clipboard" menu less messy

This commit organizes the "Copy to Clipboard" options and removes
a lot of duplicated options when "show seconds" is enabled.

It also makes the code more readable. :)

M  +14   -37   applets/digital-clock/plugin/clipboardmenu.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/13c6cb3a21635b89e9cdb89836fe80632f9d7a9b
Comment 6 Felipe Kinoshita 2022-04-30 01:09:39 UTC
Git commit 68ea72876cc7639b333566b5c92bf9222d552337 by Felipe Kinoshita.
Committed on 30/04/2022 at 00:04.
Pushed by fhek into branch 'master'.

applets/digital-clock: add inverted option to clipboard menu

This commit adds a new option to the "Copy to Clipboard" menu that
shows the date with seconds when "show seconds" is not enabled and
without seconds when "show seconds" is enabled.

M  +6    -0    applets/digital-clock/plugin/clipboardmenu.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/68ea72876cc7639b333566b5c92bf9222d552337
Comment 7 local10 2022-04-30 02:23:55 UTC
> s = m_secondsIncluded ? QLocale().toString(time, QLocale::LongFormat) : QLocale().toString(time, QLocale::ShortFormat);

If m_secondsIncluded refers to the "Show seconds" config setting then I don't think it's still quite right, I'd replace it with

> s = QLocale().toString(time, QLocale::LongFormat) 

Also, please see the https://bugs.kde.org/show_bug.cgi?id=452888 bug, they are related.

I know it may look somewhat inconsistent that on one hand I want the 24-hour setting to be propagated to the "Copy to clipboard" submenu but don't want the "Copy to clipboard" submenu to be affected by the "Show seconds" setting. The issue here is that if I enable the "Show seconds" setting then seconds will be shown in the Digital Clock on the taskbar and I don't want things changing on my taskbar every second, it's just distracting. Also I don't see a lot of use cases where someone copying date and time would care about seconds, it mostly happens when someone is copying the exact time, which is addressed by the change above.