summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 05:15:13 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 05:15:13 (GMT)
commitc6f15b3a1f416c20f377c774ec8f7a7638c63435 (patch)
tree849f6ec27b7c6fd4ff1123e2ede64b2acd5905b9
parent4eef9eb85388c0155377911a231f59e93da3b48a (diff)
Enable/disable automatic rsolution of unknown objects using the internet
-rw-r--r--kstars/dialogs/finddialog.cpp2
-rw-r--r--kstars/kstars.kcfg7
-rw-r--r--kstars/options/opscatalog.ui15
3 files changed, 23 insertions, 1 deletions
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index 12012dd..ce50dd8 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -321,7 +321,7 @@ void FindDialog::slotOk() {
filterList();
}
selObj = selectedObject();
- if( ! selObj ) {
+ if( ! selObj && Options::resolveNamesOnline() ) {
// ==== FIXME: What follows is buggy testing code : please improve ====
// This code is expected to cause crashes / memory leaks
// because we don't commit the DSO data to the database, or
diff --git a/kstars/kstars.kcfg b/kstars/kstars.kcfg
index 9aef696..3836b65 100644
--- a/kstars/kstars.kcfg
+++ b/kstars/kstars.kcfg
@@ -123,6 +123,13 @@
<label>List for displaying custom object catalogs.</label>
<whatsthis>List of names for which custom catalogs are to be displayed.</whatsthis>
</entry>
+ <entry name="ResolveNamesOnline" type="Bool">
+ <label>Resolve names using online services.</label>
+ <whatsthis>Names of objects entered into the find dialog are
+ resolved using online services and stored in the database. This
+ option also toggles the display of such resolved objects on the
+ sky map.</whatsthis>
+ </entry>
</group>
<group name="indi">
diff --git a/kstars/options/opscatalog.ui b/kstars/options/opscatalog.ui
index f541ff6..9501e07 100644
--- a/kstars/options/opscatalog.ui
+++ b/kstars/options/opscatalog.ui
@@ -503,6 +503,21 @@
</layout>
</item>
<item>
+ <layout class="QHBoxLayout">
+ <item>
+ <widget class="QCheckBox" name="kcfg_ResolveNamesOnline">
+ <property name="text">
+ <string>Resolve names not known to KStars using online services</string>
+ </property>
+ <property name="toolTip">
+ <string>If this checkbox is checked, when an object name unknown to KStars is entered in the Find Dialog, KStars will contact online services (such as CDS Sesame) to learn about the object and then add it to the database.
+ The objects acquired in this manner are stored under a catalog that is called _Internet_Resolved as of this writing.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>