Mercurial > geeqie
comparison src/metadata.c @ 1192:48d62a7e3c33
metadata_set_keywords() -> metadata_set(). Use gboolean type for boolean parameters.
author | zas_ |
---|---|
date | Sun, 30 Nov 2008 21:52:37 +0000 |
parents | bb02d0e2a573 |
children | aed0e28b2744 |
comparison
equal
deleted
inserted
replaced
1191:bb02d0e2a573 | 1192:48d62a7e3c33 |
---|---|
453 return FALSE; | 453 return FALSE; |
454 | 454 |
455 return TRUE; | 455 return TRUE; |
456 } | 456 } |
457 | 457 |
458 void metadata_set_keywords(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gint add) | 458 void metadata_set(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gboolean append) |
459 { | 459 { |
460 gchar *comment = NULL; | 460 gchar *comment = NULL; |
461 GList *keywords = NULL; | 461 GList *keywords = NULL; |
462 GList *save_list = NULL; | 462 GList *save_list = NULL; |
463 | 463 |
464 metadata_read(fd, &keywords, &comment); | 464 metadata_read(fd, &keywords, &comment); |
465 | 465 |
466 if (comment_to_use) | 466 if (comment_to_use) |
467 { | 467 { |
468 if (add && comment && *comment) | 468 if (append && comment && *comment) |
469 { | 469 { |
470 gchar *tmp = comment; | 470 gchar *tmp = comment; |
471 | 471 |
472 comment = g_strconcat(tmp, comment_to_use, NULL); | 472 comment = g_strconcat(tmp, comment_to_use, NULL); |
473 g_free(tmp); | 473 g_free(tmp); |
479 } | 479 } |
480 } | 480 } |
481 | 481 |
482 if (keywords_to_use) | 482 if (keywords_to_use) |
483 { | 483 { |
484 if (add && keywords && g_list_length(keywords) > 0) | 484 if (append && keywords && g_list_length(keywords) > 0) |
485 { | 485 { |
486 GList *work; | 486 GList *work; |
487 | 487 |
488 work = keywords_to_use; | 488 work = keywords_to_use; |
489 while (work) | 489 while (work) |