static void load_regions_model (GtkListStore *regions, GtkListStore *cities) { struct get_region_data data; TzDB *db; GHashTable *table; db = tz_load_db (); table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); data.table = table; data.region_store = regions; data.city_store = cities; g_ptr_array_foreach (db->locations, (GFunc) get_regions, &data); g_hash_table_destroy (table); tz_db_free (db); /* sort the models */ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (regions), REGION_COL_REGION_TRANSLATED, GTK_SORT_ASCENDING); }
static void load_regions_model (GtkListStore *cities) { TzDB *db; db = tz_load_db (); g_ptr_array_foreach (db->locations, (GFunc) load_cities, cities); tz_db_free (db); }
static void cc_timezone_map_finalize (GObject *object) { CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (object)->priv; if (priv->tzdb) { tz_db_free (priv->tzdb); priv->tzdb = NULL; } G_OBJECT_CLASS (cc_timezone_map_parent_class)->finalize (object); }
// ----------------------------------------------------------------------------- void tzn::end() { DEBUGLOGB; if( tzdb ) tz_db_free(tzdb); tzdb = NULL; #if 0 *tzz = *tzZ = '\0'; #endif tzo = 0; DEBUGLOGE; }