vcl/unx/kde4/KDE4FilePicker.cxx | 22 ++++++++++++++++++++++ vcl/unx/kde4/KDE4FilePicker.hxx | 4 ++++ 2 files changed, 26 insertions(+)
New commits: commit 63950ec72806489b41c2109f5c3840dcf22f4c6c Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Thu Feb 6 16:05:37 2014 +0000 fdo#72187 Implement KDE4 picker notifications This notifies the XFilePickerListener of filter changes and file selection changes. Change-Id: I749c5f7420f020a3a2fbb764acb5c45d40972cf1 (cherry picked from commit a8d102c2406b8c027afb32d61271e0a2c301f133) Reviewed-on: https://gerrit.libreoffice.org/7907 Tested-by: Michael Stahl <mst...@redhat.com> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index cb20be4..b3fde26 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -189,7 +189,12 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<uno::XComponentContext>& ) // Destructor proxy connect( this, SIGNAL( cleanupProxySignal() ), this, SLOT( cleanupProxy() ), Qt::BlockingQueuedConnection ); + connect( this, SIGNAL( checkProtocolSignal() ), this, SLOT( checkProtocol() ), Qt::BlockingQueuedConnection ); + + // XFilePickerListener notifications + connect( _dialog, SIGNAL( filterChanged(const QString&) ), this, SLOT( filterChanged(const QString&) )); + connect( _dialog, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() )); } KDE4FilePicker::~KDE4FilePicker() @@ -874,6 +879,23 @@ void KDE4FilePicker::checkProtocol() KMessageBox::error( _dialog, KIO::buildErrorString( KIO::ERR_UNSUPPORTED_PROTOCOL, _dialog->baseUrl().protocol())); } +void KDE4FilePicker::filterChanged(const QString &) +{ + FilePickerEvent aEvent; + aEvent.ElementId = LISTBOX_FILTER; + OSL_TRACE( "filter changed" ); + if (m_xListener.is()) + m_xListener->controlStateChanged( aEvent ); +} + +void KDE4FilePicker::selectionChanged() +{ + FilePickerEvent aEvent; + OSL_TRACE( "file selection changed" ); + if (m_xListener.is()) + m_xListener->fileSelectionChanged( aEvent ); +} + #include "KDE4FilePicker.moc" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde4/KDE4FilePicker.hxx b/vcl/unx/kde4/KDE4FilePicker.hxx index 69e7eb2..6dc97df 100644 --- a/vcl/unx/kde4/KDE4FilePicker.hxx +++ b/vcl/unx/kde4/KDE4FilePicker.hxx @@ -230,6 +230,10 @@ private Q_SLOTS: void cleanupProxy(); void checkProtocol(); + // emit XFilePickerListener controlStateChanged event + void filterChanged(const QString &filter); + // emit XFilePickerListener fileSelectionChanged event + void selectionChanged(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits