diff --git a/ios/README b/ios/README index 525d8c9b4..dbd802339 100644 --- a/ios/README +++ b/ios/README @@ -24,7 +24,7 @@ make or open the Mobile project there yet. 3) Do a separate clone of the online repo on Linux, run autogen.sh, and configure it with the --enable-iosapp option: -./configure --enable-iosapp +./configure --enable-iosapp --with-iosapp-name="My Own Mobile LibreOffice" Then run make. That will produce files in loleaflet/dist, nothing else. Copy those to the corresponding folder in the online clone diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 1e9d9ca4a..51ff68bc0 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -224,6 +224,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT @m4 -E -DDEBUG=$(ENABLE_DEBUG) \ -DIOSAPP=$(ENABLE_IOSAPP) \ -DGTKAPP=$(ENABLE_GTKAPP) \ + -DMOBILEAPPNAME="$(MOBILE_APP_NAME)" \ -DLOLEAFLET_CSS="$(subst $(SPACE),$(COMMA),$(LOLEAFLET_CSS_M4))" \ -DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(GLOBAL_JS) $(NODE_MODULES_JS) \ $(call LOLEAFLET_JS,$(srcdir)/build/build.js) \ diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 index 5ac502fcf..a7625742c 100644 --- a/loleaflet/html/loleaflet.html.m4 +++ b/loleaflet/html/loleaflet.html.m4 @@ -160,7 +160,8 @@ ifelse(MOBILEAPP,[true], dnl# For use in conditionals in JS: window.ThisIsAMobileApp, window.ThisIsTheiOSApp, dnl# and window.ThisIsTheGtkApp ifelse(MOBILEAPP,[true], - [window.ThisIsAMobileApp = true;], + [window.ThisIsAMobileApp = true; + window.MobileAppName='MOBILEAPPNAME'], [window.ThisIsAMobileApp = false;] ) ifelse(IOSAPP,[true], diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index debc090d6..bdbf2a0d5 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -245,7 +245,12 @@ L.Map.include({ // Move the div sitting in 'body' as vex-content and make it visible var content = $('#about-dialog').clone().css({display: 'block'}); // fill product-name and product-string - var productName = (typeof brandProductName !== 'undefined') ? brandProductName : 'LibreOffice Online'; + var productName; + if (window.ThisIsAMobileApp) { + productName = window.MobileAppName; + } else { + productName = (typeof brandProductName !== 'undefined') ? brandProductName : 'LibreOffice Online'; + } content.find('#product-name').text(productName); var productString = _('This version of %productName is powered by'); content.find('#product-string').text(productString.replace('%productName', productName));