Disable some calendar keyboard shortcuts when calendar is not used
Categories
(Calendar :: General, task)
Tracking
(Not tracked)
People
(Reporter: pmorris, Assigned: pmorris)
References
Details
Attachments
(3 files, 2 obsolete files)
3.64 KB,
patch
|
pmorris
:
review+
|
Details | Diff | Splinter Review |
3.36 KB,
patch
|
pmorris
:
review+
|
Details | Diff | Splinter Review |
8.48 KB,
patch
|
darktrojan
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1621130 +++
Following up on bug 1617786, disable any keyboard shortcuts that should be disabled. Here's a relevant bit from the 5th comment on that bug.
"For keyboard shortcuts I found a couple <command>s to disable ("calendar_toggle_todaypane_command", "calendar_go_to_today_command"). Luckily the toggle_todaypane keyboard shortcut is already getting disabled without any extra effort required. The go_to_today one is not, but it's tricky because even if you disable it, when you open a calendar tab it gets re-enabled. (Disabling it is pretty low priority. If a user accidentally hits alt+end in a mail tab a calendar tab will open, which isn't so bad but not ideal.)"
Comment 1•5 years ago
|
||
I'd suggest wontfix for this.
Comment 2•5 years ago
|
||
At the very least, calendarUpdateNewItemsCommand
needs to be called when a calendar is enabled or disabled (this probably should already happen, but doesn't) because if Thunderbird starts without an enabled calendar and one becomes enabled, the commands are still disabled. At a quick glance I'd say here is the right place.
Assignee | ||
Comment 3•5 years ago
|
||
This handles calling calendarUpdateNewItemsCommand
when a calendar is enabled or disabled.
Assignee | ||
Comment 4•5 years ago
•
|
||
I noticed that the "Synchronize" toolbar button/command was not being disabled when all remote calendars were disabled. This patch basically fixes that, but a glitch remains.
When all remote calendars are disabled, and then you enable one, the command is updated immediately. Going the other way, when you disable the last one that is enabled, the update is not immediate but does eventually take effect, like when you switch away from the calendar tab and then back to it. I haven't had a chance to dig into how to fix that part yet.
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Addresses review comments.
Assignee | ||
Comment 8•5 years ago
|
||
Addresses review comments. It seemed worthwhile to update all the commands when a calendar was enabled or disabled, enabling/disabling is not a high frequency occurrence, and this approach will be more future-proof.
(I did discover the reason for the asymmetrical behavior I was seeing. When a network calendar is enabled the onLoad function is called (and commands are updated), but there's no corresponding call when disabling a networked calendar. Also onLoad is not called when a local calendar is enabled.)
Assignee | ||
Comment 9•5 years ago
•
|
||
Some more tidying up while I was at it. Use a Set instead of an Object-used-like-a-set to store the command lists (now that JS has Sets).
Try runs (look fine):
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bd92c86971d7
Update new item commands on calendar enable/disable. r=darktrojan
https://hg.mozilla.org/comm-central/rev/f02ab1a74c31
Improve disabling of synchronize calendars command. r=darktrojan
https://hg.mozilla.org/comm-central/rev/49d25b882f41
Store calendar commands in a Set not an Object. r=darktrojan DONTBUILD
Updated•5 years ago
|
Updated•5 years ago
|
Description
•