X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2f0b7cc810b3b04de5194171cbb126e4e544da90..ec00f379dc42b00a64ab1af25bb4bb1a06bd7449:/src/generalsettingspage.cpp diff --git a/src/generalsettingspage.cpp b/src/generalsettingspage.cpp index ee4832e57..4ba0e6b08 100644 --- a/src/generalsettingspage.cpp +++ b/src/generalsettingspage.cpp @@ -20,24 +20,25 @@ #include "generalsettingspage.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - #include "dolphinsettings.h" #include "dolphinmainwindow.h" #include "dolphinview.h" +#include "dolphinviewcontainer.h" #include "dolphin_generalsettings.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* parent) : SettingsPageBase(parent), m_mainWindow(mainWin), @@ -56,12 +57,12 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa vBox->setSpacing(spacing); // create 'Home URL' editor - QGroupBox* homeBox = new QGroupBox(i18n("Home Folder"), vBox); + QGroupBox* homeBox = new QGroupBox(i18nc("@title:group", "Home Folder"), vBox); KHBox* homeUrlBox = new KHBox(homeBox); homeUrlBox->setSpacing(spacing); - new QLabel(i18n("Location:"), homeUrlBox); + new QLabel(i18nc("@label:textbox", "Location:"), homeUrlBox); m_homeUrl = new QLineEdit(homeUrlBox); QPushButton* selectHomeUrlButton = new QPushButton(KIcon("folder-open"), QString(), homeUrlBox); @@ -71,10 +72,10 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa KHBox* buttonBox = new KHBox(homeBox); buttonBox->setSpacing(spacing); - QPushButton* useCurrentButton = new QPushButton(i18n("Use Current Location"), buttonBox); + QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox); connect(useCurrentButton, SIGNAL(clicked()), this, SLOT(useCurrentLocation())); - QPushButton* useDefaultButton = new QPushButton(i18n("Use Default Location"), buttonBox); + QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"), buttonBox); connect(useDefaultButton, SIGNAL(clicked()), this, SLOT(useDefaultLocation())); @@ -82,12 +83,12 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa homeBoxLayout->addWidget(homeUrlBox); homeBoxLayout->addWidget(buttonBox); - QGroupBox* startBox = new QGroupBox(i18n("Start"), vBox); + QGroupBox* startBox = new QGroupBox(i18nc("@title:group", "Startup Settings"), vBox); // create 'Split view', 'Editable location' and 'Filter bar' checkboxes - m_splitView = new QCheckBox(i18n("Split view"), startBox); - m_editableUrl = new QCheckBox(i18n("Editable location"), startBox); - m_filterBar = new QCheckBox(i18n("Filter bar"),startBox); + m_splitView = new QCheckBox(i18nc("@option:check Startup Settings", "Split view mode"), startBox); + m_editableUrl = new QCheckBox(i18nc("@option:check Startup Settings", "Editable location bar"), startBox); + m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"),startBox); QVBoxLayout* startBoxLayout = new QVBoxLayout(startBox); startBoxLayout->addWidget(m_splitView); @@ -98,12 +99,14 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa KSharedConfig::Ptr konqConfig = KSharedConfig::openConfig("konquerorrc", KConfig::IncludeGlobals); const KConfigGroup trashConfig(konqConfig, "Trash"); - QGroupBox* confirmBox = new QGroupBox(i18n("Ask Confirmation For"), vBox); + QGroupBox* confirmBox = new QGroupBox(i18nc("@title:group", "Ask For Confirmation When"), vBox); - m_confirmMoveToTrash = new QCheckBox(i18n("Move to trash"), confirmBox); + m_confirmMoveToTrash = new QCheckBox(i18nc("@option:check Ask for Confirmation When", + "Moving files or folders to trash"), confirmBox); m_confirmMoveToTrash->setChecked(trashConfig.readEntry("ConfirmTrash", false)); - m_confirmDelete = new QCheckBox(i18n("Delete"), confirmBox); + m_confirmDelete = new QCheckBox(i18nc("@option:check Ask for Confirmation When", + "Deleting files or folders"), confirmBox); m_confirmDelete->setChecked(trashConfig.readEntry("ConfirmDelete", true)); QVBoxLayout* confirmBoxLayout = new QVBoxLayout(confirmBox); @@ -111,7 +114,7 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa confirmBoxLayout->addWidget(m_confirmDelete); // create 'Show the command 'Delete' in context menu' checkbox - m_showDeleteCommand = new QCheckBox(i18n("Show the command 'Delete' in context menu"), vBox); + m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command in context menu"), vBox); const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals); const KConfigGroup kdeConfig(globalConfig, "KDE"); m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false)); @@ -180,7 +183,7 @@ void GeneralSettingsPage::selectHomeUrl() void GeneralSettingsPage::useCurrentLocation() { - const DolphinView* view = m_mainWindow->activeView(); + const DolphinView* view = m_mainWindow->activeViewContainer()->view(); m_homeUrl->setText(view->url().prettyUrl()); }