summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-25 09:50:52 (UTC)
committer andyq <andyq>2002-10-25 09:50:52 (UTC)
commit2f2c23d398b6a47bd06aaf329a55bb455cf5ddd1 (patch) (side-by-side diff)
tree4322eef1f6306763b3bc0332b6e57c05a24341d9
parent4a2f6dd634aa277bca3818f090d691844e219f64 (diff)
downloadopie-2f2c23d398b6a47bd06aaf329a55bb455cf5ddd1.zip
opie-2f2c23d398b6a47bd06aaf329a55bb455cf5ddd1.tar.gz
opie-2f2c23d398b6a47bd06aaf329a55bb455cf5ddd1.tar.bz2
Modified so that you can click on a package in the documents view and
the Local IPKGS view is shown and the selected package checked
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp9
-rw-r--r--noncore/settings/aqpkg/mainwin.h1
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp31
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.h1
4 files changed, 40 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 206d11c..9f19dfa 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -26,2 +26,3 @@
#include "helpwindow.h"
+#include "utils.h"
#include "global.h"
@@ -67,2 +68,10 @@ MainWindow :: ~MainWindow()
+void MainWindow :: setDocument( const QString &doc )
+{
+ // Remove path from package
+ QString package = Utils::getPackageNameFromIpkFilename( doc );
+ cout << "Selecting package " << package << endl;
+ networkPkgWindow->selectLocalPackage( package );
+}
+
void MainWindow :: displaySettings()
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h
index 2a182fc..a9e290c 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -42,2 +42,3 @@ private:
public slots:
+ void setDocument( const QString &doc );
void displayHelp();
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 6874ded..a374266 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -62,4 +62,5 @@ NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget
- progressDlg = 0;
- timerId = startTimer( 100 );
+ updateData();
+// progressDlg = 0;
+// timerId = startTimer( 100 );
}
@@ -108,2 +109,28 @@ void NetworkPackageManager :: updateData()
+void NetworkPackageManager :: selectLocalPackage( const QString &pkg )
+{
+ // First select local server
+ for ( int i = 0 ; i < serversList->count() ; ++i )
+ {
+ if ( serversList->text( i ) == LOCAL_IPKGS )
+ {
+ serversList->setCurrentItem( i );
+ break;
+ }
+ }
+ serverSelected( 0 );
+
+ // Now set the check box of the selected package
+ for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
+ item != 0 ;
+ item = (QCheckListItem *)item->nextSibling() )
+ {
+ if ( item->text().startsWith( pkg ) )
+ {
+ item->setOn( true );
+ break;
+ }
+ }
+}
+
diff --git a/noncore/settings/aqpkg/networkpkgmgr.h b/noncore/settings/aqpkg/networkpkgmgr.h
index fba8155..3c437b4 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.h
+++ b/noncore/settings/aqpkg/networkpkgmgr.h
@@ -40,2 +40,3 @@ public:
+ void selectLocalPackage( const QString &pkg );
void updateData();