]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Allow to configure in the startup configuration whether the URL Navigator should...
authorPeter Penz <peter.penz19@gmail.com>
Sun, 3 Aug 2008 14:53:30 +0000 (14:53 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 3 Aug 2008 14:53:30 +0000 (14:53 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=841571

src/dolphin_generalsettings.kcfg
src/dolphinviewcontainer.cpp
src/startupsettingspage.cpp
src/startupsettingspage.h

index 504fa5bd9cd2ebfee7e95cec0445d18abfa053d3..f7677ffa023a20e065f066607f235bc50dc63a46 100644 (file)
@@ -8,6 +8,10 @@
             <label context="@label">Should the URL be editable for the user</label>
             <default>false</default>
         </entry>
+        <entry name="ShowFullPath" type="Bool">
+            <label context="@label">Should the full path be shown inside the location bar</label>
+            <default>false</default>
+        </entry>
         <entry name="FirstRun" type="Bool">
             <label context="@label">Is the application started the first time</label>
             <default>true</default>
index 84192239be4565e954a0d3762ba50f9ea4fa9a43..4ff9ab0e474107adebbf0a6805baee7349c9264d 100644 (file)
@@ -87,6 +87,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
 
     const GeneralSettings* settings = DolphinSettings::instance().generalSettings();
     m_urlNavigator->setUrlEditable(settings->editableUrl());
+    m_urlNavigator->setShowFullPath(settings->showFullPath());
     m_urlNavigator->setHomeUrl(settings->homeUrl());
 
     m_dirLister = new DolphinDirLister();
index 532c6e6063265dc7b01abe8e00506fec0d064410..35fc47a57cfa83fc806f866a5845c5d3b5b6cdd5 100644 (file)
@@ -45,6 +45,7 @@ StartupSettingsPage::StartupSettingsPage(DolphinMainWindow* mainWin, QWidget* pa
     m_homeUrl(0),
     m_splitView(0),
     m_editableUrl(0),
+    m_showFullPath(0),
     m_filterBar(0)
 {
     const int spacing = KDialog::spacingHint();
@@ -84,10 +85,12 @@ StartupSettingsPage::StartupSettingsPage(DolphinMainWindow* mainWin, QWidget* pa
     // create 'Split view', 'Editable location' and 'Filter bar' checkboxes
     m_splitView = new QCheckBox(i18nc("@option:check Startup Settings", "Split view mode"), vBox);
     m_editableUrl = new QCheckBox(i18nc("@option:check Startup Settings", "Editable location bar"), vBox);
+    m_showFullPath = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path inside location bar"), vBox);
     m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"), vBox);
-    connect(m_splitView,   SIGNAL(toggled(bool)), this, SIGNAL(changed()));
-    connect(m_editableUrl, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
-    connect(m_filterBar,   SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+    connect(m_splitView,    SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+    connect(m_editableUrl,  SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+    connect(m_showFullPath, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+    connect(m_filterBar,    SIGNAL(toggled(bool)), this, SIGNAL(changed()));
 
     // Add a dummy widget with no restriction regarding
     // a vertical resizing. This assures that the dialog layout
@@ -121,6 +124,7 @@ void StartupSettingsPage::applySettings()
 
     settings->setSplitView(m_splitView->isChecked());
     settings->setEditableUrl(m_editableUrl->isChecked());
+    settings->setShowFullPath(m_showFullPath->isChecked());
     settings->setFilterBar(m_filterBar->isChecked());
 }
 
@@ -158,6 +162,7 @@ void StartupSettingsPage::loadSettings()
     m_homeUrl->setText(settings->homeUrl());
     m_splitView->setChecked(settings->splitView());
     m_editableUrl->setChecked(settings->editableUrl());
+    m_showFullPath->setChecked(settings->showFullPath());
     m_filterBar->setChecked(settings->filterBar());
 }
 
index bee24b15fcfa872c7cb23620d6a9e9e117adaef1..a56869cd4bc96c989ef1979fbcf49d2a958827ff 100644 (file)
@@ -59,6 +59,7 @@ private:
 
     QCheckBox* m_splitView;
     QCheckBox* m_editableUrl;
+    QCheckBox* m_showFullPath;
     QCheckBox* m_filterBar;
 };