aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-07-10 23:42:14 +0800
committerPeter Williams <peterw@src.gnome.org>2000-07-10 23:42:14 +0800
commit2e13a6556500098fe1930c33d69a16803e04eb99 (patch)
treea443de1811d0bef8485695cc4d27b6d72f1f0bd2 /addressbook/gui/component
parentd84b6c8d361545387c4e1c8ca08ba7779c4804cb (diff)
downloadgsoc2013-evolution-2e13a6556500098fe1930c33d69a16803e04eb99.tar.gz
gsoc2013-evolution-2e13a6556500098fe1930c33d69a16803e04eb99.tar.zst
gsoc2013-evolution-2e13a6556500098fe1930c33d69a16803e04eb99.zip
Fix the address entry box for more than one address being specified
svn path=/trunk/; revision=4037
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-model.c b/addressbook/gui/component/select-names/e-select-names-model.c
index 2281339a47..32f2a85a56 100644
--- a/addressbook/gui/component/select-names/e-select-names-model.c
+++ b/addressbook/gui/component/select-names/e-select-names-model.c
@@ -284,26 +284,29 @@ e_select_names_model_insert (ESelectNamesModel *model,
gchar *temp = g_strdup_printf("%.*s%s%s", index, node->string, strings[0], node->string + index);
g_free(node->string);
node->string = temp;
- }
- for (i = 1; strings[i]; i++) {
- ESelectNamesModelData *node = (void *) e_iterator_get(iterator);
- gchar *temp = g_strdup_printf("%.*s", index, node->string);
- gchar *temp2 = g_strdup_printf("%s%s", strings[0], node->string + index);
+ index += strlen(strings[0]);
- g_free(node->string);
- node->type = E_SELECT_NAMES_MODEL_DATA_TYPE_STRING_ADDRESS;
- node->string = temp;
- if (node->card)
- gtk_object_unref(GTK_OBJECT(node->card));
- node->card = NULL;
-
- node = g_new(ESelectNamesModelData, 1);
- node->type = E_SELECT_NAMES_MODEL_DATA_TYPE_STRING_ADDRESS;
- node->card = NULL;
- node->string = temp2;
- e_iterator_insert(iterator, node, 0);
- g_free(node->string);
- g_free(node);
+ for (i = 1; strings[i]; i++) {
+ ESelectNamesModelData *node = (void *) e_iterator_get(iterator);
+ gchar *temp = g_strdup_printf("%.*s", index, node->string);
+ gchar *temp2 = g_strdup_printf("%s%s", strings[i], node->string + index);
+
+ g_free(node->string);
+ node->type = E_SELECT_NAMES_MODEL_DATA_TYPE_STRING_ADDRESS;
+ node->string = temp;
+ if (node->card)
+ gtk_object_unref(GTK_OBJECT(node->card));
+ node->card = NULL;
+
+ node = g_new(ESelectNamesModelData, 1);
+ node->type = E_SELECT_NAMES_MODEL_DATA_TYPE_STRING_ADDRESS;
+ node->card = NULL;
+ node->string = temp2;
+ e_iterator_insert(iterator, node, 0);
+ index = strlen(strings[i]);
+ g_free(node->string);
+ g_free(node);
+ }
}
e_select_names_model_changed(model);
gtk_object_unref(GTK_OBJECT(iterator));