summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail..com>2019-12-21 14:54:28 -0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-24 08:00:46 +0100
commit0fb4f2107d08febd4925dce6d96b41da9917e9ae (patch)
treed259f125a31041bcef3094de6707d3b88b003b72 /framework/inc
parent08313c42abc5fb735948f37789ef993c93b6ab5e (diff)
tdf#130163 Show undock or dock menu item in toolbar menu
This patch removes toolbar menu item 'Dock Toolbar' enable state and shows 'Undock Toolbar' menu item when toolbar is docked and 'Dock Toolbar' menu item when toolbar is undocked. It also sets the accelerator key displayed for these items to Shift+Ctrl+F10 Change-Id: I0e4673529438c42452026602785857066ea7874a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85673 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/classes/resource.hxx9
-rw-r--r--framework/inc/strings.hrc1
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx1
3 files changed, 7 insertions, 4 deletions
diff --git a/framework/inc/classes/resource.hxx b/framework/inc/classes/resource.hxx
index a9f98e607baa..04f00677c69d 100644
--- a/framework/inc/classes/resource.hxx
+++ b/framework/inc/classes/resource.hxx
@@ -22,10 +22,11 @@
#define MENUITEM_TOOLBAR_VISIBLEBUTTON 1
#define MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR 2
-#define MENUITEM_TOOLBAR_DOCKTOOLBAR 3
-#define MENUITEM_TOOLBAR_DOCKALLTOOLBAR 4
-#define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION 5
-#define MENUITEM_TOOLBAR_CLOSE 6
+#define MENUITEM_TOOLBAR_UNDOCKTOOLBAR 3
+#define MENUITEM_TOOLBAR_DOCKTOOLBAR 4
+#define MENUITEM_TOOLBAR_DOCKALLTOOLBAR 5
+#define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION 6
+#define MENUITEM_TOOLBAR_CLOSE 7
#endif
diff --git a/framework/inc/strings.hrc b/framework/inc/strings.hrc
index ef3ad73c1956..d3f28fcc9e21 100644
--- a/framework/inc/strings.hrc
+++ b/framework/inc/strings.hrc
@@ -27,6 +27,7 @@
#define STR_CLOSEDOC_ANDRETURN NC_("STR_CLOSEDOC_ANDRETURN", "~Close & Return to " )
#define STR_TOOLBAR_VISIBLE_BUTTONS NC_("STR_TOOLBAR_VISIBLE_BUTTONS", "Visible ~Buttons")
#define STR_TOOLBAR_CUSTOMIZE_TOOLBAR NC_("STR_TOOLBAR_CUSTOMIZE_TOOLBAR", "~Customize Toolbar...")
+#define STR_TOOLBAR_UNDOCK_TOOLBAR NC_("STR_TOOLBAR_UNDOCK_TOOLBAR", "U~ndock Toolbar" )
#define STR_TOOLBAR_DOCK_TOOLBAR NC_("STR_TOOLBAR_DOCK_TOOLBAR", "~Dock Toolbar" )
#define STR_TOOLBAR_DOCK_ALL_TOOLBARS NC_("STR_TOOLBAR_DOCK_ALL_TOOLBARS", "Dock ~All Toolbars" )
#define STR_TOOLBAR_LOCK_TOOLBAR NC_("STR_TOOLBAR_LOCK_TOOLBAR", "~Lock Toolbar Position" )
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index f43a3511b85d..8f3eb4c2b2eb 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -94,6 +94,7 @@ class ToolBarManager : public ToolbarManager_Base
enum ExecuteCommand
{
EXEC_CMD_CLOSETOOLBAR,
+ EXEC_CMD_UNDOCKTOOLBAR,
EXEC_CMD_DOCKTOOLBAR,
EXEC_CMD_DOCKALLTOOLBARS
};