From dabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Sat, 6 Aug 2016 23:31:18 +0200 Subject: GSoC: tdf#101249 Toolbar Mode switching + added registry entry for storing current toolbar mode for each application + registry entries to store toolbar mode configuration, remember additional visible toolbars activated by user + changing toolbar mode hides and shows suitable toolbars + added menu controller for toolbar mode + notebookbar implementation entries are disabled when notebookbar mode is not active + each mode can open/collapse the sidebar Change-Id: I2b03f87c6dce53190d12102892d9ad30fbfd3bf6 Reviewed-on: https://gerrit.libreoffice.org/27991 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- officecfg/Configuration_officecfg.mk | 1 + officecfg/files.mk | 1 + .../data/org/openoffice/Office/UI/Controller.xcu | 11 + .../org/openoffice/Office/UI/GenericCommands.xcu | 5 + .../data/org/openoffice/Office/UI/Notebookbar.xcu | 10 +- .../data/org/openoffice/Office/UI/ToolbarMode.xcu | 288 +++++++++++++++++++++ .../org/openoffice/Office/UI/ToolbarMode.xcs | 93 +++++++ 7 files changed, 400 insertions(+), 9 deletions(-) create mode 100644 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu create mode 100644 officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs (limited to 'officecfg') diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk index 388bf54fa393..195535002381 100644 --- a/officecfg/Configuration_officecfg.mk +++ b/officecfg/Configuration_officecfg.mk @@ -175,5 +175,6 @@ $(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/d org/openoffice/Office/UI/WriterWebWindowState.xcu \ org/openoffice/Office/UI/WriterCommands.xcu \ org/openoffice/Office/UI/GenericCategories.xcu \ + org/openoffice/Office/UI/ToolbarMode.xcu \ )) diff --git a/officecfg/files.mk b/officecfg/files.mk index ed3f460cfe64..adbce6b1d7d8 100644 --- a/officecfg/files.mk +++ b/officecfg/files.mk @@ -86,6 +86,7 @@ officecfg_XCSFILES := \ Office/UI/Sidebar \ Office/UI/StartModuleCommands \ Office/UI/StartModuleWindowState \ + Office/UI/ToolbarMode \ Office/UI/WindowContentFactories \ Office/UI/WindowState \ Office/UI/WriterCommands \ diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 3f7a319fd646..096ed337bf1c 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -386,6 +386,17 @@ row_operations + + + .uno:ToolbarMode + + + + + + com.sun.star.comp.framework.ToolbarModeMenuController + + diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 5723254436e6..0247b1769d16 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -5635,6 +5635,11 @@ ~Toolbars + + + Toolbar Layout + + ~Toolbars diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu index 776dd9fdf545..3814b3e71e3c 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu @@ -2,17 +2,9 @@ - + notebookbar.ui - - - Off - - - - - Tabbed diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu new file mode 100644 index 000000000000..e9e8ddb6f98e --- /dev/null +++ b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu @@ -0,0 +1,288 @@ + + + + + + + Default + + + + + Default + + + Default + + + 0 + + + false + + + + private:resource/toolbar/standardbar + private:resource/toolbar/textobjectbar + + + + + + + + Tabs + + + + + Single toolbar + + + Single + + + 1 + + + false + + + + private:resource/toolbar/singlemode + + + + + + + + Arrow + + + + + Sidebar + + + Sidebar + + + 2 + + + false + + + + private:resource/toolbar/standardbar + + + + + + + + Opened + + + + + Notebookbar + + + true + + + 3 + + + Notebookbar + + + + + + + + + + + Arrow + + + + + + + Default + + + + + Default + + + Default + + + 0 + + + false + + + + private:resource/toolbar/standardbar + private:resource/toolbar/formatobjectbar + + + + + + + + Tabs + + + + + Single toolbar + + + Single + + + 1 + + + false + + + + private:resource/toolbar/singlemode + + + + + + + + Arrow + + + + + Sidebar + + + Sidebar + + + 2 + + + false + + + + private:resource/toolbar/standardbar + + + + + + + + Opened + + + + + Notebookbar + + + true + + + 3 + + + Notebookbar + + + + + + + + + + + Arrow + + + + + + + Default + + + + + Default + + + Default + + + 0 + + + false + + + + private:resource/toolbar/standardbar + private:resource/toolbar/toolbar + private:resource/toolbar/commontaskbar + + + + + + + + Opened + + + + + Notebookbar + + + true + + + 3 + + + Notebookbar + + + + + + + + + + + Arrow + + + + + + diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs new file mode 100644 index 000000000000..4a2a5adc6282 --- /dev/null +++ b/officecfg/registry/schema/org/openoffice/Office/UI/ToolbarMode.xcs @@ -0,0 +1,93 @@ + + + + + + Contains information about toolbar modes. + + + + + The container for mode description. + + + + The toolbar mode label. + + + + + The toolbar mode name to use as a parameter in the UNO command. Must be a single word. + + + + + Position in the menu. + + + + + Determines if Notebookbar is visible. + + + + + List of mandatory toolbars. + + + + + List of visible toolbars activated by user. + + + + + + Describes sidebar mode. + Arrow - sidebar coollapsed, showing the 'open' arrow button + Tabs - sidebar is showing only tab bars + Opened - sidebar fully opened + + + + + + + Describes toolbar modes for one application. + + + + Contains name of currently used mode. + + + + + Contains list of toolbar modes. + + + + + + + + Contains list of toolbar mode settings for each application. + + + + -- cgit