[PC-BSD Commits] r111 - pcbsd/trunk/kcmPBSystem
svn at pcbsd.org
svn at pcbsd.org
Sun Feb 25 07:43:48 PST 2007
Author: tim
Date: 2007-02-25 16:43:48 +0100 (Sun, 25 Feb 2007)
New Revision: 111
Modified:
pcbsd/trunk/kcmPBSystem/Makefile
pcbsd/trunk/kcmPBSystem/kcm.cpp
pcbsd/trunk/kcmPBSystem/kcm.h
pcbsd/trunk/kcmPBSystem/pbsystemtab.ui
pcbsd/trunk/kcmPBSystem/pbsystemtab.ui.h
Log:
Fixed bug #316 - 'Save Changes' buttons have been removed, changes are now implemented when the user clicked 'Ok' or 'Apply' as per normal KCModule functionality.
Modified: pcbsd/trunk/kcmPBSystem/Makefile
===================================================================
--- pcbsd/trunk/kcmPBSystem/Makefile 2007-02-24 13:22:47 UTC (rev 110)
+++ pcbsd/trunk/kcmPBSystem/Makefile 2007-02-25 15:43:48 UTC (rev 111)
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: libPBSystem.so.1.0.0
-# Generated by qmake (1.07a) (Qt 3.3.6) on: Tue Jan 2 17:43:47 2007
+# Generated by qmake (1.07a) (Qt 3.3.6) on: Sun Feb 25 15:53:07 2007
# Project: PBSystem.pro
# Template: lib
# Command: $(QMAKE) -o Makefile PBSystem.pro
@@ -164,9 +164,11 @@
####### Compile
-.obj/kcm.o: kcm.cpp .ui/pbsystemtab.h \
- .ui/notroot.h \
- kcm.h
+.obj/kcm.o: kcm.cpp .ui/notroot.h \
+ kcm.h \
+ .ui/pbsystemtab.h \
+ .ui/cvsupprogress.h \
+ .ui/portsnapprogress.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/kcm.o kcm.cpp
.ui/pbsystemtab.h: pbsystemtab.ui .ui/cvsupprogress.h \
@@ -210,10 +212,13 @@
.obj/notroot.o: .ui/notroot.cpp .ui/notroot.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/notroot.o .ui/notroot.cpp
-.obj/moc_kcm.o: .moc/moc_kcm.cpp kcm.h .ui/pbsystemtab.h
+.obj/moc_kcm.o: .moc/moc_kcm.cpp kcm.h .ui/pbsystemtab.h \
+ .ui/cvsupprogress.h \
+ .ui/portsnapprogress.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_kcm.o .moc/moc_kcm.cpp
-.obj/moc_pbsystemtab.o: .moc/moc_pbsystemtab.cpp .ui/pbsystemtab.h
+.obj/moc_pbsystemtab.o: .moc/moc_pbsystemtab.cpp .ui/pbsystemtab.h .ui/cvsupprogress.h \
+ .ui/portsnapprogress.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/moc_pbsystemtab.o .moc/moc_pbsystemtab.cpp
.obj/moc_cvsupprogress.o: .moc/moc_cvsupprogress.cpp .ui/cvsupprogress.h
Modified: pcbsd/trunk/kcmPBSystem/kcm.cpp
===================================================================
--- pcbsd/trunk/kcmPBSystem/kcm.cpp 2007-02-24 13:22:47 UTC (rev 110)
+++ pcbsd/trunk/kcmPBSystem/kcm.cpp 2007-02-25 15:43:48 UTC (rev 111)
@@ -3,7 +3,6 @@
#include <klocale.h>
#include <kglobal.h>
#include <kparts/genericfactory.h>
-#include <pbsystemtab.h>
#include <notroot.h>
#include <kcm.h>
@@ -17,16 +16,14 @@
layout->setAutoAdd(true);
buttons();
+ setButtons(KCModule::Apply);
+ systab = new PBSystemTab(parent);
+ connect(systab, SIGNAL(changed()), this, SLOT(configChanged()));
+ systab->ProgramInit();
- if ( checkRoot() )
+ if ( checkRoot() ) { systab->reparent(this, QPoint()); }
+ else
{
- buttons();
- setButtons(KCModule::Help);
- PBSystemTab *systab = new PBSystemTab(parent);
- systab->ProgramInit();
- systab->reparent(this, QPoint());
- } else {
- setButtons(KCModule::Help);
NotRoot *nroot = new NotRoot(parent);
nroot->reparent(this, QPoint());
}
@@ -52,10 +49,18 @@
}
-void PCBSDKCModule::save() {
+void PCBSDKCModule::save()
+{
+ systab->miscSavePressed();
+ systab->saveKernScreen();
}
+void PCBSDKCModule::configChanged()
+{
+ emit changed(true);
+}
+
/*
* Start the KFactory Creation
*
Modified: pcbsd/trunk/kcmPBSystem/kcm.h
===================================================================
--- pcbsd/trunk/kcmPBSystem/kcm.h 2007-02-24 13:22:47 UTC (rev 110)
+++ pcbsd/trunk/kcmPBSystem/kcm.h 2007-02-25 15:43:48 UTC (rev 111)
@@ -9,6 +9,9 @@
class PCBSDKCModule : public KCModule {
Q_OBJECT
+private:
+ PBSystemTab *systab;
+
public:
PCBSDKCModule(QWidget * = NULL, const char * = NULL, const QStringList & = QStringList());
~PCBSDKCModule();
@@ -18,6 +21,9 @@
void save();
bool checkRoot();
QLayout *layout;
+
+public slots:
+ void configChanged();
};
Modified: pcbsd/trunk/kcmPBSystem/pbsystemtab.ui
===================================================================
--- pcbsd/trunk/kcmPBSystem/pbsystemtab.ui 2007-02-24 13:22:47 UTC (rev 110)
+++ pcbsd/trunk/kcmPBSystem/pbsystemtab.ui 2007-02-25 15:43:48 UTC (rev 111)
@@ -465,97 +465,6 @@
<number>2</number>
</property>
</widget>
- <spacer row="9" column="2">
- <property name="name">
- <cstring>spacer32</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QLabel" row="10" column="0" rowspan="1" colspan="4">
- <property name="name">
- <cstring>labelKernStatus</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="alignment">
- <set>AlignCenter</set>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="11" column="0" rowspan="1" colspan="4">
- <property name="name">
- <cstring>layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>spacer33</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>100</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>buttonSaveKern</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&Save Changes</string>
- </property>
- <property name="accel">
- <string>Alt+S</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer33_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>90</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
<spacer row="12" column="2">
<property name="name">
<cstring>spacer25</cstring>
@@ -741,69 +650,6 @@
</spacer>
</grid>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
- <property name="name">
- <cstring>layout1_2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>spacer33_3</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>100</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>saveMiscBut</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&Save Changes</string>
- </property>
- <property name="accel">
- <string>Alt+S</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer33_2_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>90</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer37</cstring>
@@ -891,12 +737,6 @@
<receiver>PBSystemTab</receiver>
<slot>showSplashChecked(int)</slot>
</connection>
- <connection>
- <sender>saveMiscBut</sender>
- <signal>clicked()</signal>
- <receiver>PBSystemTab</receiver>
- <slot>miscSavePressed()</slot>
- </connection>
</connections>
<tabstops>
<tabstop>tabWidget</tabstop>
@@ -905,13 +745,11 @@
<tabstop>comboKernel</tabstop>
<tabstop>checkKernATAPI</tabstop>
<tabstop>checkKernDelay</tabstop>
- <tabstop>buttonSaveKern</tabstop>
<tabstop>fetchSourceBut</tabstop>
<tabstop>fetchPortsBut</tabstop>
<tabstop>showBootCheck</tabstop>
<tabstop>splashSelect</tabstop>
<tabstop>customBut</tabstop>
- <tabstop>saveMiscBut</tabstop>
</tabstops>
<includes>
<include location="local" impldecl="in declaration">qprocess.h</include>
@@ -945,18 +783,23 @@
<variable access="private">PortsnapProgress *portsnapUI;</variable>
<variable>QMap<QString, QString> codeMap;</variable>
<variable access="private">QString username;</variable>
+ <variable access="private">bool miscChanged;</variable>
+ <variable access="private">bool kernelChanged;</variable>
</variables>
+<signals>
+ <signal>changed();</signal>
+</signals>
<slots>
<slot>ProgramInit()</slot>
<slot access="private">ReadUname()</slot>
<slot access="private">startGenerateSheet()</slot>
<slot access="private">finishedSheet()</slot>
- <slot access="private">saveKernScreen()</slot>
+ <slot>saveKernScreen()</slot>
<slot access="private">finishedKernInstall()</slot>
<slot access="private">fetchSourcePressed()</slot>
<slot access="private">fetchPortsPressed()</slot>
<slot access="private">customSplashPressed()</slot>
- <slot access="private">miscSavePressed()</slot>
+ <slot>miscSavePressed()</slot>
<slot access="private">showSplashChecked( int newState )</slot>
<slot access="private">loadBootData()</slot>
</slots>
Modified: pcbsd/trunk/kcmPBSystem/pbsystemtab.ui.h
===================================================================
--- pcbsd/trunk/kcmPBSystem/pbsystemtab.ui.h 2007-02-24 13:22:47 UTC (rev 110)
+++ pcbsd/trunk/kcmPBSystem/pbsystemtab.ui.h 2007-02-25 15:43:48 UTC (rev 111)
@@ -36,8 +36,11 @@
// Connect our various buttons
connect( buttonGenerate, SIGNAL(clicked()), this, SLOT(startGenerateSheet()) );
- connect( buttonSaveKern, SIGNAL(clicked()), this, SLOT(saveKernScreen()) );
- //connect( buttonSaveServ, SIGNAL(clicked()), this, SLOT(saveServScreen()) );
+ connect(comboKernel, SIGNAL(activated(int)), this, SIGNAL(changed()));
+ connect(checkKernATAPI, SIGNAL(clicked()), this, SIGNAL(changed()));
+ connect(checkKernDelay, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
+ connect(showBootCheck, SIGNAL(clicked()), this, SIGNAL(changed()));
+ connect(splashSelect, SIGNAL(activated(int)), this, SIGNAL(changed()));
}
@@ -208,9 +211,6 @@
void PBSystemTab::saveKernScreen()
{
- labelKernStatus->setText(tr("Saving Settings..."));
- buttonSaveKern->setEnabled(FALSE);
-
// Change Settings here
if ( checkKernATAPI->isChecked() )
{
@@ -236,8 +236,6 @@
} else {
showRebootRequired();
- labelKernStatus->setText("");
- buttonSaveKern->setEnabled(TRUE);
}
@@ -279,11 +277,7 @@
check = settings.writeEntry("/PC-BSD/Kernel", KernDefaultTag );
-
-
showRebootRequired();
- labelKernStatus->setText("");
- buttonSaveKern->setEnabled(TRUE);
comboKernel->setEnabled(TRUE);
}
More information about the Commits
mailing list