[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Mon Nov 19 00:48:19 CET 2007
SVN commit 738471 by harris:
Startup Wizard fixes:
+ Preselect the correct city in the list
+ Make the GNS dialog appear in front of the wizard
window (to do this, I could not use the KNS::Engine::download()
static function )
CCMAIL: kstars-devel at kde.org
M +9 -2 kswizard.cpp
M +2 -0 kswizard.h
--- trunk/KDE/kdeedu/kstars/kstars/kswizard.cpp #738470:738471
@@ -23,6 +23,7 @@
#include <klineedit.h>
#include <kpushbutton.h>
+#include <knewstuff2/engine.h>
#include "kstars.h"
#include "kstarsdata.h"
@@ -91,7 +92,7 @@
connect( location->CityFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) );
connect( location->ProvinceFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) );
connect( location->CountryFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) );
- connect( download->DownloadButton, SIGNAL( clicked() ), ksw, SLOT( slotDownload() ) );
+ connect( download->DownloadButton, SIGNAL( clicked() ), this, SLOT( slotDownload() ) );
//Disable Back button
enableButton( KDialog::User2, false );
@@ -145,7 +146,7 @@
location->CityListBox->sort();
//preset to current city
- location->CityListBox->setCurrentItem( index + 1 );
+ location->CityListBox->setCurrentItem( index );
}
void KSWizard::slotChangeCity() {
@@ -190,4 +191,10 @@
location->CityListBox->setCurrentItem( location->CityListBox->firstItem() );
}
+void KSWizard::slotDownload() {
+ KNS::Engine engine( this );
+ engine.init( "kstars.knsrc" );
+ KNS::Entry::List entries = engine.downloadDialogModal( this );
+}
+
#include "kswizard.moc"
--- trunk/KDE/kdeedu/kstars/kstars/kswizard.h #738470:738471
@@ -91,6 +91,8 @@
*/
void slotFilterCities();
+ void slotDownload();
+
private:
/**
*@short Initialize the geographic location page.
More information about the Kstars-devel
mailing list