X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-country-picker.c;h=91b208857e960ee48f1fa25b9df7ce6643a3d402;hb=c3f4ba6f998b34ce578ab3f8b6c72b7394061daa;hp=38be4c0e48851ccf82214369d30c3ef54bfa3f14;hpb=dc31aa7811ffd978755af927b8719c8e18bac4a0;p=modest diff --git a/src/hildon2/modest-country-picker.c b/src/hildon2/modest-country-picker.c index 38be4c0..91b2088 100644 --- a/src/hildon2/modest-country-picker.c +++ b/src/hildon2/modest-country-picker.c @@ -269,6 +269,7 @@ modest_country_picker_load_data(ModestCountryPicker *self) GtkCellRenderer *renderer; GtkWidget *selector; GtkListStore *model; + HildonTouchSelectorColumn *column; /* Create a tree model for the combo box, * with a string for the name, and an int for the MCC ID. @@ -282,9 +283,9 @@ modest_country_picker_load_data(ModestCountryPicker *self) g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); selector = hildon_touch_selector_new (); - hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (self), HILDON_TOUCH_SELECTOR (selector)); - hildon_touch_selector_append_column (HILDON_TOUCH_SELECTOR (selector), GTK_TREE_MODEL (model), - renderer, "text", MODEL_COL_NAME, NULL); + column = hildon_touch_selector_append_column (HILDON_TOUCH_SELECTOR (selector), GTK_TREE_MODEL (model), + renderer, "text", MODEL_COL_NAME, NULL); + g_object_set (G_OBJECT (column), "text-column", MODEL_COL_NAME, NULL); /* Fill the model with rows: */ load_from_file (self, model); @@ -292,15 +293,18 @@ modest_country_picker_load_data(ModestCountryPicker *self) /* Set this _after_ loading from file, it makes loading faster */ hildon_touch_selector_set_model (HILDON_TOUCH_SELECTOR (selector), 0, GTK_TREE_MODEL (model)); + hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (self), HILDON_TOUCH_SELECTOR (selector)); + g_object_unref (model); } ModestCountryPicker* -modest_country_picker_new (void) +modest_country_picker_new (HildonSizeType size, + HildonButtonArrangement arrangement) { return g_object_new (MODEST_TYPE_COUNTRY_PICKER, - "arrangement", HILDON_BUTTON_ARRANGEMENT_VERTICAL, - "size", HILDON_SIZE_AUTO, + "arrangement", arrangement, + "size", size, NULL); }