Call gtk_combo_box_set_model() *after* loading countries from
authorAlberto Garcia <agarcia@igalia.com>
Tue, 4 Dec 2007 17:26:10 +0000 (17:26 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Tue, 4 Dec 2007 17:26:10 +0000 (17:26 +0000)
file, it saves some 2-3 seconds

pmo-trunk-r3865

src/maemo/easysetup/modest-easysetup-country-combo-box.c

index 34a5feb..ba1a908 100644 (file)
@@ -256,7 +256,6 @@ easysetup_country_combo_box_init (EasysetupCountryComboBox *self)
        
        /* Setup the combo box: */
        GtkComboBox *combobox = GTK_COMBO_BOX (self);
-       gtk_combo_box_set_model (combobox, priv->model);
        
        /* Country column:
         * The ID model column in not shown in the view. */
@@ -272,6 +271,8 @@ easysetup_country_combo_box_init (EasysetupCountryComboBox *self)
        
        /* Fill the model with rows: */
        load_from_file (self);
+       /* Set this _after_ loading from file, it makes loading faster */
+       gtk_combo_box_set_model (combobox, priv->model);
 }
 
 EasysetupCountryComboBox*