summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp24
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h3
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp26
-rw-r--r--noncore/unsupported/oipkg/pksettings.h3
-rw-r--r--noncore/unsupported/oipkg/pksettingsbase.ui4
5 files changed, 36 insertions, 24 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index d1be8d0..11fc91b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -1,510 +1,516 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9// Copyright (C) 2000 Trolltech AS. 9// Copyright (C) 2000 Trolltech AS.
10// adadpted form qpe/qipkg 10// adadpted form qpe/qipkg
11// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 11// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
12 12
13 13
14#include "mainwindow.h" 14#include "mainwindow.h"
15 15
16#include <qpe/qpemenubar.h> 16#include <qpe/qpemenubar.h>
17#include <qpe/qpemessagebox.h> 17#include <qpe/qpemessagebox.h>
18#include <qpe/resource.h> 18#include <qpe/resource.h>
19#include <qpe/config.h> 19#include <qpe/config.h>
20#include <qpe/qpetoolbar.h> 20#include <qpe/qpetoolbar.h>
21#include <qpe/qcopenvelope_qws.h> 21#include <qpe/qcopenvelope_qws.h>
22#include <qaction.h> 22#include <qaction.h>
23#include <qmessagebox.h> 23#include <qmessagebox.h>
24#include <qpopupmenu.h> 24#include <qpopupmenu.h>
25#include <qtoolbutton.h> 25#include <qtoolbutton.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qfile.h> 28#include <qfile.h>
29#include <qlistview.h> 29#include <qlistview.h>
30#include <qtextview.h> 30#include <qtextview.h>
31#include <qcheckbox.h> 31#include <qcheckbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qtabwidget.h> 33#include <qtabwidget.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qpushbutton.h> 36#include <qpushbutton.h>
37#include <qlayout.h> 37#include <qlayout.h>
38 38
39#include "pksettingsbase.h" 39#include "pksettingsbase.h"
40#include "utils.h" 40#include "utils.h"
41#include "packagelistitem.h" 41#include "packagelistitem.h"
42 42
43 43
44MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : 44MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
45 QMainWindow( parent, name, f ) 45 QMainWindow( parent, name, f )
46// packageListServers( QObject(parent), name ), 46// packageListServers( QObject(parent), name ),
47// packageListSearch( parent, name ), 47// packageListSearch( parent, name ),
48// packageListDocLnk( parent, name ) 48// packageListDocLnk( parent, name )
49 { 49 {
50 setCaption( tr("Package Manager") ); 50 setCaption( tr("Package Manager") );
51 settings = new PackageManagerSettings(this,0,TRUE); 51 settings = new PackageManagerSettings(this,0,TRUE);
52 listViewPackages = new PackageListView( this,"listViewPackages",settings ); 52 listViewPackages = new PackageListView( this,"listViewPackages",settings );
53 setCentralWidget( listViewPackages ); 53 setCentralWidget( listViewPackages );
54 listViewPackages->addList( tr("feeds"), &packageListServers ); 54 listViewPackages->addList( tr("feeds"), &packageListServers );
55 listViewPackages->addList( tr("ipkgfind&killefiz"), &packageListSearch ); 55 listViewPackages->addList( tr("ipkgfind&killefiz"), &packageListSearch );
56 listViewPackages->addList( tr("documents"), &packageListDocLnk ); 56 listViewPackages->addList( tr("documents"), &packageListDocLnk );
57 ipkg = new PmIpkg( settings, this ); 57 ipkg = new PmIpkg( settings, this );
58 packageListServers.setSettings( settings ); 58 packageListServers.setSettings( settings );
59 packageListSearch.setSettings( settings ); 59 packageListSearch.setSettings( settings );
60 packageListDocLnk.setSettings( settings ); 60 packageListDocLnk.setSettings( settings );
61 pvDebug(9,"packageListServers.update"); 61 pvDebug(9,"packageListServers.update");
62 packageListServers.update(); 62 packageListServers.update();
63 pvDebug(9,"packageListDocLnk.update"); 63 pvDebug(9,"packageListDocLnk.update");
64 packageListDocLnk.update(); 64 packageListDocLnk.update();
65 pvDebug(9,"makeMenu"); 65 pvDebug(9,"makeMenu");
66 makeMenu(); 66 makeMenu();
67 makeChannel(); 67 makeChannel();
68 68
69 69
70 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); 70 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
71 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); 71 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) );
72 72
73 connect( settings->removeLinksButton, SIGNAL( clicked()), 73 connect( settings->removeLinksButton, SIGNAL( clicked()),
74 SLOT(removeLinks()) ); 74 SLOT(removeLinks()) );
75 connect( settings->createLinksButton, SIGNAL( clicked()), 75 connect( settings->createLinksButton, SIGNAL( clicked()),
76 SLOT(createLinks()) ); 76 SLOT(createLinks()) );
77 77
78 pvDebug(9,"displayList"); 78 pvDebug(9,"displayList");
79 displayList(); 79 displayList();
80} 80}
81 81
82void MainWindow::makeMenu() 82void MainWindow::makeMenu()
83{ 83{
84 84
85 QPEToolBar *toolBar = new QPEToolBar( this ); 85 QPEToolBar *toolBar = new QPEToolBar( this );
86 QPEMenuBar *menuBar = new QPEMenuBar( toolBar ); 86 QPEMenuBar *menuBar = new QPEMenuBar( toolBar );
87 QPopupMenu *srvMenu = new QPopupMenu( menuBar ); 87 QPopupMenu *srvMenu = new QPopupMenu( menuBar );
88 QPopupMenu *viewMenu = new QPopupMenu( menuBar ); 88 QPopupMenu *viewMenu = new QPopupMenu( menuBar );
89 QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); 89 QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
90 QPopupMenu *helpMenu = new QPopupMenu( menuBar ); 90 QPopupMenu *helpMenu = new QPopupMenu( menuBar );
91 91
92 setToolBarsMovable( false ); 92 setToolBarsMovable( false );
93 toolBar->setHorizontalStretchable( true ); 93 toolBar->setHorizontalStretchable( true );
94 menuBar->insertItem( tr( "Package" ), srvMenu ); 94 menuBar->insertItem( tr( "Package" ), srvMenu );
95 menuBar->insertItem( tr( "View" ), viewMenu ); 95 menuBar->insertItem( tr( "View" ), viewMenu );
96 menuBar->insertItem( tr( "Settings" ), cfgMenu ); 96 menuBar->insertItem( tr( "Settings" ), cfgMenu );
97 menuBar->insertItem( tr( "Help" ), helpMenu ); 97 menuBar->insertItem( tr( "Help" ), helpMenu );
98 98
99 QLabel *spacer; 99 QLabel *spacer;
100// spacer = new QLabel( "", toolBar ); 100// spacer = new QLabel( "", toolBar );
101// spacer->setBackgroundColor( toolBar->backgroundColor() ); 101// spacer->setBackgroundColor( toolBar->backgroundColor() );
102// toolBar->setStretchableWidget( spacer ); 102// toolBar->setStretchableWidget( spacer );
103 103
104 104
105 runAction = new QAction( tr( "Apply" ), 105 runAction = new QAction( tr( "Apply" ),
106 Resource::loadPixmap( "oipkg/install" ), 106 Resource::loadPixmap( "oipkg/install" ),
107 QString::null, 0, this, 0 ); 107 QString::null, 0, this, 0 );
108 connect( runAction, SIGNAL( activated() ), 108 connect( runAction, SIGNAL( activated() ),
109 this, SLOT( runIpkg() ) ); 109 this, SLOT( runIpkg() ) );
110 runAction->addTo( toolBar ); 110 runAction->addTo( toolBar );
111 runAction->addTo( srvMenu ); 111 runAction->addTo( srvMenu );
112 112
113 srvMenu->insertSeparator(); 113 srvMenu->insertSeparator();
114 114
115 updateAction = new QAction( tr( "Update" ), 115 updateAction = new QAction( tr( "Update" ),
116 Resource::loadIconSet( "oipkg/update" ), 116 Resource::loadIconSet( "oipkg/update" ),
117 QString::null, 0, this, 0 ); 117 QString::null, 0, this, 0 );
118 connect( updateAction, SIGNAL( activated() ), 118 connect( updateAction, SIGNAL( activated() ),
119 this , SLOT( updateList() ) ); 119 this , SLOT( updateList() ) );
120 updateAction->addTo( toolBar ); 120 updateAction->addTo( toolBar );
121 updateAction->addTo( srvMenu ); 121 updateAction->addTo( srvMenu );
122 122
123 QAction *cfgact; 123 QAction *cfgact;
124 124
125 cfgact = new QAction( tr( "Setups" ), 125 cfgact = new QAction( tr( "Setups" ),
126 QString::null, 0, this, 0 ); 126 QString::null, 0, this, 0 );
127 connect( cfgact, SIGNAL( activated() ), 127 connect( cfgact, SIGNAL( activated() ),
128 SLOT( showSettings() ) ); 128 SLOT( showSettingsSetup() ) );
129 cfgact->addTo( cfgMenu ); 129 cfgact->addTo( cfgMenu );
130 130
131 cfgact = new QAction( tr( "Servers" ), 131 cfgact = new QAction( tr( "Servers" ),
132 QString::null, 0, this, 0 ); 132 QString::null, 0, this, 0 );
133 connect( cfgact, SIGNAL( activated() ), 133 connect( cfgact, SIGNAL( activated() ),
134 SLOT( showSettingsSrv() ) ); 134 SLOT( showSettingsSrv() ) );
135 cfgact->addTo( cfgMenu ); 135 cfgact->addTo( cfgMenu );
136 cfgact = new QAction( tr( "Destinations" ), 136 cfgact = new QAction( tr( "Destinations" ),
137 QString::null, 0, this, 0 ); 137 QString::null, 0, this, 0 );
138 connect( cfgact, SIGNAL( activated() ), 138 connect( cfgact, SIGNAL( activated() ),
139 SLOT( showSettingsDst() ) ); 139 SLOT( showSettingsDst() ) );
140 cfgact->addTo( cfgMenu ); 140 cfgact->addTo( cfgMenu );
141 141
142 QAction *a; 142 QAction *a;
143 143
144 // SECTIONS 144 // SECTIONS
145 sectionBar = new QPEToolBar( this ); 145 sectionBar = new QPEToolBar( this );
146 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); 146 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
147 sectionBar->setHorizontalStretchable( true ); 147 sectionBar->setHorizontalStretchable( true );
148 QLabel *label = new QLabel( sectionBar, "section" ); 148 QLabel *label = new QLabel( sectionBar, "section" );
149// label->setBackgroundMode( NoBackground ); 149// label->setBackgroundMode( NoBackground );
150 label->font().setPointSize( 8 ); 150 label->font().setPointSize( 8 );
151 label->setText( tr( "Section:" ) ); 151 label->setText( tr( "Section:" ) );
152 sectionBar->setStretchableWidget( label ); 152 sectionBar->setStretchableWidget( label );
153 section = new QComboBox( false, sectionBar ); 153 section = new QComboBox( false, sectionBar );
154 section->font().setPointSize( 8 ); 154 section->font().setPointSize( 8 );
155 label = new QLabel( " / ", sectionBar ); 155 label = new QLabel( " / ", sectionBar );
156 label->font().setPointSize( 8 ); 156 label->font().setPointSize( 8 );
157// label->setBackgroundMode( PaletteForeground ); 157// label->setBackgroundMode( PaletteForeground );
158 subsection = new QComboBox( false, sectionBar ); 158 subsection = new QComboBox( false, sectionBar );
159 subsection->font().setPointSize( 8 ); 159 subsection->font().setPointSize( 8 );
160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); 161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
162 a->addTo( sectionBar ); 162 a->addTo( sectionBar );
163 setSections(); 163 setSections();
164 setSubSections(); 164 setSubSections();
165 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 ); 165 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 );
166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) ); 166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
167 sectionAction->setToggleAction( true ); 167 sectionAction->setToggleAction( true );
168 sectionAction->addTo( viewMenu ); 168 sectionAction->addTo( viewMenu );
169 // sectionBar->setStretchableWidget( section ); 169 // sectionBar->setStretchableWidget( section );
170 170
171 //FIND 171 //FIND
172 findBar = new QPEToolBar(this); 172 findBar = new QPEToolBar(this);
173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); 173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
174 label = new QLabel( tr("Filter: "), findBar ); 174 label = new QLabel( tr("Filter: "), findBar );
175// label->setBackgroundMode( PaletteForeground ); 175// label->setBackgroundMode( PaletteForeground );
176 findBar->setHorizontalStretchable( TRUE ); 176 findBar->setHorizontalStretchable( TRUE );
177 findEdit = new QLineEdit( findBar, "findEdit" ); 177 findEdit = new QLineEdit( findBar, "findEdit" );
178 findBar->setStretchableWidget( findEdit ); 178 findBar->setStretchableWidget( findEdit );
179 connect( findEdit, SIGNAL( textChanged( const QString & ) ), 179 connect( findEdit, SIGNAL( textChanged( const QString & ) ),
180 this, SLOT( displayList() ) ); 180 this, SLOT( displayList() ) );
181 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 181 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
182 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) ); 182 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) );
183 a->addTo( findBar ); 183 a->addTo( findBar );
184 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 184 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
185 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 185 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
186 a->addTo( findBar ); 186 a->addTo( findBar );
187 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); 187 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 );
188 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); 188 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) );
189 findAction->setToggleAction( true ); 189 findAction->setToggleAction( true );
190 findAction->addTo( viewMenu ); 190 findAction->addTo( viewMenu );
191 191
192 //SEARCH 192 //SEARCH
193 searchBar = new QPEToolBar(this); 193 searchBar = new QPEToolBar(this);
194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
195 label = new QLabel( tr("Search: "), searchBar ); 195 label = new QLabel( tr("Search: "), searchBar );
196// label->setBackgroundMode( PaletteForeground ); 196// label->setBackgroundMode( PaletteForeground );
197 searchBar->setHorizontalStretchable( TRUE ); 197 searchBar->setHorizontalStretchable( TRUE );
198 searchEdit = new QLineEdit( searchBar, "seachEdit" ); 198 searchEdit = new QLineEdit( searchBar, "seachEdit" );
199 searchBar->setStretchableWidget( searchEdit ); 199 searchBar->setStretchableWidget( searchEdit );
200// connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 200// connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
201// this, SLOT( displayList() ) ); 201// this, SLOT( displayList() ) );
202 a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 202 a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
203 connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) ); 203 connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) );
204 a->addTo( searchBar ); 204 a->addTo( searchBar );
205 searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); 205 searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 );
206 connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) ); 206 connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) );
207 searchCommit->addTo( searchBar ); 207 searchCommit->addTo( searchBar );
208 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 208 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
209 connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) ); 209 connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) );
210 a->addTo( searchBar ); 210 a->addTo( searchBar );
211 searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 ); 211 searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 );
212 connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) ); 212 connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) );
213 searchAction->setToggleAction( true ); 213 searchAction->setToggleAction( true );
214 searchAction->addTo( viewMenu ); 214 searchAction->addTo( viewMenu );
215 215
216 //DEST 216 //DEST
217 destBar = new QPEToolBar(this); 217 destBar = new QPEToolBar(this);
218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); 218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
219 label = new QLabel( tr("Destination: "), destBar ); 219 label = new QLabel( tr("Destination: "), destBar );
220// label->setBackgroundMode( PaletteForeground ); 220// label->setBackgroundMode( PaletteForeground );
221 destBar->setHorizontalStretchable( TRUE ); 221 destBar->setHorizontalStretchable( TRUE );
222 destination = new QComboBox( false, destBar ); 222 destination = new QComboBox( false, destBar );
223 destination->insertStringList( settings->getDestinationNames() ); 223 destination->insertStringList( settings->getDestinationNames() );
224 setComboName(destination,settings->getDestinationName()); 224 setComboName(destination,settings->getDestinationName());
225 connect( destination, SIGNAL(activated(int)), 225 connect( destination, SIGNAL(activated(int)),
226 settings, SLOT(activeDestinationChange(int)) ); 226 settings, SLOT(activeDestinationChange(int)) );
227 spacer = new QLabel( " ", destBar ); 227// spacer = new QLabel( " ", destBar );
228// spacer->setBackgroundMode( PaletteForeground ); 228// spacer->setBackgroundMode( PaletteForeground );
229 CheckBoxLink = new QCheckBox( tr("Link"), destBar); 229 CheckBoxLink = new QCheckBox( tr("Link"), destBar);
230// CheckBoxLink->setBackgroundMode( PaletteForeground ); 230// CheckBoxLink->setBackgroundMode( PaletteForeground );
231 CheckBoxLink->setChecked( settings->createLinks() ); 231 CheckBoxLink->setChecked( settings->createLinks() );
232 connect( CheckBoxLink, SIGNAL(toggled(bool)), 232 connect( CheckBoxLink, SIGNAL(toggled(bool)),
233 settings, SLOT(linkEnabled(bool)) ); 233 settings, SLOT(linkEnabled(bool)) );
234 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 ); 234 destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 );
235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) ); 235 connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) );
236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 236 a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) ); 237 connect( a, SIGNAL( activated() ), SLOT( destClose() ) );
238 a->addTo( destBar ); 238 a->addTo( destBar );
239 destBar->setStretchableWidget( CheckBoxLink ); 239 destBar->setStretchableWidget( CheckBoxLink );
240 destAction->setToggleAction( true ); 240 destAction->setToggleAction( true );
241 // destAction->addTo( viewMenu ); 241 destAction->addTo( viewMenu );
242 242
243// helpMenu 243// helpMenu
244 helpMenu->insertSeparator(); 244 helpMenu->insertSeparator();
245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 ); 245 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
246 a->addTo( helpMenu ); 246 a->addTo( helpMenu );
247 helpMenu->insertSeparator(); 247 helpMenu->insertSeparator();
248 a = new QAction( tr( "Install" ), 248 a = new QAction( tr( "Install" ),
249 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 ); 249 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
250 a->addTo( helpMenu ); 250 a->addTo( helpMenu );
251 a = new QAction( tr( "Remove" ), 251 a = new QAction( tr( "Remove" ),
252 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 ); 252 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
253 a->addTo( helpMenu ); 253 a->addTo( helpMenu );
254 helpMenu->insertSeparator(); 254 helpMenu->insertSeparator();
255 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 ); 255 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
256 a->addTo( helpMenu ); 256 a->addTo( helpMenu );
257 helpMenu->insertSeparator(); 257 helpMenu->insertSeparator();
258 a = new QAction( tr( "New version, installed" ), 258 a = new QAction( tr( "New version, installed" ),
259 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 ); 259 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
260 a->addTo( helpMenu ); 260 a->addTo( helpMenu );
261 a = new QAction( tr( "New version, not installed" ), 261 a = new QAction( tr( "New version, not installed" ),
262 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 ); 262 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
263 a->addTo( helpMenu ); 263 a->addTo( helpMenu );
264 a = new QAction( tr( "Old version, installed" ), 264 a = new QAction( tr( "Old version, installed" ),
265 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 ); 265 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
266 a->addTo( helpMenu ); 266 a->addTo( helpMenu );
267 a = new QAction( tr( "Old version, not installed" ), 267 a = new QAction( tr( "Old version, not installed" ),
268 Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 ); 268 Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 );
269 a->addTo( helpMenu ); 269 a->addTo( helpMenu );
270 a = new QAction( tr( "Old version, new version installed" ), 270 a = new QAction( tr( "Old version, new version installed" ),
271 Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 ); 271 Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 );
272 a->addTo( helpMenu ); 272 a->addTo( helpMenu );
273 a = new QAction( tr( "New version, old version installed" ), 273 a = new QAction( tr( "New version, old version installed" ),
274 Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 ); 274 Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 );
275 a->addTo( helpMenu ); 275 a->addTo( helpMenu );
276 //a = new QAction( tr( "" ), 276 //a = new QAction( tr( "" ),
277 // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 ); 277 // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 );
278 // a->addTo( helpMenu ); 278 // a->addTo( helpMenu );
279 279
280 // configure the menus 280 // configure the menus
281 Config cfg( "oipkg", Config::User ); 281 Config cfg( "oipkg", Config::User );
282 cfg.setGroup( "gui" ); 282 cfg.setGroup( "gui" );
283 283
284 findShow( cfg.readBoolEntry( "findBar", true ) ); 284 findShow( cfg.readBoolEntry( "findBar", true ) );
285 searchShow( cfg.readBoolEntry( "searchBar", true ) ); 285 searchShow( cfg.readBoolEntry( "searchBar", true ) );
286 sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); 286 sectionShow( cfg.readBoolEntry( "sectionBar", true ) );
287 destShow( cfg.readBoolEntry( "destBar", false ) ); 287 destShow( cfg.readBoolEntry( "destBar", false ) );
288 setComboName(section,cfg.readEntry("default_section")); 288 setComboName(section,cfg.readEntry("default_section"));
289 sectionChanged(); 289 sectionChanged();
290} 290}
291 291
292MainWindow::~MainWindow() 292MainWindow::~MainWindow()
293{ 293{
294 Config cfg( "oipkg", Config::User ); 294 Config cfg( "oipkg", Config::User );
295 cfg.setGroup( "gui" ); 295 cfg.setGroup( "gui" );
296 cfg.writeEntry( "findBar", !findBar->isHidden() ); 296 cfg.writeEntry( "findBar", !findBar->isHidden() );
297 cfg.writeEntry( "searchBar", !searchBar->isHidden() ); 297 cfg.writeEntry( "searchBar", !searchBar->isHidden() );
298 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); 298 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() );
299 cfg.writeEntry( "destBar", !destBar->isHidden() ); 299 cfg.writeEntry( "destBar", !destBar->isHidden() );
300 cfg.writeEntry( "default_section", section->currentText() ); 300 cfg.writeEntry( "default_section", section->currentText() );
301 301
302} 302}
303 303
304void MainWindow::runIpkg() 304void MainWindow::runIpkg()
305{ 305{
306 packageListServers.allPackages(); 306 packageListServers.allPackages();
307 ipkg->loadList( &packageListSearch ); 307 ipkg->loadList( &packageListSearch );
308 ipkg->loadList( &packageListDocLnk ); 308 ipkg->loadList( &packageListDocLnk );
309 ipkg->loadList( &packageListServers ); 309 ipkg->loadList( &packageListServers );
310 ipkg->commit(); 310 ipkg->commit();
311 ipkg->clearLists(); 311 ipkg->clearLists();
312 // ##### If we looked in the list of files, we could send out accurate 312 // ##### If we looked in the list of files, we could send out accurate
313 // ##### messages. But we don't bother yet, and just do an "all". 313 // ##### messages. But we don't bother yet, and just do an "all".
314 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 314 QCopEnvelope e("QPE/System", "linkChanged(QString)");
315 QString lf = QString::null; 315 QString lf = QString::null;
316 e << lf; 316 e << lf;
317 displayList(); 317 displayList();
318} 318}
319 319
320void MainWindow::updateList() 320void MainWindow::updateList()
321{ 321{
322 packageListServers.clear(); 322 packageListServers.clear();
323 packageListSearch.clear(); 323 packageListSearch.clear();
324 324
325 packageListDocLnk.clear(); 325 packageListDocLnk.clear();
326 ipkg->update(); 326 ipkg->update();
327 packageListServers.update(); 327 packageListServers.update();
328 packageListSearch.update(); 328 packageListSearch.update();
329 packageListDocLnk.update(); 329 packageListDocLnk.update();
330} 330}
331 331
332void MainWindow::filterList() 332void MainWindow::filterList()
333{ 333{
334 QString f = ""; 334 QString f = "";
335 if ( findAction->isOn() ) f = findEdit->text(); 335 if ( findAction->isOn() ) f = findEdit->text();
336 packageListServers.filterPackages( f ); 336 packageListServers.filterPackages( f );
337} 337}
338 338
339void MainWindow::displayList() 339void MainWindow::displayList()
340{ 340{
341 filterList(); 341 filterList();
342 listViewPackages->display(); 342 listViewPackages->display();
343} 343}
344 344
345void MainWindow::sectionChanged() 345void MainWindow::sectionChanged()
346{ 346{
347 disconnect( section, SIGNAL( activated(int) ), 347 disconnect( section, SIGNAL( activated(int) ),
348 this, SLOT( sectionChanged() ) ); 348 this, SLOT( sectionChanged() ) );
349 disconnect( subsection, SIGNAL(activated(int) ), 349 disconnect( subsection, SIGNAL(activated(int) ),
350 this, SLOT( subSectionChanged() ) ); 350 this, SLOT( subSectionChanged() ) );
351 subsection->clear(); 351 subsection->clear();
352 packageListServers.setSection( section->currentText() ); 352 packageListServers.setSection( section->currentText() );
353 setSubSections(); 353 setSubSections();
354 connect( section, SIGNAL( activated(int) ), 354 connect( section, SIGNAL( activated(int) ),
355 this, SLOT( sectionChanged() ) ); 355 this, SLOT( sectionChanged() ) );
356 connect( subsection, SIGNAL(activated(int) ), 356 connect( subsection, SIGNAL(activated(int) ),
357 this, SLOT( subSectionChanged() ) ); 357 this, SLOT( subSectionChanged() ) );
358 displayList(); 358 displayList();
359} 359}
360 360
361void MainWindow::subSectionChanged() 361void MainWindow::subSectionChanged()
362{ 362{
363 disconnect( section, SIGNAL( activated(int) ), 363 disconnect( section, SIGNAL( activated(int) ),
364 this, SLOT( sectionChanged() ) ); 364 this, SLOT( sectionChanged() ) );
365 disconnect( subsection, SIGNAL(activated(int) ), 365 disconnect( subsection, SIGNAL(activated(int) ),
366 this, SLOT( subSectionChanged() ) ); 366 this, SLOT( subSectionChanged() ) );
367 packageListServers.setSubSection( subsection->currentText() ); 367 packageListServers.setSubSection( subsection->currentText() );
368 connect( section, SIGNAL( activated(int) ), 368 connect( section, SIGNAL( activated(int) ),
369 this, SLOT( sectionChanged() ) ); 369 this, SLOT( sectionChanged() ) );
370 connect( subsection, SIGNAL(activated(int) ), 370 connect( subsection, SIGNAL(activated(int) ),
371 this, SLOT( subSectionChanged() ) ); 371 this, SLOT( subSectionChanged() ) );
372 displayList(); 372 displayList();
373} 373}
374 374
375void MainWindow::setSections() 375void MainWindow::setSections()
376{ 376{
377 section->clear(); 377 section->clear();
378 section->insertStringList( packageListServers.getSections() ); 378 section->insertStringList( packageListServers.getSections() );
379} 379}
380 380
381void MainWindow::setSubSections() 381void MainWindow::setSubSections()
382{ 382{
383 subsection->clear(); 383 subsection->clear();
384 subsection->insertStringList( packageListServers.getSubSections() ); 384 subsection->insertStringList( packageListServers.getSubSections() );
385} 385}
386 386
387 387
388void MainWindow::showSettings() 388void MainWindow::showSettings(int i)
389{ 389{
390 if ( settings->showDialog( 0 ) ) 390 if ( settings->showDialog( i ) )
391 {
391 updateList(); 392 updateList();
393 }
394 setComboName(destination,settings->getDestinationName());
395 CheckBoxLink->setChecked( settings->createLinks() );
396}
397void MainWindow::showSettingsSetup()
398{
399 showSettings(0);
392} 400}
393void MainWindow::showSettingsSrv() 401void MainWindow::showSettingsSrv()
394{ 402{
395 if ( settings->showDialog( 1 ) ) 403 showSettings(1);
396 updateList();
397} 404}
398void MainWindow::showSettingsDst() 405void MainWindow::showSettingsDst()
399{ 406{
400 if ( settings->showDialog( 2 ) ) 407 showSettings(2);
401 updateList();
402} 408}
403 409
404void MainWindow::sectionShow(bool b) 410void MainWindow::sectionShow(bool b)
405{ 411{
406 if (b) sectionBar->show(); 412 if (b) sectionBar->show();
407 else sectionBar->hide(); 413 else sectionBar->hide();
408 sectionAction->setOn( b ); 414 sectionAction->setOn( b );
409} 415}
410 416
411void MainWindow::sectionClose() 417void MainWindow::sectionClose()
412{ 418{
413 sectionAction->setOn( false ); 419 sectionAction->setOn( false );
414} 420}
415 421
416void MainWindow::findShow(bool b) 422void MainWindow::findShow(bool b)
417{ 423{
418 if (b) findBar->show(); 424 if (b) findBar->show();
419 else findBar->hide(); 425 else findBar->hide();
420 findAction->setOn( b ); 426 findAction->setOn( b );
421} 427}
422 428
423void MainWindow::findClose() 429void MainWindow::findClose()
424{ 430{
425 findAction->setOn( false ); 431 findAction->setOn( false );
426} 432}
427 433
428void MainWindow::searchShow(bool b) 434void MainWindow::searchShow(bool b)
429{ 435{
430 if (b) searchBar->show(); 436 if (b) searchBar->show();
431 else searchBar->hide(); 437 else searchBar->hide();
432 searchAction->setOn( b ); 438 searchAction->setOn( b );
433} 439}
434 440
435void MainWindow::searchClose() 441void MainWindow::searchClose()
436{ 442{
437 searchAction->setOn( false ); 443 searchAction->setOn( false );
438} 444}
439 445
440 446
441void MainWindow::destShow(bool b) 447void MainWindow::destShow(bool b)
442{ 448{
443 if (b) destBar->show(); 449 if (b) destBar->show();
444 else destBar->hide(); 450 else destBar->hide();
445 destAction->setOn( b ); 451 destAction->setOn( b );
446} 452}
447 453
448void MainWindow::destClose() 454void MainWindow::destClose()
449{ 455{
450 destAction->setOn( false ); 456 destAction->setOn( false );
451} 457}
452 458
453void MainWindow::setDocument(const QString &fileName) 459void MainWindow::setDocument(const QString &fileName)
454{ 460{
455 if ( !QFile::exists( fileName ) ) return; 461 if ( !QFile::exists( fileName ) ) return;
456 ipkg->installFile( fileName ); 462 ipkg->installFile( fileName );
457 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 463 QCopEnvelope e("QPE/System", "linkChanged(QString)");
458 QString lf = QString::null; 464 QString lf = QString::null;
459 e << lf; 465 e << lf;
460} 466}
461 467
462 468
463void MainWindow::makeChannel() 469void MainWindow::makeChannel()
464 { 470 {
465 channel = new QCopChannel( "QPE/Application/oipkg", this ); 471 channel = new QCopChannel( "QPE/Application/oipkg", this );
466 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 472 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
467 this, SLOT(receive(const QCString&, const QByteArray&)) ); 473 this, SLOT(receive(const QCString&, const QByteArray&)) );
468} 474}
469 475
470 476
471 477
472void MainWindow::receive(const QCString &msg, const QByteArray &arg) 478void MainWindow::receive(const QCString &msg, const QByteArray &arg)
473{ 479{
474 pvDebug(3, "QCop "+msg+" "+QCString(arg)); 480 pvDebug(3, "QCop "+msg+" "+QCString(arg));
475 if ( msg == "installFile(QString)" ) 481 if ( msg == "installFile(QString)" )
476 { 482 {
477 ipkg->installFile( QString(arg) ); 483 ipkg->installFile( QString(arg) );
478 }else if( msg == "removeFile(QString)" ) 484 }else if( msg == "removeFile(QString)" )
479 { 485 {
480 ipkg->removeFile( QString(arg) ); 486 ipkg->removeFile( QString(arg) );
481 }else if( msg == "createLinks(QString)" ) 487 }else if( msg == "createLinks(QString)" )
482 { 488 {
483 ipkg->createLinks( QString(arg) ); 489 ipkg->createLinks( QString(arg) );
484 }else if( msg == "removeLinks(QString)" ) 490 }else if( msg == "removeLinks(QString)" )
485 { 491 {
486 ipkg->removeLinks( QString(arg) ); 492 ipkg->removeLinks( QString(arg) );
487 }else{ 493 }else{
488 pvDebug(2,"Huh what do ya want") 494 pvDebug(2,"Huh what do ya want")
489 } 495 }
490} 496}
491 497
492 498
493void MainWindow::createLinks() 499void MainWindow::createLinks()
494{ 500{
495 pvDebug(2,"creating links..."); 501 pvDebug(2,"creating links...");
496 ipkg->createLinks( settings->destinationurl->text() ); 502 ipkg->createLinks( settings->destinationurl->text() );
497} 503}
498 504
499void MainWindow::removeLinks() 505void MainWindow::removeLinks()
500{ 506{
501 pvDebug(2,"removing links..."); 507 pvDebug(2,"removing links...");
502 ipkg->removeLinks( settings->destinationurl->text() ); 508 ipkg->removeLinks( settings->destinationurl->text() );
503} 509}
504 510
505void MainWindow::remotePackageQuery() 511void MainWindow::remotePackageQuery()
506{ 512{
507 packageListSearch.query( searchEdit->text() ); 513 packageListSearch.query( searchEdit->text() );
508 packageListSearch.update(); 514 packageListSearch.update();
509 displayList(); 515 displayList();
510} 516}
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h
index 090ddd3..354c585 100644
--- a/noncore/unsupported/oipkg/mainwindow.h
+++ b/noncore/unsupported/oipkg/mainwindow.h
@@ -1,106 +1,107 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9// Copyright (C) 2000 Trolltech AS. 9// Copyright (C) 2000 Trolltech AS.
10// adadpted form qpe/qipkg 10// adadpted form qpe/qipkg
11// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 11// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
12 12
13#ifndef MAINWINDOW_H 13#ifndef MAINWINDOW_H
14#define MAINWINDOW_H 14#define MAINWINDOW_H
15 15
16#include <qmainwindow.h> 16#include <qmainwindow.h>
17#include <qaction.h> 17#include <qaction.h>
18#include <qtimer.h> 18#include <qtimer.h>
19#include <qpopupmenu.h> 19#include <qpopupmenu.h>
20 20
21#include "packagelist.h" 21#include "packagelist.h"
22#include "packagelistremote.h" 22#include "packagelistremote.h"
23#include "packagelistlocal.h" 23#include "packagelistlocal.h"
24#include "packagelistdoclnk.h" 24#include "packagelistdoclnk.h"
25#include "pmipkg.h" 25#include "pmipkg.h"
26#include "pksettings.h" 26#include "pksettings.h"
27#include "packagelistview.h" 27#include "packagelistview.h"
28 28
29class QComboBox; 29class QComboBox;
30class QPEToolBar; 30class QPEToolBar;
31class QLineEdit; 31class QLineEdit;
32class PackageListItem; 32class PackageListItem;
33class QCopChannel; 33class QCopChannel;
34class QMessageBox; 34class QMessageBox;
35class QCheckBox; 35class QCheckBox;
36 36
37class MainWindow : public QMainWindow 37class MainWindow : public QMainWindow
38{ 38{
39 Q_OBJECT 39 Q_OBJECT
40 40
41 41
42public: 42public:
43 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 43 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
44 ~MainWindow(); 44 ~MainWindow();
45 void makeChannel(); 45 void makeChannel();
46 46
47 QCopChannel *channel; 47 QCopChannel *channel;
48 48
49protected slots: 49protected slots:
50 void runIpkg(); 50 void runIpkg();
51 void updateList(); 51 void updateList();
52 void displayList(); 52 void displayList();
53 void subSectionChanged(); 53 void subSectionChanged();
54 void sectionChanged(); 54 void sectionChanged();
55 void showSettings(); 55 void showSettings(int);
56 void showSettingsSetup();
56 void showSettingsSrv(); 57 void showSettingsSrv();
57 void showSettingsDst(); 58 void showSettingsDst();
58 59
59public slots: 60public slots:
60 void sectionClose(); 61 void sectionClose();
61 void sectionShow(bool); 62 void sectionShow(bool);
62 void findClose(); 63 void findClose();
63 void findShow(bool); 64 void findShow(bool);
64 void searchClose(); 65 void searchClose();
65 void searchShow(bool); 66 void searchShow(bool);
66 void destClose(); 67 void destClose();
67 void destShow(bool); 68 void destShow(bool);
68 void filterList(); 69 void filterList();
69 void createLinks(); 70 void createLinks();
70 void removeLinks(); 71 void removeLinks();
71 void receive (const QCString &, const QByteArray &); 72 void receive (const QCString &, const QByteArray &);
72 void setDocument (const QString &); 73 void setDocument (const QString &);
73 void remotePackageQuery(); 74 void remotePackageQuery();
74 75
75private: 76private:
76 void makeMenu(); 77 void makeMenu();
77 void setSections(); 78 void setSections();
78 void setSubSections(); 79 void setSubSections();
79 bool updateIcon; 80 bool updateIcon;
80 81
81 PmIpkg* ipkg; 82 PmIpkg* ipkg;
82 PackageManagerSettings *settings; 83 PackageManagerSettings *settings;
83 PackageListLocal packageListServers; 84 PackageListLocal packageListServers;
84 PackageListRemote packageListSearch; 85 PackageListRemote packageListSearch;
85 PackageListDocLnk packageListDocLnk; 86 PackageListDocLnk packageListDocLnk;
86 PackageListView *listViewPackages; 87 PackageListView *listViewPackages;
87 QAction *runAction; 88 QAction *runAction;
88 QAction *updateAction; 89 QAction *updateAction;
89 QAction *findAction; 90 QAction *findAction;
90 QPEToolBar *findBar; 91 QPEToolBar *findBar;
91 QLineEdit *findEdit; 92 QLineEdit *findEdit;
92 QAction *searchAction; 93 QAction *searchAction;
93 QAction *searchCommit; 94 QAction *searchCommit;
94 QPEToolBar *searchBar; 95 QPEToolBar *searchBar;
95 QLineEdit *searchEdit; 96 QLineEdit *searchEdit;
96 QAction *sectionAction; 97 QAction *sectionAction;
97 QPEToolBar *sectionBar; 98 QPEToolBar *sectionBar;
98 QComboBox *section; 99 QComboBox *section;
99 QComboBox *subsection; 100 QComboBox *subsection;
100 QAction *destAction; 101 QAction *destAction;
101 QPEToolBar *destBar; 102 QPEToolBar *destBar;
102 QComboBox *destination; 103 QComboBox *destination;
103 QCheckBox* CheckBoxLink; 104 QCheckBox* CheckBoxLink;
104}; 105};
105 106
106#endif 107#endif
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp
index 59d5a3e..14c1944 100644
--- a/noncore/unsupported/oipkg/pksettings.cpp
+++ b/noncore/unsupported/oipkg/pksettings.cpp
@@ -1,570 +1,576 @@
1#include "pksettings.h" 1#include "pksettings.h"
2 2
3#include <qpe/process.h> 3#include <qpe/process.h>
4#include <qpe/resource.h> 4#include <qpe/resource.h>
5#include <qpe/stringutil.h> 5#include <qpe/stringutil.h>
6#include <qpe/qpeapplication.h> 6#include <qpe/qpeapplication.h>
7#include <qpe/qcopenvelope_qws.h> 7#include <qpe/qcopenvelope_qws.h>
8#include <qpe/applnk.h> 8#include <qpe/applnk.h>
9#include <qpe/config.h> 9#include <qpe/config.h>
10 10
11#include <qprogressbar.h> 11#include <qprogressbar.h>
12#include <qcombobox.h> 12#include <qcombobox.h>
13#include <qdict.h> 13#include <qdict.h>
14#include <qfile.h> 14#include <qfile.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlistview.h> 17#include <qlistview.h>
18#include <qlistbox.h> 18#include <qlistbox.h>
19#include <qcheckbox.h> 19#include <qcheckbox.h>
20#include <qmessagebox.h> 20#include <qmessagebox.h>
21#include <qpainter.h> 21#include <qpainter.h>
22#include <qpixmap.h> 22#include <qpixmap.h>
23#include <qregexp.h> 23#include <qregexp.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qobject.h> 25#include <qobject.h>
26#include <qtextstream.h> 26#include <qtextstream.h>
27#include <qtextview.h> 27#include <qtextview.h>
28#include <qtoolbutton.h> 28#include <qtoolbutton.h>
29#include <qtabwidget.h> 29#include <qtabwidget.h>
30 30
31#include <stdlib.h> 31#include <stdlib.h>
32#include <unistd.h> 32#include <unistd.h>
33#include "debug.h" 33#include "debug.h"
34//#include "utils.h" 34//#include "utils.h"
35 35
36PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* name, WFlags fl ) 36PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* name, WFlags fl )
37 : PackageManagerSettingsBase( parent, name, fl ) 37 : PackageManagerSettingsBase( parent, name, fl )
38{ 38{
39 connect( newserver, SIGNAL(clicked()), this, SLOT(newServer()) ); 39 connect( newserver, SIGNAL(clicked()), this, SLOT(newServer()) );
40 connect( removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) ); 40 connect( removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) );
41 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); 41 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
42 connect( newdestination, SIGNAL(clicked()), this, SLOT(newDestination()) ); 42 connect( newdestination, SIGNAL(clicked()), this, SLOT(newDestination()) );
43 connect( removedestination, SIGNAL(clicked()), this, SLOT(removeDestination()) ); 43 connect( removedestination, SIGNAL(clicked()), this, SLOT(removeDestination()) );
44 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 44 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
45 // connect( CheckBoxLink, SIGNAL(toggled(bool)), 45 // connect( CheckBoxLink, SIGNAL(toggled(bool)),
46 // activeLinkDestination, SLOT(setEnabled(bool)) ); 46 // activeLinkDestination, SLOT(setEnabled(bool)) );
47 47
48 connect( settingName, SIGNAL(activated(int)), this, SLOT(installationSettingChange(int)) ); 48 connect( settingName, SIGNAL(activated(int)), this, SLOT(installationSettingChange(int)) );
49 connect( settingName, SIGNAL(textChanged(const QString &)), this, SLOT(installationSettingSetName(const QString &)) ); 49 connect( settingName, SIGNAL(textChanged(const QString &)), this, SLOT(installationSettingSetName(const QString &)) );
50 connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) ); 50 connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) );
51 connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) ); 51 connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) );
52 connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) ); 52 connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) );
53 servername->setEnabled(FALSE); 53 servername->setEnabled(FALSE);
54 serverurl->setEnabled(FALSE); 54 serverurl->setEnabled(FALSE);
55 serverurlDic.setAutoDelete(TRUE); 55 serverurlDic.setAutoDelete(TRUE);
56 destinationname->setEnabled(FALSE); 56 destinationname->setEnabled(FALSE);
57 destinationurl->setEnabled(FALSE); 57 destinationurl->setEnabled(FALSE);
58 destinationurlDic.setAutoDelete(TRUE); 58 destinationurlDic.setAutoDelete(TRUE);
59 readSettings(); 59 readSettings();
60 activeLinkDestination->hide(); 60 activeLinkDestination->hide();
61 serverChanged = false; 61 serverChanged = false;
62
63 // get rid of setups
64// Settings->hide();
65 settingName->hide();
66 newsetting->hide();
67 renamesetting->hide();
68 removesetting->hide();
62} 69}
63 70
64PackageManagerSettings::~PackageManagerSettings() 71PackageManagerSettings::~PackageManagerSettings()
65{ 72{
66} 73}
67 74
68 75
69void PackageManagerSettings::newServer() 76void PackageManagerSettings::newServer()
70{ 77{
71 int i = servers->count(); 78 int i = servers->count();
72 if ( servername->isEnabled() || serverurl->text().isEmpty() ) { 79 if ( servername->isEnabled() || serverurl->text().isEmpty() ) {
73 serverurlDic.insert(i,new QString("http://")); 80 serverurlDic.insert(i,new QString("http://"));
74 servers->insertItem(tr("New")); 81 servers->insertItem(tr("New"));
75 activeServers->insertItem(tr("New")); 82 activeServers->insertItem(tr("New"));
76 } else { 83 } else {
77 // allows one-level undo 84 // allows one-level undo
78 serverurlDic.insert(i,new QString(serverurl->text())); 85 serverurlDic.insert(i,new QString(serverurl->text()));
79 servers->insertItem(servername->text()); 86 servers->insertItem(servername->text());
80 activeServers->insertItem(servername->text()); 87 activeServers->insertItem(servername->text());
81 } 88 }
82 changed = true; 89 changed = true;
83 servers->setSelected(i,TRUE); 90 servers->setSelected(i,TRUE);
84 editServer(i); 91 editServer(i);
85 changed = true; 92 changed = true;
86} 93}
87 94
88void PackageManagerSettings::newDestination() 95void PackageManagerSettings::newDestination()
89{ 96{
90 int i = destinations->count(); 97 int i = destinations->count();
91 if ( destinationname->isEnabled() || destinationurl->text().isEmpty() ) { 98 if ( destinationname->isEnabled() || destinationurl->text().isEmpty() ) {
92 destinationurlDic.insert(i,new QString("/")); 99 destinationurlDic.insert(i,new QString("/"));
93 destinations->insertItem(tr("New")); 100 destinations->insertItem(tr("New"));
94 activeDestination->insertItem(tr("New")); 101 activeDestination->insertItem(tr("New"));
95 activeLinkDestination->insertItem(tr("New")); 102 activeLinkDestination->insertItem(tr("New"));
96 } else { 103 } else {
97 // allows one-level undo 104 // allows one-level undo
98 destinationurlDic.insert(i,new QString(destinationurl->text())); 105 destinationurlDic.insert(i,new QString(destinationurl->text()));
99 destinations->insertItem(destinationname->text()); 106 destinations->insertItem(destinationname->text());
100 activeDestination->insertItem(destinationname->text()); 107 activeDestination->insertItem(destinationname->text());
101 activeLinkDestination->insertItem(destinationname->text()); 108 activeLinkDestination->insertItem(destinationname->text());
102 } 109 }
103 destinations->setSelected(i,TRUE); 110 destinations->setSelected(i,TRUE);
104 editDestination(i); 111 editDestination(i);
105 changed = true; 112 changed = true;
106} 113}
107 114
108 115
109void PackageManagerSettings::editServer(int i) 116void PackageManagerSettings::editServer(int i)
110{ 117{
111 if ( servername->isEnabled() ) { 118 if ( servername->isEnabled() ) {
112 disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); 119 disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) );
113 disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); 120 disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) );
114 } else { 121 } else {
115 servername->setEnabled(TRUE); 122 servername->setEnabled(TRUE);
116 serverurl->setEnabled(TRUE); 123 serverurl->setEnabled(TRUE);
117 } 124 }
118 125
119 servername->setText( servers->text(i) ); 126 servername->setText( servers->text(i) );
120 serverurl->setText( *serverurlDic[i] ); 127 serverurl->setText( *serverurlDic[i] );
121 128
122 editedserver = i; 129 editedserver = i;
123 serverChanged = true; 130 serverChanged = true;
124 connect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); 131 connect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) );
125 connect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); 132 connect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) );
126 changed = true; 133 changed = true;
127} 134}
128 135
129 136
130void PackageManagerSettings::editDestination(int i) 137void PackageManagerSettings::editDestination(int i)
131{ 138{
132 if ( destinationname->isEnabled() ) { 139 if ( destinationname->isEnabled() ) {
133 disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); 140 disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) );
134 disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); 141 disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) );
135 } else { 142 } else {
136 destinationname->setEnabled(TRUE); 143 destinationname->setEnabled(TRUE);
137 destinationurl->setEnabled(TRUE); 144 destinationurl->setEnabled(TRUE);
138 //since it does not work anyway 145 //since it does not work anyway
139// createLinksButton->setEnabled(TRUE); 146// createLinksButton->setEnabled(TRUE);
140// removeLinksButton->setEnabled(TRUE); 147// removeLinksButton->setEnabled(TRUE);
141 } 148 }
142 149
143 destinationname->setText( destinations->text(i) ); 150 destinationname->setText( destinations->text(i) );
144 destinationurl->setText( *destinationurlDic[i] ); 151 destinationurl->setText( *destinationurlDic[i] );
145 152
146 editeddestination = i; 153 editeddestination = i;
147 154
148 connect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); 155 connect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) );
149 connect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); 156 connect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) );
150 changed = true; 157 changed = true;
151} 158}
152 159
153void PackageManagerSettings::removeServer() 160void PackageManagerSettings::removeServer()
154{ 161{
155 disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) ); 162 disconnect( servername, SIGNAL(textChanged(const QString&)), this, SLOT(serverNameChanged(const QString&)) );
156 disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) ); 163 disconnect( serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(serverUrlChanged(const QString&)) );
157 servername->setText(servers->text(editedserver)); 164 servername->setText(servers->text(editedserver));
158 serverurl->setText(*serverurlDic[editedserver]); 165 serverurl->setText(*serverurlDic[editedserver]);
159 disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); 166 disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
160 servers->removeItem(editedserver); 167 servers->removeItem(editedserver);
161 activeServers->removeItem(editedserver); 168 activeServers->removeItem(editedserver);
162 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); 169 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
163 servername->setEnabled(FALSE); 170 servername->setEnabled(FALSE);
164 serverurl->setEnabled(FALSE); 171 serverurl->setEnabled(FALSE);
165 changed = true; 172 changed = true;
166} 173}
167 174
168void PackageManagerSettings::removeDestination() 175void PackageManagerSettings::removeDestination()
169{ 176{
170 disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); 177 disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) );
171 disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); 178 disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) );
172 destinationname->setText(""); 179 destinationname->setText("");
173 destinationurl->setText(""); 180 destinationurl->setText("");
174 disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 181 disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
175 destinations->removeItem(editeddestination); 182 destinations->removeItem(editeddestination);
176 activeDestination->removeItem(editeddestination); 183 activeDestination->removeItem(editeddestination);
177 activeLinkDestination->removeItem(editeddestination); 184 activeLinkDestination->removeItem(editeddestination);
178 editeddestination=0; 185 editeddestination=0;
179 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 186 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
180 destinationname->setEnabled(FALSE); 187 destinationname->setEnabled(FALSE);
181 destinationurl->setEnabled(FALSE); 188 destinationurl->setEnabled(FALSE);
182 changed = true; 189 changed = true;
183} 190}
184 191
185void PackageManagerSettings::serverNameChanged(const QString& t) 192void PackageManagerSettings::serverNameChanged(const QString& t)
186{ 193{
187 disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); 194 disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
188 servers->changeItem( t, editedserver ); 195 servers->changeItem( t, editedserver );
189 activeServers->changeItem( t, editedserver ); 196 activeServers->changeItem( t, editedserver );
190 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); 197 connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
191 changed = true; 198 changed = true;
192 serverChanged = true; 199 serverChanged = true;
193} 200}
194 201
195void PackageManagerSettings::destNameChanged(const QString& t) 202void PackageManagerSettings::destNameChanged(const QString& t)
196{ 203{
197 disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 204 disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
198 destinations->changeItem( t, editeddestination ); 205 destinations->changeItem( t, editeddestination );
199 activeDestination->changeItem( t, editeddestination ); 206 activeDestination->changeItem( t, editeddestination );
200 activeLinkDestination->changeItem( t, editeddestination ); 207 activeLinkDestination->changeItem( t, editeddestination );
201 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 208 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
202 changed = true; 209 changed = true;
203} 210}
204 211
205void PackageManagerSettings::serverUrlChanged(const QString& t) 212void PackageManagerSettings::serverUrlChanged(const QString& t)
206{ 213{
207 serverurlDic.replace(editedserver, new QString(t)); 214 serverurlDic.replace(editedserver, new QString(t));
208 changed = true; 215 changed = true;
209 serverChanged = true; 216 serverChanged = true;
210} 217}
211 218
212void PackageManagerSettings::destUrlChanged(const QString& t) 219void PackageManagerSettings::destUrlChanged(const QString& t)
213{ 220{
214 destinationurlDic.replace(editeddestination, new QString(t)); 221 destinationurlDic.replace(editeddestination, new QString(t));
215 changed = true; 222 changed = true;
216} 223}
217 224
218void PackageManagerSettings::writeIpkgConfig(const QString& conffile) 225void PackageManagerSettings::writeIpkgConfig(const QString& conffile)
219{ 226{
220 QFile conf(conffile); 227 QFile conf(conffile);
221 if ( ! conf.open(IO_WriteOnly) ) return; 228 if ( ! conf.open(IO_WriteOnly) ) return;
222 QTextStream s(&conf); 229 QTextStream s(&conf);
223 s << "# Written by qpie Package Manager\n"; 230 s << "# Written by qpie Package Manager\n";
224 for (int i=0; i<(int)activeServers->count(); i++) 231 for (int i=0; i<(int)activeServers->count(); i++)
225 { 232 {
226 QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???"); 233 QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???");
227 if ( !activeServers->isSelected(i) ) 234 if ( !activeServers->isSelected(i) )
228 s << "#"; 235 s << "#";
229 s << "src " << activeServers->text(i) << " " << url << "\n"; 236 s << "src " << activeServers->text(i) << " " << url << "\n";
230 } 237 }
231 for (int i=0; i<(int)destinations->count(); i++) 238 for (int i=0; i<(int)destinations->count(); i++)
232 { 239 {
233 QString url = destinationurlDic[i] ? *destinationurlDic[i] : QString("???"); 240 QString url = destinationurlDic[i] ? *destinationurlDic[i] : QString("???");
234 s << "dest " << destinations->text(i) << " " << url << "\n"; 241 s << "dest " << destinations->text(i) << " " << url << "\n";
235 } 242 }
236 conf.close(); 243 conf.close();
237} 244}
238 245
239 246
240void PackageManagerSettings::readInstallationSettings() 247void PackageManagerSettings::readInstallationSettings()
241{ 248{
242 Config cfg( "oipkg", Config::User ); 249 Config cfg( "oipkg", Config::User );
243 cfg.setGroup( "Settings" ); 250 cfg.setGroup( "Settings" );
244 251
245 installationSettingsCount = cfg.readNumEntry( "count", -1 ); 252 installationSettingsCount = cfg.readNumEntry( "count", -1 );
246 currentSetting = cfg.readNumEntry( "current", 0 );// o should be -1 253 currentSetting = cfg.readNumEntry( "current", 0 );// o should be -1
247 254
248 for (int i = 0; i < installationSettingsCount; i++) 255 for (int i = 0; i < installationSettingsCount; i++)
249 { 256 {
250 cfg.setGroup( "Setting_" + QString::number(i) ); 257 cfg.setGroup( "Setting_" + QString::number(i) );
251 settingName->insertItem( cfg.readEntry( "name", "???" ), i ); 258 settingName->insertItem( cfg.readEntry( "name", "???" ), i );
252 }; 259 };
253 readInstallationSetting( currentSetting ); 260 readInstallationSetting( currentSetting );
254} 261}
255 262
256 263
257 264
258/** 265/**
259 * remove from conf file 266 * remove from conf file
260 */ 267 */
261void PackageManagerSettings::removeInstallationSetting() 268void PackageManagerSettings::removeInstallationSetting()
262{ 269{
263 settingName->removeItem( settingName->currentItem() ); 270 settingName->removeItem( settingName->currentItem() );
264 Config cfg( "oipkg", Config::User ); 271 Config cfg( "oipkg", Config::User );
265 cfg.setGroup( "Setting_" + QString::number( installationSettingsCount ) ); 272 cfg.setGroup( "Setting_" + QString::number( installationSettingsCount ) );
266 cfg.clearGroup(); 273 cfg.clearGroup();
267 installationSettingsCount--; 274 installationSettingsCount--;
268 changed = true; 275 changed = true;
269 settingName->setEditable( false ); 276 settingName->setEditable( false );
270} 277}
271 278
272/** 279/**
273 * write to confgile 280 * write to confgile
274 */ 281 */
275void PackageManagerSettings::newInstallationSetting() 282void PackageManagerSettings::newInstallationSetting()
276{ 283{
277 installationSettingsCount++; 284 installationSettingsCount++;
278 settingName->insertItem( "New", installationSettingsCount ); 285 settingName->insertItem( "New", installationSettingsCount );
279 settingName->setCurrentItem( installationSettingsCount ); 286 settingName->setCurrentItem( installationSettingsCount );
280 settingName->setEditable( true ); 287 settingName->setEditable( true );
281 changed = true; 288 changed = true;
282} 289}
283 290
284void PackageManagerSettings::installationSettingChange(int cs) 291void PackageManagerSettings::installationSettingChange(int cs)
285{ 292{
286 writeCurrentInstallationSetting(); 293 writeCurrentInstallationSetting();
287 currentSetting = cs; 294 currentSetting = cs;
288 readInstallationSetting( cs ); 295 readInstallationSetting( cs );
289 changed = true; 296 changed = true;
290} 297}
291 298
292void PackageManagerSettings::writeInstallationSettings() 299void PackageManagerSettings::writeInstallationSettings()
293{ 300{
294 { 301 {
295 Config cfg( "oipkg", Config::User ); 302 Config cfg( "oipkg", Config::User );
296 cfg.setGroup( "Settings" ); 303 cfg.setGroup( "Settings" );
297 cfg.writeEntry( "count", installationSettingsCount ); 304 cfg.writeEntry( "count", installationSettingsCount );
298 cfg.writeEntry( "current", currentSetting ); 305 cfg.writeEntry( "current", currentSetting );
299 } 306 }
300 writeCurrentInstallationSetting(); 307 writeCurrentInstallationSetting();
301} 308}
302 309
303 310
304void PackageManagerSettings::readInstallationSetting(int setting) 311void PackageManagerSettings::readInstallationSetting(int setting)
305{ 312{
306 if ( setting < 0 ) return; 313 if ( setting < 0 ) return;
307 Config cfg( "oipkg", Config::User ); 314 Config cfg( "oipkg", Config::User );
308 cfg.setGroup( "Setting_" + QString::number( setting ) ); 315 cfg.setGroup( "Setting_" + QString::number( setting ) );
309 CheckBoxLink->setChecked( cfg.readBoolEntry( "link", true ) ); 316 CheckBoxLink->setChecked( cfg.readBoolEntry( "link", true ) );
310 QString dest = cfg.readEntry( "dest" ); 317 QString dest = cfg.readEntry( "dest" );
311 QString linkdest = cfg.readEntry( "linkdest" ); 318 QString linkdest = cfg.readEntry( "linkdest" );
312 pvDebug(3, "dest="+dest); 319 pvDebug(3, "dest="+dest);
313 pvDebug(3, "linkdest="+linkdest); 320 pvDebug(3, "linkdest="+linkdest);
314 for ( int i = 0; i < activeDestination->count(); i++) 321 for ( int i = 0; i < activeDestination->count(); i++)
315 { 322 {
316 if ( activeDestination->text( i ) == dest ) 323 if ( activeDestination->text( i ) == dest )
317 activeDestination->setCurrentItem( i ); 324 activeDestination->setCurrentItem( i );
318 if ( activeLinkDestination->text( i ) == linkdest ) 325 if ( activeLinkDestination->text( i ) == linkdest )
319 activeLinkDestination->setCurrentItem( i ); 326 activeLinkDestination->setCurrentItem( i );
320 } 327 }
321} 328}
322 329
323void PackageManagerSettings::writeCurrentInstallationSetting() 330void PackageManagerSettings::writeCurrentInstallationSetting()
324{ 331{
325 Config cfg( "oipkg", Config::User ); 332 Config cfg( "oipkg", Config::User );
326 cfg.setGroup( "Setting_" + QString::number(currentSetting) ); 333 cfg.setGroup( "Setting_" + QString::number(currentSetting) );
327 cfg.writeEntry( "link", CheckBoxLink->isChecked() ); 334 cfg.writeEntry( "link", CheckBoxLink->isChecked() );
328 cfg.writeEntry( "dest", getDestinationName() ); 335 cfg.writeEntry( "dest", getDestinationName() );
329 cfg.writeEntry( "linkdest" , getLinkDestinationName() ); 336 cfg.writeEntry( "linkdest" , getLinkDestinationName() );
330 QStringList sers = getActiveServers(); 337 QStringList sers = getActiveServers();
331 int srvc = 0; 338 int srvc = 0;
332 for ( QStringList::Iterator it = sers.begin(); it != sers.end(); ++it ) { 339 for ( QStringList::Iterator it = sers.begin(); it != sers.end(); ++it ) {
333 cfg.writeEntry( "server_" + QString::number(srvc++), *it ); 340 cfg.writeEntry( "server_" + QString::number(srvc++), *it );
334 } 341 }
335 cfg.writeEntry( "server_count", srvc ); 342 cfg.writeEntry( "server_count", srvc );
336} 343}
337 344
338void PackageManagerSettings::renameInstallationSetting() 345void PackageManagerSettings::renameInstallationSetting()
339{ 346{
340 settingName->setEditable( true ); 347 settingName->setEditable( true );
341 changed = true; 348 changed = true;
342} 349}
343 350
344void PackageManagerSettings::installationSettingSetName(const QString &name) 351void PackageManagerSettings::installationSettingSetName(const QString &name)
345{ 352{
346 settingName->changeItem( name, settingName->currentItem() ); 353 settingName->changeItem( name, settingName->currentItem() );
347 changed = true; 354 changed = true;
348} 355}
349 356
350 357
351bool PackageManagerSettings::readIpkgConfig(const QString& conffile) 358bool PackageManagerSettings::readIpkgConfig(const QString& conffile)
352{ 359{
353 QFile conf(conffile); 360 QFile conf(conffile);
354 changed = false; 361 changed = false;
355 if ( conf.open(IO_ReadOnly) ) { 362 if ( conf.open(IO_ReadOnly) ) {
356 QTextStream s(&conf); 363 QTextStream s(&conf);
357 servers->clear(); 364 servers->clear();
358 activeServers->clear(); 365 activeServers->clear();
359 destinations->clear(); 366 destinations->clear();
360 activeDestination->clear(); 367 activeDestination->clear();
361 activeLinkDestination->clear(); 368 activeLinkDestination->clear();
362 serverurlDic.clear(); 369 serverurlDic.clear();
363 destinationurlDic.clear(); 370 destinationurlDic.clear();
364 ipkg_old=0; 371 ipkg_old=0;
365 int currentserver=0; 372 int currentserver=0;
366 while ( !s.atEnd() ) { 373 while ( !s.atEnd() ) {
367 QString l = s.readLine(); 374 QString l = s.readLine();
368 QStringList token = QStringList::split(' ', l); 375 QStringList token = QStringList::split(' ', l);
369 if ( token[0] == "src" || token[0] == "#src" ) { 376 if ( token[0] == "src" || token[0] == "#src" ) {
370 currentserver=servers->count(); 377 currentserver=servers->count();
371 serverurlDic.insert(servers->count(),new QString(token[2])); 378 serverurlDic.insert(servers->count(),new QString(token[2]));
372 int a = token[0] == "src" ? 1 : 0; 379 int a = token[0] == "src" ? 1 : 0;
373 int i = servers->count(); 380 int i = servers->count();
374 servers->insertItem(token[1]); 381 servers->insertItem(token[1]);
375 activeServers->insertItem( token[1] ); 382 activeServers->insertItem( token[1] );
376 activeServers->setSelected(i,a); 383 activeServers->setSelected(i,a);
377 } else if ( token[0] == "dest" ) { 384 } else if ( token[0] == "dest" ) {
378 currentserver=destinations->count(); 385 currentserver=destinations->count();
379 destinationurlDic.insert(destinations->count(),new QString(token[2])); 386 destinationurlDic.insert(destinations->count(),new QString(token[2]));
380 destinations->insertItem(token[1]); 387 destinations->insertItem(token[1]);
381 activeDestination->insertItem( token[1] ); 388 activeDestination->insertItem( token[1] );
382 activeLinkDestination->insertItem( token[1] ); 389 activeLinkDestination->insertItem( token[1] );
383 390
384 } else if ( token[0] == "option" ) { 391 } else if ( token[0] == "option" ) {
385 // ### somehow need to use the settings from netsetup 392 // ### somehow need to use the settings from netsetup
386 // if ( token[1] == "http_proxy" ) 393 // if ( token[1] == "http_proxy" )
387 // http->setText(token[2]); 394 // http->setText(token[2]);
388 // else if ( token[1] == "ftp_proxy" ) 395 // else if ( token[1] == "ftp_proxy" )
389 // ftp->setText(token[2]); 396 // ftp->setText(token[2]);
390 // else if ( token[1] == "proxy_username" ) 397 // else if ( token[1] == "proxy_username" )
391 // username->setText(token[2]); 398 // username->setText(token[2]);
392 // else if ( token[1] == "proxy_password" ) 399 // else if ( token[1] == "proxy_password" )
393 // password->setText(token[2]); 400 // password->setText(token[2]);
394 } else { 401 } else {
395 // Old style? 402 // Old style?
396 int eq = l.find('='); 403 int eq = l.find('=');
397 if ( eq >= 0 ) { 404 if ( eq >= 0 ) {
398 QString v = l.mid(eq+1).stripWhiteSpace(); 405 QString v = l.mid(eq+1).stripWhiteSpace();
399 if ( v[0] == '"' || v[0] == '\'' ) { 406 if ( v[0] == '"' || v[0] == '\'' ) {
400 int cl=v.find(v[0],1); 407 int cl=v.find(v[0],1);
401 if ( cl >= 0 ) 408 if ( cl >= 0 )
402 v = v.mid(1,cl-1); 409 v = v.mid(1,cl-1);
403 } 410 }
404 if ( l.left(12) == "IPKG_SOURCE=" ) { 411 if ( l.left(12) == "IPKG_SOURCE=" ) {
405 ipkg_old=1; 412 ipkg_old=1;
406 currentserver=servers->count(); 413 currentserver=servers->count();
407 serverurlDic.insert(servers->count(),new QString(v)); 414 serverurlDic.insert(servers->count(),new QString(v));
408 servers->insertItem(v); 415 servers->insertItem(v);
409 } else if ( l.left(13) == "#IPKG_SOURCE=" ) { 416 } else if ( l.left(13) == "#IPKG_SOURCE=" ) {
410 serverurlDic.insert(servers->count(),new QString(v)); 417 serverurlDic.insert(servers->count(),new QString(v));
411 servers->insertItem(v); 418 servers->insertItem(v);
412 } else if ( l.left(10) == "IPKG_ROOT=" ) { 419 } else if ( l.left(10) == "IPKG_ROOT=" ) {
413 // ### no UI 420 // ### no UI
414 // } else if ( l.left(20) == "IPKG_PROXY_USERNAME=" ) { 421 // } else if ( l.left(20) == "IPKG_PROXY_USERNAME=" ) {
415 // username->setText(v); 422 // username->setText(v);
416 // } else if ( l.left(20) == "IPKG_PROXY_PASSWORD=" ) { 423 // } else if ( l.left(20) == "IPKG_PROXY_PASSWORD=" ) {
417 // password->setText(v); 424 // password->setText(v);
418 // } else if ( l.left(16) == "IPKG_PROXY_HTTP=" ) { 425 // } else if ( l.left(16) == "IPKG_PROXY_HTTP=" ) {
419 // http->setText(v); 426 // http->setText(v);
420 // } else if ( l.left(16) == "IPKG_PROXY_FTP=" ) { 427 // } else if ( l.left(16) == "IPKG_PROXY_FTP=" ) {
421 // ftp->setText(v); 428 // ftp->setText(v);
422 } 429 }
423 } 430 }
424 } 431 }
425 } 432 }
426 if ( ipkg_old ) { 433 if ( ipkg_old ) {
427 servers->setSelectionMode(QListBox::Single); 434 servers->setSelectionMode(QListBox::Single);
428 servers->setSelected(currentserver,TRUE); 435 servers->setSelected(currentserver,TRUE);
429 } 436 }
430 return TRUE; 437 return TRUE;
431 } else { 438 } else {
432 return FALSE; 439 return FALSE;
433 } 440 }
434} 441}
435 442
436 443
437/** 444/**
438 * read from config file(s) 445 * read from config file(s)
439 */ 446 */
440void PackageManagerSettings::readSettings() 447void PackageManagerSettings::readSettings()
441{ 448{
442 readIpkgConfig("/etc/ipkg.conf"); 449 readIpkgConfig("/etc/ipkg.conf");
443 readInstallationSettings(); 450 readInstallationSettings();
444} 451}
445 452
446void PackageManagerSettings::writeSettings() 453void PackageManagerSettings::writeSettings()
447{ 454{
448 if ( changed ) writeIpkgConfig("/etc/ipkg.conf"); 455 if ( changed ) writeIpkgConfig("/etc/ipkg.conf");
449 writeInstallationSettings(); 456 writeInstallationSettings();
450} 457}
451/** shows the setting dialog */ 458/** shows the setting dialog */
452bool PackageManagerSettings::showDialog( int i ) 459bool PackageManagerSettings::showDialog( int i )
453{ 460{
454 TabWidget->setCurrentPage( i ); 461 TabWidget->setCurrentPage( i );
455 showMaximized(); 462 showMaximized();
456 bool ret = exec(); 463 bool ret = exec();
457 if ( ret ) writeSettings(); 464 if ( ret ) writeSettings();
458 else readSettings(); 465 else readSettings();
459 return (changed && ret); 466 return (changed && ret);
460} 467}
461/** Returns the installation destination */ 468/** Returns the installation destination */
462QString PackageManagerSettings::getDestinationName() 469QString PackageManagerSettings::getDestinationName()
463{ 470{
464 return activeDestination->currentText(); 471 return activeDestination->currentText();
465} 472}
466/** Returns the link destination */ 473/** Returns the link destination */
467QString PackageManagerSettings::getLinkDestinationName() 474QString PackageManagerSettings::getLinkDestinationName()
468{ 475{
469 return activeLinkDestination->currentText(); 476 return activeLinkDestination->currentText();
470} 477}
471/** Returns the URL of the active destination */ 478/** Returns the URL of the active destination */
472QString PackageManagerSettings::getDestinationUrl() 479QString PackageManagerSettings::getDestinationUrl()
473{ 480{
474 int dnr = activeDestination->currentItem(); 481 int dnr = activeDestination->currentItem();
475 return *destinationurlDic.find(dnr); 482 return *destinationurlDic.find(dnr);
476} 483}
477/** Should oipkg create links form install destination to link destination */ 484/** Should oipkg create links form install destination to link destination */
478bool PackageManagerSettings::createLinks() 485bool PackageManagerSettings::createLinks()
479{ 486{
480 return CheckBoxLink->isChecked(); 487 return CheckBoxLink->isChecked();
481} 488}
482/** get the servers that are active */ 489/** get the servers that are active */
483QStringList PackageManagerSettings::getActiveServers() 490QStringList PackageManagerSettings::getActiveServers()
484{ 491{
485 QStringList sl; 492 QStringList sl;
486 for (int i=0; i<(int)activeServers->count(); i++) 493 for (int i=0; i<(int)activeServers->count(); i++)
487 { 494 {
488 if ( activeServers->isSelected(i) ) 495 if ( activeServers->isSelected(i) )
489 sl += activeServers->text(i); 496 sl += activeServers->text(i);
490 } 497 }
491 return sl; 498 return sl;
492} 499}
493 QStringList PackageManagerSettings::getServers() 500 QStringList PackageManagerSettings::getServers()
494{ 501{
495 QStringList sl; 502 QStringList sl;
496 for (int i=0; i<(int)activeServers->count(); i++) 503 for (int i=0; i<(int)activeServers->count(); i++)
497 { 504 {
498 sl += activeServers->text(i); 505 sl += activeServers->text(i);
499 } 506 }
500 return sl; 507 return sl;
501} 508}
502 509
503/** returns the destination listed in ipkg.conf */ 510/** returns the destination listed in ipkg.conf */
504QStringList PackageManagerSettings::getDestinationUrls() 511QStringList PackageManagerSettings::getDestinationUrls()
505{ 512{
506 QStringList sl; 513 QStringList sl;
507 for (int i=0; i<(int)destinations->count(); i++) 514 for (int i=0; i<(int)destinations->count(); i++)
508 { 515 {
509 sl += *destinationurlDic[i]; 516 sl += *destinationurlDic[i];
510 } 517 }
511 return sl; 518 return sl;
512} 519}
513 520
514/** returns the destination listed in ipkg.conf */ 521/** returns the destination listed in ipkg.conf */
515QString PackageManagerSettings::getDestinationUrlByName(QString n) 522QString PackageManagerSettings::getDestinationUrlByName(QString n)
516{ 523{
517 QStringList sl; 524 QStringList sl;
518 for (int i=0; i<(int)destinations->count(); i++) 525 for (int i=0; i<(int)destinations->count(); i++)
519 { 526 {
520 if ( n == destinations->text(i)) return*destinationurlDic[i]; 527 if ( n == destinations->text(i)) return*destinationurlDic[i];
521 } 528 }
522 return ""; 529 return "";
523} 530}
524 531
525/** returns the destination listed in ipkg.conf */ 532/** returns the destination listed in ipkg.conf */
526QStringList PackageManagerSettings::getDestinationNames() 533QStringList PackageManagerSettings::getDestinationNames()
527{ 534{
528 QStringList sl; 535 QStringList sl;
529 for (int i=0; i<(int)destinations->count(); i++) 536 for (int i=0; i<(int)destinations->count(); i++)
530 { 537 {
531 sl += destinations->text(i); 538 sl += destinations->text(i);
532 } 539 }
533 return sl; 540 return sl;
534} 541}
535 542
536 543
537void PackageManagerSettings::linkEnabled( bool b ) 544void PackageManagerSettings::linkEnabled( bool b )
538{ 545{
539 pvDebug(2,"PackageManagerSettings::linkEnabled "+QString(b?"yes":"no")); 546 pvDebug(2,"PackageManagerSettings::linkEnabled "+QString(b?"yes":"no"));
540 activeLinkDestination->setEnabled( b ); 547 activeLinkDestination->setEnabled( b );
548 CheckBoxLink->setChecked( b );
541} 549}
542 550
543void PackageManagerSettings::activeServerChanged() 551void PackageManagerSettings::activeServerChanged()
544{ 552{
545 changed = true; 553 changed = true;
546} 554}
547 555
548QComboBox* PackageManagerSettings::getDestCombo()
549{
550 return new QComboBox(activeDestination);
551}
552
553void PackageManagerSettings::createLinksToDest() 556void PackageManagerSettings::createLinksToDest()
554{ 557{
555 pvDebug(2,"creating links..."); 558 pvDebug(2,"creating links...");
556 // emit doCreateLinks( destinationurl->text() ); 559 // emit doCreateLinks( destinationurl->text() );
557 //ipkg->createLinks( destinationurl ); 560 //ipkg->createLinks( destinationurl );
558} 561}
559 562
560void PackageManagerSettings::removeLinksToDest() 563void PackageManagerSettings::removeLinksToDest()
561{ 564{
562 pvDebug(2,"removing links..."); 565 pvDebug(2,"removing links...");
563 // emit doRemoveLinks( destinationurl->text() ); 566 // emit doRemoveLinks( destinationurl->text() );
564 //ipkg->removeLinks( destinationurl ); 567 //ipkg->removeLinks( destinationurl );
565} 568}
566 569
567//void PackageManagerSettings::setIpkg( PmIpkg* i ) 570void PackageManagerSettings::activeDestinationChange(int i)
568//{ 571{
569 //ipkg = i; 572 pvDebug(5,"activeDestinationChange "+QString::number(i));
570//} 573 if (i > activeDestination->count()) return;
574 activeDestination->setCurrentItem(i);
575 pvDebug(5,"dest name "+ activeDestination->currentText());
576}
diff --git a/noncore/unsupported/oipkg/pksettings.h b/noncore/unsupported/oipkg/pksettings.h
index 8f9fe62..d66c4e8 100644
--- a/noncore/unsupported/oipkg/pksettings.h
+++ b/noncore/unsupported/oipkg/pksettings.h
@@ -1,75 +1,74 @@
1#ifndef PACKAGEMANAGERSETTINGS_H 1#ifndef PACKAGEMANAGERSETTINGS_H
2#define PACKAGEMANAGERSETTINGS_H 2#define PACKAGEMANAGERSETTINGS_H
3 3
4#include "pksettingsbase.h" 4#include "pksettingsbase.h"
5//#include "pmipkg.h" 5//#include "pmipkg.h"
6#include <qintdict.h> 6#include <qintdict.h>
7#include <qobject.h> 7#include <qobject.h>
8 8
9 9
10class PackageManagerSettings : public PackageManagerSettingsBase 10class PackageManagerSettings : public PackageManagerSettingsBase
11{ 11{
12 Q_OBJECT 12 Q_OBJECT
13public: 13public:
14 PackageManagerSettings( QWidget* , const char* , WFlags ); 14 PackageManagerSettings( QWidget* , const char* , WFlags );
15 ~PackageManagerSettings(); 15 ~PackageManagerSettings();
16 16
17 bool showDialog( int ) ; 17 bool showDialog( int ) ;
18 QString getDestinationUrl(); 18 QString getDestinationUrl();
19 QString getDestinationName(); 19 QString getDestinationName();
20 QString getLinkDestinationName(); 20 QString getLinkDestinationName();
21 bool createLinks(); 21 bool createLinks();
22 QStringList getServers(); 22 QStringList getServers();
23 QStringList getActiveServers(); 23 QStringList getActiveServers();
24 QStringList getDestinationUrls(); 24 QStringList getDestinationUrls();
25 QStringList getDestinationNames(); 25 QStringList getDestinationNames();
26 QString getDestinationUrlByName(QString); 26 QString getDestinationUrlByName(QString);
27 QComboBox* getDestCombo();
28// void setIpkg( PmIpkg* );
29 27
30public slots: 28public slots:
31 void writeInstallationSettings(); 29 void writeInstallationSettings();
32 void readInstallationSettings(); 30 void readInstallationSettings();
33 void writeCurrentInstallationSetting(); 31 void writeCurrentInstallationSetting();
34 void readInstallationSetting(int); 32 void readInstallationSetting(int);
35 void installationSettingSetName(const QString &); 33 void installationSettingSetName(const QString &);
36 void removeLinksToDest(); 34 void removeLinksToDest();
37 void createLinksToDest(); 35 void createLinksToDest();
38 void newServer(); 36 void newServer();
39 void editServer(int); 37 void editServer(int);
40 void removeDestination(); 38 void removeDestination();
41 void newDestination(); 39 void newDestination();
42 void editDestination(int); 40 void editDestination(int);
43 void linkEnabled(bool); 41 void linkEnabled(bool);
44 void removeServer(); 42 void removeServer();
45 void serverNameChanged(const QString&); 43 void serverNameChanged(const QString&);
46 void serverUrlChanged(const QString&); 44 void serverUrlChanged(const QString&);
47 void destNameChanged(const QString&); 45 void destNameChanged(const QString&);
48 void destUrlChanged(const QString&); 46 void destUrlChanged(const QString&);
49 void installationSettingChange(int); 47 void installationSettingChange(int);
50 void newInstallationSetting(); 48 void newInstallationSetting();
51 void removeInstallationSetting(); 49 void removeInstallationSetting();
52 void renameInstallationSetting(); 50 void renameInstallationSetting();
53 void activeServerChanged(); 51 void activeServerChanged();
52 void activeDestinationChange(int);
54signals: 53signals:
55// void doCreateLinks( QString dest ); 54// void doCreateLinks( QString dest );
56// void doRemoveLinks( QString dest ); 55// void doRemoveLinks( QString dest );
57 56
58private: 57private:
59 QIntDict<QString> serverurlDic; 58 QIntDict<QString> serverurlDic;
60 QIntDict<QString> destinationurlDic; 59 QIntDict<QString> destinationurlDic;
61 int ipkg_old; 60 int ipkg_old;
62 int editedserver; 61 int editedserver;
63 int editeddestination; 62 int editeddestination;
64 int currentSetting; 63 int currentSetting;
65 int installationSettingsCount; 64 int installationSettingsCount;
66 bool changed; 65 bool changed;
67 bool serverChanged; 66 bool serverChanged;
68 67
69 bool readIpkgConfig(const QString&); 68 bool readIpkgConfig(const QString&);
70 void writeIpkgConfig(const QString&); 69 void writeIpkgConfig(const QString&);
71 void writeSettings(); 70 void writeSettings();
72 void readSettings(); 71 void readSettings();
73}; 72};
74 73
75#endif 74#endif
diff --git a/noncore/unsupported/oipkg/pksettingsbase.ui b/noncore/unsupported/oipkg/pksettingsbase.ui
index 5b83248..e95ed83 100644
--- a/noncore/unsupported/oipkg/pksettingsbase.ui
+++ b/noncore/unsupported/oipkg/pksettingsbase.ui
@@ -1,474 +1,474 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>PackageManagerSettingsBase</class> 2<class>PackageManagerSettingsBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>Form4</cstring> 7 <cstring>Form4</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>337</width> 14 <width>333</width>
15 <height>454</height> 15 <height>454</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Package Servers</string> 20 <string>Package Servers</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <grid> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>3</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>3</number> 35 <number>3</number>
36 </property> 36 </property>
37 <widget row="0" column="0" > 37 <widget row="0" column="0" >
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget</cstring> 41 <cstring>TabWidget</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>enabled</name> 44 <name>enabled</name>
45 <bool>true</bool> 45 <bool>true</bool>
46 </property> 46 </property>
47 <property> 47 <property>
48 <name>layoutMargin</name> 48 <name>layoutMargin</name>
49 </property> 49 </property>
50 <property> 50 <property>
51 <name>layoutSpacing</name> 51 <name>layoutSpacing</name>
52 </property> 52 </property>
53 <widget> 53 <widget>
54 <class>QWidget</class> 54 <class>QWidget</class>
55 <property stdset="1"> 55 <property stdset="1">
56 <name>name</name> 56 <name>name</name>
57 <cstring>tab</cstring> 57 <cstring>tab</cstring>
58 </property> 58 </property>
59 <attribute> 59 <attribute>
60 <name>title</name> 60 <name>title</name>
61 <string>Settings</string> 61 <string>Settings</string>
62 </attribute> 62 </attribute>
63 <grid> 63 <grid>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>margin</name> 65 <name>margin</name>
66 <number>3</number> 66 <number>3</number>
67 </property> 67 </property>
68 <property stdset="1"> 68 <property stdset="1">
69 <name>spacing</name> 69 <name>spacing</name>
70 <number>3</number> 70 <number>3</number>
71 </property> 71 </property>
72 <widget row="0" column="0" > 72 <widget row="0" column="0" >
73 <class>QLayoutWidget</class> 73 <class>QLayoutWidget</class>
74 <property stdset="1"> 74 <property stdset="1">
75 <name>name</name> 75 <name>name</name>
76 <cstring>Layout3_2</cstring> 76 <cstring>Layout3_2</cstring>
77 </property> 77 </property>
78 <hbox> 78 <hbox>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>margin</name> 80 <name>margin</name>
81 <number>0</number> 81 <number>0</number>
82 </property> 82 </property>
83 <property stdset="1"> 83 <property stdset="1">
84 <name>spacing</name> 84 <name>spacing</name>
85 <number>6</number> 85 <number>6</number>
86 </property> 86 </property>
87 <widget> 87 <widget>
88 <class>QLabel</class> 88 <class>QLabel</class>
89 <property stdset="1"> 89 <property stdset="1">
90 <name>name</name> 90 <name>name</name>
91 <cstring>Settings</cstring> 91 <cstring>Settings</cstring>
92 </property> 92 </property>
93 <property stdset="1"> 93 <property stdset="1">
94 <name>text</name> 94 <name>text</name>
95 <string>Installation Setups</string> 95 <string>Installation Setups</string>
96 </property> 96 </property>
97 </widget> 97 </widget>
98 <spacer> 98 <spacer>
99 <property> 99 <property>
100 <name>name</name> 100 <name>name</name>
101 <cstring>Spacer2_2_2</cstring> 101 <cstring>Spacer2_2_2</cstring>
102 </property> 102 </property>
103 <property stdset="1"> 103 <property stdset="1">
104 <name>orientation</name> 104 <name>orientation</name>
105 <enum>Horizontal</enum> 105 <enum>Horizontal</enum>
106 </property> 106 </property>
107 <property stdset="1"> 107 <property stdset="1">
108 <name>sizeType</name> 108 <name>sizeType</name>
109 <enum>Expanding</enum> 109 <enum>Expanding</enum>
110 </property> 110 </property>
111 <property> 111 <property>
112 <name>sizeHint</name> 112 <name>sizeHint</name>
113 <size> 113 <size>
114 <width>20</width> 114 <width>20</width>
115 <height>20</height> 115 <height>20</height>
116 </size> 116 </size>
117 </property> 117 </property>
118 </spacer> 118 </spacer>
119 </hbox> 119 </hbox>
120 </widget> 120 </widget>
121 <widget row="5" column="0" > 121 <widget row="5" column="0" >
122 <class>QLayoutWidget</class> 122 <class>QLayoutWidget</class>
123 <property stdset="1"> 123 <property stdset="1">
124 <name>name</name> 124 <name>name</name>
125 <cstring>Layout8</cstring> 125 <cstring>Layout8</cstring>
126 </property> 126 </property>
127 <hbox> 127 <hbox>
128 <property stdset="1"> 128 <property stdset="1">
129 <name>margin</name> 129 <name>margin</name>
130 <number>0</number> 130 <number>0</number>
131 </property> 131 </property>
132 <property stdset="1"> 132 <property stdset="1">
133 <name>spacing</name> 133 <name>spacing</name>
134 <number>6</number> 134 <number>6</number>
135 </property> 135 </property>
136 <widget> 136 <widget>
137 <class>QLabel</class> 137 <class>QLabel</class>
138 <property stdset="1"> 138 <property stdset="1">
139 <name>name</name> 139 <name>name</name>
140 <cstring>TextLabel1</cstring> 140 <cstring>TextLabel1</cstring>
141 </property> 141 </property>
142 <property stdset="1"> 142 <property stdset="1">
143 <name>text</name> 143 <name>text</name>
144 <string>Install destination:</string> 144 <string>Install destination:</string>
145 </property> 145 </property>
146 </widget> 146 </widget>
147 <widget> 147 <widget>
148 <class>QComboBox</class> 148 <class>QComboBox</class>
149 <property stdset="1"> 149 <property stdset="1">
150 <name>name</name> 150 <name>name</name>
151 <cstring>activeDestination</cstring> 151 <cstring>activeDestination</cstring>
152 </property> 152 </property>
153 </widget> 153 </widget>
154 </hbox> 154 </hbox>
155 </widget> 155 </widget>
156 <widget row="6" column="0" > 156 <widget row="6" column="0" >
157 <class>QLayoutWidget</class> 157 <class>QLayoutWidget</class>
158 <property stdset="1"> 158 <property stdset="1">
159 <name>name</name> 159 <name>name</name>
160 <cstring>Layout9</cstring> 160 <cstring>Layout9</cstring>
161 </property> 161 </property>
162 <hbox> 162 <hbox>
163 <property stdset="1"> 163 <property stdset="1">
164 <name>margin</name> 164 <name>margin</name>
165 <number>0</number> 165 <number>0</number>
166 </property> 166 </property>
167 <property stdset="1"> 167 <property stdset="1">
168 <name>spacing</name> 168 <name>spacing</name>
169 <number>6</number> 169 <number>6</number>
170 </property> 170 </property>
171 <widget> 171 <widget>
172 <class>QCheckBox</class> 172 <class>QCheckBox</class>
173 <property stdset="1"> 173 <property stdset="1">
174 <name>name</name> 174 <name>name</name>
175 <cstring>CheckBoxLink</cstring> 175 <cstring>CheckBoxLink</cstring>
176 </property> 176 </property>
177 <property stdset="1"> 177 <property stdset="1">
178 <name>text</name> 178 <name>text</name>
179 <string>Link to root destination</string> 179 <string>Link to root destination</string>
180 </property> 180 </property>
181 </widget> 181 </widget>
182 <widget> 182 <widget>
183 <class>QComboBox</class> 183 <class>QComboBox</class>
184 <property stdset="1"> 184 <property stdset="1">
185 <name>name</name> 185 <name>name</name>
186 <cstring>activeLinkDestination</cstring> 186 <cstring>activeLinkDestination</cstring>
187 </property> 187 </property>
188 <property stdset="1"> 188 <property stdset="1">
189 <name>enabled</name> 189 <name>enabled</name>
190 <bool>false</bool> 190 <bool>false</bool>
191 </property> 191 </property>
192 </widget> 192 </widget>
193 </hbox> 193 </hbox>
194 </widget> 194 </widget>
195 <widget row="3" column="0" > 195 <widget row="3" column="0" >
196 <class>QLayoutWidget</class> 196 <class>QLayoutWidget</class>
197 <property stdset="1"> 197 <property stdset="1">
198 <name>name</name> 198 <name>name</name>
199 <cstring>Layout13</cstring> 199 <cstring>Layout13</cstring>
200 </property> 200 </property>
201 <hbox> 201 <hbox>
202 <property stdset="1"> 202 <property stdset="1">
203 <name>margin</name> 203 <name>margin</name>
204 <number>0</number> 204 <number>0</number>
205 </property> 205 </property>
206 <property stdset="1"> 206 <property stdset="1">
207 <name>spacing</name> 207 <name>spacing</name>
208 <number>6</number> 208 <number>6</number>
209 </property> 209 </property>
210 <widget> 210 <widget>
211 <class>QLabel</class> 211 <class>QLabel</class>
212 <property stdset="1"> 212 <property stdset="1">
213 <name>name</name> 213 <name>name</name>
214 <cstring>TextLabel1_2</cstring> 214 <cstring>TextLabel1_2</cstring>
215 </property> 215 </property>
216 <property stdset="1"> 216 <property stdset="1">
217 <name>text</name> 217 <name>text</name>
218 <string>Used servers:</string> 218 <string>Used servers: (Highlighted feeds are active)</string>
219 </property> 219 </property>
220 </widget> 220 </widget>
221 <spacer> 221 <spacer>
222 <property> 222 <property>
223 <name>name</name> 223 <name>name</name>
224 <cstring>Spacer4</cstring> 224 <cstring>Spacer4</cstring>
225 </property> 225 </property>
226 <property stdset="1"> 226 <property stdset="1">
227 <name>orientation</name> 227 <name>orientation</name>
228 <enum>Horizontal</enum> 228 <enum>Horizontal</enum>
229 </property> 229 </property>
230 <property stdset="1"> 230 <property stdset="1">
231 <name>sizeType</name> 231 <name>sizeType</name>
232 <enum>Expanding</enum> 232 <enum>Expanding</enum>
233 </property> 233 </property>
234 <property> 234 <property>
235 <name>sizeHint</name> 235 <name>sizeHint</name>
236 <size> 236 <size>
237 <width>20</width> 237 <width>20</width>
238 <height>20</height> 238 <height>20</height>
239 </size> 239 </size>
240 </property> 240 </property>
241 </spacer> 241 </spacer>
242 </hbox> 242 </hbox>
243 </widget> 243 </widget>
244 <widget row="4" column="0" > 244 <widget row="4" column="0" >
245 <class>QListBox</class> 245 <class>QListBox</class>
246 <property stdset="1"> 246 <property stdset="1">
247 <name>name</name> 247 <name>name</name>
248 <cstring>activeServers</cstring> 248 <cstring>activeServers</cstring>
249 </property> 249 </property>
250 <property stdset="1"> 250 <property stdset="1">
251 <name>enabled</name> 251 <name>enabled</name>
252 <bool>true</bool> 252 <bool>true</bool>
253 </property> 253 </property>
254 <property stdset="1"> 254 <property stdset="1">
255 <name>selectionMode</name> 255 <name>selectionMode</name>
256 <enum>Multi</enum> 256 <enum>Multi</enum>
257 </property> 257 </property>
258 </widget> 258 </widget>
259 <widget row="1" column="0" > 259 <widget row="1" column="0" >
260 <class>QComboBox</class> 260 <class>QComboBox</class>
261 <property stdset="1"> 261 <property stdset="1">
262 <name>name</name> 262 <name>name</name>
263 <cstring>settingName</cstring> 263 <cstring>settingName</cstring>
264 </property> 264 </property>
265 <property stdset="1"> 265 <property stdset="1">
266 <name>enabled</name> 266 <name>enabled</name>
267 <bool>true</bool> 267 <bool>true</bool>
268 </property> 268 </property>
269 <property stdset="1"> 269 <property stdset="1">
270 <name>focusPolicy</name> 270 <name>focusPolicy</name>
271 <enum>NoFocus</enum> 271 <enum>NoFocus</enum>
272 </property> 272 </property>
273 <property stdset="1"> 273 <property stdset="1">
274 <name>editable</name> 274 <name>editable</name>
275 <bool>false</bool> 275 <bool>false</bool>
276 </property> 276 </property>
277 </widget> 277 </widget>
278 <widget row="2" column="0" > 278 <widget row="2" column="0" >
279 <class>QLayoutWidget</class> 279 <class>QLayoutWidget</class>
280 <property stdset="1"> 280 <property stdset="1">
281 <name>name</name> 281 <name>name</name>
282 <cstring>Layout11</cstring> 282 <cstring>Layout11</cstring>
283 </property> 283 </property>
284 <hbox> 284 <hbox>
285 <property stdset="1"> 285 <property stdset="1">
286 <name>margin</name> 286 <name>margin</name>
287 <number>0</number> 287 <number>0</number>
288 </property> 288 </property>
289 <property stdset="1"> 289 <property stdset="1">
290 <name>spacing</name> 290 <name>spacing</name>
291 <number>6</number> 291 <number>6</number>
292 </property> 292 </property>
293 <widget> 293 <widget>
294 <class>QPushButton</class> 294 <class>QPushButton</class>
295 <property stdset="1"> 295 <property stdset="1">
296 <name>name</name> 296 <name>name</name>
297 <cstring>newsetting</cstring> 297 <cstring>newsetting</cstring>
298 </property> 298 </property>
299 <property stdset="1"> 299 <property stdset="1">
300 <name>enabled</name> 300 <name>enabled</name>
301 <bool>false</bool> 301 <bool>false</bool>
302 </property> 302 </property>
303 <property stdset="1"> 303 <property stdset="1">
304 <name>text</name> 304 <name>text</name>
305 <string>New</string> 305 <string>New</string>
306 </property> 306 </property>
307 <property stdset="1"> 307 <property stdset="1">
308 <name>autoDefault</name> 308 <name>autoDefault</name>
309 <bool>false</bool> 309 <bool>false</bool>
310 </property> 310 </property>
311 </widget> 311 </widget>
312 <widget> 312 <widget>
313 <class>QPushButton</class> 313 <class>QPushButton</class>
314 <property stdset="1"> 314 <property stdset="1">
315 <name>name</name> 315 <name>name</name>
316 <cstring>renamesetting</cstring> 316 <cstring>renamesetting</cstring>
317 </property> 317 </property>
318 <property stdset="1"> 318 <property stdset="1">
319 <name>enabled</name> 319 <name>enabled</name>
320 <bool>false</bool> 320 <bool>false</bool>
321 </property> 321 </property>
322 <property stdset="1"> 322 <property stdset="1">
323 <name>text</name> 323 <name>text</name>
324 <string>Rename</string> 324 <string>Rename</string>
325 </property> 325 </property>
326 </widget> 326 </widget>
327 <widget> 327 <widget>
328 <class>QPushButton</class> 328 <class>QPushButton</class>
329 <property stdset="1"> 329 <property stdset="1">
330 <name>name</name> 330 <name>name</name>
331 <cstring>removesetting</cstring> 331 <cstring>removesetting</cstring>
332 </property> 332 </property>
333 <property stdset="1"> 333 <property stdset="1">
334 <name>enabled</name> 334 <name>enabled</name>
335 <bool>false</bool> 335 <bool>false</bool>
336 </property> 336 </property>
337 <property stdset="1"> 337 <property stdset="1">
338 <name>text</name> 338 <name>text</name>
339 <string>Remove</string> 339 <string>Remove</string>
340 </property> 340 </property>
341 <property stdset="1"> 341 <property stdset="1">
342 <name>autoDefault</name> 342 <name>autoDefault</name>
343 <bool>false</bool> 343 <bool>false</bool>
344 </property> 344 </property>
345 </widget> 345 </widget>
346 </hbox> 346 </hbox>
347 </widget> 347 </widget>
348 </grid> 348 </grid>
349 </widget> 349 </widget>
350 <widget> 350 <widget>
351 <class>QWidget</class> 351 <class>QWidget</class>
352 <property stdset="1"> 352 <property stdset="1">
353 <name>name</name> 353 <name>name</name>
354 <cstring>tab</cstring> 354 <cstring>tab</cstring>
355 </property> 355 </property>
356 <attribute> 356 <attribute>
357 <name>title</name> 357 <name>title</name>
358 <string>Servers</string> 358 <string>Servers</string>
359 </attribute> 359 </attribute>
360 <grid> 360 <grid>
361 <property stdset="1"> 361 <property stdset="1">
362 <name>margin</name> 362 <name>margin</name>
363 <number>3</number> 363 <number>3</number>
364 </property> 364 </property>
365 <property stdset="1"> 365 <property stdset="1">
366 <name>spacing</name> 366 <name>spacing</name>
367 <number>3</number> 367 <number>3</number>
368 </property> 368 </property>
369 <widget row="3" column="0" rowspan="1" colspan="2" > 369 <widget row="3" column="0" rowspan="1" colspan="2" >
370 <class>QLayoutWidget</class> 370 <class>QLayoutWidget</class>
371 <property stdset="1"> 371 <property stdset="1">
372 <name>name</name> 372 <name>name</name>
373 <cstring>Layout4</cstring> 373 <cstring>Layout4</cstring>
374 </property> 374 </property>
375 <grid> 375 <grid>
376 <property stdset="1"> 376 <property stdset="1">
377 <name>margin</name> 377 <name>margin</name>
378 <number>0</number> 378 <number>0</number>
379 </property> 379 </property>
380 <property stdset="1"> 380 <property stdset="1">
381 <name>spacing</name> 381 <name>spacing</name>
382 <number>6</number> 382 <number>6</number>
383 </property> 383 </property>
384 <widget row="0" column="1" > 384 <widget row="0" column="1" >
385 <class>QLineEdit</class> 385 <class>QLineEdit</class>
386 <property stdset="1"> 386 <property stdset="1">
387 <name>name</name> 387 <name>name</name>
388 <cstring>servername</cstring> 388 <cstring>servername</cstring>
389 </property> 389 </property>
390 </widget> 390 </widget>
391 <widget row="0" column="0" > 391 <widget row="0" column="0" >
392 <class>QLabel</class> 392 <class>QLabel</class>
393 <property stdset="1"> 393 <property stdset="1">
394 <name>name</name> 394 <name>name</name>
395 <cstring>TextLabel1_3</cstring> 395 <cstring>TextLabel1_3</cstring>
396 </property> 396 </property>
397 <property stdset="1"> 397 <property stdset="1">
398 <name>text</name> 398 <name>text</name>
399 <string>Name:</string> 399 <string>Name:</string>
400 </property> 400 </property>
401 </widget> 401 </widget>
402 <widget row="1" column="1" > 402 <widget row="1" column="1" >
403 <class>QLineEdit</class> 403 <class>QLineEdit</class>
404 <property stdset="1"> 404 <property stdset="1">
405 <name>name</name> 405 <name>name</name>
406 <cstring>serverurl</cstring> 406 <cstring>serverurl</cstring>
407 </property> 407 </property>
408 </widget> 408 </widget>
409 <widget row="1" column="0" > 409 <widget row="1" column="0" >
410 <class>QLabel</class> 410 <class>QLabel</class>
411 <property stdset="1"> 411 <property stdset="1">
412 <name>name</name> 412 <name>name</name>
413 <cstring>TextLabel2_3</cstring> 413 <cstring>TextLabel2_3</cstring>
414 </property> 414 </property>
415 <property stdset="1"> 415 <property stdset="1">
416 <name>text</name> 416 <name>text</name>
417 <string>URL:</string> 417 <string>URL:</string>
418 </property> 418 </property>
419 </widget> 419 </widget>
420 </grid> 420 </grid>
421 </widget> 421 </widget>
422 <widget row="0" column="0" rowspan="1" colspan="2" > 422 <widget row="0" column="0" rowspan="1" colspan="2" >
423 <class>QLayoutWidget</class> 423 <class>QLayoutWidget</class>
424 <property stdset="1"> 424 <property stdset="1">
425 <name>name</name> 425 <name>name</name>
426 <cstring>Layout2</cstring> 426 <cstring>Layout2</cstring>
427 </property> 427 </property>
428 <hbox> 428 <hbox>
429 <property stdset="1"> 429 <property stdset="1">
430 <name>margin</name> 430 <name>margin</name>
431 <number>0</number> 431 <number>0</number>
432 </property> 432 </property>
433 <property stdset="1"> 433 <property stdset="1">
434 <name>spacing</name> 434 <name>spacing</name>
435 <number>6</number> 435 <number>6</number>
436 </property> 436 </property>
437 <widget> 437 <widget>
438 <class>QLabel</class> 438 <class>QLabel</class>
439 <property stdset="1"> 439 <property stdset="1">
440 <name>name</name> 440 <name>name</name>
441 <cstring>Servers</cstring> 441 <cstring>Servers</cstring>
442 </property> 442 </property>
443 <property stdset="1"> 443 <property stdset="1">
444 <name>text</name> 444 <name>text</name>
445 <string>Servers</string> 445 <string>Servers</string>
446 </property> 446 </property>
447 </widget> 447 </widget>
448 <spacer> 448 <spacer>
449 <property> 449 <property>
450 <name>name</name> 450 <name>name</name>
451 <cstring>Spacer2</cstring> 451 <cstring>Spacer2</cstring>
452 </property> 452 </property>
453 <property stdset="1"> 453 <property stdset="1">
454 <name>orientation</name> 454 <name>orientation</name>
455 <enum>Horizontal</enum> 455 <enum>Horizontal</enum>
456 </property> 456 </property>
457 <property stdset="1"> 457 <property stdset="1">
458 <name>sizeType</name> 458 <name>sizeType</name>
459 <enum>Expanding</enum> 459 <enum>Expanding</enum>
460 </property> 460 </property>
461 <property> 461 <property>
462 <name>sizeHint</name> 462 <name>sizeHint</name>
463 <size> 463 <size>
464 <width>20</width> 464 <width>20</width>
465 <height>20</height> 465 <height>20</height>
466 </size> 466 </size>
467 </property> 467 </property>
468 </spacer> 468 </spacer>
469 </hbox> 469 </hbox>
470 </widget> 470 </widget>
471 <widget row="1" column="0" rowspan="1" colspan="2" > 471 <widget row="1" column="0" rowspan="1" colspan="2" >
472 <class>QListBox</class> 472 <class>QListBox</class>
473 <property stdset="1"> 473 <property stdset="1">
474 <name>name</name> 474 <name>name</name>