[PC-BSD Commits] r2536 - pcbsd/trunk/kcmPBMsource
svn at pcbsd.org
svn at pcbsd.org
Wed Aug 6 08:31:34 PDT 2008
Author: kris
Date: 2008-08-06 08:31:34 -0700 (Wed, 06 Aug 2008)
New Revision: 2536
Modified:
pcbsd/trunk/kcmPBMsource/pbm.cpp
pcbsd/trunk/kcmPBMsource/pbm.h
Log:
Fixed a small bug installing components when using the first item in a list
Modified: pcbsd/trunk/kcmPBMsource/pbm.cpp
===================================================================
--- pcbsd/trunk/kcmPBMsource/pbm.cpp 2008-08-06 14:41:19 UTC (rev 2535)
+++ pcbsd/trunk/kcmPBMsource/pbm.cpp 2008-08-06 15:31:34 UTC (rev 2536)
@@ -464,11 +464,9 @@
}
-void PBM::installComponentSlot()
+void PBM::installComponentSlot(int item)
{
- if (componentListbox->currentRow() != NULL)
- {
- ComponentWorkingItem = componentListbox->currentRow();
+ ComponentWorkingItem = item;
switch( QMessageBox::warning( this, tr("Install Component?"), tr("Do you want to install ") + ComponentName[ComponentWorkingItem] + "? This can be removed later from this menu.", tr("OK"), tr("Cancel"), 0, 0, 1 ) ) {
case 0: // The user clicked the OK again button or pressed Enter
@@ -527,7 +525,6 @@
}
- }
}
@@ -627,7 +624,7 @@
if ( ComponentInstalled[selectedItem] == 0 ) {
removeComponentSlot();
} else {
- installComponentSlot();
+ installComponentSlot( selectedItem );
}
Modified: pcbsd/trunk/kcmPBMsource/pbm.h
===================================================================
--- pcbsd/trunk/kcmPBMsource/pbm.h 2008-08-06 14:41:19 UTC (rev 2535)
+++ pcbsd/trunk/kcmPBMsource/pbm.h 2008-08-06 15:31:34 UTC (rev 2536)
@@ -30,7 +30,7 @@
private slots:
void RemoveButtonSlot();
void PopulateList();
- void installComponentSlot();
+ void installComponentSlot(int item);
void removeComponentSlot();
bool checkComponentSlot( int component );
void refreshComponentsSlot();
More information about the Commits
mailing list