#include <konq_fileitemcapabilities.h>
#include <konq_operations.h>
#include <kurl.h>
+#include <kurlcombobox.h>
#include <krun.h>
#include "dolphinmodel.h"
this, SLOT(dropUrls(const KUrl&, QDropEvent*)));
connect(m_urlNavigator, SIGNAL(activated()),
this, SLOT(activate()));
+ connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, SLOT(saveUrlCompletionMode(KGlobalSettings::Completion)));
const GeneralSettings* settings = DolphinSettings::instance().generalSettings();
m_urlNavigator->setUrlEditable(settings->editableUrl());
m_urlNavigator->setShowFullPath(settings->showFullPath());
m_urlNavigator->setHomeUrl(settings->homeUrl());
+ KUrlComboBox* editor = m_urlNavigator->editor();
+ editor->setCompletionMode(KGlobalSettings::Completion(settings->urlCompletionMode()));
m_dirLister = new DolphinDirLister();
m_dirLister->setAutoUpdate(true);
m_view->setFocus();
}
+void DolphinViewContainer::saveUrlCompletionMode(KGlobalSettings::Completion completion)
+{
+ DolphinSettings& settings = DolphinSettings::instance();
+ settings.generalSettings()->setUrlCompletionMode(completion);
+ settings.save();
+}
+
void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
{
KUrl url = item.targetUrl();
#include <kfileitem.h>
#include <kfileitemdelegate.h>
+#include <kglobalsettings.h>
#include <kio/job.h>
#include <kurlnavigator.h>
/** Requests the focus for the view \a m_view. */
void requestFocus();
+ /**
+ * Saves the currently used URL completion mode of
+ * the URL navigator.
+ */
+ void saveUrlCompletionMode(KGlobalSettings::Completion completion);
+
private:
bool m_showProgress;
bool m_isFolderWritable;
<kcfg>
<kcfgfile name="dolphinrc"/>
<include>QDir</include>
+ <include>kglobalsettings.h</include>
<group name="General">
<entry name="EditableUrl" type="Bool">
<label context="@label">Should the URL be editable for the user</label>
<default>false</default>
</entry>
+ <entry name="UrlCompletionMode" type="Enum">
+ <label context="@label">Text completion mode of the URL Navigator</label>
+ <default code="true">KGlobalSettings::completionMode()</default>
+ </entry>
<entry name="ShowFullPath" type="Bool">
<label context="@label">Should the full path be shown inside the location bar</label>
<default>false</default>