Commit c4e0ba35 authored by nobody's avatar nobody

This commit was manufactured by cvs2svn to create tag

'KDE_3_1_1_RELEASE'.

svn path=/tags/KDE_3_1_1_RELEASE/kdeedu/kstars/; revision=218032
parents 4a918643 41ede018
......@@ -41,7 +41,7 @@
AstroCalc::AstroCalc( QWidget* parent ) :
KDialogBase( parent, "starscalculator", true,
i18n("KStars Calculator"), Ok | Cancel ) {
i18n("KStars Calculator"), Close ) {
split = new QSplitter ( this );
setMainWidget(split);
......
......@@ -1242,7 +1242,7 @@ Lewiston : New York : USA
Lewistown : Montana : USA : 47 : 4 : 58 : N : 109 : 25 : 1 : W : -7.0 : US
Lexington : Kentucky : USA : 38 : 2 : 49 : N : 84 : 29 : 45 : W : -5.0 : US
Leopold Figl : : Austria : 48 : 5 : 0 : N : 15 : 25 : 30 : E : 1.0 : EU
Lhasa : : Tibet : 29 : 40 : 59 : N : 91 : 12 : 0 : E : 8.0 : CH
Lhasa : Tibet : China : 29 : 40 : 59 : N : 91 : 12 : 0 : E : 8.0 : CH
Libreville : : Gabon : 0 : 36 : 0 : N : 9 : 18 : 0 : E : 1.0 : --
Lihue : Hawaii : USA : 21 : 58 : 48 : N : 159 : 22 : 30 : W :-10.0 : US
Lima : Ohio : USA : 40 : 44 : 34 : N : 84 : 6 : 19 : W : -5.0 : US
......
......@@ -1479,7 +1479,7 @@
1496 PER 04 04 31.8 +52 39 41 3 II1p 9.6 6.00
1497 TAU 04 02 06.8 +23 07 58 8 S0 14.3 1.80 1.2 60 14331 2929
1498 ERI 04 00 19.4 -12 01 12 0 *3
1499 PER 04 03 14.4 +36 22 03 5 EN 5.0 160.00 40.0 California Nebula
1499 PER 04 03 14.4 +36 22 03 5 EN 5.0 160.00 40.0 California Nebula
1500 DOR 03 58 14.0 -52 19 44 8 E 14.7 1.10 0.9 14187
1501 CAM 04 06 59.4 +60 55 15 6 PN 13.3 0.87
1502 CAM 04 07 49.2 +62 19 54 3 II3p 6.9 8.00
......@@ -6908,7 +6908,7 @@
6997 CYG 20 56 39.0 +44 37 54 3 III2 10.0 7.00
6998 MIC 21 01 37.7 -28 01 56 8 E 15.2 0.70 0.7 65925
6999 MIC 21 01 59.6 -28 03 34 8 S0 15.0 0.90 0.7 65940
7000 CYG 21 59 00.0 +44 31 00 5 EN 4.0 120.00 30.0 North American Nebula
7000 CYG 20 58 48.0 +44 20 00 5 EN 4.0 120.00 100.0 North American Nebula
7001 AQR 21 01 07.7 -00 11 43 8 Sab 14.3 1.40 1.1 162 65905 11663
7002 IND 21 03 45.0 -49 01 47 8 E 13.4 1.50 1.2 3 66009
7003 DEL 21 00 42.3 +17 48 15 8 Sb-c 13.8 1.10 0.8 120 65887 11662
......@@ -91,7 +91,6 @@ KStars::KStars( KStarsData* kd )
KStars::~KStars()
{
kdDebug() << "in kstars destructor..." << endl;
saveOptions();
clearCachedFindDialog();
......
......@@ -22,9 +22,15 @@
void KStars::loadOptions()
{
KConfig *conf = kapp->config();
//Check if kstarsrc exists. If not, we are using default options (need to know for setting initial focus point)
if ( conf->hasGroup( "Location" ) ) useDefaultOptions = false;
else useDefaultOptions = true;
//Check if kstarsrc exists. If not, we are using default options
//(need to know for setting initial focus point).
//We used to use hasGroup() here, but I have reason to suspect that this
//this causes a crash on some systems (see bug #44869). At Kevin
//Krammer's suggestion, using findResource("kstarsrc") instead.
//if ( conf->hasGroup( "Location" ) ) useDefaultOptions = false;
//else useDefaultOptions = true;
if ( data()->stdDirs->findResource( "config", "kstarsrc" ).isNull() ) useDefaultOptions = true;
else useDefaultOptions = false;
// Get initial Location from config()
conf->setGroup( "Location" );
......
......@@ -304,7 +304,7 @@ void KStars::initActions() {
void KStars::initStatusBar() {
statusBar()->insertItem( i18n( " Welcome to KStars " ), 0, 1, true );
statusBar()->setItemAlignment( 0, AlignLeft | AlignVCenter );
QString s = "00:00:00, +00:00:00";
QString s = "00h 00m 00s, +00d 00\'00\"";
statusBar()->insertItem( s, 1, 1, true );
statusBar()->setItemAlignment( 1, AlignRight | AlignVCenter );
......@@ -366,10 +366,33 @@ void KStars::datainitFinished(bool worked) {
pd->buildGUI();
updateTime();
clock->start();
show();
//Check whether initial position is below the horizon.
//We sued to just call slotCenter() in buildGUI() which performs this check.
//However, on a Gentoo system, if the messagebox is shown before show() is called,
//the program exits. It does not crash (at least there are no error messages),
//it simply exits. Very strange.
if ( options()->useAltAz && options()->drawGround &&
map()->focus()->alt().Degrees() < -1.0 ) {
QString caption = i18n( "Initial Position is Below Horizon" );
QString message = i18n( "The initial position is below the horizon.\nWould you like to reset to the default position?" );
if ( KMessageBox::warningYesNo( this, message, caption,
KStdGuiItem::yes(), KStdGuiItem::no(), "dag_start_below_horiz" ) == KMessageBox::Yes ) {
map()->setClickedObject( NULL );
map()->setFoundObject( NULL );
options()->isTracking = false;
options()->setSnapNextFocus(true);
SkyPoint DefaultFocus;
DefaultFocus.setAz( 180.0 );
DefaultFocus.setAlt( 45.0 );
DefaultFocus.HorizontalToEquatorial( LSTh(), geo()->lat() );
map()->setDestination( &DefaultFocus );
}
}
// just show dialog if option is set (don't force it)
KTipDialog::showTip( "kstars/tips" );
}
......@@ -493,21 +516,22 @@ void KStars::privatedata::buildGUI() {
}
}
ks->map()->slotCenter();
// ks->map()->slotCenter();
} else {
ks->map()->setClickedPoint( &newPoint );
ks->map()->slotCenter();
// ks->map()->slotCenter();
}
ks->map()->setDestination( ks->map()->clickedPoint() );
ks->map()->destination()->EquatorialToHorizontal( ks->LSTh(), ks->geo()->lat() );
ks->map()->setFocus( ks->map()->destination() );
ks->map()->focus()->EquatorialToHorizontal( ks->LSTh(), ks->geo()->lat() );
ks->map()->destination()->EquatorialToHorizontal( ks->LSTh(), ks->geo()->lat() );
ks->setHourAngle();
ks->map()->setOldFocus( ks->map()->focus() );
ks->map()->oldfocus()->setAz( ks->map()->focus()->az() );
ks->map()->oldfocus()->setAlt( ks->map()->focus()->alt() );
ks->map()->oldfocus()->setAz( ks->map()->focus()->az().Degrees() );
ks->map()->oldfocus()->setAlt( ks->map()->focus()->alt().Degrees() );
kapp->dcopClient()->resume();
......
......@@ -288,6 +288,7 @@ void modCalcDayLength::slotComputePosTime()
{
long double jd0 = computeJdFromCalendar();
getGeoLocation();
KSNumbers * num = new KSNumbers(jd0);
KSSun *Sun = new KSSun((KStars*) parent()->parent()->parent());
......
......@@ -295,7 +295,8 @@ void SkyMap::slotCenter( void ) {
QString caption = i18n( "Requested Position Below Horizon" );
QString message = i18n( "The requested position is below the horizon.\nWould you like to go there anyway?" );
if ( KMessageBox::warningYesNo( 0, message, caption )==KMessageBox::No ) {
if ( KMessageBox::warningYesNo( ksw, message, caption,
KStdGuiItem::yes(), KStdGuiItem::no(), "dag_focus_below_horiz" )==KMessageBox::No ) {
setClickedObject( NULL );
setFoundObject( NULL );
ksw->options()->isTracking = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment