SolarSystemManagerWindow.cpp   SolarSystemManagerWindow.cpp 
skipping to change at line 87 skipping to change at line 87
connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeOb jects())); connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeOb jects()));
connect(ui->pushButtonImportMPC, SIGNAL(clicked()), this, SLOT(newIm portMPC())); connect(ui->pushButtonImportMPC, SIGNAL(clicked()), this, SLOT(newIm portMPC()));
//connect(ui->pushButtonManual, SIGNAL(clicked()), this, SLOT(newImp ortManual())); //connect(ui->pushButtonManual, SIGNAL(clicked()), this, SLOT(newImp ortManual()));
connect(ssEditor, SIGNAL(solarSystemChanged()), this, SLOT(populateS olarSystemList())); connect(ssEditor, SIGNAL(solarSystemChanged()), this, SLOT(populateS olarSystemList()));
connect(ui->pushButtonReset, SIGNAL(clicked()), ssEditor, SLOT(reset SolarSystemToDefault())); connect(ui->pushButtonReset, SIGNAL(clicked()), ssEditor, SLOT(reset SolarSystemToDefault()));
// bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669) // bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669)
connect(ui->listWidgetObjects, SIGNAL(currentRowChanged(int)), ui->l istWidgetObjects, SLOT(repaint())); connect(ui->listWidgetObjects, SIGNAL(currentRowChanged(int)), ui->l istWidgetObjects, SLOT(repaint()));
setAboutHtml();
updateTexts(); updateTexts();
Q_ASSERT(mpcImportWindow); Q_ASSERT(mpcImportWindow);
//Rebuild the list if any planets have been imported //Rebuild the list if any planets have been imported
connect(mpcImportWindow, SIGNAL(objectsImported()), this, SLOT(popul ateSolarSystemList())); connect(mpcImportWindow, SIGNAL(objectsImported()), this, SLOT(popul ateSolarSystemList()));
ui->lineEditUserFilePath->setText(ssEditor->getCustomSolarSystemFile Path()); ui->lineEditUserFilePath->setText(ssEditor->getCustomSolarSystemFile Path());
populateSolarSystemList(); populateSolarSystemList();
} }
void SolarSystemManagerWindow::updateTexts() void SolarSystemManagerWindow::updateTexts()
{ {
//Solar System tab //Solar System tab
// TRANSLATORS: Appears as the text of hyperlinks linking to website s. :) // TRANSLATORS: Appears as the text of hyperlinks linking to website s. :)
QString linkText(q_("website")); QString linkText(q_("website"));
QString linkCode = QString("<a href=\"http://www.minorplanetcenter.n et/\">%1</a>").arg(linkText); QString linkCode = QString("<a href=\"http://www.minorplanetcenter.n et/\">%1</a>").arg(linkText);
// TRANSLATORS: IAU = International Astronomical Union // TRANSLATORS: IAU = International Astronomical Union
QString mpcText(q_("You can import comet and asteroid data formatted in the export formats of the IAU's Minor Planet Center (%1). You can impor t files with lists of objects, download such lists from the Internet or sea rch the online Minor Planet and Comet Ephemeris Service (MPES).")); QString mpcText(q_("You can import comet and asteroid data formatted in the export formats of the IAU's Minor Planet Center (%1). You can impor t files with lists of objects, download such lists from the Internet or sea rch the online Minor Planet and Comet Ephemeris Service (MPES)."));
ui->labelMPC->setText(QString(mpcText).arg(linkCode)); ui->labelMPC->setText(QString(mpcText).arg(linkCode));
//About tab
ui->labelTitle->setText(q_("Solar System Editor plug-in"));
ui->labelVersion->setText(QString(q_("Version %1")).arg(SOLARSYSTEME
DITOR_VERSION));
} }
void SolarSystemManagerWindow::retranslate() void SolarSystemManagerWindow::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
populateSolarSystemList(); populateSolarSystemList();
setAboutHtml();
updateTexts(); updateTexts();
} }
} }
void SolarSystemManagerWindow::newImportMPC() void SolarSystemManagerWindow::newImportMPC()
{ {
Q_ASSERT(mpcImportWindow); Q_ASSERT(mpcImportWindow);
mpcImportWindow->setVisible(true); mpcImportWindow->setVisible(true);
} }
skipping to change at line 164 skipping to change at line 162
manualImportWindow = Q_NULLPTR; manualImportWindow = Q_NULLPTR;
//This window is in the background, bring it to the foregrou nd //This window is in the background, bring it to the foregrou nd
dialog->setVisible(true); dialog->setVisible(true);
} }
} }
void SolarSystemManagerWindow::populateSolarSystemList() void SolarSystemManagerWindow::populateSolarSystemList()
{ {
unlocalizedNames.clear(); unlocalizedNames.clear();
foreach (const PlanetP & object, GETSTELMODULE(SolarSystem)->getAllP lanets()) foreach (const PlanetP& object, GETSTELMODULE(SolarSystem)->getAllMi norBodies())
{ {
// GZ new for 0.16: only insert objects which are minor bodi es. // GZ new for 0.16: only insert objects which are minor bodi es.
if ((object->getPlanetType() >= Planet::isAsteroid) && (obje unlocalizedNames.insert(object->getCommonNameI18n(), object-
ct->getEnglishName()!="Pluto")) >getCommonEnglishName());
unlocalizedNames.insert(object->getNameI18n(), objec
t->getEnglishName());
} }
ui->listWidgetObjects->clear(); ui->listWidgetObjects->clear();
ui->listWidgetObjects->addItems(unlocalizedNames.keys()); ui->listWidgetObjects->addItems(unlocalizedNames.keys());
//No explicit sorting is necessary: sortingEnabled is set in the .ui //No explicit sorting is necessary: sortingEnabled is set in the .ui
} }
void SolarSystemManagerWindow::removeObjects() void SolarSystemManagerWindow::removeObjects()
{ {
if (ui->listWidgetObjects->selectedItems().length()>0) if (ui->listWidgetObjects->selectedItems().length()>0)
skipping to change at line 218 skipping to change at line 215
ssEditor->replaceSolarSystemConfigurationFileWith(filePath); ssEditor->replaceSolarSystemConfigurationFileWith(filePath);
} }
void SolarSystemManagerWindow::addConfiguration() void SolarSystemManagerWindow::addConfiguration()
{ {
QString filter = q_("Configuration files"); QString filter = q_("Configuration files");
filter.append(" (*.ini)"); filter.append(" (*.ini)");
QString filePath = QFileDialog::getOpenFileName(0, q_("Select a file to add the Solar System minor bodies"), QDir::toNativeSeparators(StelFileM gr::getInstallationDir()+"/data/ssystem_1000comets.ini"), filter); QString filePath = QFileDialog::getOpenFileName(0, q_("Select a file to add the Solar System minor bodies"), QDir::toNativeSeparators(StelFileM gr::getInstallationDir()+"/data/ssystem_1000comets.ini"), filter);
ssEditor->addFromSolarSystemConfigurationFile(filePath); ssEditor->addFromSolarSystemConfigurationFile(filePath);
} }
void SolarSystemManagerWindow::setAboutHtml(void)
{
QString html = "<html><head></head><body>";
html += "<h2>" + q_("Solar System Editor") + "</h2><table width=\"90
%\">";
html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron
g></td><td>" + SOLARSYSTEMEDITOR_PLUGIN_VERSION + "</td></tr>";
html += "<tr><td><strong>" + q_("License") + ":</strong></td><td>" +
SOLARSYSTEMEDITOR_PLUGIN_LICENSE + "</td></tr>";
html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Bogd
an Marinov &lt;bogdan.marinov84@gmail.com&gt;</td></tr>";
html += "<tr><td rowspan=2><strong>" + q_("Contributors") + ":</stro
ng></td><td>Georg Zotti</td></tr>";
html += "<tr><td>Alexander Wolf &lt;alex.v.wolf@gmail.com&gt;</td></
tr>";
html += "</table>";
html += "<p>" + q_("An interface for adding asteroids and comets to
Stellarium. It can download object lists from the Minor Planet Center's web
site and perform searches in its online database.") + "</p>";
html += "<h3>" + q_("Links") + "</h3>";
html += "<p>" + QString(q_("Support is provided via the Launchpad we
bsite. Be sure to put \"%1\" in the subject when posting.")).arg("Solar Sy
stem Editor plugin") + "</p>";
html += "<p><ul>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + QString(q_("If you have a question, you can %1get a
n answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\"
>")).arg("</a>") + "</li>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).ar
g("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li
>";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + q_("If you would like to make a feature request, yo
u can create a bug report, and set the severity to \"wishlist\".") + "</li>
";
// TRANSLATORS: The numbers contain the opening and closing tag of a
n HTML link
html += "<li>" + q_("If you want to read full information about this
plugin, its history and format of catalog, you can %1get info here%2.").ar
g("<a href=\"http://stellarium.org/wiki/index.php/Solar_System_Editor_plugi
n\">").arg("</a>") + "</li>";
html += "</ul></p></body></html>";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
));
if(gui!=Q_NULLPTR)
{
QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet);
ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlS
tyleSheet);
}
ui->aboutTextBrowser->setHtml(html);
}
 End of changes. 6 change blocks. 
10 lines changed or deleted 5 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/