BUG: 242007
REVIEW: 106380
placesPanel, SLOT(setUrl(KUrl)));
connect(placesDock, SIGNAL(visibilityChanged(bool)),
this, SLOT(slotPlacesPanelVisibilityChanged(bool)));
placesPanel, SLOT(setUrl(KUrl)));
connect(placesDock, SIGNAL(visibilityChanged(bool)),
this, SLOT(slotPlacesPanelVisibilityChanged(bool)));
+ connect(this, SIGNAL(settingsChanged()),
+ placesPanel, SLOT(readSettings()));
// Add actions into the "Panels" menu
KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this);
// Add actions into the "Panels" menu
KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this);
+
+ emit settingsChanged();
}
void DolphinMainWindow::clearStatusBar()
}
void DolphinMainWindow::clearStatusBar()
*/
void requestItemInfo(const KFileItem& item);
*/
void requestItemInfo(const KFileItem& item);
+ /**
+ * Is emitted if the settings have been changed.
+ */
+ void settingsChanged();
+
protected:
/** @see QWidget::showEvent() */
virtual void showEvent(QShowEvent* event);
protected:
/** @see QWidget::showEvent() */
virtual void showEvent(QShowEvent* event);
+void Panel::readSettings()
+{
+
+}
+
*/
void setUrl(const KUrl& url);
*/
void setUrl(const KUrl& url);
+ /**
+ * Refreshes the view to get synchronized with the settings.
+ */
+ virtual void readSettings();
+
protected:
/**
* Must be implemented by derived classes and is invoked when
protected:
/**
* Must be implemented by derived classes and is invoked when
+#include "dolphin_generalsettings.h"
+
#include <KDebug>
#include <KDirNotify>
#include <KIcon>
#include <KDebug>
#include <KDirNotify>
#include <KIcon>
+void PlacesPanel::readSettings()
+{
+ if (m_controller) {
+ const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1;
+ m_controller->setAutoActivationDelay(delay);
+ }
+}
+
void PlacesPanel::showEvent(QShowEvent* event)
{
if (event->spontaneous()) {
void PlacesPanel::showEvent(QShowEvent* event)
{
if (event->spontaneous()) {
m_controller = new KItemListController(m_model, view, this);
m_controller->setSelectionBehavior(KItemListController::SingleSelection);
m_controller->setSingleClickActivation(true);
m_controller = new KItemListController(m_model, view, this);
m_controller->setSelectionBehavior(KItemListController::SingleSelection);
m_controller->setSingleClickActivation(true);
connect(m_controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
connect(m_controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
connect(m_controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF)));
connect(m_controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
connect(m_controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
connect(m_controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF)));
virtual bool urlChanged();
virtual void showEvent(QShowEvent* event);
virtual bool urlChanged();
virtual void showEvent(QShowEvent* event);
+public slots:
+ virtual void readSettings();
+
private slots:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);
private slots:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);