]> cloud.milkyroute.net Git - dolphin.git/commitdiff
allow to configure whether the zoom slider and/or the space information should be...
authorPeter Penz <peter.penz19@gmail.com>
Mon, 6 Oct 2008 18:15:53 +0000 (18:15 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 6 Oct 2008 18:15:53 +0000 (18:15 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=868596

src/dolphinmainwindow.cpp
src/dolphinstatusbar.cpp
src/dolphinstatusbar.h
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h
src/generalsettingspage.cpp
src/generalsettingspage.h
src/statusbarspaceinfo.cpp

index 48f085e336bf872d6e13d30fe810fc3e26acb9bf..f3b9d62281799efcd74f57909d35c818c90b382f 100644 (file)
@@ -182,9 +182,9 @@ void DolphinMainWindow::refreshViews()
     // the secondary view
     DolphinViewContainer* activeViewContainer = m_activeViewContainer;
 
     // the secondary view
     DolphinViewContainer* activeViewContainer = m_activeViewContainer;
 
-    m_viewTab[m_tabIndex].primaryView->view()->refresh();
+    m_viewTab[m_tabIndex].primaryView->refresh();
     if (m_viewTab[m_tabIndex].secondaryView != 0) {
     if (m_viewTab[m_tabIndex].secondaryView != 0) {
-        m_viewTab[m_tabIndex].secondaryView->view()->refresh();
+        m_viewTab[m_tabIndex].secondaryView->refresh();
     }
 
     setActiveViewContainer(activeViewContainer);
     }
 
     setActiveViewContainer(activeViewContainer);
index eabbc77b107c85c2f6bd4e05d431cace747860d4..cddb09fd2a5fd2013983163f1563264b8b39fda2 100644 (file)
@@ -90,7 +90,6 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) :
     setExtensionsVisible(true);
 }
 
     setExtensionsVisible(true);
 }
 
-
 DolphinStatusBar::~DolphinStatusBar()
 {
 }
 DolphinStatusBar::~DolphinStatusBar()
 {
 }
@@ -172,6 +171,12 @@ const QString& DolphinStatusBar::defaultText() const
     return m_messageLabel->defaultText();
 }
 
     return m_messageLabel->defaultText();
 }
 
+void DolphinStatusBar::refresh()
+{
+    setExtensionsVisible(true);
+    assureVisibleText();
+}
+
 void DolphinStatusBar::resizeEvent(QResizeEvent* event)
 {
     QWidget::resizeEvent(event);
 void DolphinStatusBar::resizeEvent(QResizeEvent* event)
 {
     QWidget::resizeEvent(event);
index 3cee1ed535f7c9bdfe5f6942810cf1a73898ee7d..e64312b480cff439037485101308689f2afd7a4f 100644 (file)
@@ -115,6 +115,11 @@ public:
      */
     void setDefaultText(const QString& text);
     const QString& defaultText() const;
      */
     void setDefaultText(const QString& text);
     const QString& defaultText() const;
+        
+    /**
+     * Refreshes the status bar to get synchronized with the (updated) Dolphin settings.
+     */
+    void refresh();
 
 protected:
     /** @see QWidget::resizeEvent() */
 
 protected:
     /** @see QWidget::resizeEvent() */
index 342aa08c72cfc28e0dc2b81f9d4a8428620bdb28..99ff253c2035b560aed27f7548896a8fa4101159 100644 (file)
@@ -197,6 +197,12 @@ bool DolphinViewContainer::isActive() const
     return m_view->isActive();
 }
 
     return m_view->isActive();
 }
 
+void DolphinViewContainer::refresh()
+{
+    m_view->refresh();
+    m_statusBar->refresh();
+}
+
 bool DolphinViewContainer::isFilterBarVisible() const
 {
     return m_filterBar->isVisible();
 bool DolphinViewContainer::isFilterBarVisible() const
 {
     return m_filterBar->isVisible();
index f3ac48471e439baf65a5ce2a1f8fafa93746689b..4938835d8e38c23e2dd3142d5b40f68a0135e537 100644 (file)
@@ -104,6 +104,11 @@ public:
 
     const DolphinView* view() const;
     DolphinView* view();
 
     const DolphinView* view() const;
     DolphinView* view();
+    
+    /**
+     * Refreshes the view container to get synchronized with the (updated) Dolphin settings.
+     */
+    void refresh();
 
     /** Returns true, if the filter bar is visible. */
     bool isFilterBarVisible() const;
 
     /** Returns true, if the filter bar is visible. */
     bool isFilterBarVisible() const;
index 5dc66cbdcf7bc437d0a27faf6e4221094ddaac74..70fe72855ca6de9bc0f71cbdfe4262d45d5947d5 100644 (file)
@@ -39,6 +39,8 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa
     m_confirmDelete(0),
     m_showDeleteCommand(0),
     m_showCopyMoveMenu(0),
     m_confirmDelete(0),
     m_showDeleteCommand(0),
     m_showCopyMoveMenu(0),
+    m_showZoomSlider(0),
+    m_showSpaceInfo(0),
     m_browseThroughArchives(0),
     m_renameInline(0)
 {
     m_browseThroughArchives(0),
     m_renameInline(0)
 {
@@ -75,6 +77,18 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa
     QVBoxLayout* contextMenuBoxLayout = new QVBoxLayout(contextMenuBox);
     contextMenuBoxLayout->addWidget(m_showDeleteCommand);
     contextMenuBoxLayout->addWidget(m_showCopyMoveMenu);
     QVBoxLayout* contextMenuBoxLayout = new QVBoxLayout(contextMenuBox);
     contextMenuBoxLayout->addWidget(m_showDeleteCommand);
     contextMenuBoxLayout->addWidget(m_showCopyMoveMenu);
+    
+    QGroupBox* statusBarBox = new QGroupBox(i18nc("@title:group", "Status Bar"), vBox);
+    
+    m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), statusBarBox);
+    connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+
+    m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), statusBarBox);
+    connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+
+    QVBoxLayout* statusBarBoxLayout = new QVBoxLayout(statusBarBox);
+    statusBarBoxLayout->addWidget(m_showZoomSlider);
+    statusBarBoxLayout->addWidget(m_showSpaceInfo);
 
     m_browseThroughArchives = new QCheckBox(i18nc("@option:check", "Browse through archives"), vBox);
     connect(m_browseThroughArchives, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
 
     m_browseThroughArchives = new QCheckBox(i18nc("@option:check", "Browse through archives"), vBox);
     connect(m_browseThroughArchives, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
@@ -112,6 +126,8 @@ void GeneralSettingsPage::applySettings()
     configGroup.sync();
 
     settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked());
     configGroup.sync();
 
     settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked());
+    settings->setShowZoomSlider(m_showZoomSlider->isChecked());
+    settings->setShowSpaceInfo(m_showSpaceInfo->isChecked());
     settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
     settings->setRenameInline(m_renameInline->isChecked());
 }
     settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
     settings->setRenameInline(m_renameInline->isChecked());
 }
@@ -139,6 +155,8 @@ void GeneralSettingsPage::loadSettings()
     
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
     m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu());
     
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
     m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu());
+    m_showZoomSlider->setChecked(settings->showZoomSlider());
+    m_showSpaceInfo->setChecked(settings->showSpaceInfo());
     m_browseThroughArchives->setChecked(settings->browseThroughArchives());
     m_renameInline->setChecked(settings->renameInline());
 }
     m_browseThroughArchives->setChecked(settings->browseThroughArchives());
     m_renameInline->setChecked(settings->renameInline());
 }
index 55528bc568c7f818c9d15f16d572d370be379fcb..da49326c5c91a7e23e4612702890c476dc3a19ae 100644 (file)
@@ -52,6 +52,10 @@ private:
 
     QCheckBox* m_showDeleteCommand;
     QCheckBox* m_showCopyMoveMenu;
 
     QCheckBox* m_showDeleteCommand;
     QCheckBox* m_showCopyMoveMenu;
+    
+    QCheckBox* m_showZoomSlider;
+    QCheckBox* m_showSpaceInfo;
+    
     QCheckBox* m_browseThroughArchives;
     QCheckBox* m_renameInline;
 };
     QCheckBox* m_browseThroughArchives;
     QCheckBox* m_renameInline;
 };
index ba37a82a585feea13b994146b585c18a55dade26..adcd23d7573923612b43165cd3401bb85fe6b91c 100644 (file)
@@ -56,6 +56,7 @@ void StatusBarSpaceInfo::showEvent(QShowEvent* event)
 {
     KCapacityBar::showEvent(event);
     if (!event->spontaneous()) {
 {
     KCapacityBar::showEvent(event);
     if (!event->spontaneous()) {
+        refresh();
         m_timer->start(10000);
     }
 }
         m_timer->start(10000);
     }
 }