- parse_mcc_mapping_line (line, &id_str, &country);
- /* printf("DEBUG: parsed: id=%s, country=%s\n", id_str, country); */
-
- if(id_str && country) {
-
- if (previous_country) {
- /* printf (" debug: storing id=%d for country=%s\n", previous_id, previous_country); */
- list = g_slist_append (list, GUINT_TO_POINTER (previous_id));
- }
-
- /* Group multiple MMC IDs for the same country together:
- * This assumes that they are in sequence.
- * We don't know why some countries, such as the USA, have several MMC IDs.
- * If they are regions in the country, and we need to show them separately, then
- * we would need to have that information in the file to distinguish them.
- */
- if (!previous_country ||
- (previous_country && strcmp (previous_country, country) != 0)) {
-
- /* Get the translation for the country name:
- * Note that the osso_countries_1.0 translation domain files are installed
- * by the operator-wizard-settings package. */
- /* For post-Bora, there is a separate (meta)package osso-countries-l10n-mr0 */
-
- /* Note: Even when the untranslated names are different, there may still be
- * duplicate translated names. They would be translation bugs.
- */
- const gchar *name_translated = dgettext ("osso-countries", previous_country);
- if(!name_translated)
- name_translated = previous_country;
-
- /* Add the row to the model: */
- GtkTreeIter iter;
- gtk_list_store_append (liststore, &iter);
- gtk_list_store_set(liststore, &iter, MODEL_COL_IDS, list, MODEL_COL_NAME, name_translated, -1);
-
- /* The list will be freed in our finalize(). */
- list = NULL;
- }
-
- g_free (previous_country);
- previous_country = g_strdup (country);
-
- const guint id = (guint)g_ascii_strtod(id_str, NULL); /* Note that this parses locale-independent text. */
- previous_id = id;