config,UI: change classic -> compact and notebookbar -> tabbed
Signed-off-by: Rash419 <rashesh.padia@collabora.com> Change-Id: I633a13927245ee6b4d750cd84c2b4577dca06d68pull/4634/head
parent
cc5b4441b3
commit
0945c4d48b
|
@ -195,8 +195,8 @@
|
|||
<button onclick="ShowMenubar(true); return false;">Show Menubar</button>
|
||||
<button onclick="ShowInsertButton(); return false;" title="via Insert_Button">Insert custom button</button>
|
||||
<p>
|
||||
<button onclick="ShowNotebookbar(false); return false;">Classic Toolbar</button>
|
||||
<button onclick="ShowNotebookbar(true); return false;">Notebookbar</button>
|
||||
<button onclick="ShowNotebookbar(false); return false;">Compact Toolbar</button>
|
||||
<button onclick="ShowNotebookbar(true); return false;">Tabbed Toolbar</button>
|
||||
</form>
|
||||
|
||||
<h3>Document frame</h3>
|
||||
|
|
|
@ -353,6 +353,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
{name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'},
|
||||
{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
|
||||
{type: 'separator'},
|
||||
{name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'},
|
||||
{uno: '.uno:SlideMasterPage'},
|
||||
{type: 'separator'},
|
||||
{uno: '.uno:ModifyPage'},
|
||||
|
@ -483,6 +484,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
{name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'},
|
||||
{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
|
||||
{type: 'separator'},
|
||||
{name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'},
|
||||
{uno: '.uno:Sidebar'},
|
||||
{name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'}
|
||||
]},
|
||||
|
@ -596,6 +598,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
{name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action',},
|
||||
{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
|
||||
{type: 'separator'},
|
||||
{name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'},
|
||||
{name: _UNO('.uno:FreezePanes', 'spreadsheet', true), id: 'FreezePanes', type: 'action', uno: '.uno:FreezePanes'},
|
||||
{name: _UNO('.uno:FreezeCellsMenu', 'spreadsheet', true), id: 'FreezeCellsMenu', type: 'menu', uno: '.uno:FreezeCellsMenu', menu: [
|
||||
{name: _UNO('.uno:FreezePanesColumn', 'spreadsheet', true), id: 'FreezePanesColumn', type: 'action', uno: '.uno:FreezePanesColumn'},
|
||||
|
@ -1548,9 +1551,9 @@ L.Control.Menubar = L.Control.extend({
|
|||
|
||||
} else if (id === 'toggleuimode') {
|
||||
if (window.userInterfaceMode === 'notebookbar') {
|
||||
$(aItem).text(_('Use Classic view'));
|
||||
$(aItem).text(_('Use Compact view'));
|
||||
} else {
|
||||
$(aItem).text(_('Use NotebookBar view'));
|
||||
$(aItem).text(_('Use Tabbed view'));
|
||||
}
|
||||
|
||||
} else if (self._map.getDocType() === 'presentation' && (id === 'deletepage' || id === 'insertpage' || id === 'duplicatepage')) {
|
||||
|
|
|
@ -951,7 +951,7 @@ L.Control.NotebookbarCalc = L.Control.NotebookbarWriter.extend({
|
|||
{
|
||||
'id': 'toggleuimode',
|
||||
'type': 'bigmenubartoolitem',
|
||||
'text': _('Classic view'),
|
||||
'text': _('Compact view'),
|
||||
'command': _('Toggle UI Mode')
|
||||
},
|
||||
{
|
||||
|
|
|
@ -269,7 +269,7 @@ L.Control.NotebookbarDraw = L.Control.NotebookbarImpress.extend({
|
|||
{
|
||||
'id': 'toggleuimode',
|
||||
'type': 'bigmenubartoolitem',
|
||||
'text': _('Classic view'),
|
||||
'text': _('Compact view'),
|
||||
'command': _('Toggle UI Mode')
|
||||
},
|
||||
{
|
||||
|
|
|
@ -339,7 +339,7 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
|
|||
{
|
||||
'id': 'toggleuimode',
|
||||
'type': 'bigmenubartoolitem',
|
||||
'text': _('Classic view'),
|
||||
'text': _('Compact view'),
|
||||
'command': _('Toggle UI Mode')
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1001,7 +1001,7 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
|
|||
{
|
||||
'id': 'toggleuimode',
|
||||
'type': 'bigmenubartoolitem',
|
||||
'text': _('Classic view'),
|
||||
'text': _('Compact view'),
|
||||
'command': _('Toggle UI Mode')
|
||||
},
|
||||
{
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
@WELCOME_CONFIG_FRAGMENT@
|
||||
|
||||
<user_interface>
|
||||
<mode type="string" desc="Controls the user interface style. The 'default' means: Take the value from ui_defaults, or decide for one of classic or notebookbar (default|classic|notebookbar)" default="default">default</mode>
|
||||
<mode type="string" desc="Controls the user interface style. The 'default' means: Take the value from ui_defaults, or decide for one of compact or tabbed (default|compact|tabbed)" default="default">default</mode>
|
||||
<use_integration_theme desc="Use theme from the integrator" type="bool" default="true">true</use_integration_theme>
|
||||
</user_interface>
|
||||
|
||||
|
|
|
@ -1799,6 +1799,12 @@ void COOLWSD::innerInitialize(Application& self)
|
|||
// Setup user interface mode
|
||||
UserInterface = getConfigValue<std::string>(conf, "user_interface.mode", "default");
|
||||
|
||||
if (UserInterface == "compact")
|
||||
UserInterface = "classic";
|
||||
|
||||
if (UserInterface == "tabbed")
|
||||
UserInterface = "notebookbar";
|
||||
|
||||
// Set the log-level after complete initialization to force maximum details at startup.
|
||||
LogLevel = getConfigValue<std::string>(conf, "logging.level", "trace");
|
||||
MostVerboseLogLevelSettableFromClient = getConfigValue<std::string>(conf, "logging.most_verbose_level_settable_from_client", "notice");
|
||||
|
|
|
@ -1004,9 +1004,15 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
|
|||
|
||||
Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG%"), enableWelcomeMessage);
|
||||
|
||||
// the config value of 'notebookbar' or 'classic' overrides the UIMode
|
||||
// the config value of 'notebookbar/tabbed' or 'classic/compact' overrides the UIMode
|
||||
// from the WOPI
|
||||
std::string userInterfaceModeConfig = config.getString("user_interface.mode", "default");
|
||||
if (userInterfaceModeConfig == "compact")
|
||||
userInterfaceModeConfig = "classic";
|
||||
|
||||
if (userInterfaceModeConfig == "tabbed")
|
||||
userInterfaceModeConfig = "notebookbar";
|
||||
|
||||
if (userInterfaceModeConfig == "classic" || userInterfaceModeConfig == "notebookbar" || userInterfaceMode.empty())
|
||||
userInterfaceMode = userInterfaceModeConfig;
|
||||
|
||||
|
|
|
@ -43,10 +43,15 @@ std::string FileServerRequestHandler::uiDefaultsToJSON(const std::string& uiDefa
|
|||
// detect the UIMode or component
|
||||
if (keyValue.equals(0, "UIMode"))
|
||||
{
|
||||
if (keyValue.equals(1, "classic") || keyValue.equals(1, "notebookbar"))
|
||||
if (keyValue.equals(1, "compact") || keyValue.equals(1, "classic"))
|
||||
{
|
||||
json.set("uiMode", keyValue[1]);
|
||||
uiMode = keyValue[1];
|
||||
json.set("uiMode", "classic");
|
||||
uiMode = "classic";
|
||||
}
|
||||
else if(keyValue.equals(1, "tabbed") || keyValue.equals(1, "notebookbar"))
|
||||
{
|
||||
json.set("uiMode", "notebookbar");
|
||||
uiMode = "notebookbar";
|
||||
}
|
||||
else
|
||||
LOG_ERR("unknown UIMode value " << keyValue[1]);
|
||||
|
|
Loading…
Reference in New Issue