diff options
Diffstat (limited to 'calendar/gui/dialogs/event-page.c')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 5152b9ab21..c8c208e1b3 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1200,11 +1200,19 @@ event_page_fill_widgets (CompEditorPage *page, g_signal_handlers_block_by_func (gtk_bin_get_child (GTK_BIN (priv->organizer)), organizer_changed_cb, epage); if (!priv->user_org) { - GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)); - - gtk_list_store_clear (GTK_LIST_STORE (model)); - e_dialog_append_list_store_text (model, 0, string); - gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + GtkComboBox *combo_box; + GtkListStore *list_store; + GtkTreeModel *model; + GtkTreeIter iter; + + combo_box = GTK_COMBO_BOX (priv->organizer); + model = gtk_combo_box_get_model (combo_box); + list_store = GTK_LIST_STORE (model); + + gtk_list_store_clear (list_store); + gtk_list_store_append (list_store, &iter); + gtk_list_store_set (list_store, &iter, 0, string, -1); + gtk_combo_box_set_active (combo_box, 0); gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (priv->organizer))), FALSE); } else { gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer))), string); @@ -3476,8 +3484,10 @@ event_page_construct (EventPage *epage, EMeetingStore *meeting_store) { EventPagePrivate *priv; + GtkComboBox *combo_box; + GtkListStore *list_store; GtkTreeModel *model; - GtkListStore *store; + GtkTreeIter iter; gint ii; priv = epage->priv; @@ -3503,21 +3513,27 @@ event_page_construct (EventPage *epage, priv->location_completion); /* Initialize completino model */ - store = gtk_list_store_new (1, G_TYPE_STRING); + list_store = gtk_list_store_new (1, G_TYPE_STRING); gtk_entry_completion_set_model (priv->location_completion, - GTK_TREE_MODEL (store)); + GTK_TREE_MODEL (list_store)); gtk_entry_completion_set_text_column (priv->location_completion, 0); - model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer)); + combo_box = GTK_COMBO_BOX (priv->organizer); + model = gtk_combo_box_get_model (combo_box); + list_store = GTK_LIST_STORE (model); priv->address_strings = itip_get_user_identities (); priv->fallback_address = itip_get_fallback_identity (); - for (ii = 0; priv->address_strings[ii] != NULL; ii++) - e_dialog_append_list_store_text ( - model, 0, priv->address_strings[ii]); + /* FIXME Could we just use a GtkComboBoxText? */ + for (ii = 0; priv->address_strings[ii] != NULL; ii++) { + gtk_list_store_append (list_store, &iter); + gtk_list_store_set ( + list_store, &iter, + 0, priv->address_strings[ii], -1); + } - gtk_combo_box_set_active (GTK_COMBO_BOX (priv->organizer), 0); + gtk_combo_box_set_active (combo_box, 0); g_signal_connect ( gtk_bin_get_child (GTK_BIN (priv->organizer)), "changed", |