[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 27 18:19:09 UTC 2019


 vcl/unx/gtk3/gtk3gtkinst.cxx |   33 +++++++++++----------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

New commits:
commit 3ffb0373695a7b3a7f8cab8f2b8bf259c4300a7e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Apr 27 16:06:22 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Apr 27 20:17:25 2019 +0200

    Resolves: tdf#124975 toggle parent input blocked only in set_modal
    
    since...
    
    commit e54762baa8019d02cadd311e750f6ff0d276f67b
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Tue Apr 16 17:17:58 2019 +0100
    
        weld ScTPValidationValue and ScValidationDlg
    
    the inc/dev modality on show/hide isn't desirable anymore
    
    Change-Id: I5bf908871986160de61508c9678495d0d5a8296d
    Reviewed-on: https://gerrit.libreoffice.org/71426
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2bb5a83abaa1..e2024dd6a2c6 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2975,32 +2975,12 @@ public:
         return GtkToVcl(ret);
     }
 
-    virtual void hide() override
-    {
-        if (!gtk_widget_get_visible(m_pWidget))
-            return;
-        gtk_widget_hide(m_pWidget);
-        // if we hide the dialog while its running, then decrement the parent LibreOffice window
-        // modal count, we expect the dialog to restored while its running and match up with
-        // the inc_modal_count of show()
-        //
-        // This hide while running case is for the calc/chart dialogs which put
-        // up an extra range chooser dialog, hides the original, the user can
-        // select a range of cells and on completion the original dialog is
-        // restored
-        if (m_aDialogRun.loop_is_running())
-            m_aDialogRun.dec_modal_count();
-    }
-
     virtual void show() override
     {
         if (gtk_widget_get_visible(m_pWidget))
             return;
         sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(m_pDialog)));
         gtk_widget_show(m_pWidget);
-        // see hide comment
-        if (m_aDialogRun.loop_is_running())
-            m_aDialogRun.inc_modal_count();
     }
 
     virtual void set_modal(bool bModal) override
@@ -3008,8 +2988,17 @@ public:
         if (get_modal() == bModal)
             return;
         GtkInstanceWindow::set_modal(bModal);
-        // see hide comment, but the modality-change example
-        // is the validity dialog in calc
+        /* if change the dialog modality while its running, then also change the parent LibreOffice window
+           modal count, we typically expect the dialog modality to be restored to its original state
+
+           This change modality while running case is for...
+
+           a) the calc/chart dialogs which put up an extra range chooser
+           dialog, hides the original, the user can select a range of cells and
+           on completion the original dialog is restored
+
+           b) the validity dialog in calc
+        */
         if (m_aDialogRun.loop_is_running())
         {
             if (bModal)


More information about the Libreoffice-commits mailing list