[gnome-clocks/wip/geolocation] Simplify code: remove location helper



commit 75dd6efee88de20edbd9233ae60ec18c6e4b4014
Author: Evgeny Bobkin <evgen ibqn gmail com>
Date:   Sat Sep 7 23:23:39 2013 +0200

    Simplify code: remove location helper

 src/geoclue.vala |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/geoclue.vala b/src/geoclue.vala
index ac92646..db84c63 100644
--- a/src/geoclue.vala
+++ b/src/geoclue.vala
@@ -96,7 +96,7 @@ public class GeoInfo : Object {
 
         yield seek_country_code ();
 
-        yield search_locations ();
+        yield search_locations (GWeather.Location.get_world ());
 
         if (found_location != null) {
             location_changed (found_location);
@@ -134,7 +134,7 @@ public class GeoInfo : Object {
         return Math.acos (Math.cos (lat1) * Math.cos (lat2) * Math.cos (lon1 - lon2) + Math.sin (lat1) * 
Math.sin (lat2)) * radius;
     }
 
-    private async void search_locations_helper (GWeather.Location location) {
+    private async void search_locations (GWeather.Location location) {
         if (this.country_code != null) {
             string? loc_country_code = location.get_country ();
             if (loc_country_code != null) {
@@ -161,17 +161,11 @@ public class GeoInfo : Object {
                     }
                 }
 
-                yield search_locations_helper (locations[i]);
+                yield search_locations (locations[i]);
             }
         }
     }
 
-    private async void search_locations () {
-        GWeather.Location locations = GWeather.Location.get_world ();
-
-        yield search_locations_helper (locations);
-    }
-
     public bool is_location_similar (GWeather.Location location) {
         if (this.found_location != null) {
             string? city_name = location.get_city_name ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]