summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/ChangeLog9
-rw-r--r--noncore/settings/packagemanager/README2
-rw-r--r--noncore/settings/packagemanager/TODO9
-rw-r--r--noncore/settings/packagemanager/entrydlg.cpp4
-rw-r--r--noncore/settings/packagemanager/filterdlg.h4
-rw-r--r--noncore/settings/packagemanager/global.h37
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp15
-rw-r--r--noncore/settings/packagemanager/main.cpp3
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp22
-rw-r--r--noncore/settings/packagemanager/mainwindow.h8
-rw-r--r--noncore/settings/packagemanager/oconfitem.cpp5
-rw-r--r--noncore/settings/packagemanager/oconfitem.h35
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp7
-rw-r--r--noncore/settings/packagemanager/oipkg.h14
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp17
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.h16
-rw-r--r--noncore/settings/packagemanager/opackagemanager.cpp6
-rw-r--r--noncore/settings/packagemanager/opackagemanager.h8
-rw-r--r--noncore/settings/packagemanager/opie-packagemanager.control2
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp13
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.h4
-rw-r--r--noncore/settings/packagemanager/promptdlg.cpp4
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 +1,10 @@
+2004-04-21 Dan Williams <drw@handhelds.org>
+
+ * Released version 0.4.0
+ * Added saving of ipkg configuration information
+ * Re-initialize ipkg when configuration information changes
+ * Added QWhatsThis for all UI controls
+ * Remove Location from OConfItem as it is not used/needed
+ * Re-ordered includes to follow Opie standards
+
2004-02-13 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
@@ -4,3 +4,3 @@
/* ========================
-/* Version 0.3.0
+/* Version 0.4.0
/*
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
@@ -4,3 +4,3 @@
/* ========================
-/* Version 0.3.0
+/* Version 0.4.0
/*
@@ -18,6 +18,5 @@
-1. Save configuration information (i.e. /etc/ipkg.conf)
-2. Link non-root destination apps
-3. Implement QCOP interface for installing, removing, etc.
-4. Redesign configuration dialog
+1. Link non-root destination apps
+2. Implement QCOP interface for installing, removing, etc.
+3. Redesign configuration dialog
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
@@ -31,2 +31,4 @@
+#include <qpe/qpeapplication.h>
+
#include <qlabel.h>
@@ -36,4 +38,2 @@
-#include <qpe/qpeapplication.h>
-
EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal )
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
@@ -32,2 +32,4 @@
+#include "opackagemanager.h"
+
#include <qcheckbox.h>
@@ -39,4 +41,2 @@
-#include "opackagemanager.h"
-
class FilterDlg : public QDialog
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 @@
-/*
-                This file is part of the Opie Project
-
-              Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- =.
- .=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
- If not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
-*/
-
-#ifndef GLOBAL_H
-#define GLOBAL_H
-
-#define VERSION "0.0.0"
-
-#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
@@ -31,3 +31,7 @@
-#include <sys/vfs.h>
+#include <opie2/ofiledialog.h>
+
+#include <qpe/fileselector.h>
+#include <qpe/resource.h>
+#include <qpe/storage.h>
@@ -43,7 +47,3 @@
-#include <qpe/fileselector.h>
-#include <qpe/resource.h>
-#include <qpe/storage.h>
-
-#include <opie2/ofiledialog.h>
+#include <sys/vfs.h>
@@ -51,3 +51,2 @@
-using namespace Opie::Ui;
InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo,
@@ -278,3 +277,3 @@ void InstallDlg::slotBtnOptions()
- QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );
+ QString filename = Opie::Ui::OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );
if( !filename.isEmpty() )
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
@@ -33,3 +33,2 @@
-using namespace Opie::Core;
-OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
+OPIE_EXPORT_APP( Opie::Core::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
@@ -29,2 +29,13 @@
+#include "mainwindow.h"
+#include "installdlg.h"
+#include "filterdlg.h"
+#include "promptdlg.h"
+#include "entrydlg.h"
+#include "packageinfodlg.h"
+
+#include <qpe/qcopenvelope_qws.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/resource.h>
+
#include <qaction.h>
@@ -40,13 +51,2 @@
-#include <qpe/qcopenvelope_qws.h>
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
-
-#include "mainwindow.h"
-#include "installdlg.h"
-#include "filterdlg.h"
-#include "promptdlg.h"
-#include "entrydlg.h"
-#include "packageinfodlg.h"
-
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
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
@@ -32,2 +32,6 @@
+#include "opackagemanager.h"
+
+#include <qpe/config.h>
+
#include <qlabel.h>
@@ -40,6 +44,2 @@
-#include <qpe/config.h>
-
-#include "opackagemanager.h"
-
class QAction;
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
@@ -33,6 +33,5 @@
-OConfItem::OConfItem( const QString &location, Type type, const QString &name,
+OConfItem::OConfItem( Type type, const QString &name,
const QString &value, bool active )
- : m_location( location )
- , m_type( type )
+ : m_type( type )
, m_name( name )
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
@@ -42,6 +42,5 @@ public:
- OConfItem( const QString &location = 0x0, Type type = NotDefined, const QString &name = 0x0,
- const QString &value = 0x0, bool active = true );
+ OConfItem( Type type = NotDefined, const QString &name = 0x0, const QString &value = 0x0,
+ bool active = true );
- const QString &location() { return m_location; }
Type type() { return m_type; }
@@ -51,10 +50,8 @@ public:
- void setLocation( const QString &location ) { m_location = location; }
- void setType( Type type ) { m_type = type; }
- void setName( const QString &name ) { m_name = name; }
- void setValue( const QString &value ) { m_value = value; }
- void setActive( bool active ) { m_active = active; }
+ void setType( Type type ) { m_type = type; }
+ void setName( const QString &name ) { m_name = name; }
+ void setValue( const QString &value ) { m_value = value; }
+ void setActive( bool active ) { m_active = active; }
private:
- QString m_location; // Configuration file where item is located
Type m_type; // Type of configuration item
@@ -72,18 +69,18 @@ private:
// Sort by OConfItem location then by type
- QString loc1 = reinterpret_cast<OConfItem*>(item1)->location();
- QString loc2 = reinterpret_cast<OConfItem*>(item2)->location();
- if ( loc1 < loc2 )
+ OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type();
+ OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type();
+ if ( type1 < type2 )
return -1;
- else if ( loc1 == loc2 )
+ else if ( type1 == type2 )
{
- OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type();
- OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type();
- if ( type1 < type2 )
+ QString name1 = reinterpret_cast<OConfItem*>(item1)->name();
+ QString name2 = reinterpret_cast<OConfItem*>(item2)->name();
+ if ( name1 < name2 )
return -1;
- else if ( type1 == type2 )
+ else if ( name1 == name2 )
return 0;
- else /*if ( type1 > type2 )*/
+ else /*if ( name1 > name2 )*/
return 1;
}
- else /*if ( loc1 > loc2 )*/
+ else /*if ( type1 > type2 )*/
return 1;
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
@@ -33,5 +33,2 @@
-#include <stdlib.h>
-#include <string.h>
-
#include <qdir.h>
@@ -40,2 +37,4 @@
+#include <stdlib.h>
+
const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file
@@ -531,3 +530,3 @@ void OIpkg::loadConfiguration()
// Add to list
- m_confInfo->append( new OConfItem( absFile, type, name, value, active ) );
+ m_confInfo->append( new OConfItem( type, name, value, active ) );
}
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
@@ -34,7 +34,4 @@
-extern "C" {
-#include <libipkg.h>
-};
-
-#include <qobject.h>
+#include "oconfitem.h"
+#include "opackage.h"
@@ -42,4 +39,7 @@ extern "C" {
-#include "oconfitem.h"
-#include "opackage.h"
+#include <qobject.h>
+
+extern "C" {
+#include <libipkg.h>
+};
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
@@ -33,2 +33,4 @@
+#include <qpe/resource.h>
+
#include <qcheckbox.h>
@@ -43,5 +45,2 @@
-#include <qpe/resource.h>
-
-using namespace Opie::Ui;
OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
@@ -103,3 +102,3 @@ void OIpkgConfigDlg::accept()
else
- m_configs->append( new OConfItem( QString::null, OConfItem::Option, "http_proxy",
+ m_configs->append( new OConfItem( OConfItem::Option, "http_proxy",
m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) );
@@ -113,3 +112,3 @@ void OIpkgConfigDlg::accept()
else
- m_configs->append( new OConfItem( QString::null, OConfItem::Option, "ftp_proxy",
+ m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy",
m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) );
@@ -120,3 +119,3 @@ void OIpkgConfigDlg::accept()
else
- m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_username",
+ m_configs->append( new OConfItem( OConfItem::Option, "proxy_username",
m_proxyUsername->text() ) );
@@ -127,3 +126,3 @@ void OIpkgConfigDlg::accept()
else
- m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_password",
+ m_configs->append( new OConfItem( OConfItem::Option, "proxy_password",
m_proxyPassword->text() ) );
@@ -534,3 +533,3 @@ void OIpkgConfigDlg::slotServerUpdate()
// Add new destination to configuration list
- m_configs->append( new OConfItem( QString::null, OConfItem::Source, newName,
+ m_configs->append( new OConfItem( OConfItem::Source, newName,
m_serverLocation->text(), m_serverActive->isChecked() ) );
@@ -620,3 +619,3 @@ void OIpkgConfigDlg::slotDestUpdate()
// Add new destination to configuration list
- m_configs->append( new OConfItem( QString::null, OConfItem::Destination, newName,
+ m_configs->append( new OConfItem( OConfItem::Destination, newName,
m_destLocation->text(), m_destActive->isChecked() ) );
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
@@ -35,2 +35,4 @@
+#include <opie2/otabwidget.h>
+
#include <qdialog.h>
@@ -38,4 +40,2 @@
-#include <opie2/otabwidget.h>
-
#include "oipkg.h"
@@ -75,8 +75,8 @@ private:
// UI controls
- QVBoxLayout m_layout; // Main dialog layout control
- Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control
- QWidget *m_serverWidget; // Widget containing server configuration controls
- QWidget *m_destWidget; // Widget containing destination configuration controls
- QWidget *m_proxyWidget; // Widget containing proxy configuration controls
- QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls
+ QVBoxLayout m_layout; // Main dialog layout control
+ Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control
+ QWidget *m_serverWidget; // Widget containing server configuration controls
+ QWidget *m_destWidget; // Widget containing destination configuration controls
+ QWidget *m_proxyWidget; // Widget containing proxy configuration controls
+ QWidget *m_optionsWidget; // Widget containing ipkg execution configuration 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
@@ -31,3 +31,4 @@
-#include <ctype.h>
+#include "opackagemanager.h"
+#include "oipkgconfigdlg.h"
@@ -35,4 +36,3 @@
-#include "opackagemanager.h"
-#include "oipkgconfigdlg.h"
+#include <ctype.h>
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
@@ -34,5 +34,3 @@
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include "oipkg.h"
@@ -40,3 +38,5 @@
-#include "oipkg.h"
+#include <qdict.h>
+#include <qobject.h>
+#include <qstringlist.h>
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
@@ -9,2 +9,2 @@ Maintainer: Dan Williams (drw@handhelds.org)
Description: Opie package management client
-Version: 0.3.0$EXTRAVERSION
+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
@@ -33,4 +33,3 @@
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <opie2/otabwidget.h>
@@ -38,5 +37,6 @@
-#include <opie2/otabwidget.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qwhatsthis.h>
-using namespace Opie::Ui;
PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
@@ -53,3 +53,3 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
- OTabWidget *tabWidget = new OTabWidget( this );
+ Opie::Ui::OTabWidget *tabWidget = new Opie::Ui::OTabWidget( this );
layout->addWidget( tabWidget );
@@ -57,2 +57,3 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
// Information tab
+ QWhatsThis::add( &m_information, tr( "This area contains information about the package." ) );
m_information.reparent( tabWidget, QPoint( 0, 0 ) );
@@ -84,2 +85,3 @@ 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 ) );
@@ -90,2 +92,3 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
tr( "Retrieve file list" ), filesWidget );
+ QWhatsThis::add( btn, tr( "Tap here to retrieve list of files contained in this package." ) );
filesLayout->addWidget( btn );
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
@@ -32,2 +32,4 @@
+#include "opackage.h"
+
#include <qmultilineedit.h>
@@ -35,4 +37,2 @@
-#include "opackage.h"
-
class QPushButton;
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
@@ -31,2 +31,4 @@
+#include <qpe/qpeapplication.h>
+
#include <qlabel.h>
@@ -36,4 +38,2 @@
-#include <qpe/qpeapplication.h>
-
PromptDlg::PromptDlg( const QString &caption, const QString &text, const QString &btn1, const QString &btn2,