summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/packagemanager/.cvsignore3
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp7
2 files changed, 8 insertions, 2 deletions
diff --git a/noncore/settings/packagemanager/.cvsignore b/noncore/settings/packagemanager/.cvsignore
new file mode 100644
index 0000000..4183697
--- a/dev/null
+++ b/noncore/settings/packagemanager/.cvsignore
@@ -0,0 +1,3 @@
+Makefile*
+moc*
+.moc*
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index c0c03fc..980d5eb 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -176,79 +176,82 @@ void InstallDlg::slotDisplayAvailSpace( const QString &destination )
return;
QString space = tr( "Unknown" );
// Get destination
OConfItem *dest = m_packman->findConfItem( OConfItem::Destination, destination );
if ( dest )
{
// Calculate available space
struct statfs fs;
if ( !statfs( dest->value(), &fs ) )
{
long mult = fs.f_bsize / 1024;
long div = 1024 / fs.f_bsize;
if ( !mult ) mult = 1;
if ( !div ) div = 1;
long avail = fs.f_bavail * mult / div;
space = tr( "%1 Kb" ).arg( avail );
}
}
- // Display available space (if known)
+ // Display available space
m_availSpace->setText( space );
}
void InstallDlg::slotBtnStart()
{
QString btnText = m_btnStart->text();
if ( btnText == tr( "Abort" ) )
{
// Stop execution of current command and prevent any others from executing
m_packman->abortCommand();
m_currCommand = 999;
// Allow user to close dialog
m_btnStart->setText( tr( "Close" ) );
m_btnStart->setIconSet( Resource::loadPixmap( "enter" ) );
return;
}
else if ( btnText == tr( "Close" ) )
{
// TODO - force reload of package data
emit closeInstallDlg();
return;
}
// Start was clicked, execute first command
m_btnOptions->setEnabled( false );
m_btnStart->setText( tr( "Abort" ) );
m_btnStart->setIconSet( Resource::loadPixmap( "close" ) );
- m_packman->executeCommand( m_command[ 0 ], m_packages[ 0 ], m_destination->currentText(), this,
+ QString dest;
+ if ( m_destination )
+ dest = m_destination->currentText();
+ m_packman->executeCommand( m_command[ 0 ], m_packages[ 0 ], dest, this,
SLOT(slotOutput(OProcess*,char*,int)), SLOT(slotErrors(OProcess*,char*,int)),
SLOT(slotFinished(OProcess*)), true );
}
void InstallDlg::slotBtnOptions()
{
QString btnText = m_btnOptions->text();
if ( btnText == tr( "Options" ) )
{
// Display configuration dialog (only options tab is enabled)
m_packman->configureDlg( true );
return;
}
// Save output was clicked
QMap<QString, QStringList> map;
map.insert( tr( "All" ), QStringList() );
QStringList text;
text << "text/*";
map.insert(tr( "Text" ), text );
text << "*";
map.insert( tr( "All" ), text );
QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );