summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (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 @@
26#include "helpwindow.h" 26#include "helpwindow.h"
27#include "utils.h"
27#include "global.h" 28#include "global.h"
@@ -67,2 +68,10 @@ MainWindow :: ~MainWindow()
67 68
69void MainWindow :: setDocument( const QString &doc )
70{
71 // Remove path from package
72 QString package = Utils::getPackageNameFromIpkFilename( doc );
73 cout << "Selecting package " << package << endl;
74 networkPkgWindow->selectLocalPackage( package );
75}
76
68void MainWindow :: displaySettings() 77void 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:
42public slots: 42public slots:
43 void setDocument( const QString &doc );
43 void displayHelp(); 44 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
62 62
63 progressDlg = 0; 63 updateData();
64 timerId = startTimer( 100 ); 64// progressDlg = 0;
65// timerId = startTimer( 100 );
65} 66}
@@ -108,2 +109,28 @@ void NetworkPackageManager :: updateData()
108 109
110void NetworkPackageManager :: selectLocalPackage( const QString &pkg )
111{
112 // First select local server
113 for ( int i = 0 ; i < serversList->count() ; ++i )
114 {
115 if ( serversList->text( i ) == LOCAL_IPKGS )
116 {
117 serversList->setCurrentItem( i );
118 break;
119 }
120 }
121 serverSelected( 0 );
122
123 // Now set the check box of the selected package
124 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
125 item != 0 ;
126 item = (QCheckListItem *)item->nextSibling() )
127 {
128 if ( item->text().startsWith( pkg ) )
129 {
130 item->setOn( true );
131 break;
132 }
133 }
134}
135
109 136
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:
40 40
41 void selectLocalPackage( const QString &pkg );
41 void updateData(); 42 void updateData();