metadata_set_keywords() -> metadata_set(). Use gboolean type for boolean parameters.
authorLaurent Monin <geeqie@norz.org>
Sun, 30 Nov 2008 21:52:37 +0000 (21:52 +0000)
committerLaurent Monin <geeqie@norz.org>
Sun, 30 Nov 2008 21:52:37 +0000 (21:52 +0000)
src/bar_info.c
src/metadata.c
src/metadata.h

index 44b7a1d..145129a 100644 (file)
@@ -652,7 +652,7 @@ static void bar_info_save(GtkWidget *button, gpointer data)
        bar_info_write(bd);
 }
 
-static void bar_info_set_selection(BarInfoData *bd, gint set_keywords, gint set_comment, gint add)
+static void bar_info_set_selection(BarInfoData *bd, gboolean set_keywords, gboolean set_comment, gboolean append)
 {
        GList *keywords = NULL;
        GList *list = NULL;
@@ -671,7 +671,7 @@ static void bar_info_set_selection(BarInfoData *bd, gint set_keywords, gint set_
                comment = comment_pull(bd->comment_view);
                }
 
-       if (add && !keywords && !comment) return;
+       if (append && !keywords && !comment) return;
 
        list = bd->list_func(bd->list_data);
        work = list;
@@ -680,7 +680,7 @@ static void bar_info_set_selection(BarInfoData *bd, gint set_keywords, gint set_
                FileData *fd = work->data;
                work = work->next;
 
-               metadata_set_keywords(fd, keywords, comment, add);
+               metadata_set(fd, keywords, comment, append);
                }
 
        filelist_free(list);
index 230792b..42051c2 100644 (file)
@@ -455,7 +455,7 @@ gint metadata_read(FileData *fd, GList **keywords, gchar **comment)
        return TRUE;
 }
 
-void metadata_set_keywords(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gint add)
+void metadata_set(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gboolean append)
 {
        gchar *comment = NULL;
        GList *keywords = NULL;
@@ -465,7 +465,7 @@ void metadata_set_keywords(FileData *fd, GList *keywords_to_use, gchar *comment_
        
        if (comment_to_use)
                {
-               if (add && comment && *comment)
+               if (append && comment && *comment)
                        {
                        gchar *tmp = comment;
                                
@@ -481,7 +481,7 @@ void metadata_set_keywords(FileData *fd, GList *keywords_to_use, gchar *comment_
        
        if (keywords_to_use)
                {
-               if (add && keywords && g_list_length(keywords) > 0)
+               if (append && keywords && g_list_length(keywords) > 0)
                        {
                        GList *work;
 
index 63d3a19..8fd9125 100644 (file)
@@ -18,7 +18,7 @@ gint metadata_write(FileData *fd, GList *keywords, const gchar *comment);
 
 gint metadata_read(FileData *fd, GList **keywords, gchar **comment);
 
-void metadata_set_keywords(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gint add);
+void metadata_set(FileData *fd, GList *keywords_to_use, gchar *comment_to_use, gboolean append);
 gint keyword_list_find(GList *list, const gchar *keyword);
 GList *string_to_keywords_list(const gchar *text);