author | drw <drw> | 2005-01-04 15:27:01 (UTC) |
---|---|---|
committer | drw <drw> | 2005-01-04 15:27:01 (UTC) |
commit | 653ffebd614ef90bc5524fdf910776d4af0a48a7 (patch) (unidiff) | |
tree | ab9d9771466d2fc8e3f06b50731dcffa0925a503 | |
parent | a63d6d1896bcb6f1ac3b041e3d46edf0ec9e8082 (diff) | |
download | opie-653ffebd614ef90bc5524fdf910776d4af0a48a7.zip opie-653ffebd614ef90bc5524fdf910776d4af0a48a7.tar.gz opie-653ffebd614ef90bc5524fdf910776d4af0a48a7.tar.bz2 |
Undo previous commit
-rw-r--r-- | noncore/settings/packagemanager/oconfitem.h | 7 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opie-packagemanager.control | 4 |
3 files changed, 5 insertions, 13 deletions
diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h index 7b52ce4..9972c00 100644 --- a/noncore/settings/packagemanager/oconfitem.h +++ b/noncore/settings/packagemanager/oconfitem.h | |||
@@ -33,22 +33,17 @@ _;:, .> :=|. This program is free software; you can | |||
33 | #define OCONFITEM_H | 33 | #define OCONFITEM_H |
34 | 34 | ||
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=0x01, | 41 | enum Type { Source, Destination, Option, Arch, NotDefined }; |
42 | GzSource=0x02, | ||
43 | Destination=0x04, | ||
44 | Option=0x08, | ||
45 | Arch=0x10, | ||
46 | NotDefined=0x20 }; | ||
47 | 42 | ||
48 | OConfItem( Type type = NotDefined, const QString &name = QString::null, | 43 | OConfItem( Type type = NotDefined, const QString &name = QString::null, |
49 | const QString &value = QString::null, const QString &features = QString::null, | 44 | const QString &value = QString::null, const QString &features = QString::null, |
50 | bool active = true ); | 45 | bool active = true ); |
51 | 46 | ||
52 | Type type() { return m_type; } | 47 | Type type() { return m_type; } |
53 | const QString &name() { return m_name; } | 48 | const QString &name() { return m_name; } |
54 | const QString &value() { return m_value; } | 49 | const QString &value() { return m_value; } |
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index a885ef8..f2d7e39 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp | |||
@@ -109,18 +109,17 @@ OConfItemList *OIpkg::configItems() | |||
109 | { | 109 | { |
110 | // Retrieve all configuration items | 110 | // Retrieve all configuration items |
111 | return filterConfItems(); | 111 | return filterConfItems(); |
112 | } | 112 | } |
113 | 113 | ||
114 | OConfItemList *OIpkg::servers() | 114 | OConfItemList *OIpkg::servers() |
115 | { | 115 | { |
116 | // Retrieve only servers | 116 | // Retrieve only servers |
117 | return filterConfItems( (OConfItem::Type)((int)OConfItem::Source | | 117 | return filterConfItems( OConfItem::Source ); |
118 | (int)OConfItem::GzSource) ); | ||
119 | } | 118 | } |
120 | 119 | ||
121 | OConfItemList *OIpkg::destinations() | 120 | OConfItemList *OIpkg::destinations() |
122 | { | 121 | { |
123 | // Retrieve only destinations | 122 | // Retrieve only destinations |
124 | return filterConfItems( OConfItem::Destination ); | 123 | return filterConfItems( OConfItem::Destination ); |
125 | } | 124 | } |
126 | 125 | ||
@@ -539,17 +538,16 @@ void OIpkg::loadConfiguration() | |||
539 | 538 | ||
540 | QString line = s.readLine().simplifyWhiteSpace(); | 539 | QString line = s.readLine().simplifyWhiteSpace(); |
541 | 540 | ||
542 | // Parse line and save info to the conf options list | 541 | // Parse line and save info to the conf options list |
543 | if ( !line.isEmpty() ) | 542 | if ( !line.isEmpty() ) |
544 | { | 543 | { |
545 | if ( !line.startsWith( "#" ) || | 544 | if ( !line.startsWith( "#" ) || |
546 | line.startsWith( "#src" ) || | 545 | line.startsWith( "#src" ) || |
547 | line.startsWith( "#src/gz" ) || | ||
548 | line.startsWith( "#dest" ) || | 546 | line.startsWith( "#dest" ) || |
549 | line.startsWith( "#arch" ) || | 547 | line.startsWith( "#arch" ) || |
550 | line.startsWith( "#option" ) ) | 548 | line.startsWith( "#option" ) ) |
551 | { | 549 | { |
552 | int pos = line.find( ' ', 1 ); | 550 | int pos = line.find( ' ', 1 ); |
553 | 551 | ||
554 | // Type | 552 | // Type |
555 | QString typeStr = line.left( pos ); | 553 | QString typeStr = line.left( pos ); |
@@ -615,18 +613,17 @@ OConfItemList *OIpkg::filterConfItems( OConfItem::Type typefilter ) | |||
615 | // If typefilter is empty, retrieve all items | 613 | // If typefilter is empty, retrieve all items |
616 | bool retrieveAll = ( typefilter == OConfItem::NotDefined ); | 614 | bool retrieveAll = ( typefilter == OConfItem::NotDefined ); |
617 | 615 | ||
618 | // Parse configuration info for servers | 616 | // Parse configuration info for servers |
619 | OConfItemListIterator it( *m_confInfo ); | 617 | OConfItemListIterator it( *m_confInfo ); |
620 | for ( ; it.current(); ++it ) | 618 | for ( ; it.current(); ++it ) |
621 | { | 619 | { |
622 | OConfItem *item = it.current(); | 620 | OConfItem *item = it.current(); |
623 | if ( retrieveAll || | 621 | if ( retrieveAll || item->type() == typefilter ) |
624 | ( item->type() & typefilter ) ) | ||
625 | { | 622 | { |
626 | sl->append( item ); | 623 | sl->append( item ); |
627 | } | 624 | } |
628 | } | 625 | } |
629 | 626 | ||
630 | return sl; | 627 | return sl; |
631 | } | 628 | } |
632 | 629 | ||
diff --git a/noncore/settings/packagemanager/opie-packagemanager.control b/noncore/settings/packagemanager/opie-packagemanager.control index 0153d40..da3ddfe 100644 --- a/noncore/settings/packagemanager/opie-packagemanager.control +++ b/noncore/settings/packagemanager/opie-packagemanager.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-packagemanager | 1 | 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, libipkg0 (>=0.99.120), ipkg-link | 5 | Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120) |
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: $QPE_VERSION$EXTRAVERSION | 10 | Version: 0.6.1$EXTRAVERSION |