diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-27 16:06:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-27 20:17:25 +0200 |
commit | 3ffb0373695a7b3a7f8cab8f2b8bf259c4300a7e (patch) | |
tree | 29e483de6fdab900445bb3f4d45a85993cf29d09 /vcl | |
parent | 30e619db016b59bd0c4c8aba518b20012f7ae829 (diff) |
Resolves: tdf#124975 toggle parent input blocked only in set_modal
since...
commit e54762baa8019d02cadd311e750f6ff0d276f67b
Author: Caolán McNamara <caolanm@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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 33 |
1 files changed, 11 insertions, 22 deletions
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) |