Permalink
Browse files

Remove the splash screen options from pc-sysmanager - it no longer wo…

…rks at all.
  • Loading branch information...
1 parent 13dd2f6 commit 74e286d712110a57d1da47a1a486cb7e361185ab Ken Moore committed Aug 8, 2013
Showing with 18 additions and 207 deletions.
  1. +7 −75 src-qt4/pc-sysmanager/pbsystemtab.cpp
  2. +1 −4 src-qt4/pc-sysmanager/pbsystemtab.h
  3. +10 −128 src-qt4/pc-sysmanager/pbsystemtab.ui
@@ -42,7 +42,7 @@ void PBSystemTab::ProgramInit()
labelMemory->setText(pcbsd::Utils::bytesToHumanReadable(pcbsd::Utils::sysctlAsInt("hw.physmem")));
// Read any kernel settings
- LoadKernSettings();
+ //LoadKernSettings();
// Read any rc.conf settings
//loadServSettings();
@@ -52,8 +52,8 @@ void PBSystemTab::ProgramInit()
// Connect our various buttons
connect(buttonGenerate, SIGNAL(clicked()), this, SLOT(startGenerateSheet()) );
- connect(showBootCheck, SIGNAL(clicked()), this, SIGNAL(changed()));
- connect(splashSelect, SIGNAL(activated(int)), this, SIGNAL(changed()));
+ //connect(showBootCheck, SIGNAL(clicked()), this, SIGNAL(changed()));
+
connect(pushMiscSave, SIGNAL( clicked() ), this, SLOT( slotMiscSave() ) );
connect(fetchSourceBut, SIGNAL( clicked() ), this, SLOT( fetchSourcePressed() ) );
@@ -181,12 +181,12 @@ void PBSystemTab::showRebootRequired()
// Read the loader.conf, and load any settings we need
-void PBSystemTab::LoadKernSettings()
+/*void PBSystemTab::LoadKernSettings()
{
if ( checkValue("/boot/loader.conf", "splash_pcx_load=", "YES" ) ) { showBootCheck->setChecked(true); }
else { showBootCheck->setChecked(false); }
}
-
+*/
// Checks the file for a string KEY, and sees if its set to VALUE
bool PBSystemTab::checkValue( QString File, QString Key, QString Value )
{
@@ -212,74 +212,10 @@ void PBSystemTab::fetchPortsPressed()
portsnapUI->show();
}
-void PBSystemTab::customSplashPressed()
-{
- QString file = QFileDialog::getOpenFileName(this, tr("Select Splash"), "/home/" + username, "*.pcx");
- if (file == "") { return; }
-
- QImage image(file, "PCX");
-
- if (image.isNull())
- {
- QMessageBox::warning(this, tr("Invalid Image"), tr("The file supplied does not appear to be a valid PCX image."));
- return;
- }
- if ((image.width() > 1024) || (image.height() > 768) || (image.depth() > 8))
- {
- QMessageBox::warning(this, tr("Invalid Image"), tr("The splash screen image cannot be any larger than 1024x768, or any greater than 8-bit (256 colours) depth."));
- return;
- }
-
- system("cp '" + file.toAscii() + "' /boot/loading-screen.pcx");
- splashSelect->clear();
- loadBootData();
- splashSelect->setCurrentIndex(0);
-}
-
-
-void PBSystemTab::miscSavePressed()
-{
- //Change registry entry
- QSettings settings;
- QString code = codeMap[splashSelect->currentText()];
- settings.setValue("/PCBSD/splash-screen", code);
-
- //Move files about
- system("cp " + PREFIX.toAscii() + "/share/pcbsd/splash-screens/loading-screen-" + code.toAscii() + ".pcx /boot/loading-screen.pcx");
- system("chmod 644 /boot/loading-screen.pcx");
-
- if ( showBootCheck->isChecked() )
- {
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"YES\"" );
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"YES\"" );
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"YES\"" );
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_name=", "bitmap_name=\"/boot/loading-screen.pcx\"" );
- } else {
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"NO\"" );
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"NO\"" );
- pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"NO\"" );
- }
-}
-
-
-void PBSystemTab::showSplashChecked(int newState)
-{
- if (newState == 0)
- {
- splashSelect->setEnabled(false);
- customBut->setEnabled(false);
- }
- else
- {
- splashSelect->setEnabled(true);
- customBut->setEnabled(true);
- }
-}
-
void PBSystemTab::loadBootData()
{
- //Trawl screens directory
+ /*//Trawl screens directory
QDir screens = QDir(PREFIX + "/share/pcbsd/splash-screens/");
if (! screens.exists())
{
@@ -350,18 +286,14 @@ void PBSystemTab::loadBootData()
splashSelect->setCurrentIndex(langList.indexOf(selectedLang) + indexMod);
}
-
- if ( checkValue("/boot/loader.conf", "splash_pcx_load=", "YES" ) )
- showBootCheck->setChecked(TRUE);
-
+*/
if ( pcbsd::Utils::getConfFileValue(QString(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh"), QString("FORCEIBUS=") ) == QString("YES"))
checkForceIbus->setChecked(TRUE);
else
checkForceIbus->setChecked(FALSE);
}
void PBSystemTab::slotMiscSave() {
- miscSavePressed();
saveKernScreen();
}
@@ -53,7 +53,6 @@ class PBSystemTab : public QDialog, private Ui::PBSystemTab
public slots:
void ProgramInit();
void saveKernScreen();
- void miscSavePressed();
void changeOpenTab(int tab);
private slots:
@@ -62,8 +61,6 @@ private slots:
void finishedSheet();
void fetchSourcePressed();
void fetchPortsPressed();
- void customSplashPressed();
- void showSplashChecked( int newState );
void loadBootData();
void slotMiscSave();
void slotClose();
@@ -86,7 +83,7 @@ private slots:
void CheckPBVer();
void CreateSheetFile();
void showRebootRequired();
- void LoadKernSettings();
+ //void LoadKernSettings();
QString getLineFromCommandOutput(QString cmd);
bool sanityCheckSettings();
@@ -487,91 +487,22 @@
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" colspan="3">
- <widget class="QGroupBox" name="groupBox_4">
+ <widget class="QGroupBox" name="groupBox_6">
<property name="title">
- <string>Boot Screen</string>
+ <string>Other Options</string>
</property>
- <layout class="QGridLayout" name="gridLayout_5">
- <item row="0" column="0" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout_12">
- <item>
- <widget class="QCheckBox" name="showBootCheck">
- <property name="text">
- <string>S&amp;how splash image on boot</string>
- </property>
- <property name="shortcut">
- <string>Alt+H</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_12">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="1" column="0" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout_11">
- <item>
- <widget class="QComboBox" name="splashSelect"/>
- </item>
- <item>
- <spacer name="horizontalSpacer_11">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QPushButton" name="customBut">
+ <layout class="QGridLayout" name="gridLayout_12">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="checkForceIbus">
<property name="text">
- <string>&amp;Custom...</string>
- </property>
- <property name="shortcut">
- <string>Alt+C</string>
+ <string>Force IBUS keyboard input</string>
</property>
</widget>
</item>
- <item row="2" column="1">
- <spacer name="spacer39">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>251</width>
- <height>31</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</item>
- <item row="2" column="0" colspan="3">
+ <item row="1" column="0" colspan="3">
<spacer name="spacer37">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -587,30 +518,14 @@
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="3">
- <widget class="QGroupBox" name="groupBox_6">
- <property name="title">
- <string>Other Options</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_12">
- <item row="0" column="0">
- <widget class="QCheckBox" name="checkForceIbus">
- <property name="text">
- <string>Force IBUS keyboard input</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="3" column="1">
+ <item row="2" column="1">
<widget class="QPushButton" name="pushMiscSave">
<property name="text">
<string>&amp;Save</string>
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="2" column="0">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -646,38 +561,5 @@
<include location="PBSystem.qrc"/>
<include location="../pc-softwaremanager/SoftwareManager.qrc"/>
</resources>
- <connections>
- <connection>
- <sender>customBut</sender>
- <signal>clicked()</signal>
- <receiver>PBSystemTab</receiver>
- <slot>customSplashPressed()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>showBootCheck</sender>
- <signal>stateChanged(int)</signal>
- <receiver>PBSystemTab</receiver>
- <slot>showSplashChecked(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>20</x>
- <y>20</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>

0 comments on commit 74e286d

Please sign in to comment.