Revision 1609 src/importcsv.c
| importcsv.c (revision 1609) | ||
|---|---|---|
| 107 | 107 |
ATTR_DISPLAY_NAME, |
| 108 | 108 |
ATTR_NICK_NAME, |
| 109 | 109 |
ATTR_EMAIL_ADDRESS, |
| 110 |
ATTR_REMARKS, |
|
| 110 | 111 |
|
| 111 | 112 |
N_CSV_ATTRIB |
| 112 | 113 |
} ImpCSVAttribIndex; |
| ... | ... | |
| 121 | 122 |
{N_("Last Name"), NULL, 1, TRUE},
|
| 122 | 123 |
{N_("Display Name"), NULL, 2, TRUE},
|
| 123 | 124 |
{N_("Nick Name"), NULL, 3, TRUE},
|
| 124 |
{N_("E-Mail Address"), NULL, 4, TRUE}
|
|
| 125 |
{N_("E-Mail Address"), NULL, 4, TRUE},
|
|
| 126 |
{N_("Remarks"), NULL, 5, TRUE}
|
|
| 125 | 127 |
}; |
| 126 | 128 |
|
| 127 | 129 |
static AddressBookFile *_importedBook_; |
| ... | ... | |
| 270 | 272 |
if (!clist->selection) return; |
| 271 | 273 |
|
| 272 | 274 |
row = GPOINTER_TO_INT( clist->selection->data ); |
| 273 |
if (row > 0 && row < clist->rows - 1 ) {
|
|
| 275 |
if ( row > 0 && row < clist->rows ) {
|
|
| 274 | 276 |
gtk_clist_freeze( clist ); |
| 275 | 277 |
|
| 276 | 278 |
src_attr = gtk_clist_get_row_data( clist, row ); |
| ... | ... | |
| 308 | 310 |
if (!clist->selection) return; |
| 309 | 311 |
|
| 310 | 312 |
row = GPOINTER_TO_INT( clist->selection->data ); |
| 311 |
if (row >= 0 && row < clist->rows - 2 ) {
|
|
| 313 |
if ( row >= 0 && row < clist->rows - 1 ) {
|
|
| 312 | 314 |
gtk_clist_freeze( clist ); |
| 313 | 315 |
|
| 314 | 316 |
src_attr = gtk_clist_get_row_data( clist, row ); |
| ... | ... | |
| 346 | 348 |
gchar *fullName = NULL; |
| 347 | 349 |
gchar *nickName = NULL; |
| 348 | 350 |
gchar *address = NULL; |
| 351 |
gchar *remarks = NULL; |
|
| 349 | 352 |
ItemPerson *person; |
| 350 | 353 |
ItemEMail *email; |
| 351 | 354 |
gint count = 0; |
| ... | ... | |
| 390 | 393 |
fullName = imp_csv_attrib[ATTR_DISPLAY_NAME].value; |
| 391 | 394 |
nickName = imp_csv_attrib[ATTR_NICK_NAME].value; |
| 392 | 395 |
address = imp_csv_attrib[ATTR_EMAIL_ADDRESS].value; |
| 396 |
remarks = imp_csv_attrib[ATTR_REMARKS].value; |
|
| 393 | 397 |
|
| 394 | 398 |
if (!fullName && !firstName && !lastName && address) |
| 395 | 399 |
fullName = address; |
| ... | ... | |
| 405 | 409 |
if (address) {
|
| 406 | 410 |
email = addritem_create_item_email(); |
| 407 | 411 |
addritem_email_set_address( email, address ); |
| 412 |
addritem_email_set_remarks( email, remarks ); |
|
| 408 | 413 |
addrcache_id_email( cache, email ); |
| 409 | 414 |
addrcache_person_add_email( cache, person, email ); |
| 410 | 415 |
} |
Also available in: Unified diff