loleaflet/src/control/Control.Menubar.js |   10 ++++++----
 loleaflet/src/control/Control.Toolbar.js |    7 +++++++
 2 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit cd21bedb54dd3c547f5d3a9c94120fde66a5c3eb
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Wed Dec 12 21:04:16 2018 -0500
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Thu Nov 7 12:11:59 2019 +0100

    leaflet: toggle between showing master page and closing it
    
    (cherry picked from commit 29146e4224ae00f825a89e8759e5a2c8b5b8767b)
    
    Change-Id: I9ba3d442cea1f3d45d296f1fb1c877cc9a56a3dc
    Reviewed-on: https://gerrit.libreoffice.org/82147
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 3c7ba08df..cd6f93f5a 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -278,7 +278,8 @@ L.Control.Menubar = L.Control.extend({
                                {name: _('Reset zoom'), id: 'zoomreset', type: 
'action'},
                                {type: 'separator'},
                                {uno: '.uno:SlideMasterPage'},
-                {uno: '.uno:ModifyPage'},
+                               {type: 'separator'},
+                               {uno: '.uno:ModifyPage'},
                                {uno: '.uno:SlideChangeWindow'},
                                {uno: '.uno:CustomAnimation'},
                 {name: _('Master Slides'), id: 'masterslidespanel', type: 
'action'}]
@@ -1136,6 +1137,8 @@ L.Control.Menubar = L.Control.extend({
                        });
                } else if (window.ThisIsAMobileApp && 
$(item).data('mobileappuno')) {
                        this._map.sendUnoCommand($(item).data('mobileappuno'));
+               } else if (id == 'masterslidespanel') {
+                       this._map.sendUnoCommand('.uno:MasterSlidesPanel');
                }
                // Inform the host if asked
                if ($(item).data('postmessage') === 'true') {
commit 8f682398befee088560d5bbc8fdff0d975defa17
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Wed Dec 12 02:57:40 2018 -0500
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Thu Nov 7 12:11:45 2019 +0100

    leaflet: handle SlideMasterPage state change
    
    Incomplete. This is a stub hinting at what needs to be done.
    The menu entry should toggle between Master Slide and
    Close Master.
    
    (cherry picked from commit b7cc9a909d5b1d97d6a8f8268ffa8d3e47074f9d)
    
    Change-Id: I1ce7e15e72483eae520bf4914e03609446a6c71d
    Reviewed-on: https://gerrit.libreoffice.org/82146
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index cb46986f4..3c7ba08df 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -278,12 +278,11 @@ L.Control.Menubar = L.Control.extend({
                                {name: _('Reset zoom'), id: 'zoomreset', type: 
'action'},
                                {type: 'separator'},
                                {uno: '.uno:SlideMasterPage'},
-                               {uno: '.uno:CloseMasterView'},
-                               {uno: '.uno:MasterSlidesPanel'},
-                               {uno: '.uno:ModifyPage'},
+                {uno: '.uno:ModifyPage'},
                                {uno: '.uno:SlideChangeWindow'},
-                               {uno: '.uno:CustomAnimation'}
-                       ]},
+                               {uno: '.uno:CustomAnimation'},
+                {name: _('Master Slides'), id: 'masterslidespanel', type: 
'action'}]
+                       },
                        {name: _UNO('.uno:InsertMenu', 'presentation'), id: 
'insert', type: 'menu', menu: [
                                {name: _('Local Image...'), id: 
'insertgraphic', type: 'action'},
                                {name: _UNO('.uno:InsertGraphic', 
'presentation'), id: 'insertgraphicremote', type: 'action'},
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 9cb3fb97d..adea5a6e0 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1831,6 +1831,13 @@ function onCommandStateChanged(e) {
                        toolbar.disable('repair');
                }
        }
+       else if (commandName === '.uno:SlideMasterPage') {
+               if (state === 'true') {
+                       // Rename menu to Close Master and set uno to 
.uno:CloseMasterView
+               } else {
+                       // Rename menu to Master Slide and set uno to 
.uno:SlideMasterPage
+               }
+       }
 
        var id = unoCmdToToolbarId(commandName);
        if (state === 'true') {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to