6
int main (int argc, char **argv)
14
setlocale (LC_ALL, "");
17
pixmap_dir = g_strdup (argv[1]);
18
} else if (argc == 1) {
19
pixmap_dir = g_strdup ("data/");
21
g_message ("Usage: %s [PIXMAP DIRECTORY]", argv[0]);
26
locs = tz_get_locations (db);
27
for (i = 0; i < locs->len ; i++) {
28
TzLocation *loc = locs->pdata[i];
30
char *filename, *path;
31
gdouble selected_offset;
34
info = tz_info_from_location (loc);
35
selected_offset = tz_location_get_utc_offset (loc)
36
/ (60.0*60.0) + ((info->daylight) ? -1.0 : 0.0);
38
filename = g_strdup_printf ("timezone_%s.png",
39
g_ascii_formatd (buf, sizeof (buf),
40
"%g", selected_offset));
41
path = g_build_filename (pixmap_dir, filename, NULL);
43
if (g_file_test (path, G_FILE_TEST_IS_REGULAR) == FALSE) {
44
g_message ("File '%s' missing for zone '%s'", filename, loc->zone);