SearchDialog.cpp   SearchDialog.cpp 
skipping to change at line 304 skipping to change at line 304
connect(ui->lineEditSearchSkyObject, SIGNAL(textChanged(const QStrin g&)), connect(ui->lineEditSearchSkyObject, SIGNAL(textChanged(const QStrin g&)),
this, SLOT(onSearchTextChanged(const QString&))); this, SLOT(onSearchTextChanged(const QString&)));
connect(ui->pushButtonGotoSearchSkyObject, SIGNAL(clicked()), this, SLOT(gotoObject())); connect(ui->pushButtonGotoSearchSkyObject, SIGNAL(clicked()), this, SLOT(gotoObject()));
onSearchTextChanged(ui->lineEditSearchSkyObject->text()); onSearchTextChanged(ui->lineEditSearchSkyObject->text());
connect(ui->lineEditSearchSkyObject, SIGNAL(returnPressed()), this, SLOT(gotoObject())); connect(ui->lineEditSearchSkyObject, SIGNAL(returnPressed()), this, SLOT(gotoObject()));
connect(ui->lineEditSearchSkyObject, SIGNAL(selectionChanged()), thi s, SLOT(setHasSelectedFlag())); connect(ui->lineEditSearchSkyObject, SIGNAL(selectionChanged()), thi s, SLOT(setHasSelectedFlag()));
connect(ui->lineEditSearchSkyObject, SIGNAL(customContextMenuRequest ed(QPoint)), this, SLOT(showContextMenu(QPoint))); connect(ui->lineEditSearchSkyObject, SIGNAL(customContextMenuRequest ed(QPoint)), this, SLOT(showContextMenu(QPoint)));
ui->lineEditSearchSkyObject->installEventFilter(this); ui->lineEditSearchSkyObject->installEventFilter(this);
#ifdef Q_OS_WIN
//Kinetic scrolling for tablet pc and pc //Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll; QList<QWidget *> addscroll;
addscroll << ui->objectsListWidget; addscroll << ui->objectsListWidget;
installKineticScrolling(addscroll); installKineticScrolling(addscroll);
#endif
populateCoordinateSystemsList(); populateCoordinateSystemsList();
populateCoordinateAxis(); populateCoordinateAxis();
int idx = ui->coordinateSystemComboBox->findData(getCurrentCoordinat eSystemKey(), Qt::UserRole, Qt::MatchCaseSensitive); int idx = ui->coordinateSystemComboBox->findData(getCurrentCoordinat eSystemKey(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1) if (idx==-1)
{ {
// Use equatorialJ2000 as default // Use equatorialJ2000 as default
idx = ui->coordinateSystemComboBox->findData(QVariant("equat orialJ2000"), Qt::UserRole, Qt::MatchCaseSensitive); idx = ui->coordinateSystemComboBox->findData(QVariant("equat orialJ2000"), Qt::UserRole, Qt::MatchCaseSensitive);
} }
ui->coordinateSystemComboBox->setCurrentIndex(idx); ui->coordinateSystemComboBox->setCurrentIndex(idx);
skipping to change at line 367 skipping to change at line 369
ui->serverListComboBox->setCurrentIndex(idx); ui->serverListComboBox->setCurrentIndex(idx);
connect(ui->serverListComboBox, SIGNAL(currentIndexChanged(int)), th is, SLOT(selectSimbadServer(int))); connect(ui->serverListComboBox, SIGNAL(currentIndexChanged(int)), th is, SLOT(selectSimbadServer(int)));
connect(ui->checkBoxUseStartOfWords, SIGNAL(clicked(bool)), this, SL OT(enableStartOfWordsAutofill(bool))); connect(ui->checkBoxUseStartOfWords, SIGNAL(clicked(bool)), this, SL OT(enableStartOfWordsAutofill(bool)));
ui->checkBoxUseStartOfWords->setChecked(useStartOfWords); ui->checkBoxUseStartOfWords->setChecked(useStartOfWords);
// list views initialization // list views initialization
connect(ui->objectTypeComboBox, SIGNAL(activated(int)), this, SLOT(u pdateListWidget(int))); connect(ui->objectTypeComboBox, SIGNAL(activated(int)), this, SLOT(u pdateListWidget(int)));
connect(ui->searchInListLineEdit, SIGNAL(textChanged(QString)), this , SLOT(searchListChanged(QString))); connect(ui->searchInListLineEdit, SIGNAL(textChanged(QString)), this , SLOT(searchListChanged(QString)));
connect(ui->searchInEnglishCheckBox, SIGNAL(toggled(bool)), this, SL OT(updateListTab())); connect(ui->searchInEnglishCheckBox, SIGNAL(toggled(bool)), this, SL OT(updateListTab()));
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updat eListTab()));
updateListTab(); updateListTab();
// Set the focus directly on the line edit // Set the focus directly on the line edit
if (ui->lineEditSearchSkyObject->isEnabled()) if (ui->lineEditSearchSkyObject->isEnabled())
ui->lineEditSearchSkyObject->setFocus(); ui->lineEditSearchSkyObject->setFocus();
} }
void SearchDialog::setHasSelectedFlag() void SearchDialog::setHasSelectedFlag()
{ {
flagHasSelectedText = true; flagHasSelectedText = true;
skipping to change at line 723 skipping to change at line 726
{ {
if (StelApp::getInstance().getLocaleMgr().getAppLanguage().startsWit h("en")) if (StelApp::getInstance().getLocaleMgr().getAppLanguage().startsWit h("en"))
{ {
// hide "names in English" checkbox // hide "names in English" checkbox
ui->searchInEnglishCheckBox->hide(); ui->searchInEnglishCheckBox->hide();
} }
else else
{ {
ui->searchInEnglishCheckBox->show(); ui->searchInEnglishCheckBox->show();
} }
ui->objectTypeComboBox->blockSignals(true);
ui->objectTypeComboBox->clear(); ui->objectTypeComboBox->clear();
QMap<QString, QString> modulesMap = objectMgr->objectModulesMap(); QMap<QString, QString> modulesMap = objectMgr->objectModulesMap();
for (QMap<QString, QString>::const_iterator it = modulesMap.begin(); it != modulesMap.end(); ++it) for (QMap<QString, QString>::const_iterator it = modulesMap.begin(); it != modulesMap.end(); ++it)
{ {
if (!objectMgr->listAllModuleObjects(it.key(), ui->searchInE nglishCheckBox->isChecked()).isEmpty()) if (!objectMgr->listAllModuleObjects(it.key(), ui->searchInE nglishCheckBox->isChecked()).isEmpty())
{ {
QString moduleName = (ui->searchInEnglishCheckBox->i sChecked() ? it.value(): q_(it.value())); QString moduleName = (ui->searchInEnglishCheckBox->i sChecked() ? it.value(): q_(it.value()));
ui->objectTypeComboBox->addItem(moduleName, QVariant (it.key())); ui->objectTypeComboBox->addItem(moduleName, QVariant (it.key()));
} }
} }
ui->objectTypeComboBox->model()->sort(0, Qt::AscendingOrder);
ui->objectTypeComboBox->blockSignals(false);
updateListWidget(ui->objectTypeComboBox->currentIndex()); updateListWidget(ui->objectTypeComboBox->currentIndex());
} }
void SearchDialog::showContextMenu(const QPoint &pt) void SearchDialog::showContextMenu(const QPoint &pt)
{ {
QMenu *menu = ui->lineEditSearchSkyObject->createStandardContextMenu (); QMenu *menu = ui->lineEditSearchSkyObject->createStandardContextMenu ();
menu->addSeparator(); menu->addSeparator();
menu->addAction(q_("Paste and Search"), this, SLOT(pasteAndGo())); menu->addAction(q_("Paste and Search"), this, SLOT(pasteAndGo()));
menu->exec(ui->lineEditSearchSkyObject->mapToGlobal(pt)); menu->exec(ui->lineEditSearchSkyObject->mapToGlobal(pt));
delete menu; delete menu;
 End of changes. 5 change blocks. 
0 lines changed or deleted 6 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/