author | drw <drw> | 2004-12-21 20:14:18 (UTC) |
---|---|---|
committer | drw <drw> | 2004-12-21 20:14:18 (UTC) |
commit | 1eaf5e3e1f523e5db31d9d9299169b2e278a4568 (patch) (side-by-side diff) | |
tree | dc825b52f075d786f65f845ce2179f732da5c45c /noncore/settings/packagemanager/packageinfodlg.cpp | |
parent | 2e21be2e93866511f55e2a200514b3ce15b14791 (diff) | |
download | opie-1eaf5e3e1f523e5db31d9d9299169b2e278a4568.zip opie-1eaf5e3e1f523e5db31d9d9299169b2e278a4568.tar.gz opie-1eaf5e3e1f523e5db31d9d9299169b2e278a4568.tar.bz2 |
Hide Retrive File List button once list is retrieved in Package Info dialog, bump version up to 0.6.0, update ChangeLog/Todo/etc.
Diffstat (limited to 'noncore/settings/packagemanager/packageinfodlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/packageinfodlg.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp index c5924fd..5f72a67 100644 --- a/noncore/settings/packagemanager/packageinfodlg.cpp +++ b/noncore/settings/packagemanager/packageinfodlg.cpp @@ -37,16 +37,17 @@ _;:, .> :=|. This file is free software; you can #include <qlayout.h> #include <qpushbutton.h> #include <qwhatsthis.h> PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) - : QWidget( 0x0 ) + : QWidget( 0l ) , m_packman( pm ) , m_information( this ) , m_files( this ) + , m_retrieveFiles( 0l ) { // Initialize UI if ( parent ) parent->setCaption( package ); QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 ); @@ -85,24 +86,27 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 ); QWhatsThis::add( &m_files, tr( "This area contains a list of files contained in this package." ) ); m_files.reparent( filesWidget, QPoint( 0, 0 ) ); m_files.setReadOnly( true ); filesLayout->addWidget( &m_files ); - QPushButton *btn = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), + // If file list is already cached, display + if ( !m_package->files().isNull() ) + m_files.setText( m_package->files() ); + else + { + m_retrieveFiles = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), tr( "Retrieve file list" ), filesWidget ); - QWhatsThis::add( btn, tr( "Tap here to retrieve list of files contained in this package." ) ); - filesLayout->addWidget( btn ); - connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) ); - tabWidget->addTab( filesWidget, "binary", tr( "File list" ) ); + QWhatsThis::add( m_retrieveFiles, tr( "Tap here to retrieve list of files contained in this package." ) ); + filesLayout->addWidget( m_retrieveFiles ); + connect( m_retrieveFiles, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) ); + } + tabWidget->addTab( filesWidget, "binary", tr( "File list" ) ); tabWidget->setCurrentTab( tr( "Information" ) ); - // If file list is already cached, display - if ( !m_package->files().isNull() ) - m_files.setText( m_package->files() ); } else m_files.hide(); } PackageInfoDlg::~PackageInfoDlg() @@ -112,22 +116,25 @@ PackageInfoDlg::~PackageInfoDlg() // Cache package information if ( !m_information.text().isNull() ) m_package->setInformation( m_information.text() ); // Cache package file list - if ( !m_files.text().isNull() ) + if ( !m_files.text().isEmpty() ) m_package->setFiles( m_files.text() ); } void PackageInfoDlg::slotBtnFileScan() { m_files.clear(); QStringList list( m_package->name() ); m_packman->executeCommand( OPackage::Files, list, QString::null, this, SLOT(slotFiles(char*)), true ); + + if ( m_retrieveFiles ) + m_retrieveFiles->hide(); } void PackageInfoDlg::slotInfo( char *info ) { m_information.append( info ); } |