[gimp/metadata-browser] metadata: For XMP_TYPE_ALT_LANG only set the first value.



commit 51d52dc9a1cd71cc1efcfc188f97957b641987c4
Author: Roman Joost <roman bromeco de>
Date:   Wed Mar 6 19:51:17 2013 +1000

    metadata: For XMP_TYPE_ALT_LANG only set the first value.
    
    The value arrays first value is the encoded x-default. Use that in the
    UI to manipulate.

 plug-ins/metadata/xmp-model.c |   29 +++++++++++++----------------
 1 files changed, 13 insertions(+), 16 deletions(-)
---
diff --git a/plug-ins/metadata/xmp-model.c b/plug-ins/metadata/xmp-model.c
index c6975bd..f1b5433 100644
--- a/plug-ins/metadata/xmp-model.c
+++ b/plug-ins/metadata/xmp-model.c
@@ -1219,22 +1219,19 @@ xmp_model_set_property (XMPModel    *xmp_model,
           xmp_model->custom_properties =
             g_slist_prepend (xmp_model->custom_properties, property);
         }
-      for (i = 0; value[i] != NULL; i += 2)
-        {
-          gtk_tree_store_append (GTK_TREE_STORE (xmp_model), &child_iter, &iter);
-          gtk_tree_store_set (GTK_TREE_STORE (xmp_model), &child_iter,
-                              COL_XMP_NAME, property_name,
-                              COL_XMP_VALUE, value[i + 1],
-                              COL_XMP_VALUE_RAW, value,
-                              COL_XMP_TYPE_XREF, property,
-                              COL_XMP_WIDGET_XREF, NULL,
-                              COL_XMP_EDITABLE, property->editable,
-                              COL_XMP_EDIT_ICON, NULL,
-                              COL_XMP_VISIBLE, TRUE,
-                              COL_XMP_WEIGHT, PANGO_WEIGHT_NORMAL,
-                              COL_XMP_WEIGHT_SET, FALSE,
-                              -1);
-        }
+      gtk_tree_store_append (GTK_TREE_STORE (xmp_model), &child_iter, &iter);
+      gtk_tree_store_set (GTK_TREE_STORE (xmp_model), &child_iter,
+                          COL_XMP_NAME, property_name,
+                          COL_XMP_VALUE, value[1],
+                          COL_XMP_VALUE_RAW, value,
+                          COL_XMP_TYPE_XREF, property,
+                          COL_XMP_WIDGET_XREF, NULL,
+                          COL_XMP_EDITABLE, property->editable,
+                          COL_XMP_EDIT_ICON, NULL,
+                          COL_XMP_VISIBLE, TRUE,
+                          COL_XMP_WEIGHT, PANGO_WEIGHT_NORMAL,
+                          COL_XMP_WEIGHT_SET, FALSE,
+                          -1);
       result = TRUE;
       break;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]