author | drw <drw> | 2004-04-21 18:20:31 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-21 18:20:31 (UTC) |
commit | ac414fa3802b471857bc84ecdd0d37200541b0a7 (patch) (unidiff) | |
tree | b3557b5f67444c891f98fd3153a30d2cbd765636 | |
parent | a3c0ad0bddfdfd2a2ed476229df1ef8032a93871 (diff) | |
download | opie-ac414fa3802b471857bc84ecdd0d37200541b0a7.zip opie-ac414fa3802b471857bc84ecdd0d37200541b0a7.tar.gz opie-ac414fa3802b471857bc84ecdd0d37200541b0a7.tar.bz2 |
Added some missed QWhatsThis, removed OConfItem location as it is not used/needed, reordered includes to follow conventions, removed all using namespaces occurrances and updated documentation
22 files changed, 105 insertions, 139 deletions
diff --git a/noncore/settings/packagemanager/ChangeLog b/noncore/settings/packagemanager/ChangeLog index d53a2b3..c9e33c4 100644 --- a/noncore/settings/packagemanager/ChangeLog +++ b/noncore/settings/packagemanager/ChangeLog | |||
@@ -1,8 +1,17 @@ | |||
1 | 2004-04-21 Dan Williams <drw@handhelds.org> | ||
2 | |||
3 | * Released version 0.4.0 | ||
4 | * Added saving of ipkg configuration information | ||
5 | * Re-initialize ipkg when configuration information changes | ||
6 | * Added QWhatsThis for all UI controls | ||
7 | * Remove Location from OConfItem as it is not used/needed | ||
8 | * Re-ordered includes to follow Opie standards | ||
9 | |||
1 | 2004-02-13 Dan Williams <drw@handhelds.org> | 10 | 2004-02-13 Dan Williams <drw@handhelds.org> |
2 | 11 | ||
3 | * Released version 0.3.0 | 12 | * Released version 0.3.0 |
4 | * Fix handling of filtering options in View menu | 13 | * Fix handling of filtering options in View menu |
5 | * Do proper version string comparison | 14 | * Do proper version string comparison |
6 | * Fix string alignment code in PromptDlg to eliminate QT warning messages | 15 | * Fix string alignment code in PromptDlg to eliminate QT warning messages |
7 | 16 | ||
8 | 2004-02-12 Dan Williams <drw@handhelds.org> | 17 | 2004-02-12 Dan Williams <drw@handhelds.org> |
diff --git a/noncore/settings/packagemanager/README b/noncore/settings/packagemanager/README index 9324f9c..bf93c98 100644 --- a/noncore/settings/packagemanager/README +++ b/noncore/settings/packagemanager/README | |||
@@ -1,13 +1,13 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* | 2 | /* |
3 | /* Opie - Package Manager | 3 | /* Opie - Package Manager |
4 | /* ======================== | 4 | /* ======================== |
5 | /* Version 0.3.0 | 5 | /* Version 0.4.0 |
6 | /* | 6 | /* |
7 | /* A package management client for Opie | 7 | /* A package management client for Opie |
8 | /* | 8 | /* |
9 | /************************************************************************ | 9 | /************************************************************************ |
10 | 10 | ||
11 | ------------------------------------------------------- | 11 | ------------------------------------------------------- |
12 | Release Notes for Opie-PackageManager - January, 2004 | 12 | Release Notes for Opie-PackageManager - January, 2004 |
13 | ------------------------------------------------------- | 13 | ------------------------------------------------------- |
diff --git a/noncore/settings/packagemanager/TODO b/noncore/settings/packagemanager/TODO index 448ade3..633c589 100644 --- a/noncore/settings/packagemanager/TODO +++ b/noncore/settings/packagemanager/TODO | |||
@@ -1,28 +1,27 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* | 2 | /* |
3 | /* Opie - Package Manager | 3 | /* Opie - Package Manager |
4 | /* ======================== | 4 | /* ======================== |
5 | /* Version 0.3.0 | 5 | /* Version 0.4.0 |
6 | /* | 6 | /* |
7 | /* A package management client for Opie | 7 | /* A package management client for Opie |
8 | /* | 8 | /* |
9 | /************************************************************************ | 9 | /************************************************************************ |
10 | 10 | ||
11 | --------------------------------------------- | 11 | --------------------------------------------- |
12 | To-do for Opie-PackageManager - April, 2004 | 12 | To-do for Opie-PackageManager - April, 2004 |
13 | --------------------------------------------- | 13 | --------------------------------------------- |
14 | 14 | ||
15 | ====================== | 15 | ====================== |
16 | = Current release = | 16 | = Current release = |
17 | ====================== | 17 | ====================== |
18 | 18 | ||
19 | 1. Save configuration information (i.e. /etc/ipkg.conf) | 19 | 1. Link non-root destination apps |
20 | 2. Link non-root destination apps | 20 | 2. Implement QCOP interface for installing, removing, etc. |
21 | 3. Implement QCOP interface for installing, removing, etc. | 21 | 3. Redesign configuration dialog |
22 | 4. Redesign configuration dialog | ||
23 | 22 | ||
24 | ====================== | 23 | ====================== |
25 | = Future releases = | 24 | = Future releases = |
26 | ====================== | 25 | ====================== |
27 | 26 | ||
28 | 1. ??? \ No newline at end of file | 27 | 1. ??? \ No newline at end of file |
diff --git a/noncore/settings/packagemanager/entrydlg.cpp b/noncore/settings/packagemanager/entrydlg.cpp index 663abd2..fd275e1 100644 --- a/noncore/settings/packagemanager/entrydlg.cpp +++ b/noncore/settings/packagemanager/entrydlg.cpp | |||
@@ -24,23 +24,23 @@ | |||
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 "entrydlg.h" | 30 | #include "entrydlg.h" |
31 | 31 | ||
32 | #include <qpe/qpeapplication.h> | ||
33 | |||
32 | #include <qlabel.h> | 34 | #include <qlabel.h> |
33 | #include <qlayout.h> | 35 | #include <qlayout.h> |
34 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
35 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
36 | 38 | ||
37 | #include <qpe/qpeapplication.h> | ||
38 | |||
39 | EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal ) | 39 | EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal ) |
40 | : QDialog( parent, name, modal ) | 40 | : QDialog( parent, name, modal ) |
41 | { | 41 | { |
42 | QVBoxLayout *vbox = new QVBoxLayout( this, 6, 6 ); | 42 | QVBoxLayout *vbox = new QVBoxLayout( this, 6, 6 ); |
43 | 43 | ||
44 | QLabel *l = new QLabel( label, this ); | 44 | QLabel *l = new QLabel( label, this ); |
45 | l->setAlignment( AlignLeft | AlignTop | WordBreak ); | 45 | l->setAlignment( AlignLeft | AlignTop | WordBreak ); |
46 | vbox->addWidget( l ); | 46 | vbox->addWidget( l ); |
diff --git a/noncore/settings/packagemanager/filterdlg.h b/noncore/settings/packagemanager/filterdlg.h index de9ea80..bd89b42 100644 --- a/noncore/settings/packagemanager/filterdlg.h +++ b/noncore/settings/packagemanager/filterdlg.h | |||
@@ -25,25 +25,25 @@ | |||
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 | #ifndef FILTERDLG_H | 30 | #ifndef FILTERDLG_H |
31 | #define FILTERDLG_H | 31 | #define FILTERDLG_H |
32 | 32 | ||
33 | #include "opackagemanager.h" | ||
34 | |||
33 | #include <qcheckbox.h> | 35 | #include <qcheckbox.h> |
34 | #include <qdialog.h> | 36 | #include <qdialog.h> |
35 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
36 | #include <qlayout.h> | 38 | #include <qlayout.h> |
37 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
38 | #include <qscrollview.h> | 40 | #include <qscrollview.h> |
39 | 41 | ||
40 | #include "opackagemanager.h" | ||
41 | |||
42 | class FilterDlg : public QDialog | 42 | class FilterDlg : public QDialog |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | 45 | ||
46 | public: | 46 | public: |
47 | FilterDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &name = 0x0, | 47 | FilterDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &name = 0x0, |
48 | const QString &server = 0x0, const QString &destination = 0x0, | 48 | const QString &server = 0x0, const QString &destination = 0x0, |
49 | OPackageManager::Status status = OPackageManager::All, | 49 | OPackageManager::Status status = OPackageManager::All, |
diff --git a/noncore/settings/packagemanager/global.h b/noncore/settings/packagemanager/global.h deleted file mode 100644 index 0fe5b85..0000000 --- a/noncore/settings/packagemanager/global.h +++ b/dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (c) 2003 Dan Williams <drw@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | |||
30 | */ | ||
31 | |||
32 | #ifndef GLOBAL_H | ||
33 | #define GLOBAL_H | ||
34 | |||
35 | #define VERSION "0.0.0" | ||
36 | |||
37 | #endif \ No newline at end of file | ||
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp index 4a55c10..0cb30e2 100644 --- a/noncore/settings/packagemanager/installdlg.cpp +++ b/noncore/settings/packagemanager/installdlg.cpp | |||
@@ -24,37 +24,36 @@ | |||
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 "installdlg.h" | 30 | #include "installdlg.h" |
31 | 31 | ||
32 | #include <sys/vfs.h> | 32 | #include <opie2/ofiledialog.h> |
33 | |||
34 | #include <qpe/fileselector.h> | ||
35 | #include <qpe/resource.h> | ||
36 | #include <qpe/storage.h> | ||
33 | 37 | ||
34 | #include <qapplication.h> | 38 | #include <qapplication.h> |
35 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
36 | #include <qfileinfo.h> | 40 | #include <qfileinfo.h> |
37 | #include <qgroupbox.h> | 41 | #include <qgroupbox.h> |
38 | #include <qlabel.h> | 42 | #include <qlabel.h> |
39 | #include <qlayout.h> | 43 | #include <qlayout.h> |
40 | #include <qmap.h> | 44 | #include <qmap.h> |
41 | #include <qmultilineedit.h> | 45 | #include <qmultilineedit.h> |
42 | #include <qpushbutton.h> | 46 | #include <qpushbutton.h> |
43 | 47 | ||
44 | #include <qpe/fileselector.h> | 48 | #include <sys/vfs.h> |
45 | #include <qpe/resource.h> | ||
46 | #include <qpe/storage.h> | ||
47 | |||
48 | #include <opie2/ofiledialog.h> | ||
49 | 49 | ||
50 | #include "opackagemanager.h" | 50 | #include "opackagemanager.h" |
51 | 51 | ||
52 | using namespace Opie::Ui; | ||
53 | InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo, | 52 | InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo, |
54 | OPackage::Command command1, QStringList *packages1, | 53 | OPackage::Command command1, QStringList *packages1, |
55 | OPackage::Command command2, QStringList *packages2, | 54 | OPackage::Command command2, QStringList *packages2, |
56 | OPackage::Command command3, QStringList *packages3 ) | 55 | OPackage::Command command3, QStringList *packages3 ) |
57 | : QWidget( 0x0 ) | 56 | : QWidget( 0x0 ) |
58 | , m_packman( pm ) | 57 | , m_packman( pm ) |
59 | , m_numCommands( 0 ) | 58 | , m_numCommands( 0 ) |
60 | , m_currCommand( 0 ) | 59 | , m_currCommand( 0 ) |
@@ -271,17 +270,17 @@ void InstallDlg::slotBtnOptions() | |||
271 | QMap<QString, QStringList> map; | 270 | QMap<QString, QStringList> map; |
272 | map.insert( tr( "All" ), QStringList() ); | 271 | map.insert( tr( "All" ), QStringList() ); |
273 | QStringList text; | 272 | QStringList text; |
274 | text << "text/*"; | 273 | text << "text/*"; |
275 | map.insert(tr( "Text" ), text ); | 274 | map.insert(tr( "Text" ), text ); |
276 | text << "*"; | 275 | text << "*"; |
277 | map.insert( tr( "All" ), text ); | 276 | map.insert( tr( "All" ), text ); |
278 | 277 | ||
279 | QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map ); | 278 | QString filename = Opie::Ui::OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map ); |
280 | if( !filename.isEmpty() ) | 279 | if( !filename.isEmpty() ) |
281 | { | 280 | { |
282 | QString currentFileName = QFileInfo( filename ).fileName(); | 281 | QString currentFileName = QFileInfo( filename ).fileName(); |
283 | DocLnk doc; | 282 | DocLnk doc; |
284 | doc.setType( "text/plain" ); | 283 | doc.setType( "text/plain" ); |
285 | doc.setFile( filename ); | 284 | doc.setFile( filename ); |
286 | doc.setName( currentFileName ); | 285 | doc.setName( currentFileName ); |
287 | FileManager fm; | 286 | FileManager fm; |
diff --git a/noncore/settings/packagemanager/main.cpp b/noncore/settings/packagemanager/main.cpp index c050e1a..3792881 100644 --- a/noncore/settings/packagemanager/main.cpp +++ b/noncore/settings/packagemanager/main.cpp | |||
@@ -26,10 +26,9 @@ | |||
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "mainwindow.h" | 30 | #include "mainwindow.h" |
31 | 31 | ||
32 | #include <opie2/oapplicationfactory.h> | 32 | #include <opie2/oapplicationfactory.h> |
33 | 33 | ||
34 | using namespace Opie::Core; | 34 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MainWindow> ) |
35 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | ||
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 810046f..991cc81 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -22,38 +22,38 @@ | |||
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 "mainwindow.h" | ||
31 | #include "installdlg.h" | ||
32 | #include "filterdlg.h" | ||
33 | #include "promptdlg.h" | ||
34 | #include "entrydlg.h" | ||
35 | #include "packageinfodlg.h" | ||
36 | |||
37 | #include <qpe/qcopenvelope_qws.h> | ||
38 | #include <qpe/qpeapplication.h> | ||
39 | #include <qpe/resource.h> | ||
40 | |||
30 | #include <qaction.h> | 41 | #include <qaction.h> |
31 | #include <qdir.h> | 42 | #include <qdir.h> |
32 | #include <qlayout.h> | 43 | #include <qlayout.h> |
33 | #include <qlineedit.h> | 44 | #include <qlineedit.h> |
34 | #include <qmenubar.h> | 45 | #include <qmenubar.h> |
35 | #include <qmessagebox.h> | 46 | #include <qmessagebox.h> |
36 | #include <qpopupmenu.h> | 47 | #include <qpopupmenu.h> |
37 | #include <qtimer.h> | 48 | #include <qtimer.h> |
38 | #include <qtoolbar.h> | 49 | #include <qtoolbar.h> |
39 | #include <qwhatsthis.h> | 50 | #include <qwhatsthis.h> |
40 | 51 | ||
41 | #include <qpe/qcopenvelope_qws.h> | ||
42 | #include <qpe/qpeapplication.h> | ||
43 | #include <qpe/resource.h> | ||
44 | |||
45 | #include "mainwindow.h" | ||
46 | #include "installdlg.h" | ||
47 | #include "filterdlg.h" | ||
48 | #include "promptdlg.h" | ||
49 | #include "entrydlg.h" | ||
50 | #include "packageinfodlg.h" | ||
51 | |||
52 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ ) | 52 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ ) |
53 | : QMainWindow( parent, name, WStyle_ContextHelp ) | 53 | : QMainWindow( parent, name, WStyle_ContextHelp ) |
54 | , m_config( "packman" ) | 54 | , m_config( "packman" ) |
55 | , m_packman( &m_config, this ) | 55 | , m_packman( &m_config, this ) |
56 | , m_menuBar( this ) | 56 | , m_menuBar( this ) |
57 | , m_toolBar( this ) | 57 | , m_toolBar( this ) |
58 | , m_findBar( this ) | 58 | , m_findBar( this ) |
59 | , m_widgetStack( this ) | 59 | , m_widgetStack( this ) |
diff --git a/noncore/settings/packagemanager/mainwindow.h b/noncore/settings/packagemanager/mainwindow.h index fb555c5..632effb 100644 --- a/noncore/settings/packagemanager/mainwindow.h +++ b/noncore/settings/packagemanager/mainwindow.h | |||
@@ -25,28 +25,28 @@ | |||
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 | #ifndef MAINWINDOW_H | 30 | #ifndef MAINWINDOW_H |
31 | #define MAINWINDOW_H | 31 | #define MAINWINDOW_H |
32 | 32 | ||
33 | #include "opackagemanager.h" | ||
34 | |||
35 | #include <qpe/config.h> | ||
36 | |||
33 | #include <qlabel.h> | 37 | #include <qlabel.h> |
34 | #include <qlistview.h> | 38 | #include <qlistview.h> |
35 | #include <qmainwindow.h> | 39 | #include <qmainwindow.h> |
36 | #include <qpixmap.h> | 40 | #include <qpixmap.h> |
37 | #include <qprogressbar.h> | 41 | #include <qprogressbar.h> |
38 | #include <qtoolbar.h> | 42 | #include <qtoolbar.h> |
39 | #include <qwidgetstack.h> | 43 | #include <qwidgetstack.h> |
40 | 44 | ||
41 | #include <qpe/config.h> | ||
42 | |||
43 | #include "opackagemanager.h" | ||
44 | |||
45 | class QAction; | 45 | class QAction; |
46 | class QLineEdit; | 46 | class QLineEdit; |
47 | 47 | ||
48 | class MainWindow :public QMainWindow | 48 | class MainWindow :public QMainWindow |
49 | { | 49 | { |
50 | Q_OBJECT | 50 | Q_OBJECT |
51 | 51 | ||
52 | public: | 52 | public: |
diff --git a/noncore/settings/packagemanager/oconfitem.cpp b/noncore/settings/packagemanager/oconfitem.cpp index 940a6de..a90730c 100644 --- a/noncore/settings/packagemanager/oconfitem.cpp +++ b/noncore/settings/packagemanager/oconfitem.cpp | |||
@@ -26,17 +26,16 @@ | |||
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "oconfitem.h" | 32 | #include "oconfitem.h" |
33 | 33 | ||
34 | OConfItem::OConfItem( const QString &location, Type type, const QString &name, | 34 | OConfItem::OConfItem( Type type, const QString &name, |
35 | const QString &value, bool active ) | 35 | const QString &value, bool active ) |
36 | : m_location( location ) | 36 | : m_type( type ) |
37 | , m_type( type ) | ||
38 | , m_name( name ) | 37 | , m_name( name ) |
39 | , m_value( value ) | 38 | , m_value( value ) |
40 | , m_active( active ) | 39 | , m_active( active ) |
41 | { | 40 | { |
42 | } | 41 | } |
diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h index aeee511..db77980 100644 --- a/noncore/settings/packagemanager/oconfitem.h +++ b/noncore/settings/packagemanager/oconfitem.h | |||
@@ -35,61 +35,58 @@ | |||
35 | #include <qlist.h> | 35 | #include <qlist.h> |
36 | #include <qstring.h> | 36 | #include <qstring.h> |
37 | 37 | ||
38 | class OConfItem | 38 | class OConfItem |
39 | { | 39 | { |
40 | public: | 40 | public: |
41 | enum Type { Source, Destination, Option, Arch, NotDefined }; | 41 | enum Type { Source, Destination, Option, Arch, NotDefined }; |
42 | 42 | ||
43 | OConfItem( const QString &location = 0x0, Type type = NotDefined, const QString &name = 0x0, | 43 | OConfItem( Type type = NotDefined, const QString &name = 0x0, const QString &value = 0x0, |
44 | const QString &value = 0x0, bool active = true ); | 44 | bool active = true ); |
45 | 45 | ||
46 | const QString &location() { return m_location; } | ||
47 | Type type() { return m_type; } | 46 | Type type() { return m_type; } |
48 | const QString &name() { return m_name; } | 47 | const QString &name() { return m_name; } |
49 | const QString &value() { return m_value; } | 48 | const QString &value() { return m_value; } |
50 | bool active() { return m_active; } | 49 | bool active() { return m_active; } |
51 | 50 | ||
52 | void setLocation( const QString &location ) { m_location = location; } | 51 | void setType( Type type ) { m_type = type; } |
53 | void setType( Type type ) { m_type = type; } | 52 | void setName( const QString &name ) { m_name = name; } |
54 | void setName( const QString &name ) { m_name = name; } | 53 | void setValue( const QString &value ) { m_value = value; } |
55 | void setValue( const QString &value ) { m_value = value; } | 54 | void setActive( bool active ) { m_active = active; } |
56 | void setActive( bool active ) { m_active = active; } | ||
57 | 55 | ||
58 | private: | 56 | private: |
59 | QString m_location; // Configuration file where item is located | ||
60 | Type m_type; // Type of configuration item | 57 | Type m_type; // Type of configuration item |
61 | QString m_name; // Name of item | 58 | QString m_name; // Name of item |
62 | QString m_value; // Value of item | 59 | QString m_value; // Value of item |
63 | bool m_active; // Indicates whether item is currently active | 60 | bool m_active; // Indicates whether item is currently active |
64 | }; | 61 | }; |
65 | 62 | ||
66 | class OConfItemList : public QList<OConfItem> | 63 | class OConfItemList : public QList<OConfItem> |
67 | { | 64 | { |
68 | private: | 65 | private: |
69 | 66 | ||
70 | int compareItems( QCollection::Item item1, QCollection::Item item2 ) | 67 | int compareItems( QCollection::Item item1, QCollection::Item item2 ) |
71 | { | 68 | { |
72 | // Sort by OConfItem location then by type | 69 | // Sort by OConfItem location then by type |
73 | QString loc1 = reinterpret_cast<OConfItem*>(item1)->location(); | 70 | OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); |
74 | QString loc2 = reinterpret_cast<OConfItem*>(item2)->location(); | 71 | OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type(); |
75 | if ( loc1 < loc2 ) | 72 | if ( type1 < type2 ) |
76 | return -1; | 73 | return -1; |
77 | else if ( loc1 == loc2 ) | 74 | else if ( type1 == type2 ) |
78 | { | 75 | { |
79 | OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); | 76 | QString name1 = reinterpret_cast<OConfItem*>(item1)->name(); |
80 | OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type(); | 77 | QString name2 = reinterpret_cast<OConfItem*>(item2)->name(); |
81 | if ( type1 < type2 ) | 78 | if ( name1 < name2 ) |
82 | return -1; | 79 | return -1; |
83 | else if ( type1 == type2 ) | 80 | else if ( name1 == name2 ) |
84 | return 0; | 81 | return 0; |
85 | else /*if ( type1 > type2 )*/ | 82 | else /*if ( name1 > name2 )*/ |
86 | return 1; | 83 | return 1; |
87 | } | 84 | } |
88 | else /*if ( loc1 > loc2 )*/ | 85 | else /*if ( type1 > type2 )*/ |
89 | return 1; | 86 | return 1; |
90 | } | 87 | } |
91 | }; | 88 | }; |
92 | 89 | ||
93 | typedef QListIterator<OConfItem> OConfItemListIterator; | 90 | typedef QListIterator<OConfItem> OConfItemListIterator; |
94 | 91 | ||
95 | #endif | 92 | #endif |
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index 696a64a..87a30bb 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp | |||
@@ -26,23 +26,22 @@ | |||
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "oipkg.h" | 32 | #include "oipkg.h" |
33 | 33 | ||
34 | #include <stdlib.h> | ||
35 | #include <string.h> | ||
36 | |||
37 | #include <qdir.h> | 34 | #include <qdir.h> |
38 | #include <qfile.h> | 35 | #include <qfile.h> |
39 | #include <qtextstream.h> | 36 | #include <qtextstream.h> |
40 | 37 | ||
38 | #include <stdlib.h> | ||
39 | |||
41 | const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file | 40 | const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file |
42 | const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files | 41 | const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files |
43 | const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists | 42 | const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists |
44 | const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location | 43 | const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location |
45 | 44 | ||
46 | OIpkg *oipkg; | 45 | OIpkg *oipkg; |
47 | 46 | ||
48 | // Ipkg callback functions | 47 | // Ipkg callback functions |
@@ -524,17 +523,17 @@ void OIpkg::loadConfiguration() | |||
524 | QString value = ""; | 523 | QString value = ""; |
525 | if ( endpos > -1 ) | 524 | if ( endpos > -1 ) |
526 | value = line.right( line.length() - endpos - 1 ); | 525 | value = line.right( line.length() - endpos - 1 ); |
527 | 526 | ||
528 | // Active | 527 | // Active |
529 | bool active = !line.startsWith( "#" ); | 528 | bool active = !line.startsWith( "#" ); |
530 | 529 | ||
531 | // Add to list | 530 | // Add to list |
532 | m_confInfo->append( new OConfItem( absFile, type, name, value, active ) ); | 531 | m_confInfo->append( new OConfItem( type, name, value, active ) ); |
533 | } | 532 | } |
534 | } | 533 | } |
535 | } | 534 | } |
536 | 535 | ||
537 | f.close(); | 536 | f.close(); |
538 | } | 537 | } |
539 | } | 538 | } |
540 | } | 539 | } |
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h index ea126cf..b8a859a 100644 --- a/noncore/settings/packagemanager/oipkg.h +++ b/noncore/settings/packagemanager/oipkg.h | |||
@@ -27,26 +27,26 @@ | |||
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef OIPKG_H | 32 | #ifndef OIPKG_H |
33 | #define OIPKG_H | 33 | #define OIPKG_H |
34 | 34 | ||
35 | extern "C" { | 35 | #include "oconfitem.h" |
36 | #include <libipkg.h> | 36 | #include "opackage.h" |
37 | }; | ||
38 | |||
39 | #include <qobject.h> | ||
40 | 37 | ||
41 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
42 | 39 | ||
43 | #include "oconfitem.h" | 40 | #include <qobject.h> |
44 | #include "opackage.h" | 41 | |
42 | extern "C" { | ||
43 | #include <libipkg.h> | ||
44 | }; | ||
45 | 45 | ||
46 | // Ipkg execution options (m_ipkgExecOptions) | 46 | // Ipkg execution options (m_ipkgExecOptions) |
47 | #define FORCE_DEPENDS 0x0001 | 47 | #define FORCE_DEPENDS 0x0001 |
48 | #define FORCE_REMOVE 0x0002 | 48 | #define FORCE_REMOVE 0x0002 |
49 | #define FORCE_REINSTALL 0x0004 | 49 | #define FORCE_REINSTALL 0x0004 |
50 | #define FORCE_OVERWRITE 0x0008 | 50 | #define FORCE_OVERWRITE 0x0008 |
51 | 51 | ||
52 | class OConfItemList; | 52 | class OConfItemList; |
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index d134651..7941ab8 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -26,29 +26,28 @@ | |||
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "oipkgconfigdlg.h" | 32 | #include "oipkgconfigdlg.h" |
33 | 33 | ||
34 | #include <qpe/resource.h> | ||
35 | |||
34 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
35 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
36 | #include <qgroupbox.h> | 38 | #include <qgroupbox.h> |
37 | #include <qlabel.h> | 39 | #include <qlabel.h> |
38 | #include <qlineedit.h> | 40 | #include <qlineedit.h> |
39 | #include <qlistbox.h> | 41 | #include <qlistbox.h> |
40 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
41 | #include <qscrollview.h> | 43 | #include <qscrollview.h> |
42 | #include <qwhatsthis.h> | 44 | #include <qwhatsthis.h> |
43 | 45 | ||
44 | #include <qpe/resource.h> | ||
45 | |||
46 | using namespace Opie::Ui; | ||
47 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) | 46 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) |
48 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 47 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
49 | , m_ipkg( ipkg ) | 48 | , m_ipkg( ipkg ) |
50 | , m_configs( 0x0 ) | 49 | , m_configs( 0x0 ) |
51 | , m_installOptions( installOptions ) | 50 | , m_installOptions( installOptions ) |
52 | , m_serverNew( false ) | 51 | , m_serverNew( false ) |
53 | , m_serverCurrent( -1 ) | 52 | , m_serverCurrent( -1 ) |
54 | , m_destNew( false ) | 53 | , m_destNew( false ) |
@@ -96,41 +95,41 @@ void OIpkgConfigDlg::accept() | |||
96 | // Update proxy information before saving settings | 95 | // Update proxy information before saving settings |
97 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); | 96 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); |
98 | if ( confItem ) | 97 | if ( confItem ) |
99 | { | 98 | { |
100 | confItem->setValue( m_proxyHttpServer->text() ); | 99 | confItem->setValue( m_proxyHttpServer->text() ); |
101 | confItem->setActive( m_proxyHttpActive->isChecked() ); | 100 | confItem->setActive( m_proxyHttpActive->isChecked() ); |
102 | } | 101 | } |
103 | else | 102 | else |
104 | m_configs->append( new OConfItem( QString::null, OConfItem::Option, "http_proxy", | 103 | m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", |
105 | m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); | 104 | m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); |
106 | 105 | ||
107 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); | 106 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); |
108 | if ( confItem ) | 107 | if ( confItem ) |
109 | { | 108 | { |
110 | confItem->setValue( m_proxyFtpServer->text() ); | 109 | confItem->setValue( m_proxyFtpServer->text() ); |
111 | confItem->setActive( m_proxyFtpActive->isChecked() ); | 110 | confItem->setActive( m_proxyFtpActive->isChecked() ); |
112 | } | 111 | } |
113 | else | 112 | else |
114 | m_configs->append( new OConfItem( QString::null, OConfItem::Option, "ftp_proxy", | 113 | m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", |
115 | m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); | 114 | m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); |
116 | 115 | ||
117 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); | 116 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); |
118 | if ( confItem ) | 117 | if ( confItem ) |
119 | confItem->setValue( m_proxyUsername->text() ); | 118 | confItem->setValue( m_proxyUsername->text() ); |
120 | else | 119 | else |
121 | m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_username", | 120 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", |
122 | m_proxyUsername->text() ) ); | 121 | m_proxyUsername->text() ) ); |
123 | 122 | ||
124 | confItem = findConfItem( OConfItem::Option, "proxy_password" ); | 123 | confItem = findConfItem( OConfItem::Option, "proxy_password" ); |
125 | if ( confItem ) | 124 | if ( confItem ) |
126 | confItem->setValue( m_proxyPassword->text() ); | 125 | confItem->setValue( m_proxyPassword->text() ); |
127 | else | 126 | else |
128 | m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_password", | 127 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_password", |
129 | m_proxyPassword->text() ) ); | 128 | m_proxyPassword->text() ) ); |
130 | 129 | ||
131 | m_ipkg->setConfigItems( m_configs ); | 130 | m_ipkg->setConfigItems( m_configs ); |
132 | } | 131 | } |
133 | 132 | ||
134 | // Save options configuration | 133 | // Save options configuration |
135 | int options = 0; | 134 | int options = 0; |
136 | if ( m_optForceDepends->isChecked() ) | 135 | if ( m_optForceDepends->isChecked() ) |
@@ -527,17 +526,17 @@ void OIpkgConfigDlg::slotServerUpdate() | |||
527 | // Update list box | 526 | // Update list box |
528 | m_serverList->changeItem( newName, m_serverCurrent ); | 527 | m_serverList->changeItem( newName, m_serverCurrent ); |
529 | } | 528 | } |
530 | } | 529 | } |
531 | } | 530 | } |
532 | else | 531 | else |
533 | { | 532 | { |
534 | // Add new destination to configuration list | 533 | // Add new destination to configuration list |
535 | m_configs->append( new OConfItem( QString::null, OConfItem::Source, newName, | 534 | m_configs->append( new OConfItem( OConfItem::Source, newName, |
536 | m_serverLocation->text(), m_serverActive->isChecked() ) ); | 535 | m_serverLocation->text(), m_serverActive->isChecked() ) ); |
537 | m_configs->sort(); | 536 | m_configs->sort(); |
538 | 537 | ||
539 | m_serverList->insertItem( newName ); | 538 | m_serverList->insertItem( newName ); |
540 | m_serverList->setCurrentItem( m_serverList->count() ); | 539 | m_serverList->setCurrentItem( m_serverList->count() ); |
541 | m_serverNew = false; | 540 | m_serverNew = false; |
542 | m_serverList->insertItem( newName ); | 541 | m_serverList->insertItem( newName ); |
543 | } | 542 | } |
@@ -613,17 +612,17 @@ void OIpkgConfigDlg::slotDestUpdate() | |||
613 | // Update list box | 612 | // Update list box |
614 | m_destList->changeItem( newName, m_destCurrent ); | 613 | m_destList->changeItem( newName, m_destCurrent ); |
615 | } | 614 | } |
616 | } | 615 | } |
617 | } | 616 | } |
618 | else | 617 | else |
619 | { | 618 | { |
620 | // Add new destination to configuration list | 619 | // Add new destination to configuration list |
621 | m_configs->append( new OConfItem( QString::null, OConfItem::Destination, newName, | 620 | m_configs->append( new OConfItem( OConfItem::Destination, newName, |
622 | m_destLocation->text(), m_destActive->isChecked() ) ); | 621 | m_destLocation->text(), m_destActive->isChecked() ) ); |
623 | m_configs->sort(); | 622 | m_configs->sort(); |
624 | 623 | ||
625 | m_destList->insertItem( newName ); | 624 | m_destList->insertItem( newName ); |
626 | m_destList->setCurrentItem( m_destList->count() ); | 625 | m_destList->setCurrentItem( m_destList->count() ); |
627 | m_destNew = false; | 626 | m_destNew = false; |
628 | } | 627 | } |
629 | } | 628 | } |
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.h b/noncore/settings/packagemanager/oipkgconfigdlg.h index 0aba898..800d94a 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.h +++ b/noncore/settings/packagemanager/oipkgconfigdlg.h | |||
@@ -28,21 +28,21 @@ | |||
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | 32 | ||
33 | #ifndef OIPKGCONFIGDLG_H | 33 | #ifndef OIPKGCONFIGDLG_H |
34 | #define OIPKGCONFIGDLG_H | 34 | #define OIPKGCONFIGDLG_H |
35 | 35 | ||
36 | #include <opie2/otabwidget.h> | ||
37 | |||
36 | #include <qdialog.h> | 38 | #include <qdialog.h> |
37 | #include <qlayout.h> | 39 | #include <qlayout.h> |
38 | 40 | ||
39 | #include <opie2/otabwidget.h> | ||
40 | |||
41 | #include "oipkg.h" | 41 | #include "oipkg.h" |
42 | 42 | ||
43 | class QCheckBox; | 43 | class QCheckBox; |
44 | class QComboBox; | 44 | class QComboBox; |
45 | class QLineEdit; | 45 | class QLineEdit; |
46 | class QListBox; | 46 | class QListBox; |
47 | 47 | ||
48 | class OIpkgConfigDlg : public QDialog | 48 | class OIpkgConfigDlg : public QDialog |
@@ -68,22 +68,22 @@ private: | |||
68 | QString m_serverCurrName; // Name of currently selected server in m_serverList | 68 | QString m_serverCurrName; // Name of currently selected server in m_serverList |
69 | 69 | ||
70 | // Destination cached information | 70 | // Destination cached information |
71 | bool m_destNew; // Indicates if destination information is for a new destination | 71 | bool m_destNew; // Indicates if destination information is for a new destination |
72 | int m_destCurrent; // Index of currently selected destination in m_destList | 72 | int m_destCurrent; // Index of currently selected destination in m_destList |
73 | QString m_destCurrName; // Name of currently selected destination in m_destList | 73 | QString m_destCurrName; // Name of currently selected destination in m_destList |
74 | 74 | ||
75 | // UI controls | 75 | // UI controls |
76 | QVBoxLayout m_layout; // Main dialog layout control | 76 | QVBoxLayout m_layout; // Main dialog layout control |
77 | Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control | 77 | Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control |
78 | QWidget *m_serverWidget; // Widget containing server configuration controls | 78 | QWidget *m_serverWidget; // Widget containing server configuration controls |
79 | QWidget *m_destWidget; // Widget containing destination configuration controls | 79 | QWidget *m_destWidget; // Widget containing destination configuration controls |
80 | QWidget *m_proxyWidget; // Widget containing proxy configuration controls | 80 | QWidget *m_proxyWidget; // Widget containing proxy configuration controls |
81 | QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls | 81 | QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls |
82 | 82 | ||
83 | // Server configuration UI controls | 83 | // Server configuration UI controls |
84 | QListBox *m_serverList; // Server list selection | 84 | QListBox *m_serverList; // Server list selection |
85 | QLineEdit *m_serverName; // Server name edit box | 85 | QLineEdit *m_serverName; // Server name edit box |
86 | QLineEdit *m_serverLocation; // Server location URL edit box | 86 | QLineEdit *m_serverLocation; // Server location URL edit box |
87 | QCheckBox *m_serverActive; // Activate server check box | 87 | QCheckBox *m_serverActive; // Activate server check box |
88 | 88 | ||
89 | // Destination configuration UI controls | 89 | // Destination configuration UI controls |
diff --git a/noncore/settings/packagemanager/opackagemanager.cpp b/noncore/settings/packagemanager/opackagemanager.cpp index 3633e05..f75d3b3 100644 --- a/noncore/settings/packagemanager/opackagemanager.cpp +++ b/noncore/settings/packagemanager/opackagemanager.cpp | |||
@@ -24,22 +24,22 @@ | |||
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <ctype.h> | 32 | #include "opackagemanager.h" |
33 | #include "oipkgconfigdlg.h" | ||
33 | 34 | ||
34 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
35 | 36 | ||
36 | #include "opackagemanager.h" | 37 | #include <ctype.h> |
37 | #include "oipkgconfigdlg.h" | ||
38 | 38 | ||
39 | OPackageManager::OPackageManager( Config *config, QObject *parent, const char *name ) | 39 | OPackageManager::OPackageManager( Config *config, QObject *parent, const char *name ) |
40 | : QObject( parent, name ) | 40 | : QObject( parent, name ) |
41 | , m_config( config ) | 41 | , m_config( config ) |
42 | , m_ipkg( m_config, this ) | 42 | , m_ipkg( m_config, this ) |
43 | , m_packages( 9973 ) | 43 | , m_packages( 9973 ) |
44 | , m_categories() | 44 | , m_categories() |
45 | { | 45 | { |
diff --git a/noncore/settings/packagemanager/opackagemanager.h b/noncore/settings/packagemanager/opackagemanager.h index b710a51..58e597b 100644 --- a/noncore/settings/packagemanager/opackagemanager.h +++ b/noncore/settings/packagemanager/opackagemanager.h | |||
@@ -27,23 +27,23 @@ | |||
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifndef OPACKAGEMANAGER_H | 32 | #ifndef OPACKAGEMANAGER_H |
33 | #define OPACKAGEMANAGER_H | 33 | #define OPACKAGEMANAGER_H |
34 | 34 | ||
35 | #include <qdict.h> | 35 | #include "oipkg.h" |
36 | #include <qobject.h> | ||
37 | #include <qstringlist.h> | ||
38 | 36 | ||
39 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
40 | 38 | ||
41 | #include "oipkg.h" | 39 | #include <qdict.h> |
40 | #include <qobject.h> | ||
41 | #include <qstringlist.h> | ||
42 | 42 | ||
43 | class OPackageManager : public QObject | 43 | class OPackageManager : public QObject |
44 | { | 44 | { |
45 | Q_OBJECT | 45 | Q_OBJECT |
46 | 46 | ||
47 | public: | 47 | public: |
48 | OPackageManager( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 ); | 48 | OPackageManager( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 ); |
49 | 49 | ||
diff --git a/noncore/settings/packagemanager/opie-packagemanager.control b/noncore/settings/packagemanager/opie-packagemanager.control index aff8866..09bb18b 100644 --- a/noncore/settings/packagemanager/opie-packagemanager.control +++ b/noncore/settings/packagemanager/opie-packagemanager.control | |||
@@ -2,9 +2,9 @@ Package: opie-packagemanager | |||
2 | Files: plugins/application/libpackagemanager.so* bin/packagemanager pics/packagemanager apps/Settings/packagemanager.desktop | 2 | Files: plugins/application/libpackagemanager.so* bin/packagemanager pics/packagemanager apps/Settings/packagemanager.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg | 5 | Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg |
6 | Replaces: packagemanager | 6 | Replaces: packagemanager |
7 | Architecture: arm | 7 | Architecture: arm |
8 | Maintainer: Dan Williams (drw@handhelds.org) | 8 | Maintainer: Dan Williams (drw@handhelds.org) |
9 | Description: Opie package management client | 9 | Description: Opie package management client |
10 | Version: 0.3.0$EXTRAVERSION | 10 | Version: 0.4.0$EXTRAVERSION |
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp index 73d3de7..d27eacb 100644 --- a/noncore/settings/packagemanager/packageinfodlg.cpp +++ b/noncore/settings/packagemanager/packageinfodlg.cpp | |||
@@ -26,40 +26,41 @@ | |||
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 <opie2/otabwidget.h> |
35 | #include <qpushbutton.h> | ||
36 | 35 | ||
37 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
38 | 37 | ||
39 | #include <opie2/otabwidget.h> | 38 | #include <qlayout.h> |
39 | #include <qpushbutton.h> | ||
40 | #include <qwhatsthis.h> | ||
40 | 41 | ||
41 | using namespace Opie::Ui; | ||
42 | PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) | 42 | PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) |
43 | : QWidget( 0x0 ) | 43 | : QWidget( 0x0 ) |
44 | , m_packman( pm ) | 44 | , m_packman( pm ) |
45 | , m_information( this ) | 45 | , m_information( this ) |
46 | , m_files( this ) | 46 | , m_files( this ) |
47 | { | 47 | { |
48 | // Initialize UI | 48 | // Initialize UI |
49 | if ( parent ) | 49 | if ( parent ) |
50 | parent->setCaption( package ); | 50 | parent->setCaption( package ); |
51 | 51 | ||
52 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 ); | 52 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 ); |
53 | 53 | ||
54 | OTabWidget *tabWidget = new OTabWidget( this ); | 54 | Opie::Ui::OTabWidget *tabWidget = new Opie::Ui::OTabWidget( this ); |
55 | layout->addWidget( tabWidget ); | 55 | layout->addWidget( tabWidget ); |
56 | 56 | ||
57 | // Information tab | 57 | // Information tab |
58 | QWhatsThis::add( &m_information, tr( "This area contains information about the package." ) ); | ||
58 | m_information.reparent( tabWidget, QPoint( 0, 0 ) ); | 59 | m_information.reparent( tabWidget, QPoint( 0, 0 ) ); |
59 | m_information.setReadOnly( true ); | 60 | m_information.setReadOnly( true ); |
60 | tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) ); | 61 | tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) ); |
61 | 62 | ||
62 | // Retrive package information | 63 | // Retrive package information |
63 | m_package = m_packman->findPackage( package ); | 64 | m_package = m_packman->findPackage( package ); |
64 | if ( !m_package ) | 65 | if ( !m_package ) |
65 | { | 66 | { |
@@ -77,22 +78,24 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr | |||
77 | 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 ); |
78 | } | 79 | } |
79 | 80 | ||
80 | // Files tab (display only if package is installed) | 81 | // Files tab (display only if package is installed) |
81 | if ( !m_package->versionInstalled().isNull() ) | 82 | if ( !m_package->versionInstalled().isNull() ) |
82 | { | 83 | { |
83 | QWidget *filesWidget = new QWidget( tabWidget ); | 84 | QWidget *filesWidget = new QWidget( tabWidget ); |
84 | 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." ) ); | ||
85 | m_files.reparent( filesWidget, QPoint( 0, 0 ) ); | 87 | m_files.reparent( filesWidget, QPoint( 0, 0 ) ); |
86 | m_files.setReadOnly( true ); | 88 | m_files.setReadOnly( true ); |
87 | filesLayout->addWidget( &m_files ); | 89 | filesLayout->addWidget( &m_files ); |
88 | 90 | ||
89 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), | 91 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), |
90 | tr( "Retrieve file list" ), filesWidget ); | 92 | tr( "Retrieve file list" ), filesWidget ); |
93 | QWhatsThis::add( btn, tr( "Tap here to retrieve list of files contained in this package." ) ); | ||
91 | filesLayout->addWidget( btn ); | 94 | filesLayout->addWidget( btn ); |
92 | connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) ); | 95 | connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnFileScan()) ); |
93 | tabWidget->addTab( filesWidget, "binary", tr( "File list" ) ); | 96 | tabWidget->addTab( filesWidget, "binary", tr( "File list" ) ); |
94 | 97 | ||
95 | tabWidget->setCurrentTab( tr( "Information" ) ); | 98 | tabWidget->setCurrentTab( tr( "Information" ) ); |
96 | 99 | ||
97 | // If file list is already cached, display | 100 | // If file list is already cached, display |
98 | if ( !m_package->files().isNull() ) | 101 | if ( !m_package->files().isNull() ) |
diff --git a/noncore/settings/packagemanager/packageinfodlg.h b/noncore/settings/packagemanager/packageinfodlg.h index 7ed9f0a..ec031e1 100644 --- a/noncore/settings/packagemanager/packageinfodlg.h +++ b/noncore/settings/packagemanager/packageinfodlg.h | |||
@@ -25,21 +25,21 @@ | |||
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 | #ifndef PACKAGEINFODLG_H | 30 | #ifndef PACKAGEINFODLG_H |
31 | #define PACKAGEINFODLG_H | 31 | #define PACKAGEINFODLG_H |
32 | 32 | ||
33 | #include "opackage.h" | ||
34 | |||
33 | #include <qmultilineedit.h> | 35 | #include <qmultilineedit.h> |
34 | #include <qwidget.h> | 36 | #include <qwidget.h> |
35 | 37 | ||
36 | #include "opackage.h" | ||
37 | |||
38 | class QPushButton; | 38 | class QPushButton; |
39 | 39 | ||
40 | class OPackage; | 40 | class OPackage; |
41 | class OPackageManager; | 41 | class OPackageManager; |
42 | 42 | ||
43 | class PackageInfoDlg : public QWidget | 43 | class PackageInfoDlg : public QWidget |
44 | { | 44 | { |
45 | Q_OBJECT | 45 | Q_OBJECT |
diff --git a/noncore/settings/packagemanager/promptdlg.cpp b/noncore/settings/packagemanager/promptdlg.cpp index 4e82ba9..841b98e 100644 --- a/noncore/settings/packagemanager/promptdlg.cpp +++ b/noncore/settings/packagemanager/promptdlg.cpp | |||
@@ -24,23 +24,23 @@ | |||
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 "promptdlg.h" | 30 | #include "promptdlg.h" |
31 | 31 | ||
32 | #include <qpe/qpeapplication.h> | ||
33 | |||
32 | #include <qlabel.h> | 34 | #include <qlabel.h> |
33 | #include <qlayout.h> | 35 | #include <qlayout.h> |
34 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
35 | #include <qwidgetlist.h> | 37 | #include <qwidgetlist.h> |
36 | 38 | ||
37 | #include <qpe/qpeapplication.h> | ||
38 | |||
39 | PromptDlg::PromptDlg( const QString &caption, const QString &text, const QString &btn1, const QString &btn2, | 39 | PromptDlg::PromptDlg( const QString &caption, const QString &text, const QString &btn1, const QString &btn2, |
40 | QWidget *parent ) | 40 | QWidget *parent ) |
41 | : QWidget( parent, QString::null, WType_Modal | WType_TopLevel | WStyle_Dialog ) | 41 | : QWidget( parent, QString::null, WType_Modal | WType_TopLevel | WStyle_Dialog ) |
42 | , m_btnClicked( -1 ) | 42 | , m_btnClicked( -1 ) |
43 | { | 43 | { |
44 | setCaption( caption ); | 44 | setCaption( caption ); |
45 | 45 | ||
46 | QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 2 ); | 46 | QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 2 ); |