-rw-r--r-- | noncore/unsupported/oipkg/packagelistdoclnk.cpp | 9 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistdoclnk.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistview.cpp | 13 |
3 files changed, 21 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp index 575ac62..5787fdf 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp +++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp | |||
@@ -1,35 +1,42 @@ | |||
1 | 1 | ||
2 | #include "packagelistdoclnk.h" | 2 | #include "packagelistdoclnk.h" |
3 | 3 | ||
4 | #include <qpe/applnk.h> | 4 | #include <qpe/applnk.h> |
5 | #include <qpe/config.h> | ||
5 | #include <qlist.h> | 6 | #include <qlist.h> |
6 | 7 | ||
7 | #include "package.h" | 8 | #include "package.h" |
8 | #include "pksettings.h" | 9 | #include "pksettings.h" |
9 | 10 | ||
10 | PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s) | 11 | PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s) |
11 | : PackageList(s) | 12 | : PackageList(s) |
12 | { | 13 | { |
13 | PackageListDocLnk(); | 14 | PackageListDocLnk(); |
14 | } | 15 | } |
15 | 16 | ||
16 | PackageListDocLnk::PackageListDocLnk() | 17 | PackageListDocLnk::PackageListDocLnk() |
17 | : PackageList() | 18 | : PackageList() |
18 | { | 19 | { |
19 | doclnkset = new DocLnkSet("/mnt/nfs/ipk","application/ipkg"); | 20 | Config cfg( "oipkg", Config::User ); |
21 | cfg.setGroup( "Common" ); | ||
22 | docLnkDir = cfg.readEntry( "docLnkDir", "/root/" ); | ||
23 | doclnkset = new DocLnkSet(docLnkDir,"application/ipkg"); | ||
20 | } | 24 | } |
21 | 25 | ||
22 | PackageListDocLnk::~PackageListDocLnk() | 26 | PackageListDocLnk::~PackageListDocLnk() |
23 | { | 27 | { |
28 | Config cfg( "oipkg", Config::User ); | ||
29 | cfg.setGroup( "Common" ); | ||
30 | cfg.writeEntry( "docLnkDir", docLnkDir ); | ||
24 | } | 31 | } |
25 | 32 | ||
26 | 33 | ||
27 | 34 | ||
28 | void PackageListDocLnk::update() | 35 | void PackageListDocLnk::update() |
29 | { | 36 | { |
30 | pvDebug(2,"PackageListDocLnk::update "); | 37 | pvDebug(2,"PackageListDocLnk::update "); |
31 | QList<DocLnk> packlist = doclnkset->children(); | 38 | QList<DocLnk> packlist = doclnkset->children(); |
32 | for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() ) | 39 | for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() ) |
33 | { | 40 | { |
34 | insertPackage( new Package(pack->file(), settings) ); | 41 | insertPackage( new Package(pack->file(), settings) ); |
35 | } | 42 | } |
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.h b/noncore/unsupported/oipkg/packagelistdoclnk.h index 3864ace..fe73658 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.h +++ b/noncore/unsupported/oipkg/packagelistdoclnk.h | |||
@@ -7,16 +7,17 @@ | |||
7 | class DocLnkSet; | 7 | class DocLnkSet; |
8 | 8 | ||
9 | class PackageListDocLnk : public PackageList | 9 | class PackageListDocLnk : public PackageList |
10 | { | 10 | { |
11 | public: | 11 | public: |
12 | PackageListDocLnk(); | 12 | PackageListDocLnk(); |
13 | PackageListDocLnk( PackageManagerSettings* s); | 13 | PackageListDocLnk( PackageManagerSettings* s); |
14 | virtual ~PackageListDocLnk(); | 14 | virtual ~PackageListDocLnk(); |
15 | public slots: | 15 | public slots: |
16 | void update(); | 16 | void update(); |
17 | private: | 17 | private: |
18 | DocLnkSet *doclnkset; | 18 | DocLnkSet *doclnkset; |
19 | QString docLnkDir; | ||
19 | }; | 20 | }; |
20 | 21 | ||
21 | 22 | ||
22 | #endif | 23 | #endif |
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp index b6b520b..70aa48a 100644 --- a/noncore/unsupported/oipkg/packagelistview.cpp +++ b/noncore/unsupported/oipkg/packagelistview.cpp | |||
@@ -26,25 +26,36 @@ PackageListView::PackageListView(QWidget *p, const char* n, PackageManagerSettin | |||
26 | 26 | ||
27 | } | 27 | } |
28 | 28 | ||
29 | //PackageListView::~PackageListView() | 29 | //PackageListView::~PackageListView() |
30 | //{ | 30 | //{ |
31 | //} | 31 | //} |
32 | 32 | ||
33 | void PackageListView::setCurrent( QListViewItem* p ) | 33 | void PackageListView::setCurrent( QListViewItem* p ) |
34 | { | 34 | { |
35 | if ( !p ) return; | 35 | if ( !p ) return; |
36 | activePackageListItem = (PackageListItem*)p; | 36 | activePackageListItem = (PackageListItem*)p; |
37 | activePackage = activePackageListItem->getPackage(); | 37 | activePackage = activePackageListItem->getPackage(); |
38 | if (!activePackage) return; | 38 | if (!activePackage) |
39 | { | ||
40 | // QDictIterator<QCheckListItem> it( rootItems ); | ||
41 | // while ( it.current() ) | ||
42 | // { | ||
43 | // if ( it.current()==p ) | ||
44 | // pvDebug(2,"current item"); | ||
45 | // ++it; | ||
46 | // } | ||
47 | |||
48 | return; | ||
49 | } | ||
39 | popupTimer->start( 750, true ); | 50 | popupTimer->start( 750, true ); |
40 | } | 51 | } |
41 | 52 | ||
42 | 53 | ||
43 | void PackageListView::showPopup() | 54 | void PackageListView::showPopup() |
44 | { | 55 | { |
45 | popupMenu->clear(); | 56 | popupMenu->clear(); |
46 | destsMenu->clear(); | 57 | destsMenu->clear(); |
47 | 58 | ||
48 | QAction *popupAction; | 59 | QAction *popupAction; |
49 | if ( !activePackage->installed() ) | 60 | if ( !activePackage->installed() ) |
50 | { | 61 | { |