diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-02 21:38:35 +0100 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-09-05 20:33:05 +0000 |
commit | 21188796975be8187e234de446aae4371c3b360a (patch) | |
tree | 5d58b46b9f59e75d3d8e71e3e6b788114ec4225f | |
parent | c356e54e2b2ef67043945d5e5762d3a9015ca41f (diff) |
Resolves: tdf#101795 restore hiding on end of Gtk fpicker execute
but don't hide it at the end of every RunDialog::run so that the
dialog still exists and is visible if the "sure you want to overwrite"
dialog needs to be displayed
and restore the cui options stuff to its original state as well,
undoing the earlier efforts of...
commit c1bd3156cf66318023f36d81ce809a38072588e4
Author: Caolán McNamara <caolanm@redhat.com>
Date: Thu Jul 21 21:44:06 2016 +0100
Resolves: tdf#101054 crash on options->path with non-native file picker
and
commit 3bbc0574d78d129359638b74612de2f93419eeb0
Author: Caolán McNamara <caolanm@redhat.com>
Date: Tue Jul 5 10:16:51 2016 +0100
Resolves: rhbz#1352835 path options doesn't promptly destroy folder picker
Change-Id: I5d6bcee9fb0a73a95cc29e8f3f2ee2aea91a135a
(cherry picked from commit 696e83b663d4f3e00f23947613f9f3916a4dd14d)
Reviewed-on: https://gerrit.libreoffice.org/28642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | cui/source/options/optpath.cxx | 13 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkPicker.cxx | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 6aa346659ccf..b51694f0954b 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -633,12 +633,11 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) else { short nRet = xFolderPicker->execute(); - if (nRet == ExecutableDialogResults::OK) - { - OUString sFolder(xFolderPicker->getDirectory()); - ChangeCurrentEntry(sFolder); - } - xFolderPicker.clear(); + if (ExecutableDialogResults::OK != nRet) + return; + + OUString sFolder(xFolderPicker->getDirectory()); + ChangeCurrentEntry(sFolder); } } catch( Exception& ) @@ -724,9 +723,9 @@ IMPL_LINK_TYPED( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar, void ) IMPL_LINK_TYPED( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt, void ) { - assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no folder picker"); if (RET_OK == pEvt->DialogResult) { + assert(xFolderPicker.is() && "SvxPathTabPage::DialogClosedHdl(): no folder picker"); OUString sURL = xFolderPicker->getDirectory(); ChangeCurrentEntry( sURL ); } diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 4a9453b7884c..8b97bddb937c 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -1050,6 +1050,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std break; } } + gtk_widget_hide(m_pDialog); if (mnHID_FolderChange) g_signal_handler_disconnect(GTK_FILE_CHOOSER( m_pDialog ), mnHID_FolderChange); diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index 88523dadbde1..1f2e46bb7dab 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -162,6 +162,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException, s retVal = 0; break; } + gtk_widget_hide(m_pDialog); return retVal; } diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index 968051d4b36a..d7f72b26f19b 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -182,11 +182,6 @@ gint RunDialog::run() if (mxToolkit.is()) mxToolkit->removeTopWindowListener(this); -#if !GTK_CHECK_VERSION(3,0,0) - if (nStatus != 1) //PLAY - gtk_widget_hide( mpDialog ); -#endif - return nStatus; } |