diff options
Diffstat (limited to 'src/settings')
31 files changed, 240 insertions, 349 deletions
diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/contextmenu/contextmenusettingspage.cpp index fa064d8a1..0723fee2e 100644 --- a/src/settings/services/servicessettingspage.cpp +++ b/src/settings/contextmenu/contextmenusettingspage.cpp @@ -4,10 +4,11 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "servicessettingspage.h" +#include "contextmenusettingspage.h" #include "dolphin_generalsettings.h" #include "dolphin_versioncontrolsettings.h" +#include "dolphin_contextmenusettings.h" #include "settings/serviceitemdelegate.h" #include "settings/servicemodel.h" @@ -36,13 +37,17 @@ namespace const char CopyToMoveToService[] ="_copy_to_move_to"; } -ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : +ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent, + const KActionCollection* actions, + const QStringList& actionIds) : SettingsPageBase(parent), m_initialized(false), m_serviceModel(nullptr), m_sortModel(nullptr), m_listView(nullptr), - m_enabledVcsPlugins() + m_enabledVcsPlugins(), + m_actions(actions), + m_actionIds(actionIds) { QVBoxLayout* topLayout = new QVBoxLayout(this); @@ -70,7 +75,7 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : m_listView->setModel(m_sortModel); m_listView->setItemDelegate(delegate); m_listView->setVerticalScrollMode(QListView::ScrollPerPixel); - connect(m_listView, &QListView::clicked, this, &ServicesSettingsPage::changed); + connect(m_listView, &QListView::clicked, this, &ContextMenuSettingsPage::changed); #ifndef Q_OS_WIN auto *downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."), @@ -96,9 +101,49 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : std::sort(m_enabledVcsPlugins.begin(), m_enabledVcsPlugins.end()); } -ServicesSettingsPage::~ServicesSettingsPage() = default; +ContextMenuSettingsPage::~ContextMenuSettingsPage() { +} + +bool ContextMenuSettingsPage::entryVisible(const QString& id) +{ + if (id == "add_to_places") { + return ContextMenuSettings::showAddToPlaces(); + } else if (id == "sort") { + return ContextMenuSettings::showSortBy(); + } else if (id == "view_mode") { + return ContextMenuSettings::showViewMode(); + } else if (id == "open_in_new_tab") { + return ContextMenuSettings::showOpenInNewTab(); + } else if (id == "open_in_new_window") { + return ContextMenuSettings::showOpenInNewWindow(); + } else if (id == "copy_location") { + return ContextMenuSettings::showCopyLocation(); + } else if (id == "duplicate") { + return ContextMenuSettings::showDuplicateHere(); + } + return false; +} + +void ContextMenuSettingsPage::setEntryVisible(const QString& id, bool visible) +{ + if (id == "add_to_places") { + ContextMenuSettings::setShowAddToPlaces(visible); + } else if (id == "sort") { + ContextMenuSettings::setShowSortBy(visible); + } else if (id == "view_mode") { + ContextMenuSettings::setShowViewMode(visible); + } else if (id == "open_in_new_tab") { + ContextMenuSettings::setShowOpenInNewTab(visible); + } else if (id == "open_in_new_window") { + ContextMenuSettings::setShowOpenInNewWindow(visible); + } else if (id == "copy_location") { + ContextMenuSettings::setShowCopyLocation(visible); + } else if (id == "duplicate") { + ContextMenuSettings::setShowDuplicateHere(visible); + } +} -void ServicesSettingsPage::applySettings() +void ContextMenuSettingsPage::applySettings() { if (!m_initialized) { return; @@ -125,8 +170,11 @@ void ServicesSettingsPage::applySettings() configGroup.writeEntry("ShowDeleteCommand", checked); configGroup.sync(); } else if (service == QLatin1String(CopyToMoveToService)) { - GeneralSettings::setShowCopyMoveMenu(checked); - GeneralSettings::self()->save(); + ContextMenuSettings::setShowCopyMoveMenu(checked); + ContextMenuSettings::self()->save(); + } else if (m_actionIds.contains(service)) { + setEntryVisible(service, checked); + ContextMenuSettings::self()->save(); } else { showGroup.writeEntry(service, checked); } @@ -146,7 +194,7 @@ void ServicesSettingsPage::applySettings() } } -void ServicesSettingsPage::restoreDefaults() +void ContextMenuSettingsPage::restoreDefaults() { QAbstractItemModel* model = m_listView->model(); for (int i = 0; i < model->rowCount(); ++i) { @@ -160,7 +208,7 @@ void ServicesSettingsPage::restoreDefaults() } } -void ServicesSettingsPage::showEvent(QShowEvent* event) +void ContextMenuSettingsPage::showEvent(QShowEvent* event) { if (!event->spontaneous() && !m_initialized) { loadServices(); @@ -179,7 +227,15 @@ void ServicesSettingsPage::showEvent(QShowEvent* event) addRow(QStringLiteral("edit-copy"), i18nc("@option:check", "'Copy To' and 'Move To' commands"), CopyToMoveToService, - GeneralSettings::showCopyMoveMenu()); + ContextMenuSettings::showCopyMoveMenu()); + + // Add other built-in actions + for (const QString& id : m_actionIds) { + const QAction* action = m_actions->action(id); + if (action) { + addRow(action->icon().name(), action->text(), id, entryVisible(id)); + } + } m_sortModel->sort(Qt::DisplayRole); @@ -188,7 +244,7 @@ void ServicesSettingsPage::showEvent(QShowEvent* event) SettingsPageBase::showEvent(event); } -void ServicesSettingsPage::loadServices() +void ContextMenuSettingsPage::loadServices() { const KConfig config(QStringLiteral("kservicemenurc"), KConfig::NoGlobals); const KConfigGroup showGroup = config.group("Show"); @@ -243,7 +299,7 @@ void ServicesSettingsPage::loadServices() m_searchLineEdit->setFocus(Qt::OtherFocusReason); } -void ServicesSettingsPage::loadVersionControlSystems() +void ContextMenuSettingsPage::loadVersionControlSystems() { const QStringList enabledPlugins = VersionControlSettings::enabledPlugins(); @@ -260,7 +316,7 @@ void ServicesSettingsPage::loadVersionControlSystems() m_sortModel->sort(Qt::DisplayRole); } -bool ServicesSettingsPage::isInServicesList(const QString &service) const +bool ContextMenuSettingsPage::isInServicesList(const QString &service) const { for (int i = 0; i < m_serviceModel->rowCount(); ++i) { const QModelIndex index = m_serviceModel->index(i, 0); @@ -271,10 +327,10 @@ bool ServicesSettingsPage::isInServicesList(const QString &service) const return false; } -void ServicesSettingsPage::addRow(const QString &icon, - const QString &text, - const QString &value, - bool checked) +void ContextMenuSettingsPage::addRow(const QString &icon, + const QString &text, + const QString &value, + bool checked) { m_serviceModel->insertRow(0); @@ -284,4 +340,3 @@ void ServicesSettingsPage::addRow(const QString &icon, m_serviceModel->setData(index, value, ServiceModel::DesktopEntryNameRole); m_serviceModel->setData(index, checked, Qt::CheckStateRole); } - diff --git a/src/settings/services/servicessettingspage.h b/src/settings/contextmenu/contextmenusettingspage.h index b569852ae..88b42770f 100644 --- a/src/settings/services/servicessettingspage.h +++ b/src/settings/contextmenu/contextmenusettingspage.h @@ -3,11 +3,13 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef SERVICESSETTINGSPAGE_H -#define SERVICESSETTINGSPAGE_H +#ifndef CONTEXTMENUSETTINGSPAGE_H +#define CONTEXTMENUSETTINGSPAGE_H #include "settings/settingspagebase.h" +#include <KActionCollection> + #include <QString> class QListView; @@ -16,15 +18,17 @@ class ServiceModel; class QLineEdit; /** - * @brief Page for the 'Services' settings of the Dolphin settings dialog. + * @brief Configurations for services in the context menu. */ -class ServicesSettingsPage : public SettingsPageBase +class ContextMenuSettingsPage : public SettingsPageBase { Q_OBJECT public: - explicit ServicesSettingsPage(QWidget* parent); - ~ServicesSettingsPage() override; + explicit ContextMenuSettingsPage(QWidget* parent, + const KActionCollection* actions, + const QStringList& actionIds); + ~ContextMenuSettingsPage() override; /** @see SettingsPageBase::applySettings() */ void applySettings() override; @@ -56,6 +60,8 @@ private: const QString &text, const QString &value, bool checked); + bool entryVisible(const QString& id); + void setEntryVisible(const QString& id, bool visible); private: bool m_initialized; @@ -64,6 +70,8 @@ private: QListView* m_listView; QLineEdit *m_searchLineEdit; QStringList m_enabledVcsPlugins; + const KActionCollection* m_actions; + const QStringList m_actionIds; }; #endif diff --git a/src/settings/services/servicemenu.knsrc b/src/settings/contextmenu/servicemenu.knsrc index 0d1c103f6..0d1c103f6 100644 --- a/src/settings/services/servicemenu.knsrc +++ b/src/settings/contextmenu/servicemenu.knsrc diff --git a/src/settings/services/servicemenuinstaller/CMakeLists.txt b/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt index 46b159079..46b159079 100644 --- a/src/settings/services/servicemenuinstaller/CMakeLists.txt +++ b/src/settings/contextmenu/servicemenuinstaller/CMakeLists.txt diff --git a/src/settings/services/servicemenuinstaller/Messages.sh b/src/settings/contextmenu/servicemenuinstaller/Messages.sh index 5012eead6..5012eead6 100755 --- a/src/settings/services/servicemenuinstaller/Messages.sh +++ b/src/settings/contextmenu/servicemenuinstaller/Messages.sh diff --git a/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp index 91da3d256..91da3d256 100644 --- a/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp +++ b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp diff --git a/src/settings/services/test/service_menu_deinstallation_test.rb b/src/settings/contextmenu/test/service_menu_deinstallation_test.rb index bf44b7b7f..bf44b7b7f 100644 --- a/src/settings/services/test/service_menu_deinstallation_test.rb +++ b/src/settings/contextmenu/test/service_menu_deinstallation_test.rb diff --git a/src/settings/services/test/service_menu_installation_test.rb b/src/settings/contextmenu/test/service_menu_installation_test.rb index 7c05a40e3..7c05a40e3 100644 --- a/src/settings/services/test/service_menu_installation_test.rb +++ b/src/settings/contextmenu/test/service_menu_installation_test.rb diff --git a/src/settings/services/test/test_helper.rb b/src/settings/contextmenu/test/test_helper.rb index b4e4dded2..b4e4dded2 100644 --- a/src/settings/services/test/test_helper.rb +++ b/src/settings/contextmenu/test/test_helper.rb diff --git a/src/settings/services/test/test_run.rb b/src/settings/contextmenu/test/test_run.rb index ab298a0b0..ab298a0b0 100755 --- a/src/settings/services/test/test_run.rb +++ b/src/settings/contextmenu/test/test_run.rb diff --git a/src/settings/dolphin_contextmenusettings.kcfg b/src/settings/dolphin_contextmenusettings.kcfg new file mode 100644 index 000000000..9e7056551 --- /dev/null +++ b/src/settings/dolphin_contextmenusettings.kcfg @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd"> +<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 + http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"> + <kcfgfile name="dolphinrc"/> + <group name="ContextMenu"> + <entry name="ShowCopyMoveMenu" type="Bool"> + <label>Show 'Copy To' and 'Move To' commands in context menu</label> + <default>false</default> + </entry> + <entry name="ShowAddToPlaces" type="Bool"> + <label>Show 'Add to Places' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowSortBy" type="Bool"> + <label>Show 'Sort By' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowViewMode" type="Bool"> + <label>Show 'View Mode' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowOpenInNewTab" type="Bool"> + <label>Show 'Open in New Tab' and 'Open in New Tabs' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowOpenInNewWindow" type="Bool"> + <label>Show 'Open in New Window' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowCopyLocation" type="Bool"> + <label>Show 'Copy Location' in context menu.</label> + <default>true</default> + </entry> + <entry name="ShowDuplicateHere" type="Bool"> + <label>Show 'Duplicate Here' in context menu.</label> + <default>true</default> + </entry> + </group> +</kcfg> diff --git a/src/settings/dolphin_contextmenusettings.kcfgc b/src/settings/dolphin_contextmenusettings.kcfgc new file mode 100644 index 000000000..b50e98f01 --- /dev/null +++ b/src/settings/dolphin_contextmenusettings.kcfgc @@ -0,0 +1,4 @@ +File=dolphin_contextmenusettings.kcfg +ClassName=ContextMenuSettings +Singleton=yes +Mutators=true diff --git a/src/settings/dolphin_detailsmodesettings.kcfg b/src/settings/dolphin_detailsmodesettings.kcfg index 9d05a8ab0..c8238f1e8 100644 --- a/src/settings/dolphin_detailsmodesettings.kcfg +++ b/src/settings/dolphin_detailsmodesettings.kcfg @@ -52,5 +52,9 @@ <label>Recursive directory size limit</label> <default>10</default> </entry> + <entry name="UseShortRelativeDates" type="Bool"> + <label>if true we use short relative dates, if not short dates</label> + <default>true</default> + </entry> </group> </kcfg> diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg index c397b2945..bc1cf72aa 100644 --- a/src/settings/dolphin_generalsettings.kcfg +++ b/src/settings/dolphin_generalsettings.kcfg @@ -86,12 +86,12 @@ <label>Close active pane when toggling off split view</label> <default>true</default> </entry> - <entry name="ShowToolTips" type="Bool"> - <label>Show tooltips</label> + <entry name="OpenNewTabAfterLastTab" type="Bool"> + <label>New tab will be open after last one</label> <default>false</default> </entry> - <entry name="ShowCopyMoveMenu" type="Bool"> - <label>Show 'Copy To' and 'Move To' commands in context menu</label> + <entry name="ShowToolTips" type="Bool"> + <label>Show tooltips</label> <default>false</default> </entry> <entry name="ViewPropsTimestamp" type="DateTime" > diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index 9d8fb032a..4d759c911 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -10,7 +10,7 @@ #include "dolphinmainwindow.h" #include "general/generalsettingspage.h" #include "navigation/navigationsettingspage.h" -#include "services/servicessettingspage.h" +#include "contextmenu/contextmenusettingspage.h" #include "startup/startupsettingspage.h" #include "trash/trashsettingspage.h" #include "viewmodes/viewsettingspage.h" @@ -28,7 +28,7 @@ #include <QCloseEvent> #include <QPushButton> -DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent) : +DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, KActionCollection* actions) : KPageDialog(parent), m_pages(), m_unsavedChanges(false) @@ -77,12 +77,20 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent) : navigationSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-navigation"))); connect(navigationSettingsPage, &NavigationSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); - // Services - ServicesSettingsPage* servicesSettingsPage = new ServicesSettingsPage(this); - KPageWidgetItem* servicesSettingsFrame = addPage(servicesSettingsPage, - i18nc("@title:group", "Services")); - servicesSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("preferences-system-services"))); - connect(servicesSettingsPage, &ServicesSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); + // Context Menu + auto contextMenuSettingsPage = new ContextMenuSettingsPage(this, actions, { + QStringLiteral("add_to_places"), + QStringLiteral("sort"), + QStringLiteral("view_mode"), + QStringLiteral("open_in_new_tab"), + QStringLiteral("open_in_new_window"), + QStringLiteral("copy_location"), + QStringLiteral("duplicate") + }); + KPageWidgetItem* contextMenuSettingsFrame = addPage(contextMenuSettingsPage, + i18nc("@title:group", "Context Menu")); + contextMenuSettingsFrame->setIcon(QIcon::fromTheme(QStringLiteral("application-menu"))); + connect(contextMenuSettingsPage, &ContextMenuSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); // Trash SettingsPageBase* trashSettingsPage = nullptr; @@ -111,7 +119,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent) : m_pages.append(startupSettingsPage); m_pages.append(viewSettingsPage); m_pages.append(navigationSettingsPage); - m_pages.append(servicesSettingsPage); + m_pages.append(contextMenuSettingsPage); if (trashSettingsPage) { m_pages.append(trashSettingsPage); } diff --git a/src/settings/dolphinsettingsdialog.h b/src/settings/dolphinsettingsdialog.h index 7749a3ad8..1f1a51456 100644 --- a/src/settings/dolphinsettingsdialog.h +++ b/src/settings/dolphinsettingsdialog.h @@ -8,6 +8,7 @@ #define DOLPHINSETTINGSDIALOG_H #include <KPageDialog> +#include <KActionCollection> class QUrl; class SettingsPageBase; @@ -22,7 +23,7 @@ class DolphinSettingsDialog : public KPageDialog Q_OBJECT public: - explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr); + explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr, KActionCollection* actions = {}); ~DolphinSettingsDialog() override; signals: diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index d29b63b7d..26b7deb88 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -38,7 +38,6 @@ ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString& plugin setMinimumWidth(400); auto layout = new QVBoxLayout(this); - setLayout(layout); if (previewPlugin) { auto configurationWidget = previewPlugin->createConfigurationWidget(); @@ -65,6 +64,6 @@ ConfigurePreviewPluginDialog::ConfigurePreviewPluginDialog(const QString& plugin layout->addWidget(buttonBox); auto okButton = buttonBox->button(QDialogButtonBox::Ok); - okButton->setShortcut(Qt::CTRL + Qt::Key_Return); + okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setDefault(true); } diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index f2fb604b2..3a0aa779b 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -12,7 +12,6 @@ #include <KLocalizedString> #include <KPluginFactory> -#include <KPluginLoader> #include <kconfigwidgets_version.h> #include <QTabWidget> diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp index 725fc83f0..74fce85c7 100644 --- a/src/settings/kcm/kcmdolphinnavigation.cpp +++ b/src/settings/kcm/kcmdolphinnavigation.cpp @@ -10,7 +10,6 @@ #include <kconfigwidgets_version.h> #include <KPluginFactory> -#include <KPluginLoader> #include <QVBoxLayout> diff --git a/src/settings/kcm/kcmdolphinservices.cpp b/src/settings/kcm/kcmdolphinservices.cpp deleted file mode 100644 index 2a411f96a..000000000 --- a/src/settings/kcm/kcmdolphinservices.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#include "kcmdolphinservices.h" - -#include "settings/services/servicessettingspage.h" - -#include <kconfigwidgets_version.h> -#include <KPluginFactory> -#include <KPluginLoader> - -#include <QVBoxLayout> - -K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>(QStringLiteral("dolphinservices"));) - -DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) : - KCModule(parent, args), - m_services(nullptr) -{ - setButtons(KCModule::Default | KCModule::Help); - - QVBoxLayout* topLayout = new QVBoxLayout(this); - topLayout->setContentsMargins(0, 0, 0, 0); - - m_services = new ServicesSettingsPage(this); - connect(m_services, &ServicesSettingsPage::changed, this, &DolphinServicesConfigModule::markAsChanged); - topLayout->addWidget(m_services, 0, {}); -} - -DolphinServicesConfigModule::~DolphinServicesConfigModule() -{ -} - -void DolphinServicesConfigModule::save() -{ - m_services->applySettings(); -} - -void DolphinServicesConfigModule::defaults() -{ - m_services->restoreDefaults(); -} - -#include "kcmdolphinservices.moc" diff --git a/src/settings/kcm/kcmdolphinservices.desktop b/src/settings/kcm/kcmdolphinservices.desktop deleted file mode 100644 index 2e188f3fa..000000000 --- a/src/settings/kcm/kcmdolphinservices.desktop +++ /dev/null @@ -1,204 +0,0 @@ -Name=Dolphin Services -Name[ar]=خدمات دولفين -Name[ast]=Servicios de Dolphin -Name[az]=Dolphin xidmətləri -Name[ca]=Serveis del Dolphin -Name[ca@valencia]=Serveis del Dolphin -Name[cs]=Služby Dolphinu -Name[da]=Dolphin-tjenester -Name[de]=Dolphin-Dienste -Name[el]=Dolphin Υπηρεσίες -Name[en_GB]=Dolphin Services -Name[es]=Servicios de Dolphin -Name[et]=Dolphini teenused -Name[eu]=Dolphin zerbitzuak -Name[fi]=Dolphin – palvelut -Name[fr]=Services de Dolphin -Name[gl]=Servizos de Dolphin -Name[he]=שרותי Dolphin -Name[hu]=Dolphin szolgáltatások -Name[ia]=Servicios de Dolphin -Name[id]=Layanan Dolphin -Name[it]=Servizi di Dolphin -Name[ja]=Dolphin サービス -Name[ko]=Dolphin 서비스 -Name[lt]=Dolphin paslaugos -Name[lv]=Dolphin servisi -Name[ml]=ഡോള്ഫിന് സേവനങ്ങള് -Name[nb]=Dolphin-tjenester -Name[nl]=Dolphin-services -Name[nn]=Dolphin-tenester -Name[pa]=ਡਾਲਫਿਨ ਸੇਵਾਵਾਂ -Name[pl]=Usługi Dolphina -Name[pt]=Serviços do Dolphin -Name[pt_BR]=Serviços do Dolphin -Name[ro]=Dolphin – Servicii -Name[ru]=Действия Dolphin -Name[sk]=Služby Dolphinu -Name[sl]=Dolphin - storitve -Name[sr]=Делфинови сервиси -Name[sr@ijekavian]=Делфинови сервиси -Name[sr@ijekavianlatin]=Dolphinovi servisi -Name[sr@latin]=Dolphinovi servisi -Name[sv]=Dolphin tjänster -Name[tr]=Dolphin Servisleri -Name[uk]=Служби Dolphin -Name[vi]=Các dịch vụ Dolphin -Name[x-test]=xxDolphin Servicesxx -Name[zh_CN]=Dolphin 服务 -Name[zh_TW]=Dolphin 服務 - -[Desktop Entry] -Icon=preferences-system-services -Type=Service -X-KDE-ServiceTypes=KCModule - -X-KDE-Library=kcm_dolphinservices -X-KDE-PluginKeyword=dolphinservices -X-DocPath=dolphin/index.html#preferences-dialog-services -Name=Services -Name[ar]=الخدمات -Name[ast]=Servicios -Name[az]=Xidmətlər -Name[ca]=Serveis -Name[ca@valencia]=Serveis -Name[cs]=Služby -Name[da]=Tjenester -Name[de]=KDE-Dienste -Name[el]=Υπηρεσίες -Name[en_GB]=Services -Name[es]=Servicios -Name[et]=Teenused -Name[eu]=Zerbitzuak -Name[fi]=Palvelut -Name[fr]=Services -Name[gl]=Servizos -Name[he]=שירותים -Name[hu]=Szolgáltatások -Name[ia]=Servicios -Name[id]=Layanan -Name[it]=Servizi -Name[ja]=サービス -Name[ko]=서비스 -Name[lt]=Paslaugos -Name[lv]=Servisi -Name[ml]=സേവനങ്ങള് -Name[nb]=Tjenester -Name[nl]=Services -Name[nn]=Tenester -Name[pa]=ਸੇਵਾਵਾਂ -Name[pl]=Usługi -Name[pt]=Serviços -Name[pt_BR]=Serviços -Name[ro]=Servicii -Name[ru]=Действия -Name[sk]=Služby -Name[sl]=Storitve -Name[sr]=Сервиси -Name[sr@ijekavian]=Сервиси -Name[sr@ijekavianlatin]=Servisi -Name[sr@latin]=Servisi -Name[sv]=Tjänster -Name[tr]=Servisler -Name[uk]=Служби -Name[vi]=Các dịch vụ -Name[x-test]=xxServicesxx -Name[zh_CN]=服务 -Name[zh_TW]=服務 -Comment=Configure file manager services -Comment[ar]=اضبط خدمات مدير الملفّات -Comment[ast]=Configura los servicios del xestor de ficheros -Comment[az]=Fayl meneceri xidmətlərini tənzimləmək -Comment[ca]=Configura els serveis del gestor de fitxers -Comment[ca@valencia]=Configura els serveis del gestor de fitxers -Comment[cs]=Nastavení služeb správce souborů -Comment[da]=Indstil filhåndteringstjenester -Comment[de]=Dateiverwaltungs-Dienste einrichten -Comment[el]=Διαμόρφωση υπηρεσιών του διαχειριστή αρχείων -Comment[en_GB]=Configure file manager services -Comment[es]=Configurar los servicios del gestor de archivos -Comment[et]=Failihalduri teenuste seadistamine -Comment[eu]=Konfiguratu fitxategi-kudeatzailearen zerbitzuak -Comment[fi]=Tiedostonhallinnan palveluasetukset -Comment[fr]=Configuration des services du gestionnaire de fichiers -Comment[gl]=Configurar servizos de xestores de ficheiros. -Comment[hu]=A fájlkezelő szolgáltatásainak beállítása -Comment[ia]=Configura servicios del gerente de file -Comment[id]=Konfigurasikan layanan pengelola file -Comment[it]=Configura i servizi del gestore dei file -Comment[ja]=ファイルマネージャのサービスを設定します -Comment[ko]=파일 관리자 서비스 구성 -Comment[lt]=Konfigūruoti failų tvarkytuvės paslaugas -Comment[lv]=Konfigurēt datņu pārvaldnieka servisus -Comment[ml]=ഫയല് മാനേജർ സേവനങ്ങള് ക്രമീകരിയ്ക്കുക -Comment[nb]=Sett opp tjenester i filbehandleren -Comment[nl]=Bestandsbeheerderservices configureren -Comment[nn]=Set opp tenester i filhandsamaren -Comment[pa]=ਫਾਇਲ ਮੈਨੇਜਰ ਦੀਆਂ ਸਰਵਿਸਾਂ ਦੀ ਸੰਰਚਨਾ -Comment[pl]=Ustawienia usług zarządzania plikami -Comment[pt]=Configurar os serviços do gestor de ficheiros -Comment[pt_BR]=Configura os serviços do gerenciador de arquivos -Comment[ro]=Configurează serviciile gestionarului de fișiere -Comment[ru]=Настройка действий в диспетчере файлов -Comment[sk]=Nastavenie služieb správcu súborov -Comment[sl]=Nastavitve storitev upravljalnika datotek -Comment[sr]=Подешавање сервиса менаџера фајлова -Comment[sr@ijekavian]=Подешавање сервиса менаџера фајлова -Comment[sr@ijekavianlatin]=Podešavanje servisa menadžera fajlova -Comment[sr@latin]=Podešavanje servisa menadžera fajlova -Comment[sv]=Anpassa filhanterarens tjänster -Comment[tr]=Dosya yöneticisi servislerini yapılandır -Comment[uk]=Налаштувати служби менеджера файлів -Comment[vi]=Cấu hình các dịch vụ trình quản lí tệp -Comment[x-test]=xxConfigure file manager servicesxx -Comment[zh_CN]=配置文件管理器服务 -Comment[zh_TW]=設定檔案管理員服務 -X-KDE-Keywords=file manager -X-KDE-Keywords[ar]=مدير ملفّات ملفات الملفّات الملفات -X-KDE-Keywords[ast]=xestor de ficheros -X-KDE-Keywords[az]=fayl meneceri -X-KDE-Keywords[ca]=gestor de fitxers -X-KDE-Keywords[ca@valencia]=gestor de fitxers -X-KDE-Keywords[cs]=správce souborů -X-KDE-Keywords[da]=filhåndtering -X-KDE-Keywords[de]=Dateiverwaltung -X-KDE-Keywords[el]=διαχειριστής αρχείων -X-KDE-Keywords[en_GB]=file manager -X-KDE-Keywords[es]=gestor de archivos -X-KDE-Keywords[et]=failihaldur -X-KDE-Keywords[eu]=Fitxategi-kudeatzailea -X-KDE-Keywords[fi]=tiedostonhallinta -X-KDE-Keywords[fr]=gestionnaire de fichiers -X-KDE-Keywords[gl]=xestor de ficheiros -X-KDE-Keywords[he]=מנהל קבצים -X-KDE-Keywords[hu]=fájlkezelő -X-KDE-Keywords[ia]=gerente de file -X-KDE-Keywords[id]=pengelola file -X-KDE-Keywords[it]=gestore dei file -X-KDE-Keywords[ja]=ファイルマネージャ -X-KDE-Keywords[ko]=파일 관리자 -X-KDE-Keywords[lt]=failų tvarkytuvė -X-KDE-Keywords[lv]=datņu pārvaldnieks -X-KDE-Keywords[ml]=ഫയൽ മാനേജർ -X-KDE-Keywords[nb]=filbehandler -X-KDE-Keywords[nl]=bestandsbeheerder -X-KDE-Keywords[nn]=filhandsamar -X-KDE-Keywords[pa]=ਫਾਇਲ ਮੈਨੇਜਰ -X-KDE-Keywords[pl]=zarządzanie plikami -X-KDE-Keywords[pt]=gestor de ficheiros -X-KDE-Keywords[pt_BR]=gerenciador de arquivos -X-KDE-Keywords[ro]=gestionar de fișiere -X-KDE-Keywords[ru]=диспетчер файлов -X-KDE-Keywords[sk]=správca súborov -X-KDE-Keywords[sl]=upravljalnik datotek -X-KDE-Keywords[sr]=file manager,менаџер фајлова -X-KDE-Keywords[sr@ijekavian]=file manager,менаџер фајлова -X-KDE-Keywords[sr@ijekavianlatin]=file manager,menadžer fajlova -X-KDE-Keywords[sr@latin]=file manager,menadžer fajlova -X-KDE-Keywords[sv]=filhanterare -X-KDE-Keywords[tr]=dosya yöneticisi -X-KDE-Keywords[uk]=менеджер,керування,файл,файли -X-KDE-Keywords[vi]=file manager,trình quản lí tệp -X-KDE-Keywords[x-test]=xxfile managerxx -X-KDE-Keywords[zh_CN]=文件管理器 -X-KDE-Keywords[zh_TW]=檔案管理員 diff --git a/src/settings/kcm/kcmdolphinservices.h b/src/settings/kcm/kcmdolphinservices.h deleted file mode 100644 index ea94a98d4..000000000 --- a/src/settings/kcm/kcmdolphinservices.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef KCMDOLPHINSERVICES_H -#define KCMDOLPHINSERVICES_H - -#include <KCModule> - -class ServicesSettingsPage; - -/** - * @brief Allow to configure the Dolphin services. - */ -class DolphinServicesConfigModule : public KCModule -{ - Q_OBJECT - -public: - DolphinServicesConfigModule(QWidget* parent, const QVariantList& args); - ~DolphinServicesConfigModule() override; - - void save() override; - void defaults() override; - -private: - ServicesSettingsPage *m_services; -}; - -#endif diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp index 5ab53e9b9..fcd33a0f0 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.cpp +++ b/src/settings/kcm/kcmdolphinviewmodes.cpp @@ -10,7 +10,6 @@ #include <KLocalizedString> #include <KPluginFactory> -#include <KPluginLoader> #include <QDBusConnection> #include <QDBusMessage> diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp index 41a39a537..11bc25f3b 100644 --- a/src/settings/navigation/navigationsettingspage.cpp +++ b/src/settings/navigation/navigationsettingspage.cpp @@ -6,36 +6,48 @@ #include "navigationsettingspage.h" +#include "global.h" #include "dolphin_generalsettings.h" #include <KLocalizedString> +#include <QButtonGroup> #include <QCheckBox> +#include <QFormLayout> +#include <QRadioButton> #include <QVBoxLayout> NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) : SettingsPageBase(parent), m_openArchivesAsFolder(nullptr), - m_autoExpandFolders(nullptr) + m_autoExpandFolders(nullptr), + m_openNewTabAfterLastTab(nullptr), + m_openNewTabAfterCurrentTab(nullptr) { - QVBoxLayout* topLayout = new QVBoxLayout(this); - QWidget* vBox = new QWidget(this); - QVBoxLayout *vBoxLayout = new QVBoxLayout(vBox); - vBoxLayout->setContentsMargins(0, 0, 0, 0); - vBoxLayout->setAlignment(Qt::AlignTop); + QFormLayout* topLayout = new QFormLayout(this); - m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder"), vBox); - vBoxLayout->addWidget(m_openArchivesAsFolder); + // Tabs properties + m_openNewTabAfterCurrentTab = new QRadioButton(i18nc("option:radio", "After current tab")); + m_openNewTabAfterLastTab = new QRadioButton(i18nc("option:radio", "At end of tab bar")); + QButtonGroup* tabsBehaviorGroup = new QButtonGroup(this); + tabsBehaviorGroup->addButton(m_openNewTabAfterCurrentTab); + tabsBehaviorGroup->addButton(m_openNewTabAfterLastTab); + topLayout->addRow(i18nc("@title:group", "Open new tabs: "), m_openNewTabAfterCurrentTab); + topLayout->addRow(QString(), m_openNewTabAfterLastTab); - m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"), vBox); - vBoxLayout->addWidget(m_autoExpandFolders); + topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); - topLayout->addWidget(vBox); + m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder")); + m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations")); + topLayout->addRow(i18nc("@title:group", "General: "), m_openArchivesAsFolder); + topLayout->addRow(QString(), m_autoExpandFolders); loadSettings(); connect(m_openArchivesAsFolder, &QCheckBox::toggled, this, &NavigationSettingsPage::changed); connect(m_autoExpandFolders, &QCheckBox::toggled, this, &NavigationSettingsPage::changed); + connect(m_openNewTabAfterCurrentTab, &QRadioButton::toggled, this, &NavigationSettingsPage::changed); + connect(m_openNewTabAfterLastTab, &QRadioButton::toggled, this, &NavigationSettingsPage::changed); } NavigationSettingsPage::~NavigationSettingsPage() @@ -47,6 +59,7 @@ void NavigationSettingsPage::applySettings() GeneralSettings* settings = GeneralSettings::self(); settings->setBrowseThroughArchives(m_openArchivesAsFolder->isChecked()); settings->setAutoExpandFolders(m_autoExpandFolders->isChecked()); + settings->setOpenNewTabAfterLastTab(m_openNewTabAfterLastTab->isChecked()); settings->save(); } @@ -63,5 +76,7 @@ void NavigationSettingsPage::loadSettings() { m_openArchivesAsFolder->setChecked(GeneralSettings::browseThroughArchives()); m_autoExpandFolders->setChecked(GeneralSettings::autoExpandFolders()); + m_openNewTabAfterLastTab->setChecked(GeneralSettings::openNewTabAfterLastTab()); + m_openNewTabAfterCurrentTab->setChecked(!m_openNewTabAfterLastTab->isChecked()); } diff --git a/src/settings/navigation/navigationsettingspage.h b/src/settings/navigation/navigationsettingspage.h index 8b4781b44..a0c75e7f5 100644 --- a/src/settings/navigation/navigationsettingspage.h +++ b/src/settings/navigation/navigationsettingspage.h @@ -9,6 +9,7 @@ #include "settings/settingspagebase.h" class QCheckBox; +class QRadioButton; /** * @brief Page for the 'Navigation' settings of the Dolphin settings dialog. @@ -33,6 +34,8 @@ private: private: QCheckBox* m_openArchivesAsFolder; QCheckBox* m_autoExpandFolders; + QRadioButton* m_openNewTabAfterLastTab; + QRadioButton* m_openNewTabAfterCurrentTab; }; #endif diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp index 6c3f6bdad..a7fcec4fa 100644 --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -13,6 +13,7 @@ #include <KLocalizedString> #include <KMessageBox> +#include <KProtocolManager> #include <QButtonGroup> #include <QCheckBox> @@ -138,11 +139,17 @@ void StartupSettingsPage::applySettings() GeneralSettings* settings = GeneralSettings::self(); const QUrl url(QUrl::fromUserInput(m_homeUrl->text(), QString(), QUrl::AssumeLocalFile)); - KFileItem fileItem(url); - if ((url.isValid() && fileItem.isDir()) || (url.scheme() == QLatin1String("timeline"))) { - settings->setHomeUrl(url.toDisplayString(QUrl::PreferLocalFile)); + if (url.isValid() && KProtocolManager::supportsListing(url)) { + KIO::StatJob* job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo); + connect(job, &KJob::result, this, [this, settings, url](KJob* job) { + if (job->error() == 0 && qobject_cast<KIO::StatJob*>(job)->statResult().isDir()) { + settings->setHomeUrl(url.toDisplayString(QUrl::PreferLocalFile)); + } else { + showSetDefaultDirectoryError(); + } + }); } else { - KMessageBox::error(this, i18nc("@info", "The location for the home folder is invalid or does not exist, it will not be applied.")); + showSetDefaultDirectoryError(); } // Remove saved state if "remember open tabs" has been turned off @@ -222,3 +229,8 @@ void StartupSettingsPage::loadSettings() m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar()); m_openExternallyCalledFolderInNewTab->setChecked(GeneralSettings::openExternallyCalledFolderInNewTab()); } + +void StartupSettingsPage::showSetDefaultDirectoryError() +{ + KMessageBox::error(this, i18nc("@info", "The location for the home folder is invalid or does not exist, it will not be applied.")); +} diff --git a/src/settings/startup/startupsettingspage.h b/src/settings/startup/startupsettingspage.h index ff3ffcb12..1090e0822 100644 --- a/src/settings/startup/startupsettingspage.h +++ b/src/settings/startup/startupsettingspage.h @@ -43,6 +43,7 @@ private slots: private: void loadSettings(); + void showSetDefaultDirectoryError(); private: QUrl m_url; diff --git a/src/settings/viewmodes/viewsettingstab.cpp b/src/settings/viewmodes/viewsettingstab.cpp index cf8cd2810..0fd2dca3a 100644 --- a/src/settings/viewmodes/viewsettingstab.cpp +++ b/src/settings/viewmodes/viewsettingstab.cpp @@ -14,6 +14,7 @@ #include "views/zoomlevelinfo.h" #include <KLocalizedString> +#include <KFormat> #include <QApplication> #include <QCheckBox> @@ -34,7 +35,9 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) : m_widthBox(nullptr), m_maxLinesBox(nullptr), m_expandableFolders(nullptr), - m_recursiveDirectorySizeLimit(nullptr) + m_recursiveDirectorySizeLimit(nullptr), + m_useRelatetiveDates(nullptr), + m_useShortDates(nullptr) { QFormLayout* topLayout = new QFormLayout(this); @@ -121,6 +124,25 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) : topLayout->addRow(i18nc("@title:group", "Folder size displays:"), m_numberOfItems); topLayout->addRow(QString(), contentsSizeLayout); #endif + + QDateTime thirtyMinutesAgo = QDateTime::currentDateTime().addSecs(-30 * 60); + QLocale local; + KFormat formatter(local); + + m_useRelatetiveDates = new QRadioButton(i18nc( + "option:radio as in relative date", "Relative (e.g. '%1')", formatter.formatRelativeDateTime(thirtyMinutesAgo, QLocale::ShortFormat)) + ); + m_useShortDates = new QRadioButton( + i18nc("option:radio as in absolute date", "Absolute (e.g. '%1')", local.toString(thirtyMinutesAgo, QLocale::ShortFormat)) + ); + + QButtonGroup* dateFormatGroup = new QButtonGroup(this); + dateFormatGroup->addButton(m_useRelatetiveDates); + dateFormatGroup->addButton(m_useShortDates); + + topLayout->addRow(i18nc("@title:group", "Date style:"), m_useRelatetiveDates); + topLayout->addRow(QString(), m_useShortDates); + break; } @@ -147,6 +169,8 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) : m_recursiveDirectorySizeLimit->setEnabled(m_sizeOfContents->isChecked()); }); #endif + connect(m_useRelatetiveDates, &QRadioButton::toggled, this, &ViewSettingsTab::changed); + connect(m_useShortDates, &QRadioButton::toggled, this, &ViewSettingsTab::changed); break; default: break; @@ -176,6 +200,7 @@ void ViewSettingsTab::applySettings() DetailsModeSettings::setDirectorySizeCount(m_numberOfItems->isChecked()); DetailsModeSettings::setRecursiveDirectorySizeLimit(m_recursiveDirectorySizeLimit->value()); #endif + DetailsModeSettings::setUseShortRelativeDates(m_useRelatetiveDates->isChecked()); break; default: break; @@ -234,6 +259,8 @@ void ViewSettingsTab::loadSettings() } m_recursiveDirectorySizeLimit->setValue(DetailsModeSettings::recursiveDirectorySizeLimit()); #endif + m_useRelatetiveDates->setChecked(DetailsModeSettings::useShortRelativeDates()); + m_useShortDates->setChecked(!DetailsModeSettings::useShortRelativeDates()); break; default: break; diff --git a/src/settings/viewmodes/viewsettingstab.h b/src/settings/viewmodes/viewsettingstab.h index 41b40b95e..d5756bb3a 100644 --- a/src/settings/viewmodes/viewsettingstab.h +++ b/src/settings/viewmodes/viewsettingstab.h @@ -64,6 +64,8 @@ private: QRadioButton* m_numberOfItems; QRadioButton* m_sizeOfContents; QSpinBox* m_recursiveDirectorySizeLimit; + QRadioButton* m_useRelatetiveDates; + QRadioButton* m_useShortDates; }; #endif diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index c6dbc82b4..82d182d1d 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -64,7 +64,6 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : auto layout = new QFormLayout(this); // Otherwise the dialog won't resize when we collapse the KCollapsibleGroupBox. layout->setSizeConstraint(QLayout::SetFixedSize); - setLayout(layout); // create 'Properties' group containing view mode, sorting, sort order and show hidden files m_viewMode = new QComboBox(); @@ -89,7 +88,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : auto additionalInfoBox = new KCollapsibleGroupBox(); additionalInfoBox->setTitle(i18nc("@title:group", "Additional Information")); - auto innerLayout = new QVBoxLayout(); + auto innerLayout = new QVBoxLayout(additionalInfoBox); { QList<QByteArray> visibleRoles = m_viewProps->visibleRoles(); @@ -133,8 +132,6 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : innerLayout->addWidget(m_listWidget); } - additionalInfoBox->setLayout(innerLayout); - QHBoxLayout* sortingLayout = new QHBoxLayout(); sortingLayout->setContentsMargins(0, 0, 0, 0); sortingLayout->addWidget(m_sortOrder); @@ -212,7 +209,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : layout->addWidget(buttonBox); auto okButton = buttonBox->button(QDialogButtonBox::Ok); - okButton->setShortcut(Qt::CTRL + Qt::Key_Return); + okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setDefault(true); auto applyButton = buttonBox->button(QDialogButtonBox::Apply); diff --git a/src/settings/viewpropsprogressinfo.cpp b/src/settings/viewpropsprogressinfo.cpp index 57a00c2b1..cd4ff379c 100644 --- a/src/settings/viewpropsprogressinfo.cpp +++ b/src/settings/viewpropsprogressinfo.cpp @@ -44,7 +44,6 @@ ViewPropsProgressInfo::ViewPropsProgressInfo(QWidget* parent, m_viewProps->setAutoSaveEnabled(false); auto layout = new QVBoxLayout(this); - setLayout(layout); m_label = new QLabel(i18nc("@info:progress", "Counting folders: %1", 0), this); layout->addWidget(m_label); |
