[glom] Recognize GdaBlob as suitable for Image field types.



commit 04c2f10474d7cb5f090cccff9d434000a0fc0257
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Nov 18 22:54:57 2011 +0100

    Recognize GdaBlob as suitable for Image field types.
    
    * glom/libglom/data_structure/field.cc: Add to the map, to avoid
    a warning.

 ChangeLog                            |    9 ++++++++-
 glom/libglom/data_structure/field.cc |    3 +++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 124fec3..4f22ac3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-11-18  Murray Cumming  <murrayc murrayc com>
 
+	Recognize GdaBlob as suitable for Image field types.
+
+	* glom/libglom/data_structure/field.cc: Add to the map, to avoid 
+	a warning.
+
+2011-11-18  Murray Cumming  <murrayc murrayc com>
+
 	Fix the build with latest GTK+ with --enable-warnings=fatal
 
 	* glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
@@ -13,7 +20,7 @@
 	* glom/mode_data/datawidget/checkbutton.h: Contructor:
 	Allow the title to be empty.
 	* glom/mode_data/datawidget/datawidget.cc: Give the checkbutton a title 
-  at the left, like other widgets. This looks consistent.
+	at the left, like other widgets. This looks consistent.
 
 2011-11-17  Murray Cumming  <murrayc murrayc com>
 
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 33beabc..ce01995 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -652,6 +652,9 @@ void Field::init_map()
     m_map_gda_type_to_glom_type[G_TYPE_BOOLEAN] = TYPE_BOOLEAN;
     m_map_gda_type_to_glom_type[GDA_TYPE_BINARY] = TYPE_IMAGE;
 
+    //SQLite can return a GdaBlob though it can take a GdaBinary:
+    m_map_gda_type_to_glom_type[GDA_TYPE_BLOB] = TYPE_IMAGE;
+
     //Extra conversions for GTypes that can be returned by glom_pygda_value_from_pyobject():
     m_map_gda_type_to_glom_type[G_TYPE_DOUBLE] = TYPE_NUMERIC;
     //TODO? m_map_gda_type_to_glom_type[GDA_TYPE_TIME] = ;



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