+
+void
+modest_combo_box_set_active_id (ModestComboBox *self, gpointer id)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ ModestComboBoxPrivate *priv;
+ gboolean found = FALSE;
+
+ g_return_if_fail (self);
+
+ priv = MODEST_COMBO_BOX_GET_PRIVATE(self);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX(self));
+ if (!gtk_tree_model_get_iter_first (model, &iter))
+ return; /* empty list */
+
+ do {
+ gpointer row_id;
+ gtk_tree_model_get (model, &iter, COLUMN_ID, &row_id, -1);
+ if ((priv->id_equal_func)(id, row_id)) {
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX(self), &iter);
+ found = TRUE;
+ }
+ } while (!found && gtk_tree_model_iter_next (model, &iter));
+
+ if (!found)
+ g_printerr ("modest: could not set the active id\n");
+}
+
+
+
+const gchar*