summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/settingsimpl.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 9ee3a33..a18a178 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -57,35 +57,42 @@ bool SettingsImpl :: showDlg( int i )
57 if ( changed ) 57 if ( changed )
58 dataMgr->writeOutIpkgConf(); 58 dataMgr->writeOutIpkgConf();
59 59
60 return changed; 60 return changed;
61} 61}
62 62
63void SettingsImpl :: setupData() 63void SettingsImpl :: setupData()
64{ 64{
65 // add servers 65 // add servers
66 vector<Server>::iterator it; 66 vector<Server>::iterator it;
67 for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it ) 67 for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it )
68 { 68 {
69 if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS ) 69 if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS )
70 continue; 70 continue;
71 71
72 servers->insertItem( it->getServerName() ); 72 servers->insertItem( it->getServerName() );
73 } 73 }
74 74
75 // add destinations 75 // add destinations
76 vector<Destination>::iterator it2; 76 vector<Destination>::iterator it2;
77 for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 ) 77 for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 )
78 destinations->insertItem( it2->getDestinationName() ); 78 destinations->insertItem( it2->getDestinationName() );
79 79
80#ifdef QWS
81 Config cfg( "aqpkg" );
82 cfg.setGroup( "settings" );
83 jumpTo->setChecked( cfg.readBoolEntry( "showJumpTo", "true" ) );
84#else
85 jumpTo->setChecked( true );
86#endif
80} 87}
81 88
82//------------------ Servers tab ---------------------- 89//------------------ Servers tab ----------------------
83 90
84void SettingsImpl :: editServer( int sel ) 91void SettingsImpl :: editServer( int sel )
85{ 92{
86 currentSelectedServer = sel; 93 currentSelectedServer = sel;
87 Server *s = dataMgr->getServer( servers->currentText() ); 94 Server *s = dataMgr->getServer( servers->currentText() );
88 serverName = s->getServerName(); 95 serverName = s->getServerName();
89 servername->setText( s->getServerName() ); 96 servername->setText( s->getServerName() );
90 serverurl->setText( s->getServerUrl() ); 97 serverurl->setText( s->getServerUrl() );
91 active->setChecked( s->isServerActive() ); 98 active->setChecked( s->isServerActive() );
@@ -215,12 +222,24 @@ void SettingsImpl :: changeDestinationDetails()
215 dataMgr->getDestinationList().push_back( Destination( newName, destinationurl->text() ) ); 222 dataMgr->getDestinationList().push_back( Destination( newName, destinationurl->text() ) );
216 destinations->insertItem( newName ); 223 destinations->insertItem( newName );
217 destinations->setCurrentItem( destinations->count() ); 224 destinations->setCurrentItem( destinations->count() );
218 newdestination = false; 225 newdestination = false;
219 226
220#ifdef QWS 227#ifdef QWS
221 QString key = newName; 228 QString key = newName;
222 key += "_linkToRoot"; 229 key += "_linkToRoot";
223 cfg.writeEntry( key, true ); 230 cfg.writeEntry( key, true );
224#endif 231#endif
225 } 232 }
226} 233}
234
235//------------------ General tab ----------------------
236
237void SettingsImpl :: toggleJumpTo( bool val )
238{
239#ifdef QWS
240 Config cfg( "aqpkg" );
241 cfg.setGroup( "settings" );
242 cfg.writeEntry( "showJumpTo", val );
243#endif
244}
245