2007-07-04 Murray Cumming <murrayc@murrayc.com>
[modest] / src / maemo / easysetup / modest-easysetup-country-combo-box.c
index 21c36d3..ce9f823 100644 (file)
@@ -194,10 +194,10 @@ static void load_from_file (EasysetupCountryComboBox *self)
 #ifndef MODEST_HILDON_VERSION_0
        const gchar* filepath = PROVIDER_DATA_DIR "/mcc_mapping";
 #else
-       /* this is the official version, in the 'operator-wizard-settings' package */
+       /* This is the official version, in the 'operator-wizard-settings' package */
        const gchar* filepath = "/usr/share/operator-wizard/mcc_mapping";
 #endif /*MODEST_HILDON_VERSION_0*/
-       printf ("DEBUG: %s: filepath=%s\n", __FUNCTION__, filepath);
+       /* printf ("DEBUG: %s: filepath=%s\n", __FUNCTION__, filepath); */
        FILE *file = fopen(filepath, "r");
        if (!file)
        {
@@ -219,7 +219,7 @@ static void load_from_file (EasysetupCountryComboBox *self)
         * and it doesn't require us to hard-code a buffer length.
         * TODO: Could we make this faster?
         */
-       int len = 0;
+       unsigned int len = 0;
        char *line = NULL;
        guint previous_id = 0;
        gchar* previous_country = NULL;
@@ -300,6 +300,10 @@ static void load_from_file (EasysetupCountryComboBox *self)
                free (line);
                
        fclose (file);
+       
+       /* Sort the items: */
+       gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (liststore), 
+               MODEL_COL_NAME, GTK_SORT_ASCENDING);
 }
 
 static void