summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg') (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
@@ -53,6 +53,7 @@ NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
+ showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
#endif
@@ -124,17 +125,21 @@ void NetworkPackageManager :: initGui()
QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" );
QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" );
- char text[2];
- text[1] = '\0';
- for ( int i = 0 ; i < 26 ; ++i )
- {
- text[0] = 'A' + i;
- LetterPushButton *b = new LetterPushButton( text, this );
- connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) );
- if ( i < 16 )
- hbox3->addWidget( b );
- else
- hbox4->addWidget( b );
+
+ if ( showJumpTo )
+ {
+ char text[2];
+ text[1] = '\0';
+ for ( int i = 0 ; i < 26 ; ++i )
+ {
+ text[0] = 'A' + i;
+ LetterPushButton *b = new LetterPushButton( text, this );
+ connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) );
+ if ( i < 16 )
+ hbox3->addWidget( b );
+ else
+ hbox4->addWidget( b );
+ }
}
vbox->addWidget( packagesList );
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
@@ -53,6 +53,7 @@ private:
ProgressDlg *progressDlg;
QString currentlySelectedServer;
+ bool showJumpTo;
int timerId;
void timerEvent ( QTimerEvent * );
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
@@ -66,8 +66,8 @@ void SettingsImpl :: setupData()
vector<Server>::iterator it;
for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it )
{
- if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS )
- continue;
+ if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS )
+ continue;
servers->insertItem( it->getServerName() );
}
@@ -77,6 +77,13 @@ void SettingsImpl :: setupData()
for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 )
destinations->insertItem( it2->getDestinationName() );
+#ifdef QWS
+ Config cfg( "aqpkg" );
+ cfg.setGroup( "settings" );
+ jumpTo->setChecked( cfg.readBoolEntry( "showJumpTo", "true" ) );
+#else
+ jumpTo->setChecked( true );
+#endif
}
//------------------ Servers tab ----------------------
@@ -224,3 +231,15 @@ void SettingsImpl :: changeDestinationDetails()
#endif
}
}
+
+//------------------ General tab ----------------------
+
+void SettingsImpl :: toggleJumpTo( bool val )
+{
+#ifdef QWS
+ Config cfg( "aqpkg" );
+ cfg.setGroup( "settings" );
+ cfg.writeEntry( "showJumpTo", val );
+#endif
+}
+
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
@@ -49,4 +49,6 @@ private:
void changeDestinationDetails();
void newDestination();
void removeDestination();
+
+ void toggleJumpTo( bool val );
};