Bind location property of shumate map to gtk spin button. Getting rid of the location-change signal

merge-requests/1/head
Zwarf 2022-02-02 18:39:26 +01:00
rodzic 19dd54844f
commit 9211712372
3 zmienionych plików z 7 dodań i 9 usunięć

Wyświetl plik

@ -18,10 +18,10 @@ This small program should answer all these questions.
+3. Calculate the position of the sun -- Implemented and equations seem to be very precise (< ± 1°)
+4. Find the position of the moon at a spesific time -- Implemented and equations seem to be sufficiently precise (~ ± 2°)
-5. Present all calculated data in the GUI
-6. Create the web search -- Old method probably not very convenient. Starting new implementation with Libsoup.
-6. Create the web search -- Old method probably not very convenient. Starting new implementation with Libsoup
-7. Plotting graphs is still a topic of discussion. Update: Probably "Cairo", more work but more "gtk like"
-8. Implement "smarphone functionality" e.g. find location via GPS
+9. Insert a map view with OSM CAUTION!: Modified version of libshumate is used.
+9. Insert a map view with OSM
-10. Visualise important data direktly on the map
```
@ -37,7 +37,7 @@ Some of these formulas are from the excellent book by Jean Meeus "Astronomical A
- Libadwaita will be used to make the GUI adaptive.
- GDK and Cairo will probably be used for the plots.
- Libsoup is probably used to connect to "Nominatim" (OpenStreetMap) to translate searched words into coordinates.
- Shumate is used to show a map. CAUTION!: I am using a modified version of shumate to have a "location-changed" signal.
- Shumate is used to show a map.
## Build

Wyświetl plik

@ -131,8 +131,6 @@ picplanner_overview_init (PicplannerOverview *overview)
overview->viewport = shumate_simple_map_get_viewport (overview->map);
shumate_viewport_set_zoom_level (overview->viewport, 6);
overview->settings = g_settings_new ("de.zwarf.picplanner");
g_object_bind_property (overview->viewport, "latitude",
overview->north_entry, "value",
G_BINDING_BIDIRECTIONAL);
@ -142,8 +140,8 @@ picplanner_overview_init (PicplannerOverview *overview)
G_BINDING_BIDIRECTIONAL);
shumate_location_set_location (SHUMATE_LOCATION (overview->viewport), 51, 11);
g_signal_connect (G_OBJECT (overview->viewport), "location-changed", G_CALLBACK (map_moved), overview);
g_signal_connect (G_OBJECT (overview->north_entry), "value-changed", G_CALLBACK (map_moved), overview);
g_signal_connect (G_OBJECT (overview->east_entry), "value-changed", G_CALLBACK (map_moved), overview);
}
static void

Wyświetl plik

@ -24,8 +24,8 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="north_adjustment">
<property name="upper">90</property>
<property name="lower">-90</property>
<property name="upper">85.0511287798</property>
<property name="lower">-85.0511287798</property>
<property name="step_increment">0.01</property>
<property name="page_increment">1</property>
</object>