~timezonemap-team/timezonemap/trunk

« back to all changes in this revision

Viewing changes to src/cc-timezone-map.c

  • Committer: Dmitrijs Ledkovs
  • Date: 2013-03-27 17:22:30 UTC
  • mfrom: (20.1.2 timezonemap-clickanywhere)
  • Revision ID: dmitrijs.ledkovs@canonical.com-20130327172230-v14b0lcoep1j11js
* Simplfy setting location
* Use latitude/longitude for local cities as well (LP: #892370)
* Add m4 directory to prevent aclocal from complaining.
* Include cities with greater than 15000 people locally.
* Add original timezone svg map, thanks to Otto for finding it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1166
1166
}
1167
1167
 
1168
1168
void
 
1169
cc_timezone_map_set_location (CcTimezoneMap *map,
 
1170
                              gdouble lon,
 
1171
                              gdouble lat)
 
1172
{
 
1173
  GtkAllocation alloc;
 
1174
  gtk_widget_get_allocation (GTK_WIDGET(map), &alloc);
 
1175
  gdouble x = convert_longtitude_to_x(lon, alloc.width);
 
1176
  gdouble y = convert_latitude_to_y(lat, alloc.height);
 
1177
  CcTimezoneLocation * loc = get_loc_for_xy (GTK_WIDGET(map), x, y);
 
1178
  set_location (map, loc);
 
1179
}
 
1180
 
 
1181
void
1169
1182
cc_timezone_map_set_coords (CcTimezoneMap *map, gdouble lon, gdouble lat)
1170
1183
{
1171
1184
  const gchar * zone = cc_timezone_map_get_timezone_at_coords (map, lon, lat);