summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/packageinfodlg.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/packageinfodlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp
index 7daf336..7abd17e 100644
--- a/noncore/settings/packagemanager/packageinfodlg.cpp
+++ b/noncore/settings/packagemanager/packageinfodlg.cpp
@@ -1,87 +1,87 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> 4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
5             .=l. 5             .=l.
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7 _;:,     .>    :=|. This file is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU General Public 9:`=1 )Y*s>-.--   : the terms of the GNU General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This file is distributed in the hope that 14    .i_,=:_.      -<s. This file is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details. 19..}^=.=       =       ; Public License for more details.
20++=   -.     .`     .: 20++=   -.     .`     .:
21 :     =  ...= . :.=- You should have received a copy of the GNU 21 :     =  ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file; 22 -.   .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23  -_. . .   )=.  = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24    --        :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "packageinfodlg.h" 30#include "packageinfodlg.h"
31#include "opackage.h" 31#include "opackage.h"
32#include "opackagemanager.h" 32#include "opackagemanager.h"
33 33
34#include <qlayout.h> 34#include <qlayout.h>
35#include <qpushbutton.h> 35#include <qpushbutton.h>
36 36
37#include <qpe/resource.h> 37#include <qpe/resource.h>
38 38
39#include <opie/otabwidget.h> 39#include <opie2/otabwidget.h>
40 40
41PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) 41PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
42 : QWidget( 0x0 ) 42 : QWidget( 0x0 )
43 , m_packman( pm ) 43 , m_packman( pm )
44 , m_information( this ) 44 , m_information( this )
45 , m_files( this ) 45 , m_files( this )
46{ 46{
47 // Initialize UI 47 // Initialize UI
48 if ( parent ) 48 if ( parent )
49 parent->setCaption( package ); 49 parent->setCaption( package );
50 50
51 QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 ); 51 QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 );
52 52
53 OTabWidget *tabWidget = new OTabWidget( this ); 53 OTabWidget *tabWidget = new OTabWidget( this );
54 layout->addWidget( tabWidget ); 54 layout->addWidget( tabWidget );
55 55
56 // Information tab 56 // Information tab
57 m_information.reparent( tabWidget, QPoint( 0, 0 ) ); 57 m_information.reparent( tabWidget, QPoint( 0, 0 ) );
58 m_information.setReadOnly( true ); 58 m_information.setReadOnly( true );
59 tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) ); 59 tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) );
60 60
61 // Retrive package information 61 // Retrive package information
62 m_package = m_packman->findPackage( package ); 62 m_package = m_packman->findPackage( package );
63 if ( !m_package ) 63 if ( !m_package )
64 { 64 {
65 m_information.setText( tr( "Unable to retrieve package information." ) ); 65 m_information.setText( tr( "Unable to retrieve package information." ) );
66 return; 66 return;
67 } 67 }
68 68
69 // Display package information 69 // Display package information
70 if ( !m_package->information().isNull() ) 70 if ( !m_package->information().isNull() )
71 m_information.setText( m_package->information() ); 71 m_information.setText( m_package->information() );
72 else 72 else
73 { 73 {
74 // Package information is not cached, retrieve it 74 // Package information is not cached, retrieve it
75 QStringList list( package ); 75 QStringList list( package );
76 m_packman->executeCommand( OPackage::Info, &list, QString::null, this, SLOT(slotInfo(char*)), true ); 76 m_packman->executeCommand( OPackage::Info, &list, QString::null, this, SLOT(slotInfo(char*)), true );
77 } 77 }
78 78
79 // Files tab (display only if package is installed) 79 // Files tab (display only if package is installed)
80 if ( !m_package->versionInstalled().isNull() ) 80 if ( !m_package->versionInstalled().isNull() )
81 { 81 {
82 QWidget *filesWidget = new QWidget( tabWidget ); 82 QWidget *filesWidget = new QWidget( tabWidget );
83 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 ); 83 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 );
84 m_files.reparent( filesWidget, QPoint( 0, 0 ) ); 84 m_files.reparent( filesWidget, QPoint( 0, 0 ) );
85 m_files.setReadOnly( true ); 85 m_files.setReadOnly( true );
86 filesLayout->addWidget( &m_files ); 86 filesLayout->addWidget( &m_files );
87 87