diff options
author | maz-1 | 2015-12-04 12:23:27 +0800 |
---|---|---|
committer | maz-1 | 2015-12-04 12:23:27 +0800 |
commit | 34abec5eac4709900345a8e233e658d7b385af01 (patch) | |
tree | 0a3e6124f1c8cb3fe8e8346a5e23d4961a66e2d8 | |
parent | d9d5d5aaacdd7046e23152aa486bf1980c5e3219 (diff) | |
download | aur-34abec5eac4709900345a8e233e658d7b385af01.tar.gz |
bump
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rwxr-xr-x | grub2-editor.desktop | 14 | ||||
-rw-r--r-- | l10n_zh-cn.patch | 1115 | ||||
-rw-r--r-- | port_to_kf5.patch | 2155 |
5 files changed, 3 insertions, 3299 deletions
@@ -22,13 +22,9 @@ pkgbase = grub2-editor-frameworks provides = grub2-editor conflicts = grub2-editor source = http://sourceforge.net/projects/kcm-grub2/files/kcm-grub2-0.6.4.tar.gz - source = port_to_kf5.patch - source = l10n_zh-cn.patch - source = grub2-editor.desktop + source = https://patch-diff.githubusercontent.com/raw/maz-1/grub2-editor/pull/1.diff md5sums = b3ff8fb938be8112dcc6e42b3e56efc6 md5sums = SKIP - md5sums = SKIP - md5sums = SKIP pkgname = grub2-editor-frameworks @@ -13,13 +13,9 @@ depends=('grub' 'hwinfo' 'imagemagick' 'kio' 'ki18n' 'kauth' 'kconfigwidgets' 'solid') makedepends=('extra-cmake-modules' 'git' 'kdoctools') source=("http://sourceforge.net/projects/kcm-grub2/files/kcm-grub2-$pkgver.tar.gz" - "port_to_kf5.patch" - "l10n_zh-cn.patch" - "grub2-editor.desktop") + "https://patch-diff.githubusercontent.com/raw/maz-1/grub2-editor/pull/1.diff") groups=('plasma') md5sums=('b3ff8fb938be8112dcc6e42b3e56efc6' - 'SKIP' - 'SKIP' 'SKIP') @@ -27,9 +23,7 @@ prepare() { rm -rf build mkdir -p build cd kcm-grub2-$pkgver - patch -p1 -i "$srcdir/port_to_kf5.patch" - patch -p1 -i "$srcdir/l10n_zh-cn.patch" - #sed -i 's:^Exec=.*$:Exec=pkexec env DISPLAY=\$DISPLAY XAUTHORITY=\$XAUTHORITY kcmshell5 kcm_grub2:g' other/kcm_grub2.desktop + patch -p1 -i "$srcdir/1.diff" } build() { @@ -47,6 +41,4 @@ build() { package() { cd build make DESTDIR="$pkgdir" install - install -dm755 "$pkgdir/usr/bin/" - #install -Dm755 "$srcdir/grub2-editor.desktop" "$pkgdir/usr/share/applications/grub2-editor.desktop" } diff --git a/grub2-editor.desktop b/grub2-editor.desktop deleted file mode 100755 index b386fbc34655..000000000000 --- a/grub2-editor.desktop +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env xdg-open -[Desktop Entry] -Icon=system-reboot -Type=Application -StartupNotify=true -Terminal=false -Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY kcmshell5 kcm_grub2 -Name=GRUB2 Bootloader -Name[zh_CN]=GRUB2 启动加载器 -Name[zh_TW]=GRUB2 開機載入器 -Comment=Customize the GRUB2 bootloader -Comment[zh_TW]=自訂 GRUB2 開機載入器 -X-KDE-Keywords=grub,boot,menu,entries,default,timeout,password,color,splash,image,bootloader -Categories=System;KDE;Qt; diff --git a/l10n_zh-cn.patch b/l10n_zh-cn.patch deleted file mode 100644 index aafd2b9254a6..000000000000 --- a/l10n_zh-cn.patch +++ /dev/null @@ -1,1115 +0,0 @@ -diff -Naur a/other/kcm_grub2.desktop b/other/kcm_grub2.desktop ---- a/other/kcm_grub2.desktop 2013-10-12 18:34:15.000000000 +0800 -+++ b/other/kcm_grub2.desktop 2015-11-29 19:25:37.569916141 +0800 -@@ -79,6 +79,7 @@ - Comment[uk]=Налаштування завантажувача GRUB2 - Comment[x-test]=xxCustomize the GRUB2 bootloaderxx - Comment[zh_TW]=自訂 GRUB2 開機載入器 -+Comment[zh_CN]=自定义 GRUB2 启动加载器 - X-KDE-Keywords=grub,boot,menu,entries,default,timeout,password,color,splash,image,bootloader - X-KDE-Keywords[ca]=grub,arrencada,menú,entrades,omissió,temps d'expiració,contrasenya,color,benvinguda,imatge,carregador d'arrencada - X-KDE-Keywords[ca@valencia]=grub,arrencada,menú,entrades,omissió,temps d'expiració,contrasenya,color,benvinguda,imatge,carregador d'arrencada -diff -Naur a/po/CMakeLists.txt b/po/CMakeLists.txt ---- a/po/CMakeLists.txt 2013-10-12 18:35:37.000000000 +0800 -+++ b/po/CMakeLists.txt 2015-11-29 19:24:54.589635487 +0800 -@@ -26,4 +26,5 @@ - add_subdirectory( sv ) - add_subdirectory( tr ) - add_subdirectory( uk ) -+add_subdirectory( zh_CN ) - add_subdirectory( zh_TW ) -diff -Naur a/po/zh_CN/CMakeLists.txt b/po/zh_CN/CMakeLists.txt ---- a/po/zh_CN/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 -+++ b/po/zh_CN/CMakeLists.txt 2015-11-29 19:24:54.589635487 +0800 -@@ -0,0 +1,2 @@ -+file( GLOB _po_files *.po ) -+GETTEXT_PROCESS_PO_FILES( zh_CN ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/zh_CN/kcm-grub2.po b/po/zh_CN/kcm-grub2.po ---- a/po/zh_CN/kcm-grub2.po 1970-01-01 08:00:00.000000000 +0800 -+++ b/po/zh_CN/kcm-grub2.po 2015-11-29 19:24:54.592968573 +0800 -@@ -0,0 +1,1085 @@ -+# Copyright (C) YEAR This_file_is_part_of_KDE -+# This file is distributed under the same license as the PACKAGE package. -+# -+# maz-1 < ohmygod19993 at gmail dot com > -+msgid "" -+msgstr "" -+"Project-Id-Version: \n" -+"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -+"POT-Creation-Date: 2015-11-27 01:33+0000\n" -+"PO-Revision-Date: 2013-07-04 16:31+0800\n" -+"Last-Translator: Lin Ziyun < ohmygod19993 at gmail dot com >\n" -+"Language-Team: Chinese Simplified <kde-cn@googlegroups.com>\n" -+"Language: zh_CN\n" -+"MIME-Version: 1.0\n" -+"Content-Type: text/plain; charset=UTF-8\n" -+"Content-Transfer-Encoding: 8bit\n" -+"X-Generator: Lokalize 1.5\n" -+"Plural-Forms: nplurals=1; plural=0;\n" -+ -+msgctxt "NAME OF TRANSLATORS" -+msgid "Your names" -+msgstr "Lin Ziyun" -+ -+msgctxt "EMAIL OF TRANSLATORS" -+msgid "Your emails" -+msgstr "franklin@goodhorse.idv.tw" -+ -+#: src/convertDlg.cpp:48 -+msgctxt "@item:inlistbox" -+msgid "ImageMagick supported image formats" -+msgstr "ImageMagick 支持的图像格式" -+ -+#: src/convertDlg.cpp:76 -+msgctxt "@info" -+msgid "" -+"Please fill in both <interface>Image</interface> and <interface>Convert To</" -+"interface> fields." -+msgstr "" -+"请填入「<interface>图像</interface>」与「<interface>转换为</interface>」栏" -+"目。" -+ -+#: src/convertDlg.cpp:79 -+msgctxt "@info" -+msgid "" -+"Please fill in both <interface>Width</interface> and <interface>Height</" -+"interface> fields." -+msgstr "" -+"请填入「<interface>宽度</interface>」与「<interface>高度</interface>」栏目。" -+ -+#: src/convertDlg.cpp:82 -+msgctxt "@info" -+msgid "" -+"You do not have write permissions in this directory, please select another " -+"destination." -+msgstr "您没有此目录的写入权限。请选择其他的目标。" -+ -+#: src/helper/helper.cpp:79 -+#, kde-format -+msgctxt "@info" -+msgid "Original configuration file <filename>%1</filename> does not exist." -+msgstr "原始设置文件 <filename>%1</filename> 不存在。" -+ -+#: src/helper/helper.cpp:84 -+#, kde-format -+msgctxt "@info" -+msgid "Cannot remove current configuration file <filename>%1</filename>." -+msgstr "无法移除目前的设置文件 <filename>%1</filename>。" -+ -+#: src/helper/helper.cpp:89 -+#, kde-format -+msgctxt "@info" -+msgid "" -+"Cannot copy original configuration file <filename>%1</filename> to <filename>" -+"%2</filename>." -+msgstr "" -+"无法复制原始设置文件 <filename>%1</filename> 到 <filename>%2</filename>。" -+ -+#: src/helper/helper.cpp:105 -+msgctxt "@info" -+msgid "Failed to create temporary mount point." -+msgstr "建立暂时的挂载点失败。" -+ -+#: src/installDlg.cpp:45 -+msgctxt "@title:window" -+msgid "Install/Recover Bootloader" -+msgstr "安装/恢复启动加载器" -+ -+#: src/installDlg.cpp:98 -+msgctxt "@info" -+msgid "Sorry, you have to select a partition with a proper name!" -+msgstr "抱歉,您必须选择有适当名称的分区。" -+ -+#: src/installDlg.cpp:109 -+msgctxt "@title:window" -+msgid "Installing" -+msgstr "安装中" -+ -+#: src/installDlg.cpp:109 -+msgctxt "@info:progress" -+msgid "Installing GRUB..." -+msgstr "安装 GRUB 中..." -+ -+#: src/installDlg.cpp:120 src/kcm_grub2.cpp:484 -+msgctxt "@title:window" -+msgid "Information" -+msgstr "信息" -+ -+#: src/installDlg.cpp:125 -+msgctxt "@info" -+msgid "Successfully installed GRUB." -+msgstr "已成功安装 GRUB。" -+ -+#: src/installDlg.cpp:127 -+msgctxt "@info" -+msgid "Failed to install GRUB." -+msgstr "安装 GRUB 失败。" -+ -+#: src/kcm_grub2.cpp:62 -+msgctxt "@title" -+msgid "KDE GRUB2 Bootloader Control Module" -+msgstr "KDE GRUB2 启动加载器控制模块" -+ -+#: src/kcm_grub2.cpp:62 -+msgctxt "@title" -+msgid "A KDE Control Module for configuring the GRUB2 bootloader." -+msgstr "设置 GRUB2 启动加载器的 KDE 控制模块" -+ -+#: src/kcm_grub2.cpp:62 -+msgctxt "@info:credit" -+msgid "Copyright (C) 2008-2013 Konstantinos Smanis" -+msgstr "Copyright (C) 2008-2013 Konstantinos Smanis" -+ -+#: src/kcm_grub2.cpp:63 -+msgctxt "@info:credit" -+msgid "Κonstantinos Smanis" -+msgstr "Κonstantinos Smanis" -+ -+#: src/kcm_grub2.cpp:63 -+msgctxt "@info:credit" -+msgid "Main Developer" -+msgstr "主要开发者" -+ -+#: src/kcm_grub2.cpp:89 -+msgctxt "@info" -+msgid "Successfully restored the default values." -+msgstr "已成功恢复预设值。" -+ -+#: src/kcm_grub2.cpp:91 -+msgctxt "@info" -+msgid "Failed to restore the default values." -+msgstr "恢复预设值失败。" -+ -+#: src/kcm_grub2.cpp:472 -+msgctxt "@title:window Verb (gerund). Refers to current status." -+msgid "Saving" -+msgstr "正在储存" -+ -+#: src/kcm_grub2.cpp:472 -+msgctxt "@info:progress" -+msgid "Saving GRUB settings..." -+msgstr "正在储存 GRUB 设置..." -+ -+#: src/kcm_grub2.cpp:489 -+msgctxt "@info" -+msgid "Successfully saved GRUB settings." -+msgstr "已成功储存 GRUB 设置。" -+ -+#: src/kcm_grub2.cpp:492 -+msgctxt "@info" -+msgid "Failed to save GRUB settings." -+msgstr "储存 GRUB 设置失败。" -+ -+#: src/kcm_grub2.cpp:563 src/kcm_grub2.cpp:585 -+msgctxt "@title:window" -+msgid "Enter screen resolution" -+msgstr "输入屏幕分辨率" -+ -+#: src/kcm_grub2.cpp:563 -+msgctxt "@label:textbox" -+msgid "Please enter a GRUB resolution:" -+msgstr "请输入 GRUB 分辨率:" -+ -+#: src/kcm_grub2.cpp:585 -+msgctxt "@label:textbox" -+msgid "Please enter a Linux boot resolution:" -+msgstr "请输入 Linux 开机画面分辨率:" -+ -+#: src/kcm_grub2.cpp:631 -+msgctxt "@info" -+msgid "Press <shortcut>Escape</shortcut> to exit fullscreen mode." -+msgstr "按下 ESC 离开全屏幕模式。" -+ -+#: src/kcm_grub2.cpp:780 src/kcm_grub2.cpp:781 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Black" -+msgstr "黑" -+ -+#: src/kcm_grub2.cpp:782 src/kcm_grub2.cpp:783 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Transparent" -+msgstr "透明" -+ -+#: src/kcm_grub2.cpp:785 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Blue" -+msgstr "蓝" -+ -+#: src/kcm_grub2.cpp:787 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Cyan" -+msgstr "青绿色" -+ -+#: src/kcm_grub2.cpp:789 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Dark Gray" -+msgstr "暗灰色" -+ -+#: src/kcm_grub2.cpp:791 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Green" -+msgstr "绿" -+ -+#: src/kcm_grub2.cpp:793 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Cyan" -+msgstr "浅青色" -+ -+#: src/kcm_grub2.cpp:795 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Blue" -+msgstr "亮蓝色" -+ -+#: src/kcm_grub2.cpp:797 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Green" -+msgstr "浅绿色" -+ -+#: src/kcm_grub2.cpp:799 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Gray" -+msgstr "亮灰色" -+ -+#: src/kcm_grub2.cpp:801 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Magenta" -+msgstr "浅品红色" -+ -+#: src/kcm_grub2.cpp:803 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Light Red" -+msgstr "浅红色" -+ -+#: src/kcm_grub2.cpp:805 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Magenta" -+msgstr "紫红色" -+ -+#: src/kcm_grub2.cpp:807 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Red" -+msgstr "红色" -+ -+#: src/kcm_grub2.cpp:809 -+msgctxt "@item:inlistbox Refers to color." -+msgid "White" -+msgstr "白色" -+ -+#: src/kcm_grub2.cpp:811 -+msgctxt "@item:inlistbox Refers to color." -+msgid "Yellow" -+msgstr "黄色" -+ -+#: src/kcm_grub2.cpp:834 src/kcm_grub2.cpp:843 -+msgctxt "@action:inmenu" -+msgid "Quiet Boot" -+msgstr "安静开机" -+ -+#: src/kcm_grub2.cpp:835 src/kcm_grub2.cpp:844 -+msgctxt "@action:inmenu" -+msgid "Show Splash Screen" -+msgstr "显示欢迎画面" -+ -+#: src/kcm_grub2.cpp:836 src/kcm_grub2.cpp:845 -+msgctxt "@action:inmenu" -+msgid "Disable Plymouth" -+msgstr "关闭 Plymouth" -+ -+#: src/kcm_grub2.cpp:837 src/kcm_grub2.cpp:846 -+msgctxt "@action:inmenu" -+msgid "Turn Off ACPI" -+msgstr "关闭 ACPI" -+ -+#: src/kcm_grub2.cpp:838 src/kcm_grub2.cpp:847 -+msgctxt "@action:inmenu" -+msgid "Turn Off APIC" -+msgstr "关闭 APIC" -+ -+#: src/kcm_grub2.cpp:839 src/kcm_grub2.cpp:848 -+msgctxt "@action:inmenu" -+msgid "Turn Off Local APIC" -+msgstr "关闭本地端 APIC" -+ -+#: src/kcm_grub2.cpp:840 src/kcm_grub2.cpp:849 -+msgctxt "@action:inmenu" -+msgid "Single User Mode" -+msgstr "单一使用者模式" -+ -+#: src/kcm_grub2.cpp:852 src/kcm_grub2.cpp:857 src/kcm_grub2.cpp:864 -+msgctxt "@action:inmenu" -+msgid "PC BIOS && EFI Console" -+msgstr "PC BIOS 与 EFI 主控台" -+ -+#: src/kcm_grub2.cpp:853 src/kcm_grub2.cpp:858 src/kcm_grub2.cpp:865 -+msgctxt "@action:inmenu" -+msgid "Serial Terminal" -+msgstr "序列终端" -+ -+#: src/kcm_grub2.cpp:854 src/kcm_grub2.cpp:859 src/kcm_grub2.cpp:866 -+msgctxt "" -+"@action:inmenu 'Open' is an adjective here, not a verb. 'Open Firmware' is a " -+"former IEEE standard." -+msgid "Open Firmware Console" -+msgstr "开启固件主控台" -+ -+#: src/kcm_grub2.cpp:860 -+msgctxt "@action:inmenu" -+msgid "PC AT Keyboard (Coreboot)" -+msgstr "PC AT 键盘(Coreboot)" -+ -+#: src/kcm_grub2.cpp:861 -+msgctxt "@action:inmenu" -+msgid "USB Keyboard (HID Boot Protocol)" -+msgstr "USB 键盘(HID 开机协定)" -+ -+#: src/kcm_grub2.cpp:867 -+msgctxt "@action:inmenu" -+msgid "Graphics Mode Output" -+msgstr "图形模式输出" -+ -+#: src/kcm_grub2.cpp:868 -+msgctxt "@action:inmenu" -+msgid "VGA Text Output (Coreboot)" -+msgstr "VGA 文字输出(Coreboot)" -+ -+#: src/kcm_grub2.cpp:1063 -+msgctxt "@title:window" -+msgid "Probing devices" -+msgstr "检测设备中" -+ -+#: src/kcm_grub2.cpp:1063 -+msgctxt "@info:progress" -+msgid "Probing devices for their GRUB names..." -+msgstr "检测设备在 GRUB 上的名称中..." -+ -+#: src/kcm_grub2.cpp:1072 -+msgctxt "@info" -+msgid "Failed to get GRUB device names." -+msgstr "取得 GRUB 设备名称失败。" -+ -+#: src/kcm_grub2.cpp:1077 -+msgctxt "@info" -+msgid "Helper returned malformed device list." -+msgstr "协助程序传回不正确的设备列表。" -+ -+#: src/kcm_grub2.cpp:1130 src/kcm_grub2.cpp:1133 -+msgctxt "@item:inlistbox Refers to screen resolution." -+msgid "Custom..." -+msgstr "自定义..." -+ -+#: src/kcm_grub2.cpp:1134 -+msgctxt "@item:inlistbox" -+msgid "Unspecified" -+msgstr "未指定" -+ -+#: src/kcm_grub2.cpp:1135 -+msgctxt "@item:inlistbox" -+msgid "Boot in Text Mode" -+msgstr "以文字模式开机" -+ -+#: src/kcm_grub2.cpp:1136 -+msgctxt "@item:inlistbox" -+msgid "Keep GRUB's Resolution" -+msgstr "保持 GRUB 的分辨率" -+ -+#: src/kcm_grub2.cpp:1162 -+msgctxt "@info" -+msgid "The process could not be started." -+msgstr "无法启动进程。" -+ -+#: src/kcm_grub2.cpp:1165 -+msgctxt "@info" -+msgid "The process crashed." -+msgstr "进程已崩溃。" -+ -+#: src/kcm_grub2.cpp:1172 -+#, kde-format -+msgctxt "@info" -+msgid "" -+"Command: <command>%1</command><nl/>Error code: <numid>%2</numid><nl/>Error " -+"message:<nl/><message>%3</message>" -+msgstr "" -+"命令:<command>%1</command><nl/>错误代码:<numid>%2</numid><nl/>错误信息:" -+"<nl/><message>%3</message>" -+ -+#: src/qPkBackend.cpp:31 -+msgctxt "This is when the transaction status is not known" -+msgid "Unknown state" -+msgstr "未知状态" -+ -+#: src/qPkBackend.cpp:34 -+msgctxt "transaction state, the daemon is in the process of starting" -+msgid "Waiting for service to start" -+msgstr "等待服务启动中" -+ -+#: src/qPkBackend.cpp:37 -+msgctxt "transaction state, the transaction is waiting for another to complete" -+msgid "Waiting for other tasks" -+msgstr "等待其它任务中" -+ -+#: src/qPkBackend.cpp:40 -+msgctxt "transaction state, just started" -+msgid "Running task" -+msgstr "执行任务中" -+ -+#: src/qPkBackend.cpp:43 -+msgctxt "transaction state, is querying data" -+msgid "Querying" -+msgstr "查询中" -+ -+#: src/qPkBackend.cpp:46 -+msgctxt "transaction state, getting data from a server" -+msgid "Getting information" -+msgstr "取得信息中" -+ -+#: src/qPkBackend.cpp:49 -+msgctxt "transaction state, removing packages" -+msgid "Removing packages" -+msgstr "移除包中" -+ -+#: src/qPkBackend.cpp:52 -+msgctxt "transaction state, downloading package files" -+msgid "Downloading packages" -+msgstr "下载包中" -+ -+#: src/qPkBackend.cpp:55 -+msgctxt "transaction state, installing packages" -+msgid "Installing packages" -+msgstr "安装包中" -+ -+#: src/qPkBackend.cpp:58 -+msgctxt "transaction state, refreshing internal lists" -+msgid "Refreshing software list" -+msgstr "刷新软件列表" -+ -+#: src/qPkBackend.cpp:61 -+msgctxt "transaction state, installing updates" -+msgid "Updating packages" -+msgstr "更新包中" -+ -+#: src/qPkBackend.cpp:64 -+msgctxt "transaction state, removing old packages, and cleaning config files" -+msgid "Cleaning up packages" -+msgstr "清除包中" -+ -+#: src/qPkBackend.cpp:67 -+msgctxt "transaction state, obsoleting old packages" -+msgid "Obsoleting packages" -+msgstr "废弃旧包中" -+ -+#: src/qPkBackend.cpp:70 -+msgctxt "transaction state, checking the transaction before we do it" -+msgid "Resolving dependencies" -+msgstr "解决依赖问题中" -+ -+#: src/qPkBackend.cpp:73 -+msgctxt "" -+"transaction state, checking if we have all the security keys for the " -+"operation" -+msgid "Checking signatures" -+msgstr "检查签名中" -+ -+#: src/qPkBackend.cpp:76 -+msgctxt "transaction state, when we return to a previous system state" -+msgid "Rolling back" -+msgstr "恢复先前状态中" -+ -+#: src/qPkBackend.cpp:79 -+msgctxt "transaction state, when we're doing a test transaction" -+msgid "Testing changes" -+msgstr "测试变更中" -+ -+#: src/qPkBackend.cpp:82 -+msgctxt "transaction state, when we're writing to the system package database" -+msgid "Committing changes" -+msgstr "提交变更中" -+ -+#: src/qPkBackend.cpp:85 -+msgctxt "transaction state, requesting data from a server" -+msgid "Requesting data" -+msgstr "请求数据中" -+ -+#: src/qPkBackend.cpp:88 -+msgctxt "transaction state, all done!" -+msgid "Finished" -+msgstr "已完成" -+ -+#: src/qPkBackend.cpp:91 -+msgctxt "transaction state, in the process of cancelling" -+msgid "Cancelling" -+msgstr "取消中" -+ -+#: src/qPkBackend.cpp:94 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading repository information" -+msgstr "下载主目录信息中" -+ -+#: src/qPkBackend.cpp:97 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading list of packages" -+msgstr "下载包列表中" -+ -+#: src/qPkBackend.cpp:100 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading file lists" -+msgstr "下载文件列表中" -+ -+#: src/qPkBackend.cpp:103 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading lists of changes" -+msgstr "下载变更列表中" -+ -+#: src/qPkBackend.cpp:106 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading groups" -+msgstr "下载群组中" -+ -+#: src/qPkBackend.cpp:109 -+msgctxt "transaction state, downloading metadata" -+msgid "Downloading update information" -+msgstr "下载更新信息中" -+ -+#: src/qPkBackend.cpp:112 -+msgctxt "transaction state, repackaging delta files" -+msgid "Repackaging files" -+msgstr "重新打包文件中" -+ -+#: src/qPkBackend.cpp:115 -+msgctxt "transaction state, loading databases" -+msgid "Loading cache" -+msgstr "载入缓存中" -+ -+#: src/qPkBackend.cpp:118 -+msgctxt "transaction state, scanning for running processes" -+msgid "Scanning installed applications" -+msgstr "扫描已安装应用程序中" -+ -+#: src/qPkBackend.cpp:121 -+msgctxt "" -+"transaction state, generating a list of packages installed on the system" -+msgid "Generating package lists" -+msgstr "产生包列表中" -+ -+#: src/qPkBackend.cpp:124 -+msgctxt "transaction state, when we're waiting for the native tools to exit" -+msgid "Waiting for package manager lock" -+msgstr "等待包管理员锁定中" -+ -+#: src/qPkBackend.cpp:127 -+msgctxt "waiting for user to type in a password" -+msgid "Waiting for authentication" -+msgstr "等待认证中" -+ -+#: src/qPkBackend.cpp:130 -+msgctxt "we are updating the list of processes" -+msgid "Updating the list of running applications" -+msgstr "更新正在执行的应用程序列表中" -+ -+#: src/qPkBackend.cpp:133 -+msgctxt "we are checking executable files in use" -+msgid "Checking for applications currently in use" -+msgstr "检查目前使用的应用程序中" -+ -+#: src/qPkBackend.cpp:136 -+msgctxt "we are checking for libraries in use" -+msgid "Checking for libraries currently in use" -+msgstr "检查目前使用的函式库中" -+ -+#: src/qPkBackend.cpp:139 -+msgctxt "we are copying package files to prepare to install" -+msgid "Copying files" -+msgstr "复制文件中" -+ -+#: src/removeDlg.cpp:46 -+msgctxt "@title:window" -+msgid "Remove Old Entries" -+msgstr "移除旧项目" -+ -+#: src/removeDlg.cpp:60 -+msgctxt "@title:window" -+msgid "Finding Old Entries" -+msgstr "寻找旧项目中" -+ -+#: src/removeDlg.cpp:60 -+msgctxt "@info:progress" -+msgid "Finding Old Entries..." -+msgstr "寻找旧项目中..." -+ -+#: src/removeDlg.cpp:86 -+#, kde-format -+msgctxt "@item:inlistbox" -+msgid "Kernel %1" -+msgstr "内核 %1" -+ -+#: src/removeDlg.cpp:102 -+msgctxt "@info" -+msgid "No removable entries were found." -+msgstr "没有找到可移除的项目。" -+ -+#: src/removeDlg.cpp:124 -+msgctxt "@info" -+msgid "Are you sure you want to remove the following packages?" -+msgstr "您确定您要移除以下的包吗?" -+ -+#: src/removeDlg.cpp:148 -+msgctxt "@title:window" -+msgid "Removing Old Entries" -+msgstr "移除旧项目中" -+ -+#: src/removeDlg.cpp:161 -+msgctxt "@info" -+msgid "Package removal failed." -+msgstr "移除包失败。" -+ -+#. i18n: ectx: property (text), widget (QLabel, label) -+#: ui/convertDlg.ui:19 -+msgctxt "@label:textbox" -+msgid "Image:" -+msgstr "图像:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_2) -+#: ui/convertDlg.ui:29 -+msgctxt "@label:textbox" -+msgid "Convert To:" -+msgstr "转换为:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -+#: ui/convertDlg.ui:41 -+msgctxt "@title:group" -+msgid "Conversion Options" -+msgstr "转换选项" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_3) -+#: ui/convertDlg.ui:47 -+msgctxt "@label:spinbox" -+msgid "Width:" -+msgstr "宽度:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_4) -+#: ui/convertDlg.ui:61 -+msgctxt "@label:spinbox" -+msgid "Height:" -+msgstr "高度:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_5) -+#: ui/convertDlg.ui:75 -+msgctxt "@option:check" -+msgid "Force resolution:" -+msgstr "强制设置分辨率:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_6) -+#: ui/convertDlg.ui:85 -+msgctxt "@option:check" -+msgid "Set As GRUB Wallpaper:" -+msgstr "设为 GRUB 桌面:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label) -+#: ui/installDlg.ui:17 -+msgctxt "@label:listbox" -+msgid "Select partition to install/recover GRUB:" -+msgstr "选择要安装/恢复 GRUB 的分区:" -+ -+#. i18n: ectx: property (text), widget (QTreeWidget, treeWidget_recover) -+#: ui/installDlg.ui:48 -+msgctxt "@title:column" -+msgid "Partition" -+msgstr "分区" -+ -+#. i18n: ectx: property (text), widget (QTreeWidget, treeWidget_recover) -+#: ui/installDlg.ui:53 -+msgctxt "@title:column" -+msgid "Mountpoint" -+msgstr "挂载点" -+ -+#. i18n: ectx: property (text), widget (QTreeWidget, treeWidget_recover) -+#: ui/installDlg.ui:58 -+msgctxt "@title:column" -+msgid "Label" -+msgstr "标签" -+ -+#. i18n: ectx: property (text), widget (QTreeWidget, treeWidget_recover) -+#: ui/installDlg.ui:63 -+msgctxt "@title:column" -+msgid "File System" -+msgstr "文件系统" -+ -+#. i18n: ectx: property (text), widget (QTreeWidget, treeWidget_recover) -+#: ui/installDlg.ui:68 -+msgctxt "@title:column" -+msgid "Size" -+msgstr "大小" -+ -+#. i18n: ectx: property (toolTip), widget (QCheckBox, checkBox_partition) -+#: ui/installDlg.ui:76 -+msgctxt "@info:tooltip" -+msgid "" -+"Install the bootloader on the boot sector of the selected partition instead " -+"of the MBR(=Master Boot Sector). Not recommended." -+msgstr "安装启动加载器到选取的分区的开机分区,而不是安装到 MBR。不建议如此。" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_partition) -+#: ui/installDlg.ui:79 -+msgctxt "@option:check" -+msgid "Install on partition instead of MBR (Advanced)" -+msgstr "安装在分区而非 MBR(进阶)" -+ -+#. i18n: ectx: attribute (title), widget (QWidget, tab) -+#: ui/kcm_grub2.ui:21 -+msgctxt "@title:tab Refers to settings." -+msgid "General" -+msgstr "一般" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_timeout) -+#: ui/kcm_grub2.ui:27 -+msgctxt "@title:group" -+msgid "Timeout" -+msgstr "超时" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_hiddenTimeout) -+#: ui/kcm_grub2.ui:35 -+msgctxt "@option:check" -+msgid "Hide the menu for:" -+msgstr "隐藏选单多久:" -+ -+#. i18n: ectx: property (suffix), widget (QSpinBox, spinBox_hiddenTimeout) -+#. i18n: ectx: property (suffix), widget (QSpinBox, spinBox_timeout) -+#: ui/kcm_grub2.ui:45 ui/kcm_grub2.ui:144 -+msgctxt "@label:spinbox seconds (suffix)" -+msgid "s" -+msgstr "秒" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_hiddenTimeoutShowTimer) -+#: ui/kcm_grub2.ui:76 -+msgctxt "@option:check" -+msgid "Show countdown timer" -+msgstr "显示倒数计时器" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_timeout) -+#: ui/kcm_grub2.ui:83 -+msgctxt "@option:check" -+msgid "Automatically boot the default entry after showing the menu" -+msgstr "显示选单后自动以预设的项目开机" -+ -+#. i18n: ectx: property (text), widget (QRadioButton, radioButton_timeout0) -+#: ui/kcm_grub2.ui:106 -+msgctxt "@option:radio" -+msgid "Immediately" -+msgstr "立即" -+ -+#. i18n: ectx: property (text), widget (QRadioButton, radioButton_timeout) -+#: ui/kcm_grub2.ui:131 -+msgctxt "@option:radio" -+msgid "After:" -+msgstr "多久之后:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_entries) -+#: ui/kcm_grub2.ui:172 -+msgctxt "@title:group" -+msgid "Generated Entries" -+msgstr "产生的项目" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_recovery) -+#: ui/kcm_grub2.ui:178 -+msgctxt "@option:check" -+msgid "Generate recovery entries" -+msgstr "产生救援的选项" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_memtest) -+#: ui/kcm_grub2.ui:185 -+msgctxt "@option:check" -+msgid "Generate memtest entries" -+msgstr "产生内存测试的选项" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_osProber) -+#: ui/kcm_grub2.ui:192 -+msgctxt "@option:check" -+msgid "Probe for operating systems" -+msgstr "检测操作系统" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_default) -+#: ui/kcm_grub2.ui:202 -+msgctxt "@title:group" -+msgid "Default Entry" -+msgstr "预设项目" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_default) -+#: ui/kcm_grub2.ui:208 -+msgctxt "@label:listbox" -+msgid "Default Entry:" -+msgstr "预设项目:" -+ -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_remove) -+#: ui/kcm_grub2.ui:224 -+msgctxt "@action:button" -+msgid "Remove Old Entries" -+msgstr "移除旧项目" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_savedefault) -+#: ui/kcm_grub2.ui:233 -+msgctxt "@option:check" -+msgid "The next booted entry will become default" -+msgstr "下一个开机项目会成为预设值" -+ -+#. i18n: ectx: attribute (title), widget (QWidget, tab_3) -+#: ui/kcm_grub2.ui:244 -+msgctxt "@title:tab" -+msgid "Appearance" -+msgstr "外观" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_resolutions) -+#: ui/kcm_grub2.ui:250 -+msgctxt "@title:group" -+msgid "Resolutions" -+msgstr "分辨率" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_gfxmode) -+#: ui/kcm_grub2.ui:256 -+msgctxt "@label:listbox" -+msgid "GRUB:" -+msgstr "GRUB:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_gfxpayload) -+#: ui/kcm_grub2.ui:270 -+msgctxt "@label:listbox" -+msgid "Linux Kernel:" -+msgstr "Linux 内核:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_colors) -+#: ui/kcm_grub2.ui:287 -+msgctxt "@title:group" -+msgid "Colors" -+msgstr "颜色" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_normalForeground) -+#: ui/kcm_grub2.ui:295 -+msgctxt "@label:chooser" -+msgid "Normal Foreground (Text):" -+msgstr "正常前景(文字):" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_highlightForeground) -+#: ui/kcm_grub2.ui:305 -+msgctxt "@label:chooser" -+msgid "Highlight Foreground (Text):" -+msgstr "突显的前景(文字):" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_normalBackground) -+#: ui/kcm_grub2.ui:319 -+msgctxt "@label:chooser" -+msgid "Normal Background:" -+msgstr "正常背景:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_highlightBackground) -+#: ui/kcm_grub2.ui:329 -+msgctxt "@label:chooser" -+msgid "Highlight Background:" -+msgstr "突显的背景:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_background) -+#: ui/kcm_grub2.ui:344 -+msgctxt "@title:group Refers to the image shown behind the boot menu." -+msgid "Background" -+msgstr "背景" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_background) -+#: ui/kcm_grub2.ui:350 -+msgctxt "@label:textbox" -+msgid "Wallpaper:" -+msgstr "桌面:" -+ -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_preview) -+#: ui/kcm_grub2.ui:362 -+msgctxt "@action:button" -+msgid "Preview" -+msgstr "预览" -+ -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_create) -+#: ui/kcm_grub2.ui:369 -+msgctxt "@action:button" -+msgid "Create" -+msgstr "建立" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_theme) -+#: ui/kcm_grub2.ui:378 -+msgctxt "@label:textbox" -+msgid "Theme:" -+msgstr "主题:" -+ -+#. i18n: ectx: attribute (title), widget (QWidget, tab_2) -+#: ui/kcm_grub2.ui:405 -+msgctxt "@title:tab Refers to settings." -+msgid "Advanced" -+msgstr "进阶" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_linux) -+#: ui/kcm_grub2.ui:411 -+msgctxt "@title:group" -+msgid "Linux Kernel Arguments" -+msgstr "Linux 内核参数" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_cmdlineDefault) -+#: ui/kcm_grub2.ui:417 -+msgctxt "@label:textbox" -+msgid "Normal Entries:" -+msgstr "正常的项目:" -+ -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_cmdlineDefaultSuggestions) -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_cmdlineSuggestions) -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_terminalSuggestions) -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_terminalInputSuggestions) -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_terminalOutputSuggestions) -+#: ui/kcm_grub2.ui:429 ui/kcm_grub2.ui:450 ui/kcm_grub2.ui:480 -+#: ui/kcm_grub2.ui:501 ui/kcm_grub2.ui:522 -+msgctxt "@action:button" -+msgid "Suggestions" -+msgstr "建议" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_cmdline) -+#: ui/kcm_grub2.ui:438 -+msgctxt "@label:textbox" -+msgid "All Entries:" -+msgstr "所有的项目:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_terminal) -+#: ui/kcm_grub2.ui:462 -+msgctxt "@title:group Noun." -+msgid "Terminal" -+msgstr "终端" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_terminal) -+#: ui/kcm_grub2.ui:468 -+msgctxt "@label:textbox Noun." -+msgid "Terminal:" -+msgstr "终端:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_terminalInput) -+#: ui/kcm_grub2.ui:489 -+msgctxt "@label:textbox" -+msgid "Input Terminal:" -+msgstr "输入终端:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_terminalOutput) -+#: ui/kcm_grub2.ui:510 -+msgctxt "@label:textbox" -+msgid "Output Terminal:" -+msgstr "输出终端:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_other) -+#: ui/kcm_grub2.ui:534 -+msgctxt "@title:group Refers to settings." -+msgid "Other" -+msgstr "其他" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_distributor) -+#: ui/kcm_grub2.ui:540 -+msgctxt "@label:textbox" -+msgid "Distributor:" -+msgstr "发布者:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_serial) -+#: ui/kcm_grub2.ui:550 -+msgctxt "@label:textbox" -+msgid "Serial Command:" -+msgstr "序列命令:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_initTune) -+#: ui/kcm_grub2.ui:560 -+msgctxt "@label:textbox" -+msgid "Init Tune:" -+msgstr "初始化调整:" -+ -+#. i18n: ectx: property (text), widget (QLabel, label_uuid) -+#: ui/kcm_grub2.ui:570 -+msgctxt "@option:check" -+msgid "Enable UUIDs:" -+msgstr "开启 UUID:" -+ -+#. i18n: ectx: property (title), widget (QGroupBox, groupBox_tools) -+#: ui/kcm_grub2.ui:596 -+msgctxt "@title:group" -+msgid "Tools" -+msgstr "工具" -+ -+#. i18n: ectx: property (text), widget (KPushButton, kpushbutton_install) -+#: ui/kcm_grub2.ui:608 -+msgctxt "@action:button" -+msgid "Install/Recover Bootloader" -+msgstr "安装/恢复启动加载器" -+ -+#. i18n: ectx: property (text), widget (QLabel, label) -+#: ui/removeDlg.ui:17 -+msgctxt "@label:listbox" -+msgid "Select entries to remove:" -+msgstr "选择要移除的项目:" -+ -+#. i18n: ectx: property (toolTip), widget (QCheckBox, checkBox_headers) -+#: ui/removeDlg.ui:34 -+msgctxt "@info:tooltip" -+msgid "Remove associated kernel header files." -+msgstr "移除相关的内核头文件。" -+ -+#. i18n: ectx: property (text), widget (QCheckBox, checkBox_headers) -+#: ui/removeDlg.ui:37 -+msgctxt "@option:check" -+msgid "Also remove associated old packages" -+msgstr "同时移除相关的旧包" -+ -+#~ msgctxt "@info" -+#~ msgid "No valid GRUB2/BURG installation could be detected!" -+#~ msgstr "没检测到任何合法的 GRUB2/BURG 安装。" -+ -+#~ msgctxt "@action:button" -+#~ msgid "Reload Configuration" -+#~ msgstr "重新载入设置" -+ -+#~ msgctxt "@item:inlistbox" -+#~ msgid "Image" -+#~ msgstr "图像" -+ -+#~ msgctxt "@info" -+#~ msgid "Could not locate <command>%1</command> executable." -+#~ msgstr "找不到 <command>%1</command> 执行档。" -+ -+#~ msgid "Path of the GRUB menu file." -+#~ msgstr "GRUB 选单文件路径。" -+ -+#~ msgid "Path of the GRUB configuration file." -+#~ msgstr "GRUB 设置文件路径。" -+ -+#~ msgid "Path of the GRUB environment file." -+#~ msgstr "GRUB 环境文件路径。" -+ -+#~ msgid "Path of the GRUB memtest script." -+#~ msgstr "GRUB 内存测试脚本路径。" -+ -+#~ msgctxt "@info" -+#~ msgid "" -+#~ "Some necessary GRUB configuration files are missing/invalid.<br/>Please " -+#~ "select an action:" -+#~ msgstr "有些必要的 GRUB 设置文件不见了,或是不正确。<br/>请选择一个动作:" -+ -+#~ msgctxt "@option:radio" -+#~ msgid "Recover GRUB from a previous installation" -+#~ msgstr "从前一次安装恢复 GRUB" -+ -+#~ msgctxt "@option:radio" -+#~ msgid "Manually browse for GRUB configuration files" -+#~ msgstr "手动浏览选择 GRUB 设置文件" -+ -+#~ msgctxt "@label:textbox" -+#~ msgid "GRUB Menu File:" -+#~ msgstr "GRUB 选单文件:" -+ -+#~ msgctxt "@label:textbox" -+#~ msgid "GRUB Environment File:" -+#~ msgstr "GRUB 环境文件:" -+ -+#~ msgctxt "@label:textbox" -+#~ msgid "GRUB Memtest Script:" -+#~ msgstr "GRUB 内存测试脚本:" -+ -+#~ msgctxt "@info" -+#~ msgid "This is your current kernel!<br/>Are you sure you want to remove it?" -+#~ msgstr "这是您目前在使用的内核!<br/>您确定要移除它吗?" -+ -+#~ msgid "%1 GiB" -+#~ msgstr "%1 GB" diff --git a/port_to_kf5.patch b/port_to_kf5.patch deleted file mode 100644 index 31e57d74f9ba..000000000000 --- a/port_to_kf5.patch +++ /dev/null @@ -1,2155 +0,0 @@ -diff -Naur a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2013-10-12 18:34:15.000000000 +0800 -+++ b/CMakeLists.txt 2015-12-04 11:57:10.170563874 +0800 -@@ -1,31 +1,46 @@ -+cmake_minimum_required( VERSION 2.8.12 ) -+cmake_policy(SET CMP0002 OLD) -+cmake_policy(SET CMP0014 OLD) -+ - project(kcm-grub2) - set(KCM_GRUB2_VERSION_MAJOR "0") - set(KCM_GRUB2_VERSION_MINOR "5") - set(KCM_GRUB2_VERSION_PATCH "8") - set(KCM_GRUB2_VERSION "${KCM_GRUB2_VERSION_MAJOR}.${KCM_GRUB2_VERSION_MINOR}.${KCM_GRUB2_VERSION_PATCH}") -+set(KDE_ENABLE_EXCEPTIONS "-fexceptions -UQT_NO_EXCEPTIONS") -+ -+find_package(ECM 0.0.11 REQUIRED NO_MODULE) -+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake/modules) -+ -+include(KDEInstallDirs) -+include(KDECMakeSettings) -+include(KDECompilerSettings) -+include(FeatureSummary) -+ -+find_package(Qt5 REQUIRED COMPONENTS Widgets DBus) -+find_package(KF5 REQUIRED COMPONENTS CoreAddons I18n Auth ConfigWidgets KIO Solid) # - --set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) - --find_package(Qt4 4.6.0 REQUIRED) --find_package(KDE4 4.4.0 REQUIRED) --include(KDE4Defaults) - include(GRUBPaths) - -+include(MacroLogFeature) -+include(MacroBoolTo01) -+ - add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0) - --macro_optional_find_package(ImageMagick COMPONENTS Magick++ MagickCore) -+find_package(ImageMagick COMPONENTS Magick++ MagickCore) - macro_log_feature(ImageMagick_FOUND "ImageMagick" "Create splash images compatible with GRUB2" "http://www.imagemagick.org/" FALSE "" "") - macro_bool_to_01(ImageMagick_FOUND HAVE_IMAGEMAGICK) - --macro_optional_find_package(HD) -+find_package(HD) - macro_log_feature(HD_FOUND "hwinfo" "Retrieve list of resolutions valid in GRUB2" "http://www.opensuse.org/" FALSE "" "") - macro_bool_to_01(HD_FOUND HAVE_HD) - --macro_optional_find_package(QApt) -+find_package(QApt) - macro_log_feature(QAPT_FOUND "LibQApt" "Remove unneeded old entries (qapt backend)" "https://projects.kde.org/projects/extragear/sysadmin/libqapt/" FALSE "" "") - macro_bool_to_01(QAPT_FOUND HAVE_QAPT) - --macro_optional_find_package(QPackageKit) -+find_package(QPackageKit) - macro_log_feature(QPACKAGEKIT_FOUND "QPackageKit" "Remove unneeded old entries (qpackagekit backend)" "http://www.packagekit.org/" FALSE "" "") - macro_bool_to_01(QPACKAGEKIT_FOUND HAVE_QPACKAGEKIT) - -diff -Naur a/cmake/modules/FindMsgfmt.cmake b/cmake/modules/FindMsgfmt.cmake ---- a/cmake/modules/FindMsgfmt.cmake 1970-01-01 08:00:00.000000000 +0800 -+++ b/cmake/modules/FindMsgfmt.cmake 2015-12-04 11:57:10.171563911 +0800 -@@ -0,0 +1,28 @@ -+# - Try to find msgfmt -+# Once done this will define -+# -+# MSGFMT_FOUND - system has msgfmt -+ -+# Copyright (c) 2007, Montel Laurent <montel@kde.org> -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+### TODO: KDE4 needs msgfmt of version 0.15 or greater (cf. msgfmt --version ) -+ -+if(MSGFMT_EXECUTABLE) -+ set(MSGFMT_FOUND TRUE) -+else(MSGFMT_EXECUTABLE) -+ -+ FIND_PROGRAM(MSGFMT_EXECUTABLE NAMES msgfmt) -+ if (MSGFMT_EXECUTABLE) -+ set(MSGFMT_FOUND TRUE) -+ else (MSGFMT_EXECUTABLE) -+ if (Msgfmt_FIND_REQUIRED) -+ message(SEND_ERROR "Could NOT find msgfmt program") -+ endif (Msgfmt_FIND_REQUIRED) -+ endif (MSGFMT_EXECUTABLE) -+ MARK_AS_ADVANCED(MSGFMT_EXECUTABLE) -+ -+endif (MSGFMT_EXECUTABLE) -+ -diff -Naur a/cmake/modules/MacroBoolTo01.cmake b/cmake/modules/MacroBoolTo01.cmake ---- a/cmake/modules/MacroBoolTo01.cmake 1970-01-01 08:00:00.000000000 +0800 -+++ b/cmake/modules/MacroBoolTo01.cmake 2015-12-04 11:57:10.171563911 +0800 -@@ -0,0 +1,20 @@ -+# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN ) -+# This macro evaluates its first argument -+# and sets all the given vaiables either to 0 or 1 -+# depending on the value of the first one -+ -+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+ -+MACRO(MACRO_BOOL_TO_01 FOUND_VAR ) -+ FOREACH (_current_VAR ${ARGN}) -+ IF(${FOUND_VAR}) -+ SET(${_current_VAR} 1) -+ ELSE(${FOUND_VAR}) -+ SET(${_current_VAR} 0) -+ ENDIF(${FOUND_VAR}) -+ ENDFOREACH(_current_VAR) -+ENDMACRO(MACRO_BOOL_TO_01) -diff -Naur a/cmake/modules/MacroLogFeature.cmake b/cmake/modules/MacroLogFeature.cmake ---- a/cmake/modules/MacroLogFeature.cmake 1970-01-01 08:00:00.000000000 +0800 -+++ b/cmake/modules/MacroLogFeature.cmake 2015-12-04 11:57:10.172563947 +0800 -@@ -0,0 +1,157 @@ -+# This file defines the Feature Logging macros. -+# -+# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]]) -+# Logs the information so that it can be displayed at the end -+# of the configure run -+# VAR : TRUE or FALSE, indicating whether the feature is supported -+# FEATURE: name of the feature, e.g. "libjpeg" -+# DESCRIPTION: description what this feature provides -+# URL: home page -+# REQUIRED: TRUE or FALSE, indicating whether the featue is required -+# MIN_VERSION: minimum version number. empty string if unneeded -+# COMMENTS: More info you may want to provide. empty string if unnecessary -+# -+# MACRO_DISPLAY_FEATURE_LOG() -+# Call this to display the collected results. -+# Exits CMake with a FATAL error message if a required feature is missing -+# -+# Example: -+# -+# INCLUDE(MacroLogFeature) -+# -+# FIND_PACKAGE(JPEG) -+# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "") -+# ... -+# MACRO_DISPLAY_FEATURE_LOG() -+ -+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -+# Copyright (c) 2006, Allen Winter, <winter@kde.org> -+# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org> -+# -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+ -+IF (NOT _macroLogFeatureAlreadyIncluded) -+ SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt) -+ IF (EXISTS ${_file}) -+ FILE(REMOVE ${_file}) -+ ENDIF (EXISTS ${_file}) -+ -+ SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) -+ IF (EXISTS ${_file}) -+ FILE(REMOVE ${_file}) -+ ENDIF (EXISTS ${_file}) -+ -+ SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) -+ IF (EXISTS ${_file}) -+ FILE(REMOVE ${_file}) -+ ENDIF (EXISTS ${_file}) -+ -+ SET(_macroLogFeatureAlreadyIncluded TRUE) -+ -+ INCLUDE(FeatureSummary) -+ -+ENDIF (NOT _macroLogFeatureAlreadyIncluded) -+ -+ -+MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments) -+ -+ STRING(TOUPPER "${ARGV4}" _required) -+ SET(_minvers "${ARGV5}") -+ SET(_comments "${ARGV6}") -+ -+ IF (${_var}) -+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) -+ ELSE (${_var}) -+ IF ("${_required}" STREQUAL "TRUE") -+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt) -+ ELSE ("${_required}" STREQUAL "TRUE") -+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) -+ ENDIF ("${_required}" STREQUAL "TRUE") -+ ENDIF (${_var}) -+ -+ SET(_logtext " * ${_package}") -+ -+ IF (NOT ${_var}) -+ IF (${_minvers} MATCHES ".*") -+ SET(_logtext "${_logtext} (${_minvers} or higher)") -+ ENDIF (${_minvers} MATCHES ".*") -+ SET(_logtext "${_logtext} <${_url}>\n ") -+ ELSE (NOT ${_var}) -+ SET(_logtext "${_logtext} - ") -+ ENDIF (NOT ${_var}) -+ -+ SET(_logtext "${_logtext}${_description}") -+ -+ IF (NOT ${_var}) -+ IF (${_comments} MATCHES ".*") -+ SET(_logtext "${_logtext}\n ${_comments}") -+ ENDIF (${_comments} MATCHES ".*") -+# SET(_logtext "${_logtext}\n") #double-space missing features? -+ ENDIF (NOT ${_var}) -+ -+ FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n") -+ -+ IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3 -+ SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"") -+ ENDIF(COMMAND SET_PACKAGE_INFO) -+ -+ENDMACRO(MACRO_LOG_FEATURE) -+ -+ -+MACRO(MACRO_DISPLAY_FEATURE_LOG) -+ IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3 -+ FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt -+ WHAT ALL) -+ ENDIF(COMMAND FEATURE_SUMMARY) -+ -+ SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt) -+ SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) -+ SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) -+ -+ IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile}) -+ SET(_printSummary TRUE) -+ ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile}) -+ -+ IF(_printSummary) -+ SET(_missingDeps 0) -+ IF (EXISTS ${_enabledFile}) -+ FILE(READ ${_enabledFile} _enabled) -+ FILE(REMOVE ${_enabledFile}) -+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}") -+ ENDIF (EXISTS ${_enabledFile}) -+ -+ -+ IF (EXISTS ${_disabledFile}) -+ SET(_missingDeps 1) -+ FILE(READ ${_disabledFile} _disabled) -+ FILE(REMOVE ${_disabledFile}) -+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}") -+ ENDIF (EXISTS ${_disabledFile}) -+ -+ -+ IF (EXISTS ${_missingFile}) -+ SET(_missingDeps 1) -+ FILE(READ ${_missingFile} _requirements) -+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}") -+ FILE(REMOVE ${_missingFile}) -+ SET(_haveMissingReq 1) -+ ENDIF (EXISTS ${_missingFile}) -+ -+ -+ IF (NOT ${_missingDeps}) -+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.") -+ ENDIF (NOT ${_missingDeps}) -+ -+ -+ MESSAGE(${_summary}) -+ MESSAGE("-----------------------------------------------------------------------------\n") -+ -+ -+ IF(_haveMissingReq) -+ MESSAGE(FATAL_ERROR "Exiting: Missing Requirements") -+ ENDIF(_haveMissingReq) -+ -+ ENDIF(_printSummary) -+ -+ENDMACRO(MACRO_DISPLAY_FEATURE_LOG) -diff -Naur a/config.h.cmake b/config.h.cmake ---- a/config.h.cmake 2013-10-12 18:34:15.000000000 +0800 -+++ b/config.h.cmake 2015-12-04 11:59:00.128528653 +0800 -@@ -18,6 +18,12 @@ - #define GRUB_ENV "@GRUB_ENV@" - #define GRUB_MEMTEST "@GRUB_MEMTEST@" - -+enum actionType { -+ actionLoad, -+ actionProbe, -+ actionProbevbe -+}; -+ - enum GrubFile { - GrubMenuFile, - GrubConfigurationFile, -diff -Naur a/other/kcm_grub2.desktop b/other/kcm_grub2.desktop ---- a/other/kcm_grub2.desktop 2013-10-12 18:34:15.000000000 +0800 -+++ b/other/kcm_grub2.desktop 2015-12-04 11:57:10.173563983 +0800 -@@ -2,12 +2,12 @@ - Icon=system-reboot - Type=Service - X-KDE-ServiceTypes=KCModule --Exec=kcmshell4 kcm_grub2 -+Exec=kcmshell5 kcm_grub2 - - X-KDE-Library=kcm_grub2 - X-KDE-ParentApp=kcontrol - --X-KDE-System-Settings-Parent-Category=startup-and-shutdown -+X-KDE-System-Settings-Parent-Category=session - - Name=GRUB2 Bootloader - Name[bs]=GRUB2 pokretač sistemar -diff -Naur a/po/ca/CMakeLists.txt b/po/ca/CMakeLists.txt ---- a/po/ca/CMakeLists.txt 2013-10-12 18:34:24.000000000 +0800 -+++ b/po/ca/CMakeLists.txt 2015-12-04 11:57:10.173563983 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( ca ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( ca ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/ca@valencia/CMakeLists.txt b/po/ca@valencia/CMakeLists.txt ---- a/po/ca@valencia/CMakeLists.txt 2013-10-12 18:34:25.000000000 +0800 -+++ b/po/ca@valencia/CMakeLists.txt 2015-12-04 11:57:10.174564019 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( ca@valencia ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( ca@valencia ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/cs/CMakeLists.txt b/po/cs/CMakeLists.txt ---- a/po/cs/CMakeLists.txt 2013-10-12 18:34:26.000000000 +0800 -+++ b/po/cs/CMakeLists.txt 2015-12-04 11:57:10.174564019 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( cs ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( cs ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/da/CMakeLists.txt b/po/da/CMakeLists.txt ---- a/po/da/CMakeLists.txt 2013-10-12 18:34:29.000000000 +0800 -+++ b/po/da/CMakeLists.txt 2015-12-04 11:57:10.175564056 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( da ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( da ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/de/CMakeLists.txt b/po/de/CMakeLists.txt ---- a/po/de/CMakeLists.txt 2013-10-12 18:34:30.000000000 +0800 -+++ b/po/de/CMakeLists.txt 2015-12-04 11:57:10.175564056 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( de ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( de ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/el/CMakeLists.txt b/po/el/CMakeLists.txt ---- a/po/el/CMakeLists.txt 2013-10-12 18:34:31.000000000 +0800 -+++ b/po/el/CMakeLists.txt 2015-12-04 11:57:10.176564092 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( el ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( el ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/es/CMakeLists.txt b/po/es/CMakeLists.txt ---- a/po/es/CMakeLists.txt 2013-10-12 18:34:34.000000000 +0800 -+++ b/po/es/CMakeLists.txt 2015-12-04 11:57:10.176564092 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( es ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( es ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/et/CMakeLists.txt b/po/et/CMakeLists.txt ---- a/po/et/CMakeLists.txt 2013-10-12 18:34:35.000000000 +0800 -+++ b/po/et/CMakeLists.txt 2015-12-04 11:57:10.177564128 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( et ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( et ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/fi/CMakeLists.txt b/po/fi/CMakeLists.txt ---- a/po/fi/CMakeLists.txt 2013-10-12 18:34:37.000000000 +0800 -+++ b/po/fi/CMakeLists.txt 2015-12-04 11:57:10.177564128 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( fi ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( fi ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/fr/CMakeLists.txt b/po/fr/CMakeLists.txt ---- a/po/fr/CMakeLists.txt 2013-10-12 18:34:38.000000000 +0800 -+++ b/po/fr/CMakeLists.txt 2015-12-04 11:57:10.178564164 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( fr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( fr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/ga/CMakeLists.txt b/po/ga/CMakeLists.txt ---- a/po/ga/CMakeLists.txt 2013-10-12 18:34:40.000000000 +0800 -+++ b/po/ga/CMakeLists.txt 2015-12-04 11:57:10.178564164 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( ga ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( ga ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/gl/CMakeLists.txt b/po/gl/CMakeLists.txt ---- a/po/gl/CMakeLists.txt 2013-10-12 18:34:41.000000000 +0800 -+++ b/po/gl/CMakeLists.txt 2015-12-04 11:57:10.179564201 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( gl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( gl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/hu/CMakeLists.txt b/po/hu/CMakeLists.txt ---- a/po/hu/CMakeLists.txt 2013-10-12 18:34:46.000000000 +0800 -+++ b/po/hu/CMakeLists.txt 2015-12-04 11:57:10.180564237 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( hu ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( hu ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/it/CMakeLists.txt b/po/it/CMakeLists.txt ---- a/po/it/CMakeLists.txt 2013-10-12 18:34:50.000000000 +0800 -+++ b/po/it/CMakeLists.txt 2015-12-04 11:57:10.180564237 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( it ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( it ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/lt/CMakeLists.txt b/po/lt/CMakeLists.txt ---- a/po/lt/CMakeLists.txt 2013-10-12 18:34:55.000000000 +0800 -+++ b/po/lt/CMakeLists.txt 2015-12-04 11:57:10.180564237 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( lt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( lt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/nb/CMakeLists.txt b/po/nb/CMakeLists.txt ---- a/po/nb/CMakeLists.txt 2013-10-12 18:35:02.000000000 +0800 -+++ b/po/nb/CMakeLists.txt 2015-12-04 11:57:10.181564273 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( nb ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( nb ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/nl/CMakeLists.txt b/po/nl/CMakeLists.txt ---- a/po/nl/CMakeLists.txt 2013-10-12 18:35:05.000000000 +0800 -+++ b/po/nl/CMakeLists.txt 2015-12-04 11:57:10.181564273 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( nl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( nl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/pa/CMakeLists.txt b/po/pa/CMakeLists.txt ---- a/po/pa/CMakeLists.txt 2013-10-12 18:35:08.000000000 +0800 -+++ b/po/pa/CMakeLists.txt 2015-12-04 11:57:10.181564273 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( pa ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( pa ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/pl/CMakeLists.txt b/po/pl/CMakeLists.txt ---- a/po/pl/CMakeLists.txt 2013-10-12 18:35:10.000000000 +0800 -+++ b/po/pl/CMakeLists.txt 2015-12-04 11:57:10.181564273 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( pl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( pl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/pt/CMakeLists.txt b/po/pt/CMakeLists.txt ---- a/po/pt/CMakeLists.txt 2013-10-12 18:35:11.000000000 +0800 -+++ b/po/pt/CMakeLists.txt 2015-12-04 11:57:10.182564310 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( pt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( pt ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/pt_BR/CMakeLists.txt b/po/pt_BR/CMakeLists.txt ---- a/po/pt_BR/CMakeLists.txt 2013-10-12 18:35:12.000000000 +0800 -+++ b/po/pt_BR/CMakeLists.txt 2015-12-04 11:57:10.182564310 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( pt_BR ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( pt_BR ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/ro/CMakeLists.txt b/po/ro/CMakeLists.txt ---- a/po/ro/CMakeLists.txt 2013-10-12 18:35:14.000000000 +0800 -+++ b/po/ro/CMakeLists.txt 2015-12-04 11:57:10.182564310 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( ro ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( ro ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/ru/CMakeLists.txt b/po/ru/CMakeLists.txt ---- a/po/ru/CMakeLists.txt 2013-10-12 18:35:15.000000000 +0800 -+++ b/po/ru/CMakeLists.txt 2015-12-04 11:57:10.183564346 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( ru ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( ru ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/sk/CMakeLists.txt b/po/sk/CMakeLists.txt ---- a/po/sk/CMakeLists.txt 2013-10-12 18:35:18.000000000 +0800 -+++ b/po/sk/CMakeLists.txt 2015-12-04 11:57:10.183564346 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( sk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( sk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/sl/CMakeLists.txt b/po/sl/CMakeLists.txt ---- a/po/sl/CMakeLists.txt 2013-10-12 18:35:19.000000000 +0800 -+++ b/po/sl/CMakeLists.txt 2015-12-04 11:57:10.183564346 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( sl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( sl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/sv/CMakeLists.txt b/po/sv/CMakeLists.txt ---- a/po/sv/CMakeLists.txt 2013-10-12 18:35:23.000000000 +0800 -+++ b/po/sv/CMakeLists.txt 2015-12-04 11:57:10.184564382 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( sv ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( sv ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/tr/CMakeLists.txt b/po/tr/CMakeLists.txt ---- a/po/tr/CMakeLists.txt 2013-10-12 18:35:28.000000000 +0800 -+++ b/po/tr/CMakeLists.txt 2015-12-04 11:57:10.184564382 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( tr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( tr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/uk/CMakeLists.txt b/po/uk/CMakeLists.txt ---- a/po/uk/CMakeLists.txt 2013-10-12 18:35:31.000000000 +0800 -+++ b/po/uk/CMakeLists.txt 2015-12-04 11:57:10.184564382 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( uk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( uk ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/po/zh_TW/CMakeLists.txt b/po/zh_TW/CMakeLists.txt ---- a/po/zh_TW/CMakeLists.txt 2013-10-12 18:35:37.000000000 +0800 -+++ b/po/zh_TW/CMakeLists.txt 2015-12-04 11:57:10.185564418 +0800 -@@ -1,2 +1,2 @@ - file( GLOB _po_files *.po ) --GETTEXT_PROCESS_PO_FILES( zh_TW ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) -+GETTEXT_PROCESS_PO_FILES( zh_TW ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} PO_FILES ${_po_files} ) -diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt ---- a/src/CMakeLists.txt 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/CMakeLists.txt 2015-12-04 11:57:10.186564455 +0800 -@@ -1,7 +1,7 @@ - add_subdirectory(helper) - - # Set Include Directories --set(kcm_grub2_INCLUDE_DIRS ${KDE4_INCLUDES}) -+# set(kcm_grub2_INCLUDE_DIRS ${KDE4_INCLUDES}) - if(HAVE_IMAGEMAGICK) - set(kcm_grub2_INCLUDE_DIRS ${kcm_grub2_INCLUDE_DIRS} ${ImageMagick_INCLUDE_DIRS}) - endif(HAVE_IMAGEMAGICK) -@@ -12,15 +12,15 @@ - endif(HAVE_QAPT) - - # Set Sources --set(kcm_grub2_SRCS common.cpp entry.cpp installDlg.cpp kcm_grub2.cpp) --kde4_add_ui_files(kcm_grub2_SRCS ../ui/installDlg.ui ../ui/kcm_grub2.ui) -+set(kcm_grub2_SRCS common.cpp entry.cpp installDlg.cpp kcm_grub2.cpp widgets/regexpinputdialog.cpp) -+ki18n_wrap_ui(kcm_grub2_SRCS ../ui/installDlg.ui ../ui/kcm_grub2.ui) - if(HAVE_IMAGEMAGICK) - set(kcm_grub2_SRCS ${kcm_grub2_SRCS} convertDlg.cpp) -- kde4_add_ui_files(kcm_grub2_SRCS ../ui/convertDlg.ui) -+ ki18n_wrap_ui(kcm_grub2_SRCS ../ui/convertDlg.ui) - endif(HAVE_IMAGEMAGICK) - if(HAVE_QAPT OR HAVE_QPACKAGEKIT) - set(kcm_grub2_SRCS ${kcm_grub2_SRCS} removeDlg.cpp) -- kde4_add_ui_files(kcm_grub2_SRCS ../ui/removeDlg.ui) -+ ki18n_wrap_ui(kcm_grub2_SRCS ../ui/removeDlg.ui) - endif(HAVE_QAPT OR HAVE_QPACKAGEKIT) - if(HAVE_QAPT) - if(QAPT_VERSION_MAJOR EQUAL 1) -@@ -33,7 +33,14 @@ - endif(HAVE_QAPT) - - # Set Link Libraries --set(kcm_grub2_LINK_LIBS ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDE4_SOLID_LIBS}) -+set(kcm_grub2_LINK_LIBS -+ Qt5::Widgets -+ KF5::ConfigWidgets -+ KF5::KIOWidgets -+ KF5::I18n -+ KF5::Auth -+ KF5::Solid -+ ) # - if(HAVE_IMAGEMAGICK) - set(kcm_grub2_LINK_LIBS ${kcm_grub2_LINK_LIBS} ${ImageMagick_LIBRARIES}) - endif(HAVE_IMAGEMAGICK) -@@ -45,12 +52,12 @@ - - # Definitions - if(HAVE_IMAGEMAGICK) -- add_definitions(${KDE4_ENABLE_EXCEPTIONS}) -+ add_definitions(${KDE_ENABLE_EXCEPTIONS}) - endif(HAVE_IMAGEMAGICK) - - # Build & Link - include_directories(${kcm_grub2_INCLUDE_DIRS}) --kde4_add_plugin(kcm_grub2 ${kcm_grub2_SRCS}) -+add_library(kcm_grub2 MODULE ${kcm_grub2_SRCS}) - target_link_libraries(kcm_grub2 ${kcm_grub2_LINK_LIBS}) - - # Install -diff -Naur a/src/common.cpp b/src/common.cpp ---- a/src/common.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/common.cpp 2015-12-04 11:57:10.186564455 +0800 -@@ -66,7 +66,7 @@ - return QString(); - } - stream >> ch; -- switch (ch.toAscii()) { -+ switch (ch.toLatin1()) { - case '$': - case '"': - case '\\': -@@ -92,7 +92,7 @@ - return unquotedWord; - } - stream >> ch; -- switch (ch.toAscii()) { -+ switch (ch.toLatin1()) { - case '\n': - break; - default: -diff -Naur a/src/convertDlg.cpp b/src/convertDlg.cpp ---- a/src/convertDlg.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/convertDlg.cpp 2015-12-04 11:57:10.187564491 +0800 -@@ -19,23 +19,34 @@ - #include "convertDlg.h" - - //KDE --#include <KFileDialog> - #include <KMessageBox> --#include <KMimeType> -- -+//#include <KMimeType> -+//Qt -+#include <QFileDialog> -+#include <QMimeType> -+#include <QMimeDatabase> - //ImageMagick - #include <Magick++.h> - - //Ui - #include "ui_convertDlg.h" - --ConvertDialog::ConvertDialog(QWidget *parent, Qt::WFlags flags) : KDialog(parent, flags) -+ConvertDialog::ConvertDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags) - { - QWidget *widget = new QWidget(this); - ui = new Ui::ConvertDialog; - ui->setupUi(widget); -- setMainWidget(widget); -- -+ QVBoxLayout *mainLayout = new QVBoxLayout; -+ setLayout(mainLayout); -+ mainLayout->addWidget(widget); -+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); -+ mainLayout->addWidget(buttonBox); -+ buttonBox->button(QDialogButtonBox::Ok)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); -+ buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCancelButton)); -+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(SlotOkButtonClicked())); -+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); -+ -+ QMimeDatabase db; - QString readFilter; - QList<Magick::CoderInfo> coderList; - coderInfoList(&coderList, Magick::CoderInfo::TrueMatch, Magick::CoderInfo::AnyMatch, Magick::CoderInfo::AnyMatch); -@@ -47,14 +58,14 @@ - readFilter.remove(0, 1); - readFilter.append('|').append(i18nc("@item:inlistbox", "ImageMagick supported image formats")); - -- QString writeFilter = QString("*%1|%5 (%1)\n*%2|%6 (%2)\n*%3 *%4|%7 (%3 %4)").arg(".png", ".tga", ".jpg", ".jpeg", KMimeType::mimeType("image/png")->comment(), KMimeType::mimeType("image/x-tga")->comment(), KMimeType::mimeType("image/jpeg")->comment()); -+ QString writeFilter = QString("*%1|%5 (%1)\n*%2|%6 (%2)\n*%3 *%4|%7 (%3 %4)").arg(".png", ".tga", ".jpg", ".jpeg", db.mimeTypeForName("image/png").comment(), db.mimeTypeForName("image/x-tga").comment(), db.mimeTypeForName("image/jpeg").comment()); - - ui->kurlrequester_image->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly); -- ui->kurlrequester_image->fileDialog()->setOperationMode(KFileDialog::Opening); -- ui->kurlrequester_image->fileDialog()->setFilter(readFilter); -+ ui->kurlrequester_image->fileDialog()->setAcceptMode(QFileDialog::AcceptOpen); -+ ui->kurlrequester_image->fileDialog()->setNameFilter(readFilter); - ui->kurlrequester_converted->setMode(KFile::File | KFile::LocalOnly); -- ui->kurlrequester_converted->fileDialog()->setOperationMode(KFileDialog::Saving); -- ui->kurlrequester_converted->fileDialog()->setFilter(writeFilter); -+ ui->kurlrequester_converted->fileDialog()->setAcceptMode(QFileDialog::AcceptSave); -+ ui->kurlrequester_converted->fileDialog()->setNameFilter(writeFilter); - } - ConvertDialog::~ConvertDialog() - { -@@ -69,16 +80,17 @@ - } - } - --void ConvertDialog::slotButtonClicked(int button) -+void ConvertDialog::slotOkButtonClicked() - { -- if (button == KDialog::Ok) { -+ QRegularExpression getdirectory("\\S*/"); -+ - if (ui->kurlrequester_image->text().isEmpty() || ui->kurlrequester_converted->text().isEmpty()) { - KMessageBox::information(this, i18nc("@info", "Please fill in both <interface>Image</interface> and <interface>Convert To</interface> fields.")); - return; - } else if (ui->spinBox_width->value() == 0 || ui->spinBox_height->value() == 0) { - KMessageBox::information(this, i18nc("@info", "Please fill in both <interface>Width</interface> and <interface>Height</interface> fields.")); - return; -- } else if (!QFileInfo(ui->kurlrequester_converted->url().directory()).isWritable()) { -+ } else if (!QFileInfo(getdirectory.match(ui->kurlrequester_converted->url().toLocalFile()).captured(1)).isWritable()) { - KMessageBox::information(this, i18nc("@info", "You do not have write permissions in this directory, please select another destination.")); - return; - } -@@ -92,6 +104,5 @@ - if (ui->checkBox_wallpaper->isChecked()) { - emit splashImageCreated(ui->kurlrequester_converted->url().toLocalFile()); - } -- } -- KDialog::slotButtonClicked(button); -+ this->accept(); - } -diff -Naur a/src/convertDlg.h b/src/convertDlg.h ---- a/src/convertDlg.h 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/convertDlg.h 2015-12-04 11:57:10.187564491 +0800 -@@ -18,8 +18,8 @@ - #ifndef CONVERTDLG_H - #define CONVERTDLG_H - --//KDE --#include <KDialog> -+//Qt -+#include <QDialog> - - //Ui - namespace Ui -@@ -27,16 +27,16 @@ - class ConvertDialog; - } - --class ConvertDialog : public KDialog -+class ConvertDialog : public QDialog - { - Q_OBJECT - public: -- explicit ConvertDialog(QWidget *parent = 0, Qt::WFlags flags = 0); -+ explicit ConvertDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); - virtual ~ConvertDialog(); - - void setResolution(int width, int height); - protected Q_SLOTS: -- virtual void slotButtonClicked(int button); -+ virtual void slotOkButtonClicked(); - Q_SIGNALS: - void splashImageCreated(const QString &splashImage); - private: -diff -Naur a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt ---- a/src/helper/CMakeLists.txt 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/helper/CMakeLists.txt 2015-12-04 11:57:10.188564527 +0800 -@@ -8,17 +8,17 @@ - set(kcmgrub2helper_SRCS helper.cpp) - - # Set Link Libraries --set(kcmgrub2helper_LINK_LIBS ${KDE4_KDECORE_LIBS}) -+set(kcmgrub2helper_LINK_LIBS Qt5::DBus KF5::Auth KF5::I18n) - if(HAVE_HD) - set(kcmgrub2helper_LINK_LIBS ${kcmgrub2helper_LINK_LIBS} ${HD_LIBRARY}) - endif(HAVE_HD) - - # Build & Link - include_directories(${kcmgrub2helper_INCLUDE_DIRS}) --kde4_add_executable(kcmgrub2helper ${kcmgrub2helper_SRCS}) -+add_executable(kcmgrub2helper ${kcmgrub2helper_SRCS}) - target_link_libraries(kcmgrub2helper ${kcmgrub2helper_LINK_LIBS}) - - # Install --install(TARGETS kcmgrub2helper DESTINATION ${LIBEXEC_INSTALL_DIR}) --kde4_install_auth_helper_files(kcmgrub2helper org.kde.kcontrol.kcmgrub2 root) --kde4_install_auth_actions(org.kde.kcontrol.kcmgrub2 kcmgrub2.actions) -+install(TARGETS kcmgrub2helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR}) -+kauth_install_helper_files(kcmgrub2helper org.kde.kcontrol.kcmgrub2 root) -+kauth_install_actions(org.kde.kcontrol.kcmgrub2 kcmgrub2.actions) -diff -Naur a/src/helper/helper.cpp b/src/helper/helper.cpp ---- a/src/helper/helper.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/helper/helper.cpp 2015-12-04 11:59:00.129528689 +0800 -@@ -25,11 +25,9 @@ - #include <QDir> - - //KDE --#include <KDebug> --#include <KGlobal> --#include <KLocale> -+//#include <KDebug> - #include <KProcess> --#include <KAuth/HelperSupport> -+#include <klocalizedstring.h> - - //Project - #include "../config.h" -@@ -44,7 +42,6 @@ - - Helper::Helper() - { -- KGlobal::locale()->insertCatalog("kcm-grub2"); - qputenv("PATH", path.toLatin1()); - } - -@@ -54,19 +51,36 @@ - process.setProgram(command); - process.setOutputChannelMode(KProcess::MergedChannels); - -- kDebug() << "Executing" << command.join(" "); -+ //qDebug() << "Executing" << command.join(" "); - int exitCode = process.execute(); - - ActionReply reply; - if (exitCode != 0) { -- reply = ActionReply::HelperErrorReply; -- reply.setErrorCode(exitCode); -+ reply = ActionReply::HelperErrorReply(); -+ //TO BE FIXED -+ reply.setErrorCode(ActionReply::Error::InvalidActionError); - } - reply.addData("command", command); - reply.addData("output", process.readAll()); - return reply; - } - -+ActionReply Helper::initialize(QVariantMap args) -+{ -+ ActionReply reply; -+ switch (args.value("actionType").toInt()) { -+ case actionLoad: -+ reply = load(args); -+ break; -+ case actionProbe: -+ reply = probe(args); -+ break; -+ case actionProbevbe: -+ reply = probevbe(args); -+ } -+ return reply; -+} -+ - ActionReply Helper::defaults(QVariantMap args) - { - Q_UNUSED(args) -@@ -75,17 +89,17 @@ - QString originalConfigFileName = configFileName + ".original"; - - if (!QFile::exists(originalConfigFileName)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", i18nc("@info", "Original configuration file <filename>%1</filename> does not exist.", originalConfigFileName)); - return reply; - } - if (!QFile::remove(configFileName)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", i18nc("@info", "Cannot remove current configuration file <filename>%1</filename>.", configFileName)); - return reply; - } - if (!QFile::copy(originalConfigFileName, configFileName)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", i18nc("@info", "Cannot copy original configuration file <filename>%1</filename> to <filename>%2</filename>.", originalConfigFileName, configFileName)); - return reply; - } -@@ -101,7 +115,7 @@ - if (mountPoint.isEmpty()) { - for (int i = 0; QDir(mountPoint = QString("%1/kcm-grub2-%2").arg(QDir::tempPath(), QString::number(i))).exists(); i++); - if (!QDir().mkpath(mountPoint)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", i18nc("@info", "Failed to create temporary mount point.")); - return reply; - } -@@ -145,7 +159,7 @@ - - QFile file(fileName); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", file.errorString()); - return reply; - } -@@ -190,7 +204,7 @@ - hd_free_hd_data(&hd_data); - reply.addData("gfxmodes", gfxmodes); - #else -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - #endif - - return reply; -@@ -207,7 +221,7 @@ - - QFile file(configFileName); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { -- reply = ActionReply::HelperErrorReply; -+ reply = ActionReply::HelperErrorReply(); - reply.addData("errorDescription", file.errorString()); - return reply; - } -@@ -237,4 +251,4 @@ - return grub_mkconfigReply; - } - --KDE4_AUTH_HELPER_MAIN("org.kde.kcontrol.kcmgrub2", Helper) -+KAUTH_HELPER_MAIN("org.kde.kcontrol.kcmgrub2", Helper) -diff -Naur a/src/helper/helper.h b/src/helper/helper.h ---- a/src/helper/helper.h 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/helper/helper.h 2015-12-04 11:59:00.129528689 +0800 -@@ -17,9 +17,10 @@ - - #ifndef HELPER_H - #define HELPER_H -- -+//Qt -+#include <QDebug> - //KDE --#include <KAuth/ActionReply> -+#include <KAuth> - using namespace KAuth; - - class Helper : public QObject -@@ -29,12 +30,14 @@ - Helper(); - private: - ActionReply executeCommand(const QStringList &command); --public Q_SLOTS: -- ActionReply defaults(QVariantMap args); -- ActionReply install(QVariantMap args); -+ //merge - ActionReply load(QVariantMap args); - ActionReply probe(QVariantMap args); - ActionReply probevbe(QVariantMap args); -+public Q_SLOTS: -+ ActionReply initialize(QVariantMap args); -+ ActionReply defaults(QVariantMap args); -+ ActionReply install(QVariantMap args); - ActionReply save(QVariantMap args); - }; - -diff -Naur a/src/helper/kcmgrub2.actions b/src/helper/kcmgrub2.actions ---- a/src/helper/kcmgrub2.actions 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/helper/kcmgrub2.actions 2015-12-04 11:59:00.131528761 +0800 -@@ -184,7 +184,7 @@ - Policy=auth_admin - Persistence=session - --[org.kde.kcontrol.kcmgrub2.load] -+[org.kde.kcontrol.kcmgrub2.initialize] - Name=Load the GRUB2 Bootloader settings - Name[bs]=Učitaj postavke GRUB2 pokretača sistema - Name[ca]=Carrega l'arranjament del gestor d'arrencada Grub2 -@@ -259,150 +259,6 @@ - Policy=auth_admin - Persistence=session - --[org.kde.kcontrol.kcmgrub2.probe] --Name=Probe devices for their GRUB2 names --Name[bs]=Testiranje uređaja za njihova GRUB2 imena --Name[ca]=Prova els dispositius pels seus noms a Grub2 --Name[ca@valencia]=Prova els dispositius pels seus noms a Grub2 --Name[cs]=Prozkoumat zařízení pro jejich GRUB2 názvy --Name[da]=Søg efter enheders GRUB2-navne --Name[de]=Geräte auf ihre GRUB2-Namen abfragen. --Name[el]=Έλεγχος συσκευών αν έχουν ονόματα GRUB2 --Name[es]=Examinar los nombres de los dispositivos en GRUB2 --Name[et]=Seadmete kontrollimine GRUB2 nimede osas --Name[fi]=Tunnustele laitteet niiden GRUB2-nimien selvittämiseksi --Name[fr]=Interroger les périphériques pour trouver leurs noms GRUB2 --Name[gl]=Probar os dispositivos polo seu nome en GRUB2 --Name[hu]=Eszközök vizsgálata a GRUB2 név meghatározásához --Name[it]=Sonda i dispositivi per trovarne i loro nomi in GRUB2 --Name[lt]=Tikrini įrenginius dėl GRUB2 vardų --Name[mr]=साधनांच्या GRUB2 नावाकरिता साधने शोधा --Name[nb]=Undersøk enheter for å finne deres GRUB2-navn --Name[nds]=De Reedschappen ehr Grub2-Naams opdecken --Name[nl]=Apparaten aftasten voor hun GRUB2 namen --Name[pa]=ਜੰਤਰ ਨੂੰ ਉਹਨਾਂ ਦੇ ਗਰਬ2 ਨਾਂ ਲਈ ਪੜਤਾਲ ਕਰੋ --Name[pl]=Wykryj nazwy urządzeń dla GRUB2 --Name[pt]=Detectar os nomes dos dispositivos no GRUB2 --Name[pt_BR]=Detectar os nomes dos dispositivos no GRUB2 --Name[ro]=Sondează dispozitivele pentru denumirile lor GRUB2 --Name[ru]=Определение имён устройств, используемых загрузчиком GRUB2 --Name[sk]=Vyskúšať zariadenia pre ich názvy v GRUB2 --Name[sl]=Preizkusi naprave za njihova imena GRUB2 --Name[sv]=Sök igenom enheter efter deras GRUB2-namn --Name[tr]=Aygıtları GRUB2 isimleri için araştır --Name[uk]=Визначення назв пристроїв GRUB2 --Name[x-test]=xxProbe devices for their GRUB2 namesxx --Name[zh_CN]=探测设备的 GRUB2 名字 --Name[zh_TW]=偵測裝置在 GRUB2 上的名稱 --Description=Administrator authorization is required to probe devices for their GRUB2 names --Description[bs]=Administratorska potvrda je potrebna za upit uređaja za njihova GRUB2 imena --Description[ca]=Es requereix autorització de l'administrador per a provar els dispositius pels seus noms a Grub2 --Description[ca@valencia]=Es requereix autorització de l'administrador per a provar els dispositius pels seus noms a Grub2 --Description[cs]=Pro prozkoumání GRUB2 názvů zařízení je potřeba oprávnění administrátora --Description[da]=Administrator-godkendelse kræves for at søge efter enheders GRUB2-navne --Description[de]=Zur Abfrage der Geräte nach ihren GRUB2-Namen sind Systemverwalterrechte erforderlich. --Description[el]=Απαιτείται εξουσιοδότηση διαχειριστή για τον έλεγχο συσκευών για ονόματα GRUB2 --Description[es]=Se requiere la autorización del administrador para examinar los nombres de los dispositivos en GRUB2 --Description[et]=Seadmete kontrollimiseks GRUB2 nimede osas on vajalik autentimine administraatorina --Description[fi]=Laitteiden tunnusteleminen niiden GRUB2-nimien selvittämiseksi vaatii pääkäyttäjän oikeudet --Description[fr]=L'autorisation de l'administrateur est requise pour interroger les périphériques pour trouver leurs noms GRUB2 --Description[gl]=Precísase a autorización do administrador para probar os dispositivos polo seu nome en GRUB2 --Description[hu]=Rendszergazdai jogosultságok szükségesek az eszközök GRUB2 nevének meghatározásához --Description[it]=Sono i richiesti i privilegi amministrativi per sondare i dispositivi e trovarne i nomi in GRUB2 --Description[lt]=Administratoriaus įgaliojimas reikalingas, kad patikrinti įrenginių GRUB2 vardus --Description[mr]=साधनांच्या GRUB2 नावाकरिता साधने शोधण्याकरिता व्यवस्थापकाची परवानगी आवश्यक आहे --Description[nb]=Det kreves autorisasjon som administrator for å søke etter enheters GRUB2-navn --Description[nds]=De Reedschappen ehr Grub2-Naams laat sik bloots mit Systeempleger-Verlööf opdecken. --Description[nl]=Autorisatie van systeembeheerder is vereist om apparaten af te tasten voor hun GRUB2 namen --Description[pl]=Do wykrycia nazw urządzeń dla GRUB2 potrzebne są uprawnienia administratora --Description[pt]=É necessária a autorização do administrador para detectar os nomes dos dispositivos no GRUB2 --Description[pt_BR]=É necessária a autorização do administrador para detectar os nomes dos dispositivos no GRUB2 --Description[ro]=Este necesară autorizarea ca administrator pentru a sonda dispozitivele pentru denumirile lor GRUB2 --Description[ru]=Необходимы права администратора для определения имён устройств, используемых загрузчиком GRUB2 --Description[sk]=Vyžaduje sa overenie administrátora na vyskúšanie zariadení pre ich názvy v GRUB2 --Description[sl]=Za preizkus naprav za njihovimi imeni GRUB2 je zahtevana pooblastitev skrbnika --Description[sv]=Administratörsbehörighet krävs för att söka igenom enheter efter deras GRUB2 namn --Description[tr]=Aygıtların GRUB2 isimlerini araştırmak için yönetici yetkilendirmesi gerekli --Description[uk]=Для визначення назв пристроїв GRUB2 слід набути прав доступу адміністратора --Description[x-test]=xxAdministrator authorization is required to probe devices for their GRUB2 namesxx --Description[zh_CN]=探测设备的 GRUB2 名字需要管理员权限 --Description[zh_TW]=偵測裝置在 GRUB2 上的名稱需要管理者權限 --Policy=auth_admin --Persistence=session -- --[org.kde.kcontrol.kcmgrub2.probevbe] --Name=Probe VESA BIOS Extensions --Name[bs]=Ispitaj VESA BIOS proširenja --Name[ca]=Prova les extensions VESA del BIOS --Name[ca@valencia]=Prova les extensions VESA del BIOS --Name[cs]=Prozkoumat rozšířeni VESA BIOS (VBE) --Name[da]=Søg efter VESA BIOS-udvidelser --Name[de]=VESA-BIOS-Erweiterungen ermitteln --Name[el]=Έλεγχος για VESA BIOS επεκτάσεις --Name[es]=Examinar las extensiones BIOS de VESA --Name[et]=VESA BIOS-e laiendite kontrollimine --Name[fi]=Tunnustele VESA BIOS -laajennukset --Name[fr]=Détecter les extensions « BIOS VESA » --Name[ga]=Fiosraigh Eisínteachtaí BIOS VESA --Name[gl]=Probar os engadidos VESA BIOS --Name[hu]=VESA BIOS kiterjesztések vizsgálata --Name[it]=Sonda le estensioni per il BIOS della VESA --Name[lt]=Tikrinti VESA BIOS plėtinius --Name[mr]=VESA BIOS विस्तारणे शोधा --Name[nb]=Se etter VESA BIOS-utvidelser --Name[nds]=VESA-BIOS-Verwiedern opdecken --Name[nl]=VESA BIOS extensies aftasten --Name[pa]=VESA BIOS ਇਕਸਟੈਨਸ਼ਨ ਲਈ ਪੜਤਾਲ --Name[pl]=Wykryj rozszerzenia VESA BIOS --Name[pt]=Testar as extensões da BIOS para o VESA --Name[pt_BR]=Testar as extensões da BIOS para o VESA --Name[ro]=Sondează extensiile BIOS VESA --Name[ru]=Проверка расширений BIOS в стандарте VESA (VBE) --Name[sk]=Vyskúšať rozšírenia VESA BIOSu --Name[sl]=Preizkusi razširitve VESA BIOS --Name[sv]=Sök efter VESA BIOS-utökningar --Name[tr]=VESA BIOS Uzantılarını Araştır --Name[uk]=Виявлення розширень BIOS VESA --Name[x-test]=xxProbe VESA BIOS Extensionsxx --Name[zh_CN]=探测 VESA BIOS 扩展 --Name[zh_TW]=偵測 VESA BIOS 延伸 --Description=Administrator authorization is required to probe VESA BIOS Extensions --Description[bs]=Administratorska potvrda je potrebna za testiranje VESA BIOS proširenja --Description[ca]=Es requereix autorització de l'administrador per a provar les extensions VESA del BIOS --Description[ca@valencia]=Es requereix autorització de l'administrador per a provar les extensions VESA del BIOS --Description[cs]=Pro prozkoumání rozšíření VESA BIOS (VBE) je potřeba oprávnění administrátora --Description[da]=Administrator-godkendelse kræves for at søge efter VESA BIOS-udvidelser --Description[de]=Zur Ermittlung der VESA-BIOS-Erweiterungen sind Systemverwalterrechte erforderlich. --Description[el]=Απαιτείται εξουσιοδότηση διαχειριστή για τον έλεγχο VESA BIOS επεκτάσεων --Description[es]=Se requiere la autorización del administrador para examinar las extensiones BIOS de VESA --Description[et]=VESA BIOS-e laiendite kontrollimiseks on vajalik autentimine administraatorina --Description[fi]=VESA BIOS -laajennusten tunnusteleminen vaatii pääkäyttäjän oikeudet --Description[fr]=L'autorisation de l'administrateur est requise pour détecter les extensions BIOS VESA --Description[ga]=Is é riarthóir an chórais amháin atá in ann Eisínteachtaí BIOS VESA a fhiosrú --Description[gl]=Precísase a autorización do administrador para probar os engadidos VESA BIOS --Description[hu]=Rendszergazdai jogosultságok szükségesek a VESA BIOS kiterjesztések vizsgálatához --Description[it]=Sono i richiesti i privilegi amministrativi per sondare le estensioni per il BIOS della VESA --Description[lt]=Administratoriaus įgaliojimas reikalingas, kad patikrinti VESA BIOS plėtinius --Description[mr]=VESA BIOS विस्तारणे शोधण्याकरिता व्यवस्थापकाची परवानगी आवश्यक आहे --Description[nb]=Det kreves autorisasjon som administrator for å søke etter VESA BIOS-utvidcelser --Description[nds]=De VESA-BIOS-Verwiedern laat sik bloots mit Systeempleger-Verlööf opdecken. --Description[nl]=Autorisatie van systeembeheerder is vereist om VESA BIOS extensies af te tasten --Description[pl]=Do wykrycia rozszerzeń VESA BIOS potrzebne są uprawnienia administratora --Description[pt]=É necessária a autorização do administrador para testar a extensões da BIOS para o VESA --Description[pt_BR]=É necessária a autorização do administrador para testar a extensões da BIOS para o VESA --Description[ro]=Este necesară autorizarea ca administrator pentru a sonda extensiile BIOS VESA --Description[ru]=Для проверки расширений BIOS в стандарте VESA (VBE) необходимы права администратора --Description[sk]=Vyžaduje sa overenie administrátora na vyskúšanie rozšírení VESA BIOSu --Description[sl]=Za preizkus razširitev VESA BIOS GRUB2 je zahtevana pooblastitev skrbnika --Description[sv]=Administratörsbehörighet krävs för att söka efter VESA BIOS-utökningar --Description[tr]=VESA BIOS Uzantılarını araştırmak için yönetici yetkilendirmesi gerekli --Description[uk]=Для виявлення розширень BIOS VESA слід набути прав доступу адміністратора --Description[x-test]=xxAdministrator authorization is required to probe VESA BIOS Extensionsxx --Description[zh_CN]=探测 VESA BIOS 扩展需要管理员权限 --Description[zh_TW]=偵測 VESA BIOS 延伸需要管理者權限 --Policy=auth_admin --Persistence=session -- - [org.kde.kcontrol.kcmgrub2.save] - Name=Save the GRUB2 Bootloader settings - Name[bs]=Snimie postavke GRUB2 pokretača sistema -diff -Naur a/src/installDlg.cpp b/src/installDlg.cpp ---- a/src/installDlg.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/installDlg.cpp 2015-12-04 11:59:00.132528797 +0800 -@@ -21,36 +21,47 @@ - //Qt - #include <QFile> - #include <QRadioButton> -- -+#include <QPushButton> - //KDE --#include <kdeversion.h> - #include <KMessageBox> --#include <KProgressDialog> --#include <KAuth/ActionWatcher> --using namespace KAuth; -+//#include <KProgressDialog> -+ -+#include <KFormat> - #include <Solid/Device> - #include <Solid/StorageAccess> - #include <Solid/StorageVolume> - -+#include <KAuth> -+using namespace KAuth; -+ - //Ui - #include "ui_installDlg.h" - --InstallDialog::InstallDialog(QWidget *parent, Qt::WFlags flags) : KDialog(parent, flags) -+InstallDialog::InstallDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags) - { - QWidget *widget = new QWidget(this); -+ KFormat format; - ui = new Ui::InstallDialog; - ui->setupUi(widget); -- setMainWidget(widget); -- enableButtonOk(false); -+ QVBoxLayout *mainLayout = new QVBoxLayout; -+ setLayout(mainLayout); -+ mainLayout->addWidget(widget); -+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); -+ mainLayout->addWidget(buttonBox); -+ buttonBox->button(QDialogButtonBox::Ok)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); -+ buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCancelButton)); -+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(SlotOkButtonClicked())); -+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); -+ buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - setWindowTitle(i18nc("@title:window", "Install/Recover Bootloader")); -- setWindowIcon(KIcon("system-software-update")); -+ setWindowIcon(QIcon::fromTheme(QStringLiteral("system-software-update"))); - if (parent) { -- setInitialSize(parent->size()); -+ resize(parent->size()); - } - - ui->treeWidget_recover->headerItem()->setText(0, QString()); -- ui->treeWidget_recover->header()->setResizeMode(QHeaderView::Stretch); -- ui->treeWidget_recover->header()->setResizeMode(0, QHeaderView::ResizeToContents); -+ ui->treeWidget_recover->header()->setSectionResizeMode(QHeaderView::Stretch); -+ ui->treeWidget_recover->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents); - Q_FOREACH(const Solid::Device &device, Solid::Device::listFromType(Solid::DeviceInterface::StorageAccess)) { - if (!device.is<Solid::StorageAccess>() || !device.is<Solid::StorageVolume>()) { - continue; -@@ -66,12 +77,12 @@ - - QString uuidDir = "/dev/disk/by-uuid/", uuid = volume->uuid(), name; - name = (QFile::exists((name = uuidDir + uuid)) || QFile::exists((name = uuidDir + uuid.toLower())) || QFile::exists((name = uuidDir + uuid.toUpper())) ? QFile::symLinkTarget(name) : QString()); -- QTreeWidgetItem *item = new QTreeWidgetItem(ui->treeWidget_recover, QStringList() << QString() << name << partition->filePath() << volume->label() << volume->fsType() << KGlobal::locale()->formatByteSize(volume->size())); -- item->setIcon(1, KIcon(device.icon())); -+ QTreeWidgetItem *item = new QTreeWidgetItem(ui->treeWidget_recover, QStringList() << QString() << name << partition->filePath() << volume->label() << volume->fsType() << format.formatByteSize(volume->size())); //KGlobal::locale()-> -+ item->setIcon(1, QIcon::fromTheme(device.icon())); - item->setTextAlignment(5, Qt::AlignRight | Qt::AlignVCenter); - ui->treeWidget_recover->addTopLevelItem(item); - QRadioButton *radio = new QRadioButton(ui->treeWidget_recover); -- connect(radio, SIGNAL(clicked(bool)), this, SLOT(enableButtonOk(bool))); -+ connect(radio, SIGNAL(clicked(bool)), buttonBox->button(QDialogButtonBox::Ok), SLOT(setEnabled(bool))); - ui->treeWidget_recover->setItemWidget(item, 0, radio); - } - } -@@ -80,11 +91,10 @@ - delete ui; - } - --void InstallDialog::slotButtonClicked(int button) -+void InstallDialog::SlotOkButtonClicked() - { -- if (button == KDialog::Ok) { - Action installAction("org.kde.kcontrol.kcmgrub2.install"); -- installAction.setHelperID("org.kde.kcontrol.kcmgrub2"); -+ installAction.setHelperId("org.kde.kcontrol.kcmgrub2"); - for (int i = 0; i < ui->treeWidget_recover->topLevelItemCount(); i++) { - QRadioButton *radio = qobject_cast<QRadioButton *>(ui->treeWidget_recover->itemWidget(ui->treeWidget_recover->topLevelItem(i), 0)); - if (radio && radio->isChecked()) { -@@ -98,34 +108,37 @@ - KMessageBox::sorry(this, i18nc("@info", "Sorry, you have to select a partition with a proper name!")); - return; - } --#if KDE_IS_VERSION(4,6,0) -- installAction.setParentWidget(this); --#endif - -- if (installAction.authorize() != Action::Authorized) { -- return; -- } - -- KProgressDialog progressDlg(this, i18nc("@title:window", "Installing"), i18nc("@info:progress", "Installing GRUB...")); -- progressDlg.setAllowCancel(false); -+ QProgressDialog progressDlg(this, Qt::Dialog); -+ progressDlg.setWindowTitle(i18nc("@title:window", "Installing")); -+ progressDlg.setLabelText(i18nc("@info:progress", "Installing GRUB...")); -+ progressDlg.setCancelButton(0); - progressDlg.setModal(true); -- progressDlg.progressBar()->setMinimum(0); -- progressDlg.progressBar()->setMaximum(0); -+ progressDlg.setRange(0,0); - progressDlg.show(); -- connect(installAction.watcher(), SIGNAL(actionPerformed(ActionReply)), &progressDlg, SLOT(hide())); - -- ActionReply reply = installAction.execute(); -- if (reply.succeeded()) { -- KDialog *dialog = new KDialog(this, Qt::Dialog); -- dialog->setCaption(i18nc("@title:window", "Information")); -- dialog->setButtons(KDialog::Ok | KDialog::Details); -- dialog->setModal(true); -- dialog->setDefaultButton(KDialog::Ok); -- dialog->setEscapeButton(KDialog::Ok); -- KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i18nc("@info", "Successfully installed GRUB."), QStringList(), QString(), 0, KMessageBox::Notify, reply.data().value("output").toString()); // krazy:exclude=qclasses -+ ExecuteJob* reply = installAction.execute(); -+ reply->exec(); -+ -+ //if (installAction.status() != Action::AuthorizedStatus ) { -+ // progressDlg.hide(); -+ // return; -+ //} -+ -+ //connect(reply, SIGNAL(result()), &progressDlg, SLOT(hide())); -+ progressDlg.hide(); -+ if (reply->error()) { -+ KMessageBox::detailedError(this, i18nc("@info", "Failed to install GRUB."), reply->data().value("errorDescription").toString()); -+ this->reject(); - } else { -- KMessageBox::detailedError(this, i18nc("@info", "Failed to install GRUB."), KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString()); -+ progressDlg.hide(); -+ QDialog *dialog = new QDialog(this, Qt::Dialog); -+ dialog->setWindowTitle(i18nc("@title:window", "Information")); -+ dialog->setModal(true); -+ QDialogButtonBox *btnbox = new QDialogButtonBox(QDialogButtonBox::Ok); -+ KMessageBox::createKMessageBox(dialog, btnbox, QMessageBox::Information, i18nc("@info", "Successfully installed GRUB."), QStringList(), QString(), 0, KMessageBox::Notify, reply->data().value("output").toString()); // krazy:exclude=qclasses -+ this->accept(); - } -- } -- KDialog::slotButtonClicked(button); -+ //this->accept(); - } -diff -Naur a/src/installDlg.h b/src/installDlg.h ---- a/src/installDlg.h 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/installDlg.h 2015-12-04 11:57:10.190564600 +0800 -@@ -19,22 +19,22 @@ - #define INSTALLDLG_H - - //KDE --#include <KDialog> -- -+#include <QDialog> -+#include <QProgressDialog> - //Ui - namespace Ui - { - class InstallDialog; - } - --class InstallDialog : public KDialog -+class InstallDialog : public QDialog - { - Q_OBJECT - public: -- explicit InstallDialog(QWidget *parent = 0, Qt::WFlags flags = 0); -+ explicit InstallDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); - virtual ~InstallDialog(); - protected Q_SLOTS: -- virtual void slotButtonClicked(int button); -+ virtual void SlotOkButtonClicked(); - private: - Ui::InstallDialog *ui; - }; -diff -Naur a/src/kcm_grub2.cpp b/src/kcm_grub2.cpp ---- a/src/kcm_grub2.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/kcm_grub2.cpp 2015-12-04 11:59:00.133528832 +0800 -@@ -20,22 +20,26 @@ - - //Own - #include "kcm_grub2.h" -- -+#include "widgets/regexpinputdialog.h" - //Qt - #include <QDesktopWidget> - #include <QStandardItemModel> - #include <QTreeView> -- -+#include <QMenu> -+#include <QProgressBar> -+#include <QTextStream> - //KDE - #include <KAboutData> --#include <KDebug> --#include <KInputDialog> --#include <KMenu> -+//#include <KDebug> -+//#include <KInputDialog> - #include <KMessageBox> - #include <kmountpoint.h> - #include <KPluginFactory> --#include <KProgressDialog> --#include <KAuth/ActionWatcher> -+#include <KAuth> -+using namespace KAuth; -+ -+#define TRANSLATION_DOMAIN "kcm-grub2" -+#include <klocalizedstring.h> - - //Project - #include "common.h" -@@ -54,13 +58,21 @@ - K_PLUGIN_FACTORY(GRUB2Factory, registerPlugin<KCMGRUB2>();) - K_EXPORT_PLUGIN(GRUB2Factory("kcmgrub2")) - --KCMGRUB2::KCMGRUB2(QWidget *parent, const QVariantList &list) : KCModule(GRUB2Factory::componentData(), parent, list) -+#include <kcm_grub2.moc> -+ -+KCMGRUB2::KCMGRUB2(QWidget *parent, const QVariantList &list) : KCModule(parent, list) - { - //Isn't KAboutData's second argument supposed to do this? -- KGlobal::locale()->insertCatalog("kcm-grub2"); -+ //The function is deprecated. TO BE FIXED -+ //KGlobal::locale()->insertCatalog("kcm-grub2"); -+ -+ KAboutData* about = new KAboutData("kcmgrub2", i18n("KDE GRUB2 Bootloader Control Module"), KCM_GRUB2_VERSION); -+ about->setShortDescription(i18n("A KDE Control Module for configuring the GRUB2 bootloader.")); -+ about->setLicense(KAboutLicense::GPL_V3); -+ about->setHomepage("http://ksmanis.wordpress.com/projects/grub2-editor/"); - -- KAboutData *about = new KAboutData("kcmgrub2", "kcm-grub2", ki18nc("@title", "KDE GRUB2 Bootloader Control Module"), KCM_GRUB2_VERSION, ki18nc("@title", "A KDE Control Module for configuring the GRUB2 bootloader."), KAboutData::License_GPL_V3, ki18nc("@info:credit", "Copyright (C) 2008-2013 Konstantinos Smanis"), KLocalizedString(), "http://ksmanis.wordpress.com/projects/grub2-editor/"); -- about->addAuthor(ki18nc("@info:credit", "Κonstantinos Smanis"), ki18nc("@info:credit", "Main Developer"), "konstantinos.smanis@gmail.com", "http://ksmanis.wordpress.com/"); -+ about->addAuthor("Κonstantinos Smanis", i18n("Main Developer"), "konstantinos.smanis@gmail.com"); -+ - setAboutData(about); - - ui = new Ui::KCMGRUB2; -@@ -76,20 +88,15 @@ - void KCMGRUB2::defaults() - { - Action defaultsAction("org.kde.kcontrol.kcmgrub2.defaults"); -- defaultsAction.setHelperID("org.kde.kcontrol.kcmgrub2"); --#if KDE_IS_VERSION(4,6,0) -- defaultsAction.setParentWidget(this); --#endif -- -- ActionReply reply = defaultsAction.execute(); -- processReply(reply); -- if (reply.succeeded()) { -+ defaultsAction.setHelperId("org.kde.kcontrol.kcmgrub2"); -+ -+ ExecuteJob *reply = defaultsAction.execute(); -+ if (!reply->exec()) -+ KMessageBox::detailedError(this, i18nc("@info", "Failed to restore the default values."), reply->errorString()); -+ else - load(); - save(); - KMessageBox::information(this, i18nc("@info", "Successfully restored the default values.")); -- } else { -- KMessageBox::detailedError(this, i18nc("@info", "Failed to restore the default values."), reply.errorDescription()); -- } - } - void KCMGRUB2::load() - { -@@ -163,7 +170,7 @@ - ui->kcombobox_default->setRootModelIndex(model->indexFromItem(model->invisibleRootItem())); - } - } else { -- kWarning() << "Invalid GRUB_DEFAULT value"; -+ qDebug() << "Invalid GRUB_DEFAULT value"; - } - } - ui->kpushbutton_remove->setEnabled(!m_entries.isEmpty()); -@@ -176,7 +183,7 @@ - ui->checkBox_hiddenTimeout->setChecked(grubHiddenTimeout > 0); - ui->spinBox_hiddenTimeout->setValue(grubHiddenTimeout); - } else { -- kWarning() << "Invalid GRUB_HIDDEN_TIMEOUT value"; -+ qDebug() << "Invalid GRUB_HIDDEN_TIMEOUT value"; - } - } - ui->checkBox_hiddenTimeoutShowTimer->setChecked(unquoteWord(m_settings.value("GRUB_HIDDEN_TIMEOUT_QUIET")).compare("true") != 0); -@@ -187,7 +194,7 @@ - ui->radioButton_timeout->setChecked(grubTimeout > 0); - ui->spinBox_timeout->setValue(grubTimeout); - } else { -- kWarning() << "Invalid GRUB_TIMEOUT value"; -+ qDebug() << "Invalid GRUB_TIMEOUT value"; - } - - ui->checkBox_recovery->setChecked(unquoteWord(m_settings.value("GRUB_DISABLE_RECOVERY")).compare("true") != 0); -@@ -215,7 +222,7 @@ - int normalForegroundIndex = ui->kcombobox_normalForeground->findData(grubColorNormal.section('/', 0, 0)); - int normalBackgroundIndex = ui->kcombobox_normalBackground->findData(grubColorNormal.section('/', 1)); - if (normalForegroundIndex == -1 || normalBackgroundIndex == -1) { -- kWarning() << "Invalid GRUB_COLOR_NORMAL value"; -+ qDebug() << "Invalid GRUB_COLOR_NORMAL value"; - } - if (normalForegroundIndex != -1) { - ui->kcombobox_normalForeground->setCurrentIndex(normalForegroundIndex); -@@ -229,7 +236,7 @@ - int highlightForegroundIndex = ui->kcombobox_highlightForeground->findData(grubColorHighlight.section('/', 0, 0)); - int highlightBackgroundIndex = ui->kcombobox_highlightBackground->findData(grubColorHighlight.section('/', 1)); - if (highlightForegroundIndex == -1 || highlightBackgroundIndex == -1) { -- kWarning() << "Invalid GRUB_COLOR_HIGHLIGHT value"; -+ qDebug() << "Invalid GRUB_COLOR_HIGHLIGHT value"; - } - if (highlightForegroundIndex != -1) { - ui->kcombobox_highlightForeground->setCurrentIndex(highlightForegroundIndex); -@@ -326,14 +333,14 @@ - } - if (m_dirtyBits.testBit(grubGfxmodeDirty)) { - if (ui->kcombobox_gfxmode->currentIndex() <= 0) { -- kError() << "Something went terribly wrong!"; -+ qDebug() << "Something went terribly wrong!"; - } else { - m_settings["GRUB_GFXMODE"] = quoteWord(ui->kcombobox_gfxmode->itemData(ui->kcombobox_gfxmode->currentIndex()).toString()); - } - } - if (m_dirtyBits.testBit(grubGfxpayloadLinuxDirty)) { - if (ui->kcombobox_gfxpayload->currentIndex() <= 0) { -- kError() << "Something went terribly wrong!"; -+ qDebug() << "Something went terribly wrong!"; - } else if (ui->kcombobox_gfxpayload->currentIndex() == 1) { - m_settings.remove("GRUB_GFXPAYLOAD_LINUX"); - } else if (ui->kcombobox_gfxpayload->currentIndex() > 1) { -@@ -455,41 +462,39 @@ - } - - Action saveAction("org.kde.kcontrol.kcmgrub2.save"); -- saveAction.setHelperID("org.kde.kcontrol.kcmgrub2"); -+ saveAction.setHelperId("org.kde.kcontrol.kcmgrub2"); - saveAction.addArgument("rawConfigFileContents", configFileContents.toLocal8Bit()); - saveAction.addArgument("rawDefaultEntry", !m_entries.isEmpty() ? grubDefault : m_settings.value("GRUB_DEFAULT").toLocal8Bit()); - if (m_dirtyBits.testBit(memtestDirty)) { - saveAction.addArgument("memtest", ui->checkBox_memtest->isChecked()); - } --#if KDE_IS_VERSION(4,6,0) -- saveAction.setParentWidget(this); --#endif -- -+/* - if (saveAction.authorize() != Action::Authorized) { - return; - } -- -- KProgressDialog progressDlg(this, i18nc("@title:window Verb (gerund). Refers to current status.", "Saving"), i18nc("@info:progress", "Saving GRUB settings...")); -- progressDlg.setAllowCancel(false); -- progressDlg.setModal(true); -- progressDlg.progressBar()->setMinimum(0); -- progressDlg.progressBar()->setMaximum(0); -- progressDlg.show(); -- connect(saveAction.watcher(), SIGNAL(actionPerformed(ActionReply)), &progressDlg, SLOT(hide())); -- -- ActionReply reply = saveAction.execute(); -- processReply(reply); -- if (reply.succeeded()) { -- KDialog *dialog = new KDialog(this, Qt::Dialog); -- dialog->setCaption(i18nc("@title:window", "Information")); -- dialog->setButtons(KDialog::Ok | KDialog::Details); -+*/ -+ QProgressDialog progressDlg(this, Qt::Dialog); -+ progressDlg.setWindowTitle(i18nc("@title:window Verb (gerund). Refers to current status.", "Saving")); -+ progressDlg.setLabelText(i18nc("@info:progress", "Saving GRUB settings...")); -+ progressDlg.setCancelButton(0); -+ progressDlg.setModal(true); -+ progressDlg.setRange(0,0); -+ progressDlg.show(); -+ -+ -+ ExecuteJob *reply = saveAction.execute(); -+ //connect(reply, SIGNAL(result()), &progressDlg, SLOT(hide())); -+ reply->exec(); -+ progressDlg.hide(); -+ if (!reply->error()) { -+ QDialog *dialog = new QDialog(this, Qt::Dialog); -+ dialog->setWindowTitle(i18nc("@title:window", "Information")); - dialog->setModal(true); -- dialog->setDefaultButton(KDialog::Ok); -- dialog->setEscapeButton(KDialog::Ok); -- KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(), 0, KMessageBox::Notify, reply.data().value("output").toString()); // krazy:exclude=qclasses -+ QDialogButtonBox *btnbox = new QDialogButtonBox(QDialogButtonBox::Ok); -+ KMessageBox::createKMessageBox(dialog, btnbox, QMessageBox::Information, i18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(), 0, KMessageBox::Notify, reply->data().value("output").toString()); // krazy:exclude=qclasses - load(); - } else { -- KMessageBox::detailedError(this, i18nc("@info", "Failed to save GRUB settings."), reply.errorDescription()); -+ KMessageBox::detailedError(this, i18nc("@info", "Failed to save GRUB settings."), reply->errorString()); - } - } - -@@ -559,8 +564,11 @@ - { - if (ui->kcombobox_gfxmode->currentIndex() == 0) { - bool ok; -- QRegExpValidator regExp(QRegExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"), this); -- QString resolution = KInputDialog::getText(i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a GRUB resolution:"), QString(), &ok, this, ®Exp); -+ //QRegExpValidator regExp(QRegExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"), this); -+ QRegExp regExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"); -+ //regExp.setPatternSyntax(QRegExp::Wildcard); -+ //QString resolution = KInputDialog::getText(i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a GRUB resolution:"), QString(), &ok, this, ®Exp); -+ QString resolution = RegExpInputDialog::getText(this, i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a GRUB resolution:"), QString(), regExp, &ok); - if (ok) { - if (!m_resolutions.contains(resolution)) { - QString gfxpayload = ui->kcombobox_gfxpayload->itemData(ui->kcombobox_gfxpayload->currentIndex()).toString(); -@@ -581,8 +589,11 @@ - { - if (ui->kcombobox_gfxpayload->currentIndex() == 0) { - bool ok; -- QRegExpValidator regExp(QRegExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"), this); -- QString resolution = KInputDialog::getText(i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a Linux boot resolution:"), QString(), &ok, this, ®Exp); -+ //QRegExpValidator regExp(QRegExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"), this); -+ QRegExp regExp("\\d{3,4}x\\d{3,4}(x\\d{1,2})?"); -+ //regExp.setPatternSyntax(QRegExp::Wildcard); -+ //QString resolution = KInputDialog::getText(i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a Linux boot resolution:"), QString(), &ok, this, ®Exp); -+ QString resolution = RegExpInputDialog::getText(this, i18nc("@title:window", "Enter screen resolution"), i18nc("@label:textbox", "Please enter a GRUB resolution:"), QString(), regExp, &ok); - if (ok) { - if (!m_resolutions.contains(resolution)) { - QString gfxmode = ui->kcombobox_gfxmode->itemData(ui->kcombobox_gfxmode->currentIndex()).toString(); -@@ -770,8 +781,8 @@ - view->setRootIsDecorated(false); - ui->kcombobox_default->setView(view); - -- ui->kpushbutton_install->setIcon(KIcon("system-software-update")); -- ui->kpushbutton_remove->setIcon(KIcon("list-remove")); -+ ui->kpushbutton_install->setIcon(QIcon::fromTheme(QStringLiteral("system-software-update"))); -+ ui->kpushbutton_remove->setIcon(QIcon::fromTheme(QStringLiteral("list-remove"))); - ui->kpushbutton_remove->setVisible(HAVE_QAPT || HAVE_QPACKAGEKIT); - - QPixmap black(16, 16), transparent(16, 16); -@@ -825,12 +836,12 @@ - ui->kcombobox_highlightForeground->setCurrentIndex(ui->kcombobox_highlightForeground->findData("black")); - ui->kcombobox_highlightBackground->setCurrentIndex(ui->kcombobox_highlightBackground->findData("light-gray")); - -- ui->kpushbutton_preview->setIcon(KIcon("image-png")); -- ui->kpushbutton_create->setIcon(KIcon("insert-image")); -+ ui->kpushbutton_preview->setIcon(QIcon::fromTheme(QStringLiteral("image-png"))); -+ ui->kpushbutton_create->setIcon(QIcon::fromTheme(QStringLiteral("insert-image"))); - ui->kpushbutton_create->setVisible(HAVE_IMAGEMAGICK); - -- ui->kpushbutton_cmdlineDefaultSuggestions->setIcon(KIcon("tools-wizard")); -- ui->kpushbutton_cmdlineDefaultSuggestions->setMenu(new KMenu(ui->kpushbutton_cmdlineDefaultSuggestions)); -+ ui->kpushbutton_cmdlineDefaultSuggestions->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); -+ ui->kpushbutton_cmdlineDefaultSuggestions->setMenu(new QMenu(ui->kpushbutton_cmdlineDefaultSuggestions)); - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Quiet Boot"))->setData("quiet"); - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Show Splash Screen"))->setData("splash"); - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Disable Plymouth"))->setData("noplymouth"); -@@ -838,8 +849,8 @@ - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Turn Off APIC"))->setData("noapic"); - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Turn Off Local APIC"))->setData("nolapic"); - ui->kpushbutton_cmdlineDefaultSuggestions->menu()->addAction(i18nc("@action:inmenu", "Single User Mode"))->setData("single"); -- ui->kpushbutton_cmdlineSuggestions->setIcon(KIcon("tools-wizard")); -- ui->kpushbutton_cmdlineSuggestions->setMenu(new KMenu(ui->kpushbutton_cmdlineSuggestions)); -+ ui->kpushbutton_cmdlineSuggestions->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); -+ ui->kpushbutton_cmdlineSuggestions->setMenu(new QMenu(ui->kpushbutton_cmdlineSuggestions)); - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Quiet Boot"))->setData("quiet"); - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Show Splash Screen"))->setData("splash"); - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Disable Plymouth"))->setData("noplymouth"); -@@ -847,20 +858,20 @@ - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Turn Off APIC"))->setData("noapic"); - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Turn Off Local APIC"))->setData("nolapic"); - ui->kpushbutton_cmdlineSuggestions->menu()->addAction(i18nc("@action:inmenu", "Single User Mode"))->setData("single"); -- ui->kpushbutton_terminalSuggestions->setIcon(KIcon("tools-wizard")); -- ui->kpushbutton_terminalSuggestions->setMenu(new KMenu(ui->kpushbutton_terminalSuggestions)); -+ ui->kpushbutton_terminalSuggestions->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); -+ ui->kpushbutton_terminalSuggestions->setMenu(new QMenu(ui->kpushbutton_terminalSuggestions)); - ui->kpushbutton_terminalSuggestions->menu()->addAction(i18nc("@action:inmenu", "PC BIOS && EFI Console"))->setData("console"); - ui->kpushbutton_terminalSuggestions->menu()->addAction(i18nc("@action:inmenu", "Serial Terminal"))->setData("serial"); - ui->kpushbutton_terminalSuggestions->menu()->addAction(i18nc("@action:inmenu 'Open' is an adjective here, not a verb. 'Open Firmware' is a former IEEE standard.", "Open Firmware Console"))->setData("ofconsole"); -- ui->kpushbutton_terminalInputSuggestions->setIcon(KIcon("tools-wizard")); -- ui->kpushbutton_terminalInputSuggestions->setMenu(new KMenu(ui->kpushbutton_terminalInputSuggestions)); -+ ui->kpushbutton_terminalInputSuggestions->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); -+ ui->kpushbutton_terminalInputSuggestions->setMenu(new QMenu(ui->kpushbutton_terminalInputSuggestions)); - ui->kpushbutton_terminalInputSuggestions->menu()->addAction(i18nc("@action:inmenu", "PC BIOS && EFI Console"))->setData("console"); - ui->kpushbutton_terminalInputSuggestions->menu()->addAction(i18nc("@action:inmenu", "Serial Terminal"))->setData("serial"); - ui->kpushbutton_terminalInputSuggestions->menu()->addAction(i18nc("@action:inmenu 'Open' is an adjective here, not a verb. 'Open Firmware' is a former IEEE standard.", "Open Firmware Console"))->setData("ofconsole"); - ui->kpushbutton_terminalInputSuggestions->menu()->addAction(i18nc("@action:inmenu", "PC AT Keyboard (Coreboot)"))->setData("at_keyboard"); - ui->kpushbutton_terminalInputSuggestions->menu()->addAction(i18nc("@action:inmenu", "USB Keyboard (HID Boot Protocol)"))->setData("usb_keyboard"); -- ui->kpushbutton_terminalOutputSuggestions->setIcon(KIcon("tools-wizard")); -- ui->kpushbutton_terminalOutputSuggestions->setMenu(new KMenu(ui->kpushbutton_terminalOutputSuggestions)); -+ ui->kpushbutton_terminalOutputSuggestions->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); -+ ui->kpushbutton_terminalOutputSuggestions->setMenu(new QMenu(ui->kpushbutton_terminalOutputSuggestions)); - ui->kpushbutton_terminalOutputSuggestions->menu()->addAction(i18nc("@action:inmenu", "PC BIOS && EFI Console"))->setData("console"); - ui->kpushbutton_terminalOutputSuggestions->menu()->addAction(i18nc("@action:inmenu", "Serial Terminal"))->setData("serial"); - ui->kpushbutton_terminalOutputSuggestions->menu()->addAction(i18nc("@action:inmenu 'Open' is an adjective here, not a verb. 'Open Firmware' is a former IEEE standard.", "Open Firmware Console"))->setData("ofconsole"); -@@ -956,18 +967,14 @@ - return fileName; - } - --ActionReply KCMGRUB2::loadFile(GrubFile grubFile) -+ExecuteJob * KCMGRUB2::loadFile(GrubFile grubFile) - { -- Action loadAction("org.kde.kcontrol.kcmgrub2.load"); -- loadAction.setHelperID("org.kde.kcontrol.kcmgrub2"); -+ Action loadAction("org.kde.kcontrol.kcmgrub2.initialize"); -+ loadAction.setHelperId("org.kde.kcontrol.kcmgrub2"); -+ loadAction.addArgument("actionType", actionLoad); - loadAction.addArgument("grubFile", grubFile); --#if KDE_IS_VERSION(4,6,0) -- loadAction.setParentWidget(this); --#endif - -- ActionReply reply = loadAction.execute(); -- processReply(reply); -- return reply; -+ return loadAction.execute(); - } - QString KCMGRUB2::readFile(GrubFile grubFile) - { -@@ -992,13 +999,13 @@ - return stream.readAll(); - } - -- ActionReply reply = loadFile(grubFile); -- if (reply.failed()) { -- kError() << "Error loading:" << fileName; -- kError() << "Error description:" << reply.errorDescription(); -+ ExecuteJob *reply = loadFile(grubFile); -+ if (!reply->exec()) { -+ qDebug() << "Error loading:" << fileName; -+ qDebug() << "Error description:" << reply->errorString(); - return QString(); - } -- return QString::fromLocal8Bit(reply.data().value("rawFileContents").toByteArray()); -+ return QString::fromLocal8Bit(reply->data().value("rawFileContents").toByteArray()); - } - void KCMGRUB2::readEntries() - { -@@ -1030,15 +1037,15 @@ - return; - } - -- ActionReply reply = loadFile(GrubMemtestFile); -- if (reply.failed()) { -- kError() << "Error loading:" << GRUB_MEMTEST; -- kError() << "Error description:" << reply.errorDescription(); -+ ExecuteJob *reply = loadFile(GrubMemtestFile); -+ if (!reply->exec()) { -+ qDebug() << "Error loading:" << GRUB_MEMTEST; -+ qDebug() << "Error description:" << reply->errorString(); - return; - } -- m_memtest = reply.data().value("memtest").toBool(); -+ m_memtest = reply->data().value("memtest").toBool(); - if (m_memtest) { -- m_memtestOn = reply.data().value("memtestOn").toBool(); -+ m_memtestOn = reply->data().value("memtestOn").toBool(); - } - } - void KCMGRUB2::readDevices() -@@ -1050,29 +1057,38 @@ - } - } - -- Action probeAction("org.kde.kcontrol.kcmgrub2.probe"); -- probeAction.setHelperID("org.kde.kcontrol.kcmgrub2"); -+ Action probeAction("org.kde.kcontrol.kcmgrub2.initialize"); -+ probeAction.setHelperId("org.kde.kcontrol.kcmgrub2"); -+ probeAction.addArgument("actionType", actionProbe); - probeAction.addArgument("mountPoints", mountPoints); --#if KDE_IS_VERSION(4,6,0) -- probeAction.setParentWidget(this); --#endif -- if (probeAction.authorize() != Action::Authorized) { -+ -+ QProgressDialog progressDlg(this, Qt::Dialog); -+ progressDlg.setWindowTitle(i18nc("@title:window", "Probing devices")); -+ progressDlg.setLabelText(i18nc("@info:progress", "Probing devices for their GRUB names...")); -+ progressDlg.setCancelButton(0); -+ progressDlg.setModal(true); -+ QProgressBar * mProgressBar = new QProgressBar(this); -+ progressDlg.setBar(mProgressBar); -+ progressDlg.show(); -+ -+ ExecuteJob *reply = probeAction.execute(); -+ //connect(reply, SIGNAL(progressStep(int)), mProgressBar, SLOT(setValue(int))); -+ reply->exec(); -+ -+ if (probeAction.status() != Action::AuthorizedStatus ) { -+ progressDlg.hide(); - return; - } -- -- KProgressDialog progressDlg(this, i18nc("@title:window", "Probing devices"), i18nc("@info:progress", "Probing devices for their GRUB names...")); -- progressDlg.setAllowCancel(false); -- progressDlg.setModal(true); -- progressDlg.show(); -- connect(probeAction.watcher(), SIGNAL(progressStep(int)), progressDlg.progressBar(), SLOT(setValue(int))); -- -- ActionReply reply = probeAction.execute(); -- processReply(reply); -- if (reply.failed()) { -- KMessageBox::detailedError(this, i18nc("@info", "Failed to get GRUB device names."), reply.errorDescription()); -+ -+ progressDlg.hide(); -+ -+ if (reply->error()) { -+ KMessageBox::detailedError(this, i18nc("@info", "Failed to get GRUB device names."), reply->errorString()); - return; -- } -- QStringList grubPartitions = reply.data().value("grubPartitions").toStringList(); -+ }// else { -+ // progressDlg.hide(); -+//} -+ QStringList grubPartitions = reply->data().value("grubPartitions").toStringList(); - if (mountPoints.size() != grubPartitions.size()) { - KMessageBox::error(this, i18nc("@info", "Helper returned malformed device list.")); - return; -@@ -1085,20 +1101,17 @@ - } - void KCMGRUB2::readResolutions() - { -- Action probeVbeAction("org.kde.kcontrol.kcmgrub2.probevbe"); -- probeVbeAction.setHelperID("org.kde.kcontrol.kcmgrub2"); --#if KDE_IS_VERSION(4,6,0) -- probeVbeAction.setParentWidget(this); --#endif -+ Action probeVbeAction("org.kde.kcontrol.kcmgrub2.initialize"); -+ probeVbeAction.setHelperId("org.kde.kcontrol.kcmgrub2"); -+ probeVbeAction.addArgument("actionType", actionProbevbe); - -- ActionReply reply = probeVbeAction.execute(); -- processReply(reply); -- if (reply.failed()) { -+ ExecuteJob *reply = probeVbeAction.execute(); -+ if (!reply->exec()) { - return; - } - - m_resolutions.clear(); -- m_resolutions = reply.data().value("gfxmodes").toStringList(); -+ m_resolutions = reply->data().value("gfxmodes").toStringList(); - } - - void KCMGRUB2::sortResolutions() -@@ -1140,8 +1153,8 @@ - ui->kcombobox_gfxpayload->addItem(resolution, resolution); - } - } -- --void KCMGRUB2::processReply(ActionReply &reply) -+/* -+void KCMGRUB2::processReply(ExecuteJob * reply) - { - if (reply.type() == ActionReply::Success || reply.type() == ActionReply::KAuthError) { - return; -@@ -1171,6 +1184,7 @@ - reply.addData(QLatin1String("errorMessage"), errorMessage); - reply.setErrorDescription(i18nc("@info", "Command: <command>%1</command><nl/>Error code: <numid>%2</numid><nl/>Error message:<nl/><message>%3</message>", reply.data().value(QLatin1String("command")).toStringList().join(QLatin1String(" ")), reply.errorCode(), errorMessage)); - } -+*/ - QString KCMGRUB2::parseTitle(const QString &line) - { - QChar ch; -@@ -1230,8 +1244,8 @@ - //If the first word is known, process the rest of the line - if (word == QLatin1String("menuentry")) { - if (inEntry) { -- kError() << "Malformed configuration file! Aborting entries' parsing."; -- kDebug() << "A 'menuentry' directive was detected inside the scope of a menuentry."; -+ qDebug() << "Malformed configuration file! Aborting entries' parsing."; -+ qDebug() << "A 'menuentry' directive was detected inside the scope of a menuentry."; - m_entries.clear(); - return; - } -@@ -1245,8 +1259,8 @@ - continue; - } else if (word == QLatin1String("submenu")) { - if (inEntry) { -- kError() << "Malformed configuration file! Aborting entries' parsing."; -- kDebug() << "A 'submenu' directive was detected inside the scope of a menuentry."; -+ qDebug() << "Malformed configuration file! Aborting entries' parsing."; -+ qDebug() << "A 'submenu' directive was detected inside the scope of a menuentry."; - m_entries.clear(); - return; - } -@@ -1262,8 +1276,8 @@ - continue; - } else if (word == QLatin1String("linux")) { - if (!inEntry) { -- kError() << "Malformed configuration file! Aborting entries' parsing."; -- kDebug() << "A 'linux' directive was detected outside the scope of a menuentry."; -+ qDebug() << "Malformed configuration file! Aborting entries' parsing."; -+ qDebug() << "A 'linux' directive was detected outside the scope of a menuentry."; - m_entries.clear(); - return; - } -diff -Naur a/src/kcm_grub2.h b/src/kcm_grub2.h ---- a/src/kcm_grub2.h 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/kcm_grub2.h 2015-12-04 11:57:10.192564672 +0800 -@@ -20,9 +20,11 @@ - - //Qt - #include <QBitArray> -- -+#include <QProgressDialog> -+#include <QDebug> - //KDE - #include <KCModule> -+ - namespace KAuth - { - class ActionReply; -@@ -89,7 +91,7 @@ - QString convertToGRUBFileName(const QString &fileName); - QString convertToLocalFileName(const QString &grubFileName); - -- ActionReply loadFile(GrubFile grubFile); -+ ExecuteJob * loadFile(GrubFile grubFile); - QString readFile(GrubFile grubFile); - void readEntries(); - void readSettings(); -diff -Naur a/src/removeDlg.cpp b/src/removeDlg.cpp ---- a/src/removeDlg.cpp 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/removeDlg.cpp 2015-12-04 11:57:10.192564672 +0800 -@@ -28,7 +28,8 @@ - - //KDE - #include <KMessageBox> --#include <KProgressDialog> -+//Qt -+#include <QProgressDialog> - - //Project - #include "entry.h" -@@ -36,13 +37,22 @@ - //Ui - #include "ui_removeDlg.h" - --RemoveDialog::RemoveDialog(const QList<Entry> &entries, QWidget *parent, Qt::WFlags flags) : KDialog(parent, flags) -+RemoveDialog::RemoveDialog(const QList<Entry> &entries, QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags) - { - QWidget *widget = new QWidget(this); - ui = new Ui::RemoveDialog; - ui->setupUi(widget); -- setMainWidget(widget); -- enableButtonOk(false); -+ QVBoxLayout *mainLayout = new QVBoxLayout; -+ setLayout(mainLayout); -+ mainLayout->addWidget(widget); -+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); -+ mainLayout->addWidget(buttonBox); -+ buttonBox->button(QDialogButtonBox::Ok)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton)); -+ buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogCancelButton)); -+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(SlotOkButtonClicked())); -+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); -+ buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); -+ - setWindowTitle(i18nc("@title:window", "Remove Old Entries")); - setWindowIcon(KIcon("list-remove")); - -@@ -57,8 +67,8 @@ - #endif - - detectCurrentKernelImage(); -- KProgressDialog progressDlg(this, i18nc("@title:window", "Finding Old Entries"), i18nc("@info:progress", "Finding Old Entries...")); -- progressDlg.setAllowCancel(false); -+ QProgressDialog progressDlg(this, i18nc("@title:window", "Finding Old Entries"), i18nc("@info:progress", "Finding Old Entries...")); -+ progressDlg.setCancelButton(0); - progressDlg.setModal(true); - progressDlg.show(); - bool found = false; -@@ -97,7 +107,7 @@ - ui->treeWidget->resizeColumnToContents(0); - ui->treeWidget->setMinimumWidth(ui->treeWidget->columnWidth(0) + ui->treeWidget->sizeHintForRow(0)); - connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotItemChanged())); -- enableButtonOk(true); -+ buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - } else { - KMessageBox::sorry(this, i18nc("@info", "No removable entries were found.")); - QTimer::singleShot(0, this, SLOT(reject())); -@@ -108,9 +118,9 @@ - delete m_backend; - delete ui; - } --void RemoveDialog::slotButtonClicked(int button) -+void RemoveDialog::slotOkButtonClicked(int button) - { -- if (button == KDialog::Ok) { -+ - for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) { - if (ui->treeWidget->topLevelItem(i)->checkState(0) == Qt::Checked) { - QString packageName = ui->treeWidget->topLevelItem(i)->data(0, Qt::UserRole).toString(); -@@ -129,24 +139,23 @@ - m_backend->undoChanges(); - } - return; -- } -- KDialog::slotButtonClicked(button); -+ this->accept(); - } - void RemoveDialog::slotItemChanged() - { - for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) { - if (ui->treeWidget->topLevelItem(i)->checkState(0) == Qt::Checked) { -- enableButtonOk(true); -+ this->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - return; - } - } -- enableButtonOk(false); -+ this->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - } - void RemoveDialog::slotProgress(const QString &status, int percentage) - { - if (!m_progressDlg) { -- m_progressDlg = new KProgressDialog(this, i18nc("@title:window", "Removing Old Entries")); -- m_progressDlg->setAllowCancel(false); -+ m_progressDlg = new QProgressDialog(this, i18nc("@title:window", "Removing Old Entries")); -+ m_progressDlg->setCancelButton(0); - m_progressDlg->setModal(true); - m_progressDlg->show(); - } -diff -Naur a/src/removeDlg.h b/src/removeDlg.h ---- a/src/removeDlg.h 2013-10-12 18:34:15.000000000 +0800 -+++ b/src/removeDlg.h 2015-12-04 11:57:10.193564709 +0800 -@@ -22,8 +22,9 @@ - #define REMOVEDLG_H - - //KDE --#include <KDialog> --class KProgressDialog; -+#include <QDialog> -+#include <QProgressDialog> -+class QProgressDialog; - - //Project - #include <config.h> -@@ -42,14 +43,14 @@ - class RemoveDialog; - } - --class RemoveDialog : public KDialog -+class RemoveDialog : public QDialog - { - Q_OBJECT - public: - explicit RemoveDialog(const QList<Entry> &entries, QWidget *parent = 0, Qt::WFlags flags = 0); - virtual ~RemoveDialog(); - protected Q_SLOTS: -- virtual void slotButtonClicked(int button); -+ virtual void slotOkButtonClicked(); - private Q_SLOTS: - void slotItemChanged(); - void slotProgress(const QString &status, int percentage); -diff -Naur a/src/widgets/regexpinputdialog.cpp b/src/widgets/regexpinputdialog.cpp ---- a/src/widgets/regexpinputdialog.cpp 1970-01-01 08:00:00.000000000 +0800 -+++ b/src/widgets/regexpinputdialog.cpp 2015-12-04 11:57:10.193564709 +0800 -@@ -0,0 +1,57 @@ -+#include <QtGui> -+#include "regexpinputdialog.h" -+ -+RegExpInputDialog::RegExpInputDialog(QWidget *parent, Qt::WindowFlags flags) : -+QDialog(parent) -+{ -+if(flags!=0) setWindowFlags(flags); -+QVBoxLayout *l=new QVBoxLayout(this); -+ -+label=new QLabel(this); -+ -+regExp=QRegExp("*"); -+regExp.setPatternSyntax(QRegExp::Wildcard); -+validator=new QRegExpValidator(regExp); -+ -+text=new QLineEdit(this); -+text->setValidator(validator); -+connect(text, SIGNAL(textChanged(QString)), this, SLOT(checkValid(QString))); -+ -+buttonBox=new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, Qt::Horizontal, this); -+connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); -+connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); -+ -+l->addWidget(label); -+l->addWidget(text); -+l->addWidget(buttonBox); -+} -+ -+void RegExpInputDialog::setTitle(const QString &title){ setWindowTitle(title); } -+void RegExpInputDialog::setLabelText(const QString &label){ this->label->setText(label); } -+void RegExpInputDialog::setText(const QString &text){ this->text->setText(text); } -+ -+void RegExpInputDialog::setRegExp(const QRegExp ®Exp){ -+validator->setRegExp(regExp); -+checkValid(text->text()); -+} -+ -+QString RegExpInputDialog::getLabelText(){ return label->text(); } -+QString RegExpInputDialog::getText(){ return text->text(); } -+ -+void RegExpInputDialog::checkValid(const QString &text){ -+QString _text=QString(text); -+int pos=0; -+bool valid=validator->validate(_text, pos)==QRegExpValidator::Acceptable; -+buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid); -+} -+ -+QString RegExpInputDialog::getText(QWidget *parent, const QString &title, const QString &label, const QString &text, const QRegExp ®Exp, bool *ok, Qt::WindowFlags flags){ -+RegExpInputDialog *r=new RegExpInputDialog(parent, flags); -+r->setTitle(title); -+r->setLabelText(label); -+r->setText(text); -+r->setRegExp(regExp); -+*ok=r->exec()==QDialog::Accepted; -+if(*ok) return r->getText(); -+else return QString(); -+} -\ No newline at end of file -diff -Naur a/src/widgets/regexpinputdialog.h b/src/widgets/regexpinputdialog.h ---- a/src/widgets/regexpinputdialog.h 1970-01-01 08:00:00.000000000 +0800 -+++ b/src/widgets/regexpinputdialog.h 2015-12-04 11:57:10.193564709 +0800 -@@ -0,0 +1,45 @@ -+#ifndef REGEXPINPUTDIALOG_H -+#define REGEXPINPUTDIALOG_H -+ -+#include <QDialog> -+#include <QLineEdit> -+#include <QDialogButtonBox> -+#include <QLabel> -+#include <QVBoxLayout> -+#include <QPushButton> -+ -+class QLabel; -+class QLineEdit; -+class QDialogButtonBox; -+class QRegExpValidator; -+ -+class RegExpInputDialog : public QDialog -+{ -+Q_OBJECT -+public: -+explicit RegExpInputDialog(QWidget *parent = 0, Qt::WindowFlags=0); -+ -+void setTitle(const QString &title); -+void setLabelText(const QString &label); -+void setText(const QString &text); -+void setRegExp(const QRegExp ®Exp); -+ -+QString getLabelText(); -+QString getText(); -+ -+static QString getText(QWidget *parent, const QString &title, const QString &label, const QString &text, const QRegExp ®Exp, bool *ok, Qt::WindowFlags flags=0); -+ -+signals: -+ -+private slots: -+void checkValid(const QString &text); -+ -+private: -+QLabel *label; -+QLineEdit *text; -+QDialogButtonBox *buttonBox; -+QRegExp regExp; -+QRegExpValidator *validator; -+}; -+ -+#endif // REGEXPINPUTDIALOG_H -\ No newline at end of file -diff -Naur a/ui/kcm_grub2.ui b/ui/kcm_grub2.ui ---- a/ui/kcm_grub2.ui 2013-10-12 18:34:15.000000000 +0800 -+++ b/ui/kcm_grub2.ui 2015-12-04 11:57:10.194564745 +0800 -@@ -12,7 +12,7 @@ - </property> - <layout class="QGridLayout" name="gridLayout_6"> - <item row="0" column="0"> -- <widget class="KTabWidget" name="ktabwidget"> -+ <widget class="QTabWidget" name="ktabwidget"> - <property name="currentIndex"> - <number>0</number> - </property> -@@ -219,7 +219,7 @@ - </widget> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_remove"> -+ <widget class="QPushButton" name="kpushbutton_remove"> - <property name="text"> - <string comment="@action:button">Remove Old Entries</string> - </property> -@@ -357,14 +357,14 @@ - <widget class="KUrlRequester" name="kurlrequester_background"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_preview"> -+ <widget class="QPushButton" name="kpushbutton_preview"> - <property name="text"> - <string comment="@action:button">Preview</string> - </property> - </widget> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_create"> -+ <widget class="QPushButton" name="kpushbutton_create"> - <property name="text"> - <string comment="@action:button">Create</string> - </property> -@@ -424,7 +424,7 @@ - <widget class="KLineEdit" name="klineedit_cmdlineDefault"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_cmdlineDefaultSuggestions"> -+ <widget class="QPushButton" name="kpushbutton_cmdlineDefaultSuggestions"> - <property name="text"> - <string comment="@action:button">Suggestions</string> - </property> -@@ -445,7 +445,7 @@ - <widget class="KLineEdit" name="klineedit_cmdline"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_cmdlineSuggestions"> -+ <widget class="QPushButton" name="kpushbutton_cmdlineSuggestions"> - <property name="text"> - <string comment="@action:button">Suggestions</string> - </property> -@@ -475,7 +475,7 @@ - <widget class="KLineEdit" name="klineedit_terminal"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_terminalSuggestions"> -+ <widget class="QPushButton" name="kpushbutton_terminalSuggestions"> - <property name="text"> - <string comment="@action:button">Suggestions</string> - </property> -@@ -496,7 +496,7 @@ - <widget class="KLineEdit" name="klineedit_terminalInput"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_terminalInputSuggestions"> -+ <widget class="QPushButton" name="kpushbutton_terminalInputSuggestions"> - <property name="text"> - <string comment="@action:button">Suggestions</string> - </property> -@@ -517,7 +517,7 @@ - <widget class="KLineEdit" name="klineedit_terminalOutput"/> - </item> - <item> -- <widget class="KPushButton" name="kpushbutton_terminalOutputSuggestions"> -+ <widget class="QPushButton" name="kpushbutton_terminalOutputSuggestions"> - <property name="text"> - <string comment="@action:button">Suggestions</string> - </property> -@@ -597,7 +597,7 @@ - </property> - <layout class="QGridLayout" name="gridLayout_8"> - <item row="0" column="0"> -- <widget class="KPushButton" name="kpushbutton_install"> -+ <widget class="QPushButton" name="kpushbutton_install"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> - <horstretch>0</horstretch> -@@ -630,21 +630,10 @@ - <header>klineedit.h</header> - </customwidget> - <customwidget> -- <class>KPushButton</class> -- <extends>QPushButton</extends> -- <header>kpushbutton.h</header> -- </customwidget> -- <customwidget> - <class>KUrlRequester</class> - <extends>QFrame</extends> - <header>kurlrequester.h</header> - </customwidget> -- <customwidget> -- <class>KTabWidget</class> -- <extends>QTabWidget</extends> -- <header>ktabwidget.h</header> -- <container>1</container> -- </customwidget> - </customwidgets> - <resources/> - <connections/> |