[Libreoffice-commits] online.git: loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 18 12:43:41 UTC 2019


 loleaflet/src/control/Control.Menubar.js |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 8e8f081e483412249dce090efd5276beb493c78f
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Dec 18 13:49:52 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Dec 18 13:43:23 2019 +0100

    tdf#129378: Remove useless menu entries in the iOS app
    
    The 'online-help' and 'keyboard-shortcuts' actions use the
    L.Map.showHelp function that would try to open a web page, which
    doesn't work from the WKWebView without some special sauce, and would
    be silly anyway as the app should work without any net connection.
    
    Change-Id: Iae8709018616b3a9954686143362319730a7bf13
    Reviewed-on: https://gerrit.libreoffice.org/85378
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 327c6d53d..a9ad06f6d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -236,8 +236,8 @@ L.Control.Menubar = L.Control.extend({
 					{uno: '.uno:OnlineAutoFormat'}]}
 			]},
 			{name: _UNO('.uno:HelpMenu', 'text'), id: 'help', type: 'menu', menu: [
-				{name: _('Online Help'), id: 'online-help', type: 'action'},
-				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+				{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
 			{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -335,8 +335,8 @@ L.Control.Menubar = L.Control.extend({
 					{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]}
 			]},
 			{name: _UNO('.uno:HelpMenu', 'presentation'), id: 'help', type: 'menu', menu: [
-				{name: _('Online Help'), id: 'online-help', type: 'action'},
-				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+				{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
 			{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -450,8 +450,8 @@ L.Control.Menubar = L.Control.extend({
 				{uno: '.uno:GoalSeekDialog'}
 			]},
 			{name: _UNO('.uno:HelpMenu', 'spreadsheet'), id: 'help', type: 'menu', menu: [
-				{name: _('Online Help'), id: 'online-help', type: 'action'},
-				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+				{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+				{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
 				{name: _('About'), id: 'about', type: 'action'}]
 			},
 			{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -1244,6 +1244,9 @@ L.Control.Menubar = L.Control.extend({
 	},
 
 	_checkItemVisibility: function(menuItem) {
+		if (window.ThisIsTheiOSApp && menuItem.iosapp === false) {
+			return false;
+		}
 		if (menuItem.id === 'about' && (L.DomUtil.get('about-dialog') === null)) {
 			return false;
 		}


More information about the Libreoffice-commits mailing list