summaryrefslogtreecommitdiff
path: root/noncore
authorandyq <andyq>2002-10-18 22:40:08 (UTC)
committer andyq <andyq>2002-10-18 22:40:08 (UTC)
commitf899c1a0d216a1197c947a533d82085a02fed259 (patch) (unidiff)
treed0bf68d5fbf2021acc35973978e063cb6a8a5906 /noncore
parenteea247f2664f0c70247399b2f4d969ddb00df7ba (diff)
downloadopie-f899c1a0d216a1197c947a533d82085a02fed259.zip
opie-f899c1a0d216a1197c947a533d82085a02fed259.tar.gz
opie-f899c1a0d216a1197c947a533d82085a02fed259.tar.bz2
Added option to settings to show or hide Jump To letters
Diffstat (limited to 'noncore') (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
@@ -55,2 +55,3 @@ NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget
55 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); 55 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
56 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
56#endif 57#endif
@@ -126,13 +127,17 @@ void NetworkPackageManager :: initGui()
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 }
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
@@ -55,2 +55,3 @@ private:
55 55
56 bool showJumpTo;
56 int timerId; 57 int timerId;
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
@@ -68,4 +68,4 @@ void SettingsImpl :: setupData()
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
@@ -79,2 +79,9 @@ void SettingsImpl :: setupData()
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}
@@ -226 +233,13 @@ void SettingsImpl :: changeDestinationDetails()
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
@@ -51,2 +51,4 @@ private:
51 void removeDestination(); 51 void removeDestination();
52
53 void toggleJumpTo( bool val );
52}; 54};