Advertisement
Guest User

Untitled

a guest
Dec 13th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 41.11 KB | None | 0 0
  1. diff --git cmake/modules/MacroLogFeature.cmake cmake/modules/MacroLogFeature.cmake
  2. index 45e27b6..631c7ac 100644
  3. --- cmake/modules/MacroLogFeature.cmake
  4. +++ cmake/modules/MacroLogFeature.cmake
  5. @@ -7,7 +7,7 @@
  6.  #   FEATURE: name of the feature, e.g. "libjpeg"
  7.  #   DESCRIPTION: description what this feature provides
  8.  #   URL: home page
  9. -#   REQUIRED: TRUE or FALSE, indicating whether the featue is required
  10. +#   REQUIRED: TRUE or FALSE, indicating whether the feature is required
  11.  #   MIN_VERSION: minimum version number. empty string if unneeded
  12.  #   COMMENTS: More info you may want to provide.  empty string if unnecessary
  13.  #
  14. diff --git format_sources format_sources
  15. new file mode 100644
  16. index 0000000..4416b43
  17. --- /dev/null
  18. +++ format_sources
  19. @@ -0,0 +1 @@
  20. +*.cpp *.cc *.h : astyle --indent=spaces=4 --brackets=linux --indent-labels --pad-oper --unpad-paren --pad-header --keep-one-line-statements --convert-tabs --indent-preprocessor $TMPFILE
  21. diff --git other/kcm_grub2.desktop other/kcm_grub2.desktop
  22. index f4c3e5f..e1f6d5d 100644
  23. --- other/kcm_grub2.desktop
  24. +++ other/kcm_grub2.desktop
  25. @@ -31,6 +31,7 @@ Name[pl]=Program rozruchowy GRUB2
  26.  Name[pt]=Gestor de Arranque GRUB2
  27.  Name[pt_BR]=Gerenciador de Inicialização GRUB2
  28.  Name[ru]=Загрузчик GRUB2
  29. +Name[sk]=Bootloader GRUB2
  30.  Name[sv]=GRUB2 startprogram
  31.  Name[uk]=Завантажувач GRUB2
  32.  Name[x-test]=xxGRUB2 Bootloaderxx
  33. @@ -39,17 +40,24 @@ Name[zh_TW]=GRUB2 開機載入器
  34.  Comment=Customize the GRUB2 bootloader
  35.  Comment[ca]=Personalitza el gestor d'arrencada Grub2
  36.  Comment[cs]=Upravit zavaděč GRUB2
  37. +Comment[da]=Tilpas GRUB2-bootloaderen
  38. +Comment[de]=GRUB2-Bootloader einrichten
  39.  Comment[el]=Προσαρμογή του προγράμματος εκκίνησης GRUB2
  40.  Comment[es]=Personalizar el cargador de arranque de GRUB2
  41. +Comment[et]=GRUB2 alglaaduri kohandamine
  42. +Comment[fr]=Personnalise le chargeur d'amorçage GRUB2
  43.  Comment[ga]=Saincheap luchtóir tosaithe GRUB2
  44.  Comment[hu]=A GRUB2 rendszerbetöltő testreszabása
  45.  Comment[it]=Configura il bootloader GRUB2
  46. +Comment[nb]=Tilpass GRUB2 oppstartslaster
  47.  Comment[nds]=Systeemstarter Grub2 topassen
  48.  Comment[nl]=De GRUB2-bootloader aanpassen
  49.  Comment[pa]=ਗਰਬ2 ਬੂਟਲੋਡਰ ਨੂੰ ਕਸਟਮਾਈਜ਼ ਕਰੋ
  50. +Comment[pl]=Dostosuj program rozruchowy GRUB2
  51.  Comment[pt]=Personalizar o gestor de arranque GRUB2
  52.  Comment[pt_BR]=Personalize o gerenciador de inicialização GRUB2
  53.  Comment[ru]=Настройка загрузчика GRUB2
  54. +Comment[sk]=Prispôsobiť bootloader GRUB2
  55.  Comment[sv]=Anpassa GRUB2 startprogram
  56.  Comment[uk]=Налаштування завантажувача GRUB2
  57.  Comment[x-test]=xxCustomize the GRUB2 bootloaderxx
  58. @@ -60,10 +68,13 @@ X-KDE-Keywords[da]=grub,boot,menu,indgange,standard,timeout,tidsudløb,adgangsko
  59.  X-KDE-Keywords[el]=grub,boot,menu,entries,default,timeout,password,color,splash,image,bootloader
  60.  X-KDE-Keywords[es]=grub,arranque,menú,entradas,predeterminado,tiempo,contraseña,color,splash,imagen,cargador de arranque
  61.  X-KDE-Keywords[et]=grub,alglaadimine,buutimine,kirjed,vaikimisi,aegumine,parool,värv,tiitelkuva,pilt,alglaadur
  62. +X-KDE-Keywords[fr]=grub,amorçage,menu,entrées,par défaut,temps imparti,mot de passe,couleur,écran d'accueil,image,chargeur d'amorçage
  63.  X-KDE-Keywords[ga]=grub,tosaigh,tosú,roghchlár,iontrálacha,réamhshocrú,teorainn ama,focal faire,dath,splancscáileán,íomhá,luchtóir tosaithe
  64.  X-KDE-Keywords[hu]=grub,betöltés,menü,bejegyzések,alapértelmezett,időtúllépés,jelszó,szín,indítóképernyő,kép,rendszerbetöltő
  65.  X-KDE-Keywords[it]=grub,boot,menu,voci,predefinito,scadenza,password,colore,splash,immagine,bootloader
  66. +X-KDE-Keywords[nb]=grub,oppstart,meny,oppføringer,standard,tidsavbrudd,passord,farge,velkomst,bilde,oppstartslaster
  67.  X-KDE-Keywords[nl]=grub,boot,menu,items,standaard,timeout,wachtwoord,kleur,splash,afbeelding,bootloader
  68. +X-KDE-Keywords[pl]=grub,uruchamianie,menu,wpisy,domyślne,czas oczekiwania,hasło,kolor,ekran powitalny,obraz,bootloader
  69.  X-KDE-Keywords[pt]=grub,arranque,menu,itens,predefinido,tempo-limite,senha,cor,ecrã inicial,imagem,gestor de arranque
  70.  X-KDE-Keywords[pt_BR]=grub,inicialização,menu,entradas,padrão,tempo de espera,senha,boot,cor,splash,imagem,carregador de inicialização
  71.  X-KDE-Keywords[ru]=grub,boot,menu,entries,default,timeout,password,color,splash,image,bootloader,загрузка,загрузчик,пароль,меню,ядра,образ,приветствие,цвета,время ожидания
  72. diff --git src/helper/helper.cpp src/helper/helper.cpp
  73. index 801fc65..39b7ddd 100644
  74. --- src/helper/helper.cpp
  75. +++ src/helper/helper.cpp
  76. @@ -15,19 +15,23 @@
  77.   * with this program. If not, see <http://www.gnu.org/licenses/>.              *
  78.   *******************************************************************************/
  79.  
  80. +//Krazy
  81. +//krazy:excludeall=cpp
  82. +
  83.  //Own
  84.  #include "helper.h"
  85.  
  86.  //Qt
  87. -#include <QtCore/QDir>
  88. -#include <QtCore/QTextCodec>
  89. -#include <QtCore/QTextStream>
  90. +#include <QDir>
  91. +#include <QTextCodec>
  92. +#include <QTextStream>
  93.  
  94.  //KDE
  95. +#include <KDebug>
  96. +#include <kdeversion.h>
  97.  #include <KGlobal>
  98.  #include <KLocale>
  99.  #include <KProcess>
  100. -#include <KShell>
  101.  #include <KAuth/HelperSupport>
  102.  
  103.  //Project
  104. @@ -40,14 +44,91 @@
  105.  Helper::Helper()
  106.  {
  107.      KGlobal::locale()->insertCatalog("kcm-grub2");
  108. +    //TODO: system encoding should be sent from the core application
  109.      QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
  110.  }
  111.  
  112. +ActionReply Helper::executeCommand(const QStringList &command)
  113. +{
  114. +    ActionReply reply;
  115. +    reply.addData("command", command);
  116. +
  117. +    KProcess process;
  118. +    process.setProgram(command);
  119. +    process.setOutputChannelMode(KProcess::MergedChannels);
  120. +
  121. +    kDebug() << "Executing" << command.join(" ");
  122. +    int exitCode = process.execute();
  123. +    reply.addData("exitCode", exitCode);
  124. +    QString output = QString::fromUtf8(process.readAll());
  125. +    reply.addData("output", output);
  126. +
  127. +    if (exitCode == 0) {
  128. +        return reply;
  129. +    }
  130. +
  131. +    QString errorMessage;
  132. +    switch (exitCode) {
  133. +    case -2:
  134. +        errorMessage = i18nc("@info", "The process could not be started.");
  135. +        break;
  136. +    case -1:
  137. +        errorMessage = i18nc("@info", "The process crashed.");
  138. +        break;
  139. +    default:
  140. +        errorMessage = output;
  141. +        break;
  142. +    }
  143. +    QString errorDescription = i18nc("@info", "Command: <command>%1</command><nl/>Error code: <numid>%2</numid><nl/>Error message:<nl/><message>%3</message>", command.join(" "), exitCode, errorMessage);
  144. +
  145. +    reply = ActionReply::HelperErrorReply;
  146. +    reply.setErrorCode(exitCode);
  147. +    reply.addData("errorMessage", errorMessage);
  148. +#if KDE_IS_VERSION(4,7,0)
  149. +    reply.setErrorDescription(errorDescription);
  150. +#else
  151. +    reply.addData("errorDescription", errorDescription);
  152. +#endif
  153. +    return reply;
  154. +}
  155. +
  156.  ActionReply Helper::defaults(QVariantMap args)
  157.  {
  158. +    ActionReply reply;
  159.      QString configFileName = args.value("configFileName").toString();
  160.      QString originalConfigFileName = configFileName + ".original";
  161. -    return (QFile::exists(originalConfigFileName) && QFile::remove(configFileName) && QFile::copy(originalConfigFileName, configFileName) ? ActionReply::SuccessReply : ActionReply::HelperErrorReply);
  162. +
  163. +    if (!QFile::exists(originalConfigFileName)) {
  164. +        reply = ActionReply::HelperErrorReply;
  165. +        QString errorDescription = i18nc("@info", "Original configuration file <filename>%1</filename> does not exist.", originalConfigFileName);
  166. +#if KDE_IS_VERSION(4,7,0)
  167. +        reply.setErrorDescription(errorDescription);
  168. +#else
  169. +        reply.addData("errorDescription", errorDescription);
  170. +#endif
  171. +        return reply;
  172. +    }
  173. +    if (!QFile::remove(configFileName)) {
  174. +        reply = ActionReply::HelperErrorReply;
  175. +        QString errorDescription = i18nc("@info", "Cannot remove current configuration file <filename>%1</filename>.", configFileName);
  176. +#if KDE_IS_VERSION(4,7,0)
  177. +        reply.setErrorDescription(errorDescription);
  178. +#else
  179. +        reply.addData("errorDescription", errorDescription);
  180. +#endif
  181. +        return reply;
  182. +    }
  183. +    if (!QFile::copy(originalConfigFileName, configFileName)) {
  184. +        reply = ActionReply::HelperErrorReply;
  185. +        QString errorDescription = i18nc("@info", "Cannot copy original configuration file <filename>%1</filename> to <filename>%2</filename>.", originalConfigFileName, configFileName);
  186. +#if KDE_IS_VERSION(4,7,0)
  187. +        reply.setErrorDescription(errorDescription);
  188. +#else
  189. +        reply.addData("errorDescription", errorDescription);
  190. +#endif
  191. +        return reply;
  192. +    }
  193. +    return reply;
  194.  }
  195.  ActionReply Helper::install(QVariantMap args)
  196.  {
  197. @@ -55,36 +136,34 @@ ActionReply Helper::install(QVariantMap args)
  198.      QString installExePath = args.value("installExePath").toString();
  199.      QString partition = args.value("partition").toString();
  200.      QString mountPoint = args.value("mountPoint").toString();
  201. +    bool mbrInstall = args.value("mbrInstall").toBool();
  202.  
  203.      if (mountPoint.isEmpty()) {
  204.          for (int i = 0; QDir(mountPoint = QString("%1/kcm-grub2-%2").arg(QDir::tempPath(), QString::number(i))).exists(); i++);
  205. -        if (QDir().mkpath(mountPoint)) {
  206. -            KProcess mount;
  207. -            mount.setShellCommand(QString("mount %1 %2").arg(KShell::quoteArg(partition), KShell::quoteArg(mountPoint)));
  208. -            mount.setOutputChannelMode(KProcess::MergedChannels);
  209. -            if (mount.execute() != 0) {
  210. -                reply = ActionReply::HelperErrorReply;
  211. -                reply.addData("output", mount.readAll());
  212. -                return reply;
  213. -            }
  214. -        } else {
  215. +        if (!QDir().mkpath(mountPoint)) {
  216.              reply = ActionReply::HelperErrorReply;
  217. -            reply.addData("output", i18nc("@info", "Failed to create temporary mount point."));
  218. +            QString errorDescription = i18nc("@info", "Failed to create temporary mount point.");
  219. +#if KDE_IS_VERSION(4,7,0)
  220. +            reply.setErrorDescription(errorDescription);
  221. +#else
  222. +            reply.addData("errorDescription", errorDescription);
  223. +#endif
  224.              return reply;
  225.          }
  226. +        ActionReply mountReply = executeCommand(QStringList() << "mount" << partition << mountPoint);
  227. +        if (mountReply.failed()) {
  228. +            return mountReply;
  229. +        }
  230.      }
  231.  
  232. -    KProcess grub_install;
  233. -    grub_install.setShellCommand(QString("%1 --root-directory=%2 %3").arg(installExePath, KShell::quoteArg(mountPoint), KShell::quoteArg(partition.remove(QRegExp("\\d+")))));
  234. -    grub_install.setOutputChannelMode(KProcess::MergedChannels);
  235. -    if (grub_install.execute() != 0) {
  236. -        reply = ActionReply::HelperErrorReply;
  237. -        reply.addData("output", grub_install.readAll());
  238. -        return reply;
  239. +    QStringList grub_installCommand;
  240. +    grub_installCommand << installExePath << "--root-directory" << mountPoint;
  241. +    if (mbrInstall) {
  242. +        grub_installCommand << partition.remove(QRegExp("\\d+"));
  243. +    } else {
  244. +        grub_installCommand << "--force" << partition;
  245.      }
  246. -
  247. -    reply.addData("output", grub_install.readAll());
  248. -    return reply;
  249. +    return executeCommand(grub_installCommand);
  250.  }
  251.  ActionReply Helper::load(QVariantMap args)
  252.  {
  253. @@ -94,12 +173,15 @@ ActionReply Helper::load(QVariantMap args)
  254.      QFile file(fileName);
  255.      if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
  256.          reply = ActionReply::HelperErrorReply;
  257. -        reply.addData("output", file.errorString());
  258. +#if KDE_IS_VERSION(4,7,0)
  259. +        reply.setErrorDescription(file.errorString());
  260. +#else
  261. +        reply.addData("errorDescription", file.errorString());
  262. +#endif
  263.          return reply;
  264.      }
  265.  
  266.      QTextStream stream(&file);
  267. -    stream.setCodec("UTF-8");
  268.      reply.addData("fileContents", stream.readAll());
  269.      return reply;
  270.  }
  271. @@ -109,18 +191,14 @@ ActionReply Helper::probe(QVariantMap args)
  272.      QString probeExePath = args.value("probeExePath").toString();
  273.      QStringList mountPoints = args.value("mountPoints").toStringList();
  274.  
  275. -    KProcess grub_probe;
  276.      QStringList grubPartitions;
  277.      HelperSupport::progressStep(0);
  278.      for (int i = 0; i < mountPoints.size(); i++) {
  279. -        grub_probe.setShellCommand(QString("%1 -t drive %2").arg(probeExePath, KShell::quoteArg(mountPoints.at(i))));
  280. -        grub_probe.setOutputChannelMode(KProcess::MergedChannels);
  281. -        if (grub_probe.execute() != 0) {
  282. -            reply = ActionReply::HelperErrorReply;
  283. -            reply.addData("output", grub_probe.readAll());
  284. -            return reply;
  285. +        ActionReply grub_probeReply = executeCommand(QStringList() << probeExePath << "-t" << "drive" << mountPoints.at(i));
  286. +        if (grub_probeReply.failed()) {
  287. +            return grub_probeReply;
  288.          }
  289. -        grubPartitions.append(grub_probe.readAll().trimmed());
  290. +        grubPartitions.append(grub_probeReply.data().value("output").toString().trimmed());
  291.          HelperSupport::progressStep((i + 1) * 100. / mountPoints.size());
  292.      }
  293.  
  294. @@ -167,16 +245,18 @@ ActionReply Helper::save(QVariantMap args)
  295.      QFile::copy(configFileName, configFileName + ".original");
  296.  
  297.      QFile file(configFileName);
  298. -    if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
  299. -        QTextStream stream(&file);
  300. -        stream.setCodec("UTF-8");
  301. -        stream << configFileContents;
  302. -        file.close();
  303. -    } else {
  304. +    if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
  305.          reply = ActionReply::HelperErrorReply;
  306. -        reply.addData("output", file.errorString());
  307. +#if KDE_IS_VERSION(4,7,0)
  308. +        reply.setErrorDescription(file.errorString());
  309. +#else
  310. +        reply.addData("errorDescription", file.errorString());
  311. +#endif
  312.          return reply;
  313.      }
  314. +    QTextStream stream(&file);
  315. +    stream << configFileContents;
  316. +    file.close();
  317.  
  318.      if (args.contains("memtest")) {
  319.          QFile::Permissions permissions = QFile::permissions(memtestFileName);
  320. @@ -188,26 +268,17 @@ ActionReply Helper::save(QVariantMap args)
  321.          QFile::setPermissions(memtestFileName, permissions);
  322.      }
  323.  
  324. -    KProcess grub_mkconfig;
  325. -    grub_mkconfig.setShellCommand(QString("%1 -o %2").arg(mkconfigExePath, KShell::quoteArg(menuFileName)));
  326. -    grub_mkconfig.setOutputChannelMode(KProcess::MergedChannels);
  327. -    if (grub_mkconfig.execute() != 0) {
  328. -        reply = ActionReply::HelperErrorReply;
  329. -        reply.addData("output", grub_mkconfig.readAll());
  330. -        return reply;
  331. +    ActionReply grub_mkconfigReply = executeCommand(QStringList() << mkconfigExePath << "-o" << menuFileName);
  332. +    if (grub_mkconfigReply.failed()) {
  333. +        return grub_mkconfigReply;
  334.      }
  335.  
  336. -    KProcess grub_set_default;
  337. -    grub_set_default.setShellCommand(QString("%1 %2").arg(set_defaultExePath, defaultEntry));
  338. -    grub_set_default.setOutputChannelMode(KProcess::MergedChannels);
  339. -    if (grub_set_default.execute() != 0) {
  340. -        reply = ActionReply::HelperErrorReply;
  341. -        reply.addData("output", grub_set_default.readAll());
  342. -        return reply;
  343. +    ActionReply grub_set_defaultReply = executeCommand(QStringList() << set_defaultExePath << defaultEntry);
  344. +    if (grub_set_defaultReply.failed()) {
  345. +        return grub_set_defaultReply;
  346.      }
  347.  
  348. -    reply.addData("output", grub_mkconfig.readAll());
  349. -    return reply;
  350. +    return grub_mkconfigReply;
  351.  }
  352.  
  353.  KDE4_AUTH_HELPER_MAIN("org.kde.kcontrol.kcmgrub2", Helper)
  354. diff --git src/helper/helper.h src/helper/helper.h
  355. index 3530574..82bbed4 100644
  356. --- src/helper/helper.h
  357. +++ src/helper/helper.h
  358. @@ -27,6 +27,8 @@ class Helper : public QObject
  359.      Q_OBJECT
  360.  public:
  361.      Helper();
  362. +private:
  363. +    ActionReply executeCommand(const QStringList &command);
  364.  public Q_SLOTS:
  365.      ActionReply defaults(QVariantMap args);
  366.      ActionReply install(QVariantMap args);
  367. diff --git src/helper/kcmgrub2.actions src/helper/kcmgrub2.actions
  368. index ae836da..b27b102 100644
  369. --- src/helper/kcmgrub2.actions
  370. +++ src/helper/kcmgrub2.actions
  371. @@ -21,6 +21,7 @@ Name[pl]=Moduł sterowania dla programu rozruchowego GRUB2
  372.  Name[pt]=Módulo de Controlo do Gestor de Arranque GRUB2
  373.  Name[pt_BR]=Módulo de Controle do Gerenciador de Inicialização GRUB2
  374.  Name[ru]=Модуль настройки загрузчика GRUB2
  375. +Name[sk]=Ovládací modul bootloadera GRUB2
  376.  Name[sv]=Inställningsmodul för GRUB2 startprogram
  377.  Name[uk]=Модуль керування завантажувачем GRUB2
  378.  Name[x-test]=xxGRUB2 Bootloader Control Modulexx
  379. @@ -107,6 +108,7 @@ Name[pl]=Zainstaluj program rozruchowy GRUB2
  380.  Name[pt]=Instalar o Gestor de Arranque GRUB2
  381.  Name[pt_BR]=Instalar o gerenciador de inicialização GRUB2
  382.  Name[ru]=Установка загрузчика GRUB2
  383. +Name[sk]=Inštalovať bootloader GRUB2
  384.  Name[sv]=Installera GRUB2 startprogram
  385.  Name[uk]=Встановлення завантажувача GRUB2
  386.  Name[x-test]=xxInstall the GRUB2 Bootloaderxx
  387. @@ -163,6 +165,7 @@ Name[pl]=Wczytaj ustawienia programu rozruchowego GRUB2
  388.  Name[pt]=Carregar a configuração do gestor de arranque GRUB2
  389.  Name[pt_BR]=Carregar a configuração do gerenciador de inicialização GRUB2
  390.  Name[ru]=Считывание параметров загрузчика GRUB2
  391. +Name[sk]=Načítať nastavenia bootloadera GRUB2
  392.  Name[sv]=Läs in inställningar för GRUB2 startprogram
  393.  Name[uk]=Завантаження параметрів завантажувача GRUB2
  394.  Name[x-test]=xxLoad the GRUB2 Bootloader settingsxx
  395. @@ -326,6 +329,7 @@ Name[pl]=Zapisz ustawienia programu rozruchowego GRUB2
  396.  Name[pt]=Gravar a configuração do gestor de arranque do GRUB2
  397.  Name[pt_BR]=Salvar a configuração do gerenciador de inicialização do GRUB2
  398.  Name[ru]=Сохранение параметров загрузчика GRUB2
  399. +Name[sk]=Uložiť nastavenia bootloadera GRUB2
  400.  Name[sv]=Spara GRUB2 startprogrammets inställningar
  401.  Name[uk]=Збереження параметрів завантажувача GRUB2
  402.  Name[x-test]=xxSave the GRUB2 Bootloader settingsxx
  403. diff --git src/installDlg.cpp src/installDlg.cpp
  404. index 7ce43c8..6325105 100644
  405. --- src/installDlg.cpp
  406. +++ src/installDlg.cpp
  407. @@ -19,8 +19,8 @@
  408.  #include "installDlg.h"
  409.  
  410.  //Qt
  411. -#include <QtCore/QFile>
  412. -#include <QtGui/QRadioButton>
  413. +#include <QFile>
  414. +#include <QRadioButton>
  415.  
  416.  //KDE
  417.  #include <kdeversion.h>
  418. @@ -64,7 +64,7 @@ InstallDialog::InstallDialog(const QString installExePath, QWidget *parent, Qt::
  419.  
  420.          QString uuidDir = "/dev/disk/by-uuid/", uuid = volume->uuid(), name;
  421.          name = (QFile::exists((name = uuidDir + uuid)) || QFile::exists((name = uuidDir + uuid.toLower())) || QFile::exists((name = uuidDir + uuid.toUpper())) ? QFile::symLinkTarget(name) : QString());
  422. -        QTreeWidgetItem *item = new QTreeWidgetItem(ui.treeWidget_recover, QStringList(QString()) << name << partition->filePath() << volume->label() << volume->fsType() << KGlobal::locale()->formatByteSize(volume->size()));
  423. +        QTreeWidgetItem *item = new QTreeWidgetItem(ui.treeWidget_recover, QStringList() << QString() << name << partition->filePath() << volume->label() << volume->fsType() << KGlobal::locale()->formatByteSize(volume->size()));
  424.          item->setIcon(1, KIcon(device.icon()));
  425.          item->setTextAlignment(5, Qt::AlignRight | Qt::AlignVCenter);
  426.          ui.treeWidget_recover->addTopLevelItem(item);
  427. @@ -85,6 +85,7 @@ void InstallDialog::slotButtonClicked(int button)
  428.                  installAction.addArgument("installExePath", m_installExePath);
  429.                  installAction.addArgument("partition", ui.treeWidget_recover->topLevelItem(i)->text(1));
  430.                  installAction.addArgument("mountPoint", ui.treeWidget_recover->topLevelItem(i)->text(2));
  431. +                installAction.addArgument("mbrInstall", !ui.checkBox_partition->isChecked());
  432.                  break;
  433.              }
  434.          }
  435. @@ -118,12 +119,7 @@ void InstallDialog::slotButtonClicked(int button)
  436.              dialog->setEscapeButton(KDialog::Ok);
  437.              KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i18nc("@info", "Successfully installed GRUB."), QStringList(), QString(), 0, KMessageBox::Notify, reply.data().value("output").toString()); // krazy:exclude=qclasses
  438.          } else {
  439. -            QString output = reply.data().value("output").toString();
  440. -            if (output.isEmpty()) {
  441. -                KMessageBox::error(this, i18nc("@info", "Failed to install GRUB."));
  442. -            } else {
  443. -                KMessageBox::detailedError(this, i18nc("@info", "Failed to install GRUB."), output);
  444. -            }
  445. +            KMessageBox::detailedError(this, i18nc("@info", "Failed to install GRUB."), KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString());
  446.          }
  447.      }
  448.      KDialog::slotButtonClicked(button);
  449. diff --git src/kcm_grub2.cpp src/kcm_grub2.cpp
  450. index 9501374..223fb2b 100644
  451. --- src/kcm_grub2.cpp
  452. +++ src/kcm_grub2.cpp
  453. @@ -15,11 +15,14 @@
  454.   * with this program. If not, see <http://www.gnu.org/licenses/>.              *
  455.   *******************************************************************************/
  456.  
  457. +//Krazy
  458. +//krazy:excludeall=cpp
  459. +
  460.  //Own
  461.  #include "kcm_grub2.h"
  462.  
  463.  //Qt
  464. -#include <QtGui/QDesktopWidget>
  465. +#include <QDesktopWidget>
  466.  
  467.  //KDE
  468.  #include <KAboutData>
  469. @@ -51,6 +54,9 @@ K_EXPORT_PLUGIN(GRUB2Factory("kcmgrub2"))
  470.  
  471.  KCMGRUB2::KCMGRUB2(QWidget *parent, const QVariantList &list) : KCModule(GRUB2Factory::componentData(), parent, list)
  472.  {
  473. +    //Isn't KAboutData's second argument supposed to do this?
  474. +    KGlobal::locale()->insertCatalog("kcm-grub2");
  475. +
  476.      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-2012 Konstantinos Smanis"), KLocalizedString(), "http://ksmanis.wordpress.com/projects/grub2-editor/");
  477.      about->addAuthor(ki18nc("@info:credit", "Κonstantinos Smanis"), ki18nc("@info:credit", "Main Developer"), "konstantinos.smanis@gmail.com", "http://ksmanis.wordpress.com/");
  478.      setAboutData(about);
  479. @@ -78,7 +84,7 @@ void KCMGRUB2::defaults()
  480.          save();
  481.          KMessageBox::information(this, i18nc("@info", "Successfully restored the default values."));
  482.      } else {
  483. -        KMessageBox::error(this, i18nc("@info", "Failed to restore the default values."));
  484. +        KMessageBox::detailedError(this, i18nc("@info", "Failed to restore the default values."), KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString());
  485.      }
  486.  }
  487.  void KCMGRUB2::load()
  488. @@ -403,7 +409,7 @@ void KCMGRUB2::save()
  489.      saveAction.addArgument("configFileName", configPath);
  490.      saveAction.addArgument("configFileContents", configFileContents);
  491.      saveAction.addArgument("menuFileName", menuPath);
  492. -    saveAction.addArgument("defaultEntry", m_entries.size() > 0 ? m_entries.at(ui.kcombobox_default->currentIndex()) : m_settings.value("GRUB_DEFAULT"));
  493. +    saveAction.addArgument("defaultEntry", m_entries.size() > 0 ? ui.kcombobox_default->currentText() : m_settings.value("GRUB_DEFAULT"));
  494.      if (m_dirtyBits.testBit(memtestDirty)) {
  495.          saveAction.addArgument("memtestFileName", memtestPath);
  496.          saveAction.addArgument("memtest", ui.checkBox_memtest->isChecked());
  497. @@ -435,7 +441,7 @@ void KCMGRUB2::save()
  498.          KMessageBox::createKMessageBox(dialog, QMessageBox::Information, i18nc("@info", "Successfully saved GRUB settings."), QStringList(), QString(), 0, KMessageBox::Notify, reply.data().value("output").toString()); // krazy:exclude=qclasses
  499.          load();
  500.      } else {
  501. -        KMessageBox::detailedError(this, i18nc("@info", "Failed to save GRUB settings."), reply.data().value("output").toString());
  502. +        KMessageBox::detailedError(this, i18nc("@info", "Failed to save GRUB settings."), KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString());
  503.      }
  504.  }
  505.  
  506. @@ -490,8 +496,9 @@ void KCMGRUB2::slotGrubDisableOsProberChanged()
  507.  }
  508.  void KCMGRUB2::slotInstallBootloader()
  509.  {
  510. -    InstallDialog installDlg(installExePath, this);
  511. -    installDlg.exec();
  512. +    QPointer<InstallDialog> installDlg = new InstallDialog(installExePath, this);
  513. +    installDlg->exec();
  514. +    delete installDlg;
  515.  }
  516.  void KCMGRUB2::slotGrubGfxmodeChanged()
  517.  {
  518. @@ -855,12 +862,29 @@ void KCMGRUB2::setupConnections()
  519.      connect(ui.kpushbutton_install, SIGNAL(clicked(bool)), this, SLOT(slotInstallBootloader()));
  520.  }
  521.  
  522. +QString KCMGRUB2::findExe(const QString &exeName)
  523. +{
  524. +    QString exePath = KStandardDirs::findExe(exeName);
  525. +    if (!exePath.isEmpty()) {
  526. +        return exePath;
  527. +    }
  528. +    KProcess whereis;
  529. +    whereis << "whereis" << "-b" << exeName;
  530. +    whereis.setOutputChannelMode(KProcess::OnlyStdoutChannel);
  531. +    if (whereis.execute() == 0) {
  532. +        QString output = whereis.readAllStandardOutput();
  533. +        if (output.startsWith(exeName + ':')) {
  534. +            return output.mid(exeName.length() + 1).trimmed();
  535. +        }
  536. +    }
  537. +    return QString();
  538. +}
  539.  bool KCMGRUB2::check()
  540.  {
  541. -    installExePath = KStandardDirs::findExe("grub-install");
  542. -    mkconfigExePath = KStandardDirs::findExe("grub-mkconfig");
  543. -    probeExePath = KStandardDirs::findExe("grub-probe");
  544. -    set_defaultExePath = KStandardDirs::findExe("grub-set-default");
  545. +    installExePath = findExe("grub-install");
  546. +    mkconfigExePath = findExe("grub-mkconfig");
  547. +    probeExePath = findExe("grub-probe");
  548. +    set_defaultExePath = findExe("grub-set-default");
  549.      if (!installExePath.isEmpty() && !mkconfigExePath.isEmpty() && !probeExePath.isEmpty() && !set_defaultExePath.isEmpty()) {
  550.          kDebug() << "GRUB2 installation detected!";
  551.          menuPath = "/boot/grub/grub.cfg";
  552. @@ -869,10 +893,10 @@ bool KCMGRUB2::check()
  553.          memtestPath = "/etc/grub.d/20_memtest86+";
  554.          return true;
  555.      }
  556. -    installExePath = KStandardDirs::findExe("grub2-install");
  557. -    mkconfigExePath = KStandardDirs::findExe("grub2-mkconfig");
  558. -    probeExePath = KStandardDirs::findExe("grub2-probe");
  559. -    set_defaultExePath = KStandardDirs::findExe("grub2-set-default");
  560. +    installExePath = findExe("grub2-install");
  561. +    mkconfigExePath = findExe("grub2-mkconfig");
  562. +    probeExePath = findExe("grub2-probe");
  563. +    set_defaultExePath = findExe("grub2-set-default");
  564.      if (!installExePath.isEmpty() && !mkconfigExePath.isEmpty() && !probeExePath.isEmpty() && !set_defaultExePath.isEmpty()) {
  565.          kDebug() << "GRUB2 (RPM) installation detected!";
  566.          menuPath = "/boot/grub2/grub.cfg";
  567. @@ -881,10 +905,10 @@ bool KCMGRUB2::check()
  568.          memtestPath = "/etc/grub.d/20_memtest86+";
  569.          return true;
  570.      }
  571. -    installExePath = KStandardDirs::findExe("burg-install");
  572. -    mkconfigExePath = KStandardDirs::findExe("burg-mkconfig");
  573. -    probeExePath = KStandardDirs::findExe("burg-probe");
  574. -    set_defaultExePath = KStandardDirs::findExe("burg-set-default");
  575. +    installExePath = findExe("burg-install");
  576. +    mkconfigExePath = findExe("burg-mkconfig");
  577. +    probeExePath = findExe("burg-probe");
  578. +    set_defaultExePath = findExe("burg-set-default");
  579.      if (!installExePath.isEmpty() && !mkconfigExePath.isEmpty() && !probeExePath.isEmpty() && !set_defaultExePath.isEmpty()) {
  580.          kDebug() << "BURG installation detected!";
  581.          menuPath = "/boot/burg/burg.cfg";
  582. @@ -943,7 +967,7 @@ QString KCMGRUB2::readFile(const QString &fileName)
  583.      ActionReply reply = loadAction.execute();
  584.      if (reply.failed()) {
  585.          kError() << "Error reading:" << fileName;
  586. -        kError() << "Error description:" << reply.data().value("output").toString();
  587. +        kError() << "Error description:" << (KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString());
  588.          return QString();
  589.      }
  590.      return reply.data().value("fileContents").toString();
  591. @@ -998,7 +1022,7 @@ void KCMGRUB2::readDevices()
  592.  
  593.      ActionReply reply = probeAction.execute();
  594.      if (reply.failed()) {
  595. -        KMessageBox::error(this, i18nc("@info", "Failed to get GRUB device names."));
  596. +        KMessageBox::detailedError(this, i18nc("@info", "Failed to get GRUB device names."), KDE_IS_VERSION(4,7,0) ? reply.errorDescription() : reply.data().value("errorDescription").toString());
  597.          return;
  598.      }
  599.      QStringList grubPartitions = reply.data().value("grubPartitions").toStringList();
  600. diff --git src/kcm_grub2.h src/kcm_grub2.h
  601. index 16cebec..6f4d2b7 100644
  602. --- src/kcm_grub2.h
  603. +++ src/kcm_grub2.h
  604. @@ -19,7 +19,7 @@
  605.  #define KCMGRUB2_H
  606.  
  607.  //Qt
  608. -#include <QtCore/QBitArray>
  609. +#include <QBitArray>
  610.  
  611.  //KDE
  612.  #include <KCModule>
  613. @@ -70,6 +70,7 @@ private:
  614.      void setupObjects();
  615.      void setupConnections();
  616.  
  617. +    QString findExe(const QString &exeName);
  618.      bool check();
  619.  
  620.      //TODO: Maybe remove?
  621. diff --git src/qPkBackend.cpp src/qPkBackend.cpp
  622. index 414a197..72e0bfc 100644
  623. --- src/qPkBackend.cpp
  624. +++ src/qPkBackend.cpp
  625. @@ -25,118 +25,118 @@
  626.  static QString statusToString(PackageKit::Enum::Status status)
  627.  {
  628.      switch (status) {
  629. -    case PackageKit::Enum::LastStatus :
  630. -    case PackageKit::Enum::UnknownStatus :
  631. +    case PackageKit::Enum::LastStatus:
  632. +    case PackageKit::Enum::UnknownStatus:
  633.          return i18nc("This is when the transaction status is not known",
  634. -        "Unknown state");
  635. -    case PackageKit::Enum::StatusSetup :
  636. +                     "Unknown state");
  637. +    case PackageKit::Enum::StatusSetup:
  638.          return i18nc("transaction state, the daemon is in the process of starting",
  639. -        "Waiting for service to start");
  640. -    case PackageKit::Enum::StatusWait :
  641. +                     "Waiting for service to start");
  642. +    case PackageKit::Enum::StatusWait:
  643.          return i18nc("transaction state, the transaction is waiting for another to complete",
  644. -        "Waiting for other tasks");
  645. -    case PackageKit::Enum::StatusRunning :
  646. +                     "Waiting for other tasks");
  647. +    case PackageKit::Enum::StatusRunning:
  648.          return i18nc("transaction state, just started",
  649. -        "Running task");
  650. -    case PackageKit::Enum::StatusQuery :
  651. +                     "Running task");
  652. +    case PackageKit::Enum::StatusQuery:
  653.          return i18nc("transaction state, is querying data",
  654. -        "Querying");
  655. -    case PackageKit::Enum::StatusInfo :
  656. +                     "Querying");
  657. +    case PackageKit::Enum::StatusInfo:
  658.          return i18nc("transaction state, getting data from a server",
  659. -        "Getting information");
  660. -    case PackageKit::Enum::StatusRemove :
  661. +                     "Getting information");
  662. +    case PackageKit::Enum::StatusRemove:
  663.          return i18nc("transaction state, removing packages",
  664. -        "Removing packages");
  665. -    case PackageKit::Enum::StatusDownload :
  666. +                     "Removing packages");
  667. +    case PackageKit::Enum::StatusDownload:
  668.          return i18nc("transaction state, downloading package files",
  669. -        "Downloading packages");
  670. -    case PackageKit::Enum::StatusInstall :
  671. +                     "Downloading packages");
  672. +    case PackageKit::Enum::StatusInstall:
  673.          return i18nc("transaction state, installing packages",
  674. -        "Installing packages");
  675. -    case PackageKit::Enum::StatusRefreshCache :
  676. +                     "Installing packages");
  677. +    case PackageKit::Enum::StatusRefreshCache:
  678.          return i18nc("transaction state, refreshing internal lists",
  679. -        "Refreshing software list");
  680. -    case PackageKit::Enum::StatusUpdate :
  681. +                     "Refreshing software list");
  682. +    case PackageKit::Enum::StatusUpdate:
  683.          return i18nc("transaction state, installing updates",
  684. -        "Updating packages");
  685. -    case PackageKit::Enum::StatusCleanup :
  686. +                     "Updating packages");
  687. +    case PackageKit::Enum::StatusCleanup:
  688.          return i18nc("transaction state, removing old packages, and cleaning config files",
  689. -        "Cleaning up packages");
  690. -    case PackageKit::Enum::StatusObsolete :
  691. +                     "Cleaning up packages");
  692. +    case PackageKit::Enum::StatusObsolete:
  693.          return i18nc("transaction state, obsoleting old packages",
  694. -        "Obsoleting packages");
  695. -    case PackageKit::Enum::StatusDepResolve :
  696. +                     "Obsoleting packages");
  697. +    case PackageKit::Enum::StatusDepResolve:
  698.          return i18nc("transaction state, checking the transaction before we do it",
  699. -        "Resolving dependencies");
  700. -    case PackageKit::Enum::StatusSigCheck :
  701. +                     "Resolving dependencies");
  702. +    case PackageKit::Enum::StatusSigCheck:
  703.          return i18nc("transaction state, checking if we have all the security keys for the operation",
  704. -        "Checking signatures");
  705. -    case PackageKit::Enum::StatusRollback :
  706. +                     "Checking signatures");
  707. +    case PackageKit::Enum::StatusRollback:
  708.          return i18nc("transaction state, when we return to a previous system state",
  709. -        "Rolling back");
  710. -    case PackageKit::Enum::StatusTestCommit :
  711. +                     "Rolling back");
  712. +    case PackageKit::Enum::StatusTestCommit:
  713.          return i18nc("transaction state, when we're doing a test transaction",
  714. -        "Testing changes");
  715. -    case PackageKit::Enum::StatusCommit :
  716. +                     "Testing changes");
  717. +    case PackageKit::Enum::StatusCommit:
  718.          return i18nc("transaction state, when we're writing to the system package database",
  719. -        "Committing changes");
  720. -    case PackageKit::Enum::StatusRequest :
  721. +                     "Committing changes");
  722. +    case PackageKit::Enum::StatusRequest:
  723.          return i18nc("transaction state, requesting data from a server",
  724. -        "Requesting data");
  725. -    case PackageKit::Enum::StatusFinished :
  726. +                     "Requesting data");
  727. +    case PackageKit::Enum::StatusFinished:
  728.          return i18nc("transaction state, all done!",
  729. -        "Finished");
  730. -    case PackageKit::Enum::StatusCancel :
  731. +                     "Finished");
  732. +    case PackageKit::Enum::StatusCancel:
  733.          return i18nc("transaction state, in the process of cancelling",
  734. -        "Cancelling");
  735. -    case PackageKit::Enum::StatusDownloadRepository :
  736. +                     "Cancelling");
  737. +    case PackageKit::Enum::StatusDownloadRepository:
  738.          return i18nc("transaction state, downloading metadata",
  739. -        "Downloading repository information");
  740. -    case PackageKit::Enum::StatusDownloadPackagelist :
  741. +                     "Downloading repository information");
  742. +    case PackageKit::Enum::StatusDownloadPackagelist:
  743.          return i18nc("transaction state, downloading metadata",
  744. -        "Downloading list of packages");
  745. -    case PackageKit::Enum::StatusDownloadFilelist :
  746. +                     "Downloading list of packages");
  747. +    case PackageKit::Enum::StatusDownloadFilelist:
  748.          return i18nc("transaction state, downloading metadata",
  749. -        "Downloading file lists");
  750. -    case PackageKit::Enum::StatusDownloadChangelog :
  751. +                     "Downloading file lists");
  752. +    case PackageKit::Enum::StatusDownloadChangelog:
  753.          return i18nc("transaction state, downloading metadata",
  754. -        "Downloading lists of changes");
  755. -    case PackageKit::Enum::StatusDownloadGroup :
  756. +                     "Downloading lists of changes");
  757. +    case PackageKit::Enum::StatusDownloadGroup:
  758.          return i18nc("transaction state, downloading metadata",
  759. -        "Downloading groups");
  760. -    case PackageKit::Enum::StatusDownloadUpdateinfo :
  761. +                     "Downloading groups");
  762. +    case PackageKit::Enum::StatusDownloadUpdateinfo:
  763.          return i18nc("transaction state, downloading metadata",
  764. -        "Downloading update information");
  765. -    case PackageKit::Enum::StatusRepackaging :
  766. +                     "Downloading update information");
  767. +    case PackageKit::Enum::StatusRepackaging:
  768.          return i18nc("transaction state, repackaging delta files",
  769. -        "Repackaging files");
  770. -    case PackageKit::Enum::StatusLoadingCache :
  771. +                     "Repackaging files");
  772. +    case PackageKit::Enum::StatusLoadingCache:
  773.          return i18nc("transaction state, loading databases",
  774. -        "Loading cache");
  775. -    case PackageKit::Enum::StatusScanApplications :
  776. +                     "Loading cache");
  777. +    case PackageKit::Enum::StatusScanApplications:
  778.          return i18nc("transaction state, scanning for running processes",
  779. -        "Scanning installed applications");
  780. -    case PackageKit::Enum::StatusGeneratePackageList :
  781. +                     "Scanning installed applications");
  782. +    case PackageKit::Enum::StatusGeneratePackageList:
  783.          return i18nc("transaction state, generating a list of packages installed on the system",
  784. -        "Generating package lists");
  785. -    case PackageKit::Enum::StatusWaitingForLock :
  786. +                     "Generating package lists");
  787. +    case PackageKit::Enum::StatusWaitingForLock:
  788.          return i18nc("transaction state, when we're waiting for the native tools to exit",
  789. -        "Waiting for package manager lock");
  790. -    case PackageKit::Enum::StatusWaitingForAuth :
  791. +                     "Waiting for package manager lock");
  792. +    case PackageKit::Enum::StatusWaitingForAuth:
  793.          return i18nc("waiting for user to type in a password",
  794. -        "Waiting for authentication");
  795. -    case PackageKit::Enum::StatusScanProcessList :
  796. +                     "Waiting for authentication");
  797. +    case PackageKit::Enum::StatusScanProcessList:
  798.          return i18nc("we are updating the list of processes",
  799. -        "Updating the list of running applications");
  800. -    case PackageKit::Enum::StatusCheckExecutableFiles :
  801. +                     "Updating the list of running applications");
  802. +    case PackageKit::Enum::StatusCheckExecutableFiles:
  803.          return i18nc("we are checking executable files in use",
  804. -        "Checking for applications currently in use");
  805. -    case PackageKit::Enum::StatusCheckLibraries :
  806. +                     "Checking for applications currently in use");
  807. +    case PackageKit::Enum::StatusCheckLibraries:
  808.          return i18nc("we are checking for libraries in use",
  809. -        "Checking for libraries currently in use");
  810. -    case PackageKit::Enum::StatusCopyFiles :
  811. +                     "Checking for libraries currently in use");
  812. +    case PackageKit::Enum::StatusCopyFiles:
  813.          return i18nc("we are copying package files to prepare to install",
  814. -        "Copying files");
  815. +                     "Copying files");
  816.      }
  817.      return QString();
  818.  }
  819. diff --git src/qPkBackend.h src/qPkBackend.h
  820. index a08b0a4..d6c8c0f 100644
  821. --- src/qPkBackend.h
  822. +++ src/qPkBackend.h
  823. @@ -19,7 +19,7 @@
  824.  #define QPKBACKEND_H
  825.  
  826.  //Qt
  827. -#include <QtCore/QStringList>
  828. +#include <QStringList>
  829.  
  830.  //QPackageKit
  831.  #include <QPackageKit>
  832. diff --git src/qaptBackend.cpp src/qaptBackend.cpp
  833. index d84905c..4ae499b 100644
  834. --- src/qaptBackend.cpp
  835. +++ src/qaptBackend.cpp
  836. @@ -19,7 +19,7 @@
  837.  #include "qaptBackend.h"
  838.  
  839.  //Qt
  840. -#include <QtCore/QEventLoop>
  841. +#include <QEventLoop>
  842.  
  843.  QAptBackend::QAptBackend(QObject *parent): QObject(parent)
  844.  {
  845. diff --git src/qaptBackend.h src/qaptBackend.h
  846. index ed47b65..65ff5cf 100644
  847. --- src/qaptBackend.h
  848. +++ src/qaptBackend.h
  849. @@ -19,7 +19,7 @@
  850.  #define QAPTBACKEND_H
  851.  
  852.  //Qt
  853. -#include <QtCore/QStringList>
  854. +#include <QStringList>
  855.  
  856.  //QApt
  857.  #include <libqapt/backend.h>
  858. diff --git src/removeDlg.cpp src/removeDlg.cpp
  859. index 31a862d..76e35b8 100644
  860. --- src/removeDlg.cpp
  861. +++ src/removeDlg.cpp
  862. @@ -15,13 +15,16 @@
  863.   * with this program. If not, see <http://www.gnu.org/licenses/>.              *
  864.   *******************************************************************************/
  865.  
  866. +//Krazy
  867. +//krazy:excludeall=cpp
  868. +
  869.  //Own
  870.  #include "removeDlg.h"
  871.  
  872.  //Qt
  873. -#include <QtCore/QFile>
  874. -#include <QtCore/QTextStream>
  875. -#include <QtCore/QTimer>
  876. +#include <QFile>
  877. +#include <QTextStream>
  878. +#include <QTimer>
  879.  
  880.  //KDE
  881.  #include <KMessageBox>
  882. diff --git src/removeDlg.h src/removeDlg.h
  883. index 4e989dd..35a036f 100644
  884. --- src/removeDlg.h
  885. +++ src/removeDlg.h
  886. @@ -15,6 +15,9 @@
  887.   * with this program. If not, see <http://www.gnu.org/licenses/>.              *
  888.   *******************************************************************************/
  889.  
  890. +//Krazy
  891. +//krazy:excludeall=cpp
  892. +
  893.  #ifndef REMOVEDLG_H
  894.  #define REMOVEDLG_H
  895.  
  896. diff --git ui/installDlg.ui ui/installDlg.ui
  897. index de63903..af69fc0 100644
  898. --- ui/installDlg.ui
  899. +++ ui/installDlg.ui
  900. @@ -6,8 +6,8 @@
  901.     <rect>
  902.      <x>0</x>
  903.      <y>0</y>
  904. -    <width>264</width>
  905. -    <height>217</height>
  906. +    <width>291</width>
  907. +    <height>242</height>
  908.     </rect>
  909.    </property>
  910.    <layout class="QGridLayout" name="gridLayout">
  911. @@ -70,6 +70,16 @@
  912.       </column>
  913.      </widget>
  914.     </item>
  915. +   <item row="2" column="0">
  916. +    <widget class="QCheckBox" name="checkBox_partition">
  917. +     <property name="toolTip">
  918. +      <string comment="@info:tooltip">Install the bootloader on the boot sector of the selected partition instead of the MBR(=Master Boot Sector). Not recommended.</string>
  919. +     </property>
  920. +     <property name="text">
  921. +      <string comment="@option:check">Install on partition instead of MBR (Advanced)</string>
  922. +     </property>
  923. +    </widget>
  924. +   </item>
  925.    </layout>
  926.   </widget>
  927.   <resources/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement