summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp27
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.h1
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp23
-rw-r--r--noncore/settings/aqpkg/settingsimpl.h2
4 files changed, 40 insertions, 13 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index ed5bf75..3aee7bd 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -50,12 +50,13 @@ NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget
50 50
51#ifdef QWS 51#ifdef QWS
52 // read download directory from config file 52 // read download directory from config file
53 Config cfg( "aqpkg" ); 53 Config cfg( "aqpkg" );
54 cfg.setGroup( "settings" ); 54 cfg.setGroup( "settings" );
55 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); 55 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
56 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
56#endif 57#endif
57 58
58 59
59 initGui(); 60 initGui();
60 setupConnections(); 61 setupConnections();
61 62
@@ -121,23 +122,27 @@ void NetworkPackageManager :: initGui()
121 hbox1->addWidget( l ); 122 hbox1->addWidget( l );
122 hbox1->addWidget( serversList ); 123 hbox1->addWidget( serversList );
123 124
124 QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); 125 QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" );
125 QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); 126 QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" );
126 127
127 char text[2]; 128
128 text[1] = '\0'; 129 if ( showJumpTo )
129 for ( int i = 0 ; i < 26 ; ++i ) 130 {
130 { 131 char text[2];
131 text[0] = 'A' + i; 132 text[1] = '\0';
132 LetterPushButton *b = new LetterPushButton( text, this ); 133 for ( int i = 0 ; i < 26 ; ++i )
133 connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); 134 {
134 if ( i < 16 ) 135 text[0] = 'A' + i;
135 hbox3->addWidget( b ); 136 LetterPushButton *b = new LetterPushButton( text, this );
136 else 137 connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) );
137 hbox4->addWidget( b ); 138 if ( i < 16 )
139 hbox3->addWidget( b );
140 else
141 hbox4->addWidget( b );
142 }
138 } 143 }
139 144
140 vbox->addWidget( packagesList ); 145 vbox->addWidget( packagesList );
141 packagesList->addColumn( "Packages" ); 146 packagesList->addColumn( "Packages" );
142 147
143 QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); 148 QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" );
diff --git a/noncore/settings/aqpkg/networkpkgmgr.h b/noncore/settings/aqpkg/networkpkgmgr.h
index 7efa42c..fba8155 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.h
+++ b/noncore/settings/aqpkg/networkpkgmgr.h
@@ -50,12 +50,13 @@ private:
50 QPushButton *download; 50 QPushButton *download;
51 QPushButton *apply; 51 QPushButton *apply;
52 52
53 ProgressDlg *progressDlg; 53 ProgressDlg *progressDlg;
54 QString currentlySelectedServer; 54 QString currentlySelectedServer;
55 55
56 bool showJumpTo;
56 int timerId; 57 int timerId;
57 58
58 void timerEvent ( QTimerEvent * ); 59 void timerEvent ( QTimerEvent * );
59 60
60 void initGui(); 61 void initGui();
61 void setupConnections(); 62 void setupConnections();
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
@@ -63,23 +63,30 @@ bool SettingsImpl :: showDlg( int i )
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{
@@ -221,6 +228,18 @@ void SettingsImpl :: changeDestinationDetails()
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
diff --git a/noncore/settings/aqpkg/settingsimpl.h b/noncore/settings/aqpkg/settingsimpl.h
index bc231a1..971516b 100644
--- a/noncore/settings/aqpkg/settingsimpl.h
+++ b/noncore/settings/aqpkg/settingsimpl.h
@@ -46,7 +46,9 @@ private:
46 void removeServer(); 46 void removeServer();
47 47
48 void editDestination( int s ); 48 void editDestination( int s );
49 void changeDestinationDetails(); 49 void changeDestinationDetails();
50 void newDestination(); 50 void newDestination();
51 void removeDestination(); 51 void removeDestination();
52
53 void toggleJumpTo( bool val );
52}; 54};