From 7005a8dcdc6f2fb87826cfb7e7d575130476d65d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 28 Nov 2009 16:16:33 -0500 Subject: Coding style and whitespace cleanups. --- plugins/contacts-map/contacts-map.c | 13 +++++-------- plugins/contacts-map/geo-utils.c | 4 ++-- plugins/contacts-map/geo-utils.h | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'plugins/contacts-map') diff --git a/plugins/contacts-map/contacts-map.c b/plugins/contacts-map/contacts-map.c index 8961233587..afde8e2273 100644 --- a/plugins/contacts-map/contacts-map.c +++ b/plugins/contacts-map/contacts-map.c @@ -30,7 +30,6 @@ #include #include - /* Plugin entry points */ gboolean addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view); @@ -39,7 +38,7 @@ void show_map_general (ESourceSelector *selector); /* Implementations */ -gboolean +gboolean addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view) { EShell *shell; @@ -77,7 +76,6 @@ addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view) return TRUE; } - void action_show_ebook_map (GtkAction *action, EShellView *shell_view) { @@ -93,7 +91,6 @@ action_show_ebook_map (GtkAction *action, EShellView *shell_view) g_object_unref (selector); } - void show_map_general (ESourceSelector *selector) { @@ -110,7 +107,7 @@ show_map_general (ESourceSelector *selector) gdouble lat = 0; gdouble lng = 0; - GtkWidget *map_widget; + GtkWidget *map_widget; ChamplainView *view; ChamplainLayer *layer; @@ -123,11 +120,11 @@ show_map_general (ESourceSelector *selector) uri = e_source_get_uri (primary_source); book = e_book_new_from_uri (uri, NULL); - if (!book || !e_book_open (book, TRUE, NULL)) + if (!book || !e_book_open (book, TRUE, NULL)) { g_warning ("Couldn't load addressbook %s", uri); return; - } + } /* Get all the contacts with an address */ query = e_book_query_field_exists (E_CONTACT_ADDRESS); @@ -154,7 +151,7 @@ show_map_general (ESourceSelector *selector) fields = geoclue_geocode_address_to_position (geocoder, details, &lat, &lng, NULL, &accuracy, &error); - if (!error && + if (!error && (fields & GEOCLUE_POSITION_FIELDS_LATITUDE) != 0 && (fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) != 0) { /* Add the marker to the map */ diff --git a/plugins/contacts-map/geo-utils.c b/plugins/contacts-map/geo-utils.c index 3f7473cab4..b44b926ef3 100644 --- a/plugins/contacts-map/geo-utils.c +++ b/plugins/contacts-map/geo-utils.c @@ -33,13 +33,13 @@ add_marker (ChamplainLayer *layer, gdouble lat, gdouble lng, EContact *contact) champlain_layer_add_marker (layer, CHAMPLAIN_BASE_MARKER(marker)); } -GeoclueGeocode* +GeoclueGeocode* get_geocoder (void) { GeoclueGeocode *geocoder = NULL; /* Create new GeoclueGeocode */ - geocoder = geoclue_geocode_new ("org.freedesktop.Geoclue.Providers.Yahoo", + geocoder = geoclue_geocode_new ("org.freedesktop.Geoclue.Providers.Yahoo", "/org/freedesktop/Geoclue/Providers/Yahoo"); return geocoder; diff --git a/plugins/contacts-map/geo-utils.h b/plugins/contacts-map/geo-utils.h index 65248f4893..4560ed0b1a 100644 --- a/plugins/contacts-map/geo-utils.h +++ b/plugins/contacts-map/geo-utils.h @@ -9,7 +9,7 @@ #include #include -void +void get_min_max (gdouble *min_lat, gdouble *max_lat, gdouble *min_lng, gdouble *max_lng, gdouble lat, gdouble lng); -- cgit