Compare commits
100 Commits
Author | SHA1 | Date |
---|---|---|
Heiko Becker | fc385fd89c | |
l10n daemon script | 66fa786e00 | |
Andrius Štikonas | bb6cd82f6d | |
Tomaz Canabrava | 4f0ff7b63a | |
Tomaz Canabrava | 90f6cb74d2 | |
Andrius Štikonas | 87eb4cdadd | |
Andrius Štikonas | d795c3d9f8 | |
Andrius Štikonas | 3b290d606d | |
Andrius Štikonas | 983c46a7ac | |
Andrius Štikonas | 48c5f67506 | |
Andrius Štikonas | 6a66203744 | |
Andrius Štikonas | 479631455c | |
Andrius Štikonas | 458872f359 | |
Andrius Štikonas | 850151655e | |
Andrius Štikonas | adacc91e75 | |
Andrius Štikonas | 909a03347a | |
Andrius Štikonas | e47827e20c | |
Andrius Štikonas | 20d41ef501 | |
Andrius Štikonas | 0ff20194b0 | |
Andrius Štikonas | ca788a9e69 | |
Andrius Štikonas | 7d4ca72118 | |
Andrius Štikonas | 312079422a | |
l10n daemon script | 843d7e9f19 | |
l10n daemon script | b29953b6b9 | |
l10n daemon script | 31bdb87514 | |
l10n daemon script | fb8249cbc9 | |
l10n daemon script | 55f525d5a4 | |
l10n daemon script | 1430b89952 | |
l10n daemon script | 28df23863e | |
Andrius Štikonas | e57c9d1552 | |
Nate Graham | 4703517c75 | |
Tomaz Canabrava | 825ca30ce7 | |
Tomaz Canabrava | a8da9ef6c1 | |
Tomaz Canabrava | afcc0c6c47 | |
Andrius Štikonas | 6f28900350 | |
Heiko Becker | d24f5cd2c1 | |
Andrius Štikonas | c9751910e8 | |
Andrius Štikonas | b9e5a055d4 | |
Andrius Štikonas | 850ab0df40 | |
Andrius Štikonas | 519bea8fd5 | |
Andrius Štikonas | 47e6d5f3d2 | |
Andrius Štikonas | 4e5cbcdb65 | |
Tomaz Canabrava | 1edb947525 | |
Tomaz Canabrava | 2bcd994bf1 | |
Tomaz Canabrava | bfc445bd7c | |
Tomaz Canabrava | 6b27467943 | |
Alessio Bonfiglio | 4f17fc5548 | |
Albert Astals Cid | dffa270506 | |
Andrius Štikonas | 81bbfea449 | |
Tomaz Canabrava | 479c3f4678 | |
Tomaz Canabrava | a577f8a0b8 | |
Tomaz Canabrava | a85b63c004 | |
Tomaz Canabrava | 099c753516 | |
Tomaz Canabrava | ae088e1ace | |
Albert Astals Cid | 1c5d0f5b4a | |
Tomaz Canabrava | a389b0e9ff | |
Tomaz Canabrava | a41c31c66f | |
Heiko Becker | 26ef5d3342 | |
Heiko Becker | d951b24fd8 | |
Heiko Becker | 6339ca235c | |
Andrius Štikonas | 4fbf432640 | |
Heiko Becker | 90b0aa2ed4 | |
Heiko Becker | d4afb41e87 | |
l10n daemon script | 5264203fe8 | |
Albert Astals Cid | c0565bd091 | |
Heiko Becker | a3d219f401 | |
Andrius Štikonas | 9212d74464 | |
Heiko Becker | 03fad35e25 | |
Heiko Becker | 2b7cf50f5c | |
l10n daemon script | 789a014df2 | |
Carl Schwan | 072e8c4720 | |
Heiko Becker | 03dd7cb0e0 | |
l10n daemon script | 8ecb5373c1 | |
l10n daemon script | 4407b41a21 | |
Andrius Štikonas | bdb0d25ace | |
Albert Astals Cid | 2e80aa5bdd | |
Heiko Becker | d23a3bde10 | |
Luigi Toscano | d58f97bf51 | |
Heiko Becker | c8e2afccb1 | |
l10n daemon script | 2fcaecab43 | |
l10n daemon script | 6385967402 | |
l10n daemon script | a428b26f2e | |
Christoph Feck | 42c46fa674 | |
l10n daemon script | c1ca4a3399 | |
l10n daemon script | 69d03099b0 | |
l10n daemon script | 03da1748bc | |
Christoph Feck | 2f226daa00 | |
Andrius Štikonas | 175eaef1b9 | |
Andrius Štikonas | 03edda5de6 | |
Andrius Štikonas | aa32927848 | |
Albert Astals Cid | f419683cd6 | |
Albert Astals Cid | 50d8321b3a | |
Albert Astals Cid | e40ef5d88d | |
Albert Astals Cid | 80a2b51a68 | |
Yuri Chornoivan | d45ee40326 | |
Andrius Štikonas | 2ab0ceb998 | |
Andrius Štikonas | cd10b5ba2c | |
Andrius Štikonas | 7d515e43bf | |
Andrius Štikonas | 631cac66c8 | |
Andrius Štikonas | 5a4df98216 |
|
@ -0,0 +1,7 @@
|
||||||
|
# SPDX-FileCopyrightText: None
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
include:
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
|
|
@ -0,0 +1,19 @@
|
||||||
|
# SPDX-FileCopyrightText: None
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
- 'on': ['@all']
|
||||||
|
'require':
|
||||||
|
'frameworks/extra-cmake-modules': '@stable'
|
||||||
|
'frameworks/kconfig': '@stable'
|
||||||
|
'frameworks/kconfigwidgets': '@stable'
|
||||||
|
'frameworks/kcoreaddons': '@stable'
|
||||||
|
'frameworks/kcrash': '@stable'
|
||||||
|
'frameworks/kdbusaddons': '@stable'
|
||||||
|
'frameworks/kdoctools': '@stable'
|
||||||
|
'frameworks/ki18n': '@stable'
|
||||||
|
'frameworks/kio': '@stable'
|
||||||
|
'frameworks/kjobwidgets': '@stable'
|
||||||
|
'frameworks/kwidgetaddons': '@stable'
|
||||||
|
'frameworks/kxmlgui': '@stable'
|
||||||
|
'system/kpmcore': '@same'
|
|
@ -1,30 +1,26 @@
|
||||||
# SPDX-FileCopyrightText: 2008 Volker Lanz <vl@fidra.de>
|
# SPDX-FileCopyrightText: 2008 Volker Lanz <vl@fidra.de>
|
||||||
# SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
|
# SPDX-FileCopyrightText: 2014-2022 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
project(partitionmanager)
|
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
# KDE Application Version, managed by release script
|
||||||
|
set (RELEASE_SERVICE_VERSION_MAJOR "22")
|
||||||
|
set (RELEASE_SERVICE_VERSION_MINOR "03")
|
||||||
|
set (RELEASE_SERVICE_VERSION_MICRO "70")
|
||||||
|
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
|
||||||
|
project(partitionmanager VERSION ${RELEASE_SERVICE_VERSION})
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
set(QT_MIN_VERSION "5.10.0")
|
set(QT_MIN_VERSION "5.15.0")
|
||||||
set(KF5_MIN_VERSION "5.71")
|
set(KF5_MIN_VERSION "5.90")
|
||||||
set(KPMCORE_MIN_VERSION "4.2.0")
|
set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}")
|
||||||
|
|
||||||
|
set(KDE_COMPILERSETTINGS_LEVEL "5.85")
|
||||||
|
|
||||||
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||||
set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE)
|
|
||||||
|
|
||||||
# Check KPMcore dependency when bumping
|
|
||||||
set(VERSION_MAJOR "4")
|
|
||||||
set(VERSION_MINOR "2")
|
|
||||||
set(VERSION_RELEASE "0")
|
|
||||||
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE})
|
|
||||||
add_definitions(-D'VERSION="${VERSION}"') #"
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
||||||
|
@ -36,7 +32,11 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
|
||||||
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
if (NOT QT_MAJOR_VERSION)
|
||||||
|
set(QT_MAJOR_VERSION "5")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||||
Core
|
Core
|
||||||
Gui
|
Gui
|
||||||
Widgets
|
Widgets
|
||||||
|
@ -59,32 +59,21 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
|
||||||
DocTools
|
DocTools
|
||||||
)
|
)
|
||||||
|
|
||||||
# use sane compile flags
|
find_package(PolkitQt${QT_MAJOR_VERSION}-1 REQUIRED)
|
||||||
add_definitions(
|
|
||||||
-DQT_USE_QSTRINGBUILDER
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
|
||||||
-DQT_NO_CAST_TO_ASCII
|
|
||||||
-DQT_NO_CAST_FROM_ASCII
|
|
||||||
-DQT_STRICT_ITERATORS
|
|
||||||
-DQT_NO_URL_CAST_FROM_STRING
|
|
||||||
-DQT_NO_CAST_FROM_BYTEARRAY
|
|
||||||
-DQT_NO_CAST_TO_BYTEARRAY
|
|
||||||
-DQT_USE_FAST_OPERATOR_PLUS
|
|
||||||
-DQT_DISABLE_DEPRECATED_BEFORE=0x050900
|
|
||||||
-DQT_NO_KEYWORDS
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package(KPMcore ${KPMCORE_MIN_VERSION} REQUIRED)
|
find_package(KPMcore ${KPMCORE_MIN_VERSION} REQUIRED)
|
||||||
|
|
||||||
include_directories(${Qt5Core_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} ${KPMCORE_INCLUDE_DIR} lib/ src/)
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(icons)
|
add_subdirectory(icons)
|
||||||
if (KF5DocTools_FOUND)
|
if (KF5DocTools_FOUND)
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
|
kdoctools_install(po)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ki18n_install(po)
|
ki18n_install(po)
|
||||||
|
|
||||||
message(STATUS "KDE Partition Manager ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "KDE Partition Manager ${RELEASE_SERVICE_VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
|
@ -28,7 +28,7 @@ a potentially dangerous program for your data. It has been tested carefully and
|
||||||
there are currently no known bugs that could lead to data loss, but nevertheless
|
there are currently no known bugs that could lead to data loss, but nevertheless
|
||||||
there is always a chance for an error to occur and you might lose your data.
|
there is always a chance for an error to occur and you might lose your data.
|
||||||
|
|
||||||
<img src="https://docs.kde.org/trunk5/en/extragear-sysadmin/partitionmanager/resize_howto_4.png" align="center"
|
<img src="https://cdn.kde.org/screenshots/partitionmanager/partitionmanager.png" align="center"
|
||||||
title="KDE Partition Manager" width="800">
|
title="KDE Partition Manager" width="800">
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR partitionmanager )
|
kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR partitionmanager )
|
||||||
|
|
|
@ -7,6 +7,8 @@ include(config/CMakeLists.txt)
|
||||||
include(gui/CMakeLists.txt)
|
include(gui/CMakeLists.txt)
|
||||||
include(util/CMakeLists.txt)
|
include(util/CMakeLists.txt)
|
||||||
|
|
||||||
|
set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS "VERSION=\"${RELEASE_SERVICE_VERSION}\"")
|
||||||
|
|
||||||
set(partitionmanager_SRCS
|
set(partitionmanager_SRCS
|
||||||
main.cpp
|
main.cpp
|
||||||
${CONFIG_SRC}
|
${CONFIG_SRC}
|
||||||
|
@ -19,13 +21,13 @@ file(GLOB partitionmanager_UIFILES config/*.ui gui/*.ui)
|
||||||
ki18n_wrap_ui(partitionmanager_SRCS ${partitionmanager_UIFILES})
|
ki18n_wrap_ui(partitionmanager_SRCS ${partitionmanager_UIFILES})
|
||||||
|
|
||||||
kconfig_add_kcfg_files(partitionmanager_SRCS config.kcfgc)
|
kconfig_add_kcfg_files(partitionmanager_SRCS config.kcfgc)
|
||||||
install(FILES partitionmanager.kcfg DESTINATION ${KCFG_INSTALL_DIR})
|
install(FILES partitionmanager.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
add_executable(partitionmanager ${partitionmanager_SRCS} )
|
add_executable(partitionmanager ${partitionmanager_SRCS} )
|
||||||
|
|
||||||
target_link_libraries(partitionmanager ${BLKID_LIBRARIES}
|
target_link_libraries(partitionmanager
|
||||||
kpmcore
|
kpmcore
|
||||||
KF5::ConfigCore
|
KF5::ConfigCore
|
||||||
KF5::ConfigGui
|
KF5::ConfigGui
|
||||||
|
@ -38,13 +40,18 @@ target_link_libraries(partitionmanager ${BLKID_LIBRARIES}
|
||||||
KF5::KIOWidgets
|
KF5::KIOWidgets
|
||||||
KF5::WidgetsAddons
|
KF5::WidgetsAddons
|
||||||
KF5::XmlGui
|
KF5::XmlGui
|
||||||
|
PolkitQt${QT_MAJOR_VERSION}-1::Core
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(partitionmanager PRIVATE -DCMAKE_INSTALL_FULL_LIBEXECDIR_KF5=\"${CMAKE_INSTALL_FULL_LIBEXECDIR_KF5}\")
|
target_compile_definitions(partitionmanager PRIVATE -DCMAKE_INSTALL_FULL_LIBEXECDIR_KF5=\"${CMAKE_INSTALL_FULL_LIBEXECDIR_KF5}\")
|
||||||
|
|
||||||
install(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS partitionmanager ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
install(FILES org.kde.partitionmanager.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
|
install(FILES org.kde.partitionmanager.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
|
||||||
install(FILES gui/partitionmanagerui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/partitionmanager)
|
install(FILES gui/partitionmanagerui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/partitionmanager)
|
||||||
install(PROGRAMS org.kde.partitionmanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
install(PROGRAMS org.kde.partitionmanager.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
|
install(FILES open_in_partitionmanager.desktop
|
||||||
|
open_in_partitionmanager.desktop
|
||||||
|
DESTINATION ${KDE_INSTALL_DATADIR}/solid/actions/)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
$EXTRACTRC `find -name \*.rc` >> rc.cpp || exit 11
|
$EXTRACTRC $(find -name \*.rc) >> rc.cpp || exit 11
|
||||||
$EXTRACTRC `find -name \*.ui` >> rc.cpp || exit 12
|
$EXTRACTRC $(find -name \*.ui) >> rc.cpp || exit 12
|
||||||
$EXTRACTRC `find -name \*.kcfg` >> rc.cpp || exit 12
|
$EXTRACTRC $(find -name \*.kcfg) >> rc.cpp || exit 12
|
||||||
$XGETTEXT `find -name \*.cc -o -name \*.cpp -o -name \*.h` rc.cpp -o $podir/partitionmanager.pot
|
$XGETTEXT $(find -name \*.cc -o -name \*.cpp -o -name \*.h) rc.cpp -o $podir/partitionmanager.pot
|
||||||
rm -f rc.cpp
|
rm -f rc.cpp
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
||||||
SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -13,6 +13,8 @@
|
||||||
#include <util/helpers.h>
|
#include <util/helpers.h>
|
||||||
#include "util/guihelpers.h"
|
#include "util/guihelpers.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
GeneralPageWidget::GeneralPageWidget(QWidget* parent) :
|
GeneralPageWidget::GeneralPageWidget(QWidget* parent) :
|
||||||
|
@ -42,7 +44,7 @@ void GeneralPageWidget::setupDialog()
|
||||||
|
|
||||||
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||||
|
|
||||||
for (const auto &fsName : qAsConst(fsNames))
|
for (const auto &fsName : std::as_const(fsNames))
|
||||||
comboDefaultFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
comboDefaultFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||||
|
|
||||||
setDefaultFileSystem(GuiHelpers::defaultFileSystem());
|
setDefaultFileSystem(GuiHelpers::defaultFileSystem());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
||||||
#include <util/capacity.h>
|
#include <util/capacity.h>
|
||||||
#include <util/helpers.h>
|
#include <util/helpers.h>
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
|
@ -48,11 +50,11 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgNam
|
||||||
|
|
||||||
void CreateVolumeGroupDialog::setupDialog()
|
void CreateVolumeGroupDialog::setupDialog()
|
||||||
{
|
{
|
||||||
for (const auto &p : qAsConst(LVM::pvList::list())) {
|
for (const auto &p : std::as_const(LVM::pvList::list())) {
|
||||||
bool toBeDeleted = false;
|
bool toBeDeleted = false;
|
||||||
|
|
||||||
// Ignore partitions that are going to be deleted
|
// Ignore partitions that are going to be deleted
|
||||||
for (const auto &o : qAsConst(m_PendingOps)) {
|
for (const auto &o : std::as_const(m_PendingOps)) {
|
||||||
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
|
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
|
||||||
toBeDeleted = true;
|
toBeDeleted = true;
|
||||||
break;
|
break;
|
||||||
|
@ -66,9 +68,9 @@ void CreateVolumeGroupDialog::setupDialog()
|
||||||
dialogWidget().listPV().addPartition(*p.partition(), false);
|
dialogWidget().listPV().addPartition(*p.partition(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Device *d : qAsConst(m_Devices)) {
|
for (const Device *d : std::as_const(m_Devices)) {
|
||||||
if (d->partitionTable() != nullptr) {
|
if (d->partitionTable() != nullptr) {
|
||||||
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
|
for (const Partition *p : std::as_const(d->partitionTable()->children())) {
|
||||||
// Looking if there is another VG creation that contains this partition
|
// Looking if there is another VG creation that contains this partition
|
||||||
if (LvmDevice::s_DirtyPVs.contains(p))
|
if (LvmDevice::s_DirtyPVs.contains(p))
|
||||||
continue;
|
continue;
|
||||||
|
@ -88,7 +90,7 @@ void CreateVolumeGroupDialog::setupDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Partition *p : qAsConst(LvmDevice::s_OrphanPVs))
|
for (const Partition *p : std::as_const(LvmDevice::s_OrphanPVs))
|
||||||
if (!LvmDevice::s_DirtyPVs.contains(p))
|
if (!LvmDevice::s_DirtyPVs.contains(p))
|
||||||
dialogWidget().listPV().addPartition(*p, false);
|
dialogWidget().listPV().addPartition(*p, false);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +139,7 @@ void CreateVolumeGroupDialog::onVGNameChanged(const QString& vgName)
|
||||||
|
|
||||||
void CreateVolumeGroupDialog::onSpinPESizeChanged(int newsize)
|
void CreateVolumeGroupDialog::onSpinPESizeChanged(int newsize)
|
||||||
{
|
{
|
||||||
Q_UNUSED(newsize);
|
Q_UNUSED(newsize)
|
||||||
updateOkButtonStatus();
|
updateOkButtonStatus();
|
||||||
updateSectorInfos();
|
updateSectorInfos();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
#define EDITMOUNTOPTIONSDIALOG_H
|
#define EDITMOUNTOPTIONSDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
class EditMountOptionsDialogWidget;
|
class EditMountOptionsDialogWidget;
|
||||||
class QStringList;
|
|
||||||
class QString;
|
class QString;
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
#include "ui_editmountoptionsdialogwidgetbase.h"
|
#include "ui_editmountoptionsdialogwidgetbase.h"
|
||||||
|
|
||||||
|
#include <QStringList>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class QStringList;
|
|
||||||
class QPlainTextEdit;
|
class QPlainTextEdit;
|
||||||
|
|
||||||
class EditMountOptionsDialogWidget : public QWidget, public Ui::EditMountOptionsDialogWidgetBase
|
class EditMountOptionsDialogWidget : public QWidget, public Ui::EditMountOptionsDialogWidgetBase
|
||||||
|
|
|
@ -63,7 +63,7 @@ EditMountPointDialogWidget::EditMountPointDialogWidget(QWidget* parent, Partitio
|
||||||
fsName = QStringLiteral("vfat");
|
fsName = QStringLiteral("vfat");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fsName = partition().fileSystem().name();
|
fsName = partition().fileSystem().name({QStringLiteral("C")});
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fstabEntries.push_back(FstabEntry(m_deviceNode, QString(), fsName, QString()));
|
m_fstabEntries.push_back(FstabEntry(m_deviceNode, QString(), fsName, QString()));
|
||||||
|
@ -152,6 +152,8 @@ void EditMountPointDialogWidget::setupRadio(const FstabEntry::Type entryType)
|
||||||
break;
|
break;
|
||||||
case FstabEntry::Type::comment:
|
case FstabEntry::Type::comment:
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +200,7 @@ void EditMountPointDialogWidget::buttonMoreClicked(bool)
|
||||||
|
|
||||||
QStringList EditMountPointDialogWidget::options() const
|
QStringList EditMountPointDialogWidget::options() const
|
||||||
{
|
{
|
||||||
QStringList optList = m_Options.split(QLatin1Char(','), QString::SkipEmptyParts);
|
QStringList optList = m_Options.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||||
|
|
||||||
const auto keys = boxOptions();
|
const auto keys = boxOptions();
|
||||||
for (const auto &s : keys)
|
for (const auto &s : keys)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class Partition;
|
class Partition;
|
||||||
|
@ -25,7 +26,6 @@ class QSpinBox;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QStringList;
|
|
||||||
|
|
||||||
class EditMountPointDialogWidget : public QWidget, public Ui::EditMountPointDialogWidgetBase
|
class EditMountPointDialogWidget : public QWidget, public Ui::EditMountPointDialogWidgetBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
double valueFromText(const QString& text) const override;
|
double valueFromText(const QString& text) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString stripped(const QString &t, int *pos = 0) const;
|
QString stripped(const QString &t, int *pos = nullptr) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
#include <QPalette>
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ InfoPane::InfoPane(QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
m_GridLayout(new QGridLayout(this))
|
m_GridLayout(new QGridLayout(this))
|
||||||
{
|
{
|
||||||
layout()->setMargin(0);
|
layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Clears the InfoPane, leaving it empty */
|
/** Clears the InfoPane, leaving it empty */
|
||||||
|
@ -55,7 +56,7 @@ int InfoPane::createHeader(const QString& title, const int num_cols)
|
||||||
QLabel* label = new QLabel(title, this);
|
QLabel* label = new QLabel(title, this);
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
font.setWeight(75);
|
font.setWeight(QFont::Bold);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setAlignment(Qt::AlignCenter);
|
label->setAlignment(Qt::AlignCenter);
|
||||||
gridLayout().addWidget(label, y++, 0, 1, num_cols);
|
gridLayout().addWidget(label, y++, 0, 1, num_cols);
|
||||||
|
@ -75,9 +76,9 @@ void InfoPane::createLabels(const QString& title, const QString& value, const in
|
||||||
labelTitle->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
|
labelTitle->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
|
||||||
|
|
||||||
QPalette palette = labelTitle->palette();
|
QPalette palette = labelTitle->palette();
|
||||||
QColor f = palette.color(QPalette::Foreground);
|
QColor f = palette.color(QPalette::WindowText);
|
||||||
f.setAlpha(128);
|
f.setAlpha(128);
|
||||||
palette.setColor(QPalette::Foreground, f);
|
palette.setColor(QPalette::WindowText, f);
|
||||||
labelTitle->setPalette(palette);
|
labelTitle->setPalette(palette);
|
||||||
|
|
||||||
gridLayout().addWidget(labelTitle, y, x, 1, 1);
|
gridLayout().addWidget(labelTitle, y, x, 1, 1);
|
||||||
|
|
|
@ -39,6 +39,8 @@ public:
|
||||||
void setActionCollection(KActionCollection* coll) {
|
void setActionCollection(KActionCollection* coll) {
|
||||||
m_ActionCollection = coll;
|
m_ActionCollection = coll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Selects the device specified by the device node, such as /dev/sda
|
||||||
bool setSelectedDevice(const QString& device_node);
|
bool setSelectedDevice(const QString& device_node);
|
||||||
|
|
||||||
void updateDevices(const OperationStack::Devices& devices);
|
void updateDevices(const OperationStack::Devices& devices);
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
#include <util/guihelpers.h>
|
#include <util/guihelpers.h>
|
||||||
#include <util/report.h>
|
#include <util/report.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QCollator>
|
#include <QCollator>
|
||||||
|
@ -70,6 +72,9 @@
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
|
#include <PolkitQt1/Authority>
|
||||||
|
#include <polkitqt1-version.h>
|
||||||
|
|
||||||
#include <KAboutApplicationDialog>
|
#include <KAboutApplicationDialog>
|
||||||
#include <KActionCollection>
|
#include <KActionCollection>
|
||||||
#include <KMessageBox>
|
#include <KMessageBox>
|
||||||
|
@ -95,11 +100,10 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||||
m_ScanProgressDialog(new ScanProgressDialog(this)),
|
m_ScanProgressDialog(new ScanProgressDialog(this)),
|
||||||
m_StatusText(new QLabel(this))
|
m_StatusText(new QLabel(this))
|
||||||
{
|
{
|
||||||
|
CoreBackend::isPolkitInstalledCorrectly();
|
||||||
|
|
||||||
setupObjectNames();
|
setupObjectNames();
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested, this, &MainWindow::listDevicesContextMenuRequested);
|
|
||||||
connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested, this, &MainWindow::treeLogContextMenuRequested);
|
|
||||||
connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested, this, &MainWindow::listOperationsContextMenuRequested);
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,12 +116,35 @@ void MainWindow::setupObjectNames()
|
||||||
m_ScanProgressDialog->setObjectName(QStringLiteral("m_ScanProgressDialog"));
|
m_ScanProgressDialog->setObjectName(QStringLiteral("m_ScanProgressDialog"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setDisallowOtherDevices()
|
||||||
|
{
|
||||||
|
// We need to store that we are hiding this for this session only
|
||||||
|
// but only if it's currently visible (ie, the user didn't select
|
||||||
|
// that it should be hidden on purpose.
|
||||||
|
if (m_DockDevices->isVisible() == true) {
|
||||||
|
Config::self()->setHideDeviceDockWidgetByCmdArgs(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// because of how Qt works, the user still can enable the
|
||||||
|
// dock widget via a mouse click, so we need to also set it to disabled.
|
||||||
|
// so that the user doesn't select it by mistake.
|
||||||
|
|
||||||
|
m_DockDevices->setVisible(false);
|
||||||
|
m_DockDevices->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices()
|
||||||
|
{
|
||||||
|
if (Config::self()->hideDeviceDockWidgetByCmdArgs()) {
|
||||||
|
m_DockDevices->setVisible(true);
|
||||||
|
Config::self()->setHideDeviceDockWidgetByCmdArgs(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::init()
|
void MainWindow::init()
|
||||||
{
|
{
|
||||||
treeLog().init();
|
treeLog().init();
|
||||||
|
|
||||||
connect(GlobalLog::instance(), &GlobalLog::newMessage, &treeLog(), &TreeLog::onNewLogMessage);
|
|
||||||
|
|
||||||
setupActions();
|
setupActions();
|
||||||
setupStatusBar();
|
setupStatusBar();
|
||||||
setupConnections();
|
setupConnections();
|
||||||
|
@ -129,10 +156,67 @@ void MainWindow::init()
|
||||||
|
|
||||||
loadConfig();
|
loadConfig();
|
||||||
|
|
||||||
|
// this is done in order to hide the title bar of MessageWidget dock
|
||||||
|
findChild<QDockWidget*>(QStringLiteral("MessageWidgetDock"))->setTitleBarWidget(new QWidget());
|
||||||
|
|
||||||
|
MessageWidget().hide();
|
||||||
|
MessageWidget().setText(
|
||||||
|
i18nc("@info", "Partition Manager requires privileges in order to work. Please refresh the devices and authenticate when prompted."));
|
||||||
|
|
||||||
show();
|
show();
|
||||||
pmWidget().init(&operationStack());
|
pmWidget().init(&operationStack());
|
||||||
|
|
||||||
scanDevices();
|
scanProgressDialog().cancel();
|
||||||
|
setEnabled(false);
|
||||||
|
guiFactory()->container(QStringLiteral("selectedDevice"), this)->setEnabled(false);
|
||||||
|
|
||||||
|
askForPermissions();
|
||||||
|
|
||||||
|
if (m_permissionGranted) {
|
||||||
|
FileSystemFactory::init();
|
||||||
|
scanDevices();
|
||||||
|
} else
|
||||||
|
Q_EMIT showMessageWidget();
|
||||||
|
|
||||||
|
setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::askForPermissions()
|
||||||
|
{
|
||||||
|
PolkitQt1::UnixProcessSubject subject(QApplication::applicationPid());
|
||||||
|
PolkitQt1::Authority *authority = PolkitQt1::Authority::instance();
|
||||||
|
|
||||||
|
PolkitQt1::Authority::Result result;
|
||||||
|
QEventLoop e;
|
||||||
|
connect(authority, &PolkitQt1::Authority::checkAuthorizationFinished, &e,
|
||||||
|
[&e, &result](PolkitQt1::Authority::Result _result) {
|
||||||
|
result = _result;
|
||||||
|
e.quit();
|
||||||
|
});
|
||||||
|
|
||||||
|
authority->checkAuthorization(QStringLiteral("org.kde.kpmcore.externalcommand.init"), subject, PolkitQt1::Authority::AllowUserInteraction);
|
||||||
|
e.exec();
|
||||||
|
|
||||||
|
if (authority->hasError()) {
|
||||||
|
qDebug() << "Encountered error while checking authorization, error code:"
|
||||||
|
<< authority->lastError() << authority->errorDetails();
|
||||||
|
authority->clearError();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_permissionGranted = result == PolkitQt1::Authority::Yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu *MainWindow::createPopupMenu()
|
||||||
|
{
|
||||||
|
auto menu = QMainWindow::createPopupMenu();
|
||||||
|
auto actions = menu->actions();
|
||||||
|
QAction *toRemove =
|
||||||
|
*std::find_if(actions.begin(), actions.end(),
|
||||||
|
[](QAction *x) { return x->text().isEmpty(); });
|
||||||
|
// this is done in order to hide the entry for the MessageWidget dock
|
||||||
|
menu->removeAction(toRemove);
|
||||||
|
|
||||||
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent* event)
|
void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
|
@ -192,7 +276,7 @@ void MainWindow::setupActions()
|
||||||
undoOperation->setText(xi18nc("@action:inmenu", "Undo"));
|
undoOperation->setText(xi18nc("@action:inmenu", "Undo"));
|
||||||
undoOperation->setToolTip(xi18nc("@info:tooltip", "Undo the last operation"));
|
undoOperation->setToolTip(xi18nc("@info:tooltip", "Undo the last operation"));
|
||||||
undoOperation->setStatusTip(xi18nc("@info:status", "Remove the last operation from the list."));
|
undoOperation->setStatusTip(xi18nc("@info:status", "Remove the last operation from the list."));
|
||||||
actionCollection()->setDefaultShortcut(undoOperation, QKeySequence(Qt::CTRL + Qt::Key_Z));
|
actionCollection()->setDefaultShortcut(undoOperation, QKeySequence(Qt::CTRL | Qt::Key_Z));
|
||||||
undoOperation->setIcon(QIcon::fromTheme(QStringLiteral("edit-undo")));
|
undoOperation->setIcon(QIcon::fromTheme(QStringLiteral("edit-undo")));
|
||||||
|
|
||||||
QAction* clearAllOperations = actionCollection()->addAction(QStringLiteral("clearAllOperations"));
|
QAction* clearAllOperations = actionCollection()->addAction(QStringLiteral("clearAllOperations"));
|
||||||
|
@ -218,7 +302,7 @@ void MainWindow::setupActions()
|
||||||
createNewPartitionTable->setText(xi18nc("@action:inmenu", "New Partition Table"));
|
createNewPartitionTable->setText(xi18nc("@action:inmenu", "New Partition Table"));
|
||||||
createNewPartitionTable->setToolTip(xi18nc("@info:tooltip", "Create a new partition table"));
|
createNewPartitionTable->setToolTip(xi18nc("@info:tooltip", "Create a new partition table"));
|
||||||
createNewPartitionTable->setStatusTip(xi18nc("@info:status", "Create a new and empty partition table on a device."));
|
createNewPartitionTable->setStatusTip(xi18nc("@info:status", "Create a new and empty partition table on a device."));
|
||||||
actionCollection()->setDefaultShortcut(createNewPartitionTable, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_N));
|
actionCollection()->setDefaultShortcut(createNewPartitionTable, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_N));
|
||||||
createNewPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear")));
|
createNewPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear")));
|
||||||
|
|
||||||
QAction* exportPartitionTable = actionCollection()->addAction(QStringLiteral("exportPartitionTable"));
|
QAction* exportPartitionTable = actionCollection()->addAction(QStringLiteral("exportPartitionTable"));
|
||||||
|
@ -288,7 +372,7 @@ void MainWindow::setupActions()
|
||||||
newPartition->setText(xi18nc("@action:inmenu create a new partition", "New"));
|
newPartition->setText(xi18nc("@action:inmenu create a new partition", "New"));
|
||||||
newPartition->setToolTip(xi18nc("@info:tooltip", "New partition"));
|
newPartition->setToolTip(xi18nc("@info:tooltip", "New partition"));
|
||||||
newPartition->setStatusTip(xi18nc("@info:status", "Create a new partition."));
|
newPartition->setStatusTip(xi18nc("@info:status", "Create a new partition."));
|
||||||
actionCollection()->setDefaultShortcut(newPartition, QKeySequence(Qt::CTRL + Qt::Key_N));
|
actionCollection()->setDefaultShortcut(newPartition, QKeySequence(Qt::CTRL | Qt::Key_N));
|
||||||
newPartition->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
|
newPartition->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
|
||||||
|
|
||||||
QAction* resizePartition = actionCollection()->addAction(QStringLiteral("resizePartition"));
|
QAction* resizePartition = actionCollection()->addAction(QStringLiteral("resizePartition"));
|
||||||
|
@ -297,7 +381,7 @@ void MainWindow::setupActions()
|
||||||
resizePartition->setText(xi18nc("@action:inmenu", "Resize/Move"));
|
resizePartition->setText(xi18nc("@action:inmenu", "Resize/Move"));
|
||||||
resizePartition->setToolTip(xi18nc("@info:tooltip", "Resize or move partition"));
|
resizePartition->setToolTip(xi18nc("@info:tooltip", "Resize or move partition"));
|
||||||
resizePartition->setStatusTip(xi18nc("@info:status", "Shrink, grow or move an existing partition."));
|
resizePartition->setStatusTip(xi18nc("@info:status", "Shrink, grow or move an existing partition."));
|
||||||
actionCollection()->setDefaultShortcut(resizePartition, QKeySequence(Qt::CTRL + Qt::Key_R));
|
actionCollection()->setDefaultShortcut(resizePartition, QKeySequence(Qt::CTRL | Qt::Key_R));
|
||||||
resizePartition->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right-double")));
|
resizePartition->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right-double")));
|
||||||
|
|
||||||
QAction* deletePartition = actionCollection()->addAction(QStringLiteral("deletePartition"));
|
QAction* deletePartition = actionCollection()->addAction(QStringLiteral("deletePartition"));
|
||||||
|
@ -315,7 +399,7 @@ void MainWindow::setupActions()
|
||||||
shredPartition->setText(xi18nc("@action:inmenu", "Shred"));
|
shredPartition->setText(xi18nc("@action:inmenu", "Shred"));
|
||||||
shredPartition->setToolTip(xi18nc("@info:tooltip", "Shred partition"));
|
shredPartition->setToolTip(xi18nc("@info:tooltip", "Shred partition"));
|
||||||
shredPartition->setStatusTip(xi18nc("@info:status", "Shred a partition so that its contents cannot be restored."));
|
shredPartition->setStatusTip(xi18nc("@info:status", "Shred a partition so that its contents cannot be restored."));
|
||||||
actionCollection()->setDefaultShortcut(shredPartition, QKeySequence(Qt::SHIFT + Qt::Key_Delete));
|
actionCollection()->setDefaultShortcut(shredPartition, QKeySequence(Qt::SHIFT | Qt::Key_Delete));
|
||||||
shredPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete-shred")));
|
shredPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete-shred")));
|
||||||
|
|
||||||
QAction* copyPartition = actionCollection()->addAction(QStringLiteral("copyPartition"));
|
QAction* copyPartition = actionCollection()->addAction(QStringLiteral("copyPartition"));
|
||||||
|
@ -324,7 +408,7 @@ void MainWindow::setupActions()
|
||||||
copyPartition->setText(xi18nc("@action:inmenu", "Copy"));
|
copyPartition->setText(xi18nc("@action:inmenu", "Copy"));
|
||||||
copyPartition->setToolTip(xi18nc("@info:tooltip", "Copy partition"));
|
copyPartition->setToolTip(xi18nc("@info:tooltip", "Copy partition"));
|
||||||
copyPartition->setStatusTip(xi18nc("@info:status", "Copy an existing partition."));
|
copyPartition->setStatusTip(xi18nc("@info:status", "Copy an existing partition."));
|
||||||
actionCollection()->setDefaultShortcut(copyPartition, QKeySequence(Qt::CTRL + Qt::Key_C));
|
actionCollection()->setDefaultShortcut(copyPartition, QKeySequence(Qt::CTRL | Qt::Key_C));
|
||||||
copyPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
|
copyPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
|
||||||
|
|
||||||
QAction* pastePartition = actionCollection()->addAction(QStringLiteral("pastePartition"));
|
QAction* pastePartition = actionCollection()->addAction(QStringLiteral("pastePartition"));
|
||||||
|
@ -333,7 +417,7 @@ void MainWindow::setupActions()
|
||||||
pastePartition->setText(xi18nc("@action:inmenu", "Paste"));
|
pastePartition->setText(xi18nc("@action:inmenu", "Paste"));
|
||||||
pastePartition->setToolTip(xi18nc("@info:tooltip", "Paste partition"));
|
pastePartition->setToolTip(xi18nc("@info:tooltip", "Paste partition"));
|
||||||
pastePartition->setStatusTip(xi18nc("@info:status", "Paste a copied partition."));
|
pastePartition->setStatusTip(xi18nc("@info:status", "Paste a copied partition."));
|
||||||
actionCollection()->setDefaultShortcut(pastePartition, QKeySequence(Qt::CTRL + Qt::Key_V));
|
actionCollection()->setDefaultShortcut(pastePartition, QKeySequence(Qt::CTRL | Qt::Key_V));
|
||||||
pastePartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-paste")));
|
pastePartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-paste")));
|
||||||
|
|
||||||
QAction* editMountPoint = actionCollection()->addAction(QStringLiteral("editMountPoint"));
|
QAction* editMountPoint = actionCollection()->addAction(QStringLiteral("editMountPoint"));
|
||||||
|
@ -396,7 +480,7 @@ void MainWindow::setupActions()
|
||||||
createVolumeGroup->setText(i18nc("@action:inmenu", "New Volume Group"));
|
createVolumeGroup->setText(i18nc("@action:inmenu", "New Volume Group"));
|
||||||
createVolumeGroup->setToolTip(i18nc("@info:tooltip", "Create a new LVM Volume Group"));
|
createVolumeGroup->setToolTip(i18nc("@info:tooltip", "Create a new LVM Volume Group"));
|
||||||
createVolumeGroup->setStatusTip(i18nc("@info:status", "Create a new LVM Volume Group as a device."));
|
createVolumeGroup->setStatusTip(i18nc("@info:status", "Create a new LVM Volume Group as a device."));
|
||||||
actionCollection()->setDefaultShortcut(createVolumeGroup, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L));
|
actionCollection()->setDefaultShortcut(createVolumeGroup, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_L));
|
||||||
createVolumeGroup->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
|
createVolumeGroup->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
|
||||||
|
|
||||||
QAction* fileSystemSupport = actionCollection()->addAction(QStringLiteral("fileSystemSupport"));
|
QAction* fileSystemSupport = actionCollection()->addAction(QStringLiteral("fileSystemSupport"));
|
||||||
|
@ -412,6 +496,7 @@ void MainWindow::setupActions()
|
||||||
refreshDevices->setStatusTip(xi18nc("@info:status", "Renew the devices list."));
|
refreshDevices->setStatusTip(xi18nc("@info:status", "Renew the devices list."));
|
||||||
actionCollection()->setDefaultShortcut(refreshDevices, Qt::Key_F5);
|
actionCollection()->setDefaultShortcut(refreshDevices, Qt::Key_F5);
|
||||||
refreshDevices->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
|
refreshDevices->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
|
||||||
|
MessageWidget().addAction(refreshDevices);
|
||||||
|
|
||||||
// Settings Actions
|
// Settings Actions
|
||||||
actionCollection()->addAction(QStringLiteral("toggleDockDevices"), dockDevices().toggleViewAction());
|
actionCollection()->addAction(QStringLiteral("toggleDockDevices"), dockDevices().toggleViewAction());
|
||||||
|
@ -447,8 +532,26 @@ void MainWindow::setupActions()
|
||||||
|
|
||||||
void MainWindow::setupConnections()
|
void MainWindow::setupConnections()
|
||||||
{
|
{
|
||||||
connect(&listDevices(), &ListDevices::selectionChanged, &pmWidget(), qOverload<const QString&>(&PartitionManagerWidget::setSelectedDevice));
|
connect(&listDevices(), &ListDevices::selectionChanged,
|
||||||
connect(&listDevices(), &ListDevices::deviceDoubleClicked, this, &MainWindow::onPropertiesDevice);
|
&pmWidget(), qOverload<const QString&>(&PartitionManagerWidget::setSelectedDevice));
|
||||||
|
|
||||||
|
connect(&listDevices(), &ListDevices::deviceDoubleClicked,
|
||||||
|
this, &MainWindow::onPropertiesDevice);
|
||||||
|
|
||||||
|
connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested,
|
||||||
|
this, &MainWindow::listDevicesContextMenuRequested);
|
||||||
|
connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested,
|
||||||
|
this, &MainWindow::treeLogContextMenuRequested);
|
||||||
|
connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested,
|
||||||
|
this, &MainWindow::listOperationsContextMenuRequested);
|
||||||
|
|
||||||
|
connect(GlobalLog::instance(), &GlobalLog::newMessage,
|
||||||
|
&treeLog(), &TreeLog::onNewLogMessage);
|
||||||
|
|
||||||
|
connect(this, &MainWindow::showMessageWidget, &MessageWidget(),
|
||||||
|
&KMessageWidget::animatedShow);
|
||||||
|
connect(this, &MainWindow::hideMessageWidget, &MessageWidget(),
|
||||||
|
&KMessageWidget::animatedHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setupStatusBar()
|
void MainWindow::setupStatusBar()
|
||||||
|
@ -731,7 +834,13 @@ void MainWindow::on_m_DeviceScanner_finished()
|
||||||
|
|
||||||
scanProgressDialog().setProgress(100);
|
scanProgressDialog().setProgress(100);
|
||||||
|
|
||||||
if (!operationStack().previewDevices().isEmpty())
|
bool foundDevices = !operationStack().previewDevices().isEmpty();
|
||||||
|
|
||||||
|
guiFactory()
|
||||||
|
->container(QStringLiteral("selectedDevice"), this)
|
||||||
|
->setEnabled(foundDevices);
|
||||||
|
|
||||||
|
if (foundDevices)
|
||||||
pmWidget().setSelectedDevice(operationStack().previewDevices()[0]);
|
pmWidget().setSelectedDevice(operationStack().previewDevices()[0]);
|
||||||
|
|
||||||
pmWidget().updatePartitions();
|
pmWidget().updatePartitions();
|
||||||
|
@ -741,11 +850,12 @@ void MainWindow::on_m_DeviceScanner_finished()
|
||||||
|
|
||||||
// try to set the seleted device, either from the saved one or just select the
|
// try to set the seleted device, either from the saved one or just select the
|
||||||
// first device
|
// first device
|
||||||
if (!listDevices().setSelectedDevice(savedSelectedDeviceNode()) && !operationStack().previewDevices().isEmpty())
|
if (!listDevices().setSelectedDevice(savedSelectedDeviceNode()) && foundDevices)
|
||||||
listDevices().setSelectedDevice(operationStack().previewDevices()[0]->deviceNode());
|
listDevices().setSelectedDevice(operationStack().previewDevices()[0]->deviceNode());
|
||||||
|
|
||||||
updateSeletedDeviceMenu();
|
updateSeletedDeviceMenu();
|
||||||
checkFileSystemSupport();
|
checkFileSystemSupport();
|
||||||
|
Q_EMIT scanFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateSeletedDeviceMenu()
|
void MainWindow::updateSeletedDeviceMenu()
|
||||||
|
@ -804,7 +914,17 @@ void MainWindow::onRefreshDevices()
|
||||||
xi18nc("@title:window", "Really Rescan the Devices?"),
|
xi18nc("@title:window", "Really Rescan the Devices?"),
|
||||||
KGuiItem(xi18nc("@action:button", "Rescan Devices"), QStringLiteral("arrow-right")),
|
KGuiItem(xi18nc("@action:button", "Rescan Devices"), QStringLiteral("arrow-right")),
|
||||||
KStandardGuiItem::cancel(), QStringLiteral("reallyRescanDevices")) == KMessageBox::Continue) {
|
KStandardGuiItem::cancel(), QStringLiteral("reallyRescanDevices")) == KMessageBox::Continue) {
|
||||||
scanDevices();
|
|
||||||
|
if (m_permissionGranted) {
|
||||||
|
scanDevices();
|
||||||
|
} else {
|
||||||
|
askForPermissions();
|
||||||
|
if (m_permissionGranted) {
|
||||||
|
Q_EMIT hideMessageWidget();
|
||||||
|
FileSystemFactory::init();
|
||||||
|
scanDevices();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -897,6 +1017,8 @@ void MainWindow::onImportPartitionTable()
|
||||||
{
|
{
|
||||||
Q_ASSERT(pmWidget().selectedDevice());
|
Q_ASSERT(pmWidget().selectedDevice());
|
||||||
|
|
||||||
|
// TODO: This method looks like should live somewhere completely different.
|
||||||
|
// It's importing the partition table, why it's not on the partition table source?
|
||||||
const QUrl url = QFileDialog::getOpenFileUrl(this, QStringLiteral("Import Partition Table"));
|
const QUrl url = QFileDialog::getOpenFileUrl(this, QStringLiteral("Import Partition Table"));
|
||||||
|
|
||||||
if (url.isEmpty())
|
if (url.isEmpty())
|
||||||
|
@ -1257,6 +1379,7 @@ static KLocalizedString checkSupportInNode(const PartitionNode* parent)
|
||||||
else
|
else
|
||||||
rval = checkSupportInNode(node);
|
rval = checkSupportInNode(node);
|
||||||
|
|
||||||
|
// TODO: Don't create HTML tables manually.
|
||||||
if ((!p->fileSystem().supportToolFound() && !p->fileSystem().supportToolName().name.isEmpty()) && !rval.isEmpty())
|
if ((!p->fileSystem().supportToolFound() && !p->fileSystem().supportToolName().name.isEmpty()) && !rval.isEmpty())
|
||||||
rval = kxi18n("%1%2").subs(rval).subs(kxi18n("<tr>"
|
rval = kxi18n("%1%2").subs(rval).subs(kxi18n("<tr>"
|
||||||
"<td>%1</td>"
|
"<td>%1</td>"
|
||||||
|
@ -1303,6 +1426,7 @@ void MainWindow::checkFileSystemSupport()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (missingSupportTools)
|
if (missingSupportTools)
|
||||||
|
// TODO: Don't create HTML manually.
|
||||||
KMessageBox::information(this,
|
KMessageBox::information(this,
|
||||||
xi18nc("@info",
|
xi18nc("@info",
|
||||||
"<para>No support tools were found for file systems currently present on hard disks in this computer:</para>"
|
"<para>No support tools were found for file systems currently present on hard disks in this computer:</para>"
|
||||||
|
@ -1321,3 +1445,24 @@ void MainWindow::checkFileSystemSupport()
|
||||||
xi18nc("@title:window", "Missing File System Support Packages"),
|
xi18nc("@title:window", "Missing File System Support Packages"),
|
||||||
QStringLiteral("showInformationOnMissingFileSystemSupport"), KMessageBox::Notify | KMessageBox::AllowLink);
|
QStringLiteral("showInformationOnMissingFileSystemSupport"), KMessageBox::Notify | KMessageBox::AllowLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setCurrentDeviceByName(const QString& name)
|
||||||
|
{
|
||||||
|
// TODO: Port KPartitionManager away from KMessageBox into KMessageWidget.
|
||||||
|
// TODO: setSelectedDevice from m_ListDevices is not using a device name, but
|
||||||
|
// just issuing a match query on a string list, this will produce false results.
|
||||||
|
if (!m_ListDevices->setSelectedDevice(name)) {
|
||||||
|
KMessageBox::error(this,
|
||||||
|
xi18nc("@info device should be inside of /dev", "Unrecognized device \"%1\" ", name),
|
||||||
|
xi18nc("@title:window", "Error While Importing Partition Table"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::setCurrentPartitionByName(const QString& partitionName)
|
||||||
|
{
|
||||||
|
if (!pmWidget().setCurrentPartitionByName(partitionName)) {
|
||||||
|
KMessageBox::error(this,
|
||||||
|
xi18nc("@info device should be inside of /dev", "Unrecognized partition \"%1\" ", partitionName),
|
||||||
|
xi18nc("@title:window", "Error opening partition"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "ui_mainwindowbase.h"
|
#include "ui_mainwindowbase.h"
|
||||||
|
|
||||||
|
#include <KMessageWidget>
|
||||||
#include <KXmlGuiWindow>
|
#include <KXmlGuiWindow>
|
||||||
|
|
||||||
class ApplyProgressDialog;
|
class ApplyProgressDialog;
|
||||||
|
@ -44,8 +45,28 @@ class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget* parent = nullptr);
|
explicit MainWindow(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
// for instance `/dev/sda`
|
||||||
|
void setCurrentDeviceByName(const QString& name);
|
||||||
|
|
||||||
|
void setCurrentPartitionByName(const QString& partitionNumber);
|
||||||
|
|
||||||
|
// forbids the user to select another device.
|
||||||
|
// this is used in conjunction with --device
|
||||||
|
// rationale is that if the user specifies a device,
|
||||||
|
// we can't allow him to select another one by mistake while
|
||||||
|
// clicking in the UI.
|
||||||
|
void setDisallowOtherDevices();
|
||||||
|
|
||||||
|
// disallowOtherDevices hides the DockWidget, but unfortunately
|
||||||
|
// this is saved by the Window State when restored, even if we
|
||||||
|
// are not disallowing it this time. At the same time the user
|
||||||
|
// could have hidden it, so we need to restore only if hidden
|
||||||
|
// just by the call to disallowOtherDevices().
|
||||||
|
void showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void settingsChanged();
|
void settingsChanged();
|
||||||
|
void scanFinished();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init();
|
void init();
|
||||||
|
@ -202,6 +223,15 @@ protected:
|
||||||
return *m_ScanProgressDialog;
|
return *m_ScanProgressDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KMessageWidget &MessageWidget() {
|
||||||
|
Q_ASSERT(m_MessageWidget);
|
||||||
|
return *m_MessageWidget;
|
||||||
|
}
|
||||||
|
const KMessageWidget &MessageWidget() const {
|
||||||
|
Q_ASSERT(m_MessageWidget);
|
||||||
|
return *m_MessageWidget;
|
||||||
|
}
|
||||||
|
|
||||||
void onSelectedDeviceMenuTriggered(bool);
|
void onSelectedDeviceMenuTriggered(bool);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
|
@ -251,6 +281,15 @@ protected:
|
||||||
void onSmartStatusDevice();
|
void onSmartStatusDevice();
|
||||||
void onPropertiesDevice(const QString& deviceNode = {});
|
void onPropertiesDevice(const QString& deviceNode = {});
|
||||||
|
|
||||||
|
private:
|
||||||
|
QMenu* createPopupMenu() override;
|
||||||
|
|
||||||
|
void askForPermissions();
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void showMessageWidget();
|
||||||
|
void hideMessageWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OperationStack* m_OperationStack;
|
OperationStack* m_OperationStack;
|
||||||
OperationRunner* m_OperationRunner;
|
OperationRunner* m_OperationRunner;
|
||||||
|
@ -259,6 +298,8 @@ private:
|
||||||
ScanProgressDialog* m_ScanProgressDialog;
|
ScanProgressDialog* m_ScanProgressDialog;
|
||||||
QLabel* m_StatusText;
|
QLabel* m_StatusText;
|
||||||
QString m_SavedSelectedDeviceNode;
|
QString m_SavedSelectedDeviceNode;
|
||||||
|
|
||||||
|
bool m_permissionGranted;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,8 +17,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string comment="@title:window">KDE Partition Manager</string>
|
<string comment="@title:window">KDE Partition Manager</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="PartitionManagerWidget" name="m_PartitionManagerWidget">
|
<widget class="PartitionManagerWidget" name="m_PartitionManagerWidget"/>
|
||||||
</widget>
|
|
||||||
<widget class="QDockWidget" name="m_DockDevices">
|
<widget class="QDockWidget" name="m_DockDevices">
|
||||||
<property name="allowedAreas">
|
<property name="allowedAreas">
|
||||||
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
|
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
|
||||||
|
@ -29,8 +28,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="ListDevices" name="m_ListDevices">
|
<widget class="ListDevices" name="m_ListDevices"/>
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="m_DockOperations">
|
<widget class="QDockWidget" name="m_DockOperations">
|
||||||
<property name="allowedAreas">
|
<property name="allowedAreas">
|
||||||
|
@ -42,8 +40,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="ListOperations" name="m_ListOperations">
|
<widget class="ListOperations" name="m_ListOperations"/>
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="m_DockInformation">
|
<widget class="QDockWidget" name="m_DockInformation">
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -52,8 +49,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="InfoPane" name="m_InfoPane">
|
<widget class="InfoPane" name="m_InfoPane"/>
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="m_DockLog">
|
<widget class="QDockWidget" name="m_DockLog">
|
||||||
<property name="allowedAreas">
|
<property name="allowedAreas">
|
||||||
|
@ -65,11 +61,34 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="TreeLog" name="m_TreeLog">
|
<widget class="TreeLog" name="m_TreeLog"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QDockWidget" name="MessageWidgetDock">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||||
|
</property>
|
||||||
|
<attribute name="dockWidgetArea">
|
||||||
|
<number>4</number>
|
||||||
|
</attribute>
|
||||||
|
<widget class="KMessageWidget" name="m_MessageWidget">
|
||||||
|
<property name="messageType">
|
||||||
|
<enum>KMessageWidget::Warning</enum>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>KMessageWidget</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>kmessagewidget.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>PartitionManagerWidget</class>
|
<class>PartitionManagerWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2008-2012 Volker Lanz <vl@fidra.de>
|
SPDX-FileCopyrightText: 2008-2012 Volker Lanz <vl@fidra.de>
|
||||||
SPDX-FileCopyrightText: 2013-2018 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2013-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||||
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
|
@ -22,8 +22,11 @@
|
||||||
#include <util/helpers.h>
|
#include <util/helpers.h>
|
||||||
#include "util/guihelpers.h"
|
#include "util/guihelpers.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
|
#include <QPalette>
|
||||||
|
|
||||||
#include <KColorScheme>
|
#include <KColorScheme>
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
|
@ -72,7 +75,7 @@ void NewDialog::setupDialog()
|
||||||
|
|
||||||
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||||
|
|
||||||
for (const auto &fsName : qAsConst(fsNames))
|
for (const auto &fsName : std::as_const(fsNames))
|
||||||
dialogWidget().comboFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
dialogWidget().comboFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||||
|
|
||||||
QString selected = FileSystem::nameForType(GuiHelpers::defaultFileSystem());
|
QString selected = FileSystem::nameForType(GuiHelpers::defaultFileSystem());
|
||||||
|
@ -110,6 +113,34 @@ void NewDialog::setupDialog()
|
||||||
// run there is a valid partition set in the part resizer widget and they will need that.
|
// run there is a valid partition set in the part resizer widget and they will need that.
|
||||||
onRoleChanged(false);
|
onRoleChanged(false);
|
||||||
onFilesystemChanged(dialogWidget().comboFileSystem().currentIndex());
|
onFilesystemChanged(dialogWidget().comboFileSystem().currentIndex());
|
||||||
|
|
||||||
|
auto showPermissionsGroup = [this] {
|
||||||
|
const QString currText = dialogWidget().comboFileSystem().currentText();
|
||||||
|
const bool enablePosixPermission = QList<QString>({
|
||||||
|
QStringLiteral("btrfs"),
|
||||||
|
QStringLiteral("ext2"),
|
||||||
|
QStringLiteral("ext3"),
|
||||||
|
QStringLiteral("ext4"),
|
||||||
|
QStringLiteral("f2fs"),
|
||||||
|
QStringLiteral("hfsplus"),
|
||||||
|
QStringLiteral("jfs"),
|
||||||
|
QStringLiteral("minix"),
|
||||||
|
QStringLiteral("ocfs2"),
|
||||||
|
QStringLiteral("reiserfs"),
|
||||||
|
QStringLiteral("reiser4"),
|
||||||
|
QStringLiteral("udf"),
|
||||||
|
QStringLiteral("xfs"),
|
||||||
|
QStringLiteral("zfs"),}
|
||||||
|
).contains(currText);
|
||||||
|
if (enablePosixPermission) {
|
||||||
|
dialogWidget().showPosixPermissions();
|
||||||
|
} else {
|
||||||
|
dialogWidget().hidePosixPermissions();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
connect(&dialogWidget().comboFileSystem(), QOverload<int>::of(&QComboBox::currentIndexChanged), this, showPermissionsGroup);
|
||||||
|
showPermissionsGroup();
|
||||||
|
dialogWidget().radioRootPermissions().setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewDialog::setupConnections()
|
void NewDialog::setupConnections()
|
||||||
|
@ -250,9 +281,9 @@ void NewDialog::updateHideAndShow()
|
||||||
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
|
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
|
||||||
|
|
||||||
QPalette palette = dialogWidget().noSetLabel().palette();
|
QPalette palette = dialogWidget().noSetLabel().palette();
|
||||||
QColor f = palette.color(QPalette::Foreground);
|
QColor f = palette.color(QPalette::WindowText);
|
||||||
f.setAlpha(128);
|
f.setAlpha(128);
|
||||||
palette.setColor(QPalette::Foreground, f);
|
palette.setColor(QPalette::WindowText, f);
|
||||||
dialogWidget().noSetLabel().setPalette(palette);
|
dialogWidget().noSetLabel().setPalette(palette);
|
||||||
dialogWidget().checkBoxEncrypt().hide();
|
dialogWidget().checkBoxEncrypt().hide();
|
||||||
dialogWidget().editPassphrase().hide();
|
dialogWidget().editPassphrase().hide();
|
||||||
|
@ -281,3 +312,8 @@ void NewDialog::updateOkButtonStatus()
|
||||||
{
|
{
|
||||||
okButton->setEnabled(isValidPassword() && isValidLVName());
|
okButton->setEnabled(isValidPassword() && isValidLVName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NewDialog::useUnsecuredPartition() const
|
||||||
|
{
|
||||||
|
return !dialogWidget().isPermissionOnlyRoot();
|
||||||
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@ public:
|
||||||
NewDialog(QWidget* parent, Device& device, Partition& unallocatedPartition, PartitionRole::Roles r);
|
NewDialog(QWidget* parent, Device& device, Partition& unallocatedPartition, PartitionRole::Roles r);
|
||||||
~NewDialog();
|
~NewDialog();
|
||||||
|
|
||||||
|
// returns true if any user can write on the partition.
|
||||||
|
// has the same effect as running `chmod 777` on it.
|
||||||
|
bool useUnsecuredPartition() const;
|
||||||
protected:
|
protected:
|
||||||
void accept() override;
|
void accept() override;
|
||||||
void onRoleChanged(bool);
|
void onRoleChanged(bool);
|
||||||
|
|
|
@ -94,9 +94,6 @@ void PartitionManagerWidget::init(OperationStack* ostack)
|
||||||
{
|
{
|
||||||
m_OperationStack = ostack;
|
m_OperationStack = ostack;
|
||||||
|
|
||||||
// TODO: shouldn't this also go to the main window class?
|
|
||||||
FileSystemFactory::init();
|
|
||||||
|
|
||||||
loadConfig();
|
loadConfig();
|
||||||
setupConnections();
|
setupConnections();
|
||||||
}
|
}
|
||||||
|
@ -244,7 +241,7 @@ void PartitionManagerWidget::updatePartitions()
|
||||||
|
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
font.setWeight(75);
|
font.setWeight(QFont::Bold);
|
||||||
deviceItem->setFont(0, font);
|
deviceItem->setFont(0, font);
|
||||||
|
|
||||||
deviceItem->setText(0, selectedDevice()->prettyName());
|
deviceItem->setText(0, selectedDevice()->prettyName());
|
||||||
|
@ -285,6 +282,25 @@ void PartitionManagerWidget::on_m_TreePartitions_currentItemChanged(QTreeWidgetI
|
||||||
partTableWidget().setActiveWidget(nullptr);
|
partTableWidget().setActiveWidget(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PartitionManagerWidget::setCurrentPartitionByName(const QString& name)
|
||||||
|
{
|
||||||
|
auto rootNode = treePartitions().invisibleRootItem();
|
||||||
|
for (int i = 0; i < rootNode->childCount(); i++) {
|
||||||
|
auto driveNode = rootNode->child(i);
|
||||||
|
for (int e = 0; e < driveNode->childCount(); e++) {
|
||||||
|
auto partitionNode = driveNode->child(e);
|
||||||
|
const QString text = partitionNode->data(0, Qt::DisplayRole).toString();
|
||||||
|
if (text.endsWith(name)) {
|
||||||
|
partitionNode->setSelected(true);
|
||||||
|
treePartitions().setCurrentItem(partitionNode);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void PartitionManagerWidget::on_m_TreePartitions_itemDoubleClicked(QTreeWidgetItem* item, int)
|
void PartitionManagerWidget::on_m_TreePartitions_itemDoubleClicked(QTreeWidgetItem* item, int)
|
||||||
{
|
{
|
||||||
if (item == treePartitions().topLevelItem(0)) {
|
if (item == treePartitions().topLevelItem(0)) {
|
||||||
|
@ -507,10 +523,14 @@ void PartitionManagerWidget::onNewPartition()
|
||||||
Partition* newPartition = NewOperation::createNew(*selectedPartition(), static_cast<FileSystem::Type>(Config::defaultFileSystem()));
|
Partition* newPartition = NewOperation::createNew(*selectedPartition(), static_cast<FileSystem::Type>(Config::defaultFileSystem()));
|
||||||
|
|
||||||
QPointer<NewDialog> dlg = new NewDialog(this, *selectedDevice(), *newPartition, selectedDevice()->partitionTable()->childRoles(*selectedPartition()));
|
QPointer<NewDialog> dlg = new NewDialog(this, *selectedDevice(), *newPartition, selectedDevice()->partitionTable()->childRoles(*selectedPartition()));
|
||||||
if (dlg->exec() == QDialog::Accepted)
|
if (dlg->exec() == QDialog::Accepted) {
|
||||||
|
if (dlg->useUnsecuredPartition()) {
|
||||||
|
newPartition->fileSystem().setPosixPermissions(QStringLiteral("777"));
|
||||||
|
}
|
||||||
operationStack().push(new NewOperation(*selectedDevice(), newPartition));
|
operationStack().push(new NewOperation(*selectedDevice(), newPartition));
|
||||||
else
|
} else {
|
||||||
delete newPartition;
|
delete newPartition;
|
||||||
|
}
|
||||||
|
|
||||||
delete dlg;
|
delete dlg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,9 @@ public:
|
||||||
|
|
||||||
void updatePartitions();
|
void updatePartitions();
|
||||||
|
|
||||||
|
// here we expect the full "sda1" or "nvme1n1p1"
|
||||||
|
bool setCurrentPartitionByName(const QString& partitionName);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OperationStack& operationStack() {
|
OperationStack& operationStack() {
|
||||||
return *m_OperationStack;
|
return *m_OperationStack;
|
||||||
|
@ -125,6 +128,7 @@ protected:
|
||||||
return *m_TreePartitions;
|
return *m_TreePartitions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void onHeaderContextMenu(const QPoint& p);
|
void onHeaderContextMenu(const QPoint& p);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
||||||
SPDX-FileCopyrightText: 2014-2017 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2014 Yuri Chornoivan <yurchor@ukr.net>
|
SPDX-FileCopyrightText: 2014 Yuri Chornoivan <yurchor@ukr.net>
|
||||||
SPDX-FileCopyrightText: 2018 Abhijeet Sharma <sharma.abhijeet2096@gmail.com>
|
SPDX-FileCopyrightText: 2018 Abhijeet Sharma <sharma.abhijeet2096@gmail.com>
|
||||||
|
|
||||||
|
@ -19,11 +19,14 @@
|
||||||
#include <util/helpers.h>
|
#include <util/helpers.h>
|
||||||
#include "util/guihelpers.h"
|
#include "util/guihelpers.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
#include <QPalette>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
|
@ -200,9 +203,9 @@ void PartPropsDialog::updateHideAndShow()
|
||||||
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
|
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
|
||||||
|
|
||||||
QPalette palette = dialogWidget().noSetLabel().palette();
|
QPalette palette = dialogWidget().noSetLabel().palette();
|
||||||
QColor f = palette.color(QPalette::Foreground);
|
QColor f = palette.color(QPalette::WindowText);
|
||||||
f.setAlpha(128);
|
f.setAlpha(128);
|
||||||
palette.setColor(QPalette::Foreground, f);
|
palette.setColor(QPalette::WindowText, f);
|
||||||
dialogWidget().noSetLabel().setPalette(palette);
|
dialogWidget().noSetLabel().setPalette(palette);
|
||||||
} else {
|
} else {
|
||||||
dialogWidget().label().setReadOnly(isReadOnly() && !partition().fileSystem().supportSetLabelOnline());
|
dialogWidget().label().setReadOnly(isReadOnly() && !partition().fileSystem().supportSetLabelOnline());
|
||||||
|
@ -319,7 +322,7 @@ void PartPropsDialog::setupFileSystemComboBox()
|
||||||
|
|
||||||
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||||
|
|
||||||
for (const auto &fsName : qAsConst(fsNames))
|
for (const auto &fsName : std::as_const(fsNames))
|
||||||
dialogWidget().fileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
dialogWidget().fileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||||
|
|
||||||
dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected));
|
dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2016-2018 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
||||||
#include <util/capacity.h>
|
#include <util/capacity.h>
|
||||||
#include <util/helpers.h>
|
#include <util/helpers.h>
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
|
@ -46,11 +48,11 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog(QWidget* parent, VolumeManagerD
|
||||||
void ResizeVolumeGroupDialog::setupDialog()
|
void ResizeVolumeGroupDialog::setupDialog()
|
||||||
{
|
{
|
||||||
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
|
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
|
||||||
for (const auto &p : qAsConst(LVM::pvList::list())) {
|
for (const auto &p : std::as_const(LVM::pvList::list())) {
|
||||||
bool toBeDeleted = false;
|
bool toBeDeleted = false;
|
||||||
|
|
||||||
// Ignore partitions that are going to be deleted
|
// Ignore partitions that are going to be deleted
|
||||||
for (const auto &o : qAsConst(m_PendingOps)) {
|
for (const auto &o : std::as_const(m_PendingOps)) {
|
||||||
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
|
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
|
||||||
toBeDeleted = true;
|
toBeDeleted = true;
|
||||||
break;
|
break;
|
||||||
|
@ -68,9 +70,9 @@ void ResizeVolumeGroupDialog::setupDialog()
|
||||||
dialogWidget().listPV().addPartition(*p.partition(), false);
|
dialogWidget().listPV().addPartition(*p.partition(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Device *d : qAsConst(m_Devices)) {
|
for (const Device *d : std::as_const(m_Devices)) {
|
||||||
if (d->partitionTable() != nullptr) {
|
if (d->partitionTable() != nullptr) {
|
||||||
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
|
for (const Partition *p : std::as_const(d->partitionTable()->children())) {
|
||||||
// Looking if there is another VG creation that contains this partition
|
// Looking if there is another VG creation that contains this partition
|
||||||
if (LvmDevice::s_DirtyPVs.contains(p))
|
if (LvmDevice::s_DirtyPVs.contains(p))
|
||||||
continue;
|
continue;
|
||||||
|
@ -90,7 +92,7 @@ void ResizeVolumeGroupDialog::setupDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Partition *p : qAsConst(LvmDevice::s_OrphanPVs))
|
for (const Partition *p : std::as_const(LvmDevice::s_OrphanPVs))
|
||||||
if (!LvmDevice::s_DirtyPVs.contains(p))
|
if (!LvmDevice::s_DirtyPVs.contains(p))
|
||||||
dialogWidget().listPV().addPartition(*p, false);
|
dialogWidget().listPV().addPartition(*p, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,13 @@ void ScanProgressDialog::closeEvent(QCloseEvent* e)
|
||||||
e->ignore();
|
e->ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScanProgressDialog::setDeviceName(const QString& d)
|
void ScanProgressDialog::setDeviceName(const QString& device)
|
||||||
{
|
{
|
||||||
if (d.isEmpty())
|
if (device.isEmpty()) {
|
||||||
setLabelText(xi18nc("@label", "Scanning..."));
|
setLabelText(xi18nc("@label", "Scanning..."));
|
||||||
else
|
} else {
|
||||||
setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", d));
|
setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", device));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScanProgressDialog::showEvent(QShowEvent* e)
|
void ScanProgressDialog::showEvent(QShowEvent* e)
|
||||||
|
|
|
@ -19,7 +19,8 @@ public:
|
||||||
void setProgress(int p) {
|
void setProgress(int p) {
|
||||||
setValue(p);
|
setValue(p);
|
||||||
}
|
}
|
||||||
void setDeviceName(const QString& d);
|
|
||||||
|
void setDeviceName(const QString& device);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent* e) override;
|
void closeEvent(QCloseEvent* e) override;
|
||||||
|
|
|
@ -162,6 +162,7 @@ void SizeDialogBase::setupConnections()
|
||||||
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::firstSectorChanged, this, &SizeDialogBase::onResizerWidgetFirstSectorChanged);
|
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::firstSectorChanged, this, &SizeDialogBase::onResizerWidgetFirstSectorChanged);
|
||||||
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::lastSectorChanged, this, &SizeDialogBase::onResizerWidgetLastSectorChanged);
|
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::lastSectorChanged, this, &SizeDialogBase::onResizerWidgetLastSectorChanged);
|
||||||
|
|
||||||
|
// TODO: Qt6 remove qOverload
|
||||||
connect(&dialogWidget().spinFreeBefore(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeBeforeChanged);
|
connect(&dialogWidget().spinFreeBefore(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeBeforeChanged);
|
||||||
connect(&dialogWidget().spinFreeAfter(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeAfterChanged);
|
connect(&dialogWidget().spinFreeAfter(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeAfterChanged);
|
||||||
connect(&dialogWidget().spinCapacity(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinCapacityChanged);
|
connect(&dialogWidget().spinCapacity(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinCapacityChanged);
|
||||||
|
@ -305,7 +306,7 @@ void SizeDialogBase::onSpinFreeAfterChanged(double newAfter)
|
||||||
updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter));
|
updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
|
void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
|
||||||
{
|
{
|
||||||
if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst))
|
if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst))
|
||||||
setDirty();
|
setDirty();
|
||||||
|
@ -315,7 +316,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
|
||||||
updateSpinFirstSector(partition().firstSector());
|
updateSpinFirstSector(partition().firstSector());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SizeDialogBase::onSpinLastSectorChanged(qint64 newLast)
|
void SizeDialogBase::onSpinLastSectorChanged(double newLast)
|
||||||
{
|
{
|
||||||
if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast))
|
if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast))
|
||||||
setDirty();
|
setDirty();
|
||||||
|
|
|
@ -117,8 +117,8 @@ protected:
|
||||||
void onSpinFreeBeforeChanged(double newBefore);
|
void onSpinFreeBeforeChanged(double newBefore);
|
||||||
void onSpinFreeAfterChanged(double newAfter);
|
void onSpinFreeAfterChanged(double newAfter);
|
||||||
|
|
||||||
void onSpinFirstSectorChanged(qint64 newFirst);
|
void onSpinFirstSectorChanged(double newFirst);
|
||||||
void onSpinLastSectorChanged(qint64 newLast);
|
void onSpinLastSectorChanged(double newLast);
|
||||||
void onAlignToggled(bool);
|
void onAlignToggled(bool);
|
||||||
|
|
||||||
void onLVNameChanged(const QString& newName);
|
void onLVNameChanged(const QString& newName);
|
||||||
|
|
|
@ -22,6 +22,7 @@ class SizeDialogWidget : public QWidget, public Ui::SizeDialogWidgetBase
|
||||||
public:
|
public:
|
||||||
SizeDialogWidget(QWidget* parent) : QWidget(parent), Ui::SizeDialogWidgetBase() {
|
SizeDialogWidget(QWidget* parent) : QWidget(parent), Ui::SizeDialogWidgetBase() {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
hidePosixPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -73,6 +74,11 @@ public:
|
||||||
return *m_RadioLogical;
|
return *m_RadioLogical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRadioButton& radioRootPermissions() {
|
||||||
|
Q_ASSERT(m_permissionOnlyRoot);
|
||||||
|
return *m_permissionOnlyRoot;
|
||||||
|
}
|
||||||
|
|
||||||
QComboBox& comboFileSystem() {
|
QComboBox& comboFileSystem() {
|
||||||
Q_ASSERT(m_ComboFileSystem);
|
Q_ASSERT(m_ComboFileSystem);
|
||||||
return *m_ComboFileSystem;
|
return *m_ComboFileSystem;
|
||||||
|
@ -141,6 +147,21 @@ public:
|
||||||
delete m_LabelTextNoSetLabel;
|
delete m_LabelTextNoSetLabel;
|
||||||
m_LabelTextNoSetLabel = nullptr;
|
m_LabelTextNoSetLabel = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hidePosixPermissions() {
|
||||||
|
m_groupBox_permissions->hide();
|
||||||
|
m_labelPermission->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void showPosixPermissions() {
|
||||||
|
m_groupBox_permissions->show();
|
||||||
|
m_labelPermission->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isPermissionOnlyRoot() const {
|
||||||
|
return !m_permissionEveryone->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
void hideBeforeAndAfter() {
|
void hideBeforeAndAfter() {
|
||||||
labelFreeBefore().hide();
|
labelFreeBefore().hide();
|
||||||
spinFreeBefore().hide();
|
spinFreeBefore().hide();
|
||||||
|
|
|
@ -18,22 +18,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="11" column="0">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="m_LabelFreeBefore">
|
<widget class="PartResizerWidget" name="m_PartResizerWidget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="minimumSize">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<size>
|
||||||
<horstretch>3</horstretch>
|
<width>400</width>
|
||||||
<verstretch>0</verstretch>
|
<height>60</height>
|
||||||
</sizepolicy>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="maximumSize">
|
||||||
<string comment="@label:listbox">F&ree space before:</string>
|
<size>
|
||||||
</property>
|
<width>16777215</width>
|
||||||
<property name="alignment">
|
<height>60</height>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
</size>
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_SpinFreeBefore</cstring>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -53,13 +50,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="FormattedSpinBox" name="m_SpinCapacity">
|
<widget class="QLabel" name="m_LabelRole">
|
||||||
<property name="minimum">
|
<property name="sizePolicy">
|
||||||
<double>0.000000000000000</double>
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="text">
|
||||||
<double>999999999.000000000000000</double>
|
<string comment="@label:listbox">Partition type:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -82,6 +85,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="m_ComboFileSystem"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QCheckBox" name="m_CheckBoxEncrypt">
|
<widget class="QCheckBox" name="m_CheckBoxEncrypt">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -92,55 +102,40 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="KNewPasswordWidget" name="m_EditPassphrase"/>
|
||||||
<property name="sizePolicy">
|
</item>
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<item row="6" column="0">
|
||||||
<horstretch>0</horstretch>
|
<widget class="QLabel" name="m_LabelTextLVName">
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string comment="@label">Maximum size:</string>
|
<string>Logical Volume Name:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QLabel" name="m_LabelMaxSize">
|
<widget class="QLineEdit" name="m_EditLVName">
|
||||||
<property name="textInteractionFlags">
|
<property name="enabled">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="7" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<widget class="QLabel" name="m_LabelTextLabel">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QRadioButton" name="m_RadioPrimary">
|
<string comment="@label">Label:</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Primar&y</string>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="buddy">
|
||||||
<item>
|
<cstring>m_EditLabel</cstring>
|
||||||
<widget class="QRadioButton" name="m_RadioExtended">
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>E&xtended</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="m_RadioLogical">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Logical</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="7" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="m_EditLabel"/>
|
<widget class="QLineEdit" name="m_EditLabel"/>
|
||||||
|
@ -157,62 +152,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="PartResizerWidget" name="m_PartResizerWidget" native="true">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>400</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="m_ComboFileSystem"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="m_LabelRole">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string comment="@label:listbox">Partition &type:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_RadioPrimary</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="m_LabelTextLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string comment="@label">Label:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_EditLabel</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
@ -228,7 +168,56 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1">
|
<item row="8" column="1">
|
||||||
|
<widget class="QLabel" name="m_LabelMinSize">
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string comment="@label">Maximum size:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="1">
|
||||||
|
<widget class="QLabel" name="m_LabelMaxSize">
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0">
|
||||||
|
<widget class="QLabel" name="m_LabelFreeBefore">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>3</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string comment="@label:listbox">F&ree space before:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>m_SpinFreeBefore</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="1">
|
||||||
<widget class="FormattedSpinBox" name="m_SpinFreeBefore">
|
<widget class="FormattedSpinBox" name="m_SpinFreeBefore">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
@ -244,7 +233,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="11" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
@ -263,7 +252,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0">
|
<item row="11" column="1">
|
||||||
|
<widget class="FormattedSpinBox" name="m_SpinCapacity">
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
<widget class="QLabel" name="m_LabelFreeAfter">
|
<widget class="QLabel" name="m_LabelFreeAfter">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
@ -282,7 +281,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="12" column="1">
|
||||||
<widget class="FormattedSpinBox" name="m_SpinFreeAfter">
|
<widget class="FormattedSpinBox" name="m_SpinFreeAfter">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>0.000000000000000</double>
|
<double>0.000000000000000</double>
|
||||||
|
@ -292,6 +291,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="m_labelPermission">
|
||||||
|
<property name="text">
|
||||||
|
<string>Permissions</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="14" column="0" colspan="2">
|
<item row="14" column="0" colspan="2">
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -308,36 +317,67 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
<item row="13" column="1">
|
||||||
<widget class="KNewPasswordWidget" name="m_EditPassphrase"/>
|
<widget class="QGroupBox" name="m_groupBox_permissions">
|
||||||
</item>
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item row="9" column="1">
|
<item>
|
||||||
<widget class="QLabel" name="m_LabelMinSize">
|
<widget class="QRadioButton" name="m_permissionEveryone">
|
||||||
<property name="textInteractionFlags">
|
<property name="toolTip">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<string>Allow everyone to write and read on this device</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Everyone</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_permissionOnlyRoot">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Allow only root to write and read on this device, you will need to setup per-folder permissions</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only Root</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="m_LabelTextLVName">
|
<widget class="QGroupBox" name="m_groupBox_type">
|
||||||
<property name="text">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<string>Logical Volume Name:</string>
|
<item>
|
||||||
</property>
|
<widget class="QRadioButton" name="m_RadioPrimary">
|
||||||
<property name="alignment">
|
<property name="text">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<string>Primar&y</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item>
|
||||||
<widget class="QLineEdit" name="m_EditLVName">
|
<widget class="QRadioButton" name="m_RadioExtended">
|
||||||
<property name="enabled">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>E&xtended</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_RadioLogical">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Logical</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>KNewPasswordWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>knewpasswordwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>PartResizerWidget</class>
|
<class>PartResizerWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -349,16 +389,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header>gui/formattedspinbox.h</header>
|
<header>gui/formattedspinbox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>KNewPasswordWidget</class>
|
|
||||||
<extends>QLineEdit</extends>
|
|
||||||
<header>KNewPasswordWidget</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>m_RadioPrimary</tabstop>
|
<tabstop>m_RadioPrimary</tabstop>
|
||||||
<tabstop>m_RadioExtended</tabstop>
|
<tabstop>m_RadioExtended</tabstop>
|
||||||
<tabstop>m_RadioLogical</tabstop>
|
<tabstop>m_RadioLogical</tabstop>
|
||||||
|
<tabstop>m_ComboFileSystem</tabstop>
|
||||||
|
<tabstop>m_CheckBoxEncrypt</tabstop>
|
||||||
|
<tabstop>m_EditLVName</tabstop>
|
||||||
<tabstop>m_EditLabel</tabstop>
|
<tabstop>m_EditLabel</tabstop>
|
||||||
<tabstop>m_SpinFreeBefore</tabstop>
|
<tabstop>m_SpinFreeBefore</tabstop>
|
||||||
<tabstop>m_SpinCapacity</tabstop>
|
<tabstop>m_SpinCapacity</tabstop>
|
||||||
|
|
67
src/main.cpp
67
src/main.cpp
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
|
#include <QCommandLineOption>
|
||||||
|
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
#include <KCrash>
|
#include <KCrash>
|
||||||
|
@ -24,6 +25,45 @@
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
std::pair<QString, QString> parseDevice(const QString& selectedDevice)
|
||||||
|
{
|
||||||
|
QString device;
|
||||||
|
QString partitionNr;
|
||||||
|
if (selectedDevice.length()) {
|
||||||
|
const bool isNvme = selectedDevice.startsWith(QStringLiteral("nvme"));
|
||||||
|
// calculate the number of numbers on the last part of the info.
|
||||||
|
int numSize = 0;
|
||||||
|
for (int i = selectedDevice.length() - 1; i > 0; i--) {
|
||||||
|
if (selectedDevice[i].isNumber()) {
|
||||||
|
numSize += 1;
|
||||||
|
} else {
|
||||||
|
if (isNvme) {
|
||||||
|
// the entry is just an nvme without a partition.
|
||||||
|
if (selectedDevice[i] != QLatin1Char('p')) {
|
||||||
|
numSize = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
partitionNr = selectedDevice.mid(selectedDevice.length() - numSize);
|
||||||
|
|
||||||
|
if (numSize != 0) {
|
||||||
|
// nvme has a `p` that also needs to be removed.
|
||||||
|
if (isNvme) {
|
||||||
|
numSize += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
device = selectedDevice.mid(0, selectedDevice.length() - numSize);
|
||||||
|
} else {
|
||||||
|
device = selectedDevice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {device, partitionNr};
|
||||||
|
}
|
||||||
|
|
||||||
int Q_DECL_IMPORT main(int argc, char* argv[])
|
int Q_DECL_IMPORT main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
@ -52,12 +92,16 @@ int Q_DECL_IMPORT main(int argc, char* argv[])
|
||||||
aboutData.setHomepage(QStringLiteral("https://www.kde.org/applications/system/partitionmanager"));
|
aboutData.setHomepage(QStringLiteral("https://www.kde.org/applications/system/partitionmanager"));
|
||||||
|
|
||||||
KAboutData::setApplicationData(aboutData);
|
KAboutData::setApplicationData(aboutData);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||||
|
#endif
|
||||||
KCrash::initialize();
|
KCrash::initialize();
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
aboutData.setupCommandLine(&parser);
|
aboutData.setupCommandLine(&parser);
|
||||||
// FIXME parser.addPositionalArgument(QStringLiteral("device"), xi18nc("@info:shell", "Device(s) to manage"), QStringLiteral("[device...]"));
|
|
||||||
|
QCommandLineOption deviceOption({QStringLiteral("device")}, xi18nc("@info:shell", "Device to manage"), QStringLiteral("device"));
|
||||||
|
parser.addOption(deviceOption);
|
||||||
|
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
aboutData.processCommandLine(&parser);
|
aboutData.processCommandLine(&parser);
|
||||||
|
@ -71,8 +115,27 @@ int Q_DECL_IMPORT main(int argc, char* argv[])
|
||||||
if (!loadBackend())
|
if (!loadBackend())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// device is the selected device minus the partition number.
|
||||||
|
// we need all of them to select properly the things on screen.
|
||||||
|
|
||||||
|
QString selectedDevice = parser.value(deviceOption);
|
||||||
|
if (selectedDevice.startsWith(QStringLiteral("/dev/"))) {
|
||||||
|
selectedDevice.remove(QStringLiteral("/dev/"));
|
||||||
|
}
|
||||||
|
auto [device, partitionNr] = parseDevice(selectedDevice);
|
||||||
|
|
||||||
MainWindow* mainWindow = new MainWindow();
|
MainWindow* mainWindow = new MainWindow();
|
||||||
Q_UNUSED(mainWindow)
|
QObject::connect(mainWindow, &MainWindow::scanFinished, mainWindow, [mainWindow, device = device, selectedDevice, partitionNr = partitionNr] {
|
||||||
|
if (device.length()) {
|
||||||
|
mainWindow->setCurrentDeviceByName(device);
|
||||||
|
if (partitionNr.length()) {
|
||||||
|
mainWindow->setCurrentPartitionByName(selectedDevice);
|
||||||
|
}
|
||||||
|
mainWindow->setDisallowOtherDevices();
|
||||||
|
} else {
|
||||||
|
mainWindow->showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ]
|
||||||
|
Type=Service
|
||||||
|
Actions=open;
|
||||||
|
|
||||||
|
[Desktop Action open]
|
||||||
|
# %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
|
||||||
|
Exec=partitionmanager "--device=%d"
|
||||||
|
Icon=partitionmanager
|
||||||
|
Name=Reformat or Edit with Partition Manager
|
||||||
|
Name[az]=Bölmələr Meneceri ilə yenidən formatlayın və ya düzəliş edin
|
||||||
|
Name[ca]=Reformatació i edició amb el gestor de particions
|
||||||
|
Name[ca@valencia]=Reformatació i edició amb el gestor de particions
|
||||||
|
Name[cs]=Přeformátovat nebo upravit pomocí Správce diskových oddílů
|
||||||
|
Name[es]=Volver a formatear o editar con el gestor de particiones
|
||||||
|
Name[fr]=Reformater ou modifier avec le gestionnaire de partitions de KDE
|
||||||
|
Name[hu]=Újraformázás vagy szerkesztés a Partíciókezelővel
|
||||||
|
Name[ia]=Reformatta o modifica con Partition Manager (gerente de partition)
|
||||||
|
Name[it]=Riformatta o modifica con il gestore delle partizioni
|
||||||
|
Name[nl]=Met Partitiebeheerder opnieuw formatteren of bewerken
|
||||||
|
Name[pl]=Przeformatuj lub zmień w Zarządzaniu Partycjami
|
||||||
|
Name[pt_BR]=Reformatar ou editar com o gerenciador de partições
|
||||||
|
Name[sl]=Ponovno formatiraj ali uredi z Upravljalnikom razdelkov
|
||||||
|
Name[sv]=Omformatering eller redigering med partitionshanterare
|
||||||
|
Name[uk]=Переформатувати або редагувати за допомогою «Керування розділами»
|
||||||
|
Name[x-test]=xxReformat or Edit with Partition Managerxx
|
|
@ -27,6 +27,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<name xml:lang="fr">Gestionnaire de partitions de KDE</name>
|
<name xml:lang="fr">Gestionnaire de partitions de KDE</name>
|
||||||
<name xml:lang="gl">Xestor de particións de KDE</name>
|
<name xml:lang="gl">Xestor de particións de KDE</name>
|
||||||
<name xml:lang="hu">KDE partíciókezelő</name>
|
<name xml:lang="hu">KDE partíciókezelő</name>
|
||||||
|
<name xml:lang="ia">KDE Partition Manager (gerente de partition de KDE)</name>
|
||||||
<name xml:lang="id">KDE Partition Manager</name>
|
<name xml:lang="id">KDE Partition Manager</name>
|
||||||
<name xml:lang="it">Gestore delle partizioni di KDE</name>
|
<name xml:lang="it">Gestore delle partizioni di KDE</name>
|
||||||
<name xml:lang="ko">KDE 파티션 관리자</name>
|
<name xml:lang="ko">KDE 파티션 관리자</name>
|
||||||
|
@ -51,6 +52,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<name xml:lang="zh-CN">KDE 分区管理器</name>
|
<name xml:lang="zh-CN">KDE 分区管理器</name>
|
||||||
<name xml:lang="zh-TW">KDE 磁碟分割區管理員</name>
|
<name xml:lang="zh-TW">KDE 磁碟分割區管理員</name>
|
||||||
<summary>Manage disk devices, partitions and file systems on your computer</summary>
|
<summary>Manage disk devices, partitions and file systems on your computer</summary>
|
||||||
|
<summary xml:lang="ast">Xestiona preseos d'almacenamientu, particiones y sistemes de ficheros del ordenador</summary>
|
||||||
<summary xml:lang="az">Kompyuterinizdəki disk qurğularının, bölmələrin və fayl sistemlərinin idarə edilməsi</summary>
|
<summary xml:lang="az">Kompyuterinizdəki disk qurğularının, bölmələrin və fayl sistemlərinin idarə edilməsi</summary>
|
||||||
<summary xml:lang="ca">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
|
<summary xml:lang="ca">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
|
||||||
<summary xml:lang="ca-valencia">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
|
<summary xml:lang="ca-valencia">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
|
||||||
|
@ -64,9 +66,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<summary xml:lang="eu">Kudeatu zure sistemako disko gailuak, partizioak eta fitxategi-sistemak</summary>
|
<summary xml:lang="eu">Kudeatu zure sistemako disko gailuak, partizioak eta fitxategi-sistemak</summary>
|
||||||
<summary xml:lang="fi">Hallitse tietokoneen levyjä, osioita ja tiedostojärjestelmiä</summary>
|
<summary xml:lang="fi">Hallitse tietokoneen levyjä, osioita ja tiedostojärjestelmiä</summary>
|
||||||
<summary xml:lang="fr">Gérez vos disques, partitions et systèmes de fichiers de votre ordinateur</summary>
|
<summary xml:lang="fr">Gérez vos disques, partitions et systèmes de fichiers de votre ordinateur</summary>
|
||||||
|
<summary xml:lang="hu">A számítógépe háttértárainak, partícióinak és fájlrendszereinek kezelése</summary>
|
||||||
|
<summary xml:lang="ia">Gere dispositivos de disco, partitiones e systemas de file sur tu computator</summary>
|
||||||
|
<summary xml:lang="id">Kelola perangkat disk, partisi, dan sistem file di komputermu</summary>
|
||||||
<summary xml:lang="it">Gestisci dispositivi a disco, partizioni e file system sul tuo computer</summary>
|
<summary xml:lang="it">Gestisci dispositivi a disco, partizioni e file system sul tuo computer</summary>
|
||||||
<summary xml:lang="ko">컴퓨터의 디스크 장치, 파티션, 파일 시스템 관리</summary>
|
<summary xml:lang="ko">컴퓨터의 디스크 장치, 파티션, 파일 시스템 관리</summary>
|
||||||
<summary xml:lang="nl">Schijfapparaten, partities en bestandssystemen op uw computer beheren</summary>
|
<summary xml:lang="nl">Schijfapparaten, partities en bestandssystemen op uw computer beheren</summary>
|
||||||
|
<summary xml:lang="pa">ਆਪਣੇ ਕੰਪਿਊਟਰ ਲਈ ਡਿਸਕ ਡਿਵਾਈਸ, ਪਾਰਟੀਸ਼ਨ ਤੇ ਫਾਇਲ ਸਿਸਟਮਾਂ ਦਾ ਇੰਤਜ਼ਾਮ ਕਰੋ</summary>
|
||||||
|
<summary xml:lang="pl">Zarządzaj urządzeniami dyskowymi, partycjami oraz systemami plików na twoim komputerze</summary>
|
||||||
<summary xml:lang="pt">Faz a gestão de dispositivos, partições e sistemas de ficheiros dos discos no seu computador</summary>
|
<summary xml:lang="pt">Faz a gestão de dispositivos, partições e sistemas de ficheiros dos discos no seu computador</summary>
|
||||||
<summary xml:lang="pt-BR">Gerencie dispositivos de disco, partições e sistemas de arquivos no seu computador</summary>
|
<summary xml:lang="pt-BR">Gerencie dispositivos de disco, partições e sistemas de arquivos no seu computador</summary>
|
||||||
<summary xml:lang="ro">Gestionează discuri, partiții și sisteme de fișiere din calculator</summary>
|
<summary xml:lang="ro">Gestionează discuri, partiții și sisteme de fișiere din calculator</summary>
|
||||||
|
@ -95,7 +102,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<p xml:lang="fr">Le gestionnaire de partitions de KDE est un utilitaire qui vous aide à gérer les disques, partitions et systèmes de fichiers de votre ordinateur. Il vous permet de créer, copier, déplacer, supprimer, redimensionner sans perte, sauvegarder et rétablir des partitions facilement.</p>
|
<p xml:lang="fr">Le gestionnaire de partitions de KDE est un utilitaire qui vous aide à gérer les disques, partitions et systèmes de fichiers de votre ordinateur. Il vous permet de créer, copier, déplacer, supprimer, redimensionner sans perte, sauvegarder et rétablir des partitions facilement.</p>
|
||||||
<p xml:lang="gl">O xestor de particións de KDE é unha ferramenta que lle permite xestionar os seus dispositivos de almacenamento, as particións e os sistemas de ficheiros do seu computador. A ferramenta permite crear, copiar, mover, eliminar, cambiar de tamaño sen perder datos, facer copias de seguranza e restaurar particións, todo de maneira sinxela.</p>
|
<p xml:lang="gl">O xestor de particións de KDE é unha ferramenta que lle permite xestionar os seus dispositivos de almacenamento, as particións e os sistemas de ficheiros do seu computador. A ferramenta permite crear, copiar, mover, eliminar, cambiar de tamaño sen perder datos, facer copias de seguranza e restaurar particións, todo de maneira sinxela.</p>
|
||||||
<p xml:lang="hu">A KDE partíciókezelő egy segédprogram, mely segít Önnek lemezek, partíciók és fájlrendszerek kezelésében. Lehetővé teszi partíciók létrehozását, másolását, mozgatását, törlését, adatvesztés nélküli átméretezését, biztonsági mentését és visszaállítását.</p>
|
<p xml:lang="hu">A KDE partíciókezelő egy segédprogram, mely segít Önnek lemezek, partíciók és fájlrendszerek kezelésében. Lehetővé teszi partíciók létrehozását, másolását, mozgatását, törlését, adatvesztés nélküli átméretezését, biztonsági mentését és visszaállítását.</p>
|
||||||
<p xml:lang="id">KDE Partition Manager adalah sebuah program utilitas untuk membantu Anda mengelola perangkat disk, partisi dan sistem file di komputer Anda. Hal ini memungkinkan Anda untuk mudah menciptakan, menyalin, memindah, menghapus, mengubah-ukuran tanpa kehilangan data, mencadang dan mengembalikan partisi.</p>
|
<p xml:lang="id">KDE Partition Manager adalah sebuah program utilitas untuk membantu kamu mengelola perangkat disk, partisi dan sistem file di komputermu. Hal ini memungkinkan kamu untuk mudah menciptakan, menyalin, memindah, menghapus, mengubah ukuran tanpa kehilangan data, mem-backup dan mengembalikan partisi.</p>
|
||||||
<p xml:lang="it">Il gestore delle partizioni di KDE è un programma che ti aiuta a gestire i dischi, le partizioni e i filesystem sul tuo computer. Ti consente di creare, copiare, spostare, eliminare, ridimensionare senza perdere dati, effettuare copie di sicurezza e ripristinare partizioni con grande semplicità.</p>
|
<p xml:lang="it">Il gestore delle partizioni di KDE è un programma che ti aiuta a gestire i dischi, le partizioni e i filesystem sul tuo computer. Ti consente di creare, copiare, spostare, eliminare, ridimensionare senza perdere dati, effettuare copie di sicurezza e ripristinare partizioni con grande semplicità.</p>
|
||||||
<p xml:lang="ko">KDE 파티션 관리자는 컴퓨터의 디스크 장치, 파티션, 파일 시스템을 관리하는 도구입니다. 파티션 작업, 무손실 크기 조정, 백업과 복원이 가능합니다.</p>
|
<p xml:lang="ko">KDE 파티션 관리자는 컴퓨터의 디스크 장치, 파티션, 파일 시스템을 관리하는 도구입니다. 파티션 작업, 무손실 크기 조정, 백업과 복원이 가능합니다.</p>
|
||||||
<p xml:lang="lt">KDE Skaidinių tvarkyklė yra programa padedanti tvarkyti jūsų kompiuterio diskų įrenginius, skaidinius ir failų sistemas. Ji leidžia lengvai kurti, kopijuoti, perkelti, trinti ir keisti dydį neprarandant duomenų, kurti atsargines skaidinių kopijas.</p>
|
<p xml:lang="lt">KDE Skaidinių tvarkyklė yra programa padedanti tvarkyti jūsų kompiuterio diskų įrenginius, skaidinius ir failų sistemas. Ji leidžia lengvai kurti, kopijuoti, perkelti, trinti ir keisti dydį neprarandant duomenų, kurti atsargines skaidinių kopijas.</p>
|
||||||
|
@ -137,6 +144,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<p xml:lang="fr">Fonctionnalités :</p>
|
<p xml:lang="fr">Fonctionnalités :</p>
|
||||||
<p xml:lang="gl">Funcionalidades:</p>
|
<p xml:lang="gl">Funcionalidades:</p>
|
||||||
<p xml:lang="hu">Szolgáltatások:</p>
|
<p xml:lang="hu">Szolgáltatások:</p>
|
||||||
|
<p xml:lang="ia">Characteristicas:</p>
|
||||||
<p xml:lang="id">Fitur:</p>
|
<p xml:lang="id">Fitur:</p>
|
||||||
<p xml:lang="it">Funzionalità:</p>
|
<p xml:lang="it">Funzionalità:</p>
|
||||||
<p xml:lang="ko">기능:</p>
|
<p xml:lang="ko">기능:</p>
|
||||||
|
@ -218,6 +226,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<li xml:lang="fr">Utilise des programmes externes existants pour faire le travail</li>
|
<li xml:lang="fr">Utilise des programmes externes existants pour faire le travail</li>
|
||||||
<li xml:lang="gl">Usa programas externos para realizar as tarefas.</li>
|
<li xml:lang="gl">Usa programas externos para realizar as tarefas.</li>
|
||||||
<li xml:lang="hu">A meglévő külső programokat használja a feladatok elvégzésére</li>
|
<li xml:lang="hu">A meglévő külső programokat használja a feladatok elvégzésére</li>
|
||||||
|
<li xml:lang="ia">Face uso de programmas externe jam disponibile pro obtener que su carga es facite</li>
|
||||||
<li xml:lang="id">Membuat penggunaan program eksternal yang sudah ada untuk menyelesaikan pekerjaannya</li>
|
<li xml:lang="id">Membuat penggunaan program eksternal yang sudah ada untuk menyelesaikan pekerjaannya</li>
|
||||||
<li xml:lang="it">Utilizza programmi esterni già disponibili per fare il suo lavoro</li>
|
<li xml:lang="it">Utilizza programmi esterni già disponibili per fare il suo lavoro</li>
|
||||||
<li xml:lang="ko">외부 프로그램을 사용한 작업 관리</li>
|
<li xml:lang="ko">외부 프로그램을 사용한 작업 관리</li>
|
||||||
|
@ -243,7 +252,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<li xml:lang="zh-TW">利用已有的外部程式來完成其工作</li>
|
<li xml:lang="zh-TW">利用已有的外部程式來完成其工作</li>
|
||||||
</ul>
|
</ul>
|
||||||
</description>
|
</description>
|
||||||
<url type="homepage">https://www.kde.org/applications/system/kdepartitionmanager/</url>
|
<url type="homepage">https://apps.kde.org/partitionmanager//</url>
|
||||||
<url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&product=partitionmanager</url>
|
<url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&product=partitionmanager</url>
|
||||||
<url type="help">https://docs.kde.org/?application=partitionmanager</url>
|
<url type="help">https://docs.kde.org/?application=partitionmanager</url>
|
||||||
<screenshots>
|
<screenshots>
|
||||||
|
@ -255,4 +264,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<provides>
|
<provides>
|
||||||
<binary>partitionmanager</binary>
|
<binary>partitionmanager</binary>
|
||||||
</provides>
|
</provides>
|
||||||
|
<releases>
|
||||||
|
<release version="21.12.2" date="2022-02-03"/>
|
||||||
|
<release version="21.12.1" date="2022-01-06"/>
|
||||||
|
<release version="21.12.0" date="2021-12-09"/>
|
||||||
|
<release version="21.08.3" date="2021-11-04"/>
|
||||||
|
</releases>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -21,6 +21,7 @@ Name[fr]=Gestionnaire de partitions de KDE
|
||||||
Name[ga]=Bainisteoir Deighiltí KDE
|
Name[ga]=Bainisteoir Deighiltí KDE
|
||||||
Name[gl]=Xestor de particións de KDE
|
Name[gl]=Xestor de particións de KDE
|
||||||
Name[hu]=KDE partíciókezelő
|
Name[hu]=KDE partíciókezelő
|
||||||
|
Name[ia]=KDE Partition Manager (gerente de partition de KDE)
|
||||||
Name[id]=KDE Partition Manager
|
Name[id]=KDE Partition Manager
|
||||||
Name[it]=Gestore delle partizioni di KDE
|
Name[it]=Gestore delle partizioni di KDE
|
||||||
Name[ja]=KDE パーティションマネージャ
|
Name[ja]=KDE パーティションマネージャ
|
||||||
|
@ -75,6 +76,7 @@ GenericName[fr]=Éditeur de partitions
|
||||||
GenericName[ga]=Eagarthóir Deighiltí
|
GenericName[ga]=Eagarthóir Deighiltí
|
||||||
GenericName[gl]=Editor de particións
|
GenericName[gl]=Editor de particións
|
||||||
GenericName[hu]=Partíciószerkesztő
|
GenericName[hu]=Partíciószerkesztő
|
||||||
|
GenericName[ia]=Partition Editor (Editor de Partition)
|
||||||
GenericName[id]=Pengedit Partisi
|
GenericName[id]=Pengedit Partisi
|
||||||
GenericName[it]=Editor delle partizioni
|
GenericName[it]=Editor delle partizioni
|
||||||
GenericName[ja]=パーティション編集ツール
|
GenericName[ja]=パーティション編集ツール
|
||||||
|
@ -128,6 +130,7 @@ Comment[fr]=Gère les disques, partitions et systèmes de fichiers
|
||||||
Comment[ga]=Bainistigh dioscaí, deighiltí agus córais comhad
|
Comment[ga]=Bainistigh dioscaí, deighiltí agus córais comhad
|
||||||
Comment[gl]=Xestiona os discos, particións e o sistemas de ficheiros
|
Comment[gl]=Xestiona os discos, particións e o sistemas de ficheiros
|
||||||
Comment[hu]=Lemezek, partíciók, és fájlrendszerek kezelése
|
Comment[hu]=Lemezek, partíciók, és fájlrendszerek kezelése
|
||||||
|
Comment[ia]=Gere discos, partitiones e systemas de file
|
||||||
Comment[id]=Kelola disk, partisi dan sistem file
|
Comment[id]=Kelola disk, partisi dan sistem file
|
||||||
Comment[it]=Gestisci dischi, partizioni e filesystem
|
Comment[it]=Gestisci dischi, partizioni e filesystem
|
||||||
Comment[ja]=ディスク、パーティション、ファイルシステムを管理します
|
Comment[ja]=ディスク、パーティション、ファイルシステムを管理します
|
||||||
|
@ -166,13 +169,14 @@ Icon=partitionmanager
|
||||||
Categories=System;Filesystem;KDE;Qt;
|
Categories=System;Filesystem;KDE;Qt;
|
||||||
X-KDE-StartupNotify=true
|
X-KDE-StartupNotify=true
|
||||||
Keywords=partition;disk;
|
Keywords=partition;disk;
|
||||||
|
Keywords[ar]=أقسام;قرص;
|
||||||
Keywords[ast]=partición;particionar;discu;
|
Keywords[ast]=partición;particionar;discu;
|
||||||
Keywords[az]=partition;disk;bölmə;
|
Keywords[az]=partition;disk;bölmə;
|
||||||
Keywords[ca]=partició;disc;
|
Keywords[ca]=partició;disc;
|
||||||
Keywords[ca@valencia]=partició;disc;
|
Keywords[ca@valencia]=partició;disc;
|
||||||
Keywords[cs]=oddíl;disk;
|
Keywords[cs]=oddíl;disk;
|
||||||
Keywords[da]=partition;disk;
|
Keywords[da]=partition;disk;
|
||||||
Keywords[de]=partition;disk;festplatte
|
Keywords[de]=partition;disk;festplatte;
|
||||||
Keywords[el]=κατάτμηση;δίσκος;
|
Keywords[el]=κατάτμηση;δίσκος;
|
||||||
Keywords[en_GB]=partition;disk;
|
Keywords[en_GB]=partition;disk;
|
||||||
Keywords[es]=partición;disco;
|
Keywords[es]=partición;disco;
|
||||||
|
@ -181,6 +185,8 @@ Keywords[eu]=partizioa;diskoa;
|
||||||
Keywords[fi]=osio;levy;
|
Keywords[fi]=osio;levy;
|
||||||
Keywords[fr]=partition;disque;
|
Keywords[fr]=partition;disque;
|
||||||
Keywords[gl]=partition;disk;partición;disco;
|
Keywords[gl]=partition;disk;partición;disco;
|
||||||
|
Keywords[hu]=partíció;lemez;
|
||||||
|
Keywords[ia]=partition;disk;
|
||||||
Keywords[id]=partisi;disk;
|
Keywords[id]=partisi;disk;
|
||||||
Keywords[it]=partizione;disco;
|
Keywords[it]=partizione;disco;
|
||||||
Keywords[ko]=partition;disk;파티션;디스크;
|
Keywords[ko]=partition;disk;파티션;디스크;
|
||||||
|
|
|
@ -145,7 +145,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
<label context="@label">Backend plugin</label>
|
<label context="@label">Backend plugin</label>
|
||||||
</entry>
|
</entry>
|
||||||
<entry key="defaultFileSystem" type="Int">
|
<entry key="defaultFileSystem" type="Int">
|
||||||
<default>static_cast<int>(FileSystem::Type::Ext4)</default>
|
<default>static_cast<int>(FileSystem::Type::Btrfs)</default>
|
||||||
</entry>
|
</entry>
|
||||||
<entry key="preferredUnit" type="Enum">
|
<entry key="preferredUnit" type="Enum">
|
||||||
<label context="@label">Preferred unit:</label>
|
<label context="@label">Preferred unit:</label>
|
||||||
|
@ -167,5 +167,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
</choices>
|
</choices>
|
||||||
<default>random</default>
|
<default>random</default>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry key="hideDeviceDockWidgetByCmdArgs" type="Bool">
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
</group>
|
</group>
|
||||||
</kcfg>
|
</kcfg>
|
||||||
|
|
Loading…
Reference in New Issue