diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 42 | ||||
-rw-r--r-- | calendar/gui/dialogs/memo-page.c | 38 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 37 |
3 files changed, 84 insertions, 33 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", diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 4ef58eace7..10483f2acb 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -339,11 +339,19 @@ memo_page_fill_widgets (CompEditorPage *page, if (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)) { gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), string); } else { - GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo)); - - 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->org_combo), 0); + GtkComboBox *combo_box; + GtkListStore *list_store; + GtkTreeModel *model; + GtkTreeIter iter; + + combo_box = GTK_COMBO_BOX (priv->org_combo); + 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->org_combo))), FALSE); } g_free (string); @@ -1227,18 +1235,28 @@ memo_page_construct (MemoPage *mpage) } if (flags & COMP_EDITOR_IS_SHARED) { + GtkComboBox *combo_box; + GtkListStore *list_store; GtkTreeModel *model; + GtkTreeIter iter; gint ii; - model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo)); + combo_box = GTK_COMBO_BOX (priv->org_combo); + 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->org_combo), 0); + gtk_combo_box_set_active (combo_box, 0); gtk_widget_show (priv->org_label); gtk_widget_show (priv->org_combo); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 2fe06d9658..5da1ca3790 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -669,11 +669,19 @@ task_page_fill_widgets (CompEditorPage *page, g_signal_handlers_block_by_func (gtk_bin_get_child (GTK_BIN (priv->organizer)), organizer_changed_cb, tpage); 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); @@ -2094,7 +2102,10 @@ task_page_construct (TaskPage *tpage, ECalClient *client) { TaskPagePrivate *priv; + GtkComboBox *combo_box; + GtkListStore *list_store; GtkTreeModel *model; + GtkTreeIter iter; gint ii; priv = tpage->priv; @@ -2116,16 +2127,22 @@ task_page_construct (TaskPage *tpage, return NULL; } - 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", |