Bug 131441 - Disable undock command when toolbar is locked
Summary: Disable undock command when toolbar is locked
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Diwanshu Mittal
URL:
Whiteboard: target:7.2.0
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
: 131770 137095 (view as bug list)
Depends on:
Blocks: Toolbars
  Show dependency treegraph
 
Reported: 2020-03-20 13:18 UTC by Roman Kuznetsov
Modified: 2021-08-19 08:07 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2020-03-20 13:18:59 UTC
Description:
Can't undock any default toolbars

Steps to Reproduce:
1. Open Writer or Calc
2. Try undock any default toolbar => you can't, after Undock context menu item selecting happens nothing


Actual Results:
Can't undock any default toolbars

Expected Results:
Can undock any default toolbars


Reproducible: Always


User Profile Reset: No



Additional Info:
Версия: 7.0.0.0.alpha0+ (x64)
ID сборки: 6388c578c672690fff662cb04b6a0436cd742f37
Потоков ЦП: 4; ОС: Windows 10.0 Build 18362; Отрисовка ИП: Skia/растр; VCL: win; 
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: threaded

possible regression after https://git.libreoffice.org/core/commit/f2db813374b8d65e1edec1387fa0c534b40885e1
Comment 1 Maxim Monastirsky 2020-03-22 11:14:26 UTC
Yes, locked toolbars can't be undocked. This isn't a regression from bug 92484, as it was possible to manually lock toolbars before, just the default was changed. So we need to either make the "Undock Toolbar" context menu command also unlock the toolbar, or just hide this command for locked toolbars.
Comment 2 V Stuart Foote 2020-03-28 14:10:43 UTC
When unlocked the docked toolbars receive a visual status indicator of the 'vertical ellipsis'.

So the changed locked by default for docked toolbars, done intentionally for bug 92484, is immediately noticeable in GUI as a change.

I agree with changes of bug 92484

And here IMHO better UI would be to suppress the undock action on the context menu when the specific toolbar is locked.

And with new defaults, an additional UNO command to unlock/lock all toolbars in user profile might be worthwhile customization enhancement.
Comment 3 Heiko Tietze 2020-03-29 12:04:56 UTC
(In reply to Maxim Monastirsky from comment #1)
> ...just hide this command for locked toolbars.

_disable_ please. Is it an easyhack?
Comment 4 Maxim Monastirsky 2020-03-31 12:38:02 UTC
Yes, can be an easy hack. The code that creates this menu lives in framework/source/uielement/toolbarmanager.cxx, in the ToolBarManager::AddCustomizeMenuItems method. There is already a check for whether the toolbar is locked (used to set the check mark for the "Lock Toolbar Position" item). The task here is to reuse this to disable the "Undock Toolbar" item for locked toolbars.
Comment 5 Telesto 2020-04-02 07:27:16 UTC
*** Bug 131770 has been marked as a duplicate of this bug. ***
Comment 6 V Stuart Foote 2020-04-02 14:28:14 UTC
(In reply to V Stuart Foote from comment #2)
> ...
> 
> And with new defaults, an additional UNO command to unlock/lock all toolbars
> in user profile might be worthwhile customization enhancement.

Opened as bug 131817
Comment 8 Xisco Faulí 2020-07-22 14:58:23 UTC
Dear James,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 9 Timur 2020-09-28 12:25:49 UTC
*** Bug 137095 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2020-11-25 09:36:15 UTC
diwanshu885 committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2f13fcb67269f99b890f5bb4c63117805e375692

tdf#131441 Disable "UNDOCKTOOLBAR" when toolbar is locked

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Stéphane Guillou (stragu) 2021-08-03 12:15:04 UTC
Reopening this one, as I can't verify the fix:

In both LO 7.2 RC2 and a recent daily master build, the default locked toolbar still show an active "Undock Toolbar" item in the context menu. (i.e. it is not greyed out)

Version: 7.2.0.2 / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 1dd4a80fa076bedb3a82821517036bad8dd79857
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-26_22:41:19
Calc: threaded
Comment 12 Buovjaga 2021-08-03 12:28:03 UTC
(In reply to stragu from comment #11)
> Reopening this one, as I can't verify the fix:
> 
> In both LO 7.2 RC2 and a recent daily master build, the default locked
> toolbar still show an active "Undock Toolbar" item in the context menu.
> (i.e. it is not greyed out)

Caused by the same commit as bug 143688
Comment 13 Heiko Tietze 2021-08-19 08:07:23 UTC
*** Bug 143704 has been marked as a duplicate of this bug. ***