[Libreoffice-commits] core.git: 2 commits - helpcontent2 vcl/inc vcl/jsdialog

Seth Chaiklin (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 28 12:21:01 UTC 2020


 helpcontent2                         |    2 +-
 vcl/inc/jsdialog/jsdialogbuilder.hxx |    6 ++++++
 vcl/jsdialog/jsdialogbuilder.cxx     |   18 ++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 8c308dab26c18fc1889b343c11930dc2d2850d80
Author:     Seth Chaiklin <sdc.blanco at youmail.dk>
AuthorDate: Mon Dec 28 13:20:27 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Mon Dec 28 13:20:27 2020 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'master'
      to 787dd690a7fd636c22f24b5561e9ba93503f56de
      - tdf#130170 update and elaborate Create Style dialog help
    
           * change page title and control names because of
             tdf#139017, which changes dialog box.
           + add module-specific introduction/explanation of
               purpose of dialog box, with application-switch
               for all applications
           + add <howtoget> section with module and sys-specific
               application-switch for all applications
           + add application switch to <relatedtopics> section, and
             add module-specific links for each module.
    
        Change-Id: Id8219cdd53fcc15c5fd46c0e38108689e0e48848
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107904
        Tested-by: Jenkins
        Reviewed-by: Martin Srebotnjak <miles at filmsi.net>
        Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>

diff --git a/helpcontent2 b/helpcontent2
index 2d25728791cd..787dd690a7fd 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2d25728791cda5d7cc9ddc0b38915977a00c6d11
+Subproject commit 787dd690a7fd636c22f24b5561e9ba93503f56de
commit 54b5e6b4e083ce7a71e16ef622753898f38dc8ab
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Dec 17 11:15:25 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Mon Dec 28 13:20:11 2020 +0100

    jsdialog: use the "WindowShow" event
    
    If the idle notifier is disabled use the
    "WindowShow" event to notify the dialog status.
    
    This ensures the dialog is initialized with all
    children and its properties.
    
    There is a bug with the "WindowShow" event, it
    looks like it receive 2 times.
    
    Change-Id: I81947de8498aee99c3ea4ad504611c7afa62d7c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107915
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 556e34ffd346..1f5ad5563f9d 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -70,6 +70,7 @@ public:
 
     void notifyDialogState(bool bForce = false);
     void sendClose();
+    void dumpStatus();
 };
 
 class JSDropTarget final
@@ -218,6 +219,11 @@ public:
 
 class JSDialog : public JSWidget<SalInstanceDialog, ::Dialog>
 {
+    DECL_LINK(on_dump_status, void*, void);
+    DECL_LINK(on_window_event, VclWindowEvent&, void);
+
+    bool m_bNotifyCreated;
+
 public:
     JSDialog(VclPtr<vcl::Window> aNotifierWindow, VclPtr<vcl::Window> aContentWindow,
              ::Dialog* pDialog, SalInstanceBuilder* pBuilder, bool bTakeOwnership,
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 0b439f57e2f3..1b7d8428c880 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -125,6 +125,8 @@ void JSDialogSender::notifyDialogState(bool bForce)
 
 void JSDialogSender::sendClose() { mpIdleNotify->sendClose(); }
 
+void JSDialogSender::dumpStatus() { mpIdleNotify->Invoke(); }
+
 namespace
 {
 vcl::Window* extract_sal_widget(weld::Widget* pParent)
@@ -639,6 +641,11 @@ JSDialog::JSDialog(VclPtr<vcl::Window> aNotifierWindow, VclPtr<vcl::Window> aCon
     : JSWidget<SalInstanceDialog, ::Dialog>(aNotifierWindow, aContentWindow, pDialog, pBuilder,
                                             bTakeOwnership, sTypeOfJSON)
 {
+    if (aNotifierWindow && aNotifierWindow->IsDisableIdleNotify())
+    {
+        pDialog->AddEventListener(LINK(this, JSDialog, on_window_event));
+        m_bNotifyCreated = false;
+    }
 }
 
 void JSDialog::collapse(weld::Widget* pEdit, weld::Widget* pButton)
@@ -659,6 +666,17 @@ void JSDialog::response(int response)
     SalInstanceDialog::response(response);
 }
 
+IMPL_LINK_NOARG(JSDialog, on_dump_status, void*, void) { JSDialogSender::dumpStatus(); }
+
+IMPL_LINK(JSDialog, on_window_event, VclWindowEvent&, rEvent, void)
+{
+    if (rEvent.GetId() == VclEventId::WindowShow && !m_bNotifyCreated)
+    {
+        Application::PostUserEvent(LINK(this, JSDialog, on_dump_status));
+        m_bNotifyCreated = true;
+    }
+}
+
 JSLabel::JSLabel(VclPtr<vcl::Window> aNotifierWindow, VclPtr<vcl::Window> aContentWindow,
                  FixedText* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership,
                  std::string sTypeOfJSON)


More information about the Libreoffice-commits mailing list