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.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp
index d27eacb..c5924fd 100644
--- a/noncore/settings/packagemanager/packageinfodlg.cpp
+++ b/noncore/settings/packagemanager/packageinfodlg.cpp
@@ -1,36 +1,36 @@
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 <opie2/otabwidget.h> 34#include <opie2/otabwidget.h>
35 35
36#include <qpe/resource.h> 36#include <qpe/resource.h>
@@ -66,25 +66,25 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
66 { 66 {
67 m_information.setText( tr( "Unable to retrieve package information." ) ); 67 m_information.setText( tr( "Unable to retrieve package information." ) );
68 return; 68 return;
69 } 69 }
70 70
71 // Display package information 71 // Display package information
72 if ( !m_package->information().isNull() ) 72 if ( !m_package->information().isNull() )
73 m_information.setText( m_package->information() ); 73 m_information.setText( m_package->information() );
74 else 74 else
75 { 75 {
76 // Package information is not cached, retrieve it 76 // Package information is not cached, retrieve it
77 QStringList list( package ); 77 QStringList list( package );
78 m_packman->executeCommand( OPackage::Info, &list, QString::null, this, SLOT(slotInfo(char*)), true ); 78 m_packman->executeCommand( OPackage::Info, list, QString::null, this, SLOT(slotInfo(char*)), true );
79 } 79 }
80 80
81 // Files tab (display only if package is installed) 81 // Files tab (display only if package is installed)
82 if ( !m_package->versionInstalled().isNull() ) 82 if ( !m_package->versionInstalled().isNull() )
83 { 83 {
84 QWidget *filesWidget = new QWidget( tabWidget ); 84 QWidget *filesWidget = new QWidget( tabWidget );
85 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 ); 85 QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 2, 2 );
86 QWhatsThis::add( &m_files, tr( "This area contains a list of files contained in this package." ) ); 86 QWhatsThis::add( &m_files, tr( "This area contains a list of files contained in this package." ) );
87 m_files.reparent( filesWidget, QPoint( 0, 0 ) ); 87 m_files.reparent( filesWidget, QPoint( 0, 0 ) );
88 m_files.setReadOnly( true ); 88 m_files.setReadOnly( true );
89 filesLayout->addWidget( &m_files ); 89 filesLayout->addWidget( &m_files );
90 90
@@ -115,25 +115,25 @@ PackageInfoDlg::~PackageInfoDlg()
115 m_package->setInformation( m_information.text() ); 115 m_package->setInformation( m_information.text() );
116 116
117 // Cache package file list 117 // Cache package file list
118 if ( !m_files.text().isNull() ) 118 if ( !m_files.text().isNull() )
119 m_package->setFiles( m_files.text() ); 119 m_package->setFiles( m_files.text() );
120} 120}
121 121
122void PackageInfoDlg::slotBtnFileScan() 122void PackageInfoDlg::slotBtnFileScan()
123{ 123{
124 m_files.clear(); 124 m_files.clear();
125 125
126 QStringList list( m_package->name() ); 126 QStringList list( m_package->name() );
127 m_packman->executeCommand( OPackage::Files, &list, QString::null, this, SLOT(slotFiles(char*)), true ); 127 m_packman->executeCommand( OPackage::Files, list, QString::null, this, SLOT(slotFiles(char*)), true );
128} 128}
129 129
130void PackageInfoDlg::slotInfo( char *info ) 130void PackageInfoDlg::slotInfo( char *info )
131{ 131{
132 m_information.append( info ); 132 m_information.append( info );
133} 133}
134 134
135void PackageInfoDlg::slotFiles( char *filelist ) 135void PackageInfoDlg::slotFiles( char *filelist )
136{ 136{
137 QString str = filelist; 137 QString str = filelist;
138 138
139 // Skip first line of output ("Package xxx is installed...") 139 // Skip first line of output ("Package xxx is installed...")