aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c41
2 files changed, 27 insertions, 19 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 6fe117daa8..0c9c58f467 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-10 Peter Williams <peterw@curious-george.helixcode.com>
+
+ * gui/component/select-names/e-select-names-model.c: (Clahey's fix)
+ Make multiple addresses be concatenated correctly.
+
2000-07-09 Christopher James Lahey <clahey@helixcode.com>
* gui/component/addressbook.c,
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));