[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kcm-grub2] src: Added support for automatic GRUB resolution (GRUB_GFXMODE=auto).
From: Konstantinos Smanis <konstantinos.smanis () gmail ! com>
Date: 2013-10-25 12:25:18
Message-ID: E1VZgS6-0003Sd-6l () scm ! kde ! org
[Download RAW message or body]
Git commit beb6e1379608f279c017a037209f3c3038f4fced by Konstantinos Smanis.
Committed on 25/10/2013 at 11:24.
Pushed by ksmanis into branch 'master'.
Added support for automatic GRUB resolution (GRUB_GFXMODE=auto).
This is the new default instead of 640x480.
M +9 -5 src/kcm_grub2.cpp
http://commits.kde.org/kcm-grub2/beb6e1379608f279c017a037209f3c3038f4fced
diff --git a/src/kcm_grub2.cpp b/src/kcm_grub2.cpp
index d2f29c8..1752903 100644
--- a/src/kcm_grub2.cpp
+++ b/src/kcm_grub2.cpp
@@ -197,13 +197,15 @@ void KCMGRUB2::load()
ui->checkBox_memtest->setChecked(m_memtestOn);
ui->checkBox_osProber->setChecked(unquoteWord(m_settings.value(QLatin1String("GRUB_DISABLE_OS_PROBER"))).compare(QLatin1String("true")) \
!= 0);
- m_resolutions.append(QLatin1String("640x480"));
- QString grubGfxmode = (m_settings.value(QLatin1String("GRUB_GFXMODE")).isEmpty() \
? QLatin1String("640x480") : \
unquoteWord(m_settings.value(QLatin1String("GRUB_GFXMODE"))));
- if (!grubGfxmode.isEmpty() && !m_resolutions.contains(grubGfxmode)) {
+ QString grubGfxmode = \
unquoteWord(m_settings.value(QLatin1String("GRUB_GFXMODE"))); + if \
(grubGfxmode.isEmpty()) { + grubGfxmode = QLatin1String("auto");
+ }
+ if (grubGfxmode != QLatin1String("auto") && \
!m_resolutions.contains(grubGfxmode)) { m_resolutions.append(grubGfxmode);
}
QString grubGfxpayloadLinux = \
unquoteWord(m_settings.value(QLatin1String("GRUB_GFXPAYLOAD_LINUX")));
- if (!grubGfxpayloadLinux.isEmpty() && \
grubGfxpayloadLinux.compare(QLatin1String("text")) != 0 && \
grubGfxpayloadLinux.compare(QLatin1String("keep")) != 0 && \
!m_resolutions.contains(grubGfxpayloadLinux)) { + if \
(!grubGfxpayloadLinux.isEmpty() && grubGfxpayloadLinux != QLatin1String("text") && \
grubGfxpayloadLinux != QLatin1String("keep") && \
!m_resolutions.contains(grubGfxpayloadLinux)) { \
m_resolutions.append(grubGfxpayloadLinux); }
m_resolutions.removeDuplicates();
@@ -1097,10 +1099,12 @@ void KCMGRUB2::showResolutions()
{
ui->kcombobox_gfxmode->clear();
ui->kcombobox_gfxmode->addItem(i18nc("@item:inlistbox Refers to screen \
resolution.", "Custom..."), QLatin1String("custom")); + \
ui->kcombobox_gfxmode->addItem(i18nc("@item:inlistbox Refers to screen resolution.", \
"Auto"), QLatin1String("auto"));
ui->kcombobox_gfxpayload->clear();
ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox Refers to screen \
resolution.", "Custom..."), QLatin1String("custom"));
- ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox", "Unspecified"), \
QString()); + ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox Refers to \
screen resolution.", "Auto"), QLatin1String("auto")); + \
ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox Refers to screen \
resolution.", "Unspecified"), QString());
ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox", "Boot in Text Mode"), \
QLatin1String("text"));
ui->kcombobox_gfxpayload->addItem(i18nc("@item:inlistbox", "Keep GRUB's \
Resolution"), QLatin1String("keep"));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic