#include <libintl.h> /* For dgettext(). */
+/* Include config.h so that _() works: */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
G_DEFINE_TYPE (EasysetupCountryComboBox, easysetup_country_combo_box, GTK_TYPE_COMBO_BOX);
#define COUNTRY_COMBO_BOX_GET_PRIVATE(o) \
EasysetupCountryComboBoxPrivate *priv = COUNTRY_COMBO_BOX_GET_PRIVATE (self);
/* Load the file one line at a time: */
- FILE *file = fopen("mcc_mapping", "r");
+ const gchar* filepath = PROVIDER_DATA_DIR "/mcc_mapping";
+ FILE *file = fopen(filepath, "r");
if (!file)
{
- g_warning("Could not open mcc_mapping file.\n");
+ const gchar* filepath_hack = HACK_TOP_SRCDIR "src/maemo/easysetup/mcc_mapping";
+ g_warning ("Could not locate the official mcc_mapping countries list file from %s, "
+ "so attempting to load it instead from %s", filepath, filepath_hack);
+ file = fopen(filepath_hack, "r");
+ }
+
+ if (!file) {
+ g_warning("Could not open mcc_mapping file");
return;
}