ConfigurationDialog.cpp   ConfigurationDialog.cpp 
skipping to change at line 23 skipping to change at line 23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "Dialog.hpp" #include "Dialog.hpp"
#include "ConfigurationDialog.hpp" #include "ConfigurationDialog.hpp"
#include "CustomInfoDialog.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelMainWindow.hpp" #include "StelMainWindow.hpp"
#include "ui_configurationDialog.h" #include "ui_configurationDialog.h"
#include "StelAppGraphicsWidget.hpp" #include "StelAppGraphicsWidget.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelObjectMgr.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
skipping to change at line 65 skipping to change at line 67
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include <QSettings> #include <QSettings>
#include <QDebug> #include <QDebug>
#include <QFile> #include <QFile>
#include <QFileDialog> #include <QFileDialog>
ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NUL L), gui(agui) ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NUL L), gui(agui)
{ {
ui = new Ui_configurationDialogForm; ui = new Ui_configurationDialogForm;
customInfoDialog = NULL;
hasDownloadedStarCatalog = false; hasDownloadedStarCatalog = false;
isDownloadingStarCatalog = false; isDownloadingStarCatalog = false;
savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType(); savedProjectionType = StelApp::getInstance().getCore()->getCurrentPr ojectionType();
} }
ConfigurationDialog::~ConfigurationDialog() ConfigurationDialog::~ConfigurationDialog()
{ {
delete ui; delete ui;
ui=NULL;
delete customInfoDialog;
customInfoDialog = NULL;
} }
void ConfigurationDialog::retranslate() void ConfigurationDialog::retranslate()
{ {
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
//Hack to shrink the tabs to optimal size after language cha nge //Hack to shrink the tabs to optimal size after language cha nge
//by causing the list items to be laid out again. //by causing the list items to be laid out again.
ui->stackListWidget->setWrapping(false); ui->stackListWidget->setWrapping(false);
skipping to change at line 148 skipping to change at line 154
cb->setCurrentIndex(lt); cb->setCurrentIndex(lt);
connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&))); connect(cb, SIGNAL(currentIndexChanged(const QString&)), this, SLOT( selectLanguage(const QString&)));
connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars())); connect(ui->getStarsButton, SIGNAL(clicked()), this, SLOT(downloadSt ars()));
connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload())); connect(ui->downloadCancelButton, SIGNAL(clicked()), this, SLOT(canc elDownload()));
connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars())); connect(ui->downloadRetryButton, SIGNAL(clicked()), this, SLOT(downl oadStars()));
resetStarCatalogControls(); resetStarCatalogControls();
// Selected object info // Selected object info
if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0) if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
{
ui->noSelectedInfoRadio->setChecked(true); ui->noSelectedInfoRadio->setChecked(true);
ui->pushButtonCustomInfoDialog->setEnabled(false);
}
else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St elObject::ShortInfo)) else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St elObject::ShortInfo))
{
ui->briefSelectedInfoRadio->setChecked(true); ui->briefSelectedInfoRadio->setChecked(true);
else ui->pushButtonCustomInfoDialog->setEnabled(false);
}
else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St
elObject::AllInfo))
{
ui->allSelectedInfoRadio->setChecked(true); ui->allSelectedInfoRadio->setChecked(true);
ui->pushButtonCustomInfoDialog->setEnabled(false);
}
else
{
ui->customSelectedInfoRadio->setChecked(true);
ui->pushButtonCustomInfoDialog->setEnabled(true);
}
connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setN oSelectedInfo())); connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setN oSelectedInfo()));
connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(set AllSelectedInfo())); connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(set AllSelectedInfo()));
connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(s etBriefSelectedInfo())); connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(s etBriefSelectedInfo()));
connect(ui->customSelectedInfoRadio, SIGNAL(released()), this, SLOT(
setCustomSelectedInfo()));
connect(ui->pushButtonCustomInfoDialog, SIGNAL(clicked()), this, SLO
T(showCustomInfoDialog()));
// Navigation tab // Navigation tab
// Startup time // Startup time
if (core->getStartupTimeMode()=="actual") if (core->getStartupTimeMode()=="actual")
ui->systemTimeRadio->setChecked(true); ui->systemTimeRadio->setChecked(true);
else if (core->getStartupTimeMode()=="today") else if (core->getStartupTimeMode()=="today")
ui->todayRadio->setChecked(true); ui->todayRadio->setChecked(true);
else else
ui->fixedTimeRadio->setChecked(true); ui->fixedTimeRadio->setChecked(true);
connect(ui->systemTimeRadio, SIGNAL(clicked(bool)), this, SLOT(setSt artupTimeMode())); connect(ui->systemTimeRadio, SIGNAL(clicked(bool)), this, SLOT(setSt artupTimeMode()));
skipping to change at line 290 skipping to change at line 314
else else
{ {
core->setCurrentProjectionType((StelCore::ProjectionType)sav edProjectionType); core->setCurrentProjectionType((StelCore::ProjectionType)sav edProjectionType);
StelMainGraphicsView::getInstance().getStelAppGraphicsWidget ()->setViewportEffect("none"); StelMainGraphicsView::getInstance().getStelAppGraphicsWidget ()->setViewportEffect("none");
} }
} }
void ConfigurationDialog::setNoSelectedInfo(void) void ConfigurationDialog::setNoSelectedInfo(void)
{ {
gui->setInfoTextFilters(StelObject::InfoStringGroup(0)); gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
ui->pushButtonCustomInfoDialog->setEnabled(false);
} }
void ConfigurationDialog::setAllSelectedInfo(void) void ConfigurationDialog::setAllSelectedInfo(void)
{ {
gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllI nfo)); gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllI nfo));
ui->pushButtonCustomInfoDialog->setEnabled(false);
} }
void ConfigurationDialog::setBriefSelectedInfo(void) void ConfigurationDialog::setBriefSelectedInfo(void)
{ {
gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::Shor tInfo)); gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::Shor tInfo));
ui->pushButtonCustomInfoDialog->setEnabled(false);
}
void ConfigurationDialog::setCustomSelectedInfo(void)
{
gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInst
ance().getStelObjectMgr().getCustomInfoString()));
ui->pushButtonCustomInfoDialog->setEnabled(true);
} }
void ConfigurationDialog::cursorTimeOutChanged() void ConfigurationDialog::cursorTimeOutChanged()
{ {
StelMainGraphicsView::getInstance().setFlagCursorTimeout(ui->mouseTi meoutCheckbox->isChecked()); StelMainGraphicsView::getInstance().setFlagCursorTimeout(ui->mouseTi meoutCheckbox->isChecked());
StelMainGraphicsView::getInstance().setCursorTimeout(ui->mouseTimeou tSpinBox->value()); StelMainGraphicsView::getInstance().setCursorTimeout(ui->mouseTimeou tSpinBox->value());
} }
void ConfigurationDialog::browseForScreenshotDir() void ConfigurationDialog::browseForScreenshotDir()
{ {
QString oldScreenshorDir = StelFileMgr::getScreenshotDir(); QString oldScreenshorDir = StelFileMgr::getScreenshotDir();
#ifdef Q_OS_MAC
//work-around for Qt bug - http://bugreports.qt.nokia.com/browse/QT
BUG-16722
QString newScreenshotDir = QFileDialog::getExistingDirectory(NULL, q
_("Select screenshot directory"), oldScreenshorDir, QFileDialog::DontUseNat
iveDialog);
#else
QString newScreenshotDir = QFileDialog::getExistingDirectory(NULL, q _("Select screenshot directory"), oldScreenshorDir, QFileDialog::ShowDirsOn ly); QString newScreenshotDir = QFileDialog::getExistingDirectory(NULL, q _("Select screenshot directory"), oldScreenshorDir, QFileDialog::ShowDirsOn ly);
#endif
if (!newScreenshotDir.isEmpty()) { if (!newScreenshotDir.isEmpty()) {
// remove trailing slash // remove trailing slash
if (newScreenshotDir.right(1) == "/") if (newScreenshotDir.right(1) == "/")
newScreenshotDir = newScreenshotDir.left(newScreensh otDir.length()-1); newScreenshotDir = newScreenshotDir.left(newScreensh otDir.length()-1);
ui->screenshotDirEdit->setText(newScreenshotDir); ui->screenshotDirEdit->setText(newScreenshotDir);
} }
} }
skipping to change at line 388 skipping to change at line 416
conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits()); conf->setValue("astro/flag_planets_orbits", ssmgr->getFlagOrbits());
conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime()); conf->setValue("astro/flag_light_travel_time", ssmgr->getFlagLightTr avelTime());
conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() ); conf->setValue("viewing/flag_moon_scaled", ssmgr->getFlagMoonScale() );
conf->setValue("astro/meteor_rate", mmgr->getZHR()); conf->setValue("astro/meteor_rate", mmgr->getZHR());
// view dialog / markings tab settings // view dialog / markings tab settings
conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid()); conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimutha lGrid());
conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid()); conf->setValue("viewing/flag_equatorial_grid", glmgr->getFlagEquator Grid());
conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e()); conf->setValue("viewing/flag_equator_line", glmgr->getFlagEquatorLin e());
conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine()); conf->setValue("viewing/flag_ecliptic_line", glmgr->getFlagEclipticL ine());
conf->setValue("viewing/flag_ecliptic_J2000_grid", glmgr->getFlagEcl ipticJ2000Grid());
conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine()); conf->setValue("viewing/flag_meridian_line", glmgr->getFlagMeridianL ine());
conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e()); conf->setValue("viewing/flag_horizon_line", glmgr->getFlagHorizonLin e());
conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid()); conf->setValue("viewing/flag_equatorial_J2000_grid", glmgr->getFlagE quatorJ2000Grid());
conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid()); conf->setValue("viewing/flag_galactic_grid", glmgr->getFlagGalacticG rid());
conf->setValue("viewing/flag_galactic_plane_line", glmgr->getFlagGal acticPlaneLine()); conf->setValue("viewing/flag_galactic_plane_line", glmgr->getFlagGal acticPlaneLine());
conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints()); conf->setValue("viewing/flag_cardinal_points", lmgr->getFlagCardinal sPoints());
conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes()); conf->setValue("viewing/flag_constellation_drawing", cmgr->getFlagLi nes());
conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s()); conf->setValue("viewing/flag_constellation_name", cmgr->getFlagLabel s());
conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries()); conf->setValue("viewing/flag_constellation_boundaries", cmgr->getFla gBoundaries());
conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ; conf->setValue("viewing/flag_constellation_art", cmgr->getFlagArt()) ;
skipping to change at line 416 skipping to change at line 445
conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints()); conf->setValue("astro/flag_nebula_name", nmgr->getFlagHints());
conf->setValue("projection/type", core->getCurrentProjectionTypeKey( )); conf->setValue("projection/type", core->getCurrentProjectionTypeKey( ));
// view dialog / landscape tab settings // view dialog / landscape tab settings
lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID()); lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID());
conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation()); conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation());
conf->setValue("landscape/flag_landscape", lmgr->getFlagLandscape()) ; conf->setValue("landscape/flag_landscape", lmgr->getFlagLandscape()) ;
conf->setValue("landscape/flag_atmosphere", lmgr->getFlagAtmosphere( )); conf->setValue("landscape/flag_atmosphere", lmgr->getFlagAtmosphere( ));
conf->setValue("landscape/flag_fog", lmgr->getFlagFog()); conf->setValue("landscape/flag_fog", lmgr->getFlagFog());
conf->setValue("stars/init_bortle_scale", core->getSkyDrawer()->getB ortleScale()); conf->setValue("stars/init_bortle_scale", core->getSkyDrawer()->getB ortleScale());
conf->setValue("landscape/atmospheric_extinction_coefficient", core
->getSkyDrawer()->getExtinctionCoefficient());
conf->setValue("landscape/pressure_mbar", core->getSkyDrawer()->get
AtmospherePressure());
conf->setValue("landscape/temperature_C", core->getSkyDrawer()->get
AtmosphereTemperature());
// view dialog / starlore tab // view dialog / starlore tab
StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID()); StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID());
// Save default location // Save default location
StelApp::getInstance().getCore()->setDefaultLocationID(core->getCurr entLocation().getID()); StelApp::getInstance().getCore()->setDefaultLocationID(core->getCurr entLocation().getID());
// configuration dialog / main tab // configuration dialog / main tab
QString langName = StelApp::getInstance().getLocaleMgr().getAppLangu age(); QString langName = StelApp::getInstance().getLocaleMgr().getAppLangu age();
conf->setValue("localization/app_locale", StelTranslator::nativeName ToIso639_1Code(langName)); conf->setValue("localization/app_locale", StelTranslator::nativeName ToIso639_1Code(langName));
langName = StelApp::getInstance().getLocaleMgr().getSkyLanguage(); langName = StelApp::getInstance().getLocaleMgr().getSkyLanguage();
conf->setValue("localization/sky_locale", StelTranslator::nativeName ToIso639_1Code(langName)); conf->setValue("localization/sky_locale", StelTranslator::nativeName ToIso639_1Code(langName));
if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0) if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
conf->setValue("gui/selected_object_info", "none"); conf->setValue("gui/selected_object_info", "none");
else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St elObject::ShortInfo)) else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St elObject::ShortInfo))
conf->setValue("gui/selected_object_info", "short"); conf->setValue("gui/selected_object_info", "short");
else else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(St elObject::AllInfo))
conf->setValue("gui/selected_object_info", "all"); conf->setValue("gui/selected_object_info", "all");
else
conf->setValue("gui/selected_object_info", "custom");
// toolbar auto-hide status // toolbar auto-hide status
conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideH orizontalButtonBar()); conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideH orizontalButtonBar());
conf->setValue("gui/auto_hide_vertical_toolbar", gui->getAutoHideVer ticalButtonBar()); conf->setValue("gui/auto_hide_vertical_toolbar", gui->getAutoHideVer ticalButtonBar());
mvmgr->setInitFov(mvmgr->getCurrentFov()); mvmgr->setInitFov(mvmgr->getCurrentFov());
mvmgr->setInitViewDirectionToCurrent(); mvmgr->setInitViewDirectionToCurrent();
// configuration dialog / navigation tab // configuration dialog / navigation tab
conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys()); conf->setValue("navigation/flag_enable_zoom_keys", mvmgr->getFlagEna bleZoomKeys());
skipping to change at line 534 skipping to change at line 568
void ConfigurationDialog::pluginsSelectionChanged(const QString& s) void ConfigurationDialog::pluginsSelectionChanged(const QString& s)
{ {
const QList<StelModuleMgr::PluginDescriptor> pluginsList = StelApp:: getInstance().getModuleMgr().getPluginsList(); const QList<StelModuleMgr::PluginDescriptor> pluginsList = StelApp:: getInstance().getModuleMgr().getPluginsList();
foreach (const StelModuleMgr::PluginDescriptor& desc, pluginsList) foreach (const StelModuleMgr::PluginDescriptor& desc, pluginsList)
{ {
if (s==q_(desc.info.displayedName))//TODO: Use ID! if (s==q_(desc.info.displayedName))//TODO: Use ID!
{ {
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_(desc.info.displayedName) + "</h2 >"; html += "<h2>" + q_(desc.info.displayedName) + "</h2 >";
html += "<h3>" + q_("Authors") + ": " + desc.info.au thors + "</h3>";
QString d = desc.info.description; QString d = desc.info.description;
d.replace("\n", "<br />"); d.replace("\n", "<br />");
html += "<p>" + q_(d) + "</p>"; html += "<p>" + q_(d) + "</p>";
html += "<h3>" + q_("Contact") + ": " + desc.info.co html += "<p><strong>" + q_("Authors") + "</strong>:
ntact + "</h3>"; " + desc.info.authors;
html += "</body></html>"; html += "<br /><strong>" + q_("Contact") + "</strong
>: " + desc.info.contact;
html += "</p></body></html>";
ui->pluginsInfoBrowser->setHtml(html); ui->pluginsInfoBrowser->setHtml(html);
ui->pluginLoadAtStartupCheckBox->setChecked(desc.loa dAtStartup); ui->pluginLoadAtStartupCheckBox->setChecked(desc.loa dAtStartup);
StelModule* pmod = StelApp::getInstance().getModuleM gr().getModule(desc.info.id, true); StelModule* pmod = StelApp::getInstance().getModuleM gr().getModule(desc.info.id, true);
if (pmod != NULL) if (pmod != NULL)
ui->pluginConfigureButton->setEnabled(pmod-> configureGui(false)); ui->pluginConfigureButton->setEnabled(pmod-> configureGui(false));
else else
ui->pluginConfigureButton->setEnabled(false) ; ui->pluginConfigureButton->setEnabled(false) ;
return; return;
} }
} }
skipping to change at line 614 skipping to change at line 648
} }
void ConfigurationDialog::scriptSelectionChanged(const QString& s) void ConfigurationDialog::scriptSelectionChanged(const QString& s)
{ {
if (s.isEmpty()) if (s.isEmpty())
return; return;
StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr(); StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr();
//ui->scriptInfoBrowser->document()->setDefaultStyleSheet(QString(St elApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); //ui->scriptInfoBrowser->document()->setDefaultStyleSheet(QString(St elApp::getInstance().getCurrentStelStyle()->htmlStyleSheet));
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_(scriptMgr.getName(s).trimmed()) + "</h2>"; html += "<h2>" + q_(scriptMgr.getName(s).trimmed()) + "</h2>";
QString d = scriptMgr.getDescription(s).trimmed();
d.replace("\n", "<br />");
d.replace(QRegExp("\\s{2,}"), " ");
html += "<p>" + q_(d) + "</p>";
html += "<p>";
if (!scriptMgr.getAuthor(s).trimmed().isEmpty()) if (!scriptMgr.getAuthor(s).trimmed().isEmpty())
{ {
html += "<h3>" + q_("Author") + ": " + scriptMgr.getAuthor(s ) + "</h3>"; html += "<strong>" + q_("Author") + "</strong>: " + scriptMg r.getAuthor(s) + "<br />";
} }
if (!scriptMgr.getLicense(s).trimmed().isEmpty()) if (!scriptMgr.getLicense(s).trimmed().isEmpty())
{ {
html += "<h3>" + q_("License") + ": " + scriptMgr.getLicense (s) + "</h3>"; html += "<strong>" + q_("License") + "</strong>: " + scriptM gr.getLicense(s);
} }
QString d = scriptMgr.getDescription(s).trimmed(); html += "</p></body></html>";
d.replace("\n", "<br />");
d.replace(QRegExp("\\s{2,}"), " ");
html += "<p>" + q_(d) + "</p>";
html += "</body></html>";
ui->scriptInfoBrowser->setHtml(html); ui->scriptInfoBrowser->setHtml(html);
} }
void ConfigurationDialog::runScriptClicked(void) void ConfigurationDialog::runScriptClicked(void)
{ {
if (ui->closeWindowAtScriptRunCheckbox->isChecked()) if (ui->closeWindowAtScriptRunCheckbox->isChecked())
this->close(); this->close();
StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr(); StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr();
if (ui->scriptListWidget->currentItem()) if (ui->scriptListWidget->currentItem())
{ {
skipping to change at line 894 skipping to change at line 929
ui->downloadCancelButton->setVisible(false); ui->downloadCancelButton->setVisible(false);
ui->downloadRetryButton->setVisible(true); ui->downloadRetryButton->setVisible(true);
} }
else else
{ {
hasDownloadedStarCatalog = true; hasDownloadedStarCatalog = true;
} }
resetStarCatalogControls(); resetStarCatalogControls();
} }
void ConfigurationDialog::showCustomInfoDialog()
{
if(customInfoDialog == NULL)
customInfoDialog = new CustomInfoDialog();
customInfoDialog->setVisible(true);
}
 End of changes. 26 change blocks. 
21 lines changed or deleted 61 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/