summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-02-06 16:05:37 +0000
committerMichael Stahl <mstahl@redhat.com>2014-02-06 20:28:41 +0000
commit63950ec72806489b41c2109f5c3840dcf22f4c6c (patch)
tree2d7a15c850fe13acc0954553701aea9bf898ab08
parent107241c5e2a7b08bab676732ed0185fa843df025 (diff)
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 <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx22
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.hxx4
2 files changed, 26 insertions, 0 deletions
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index cb20be40f692..b3fde26b90a2 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 69e7eb26bdda..6dc97df86cc2 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: */