? aclocal.m4
? autom4te.cache
? config.guess
? config.h
? config.log
? config.status
? config.sub
? configure
? glom.desktop
? glom.desktop.in
? glom_port.patch
? glom_port_libgdamm3_halfdone.patch
? intltool-extract
? intltool-extract.in
? intltool-merge
? intltool-merge.in
? intltool-update
? intltool-update.in
? libtool
? ltmain.sh
? mkinstalldirs
? python-apt-0.6.16.2ubuntu8
? python-apt_0.6.16.2ubuntu8.tar.gz
? saveasexsaved.glom
? stamp-h1
? temp.patch
? temp_clear.patch
? temp_tree.patch
? temp_tree2.patch
? testsmb2.glom
? tree_recreate.patch
? docs/Makefile
? docs/Makefile.in
? docs/user-guide/Makefile
? docs/user-guide/Makefile.in
? docs/user-guide/de/.xml2po.mo
? docs/user-guide/de/glom.xml
? docs/user-guide/de/legal.xml
? examples/Makefile
? examples/Makefile.in
? glom/glom
? glom/test_pyembed
? glom/layout_item_dialogs/Makefile
? glom/layout_item_dialogs/Makefile.in
? glom/libglom/Makefile
? glom/libglom/Makefile.in
? glom/libglom/test
? glom/libglom/data_structure/Makefile
? glom/libglom/data_structure/Makefile.in
? glom/libglom/data_structure/field.loT
? glom/libglom/data_structure/layout/Makefile
? glom/libglom/data_structure/layout/Makefile.in
? glom/libglom/data_structure/layout/report_parts/Makefile
? glom/libglom/data_structure/layout/report_parts/Makefile.in
? glom/libglom/document/Makefile
? glom/libglom/document/Makefile.in
? glom/libglom/python_embed/Makefile
? glom/libglom/python_embed/Makefile.in
? glom/mode_data/Makefile
? glom/mode_data/Makefile.in
? glom/mode_design/Makefile
? glom/mode_design/Makefile.in
? glom/mode_design/fields/Makefile
? glom/mode_design/fields/Makefile.in
? glom/mode_design/users/Makefile
? glom/mode_design/users/Makefile.in
? glom/mode_find/Makefile
? glom/mode_find/Makefile.in
? glom/navigation/Makefile
? glom/navigation/Makefile.in
? glom/python_embed/Makefile
? glom/python_embed/Makefile.in
? glom/python_embed/python_module/Makefile
? glom/python_embed/python_module/Makefile.in
? glom/relationships_overview/Makefile
? glom/relationships_overview/Makefile.in
? glom/reports/Makefile
? glom/reports/Makefile.in
? glom/translation/Makefile
? glom/translation/Makefile.in
? glom/utility_widgets/Makefile
? glom/utility_widgets/Makefile.in
? glom/utility_widgets/test
? glom/utility_widgets/adddel/Makefile
? glom/utility_widgets/adddel/Makefile.in
? glom/utility_widgets/adddel/eggcolumnchooser/Makefile
? glom/utility_widgets/adddel/eggcolumnchooser/Makefile.in
? glom/utility_widgets/db_adddel/Makefile
? glom/utility_widgets/db_adddel/Makefile.in
? icons/Makefile
? icons/Makefile.in
? macros/Makefile
? macros/Makefile.in
? po/stamp-it
Index: configure.in
===================================================================
RCS file: /cvs/gnome/glom/configure.in,v
retrieving revision 1.128
diff -u -p -r1.128 configure.in
--- configure.in	19 Oct 2006 10:18:12 -0000	1.128
+++ configure.in	1 Nov 2006 09:41:12 -0000
@@ -41,7 +41,7 @@ AC_LANG_CPLUSPLUS
 
 # Checks for libraries
 # We need libgnome only for gnome_help_display().:
-PKG_CHECK_MODULES(GLOM, bakery-2.4 >= 2.3.18 gtkmm-2.4 >= 2.6.1 gthread-2.0 gnome-vfsmm-2.6 >= 2.11.1 libgnomecanvasmm-2.6 >= 2.10.0 libxslt >= 1.1.10 pygda-1.2 pygtk-2.0 >= 2.6.0 libgnome-2.0 >= 2.6.0 iso-codes libgdamm-2.0 >= 1.3.7 libgtksourceviewmm-1.0)
+PKG_CHECK_MODULES(GLOM, bakery-2.4 >= 2.3.18 gtkmm-2.4 >= 2.6.1 gthread-2.0 gnome-vfsmm-2.6 >= 2.11.1 libgnomecanvasmm-2.6 >= 2.10.0 libxslt >= 1.1.10 pygtk-2.0 >= 2.6.0 libgnome-2.0 >= 2.6.0 iso-codes libgdamm-3.0 >= 1.3.7 libgtksourceviewmm-1.0)
 
 GLOM_LIBS+=" --no-undefined"
 AC_SUBST(GLOM_CFLAGS)
Index: glom/base_db.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/base_db.cc,v
retrieving revision 1.158
diff -u -p -r1.158 base_db.cc
--- glom/base_db.cc	19 Oct 2006 10:21:20 -0000	1.158
+++ glom/base_db.cc	1 Nov 2006 09:41:20 -0000
@@ -245,11 +245,11 @@ Base_DB::type_vecStrings Base_DB::get_ta
       int rows = data_model_tables->get_n_rows();
       for(int i = 0; i < rows; ++i)
       {
-        Gnome::Gda::Value value = data_model_tables->get_value_at(0, i);
+        Glib::ValueBase value = data_model_tables->get_value_at(0, i);
 
         //Get the table name:
         Glib::ustring table_name;
-        if(value.get_value_type() ==  Gnome::Gda::VALUE_TYPE_STRING)
+        if(G_VALUE_TYPE(value.gobj()) ==  G_TYPE_STRING)
         {
           table_name = value.get_string();
 
@@ -405,22 +405,22 @@ Base_DB::type_vecFields Base_DB::get_fie
       guint rows_count = data_model_fields->get_n_rows();
       while(row < rows_count)
       {
-        Gnome::Gda::FieldAttributes field_info;
+        Glib::RefPtr<Gnome::Gda::Column> field_info;
 
         //Get the field name:
-        Gnome::Gda::Value value_name = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_NAME, row);
-        if(value_name.get_value_type() ==  Gnome::Gda::VALUE_TYPE_STRING)
+        Glib::ValueBase value_name = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_NAME, row);
+        if(value_name.get_value_type() ==  G_TYPE_STRING)
         {
           if(value_name.get_string().empty())
             g_warning("Base_DB::get_fields_for_table_from_database(): value_name is empty.");
 
-          field_info.set_name( value_name.get_string() ); //TODO: get_string() is a dodgy choice. murrayc.
+          field_info->set_name( value_name.get_string() ); //TODO: get_string() is a dodgy choice. murrayc.
         }
 
         //Get the field type:
-        //This is a string representation of the type, so we need to discover the Gnome::Gda::ValueType for it:
-        Gnome::Gda::Value value_fieldtype = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_TYPE, row);
-        if(value_fieldtype.get_value_type() ==  Gnome::Gda::VALUE_TYPE_STRING)
+        //This is a string representation of the type, so we need to discover the GType for it:
+        Glib::ValueBase value_fieldtype = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_TYPE, row);
+        if(value_fieldtype.get_value_type() ==  G_TYPE_STRING)
         {
            Glib::ustring schema_type_string = value_fieldtype.get_string();
            if(!schema_type_string.empty())
@@ -429,42 +429,42 @@ Base_DB::type_vecFields Base_DB::get_fie
              const FieldTypes* pFieldTypes = connection_pool->get_field_types();
              if(pFieldTypes)
              {
-               Gnome::Gda::ValueType gdatype = pFieldTypes->get_gdavalue_for_schema_type_string(schema_type_string);
-               field_info.set_gdatype(gdatype);
+               GType gdatype = pFieldTypes->get_gdavalue_for_schema_type_string(schema_type_string);
+               field_info->set_gdatype(gdatype);
              }
            }
         }
 
         //Get the default value:
         /* libgda does not return this correctly yet. TODO: check bug http://bugzilla.gnome.org/show_bug.cgi?id=143576
-        Gnome::Gda::Value value_defaultvalue = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_DEFAULTVALUE, row);
-        if(value_defaultvalue.get_value_type() ==  Gnome::Gda::VALUE_TYPE_STRING)
-          field_info.set_default_value(value_defaultvalue);
+        Glib::ValueBase value_defaultvalue = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_DEFAULTVALUE, row);
+        if(value_defaultG_VALUE_TYPE(value.gobj()) ==  G_TYPE_STRING)
+          field_info->set_default_value(value_defaultvalue);
         */
 
         //Get whether it can be null:
-        Gnome::Gda::Value value_notnull = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_NOTNULL, row);
-        if(value_notnull.get_value_type() ==  Gnome::Gda::VALUE_TYPE_BOOLEAN)
-          field_info.set_allow_null(value_notnull.get_bool());
+        Glib::ValueBase value_notnull = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_NOTNULL, row);
+        if(value_notnull.get_value_type() ==  G_TYPE_BOOLEAN)
+          field_info->set_allow_null(value_notnull.get_bool());
 
 
         //Get whether it is a primary key:
-        Gnome::Gda::Value value_primarykey = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_PRIMARYKEY, row);
-        if(value_primarykey.get_value_type() ==  Gnome::Gda::VALUE_TYPE_BOOLEAN)
-          field_info.set_primary_key( value_primarykey.get_bool() );
+        Glib::ValueBase value_primarykey = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_PRIMARYKEY, row);
+        if(value_primarykey.get_value_type() ==  G_TYPE_BOOLEAN)
+          field_info->set_primary_key( value_primarykey.get_bool() );
 
         //Get whether it is unique
-        Gnome::Gda::Value value_unique = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_UNIQUEINDEX, row);
-        if(value_unique.get_value_type() ==  Gnome::Gda::VALUE_TYPE_BOOLEAN)
-          field_info.set_unique_key( value_unique.get_bool() );
-        else if(field_info.get_primary_key()) //All primaries keys are unique, so force this.
-          field_info.set_unique_key();
+        Glib::ValueBase value_unique = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_UNIQUEINDEX, row);
+        if(value_unique.get_value_type() ==  G_TYPE_BOOLEAN)
+          field_info->set_unique_key( value_unique.get_bool() );
+        else if(field_info->get_primary_key()) //All primaries keys are unique, so force this.
+          field_info->set_unique_key();
 
         //Get whether it is autoincrements
         /* libgda does not provide this yet.
-        Gnome::Gda::Value value_autoincrement = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_AUTOINCREMENT, row);
-        if(value_autoincrement.get_value_type() ==  Gnome::Gda::VALUE_TYPE_BOOLEAN)
-          field_info.set_auto_increment( value_autoincrement.get_bool() );
+        Glib::ValueBase value_autoincrement = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_AUTOINCREMENT, row);
+        if(value_autoincrement.get_value_type() ==  G_TYPE_BOOLEAN)
+          field_info->set_auto_increment( value_autoincrement.get_bool() );
         */
 
         sharedptr<Field> field(new Field()); //TODO: Get glom-specific information from the document?
@@ -515,19 +515,19 @@ Base_DB::type_vecFields Base_DB::get_fie
 
       if(iterFindDatabase != fieldsDatabase.end() ) //Ignore fields that don't exist in the database anymore.
       {
-        Gnome::Gda::FieldAttributes field_info_document = field->get_field_info();
+        Glib::RefPtr<Gnome::Gda::Column> field_info_document = field->get_field_info();
 
         //Update the Field information that _might_ have changed in the database.
-        Gnome::Gda::FieldAttributes field_info = (*iterFindDatabase)->get_field_info();
+        Glib::RefPtr<Gnome::Gda::Column> field_info = (*iterFindDatabase)->get_field_info();
 
         //libgda does not tell us whether the field is auto_incremented, so we need to get that from the document.
-        field_info.set_auto_increment( field_info_document.get_auto_increment() );
+        field_info->set_auto_increment( field_info_document.get_auto_increment() );
 
         //libgda does not tell us whether the field is auto_incremented, so we need to get that from the document.
-        field_info.set_primary_key( field_info_document.get_primary_key() );
+        field_info->set_primary_key( field_info_document.get_primary_key() );
 
         //libgda does yet tell us correct default_value information so we need to get that from the document.
-        field_info.set_default_value( field_info_document.get_default_value() );
+        field_info->set_default_value( field_info_document.get_default_value() );
 
         field->set_field_info(field_info);
 
@@ -699,9 +699,9 @@ bool Base_DB::add_standard_groups()
   return true;
 }
 
-Gnome::Gda::Value Base_DB::auto_increment_insert_first_if_necessary(const Glib::ustring& table_name, const Glib::ustring& field_name) const
+Glib::ValueBase Base_DB::auto_increment_insert_first_if_necessary(const Glib::ustring& table_name, const Glib::ustring& field_name) const
 {
-  Gnome::Gda::Value value;
+  Glib::ValueBase value;
 
   //Check that the user is allowd to view and edit this table:
   Privileges table_privs = Privs::get_current_privs(GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME);
@@ -756,14 +756,14 @@ void Base_DB::recalculate_next_auto_incr
   if(datamodel && datamodel->get_n_rows() && datamodel->get_n_columns())
   {
     //Increment it:
-    const Gnome::Gda::Value value_max = datamodel->get_value_at(0, 0);
-    long num_max = Utils::decimal_from_string(value_max.to_string()); //TODO: Is this sensible? Probably not.
+    const Glib::ValueBase value_max = datamodel->get_value_at(0, 0);
+    long num_max = Utils::decimal_from_string(Gnome::Gda::value_to_string(value_max)); //TODO: Is this sensible? Probably not.
     ++num_max;
 
     //Set it in the glom system table:
-    const Gnome::Gda::Value next_value = Conversions::parse_value(num_max);
+    const Glib::ValueBase next_value = Conversions::parse_value(num_max);
     const Glib::ustring sql_query = "UPDATE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME "\" SET "
-      "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + next_value.to_string() + //TODO: Don't use to_string().
+      "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + Gnome::Gda::value_to_string(next_value) + //TODO: Don't use to_string().
       " WHERE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_TABLE_NAME "\" = '" + table_name + "' AND "
              "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_FIELD_NAME "\" = '" + field_name + "'";
 
@@ -779,19 +779,19 @@ void Base_DB::recalculate_next_auto_incr
   }
 }
 
-Gnome::Gda::Value Base_DB::get_next_auto_increment_value(const Glib::ustring& table_name, const Glib::ustring& field_name) const
+Glib::ValueBase Base_DB::get_next_auto_increment_value(const Glib::ustring& table_name, const Glib::ustring& field_name) const
 {
-  const Gnome::Gda::Value result = auto_increment_insert_first_if_necessary(table_name, field_name);
+  const Glib::ValueBase result = auto_increment_insert_first_if_necessary(table_name, field_name);
   long num_result = 0;
-  num_result = Utils::decimal_from_string(result.to_string()); //TODO: Is this sensible? Probably not.
+  num_result = Utils::decimal_from_string(Gnome::Gda::value_to_string(result)); //TODO: Is this sensible? Probably not.
 
 
   //Increment the next_value:
   ++num_result;
-  const Gnome::Gda::Value next_value = Conversions::parse_value(num_result);
+  const Glib::ValueBase next_value = Conversions::parse_value(num_result);
 
   const Glib::ustring sql_query = "UPDATE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME "\" SET "
-      "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + next_value.to_string() +
+      "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + Gnome::Gda::value_to_string(next_value) +
       " WHERE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_TABLE_NAME "\" = '" + table_name + "' AND "
             "\""  GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_FIELD_NAME "\" = '" + field_name + "'";
 
@@ -912,8 +912,8 @@ bool Base_DB::create_table_with_default_
   field_primary_key->set_primary_key();
   field_primary_key->set_auto_increment();
 
-  Gnome::Gda::FieldAttributes field_info = field_primary_key->get_field_info();
-  field_info.set_allow_null(false);
+  Glib::RefPtr<Gnome::Gda::Column> field_info = field_primary_key->get_field_info();
+  field_info->set_allow_null(false);
   field_primary_key->set_field_info(field_info);
 
   field_primary_key->set_glom_type(Field::TYPE_NUMERIC);
@@ -999,7 +999,7 @@ bool Base_DB::create_table(const sharedp
 
     //The field has no gda type, so we set that:
     //This usually comes from the database, but that's a bit strange.
-    Gnome::Gda::FieldAttributes info = field->get_field_info();
+    Glib::RefPtr<Gnome::Gda::Column> info = field->get_field_info();
     info.set_gdatype( Field::get_gda_type_for_glom_type(field->get_glom_type()) );
     field->set_field_info(info); //TODO_Performance
 
@@ -1355,7 +1355,7 @@ bool Base_DB::show_warning_no_records_fo
   return find_again;
 }
 
-Glib::ustring Base_DB::get_find_where_clause_quick(const Glib::ustring& table_name, const Gnome::Gda::Value& quick_search) const
+Glib::ustring Base_DB::get_find_where_clause_quick(const Glib::ustring& table_name, const Glib::ValueBase& quick_search) const
 {
   Glib::ustring strClause;
 
@@ -1674,7 +1674,7 @@ void Base_DB::calculate_field_in_all_rec
   const int rows_count = data_model->get_n_rows();
   for(int row = 0; row < rows_count; ++row)
   {
-    const Gnome::Gda::Value primary_key_value = data_model->get_value_at(0, row);
+    const Glib::ValueBase primary_key_value = data_model->get_value_at(0, row);
     if(!Conversions::value_is_empty(primary_key_value))
     {
       field_in_record.m_key_value = primary_key_value;
@@ -1808,7 +1808,7 @@ void Base_DB::calculate_field(const Layo
 
 }
 
-Base_DB::type_map_fields Base_DB::get_record_field_values_for_calculation(const Glib::ustring& table_name, const sharedptr<const Field> primary_key, const Gnome::Gda::Value& primary_key_value)
+Base_DB::type_map_fields Base_DB::get_record_field_values_for_calculation(const Glib::ustring& table_name, const sharedptr<const Field> primary_key, const Glib::ValueBase& primary_key_value)
 {
   type_map_fields field_values;
 
@@ -1843,11 +1843,11 @@ Base_DB::type_map_fields Base_DB::get_re
           //There should be only 1 row. Well, there could be more but we will ignore them.
           sharedptr<const Field> field = *iter;
 
-          Gnome::Gda::Value value = data_model->get_value_at(col_index, 0);
+          Glib::ValueBase value = data_model->get_value_at(col_index, 0);
 
           //Never give a NULL-type value to the python calculation for types that don't use them:
           //to prevent errors:
-          if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_NULL)
+          if(G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_NULL)
             value = Conversions::get_empty_value(field->get_glom_type());
 
           field_values[field->get_name()] = value;
@@ -1874,23 +1874,23 @@ Base_DB::type_map_fields Base_DB::get_re
   return field_values;
 }
 
-void Base_DB::set_entered_field_data(const sharedptr<const LayoutItem_Field>& /* field */, const Gnome::Gda::Value& /* value */)
+void Base_DB::set_entered_field_data(const sharedptr<const LayoutItem_Field>& /* field */, const Glib::ValueBase& /* value */)
 {
   //Override this.
 }
 
 
-void Base_DB::set_entered_field_data(const Gtk::TreeModel::iterator& /* row */, const sharedptr<const LayoutItem_Field>& /* field */, const Gnome::Gda::Value& /* value */)
+void Base_DB::set_entered_field_data(const Gtk::TreeModel::iterator& /* row */, const sharedptr<const LayoutItem_Field>& /* field */, const Glib::ValueBase& /* value */)
 {
   //Override this.
 }
 
-bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Gnome::Gda::Value& field_value, bool use_current_calculations, Gtk::Window* parent_window)
+bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Glib::ValueBase& field_value, bool use_current_calculations, Gtk::Window* parent_window)
 {
   return set_field_value_in_database(field_in_record, Gtk::TreeModel::iterator(), field_value, use_current_calculations, parent_window);
 }
 
-bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield_in_record, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value, bool use_current_calculations, Gtk::Window* parent_window)
+bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield_in_record, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value, bool use_current_calculations, Gtk::Window* parent_window)
 {
   Document_Glom* document = get_document();
   g_assert(document);
@@ -1955,9 +1955,9 @@ bool Base_DB::set_field_value_in_databas
   return true;
 }
 
-Gnome::Gda::Value Base_DB::get_field_value_in_database(const LayoutFieldInRecord& field_in_record, Gtk::Window* /* parent_window */)
+Glib::ValueBase Base_DB::get_field_value_in_database(const LayoutFieldInRecord& field_in_record, Gtk::Window* /* parent_window */)
 {
-  Gnome::Gda::Value result;  //TODO: Return suitable empty value for the field when failing?
+  Glib::ValueBase result;  //TODO: Return suitable empty value for the field when failing?
 
   //row is invalid, and ignored, for Box_Data_Details.
   if(!(field_in_record.m_field))
@@ -2144,7 +2144,7 @@ Base_DB::type_list_const_field_items Bas
 }
 
 
-void Base_DB::do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value)
+void Base_DB::do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value)
 {
    //Get values for lookup fields, if this field triggers those relationships:
    //TODO_performance: There is a LOT of iterating and copying here.
@@ -2164,9 +2164,9 @@ void Base_DB::do_lookups(const LayoutFie
       sharedptr<const Field> field_source = get_fields_for_table_one_field(relationship->get_to_table(), field_lookup->get_lookup_field());
       if(field_source)
       {
-        const Gnome::Gda::Value value = get_lookup_value(field_in_record.m_table_name, iter->second /* relationship */,  field_source /* the field to look in to get the value */, field_value /* Value of to and from fields */);
+        const Glib::ValueBase value = get_lookup_value(field_in_record.m_table_name, iter->second /* relationship */,  field_source /* the field to look in to get the value */, field_value /* Value of to and from fields */);
 
-        const Gnome::Gda::Value value_converted = Conversions::convert_value(value, layout_item->get_glom_type());
+        const Glib::ValueBase value_converted = Conversions::convert_value(value, layout_item->get_glom_type());
 
         LayoutFieldInRecord field_in_record_to_set(layout_item, field_in_record.m_table_name /* parent table */, field_in_record.m_key, field_in_record.m_key_value);
 
@@ -2228,20 +2228,20 @@ Base_DB::type_list_lookups Base_DB::get_
   return result;
 }
 
-void Base_DB::refresh_related_fields(const LayoutFieldInRecord& /* field_in_record_changed */, const Gtk::TreeModel::iterator& /* row */, const Gnome::Gda::Value& /* field_value */)
+void Base_DB::refresh_related_fields(const LayoutFieldInRecord& /* field_in_record_changed */, const Gtk::TreeModel::iterator& /* row */, const Glib::ValueBase& /* field_value */)
 {
   //overridden in Box_Data.
 }
 
-Gnome::Gda::Value Base_DB::get_lookup_value(const Glib::ustring& /* table_name */, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& source_field, const Gnome::Gda::Value& key_value)
+Glib::ValueBase Base_DB::get_lookup_value(const Glib::ustring& /* table_name */, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& source_field, const Glib::ValueBase& key_value)
 {
-  Gnome::Gda::Value result;
+  Glib::ValueBase result;
 
   sharedptr<Field> to_key_field = get_fields_for_table_one_field(relationship->get_to_table(), relationship->get_to_field());
   if(to_key_field)
   {
     //Convert the value, in case the from and to fields have different types:
-    const Gnome::Gda::Value value_to_key_field = Conversions::convert_value(key_value, to_key_field->get_glom_type());
+    const Glib::ValueBase value_to_key_field = Conversions::convert_value(key_value, to_key_field->get_glom_type());
 
     Glib::ustring strQuery = "SELECT \"" + relationship->get_to_table() + "\".\"" + source_field->get_name() + "\" FROM \"" +  relationship->get_to_table() + "\"";
     strQuery += " WHERE \"" + to_key_field->get_name() + "\" = " + to_key_field->sql(value_to_key_field);
@@ -2261,7 +2261,7 @@ Gnome::Gda::Value Base_DB::get_lookup_va
   return result;
 }
 
-bool Base_DB::get_field_value_is_unique(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+bool Base_DB::get_field_value_is_unique(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   bool result = true;  //Arbitrarily default to saying it's unique if we can't get any result.
 
@@ -2272,7 +2272,7 @@ bool Base_DB::get_field_value_is_unique(
   Glib::RefPtr<Gnome::Gda::DataModel> data_model = query_execute(strQuery);
   if(data_model)
   {
-    //std::cout << "debug: Base_DB::get_field_value_is_unique(): table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << value.to_string() << ", rows count=" << data_model->get_n_rows() << std::endl;
+    //std::cout << "debug: Base_DB::get_field_value_is_unique(): table_name=" << table_name << ", field name=" << field->get_name() << ", value=" << Gnome::Gda::value_to_string(value) << ", rows count=" << data_model->get_n_rows() << std::endl;
     //The value is unique for this field, if the query returned no existing rows:
 
     result = (data_model->get_n_rows() == 0);
@@ -2285,12 +2285,12 @@ bool Base_DB::get_field_value_is_unique(
   return result;
 }
 
-bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& layout_field, const Gnome::Gda::Value& field_value, Gtk::Window* parent_window)
+bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& layout_field, const Glib::ValueBase& field_value, Gtk::Window* parent_window)
 {
   return check_entered_value_for_uniqueness(table_name, Gtk::TreeModel::iterator(), layout_field, field_value, parent_window);
 }
 
-bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name, const Gtk::TreeModel::iterator& /* row */,  const sharedptr<const LayoutItem_Field>& layout_field, const Gnome::Gda::Value& field_value, Gtk::Window* parent_window)
+bool Base_DB::check_entered_value_for_uniqueness(const Glib::ustring& table_name, const Gtk::TreeModel::iterator& /* row */,  const sharedptr<const LayoutItem_Field>& layout_field, const Glib::ValueBase& field_value, Gtk::Window* parent_window)
 {
   //Check whether the value meets uniqueness constraints, if any:
   const sharedptr<const Field>& field = layout_field->get_full_field_details();
@@ -2298,7 +2298,7 @@ bool Base_DB::check_entered_value_for_un
   {
     if(!get_field_value_is_unique(table_name, layout_field, field_value))
     {
-      //std::cout << "debug Base_DB::check_entered_value_for_uniqueness(): field=" << layout_field->get_name() << ", value is not unique: " << field_value.to_string() << std::endl;
+      //std::cout << "debug Base_DB::check_entered_value_for_uniqueness(): field=" << layout_field->get_name() << ", value is not unique: " << Gnome::Gda::value_to_string(field_value) << std::endl;
 
       //Warn the user and revert the value:
       if(parent_window)
@@ -2442,7 +2442,7 @@ sharedptr<const UsesRelationship> Base_D
   return sharedptr<UsesRelationship>(); 
 }
 
-bool Base_DB::get_primary_key_is_in_foundset(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value)
+bool Base_DB::get_primary_key_is_in_foundset(const FoundSet& found_set, const Glib::ValueBase& primary_key_value)
 {
   //TODO_Performance: This is probably called too often, when we should know that the key is in the found set.
   sharedptr<const Field> primary_key = get_field_primary_key_for_table(found_set.m_table_name);
Index: glom/base_db.h
===================================================================
RCS file: /cvs/gnome/glom/glom/base_db.h,v
retrieving revision 1.74
diff -u -p -r1.74 base_db.h
--- glom/base_db.h	8 Oct 2006 19:30:52 -0000	1.74
+++ glom/base_db.h	1 Nov 2006 09:41:20 -0000
@@ -131,11 +131,11 @@ protected:
 
   sharedptr<Field> get_field_primary_key_for_table(const Glib::ustring& table_name) const;
 
-  Glib::ustring get_find_where_clause_quick(const Glib::ustring& table_name, const Gnome::Gda::Value& quick_search) const;
+  Glib::ustring get_find_where_clause_quick(const Glib::ustring& table_name, const Glib::ValueBase& quick_search) const;
 
 
-  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value&  value);
-  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase&  value);
+  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
 
 
   class FieldInRecord
@@ -144,12 +144,12 @@ protected:
     FieldInRecord()
     {}
 
-    FieldInRecord(const Glib::ustring& table_name, const sharedptr<const Field>& field, const sharedptr<const Field>& key, const Gnome::Gda::Value& key_value)
+    FieldInRecord(const Glib::ustring& table_name, const sharedptr<const Field>& field, const sharedptr<const Field>& key, const Glib::ValueBase& key_value)
     : m_table_name(table_name), m_field(field), m_key(key), m_key_value(key_value)
     {
     }
 
-    FieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Gnome::Gda::Value& key_value, const Document_Glom& document)
+    FieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Glib::ValueBase& key_value, const Document_Glom& document)
     : m_key_value(key_value)
     {
       m_field = layout_item->get_full_field_details();
@@ -190,7 +190,7 @@ protected:
 
     //Identify the record:
     sharedptr<const Field> m_key;
-    Gnome::Gda::Value m_key_value;
+    Glib::ValueBase m_key_value;
   };
 
 
@@ -200,7 +200,7 @@ protected:
     LayoutFieldInRecord()
     {}
 
-    LayoutFieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Gnome::Gda::Value& key_value)
+    LayoutFieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Glib::ValueBase& key_value)
     : m_key_value(key_value)
     {
       m_field = layout_item;
@@ -219,7 +219,7 @@ protected:
 
     //Identify the record:
     sharedptr<const Field> m_key;
-    Gnome::Gda::Value m_key_value;
+    Glib::ValueBase m_key_value;
   };
 
   /** Calculate values for fields, set them in the database, and show them in the layout.
@@ -248,12 +248,12 @@ protected:
   void calculate_field_in_all_records(const Glib::ustring& table_name, const sharedptr<const Field>& field);
   void calculate_field_in_all_records(const Glib::ustring& table_name, const sharedptr<const Field>& field, const sharedptr<const Field>& primary_key);
 
-  typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_fields;
+  typedef std::map<Glib::ustring, Glib::ValueBase> type_map_fields;
   //TODO: Performance: This is massively inefficient:
-  type_map_fields get_record_field_values_for_calculation(const Glib::ustring& table_name, const sharedptr<const Field> primary_key, const Gnome::Gda::Value& primary_key_value);
+  type_map_fields get_record_field_values_for_calculation(const Glib::ustring& table_name, const sharedptr<const Field> primary_key, const Glib::ValueBase& primary_key_value);
 
 
-  void do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value);
+  void do_lookups(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value);
 
   typedef std::pair< sharedptr<LayoutItem_Field>, sharedptr<Relationship> > type_pairFieldTrigger;
   typedef std::list<type_pairFieldTrigger> type_list_lookups;
@@ -266,29 +266,29 @@ protected:
 
   /** Get the value of the @a source_field from the @a relationship, using the @a key_value.
    */
-  Gnome::Gda::Value get_lookup_value(const Glib::ustring& table_name, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& source_field, const Gnome::Gda::Value & key_value);
+  Glib::ValueBase get_lookup_value(const Glib::ustring& table_name, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& source_field, const Glib::ValueBase & key_value);
 
 
-  virtual void refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value);
+  virtual void refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value);
 
 
 
-  bool set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Gnome::Gda::Value& field_value, bool use_current_calculations = false, Gtk::Window* parent_window = 0);
-  bool set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value, bool use_current_calculations = false, Gtk::Window* parent_window = 0);
+  bool set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Glib::ValueBase& field_value, bool use_current_calculations = false, Gtk::Window* parent_window = 0);
+  bool set_field_value_in_database(const LayoutFieldInRecord& field_in_record, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value, bool use_current_calculations = false, Gtk::Window* parent_window = 0);
 
   //Get a single field value from the database.
-  Gnome::Gda::Value get_field_value_in_database(const LayoutFieldInRecord& field_in_record, Gtk::Window* parent_window);
+  Glib::ValueBase get_field_value_in_database(const LayoutFieldInRecord& field_in_record, Gtk::Window* parent_window);
 
 
   SystemPrefs get_database_preferences() const;
   void set_database_preferences(const SystemPrefs& prefs);
 
-  Gnome::Gda::Value auto_increment_insert_first_if_necessary(const Glib::ustring& table_name, const Glib::ustring& field_name) const;
+  Glib::ValueBase auto_increment_insert_first_if_necessary(const Glib::ustring& table_name, const Glib::ustring& field_name) const;
 
   /** Get the next auto-increment value for this primary key, from the glom system table.
    * Add a row for this field in the system table if it does not exist already.
    */
-  Gnome::Gda::Value get_next_auto_increment_value(const Glib::ustring& table_name, const Glib::ustring& field_name) const;
+  Glib::ValueBase get_next_auto_increment_value(const Glib::ustring& table_name, const Glib::ustring& field_name) const;
 
   /** Set the next auto-increment value in the glom system table, by examining all current values.
    * Use this, for instance, after importing rows.
@@ -296,10 +296,10 @@ protected:
    */
   void recalculate_next_auto_increment_value(const Glib::ustring& table_name, const Glib::ustring& field_name) const;
 
-  bool get_field_value_is_unique(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+  bool get_field_value_is_unique(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
 
-  bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value, Gtk::Window* parent_window);
-  bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const Gtk::TreeModel::iterator& /* row */,  const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value, Gtk::Window* parent_window);
+  bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value, Gtk::Window* parent_window);
+  bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const Gtk::TreeModel::iterator& /* row */,  const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value, Gtk::Window* parent_window);
 
   virtual bool fill_from_database();
   virtual void fill_end(); //Call this from the end of fill_from_database() overrides.
@@ -317,7 +317,7 @@ protected:
   sharedptr<const LayoutItem_Field> get_field_is_from_non_hidden_related_record(const sharedptr<const LayoutItem_Portal>& portal) const;
   sharedptr<const LayoutItem_Field> get_field_identifies_non_hidden_related_record(const sharedptr<const LayoutItem_Portal>& portal, sharedptr<const Relationship>& used_in_relationship) const;
 
-  bool get_primary_key_is_in_foundset(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value);
+  bool get_primary_key_is_in_foundset(const FoundSet& found_set, const Glib::ValueBase& primary_key_value);
 
   static bool get_field_primary_key_index_for_fields(const type_vecFields& fields, guint& field_column);
   static bool get_field_primary_key_index_for_fields(const type_vecLayoutFields& fields, guint& field_column);
Index: glom/box_db_table.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/box_db_table.cc,v
retrieving revision 1.39
diff -u -p -r1.39 box_db_table.cc
--- glom/box_db_table.cc	27 May 2006 09:26:33 -0000	1.39
+++ glom/box_db_table.cc	1 Nov 2006 09:41:20 -0000
@@ -62,7 +62,7 @@ bool Box_DB_Table::refresh_data_from_dat
   return fill_from_database();
 }
 
-Gnome::Gda::Value Box_DB_Table::get_entered_field_data_field_only(const sharedptr<const Field>& field) const
+Glib::ValueBase Box_DB_Table::get_entered_field_data_field_only(const sharedptr<const Field>& field) const
 {
   sharedptr<LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::create();
   layout_item->set_full_field_details(field); 
@@ -70,11 +70,11 @@ Gnome::Gda::Value Box_DB_Table::get_ente
   return get_entered_field_data(layout_item);
 }
 
-Gnome::Gda::Value Box_DB_Table::get_entered_field_data(const sharedptr<const LayoutItem_Field>& /* field */) const
+Glib::ValueBase Box_DB_Table::get_entered_field_data(const sharedptr<const LayoutItem_Field>& /* field */) const
 {
   //Override this to use Field::set_data() too.
 
-  return Gnome::Gda::Value(); //null
+  return Glib::ValueBase(); //null
 }
 
 unsigned long Box_DB_Table::get_last_auto_increment_value(const Glib::RefPtr<Gnome::Gda::DataModel>& data_model, const Glib::ustring& /* field_name */)
@@ -106,7 +106,7 @@ Box_DB_Table::type_vecFields Box_DB_Tabl
   int columns =  data_model->get_n_columns();
   for(int i = 0; i < columns; ++i)
   {
-    Gnome::Gda::FieldAttributes fieldinfo = data_model->describe_column(i);
+    Glib::RefPtr<Gnome::Gda::Column> fieldinfo = data_model->describe_column(i);
     sharedptr<Field> field(new Field());
     field->set_field_info(fieldinfo); //TODO: Get glom-specific information from document?
     result.push_back( field );
@@ -116,7 +116,7 @@ Box_DB_Table::type_vecFields Box_DB_Tabl
 }
 */
 
-Glib::ustring Box_DB_Table::postgres_get_field_definition_for_sql(const Gnome::Gda::FieldAttributes& field_info)
+Glib::ustring Box_DB_Table::postgres_get_field_definition_for_sql(const Glib::RefPtr<const Gnome::Gda::Column>& field_info)
 {
   Glib::ustring strResult;
 
@@ -124,7 +124,7 @@ Glib::ustring Box_DB_Table::postgres_get
   Glib::ustring strType = "unknowntype";
 
   //Postgres has a special "serial" datatype. (MySQL uses a numeric type, and has an extra "AUTO_INCREMENT" command)
-  if(false) //disabled for now - see generate_next_auto_increment() //field_info.get_auto_increment())
+  if(false) //disabled for now - see generate_next_auto_increment() //field_info->get_auto_increment())
   {
     strType = "serial";
   }
@@ -136,7 +136,7 @@ Glib::ustring Box_DB_Table::postgres_get
       const FieldTypes* pFieldTypes = pConnectionPool->get_field_types();
       if(pFieldTypes)
       {
-        const Gnome::Gda::ValueType fieldType = field_info.get_gdatype();
+        const GType fieldType = field_info->get_type();
         strType = pFieldTypes->get_string_name_for_gdavaluetype(fieldType);
       }
     }
@@ -188,23 +188,23 @@ Glib::ustring Box_DB_Table::postgres_get
   */
 
   //Unique:
-  if(field_info.get_unique_key())
+  if(field_info->get_unique_key())
     strResult += " UNIQUE";
 
   /* Posgres needs us to do this separately
   //Not Null:
-  if(!(field_info.get_allow_null()))
+  if(!(field_info->get_allow_null()))
     strResult += " NOT NULL";
   */
 
   //Default:
-  Gnome::Gda::Value valueDefault = field_info.get_default_value();
+  Glib::ValueBase valueDefault = field_info->get_default_value();
   const Glib::ustring& strDefault =  valueDefault.to_string();
   if(!strDefault.empty() && strDefault != "NULL")
     strResult += " DEFAULT " + strDefault; //TODO: Quote/Escape it if necessary.
 
   //Primary Key:
-  if(field_info.get_primary_key())
+  if(field_info->get_primary_key())
     strResult += " PRIMARY KEY";
 
   return strResult;
Index: glom/box_db_table.h
===================================================================
RCS file: /cvs/gnome/glom/glom/box_db_table.h,v
retrieving revision 1.28
diff -u -p -r1.28 box_db_table.h
--- glom/box_db_table.h	27 May 2006 09:26:33 -0000	1.28
+++ glom/box_db_table.h	1 Nov 2006 09:41:20 -0000
@@ -42,14 +42,14 @@ public: 
   virtual Glib::ustring get_table_name();
 
   //TODO: Put this somewhere more sensible:
-  typedef std::map<Gnome::Gda::ValueType, Glib::ustring> type_map_valuetypes;
+  typedef std::map<GType, Glib::ustring> type_map_valuetypes;
 
 protected:
 
-  //virtual Glib::RefPtr<Gnome::Gda::DataModel> record_new(Gnome::Gda::Value primary_key_value);
+  //virtual Glib::RefPtr<Gnome::Gda::DataModel> record_new(Glib::ValueBase primary_key_value);
 
-  Gnome::Gda::Value get_entered_field_data_field_only(const sharedptr<const Field>& field) const;
-  virtual Gnome::Gda::Value get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
+  Glib::ValueBase get_entered_field_data_field_only(const sharedptr<const Field>& field) const;
+  virtual Glib::ValueBase get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
 
   //static sharedptr<Field> get_field_primary_key(const type_vecFields& fields);
 
@@ -57,7 +57,7 @@ protected:
 
 
   //static type_vecFields get_fields_for_datamodel(const Glib::RefPtr<Gnome::Gda::DataModel>& data_model); 
-  static Glib::ustring postgres_get_field_definition_for_sql(const Gnome::Gda::FieldAttributes& field_info);
+  static Glib::ustring postgres_get_field_definition_for_sql(const Glib::RefPtr<Gnome::Gda::Column>& field_info);
 
   Glib::ustring m_table_name;
 };
Index: glom/dialog_database_preferences.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/dialog_database_preferences.cc,v
retrieving revision 1.15
diff -u -p -r1.15 dialog_database_preferences.cc
--- glom/dialog_database_preferences.cc	27 May 2006 15:44:14 -0000	1.15
+++ glom/dialog_database_preferences.cc	1 Nov 2006 09:41:21 -0000
@@ -94,10 +94,10 @@ void Dialog_Database_Preferences::on_tre
     const Glib::ustring table_name = row[m_columns.m_col_table];
     const Glib::ustring field_name = row[m_columns.m_col_field];
 
-    const Gnome::Gda::Value next_value = Conversions::parse_value(new_value);
+    const Glib::ValueBase next_value = Conversions::parse_value(new_value);
 
     const Glib::ustring sql_query = "UPDATE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_TABLE_NAME "\" SET "
-        "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + next_value.to_string() +
+        "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_NEXT_VALUE "\" = " + Gnome::Gda::value_to_string(next_value) +
         " WHERE \"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_TABLE_NAME "\" = '" + table_name + "' AND "
                "\"" GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_FIELD_NAME "\" = '" + field_name +"'";
 
Index: glom/dialog_invalid_data.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/dialog_invalid_data.cc,v
retrieving revision 1.7
diff -u -p -r1.7 dialog_invalid_data.cc
--- glom/dialog_invalid_data.cc	12 Oct 2006 09:53:35 -0000	1.7
+++ glom/dialog_invalid_data.cc	1 Nov 2006 09:41:21 -0000
@@ -64,7 +64,7 @@ void Dialog_InvalidData::set_example_dat
       date.day = 31;
       date.month = 1;
       date.year = 2005;
-      example_text = Conversions::get_text_for_gda_value(glom_type, Gnome::Gda::Value(date));
+      example_text = Conversions::get_text_for_gda_value(glom_type, Glib::ValueBase(date));
       break;
     }
     case(Field::TYPE_TIME):
@@ -73,12 +73,12 @@ void Dialog_InvalidData::set_example_dat
       time.hour = 13;
       time.minute = 02;
       time.second = 03;
-      example_text = Conversions::get_text_for_gda_value(glom_type, Gnome::Gda::Value(time));
+      example_text = Conversions::get_text_for_gda_value(glom_type, Glib::ValueBase(time));
       break;
     }
     case(Field::TYPE_NUMERIC):
     {
-      Gnome::Gda::Value gda_value(12345678.91);
+      Glib::ValueBase gda_value(12345678.91);
       example_text = Conversions::get_text_for_gda_value(glom_type, gda_value);
       break;
     }
Index: glom/frame_glom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/frame_glom.cc,v
retrieving revision 1.107
diff -u -p -r1.107 frame_glom.cc
--- glom/frame_glom.cc	12 Oct 2006 09:53:35 -0000	1.107
+++ glom/frame_glom.cc	1 Nov 2006 09:41:21 -0000
@@ -381,7 +381,7 @@ void Frame_Glom::show_table_refresh()
   show_table(m_table_name);
 }
 
-void Frame_Glom::show_table(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details)
+void Frame_Glom::show_table(const Glib::ustring& table_name, const Glib::ValueBase& primary_key_value_for_details)
 {
   App_Glom* pApp = dynamic_cast<App_Glom*>(get_app_window());
 
@@ -589,7 +589,7 @@ void Frame_Glom::export_data_to_string(G
 
         for(guint col_index = 0; col_index < columns_count; ++col_index)
         {
-          const Gnome::Gda::Value value = result->get_value_at(col_index, row_index);
+          const Glib::ValueBase value = result->get_value_at(col_index, row_index);
 
           sharedptr<LayoutItem_Field> layout_item = fieldsSequence[col_index];
           //if(layout_item->m_field.get_glom_type() != Field::TYPE_IMAGE) //This is too much data.
@@ -638,7 +638,7 @@ void Frame_Glom::export_data_to_stream(s
 
         for(guint col_index = 0; col_index < columns_count; ++col_index)
         {
-          const Gnome::Gda::Value value = result->get_value_at(col_index, row_index);
+          const Glib::ValueBase value = result->get_value_at(col_index, row_index);
 
           sharedptr<LayoutItem_Field> layout_item = fieldsSequence[col_index];
           //if(layout_item->m_field.get_glom_type() != Field::TYPE_IMAGE) //This is too much data.
@@ -954,7 +954,7 @@ void Frame_Glom::on_button_quickfind()
   }
   else
   {
-    const Glib::ustring where_clause = get_find_where_clause_quick(m_table_name, Gnome::Gda::Value(criteria));
+    const Glib::ustring where_clause = get_find_where_clause_quick(m_table_name, Glib::ValueBase(criteria));
     //std::cout << "Frame_Glom::on_button_quickfind(): where_clause=" << where_clause << std::endl;
     on_notebook_find_criteria(where_clause);
   }
@@ -1043,7 +1043,7 @@ void Frame_Glom::update_table_in_documen
   //Add any new/changed information from the database to the document
   //The database should never change without the knowledge of the document anyway, so this should be unnecessary.
 
-  //TODO_performance: There are a lot of temporary Field and FieldAttributes instances here, with a lot of string copying.
+  //TODO_performance: There are a lot of temporary Field and Column instances here, with a lot of string copying.
 
   //For instance, changed field details, or new fields, or removed fields.
   typedef Box_DB_Table::type_vecFields type_vecFields;
@@ -1076,7 +1076,7 @@ void Frame_Glom::update_table_in_documen
         else //if it was found.
         {
           //Compare the information:
-          Gnome::Gda::FieldAttributes field_info_db = field_database->get_field_info();
+          Glib::RefPtr<Gnome::Gda::Column> field_info_db = field_database->get_field_info();
           sharedptr<Field> field_document =  *iterFindDoc;
           if(field_document)
           {
@@ -1710,7 +1710,7 @@ void Frame_Glom::on_dialog_tables_hide()
   }
 }
 
-void Frame_Glom::on_notebook_data_record_details_requested(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value)
+void Frame_Glom::on_notebook_data_record_details_requested(const Glib::ustring& table_name, Glib::ValueBase primary_key_value)
 {
   show_table(table_name, primary_key_value);
   //m_Notebook_Data.show_details(primary_key_value);
Index: glom/frame_glom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/frame_glom.h,v
retrieving revision 1.50
diff -u -p -r1.50 frame_glom.h
--- glom/frame_glom.h	30 Sep 2006 12:54:08 -0000	1.50
+++ glom/frame_glom.h	1 Nov 2006 09:41:22 -0000
@@ -133,7 +133,7 @@ protected:
 
   //virtual void set_document(Document_Glom* pDocument); //override
 
-  void show_table(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details = Gnome::Gda::Value());
+  void show_table(const Glib::ustring& table_name, const Glib::ValueBase& primary_key_value_for_details = Glib::ValueBase());
   void show_table_title();
   void update_table_in_document_from_database();
 
@@ -151,7 +151,7 @@ protected:
   void on_notebook_find_criteria(const Glib::ustring& where_clause);
   void on_button_quickfind();
   void on_button_find_all();
-  void on_notebook_data_record_details_requested(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+  void on_notebook_data_record_details_requested(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
   void on_userlevel_changed(AppState::userlevels userlevel);
 
   void on_dialog_add_related_table_response(int response);
Index: glom/glom_postgres.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/glom_postgres.cc,v
retrieving revision 1.4
diff -u -p -r1.4 glom_postgres.cc
--- glom/glom_postgres.cc	27 May 2006 15:44:14 -0000	1.4
+++ glom/glom_postgres.cc	1 Nov 2006 09:41:22 -0000
@@ -27,10 +27,10 @@ bool GlomPostgres::postgres_add_column(c
 {
   sharedptr<Field> field_to_add = glom_sharedptr_clone(field);
 
-  Gnome::Gda::FieldAttributes field_info = field_to_add->get_field_info();
-  if((field_info.get_gdatype() == Gnome::Gda::VALUE_TYPE_UNKNOWN) || (field_info.get_gdatype() == Gnome::Gda::VALUE_TYPE_NULL))
+  Glib::RefPtr<Gnome::Gda::Column> field_info = field_to_add->get_field_info();
+  if((field_info->get_type() == Gnome::Gda::VALUE_TYPE_UNKNOWN) || (field_info->get_type() == Gnome::Gda::VALUE_TYPE_NULL))
   {
-    field_info.set_gdatype( Field::get_gda_type_for_glom_type(field_to_add->get_glom_type()) );
+    field_info->set_gdatype( Field::get_gda_type_for_glom_type(field_to_add->get_glom_type()) );
     field_to_add->set_field_info(field_info);
   }
 
@@ -49,8 +49,8 @@ bool GlomPostgres::postgres_add_column(c
 
 sharedptr<Field> GlomPostgres::postgres_change_column_extras(const Glib::ustring& table_name, const sharedptr<const Field>& field_old, const sharedptr<const Field>& field, bool set_anyway)
 {
-  //Gnome::Gda::FieldAttributes field_info = field->get_field_info();
-  //Gnome::Gda::FieldAttributes field_info_old = field_old->get_field_info();
+  //Glib::RefPtr<Gnome::Gda::Column> field_info = field->get_field_info();
+  //Glib::RefPtr<Gnome::Gda::Column> field_info_old = field_old->get_field_info();
 
   sharedptr<Field> result = glom_sharedptr_clone(field);
 
@@ -148,8 +148,8 @@ sharedptr<Field> GlomPostgres::postgres_
     }
 
 
-    const Gnome::Gda::Value default_value = field->get_default_value();
-    const Gnome::Gda::Value default_value_old = field_old->get_default_value();
+    const Glib::ValueBase default_value = field->get_default_value();
+    const Glib::ValueBase default_value_old = field_old->get_default_value();
 
     if(!field->get_auto_increment()) //Postgres auto-increment fields have special code as their default values.
     {
@@ -166,7 +166,7 @@ sharedptr<Field> GlomPostgres::postgres_
   }
 
   /* This should have been dealt with by postgres_change_column_type(), because postgres uses a different ("serial") field type for auto-incrementing fields.
-  if(field_info.get_auto_increment() != field_info_old.get_auto_increment())
+  if(field_info->get_auto_increment() != field_info_old.get_auto_increment())
   {
 
   }
Index: glom/glom_privs.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/glom_privs.cc,v
retrieving revision 1.3
diff -u -p -r1.3 glom_privs.cc
--- glom/glom_privs.cc	27 May 2006 15:44:14 -0000	1.3
+++ glom/glom_privs.cc	1 Nov 2006 09:41:22 -0000
@@ -35,7 +35,7 @@ Privs::type_vecStrings Privs::get_databa
     const int rows_count = data_model->get_n_rows();
     for(int row = 0; row < rows_count; ++row)
     {
-      const Gnome::Gda::Value value = data_model->get_value_at(0, row);
+      const Glib::ValueBase value = data_model->get_value_at(0, row);
       const Glib::ustring name = value.get_string();
       result.push_back(name);
     }
@@ -58,7 +58,7 @@ Privs::type_vecStrings Privs::get_databa
       const int rows_count = data_model->get_n_rows();
       for(int row = 0; row < rows_count; ++row)
       {
-        const Gnome::Gda::Value value = data_model->get_value_at(0, row);
+        const Glib::ValueBase value = data_model->get_value_at(0, row);
         const Glib::ustring name = value.get_string();
         result.push_back(name);
       }
@@ -73,11 +73,11 @@ Privs::type_vecStrings Privs::get_databa
       const int rows_count = data_model->get_n_rows();
       for(int row = 0; row < rows_count; ++row)
       {
-        const Gnome::Gda::Value value = data_model->get_value_at(1, row); //Column 1 is the /* the user list.
+        const Glib::ValueBase value = data_model->get_value_at(1, row); //Column 1 is the /* the user list.
         //pg_group is a string, formatted, bizarrely, like so: "{100, 101}".
 
         Glib::ustring group_list;
-        if(!value.is_null())
+        if(!Gnome::Gda::value_is_null(value))
           group_list = value.get_string();
 
         type_vecStrings vecUserIds = pg_list_separate(group_list);
@@ -88,7 +88,7 @@ Privs::type_vecStrings Privs::get_databa
           Glib::RefPtr<Gnome::Gda::DataModel> data_model = query_execute(strQuery);
           if(data_model)
           {
-            const Gnome::Gda::Value value = data_model->get_value_at(0, 0); 
+            const Glib::ValueBase value = data_model->get_value_at(0, 0); 
            result.push_back(value.get_string());
           }
         }
@@ -190,9 +190,9 @@ Privileges Privs::get_table_privileges(c
   Glib::RefPtr<Gnome::Gda::DataModel> data_model = query_execute(strQuery);
   if(data_model && data_model->get_n_rows())
   {
-    const Gnome::Gda::Value value = data_model->get_value_at(0, 0);
+    const Glib::ValueBase value = data_model->get_value_at(0, 0);
     Glib::ustring access_details;
-    if(!value.is_null())
+    if(!Gnome::Gda::value_is_null(value))
       access_details = value.get_string();
 
     //Parse the strange postgres permissions format:
Index: glom/layout_item_dialogs/box_formatting.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/layout_item_dialogs/box_formatting.cc,v
retrieving revision 1.9
diff -u -p -r1.9 box_formatting.cc
--- glom/layout_item_dialogs/box_formatting.cc	17 Sep 2006 10:08:25 -0000	1.9
+++ glom/layout_item_dialogs/box_formatting.cc	1 Nov 2006 09:41:22 -0000
@@ -159,7 +159,7 @@ bool Box_Formatting::get_formatting(Fiel
       if(!text.empty())
       {
         bool success = false;
-        Gnome::Gda::Value value = Conversions::parse_value(m_field->get_glom_type(), text, m_format.m_numeric_format, success);
+        Glib::ValueBase value = Conversions::parse_value(m_field->get_glom_type(), text, m_format.m_numeric_format, success);
 
         if(success)
           list_choice_values.push_back(value);
Index: glom/layout_item_dialogs/dialog_buttonscript.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/layout_item_dialogs/dialog_buttonscript.cc,v
retrieving revision 1.6
diff -u -p -r1.6 dialog_buttonscript.cc
--- glom/layout_item_dialogs/dialog_buttonscript.cc	19 Oct 2006 10:18:13 -0000	1.6
+++ glom/layout_item_dialogs/dialog_buttonscript.cc	1 Nov 2006 09:41:22 -0000
@@ -98,7 +98,7 @@ void Dialog_ButtonScript::on_button_test
     for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       const sharedptr<const Field> field = *iter;
-      const Gnome::Gda::Value example_value = Conversions::get_example_value(field->get_glom_type());
+      const Glib::ValueBase example_value = Conversions::get_example_value(field->get_glom_type());
       field_values[field->get_name()] = example_value;
     }
   }
Index: glom/libglom/calcinprogress.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/calcinprogress.h,v
retrieving revision 1.3
diff -u -p -r1.3 calcinprogress.h
--- glom/libglom/calcinprogress.h	27 May 2006 09:26:35 -0000	1.3
+++ glom/libglom/calcinprogress.h	1 Nov 2006 09:41:22 -0000
@@ -32,7 +32,7 @@ public:
   CalcInProgress();
 
   sharedptr<const Field> m_field; 
-  Gnome::Gda::Value m_value; //If it's been calculated.
+  Glib::ValueBase m_value; //If it's been calculated.
   bool m_calc_in_progress;
   bool m_calc_finished;
 };
Index: glom/libglom/connectionpool.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/connectionpool.cc,v
retrieving revision 1.6
diff -u -p -r1.6 connectionpool.cc
--- glom/libglom/connectionpool.cc	17 Aug 2006 17:55:09 -0000	1.6
+++ glom/libglom/connectionpool.cc	1 Nov 2006 09:41:22 -0000
@@ -223,8 +223,8 @@ sharedptr<SharedConnection> ConnectionPo
             Glib::RefPtr<Gnome::Gda::DataModel> data_model = m_refGdaConnection->execute_single_command("SELECT version()");
             if(data_model && data_model->get_n_rows() && data_model->get_n_columns())
             {
-              Gnome::Gda::Value value = data_model->get_value_at(0, 0);
-              if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_STRING)
+              Glib::ValueBase value = data_model->get_value_at(0, 0);
+              if(G_VALUE_TYPE(value.gobj()) == G_TYPE_STRING)
               {
                 const Glib::ustring version_text = value.get_string();
 
Index: glom/libglom/utils.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/utils.cc,v
retrieving revision 1.16
diff -u -p -r1.16 utils.cc
--- glom/libglom/utils.cc	12 Oct 2006 09:53:36 -0000	1.16
+++ glom/libglom/utils.cc	1 Nov 2006 09:41:22 -0000
@@ -348,7 +348,7 @@ Glib::ustring Utils::build_sql_select_wi
 }
 
 
-Glib::ustring Utils::build_sql_select_with_key(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value)
+Glib::ustring Utils::build_sql_select_with_key(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value)
 {
   //TODO_Performance:
   type_vecConstLayoutFields constFieldsToGet;
@@ -362,7 +362,7 @@ Glib::ustring Utils::build_sql_select_wi
 
 }
 
-Glib::ustring Utils::build_sql_select_with_key(const Glib::ustring& table_name, const type_vecConstLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value)
+Glib::ustring Utils::build_sql_select_with_key(const Glib::ustring& table_name, const type_vecConstLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value)
 {
   if(!Conversions::value_is_empty(key_value)) //If there is a record to show:
   {
@@ -417,7 +417,7 @@ Utils::type_list_values_with_second Util
     //std::cout << "  result: count=" << count << std::endl;
     for(guint row = 0; row < count; ++row)
     {
-      std::pair<Gnome::Gda::Value, Gnome::Gda::Value> itempair;
+      std::pair<Glib::ValueBase, Glib::ValueBase> itempair;
       itempair.first = datamodel->get_value_at(0, row);
 
       if(with_second)
@@ -493,13 +493,13 @@ Glib::ustring Utils::locale_language_id(
   return result;
 }
 
-Glib::ustring Utils::create_local_image_uri(const Gnome::Gda::Value& value)
+Glib::ustring Utils::create_local_image_uri(const Glib::ValueBase& value)
 {
   static guint m_temp_image_uri_number = 0;
 
   Glib::ustring result;
 
-  if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_BINARY)
+  if(G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_BINARY)
   {
     glong size = 0;
     const gpointer pData = value.get_binary(size);
Index: glom/libglom/utils.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/utils.h,v
retrieving revision 1.8
diff -u -p -r1.8 utils.h
--- glom/libglom/utils.h	12 Oct 2006 09:53:36 -0000	1.8
+++ glom/libglom/utils.h	1 Nov 2006 09:41:22 -0000
@@ -50,10 +50,10 @@ typedef std::vector< sharedptr<const Lay
 Glib::ustring build_sql_select_with_where_clause(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const Glib::ustring& where_clause = Glib::ustring(), const type_sort_clause& sort_clause = type_sort_clause());
 Glib::ustring build_sql_select_with_where_clause(const Glib::ustring& table_name, const type_vecConstLayoutFields& fieldsToGet, const Glib::ustring& where_clause = Glib::ustring(), const type_sort_clause& sort_clause = type_sort_clause());
 
-Glib::ustring build_sql_select_with_key(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value);
-Glib::ustring build_sql_select_with_key(const Glib::ustring& table_name, const type_vecConstLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value);
+Glib::ustring build_sql_select_with_key(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value);
+Glib::ustring build_sql_select_with_key(const Glib::ustring& table_name, const type_vecConstLayoutFields& fieldsToGet, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value);
 
-typedef std::list< std::pair<Gnome::Gda::Value, Gnome::Gda::Value> > type_list_values_with_second;
+typedef std::list< std::pair<Glib::ValueBase, Glib::ValueBase> > type_list_values_with_second;
 type_list_values_with_second get_choice_values(const sharedptr<const LayoutItem_Field>& field);
 
 /** Guess an appropriate identifier name based on a human-readable title
@@ -71,7 +71,7 @@ Glib::ustring locale_simplify(const Glib
  */
 Glib::ustring locale_language_id(const Glib::ustring& locale_id);
 
-Glib::ustring create_local_image_uri(const Gnome::Gda::Value& value);
+Glib::ustring create_local_image_uri(const Glib::ValueBase& value);
 
 Glib::ustring string_from_decimal(guint decimal);
 guint decimal_from_string(const Glib::ustring& str);
Index: glom/libglom/data_structure/field.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/field.cc,v
retrieving revision 1.3
diff -u -p -r1.3 field.cc
--- glom/libglom/data_structure/field.cc	27 May 2006 15:44:15 -0000	1.3
+++ glom/libglom/data_structure/field.cc	1 Nov 2006 09:41:22 -0000
@@ -79,7 +79,7 @@ bool Field::operator==(const Field& src)
   return TranslatableItem::operator==(src)
          && (m_field_info == src.m_field_info)
          && (m_glom_type == src.m_glom_type)
-         && (m_data == src.m_data)
+         && Gnome::Gda::value_equal(m_data, src.m_data)
          && (m_lookup_relationship == src.m_lookup_relationship)
          && (m_strLookupField == src.m_strLookupField)
          && (m_calculation == src.m_calculation)
@@ -107,25 +107,25 @@ void Field::set_glom_type(glom_field_typ
   m_glom_type = fieldtype;
 }
 
-Gnome::Gda::FieldAttributes Field::get_field_info() const
+Glib::RefPtr<Gnome::Gda::Column> Field::get_field_info() const
 {
   return m_field_info;
 }
 
-void Field::set_field_info(const Gnome::Gda::FieldAttributes& fieldInfo)
+void Field::set_field_info(const Glib::RefPtr<Gnome::Gda::Column>& fieldinfo)
 {
-  m_field_info = fieldInfo;
+  m_field_info = fieldinfo;
 
   //TODO: Maybe just do this in get_glom_type()?
-  set_glom_type( get_glom_type_for_gda_type(fieldInfo.get_gdatype()) );
+  set_glom_type( get_glom_type_for_gda_type(fieldinfo->get_type()) );
 }
 
-Gnome::Gda::Value Field::get_data() const
+Glib::ValueBase Field::get_data() const
 {
   return m_data;
 }
 
-void Field::set_data(const Gnome::Gda::Value& data)
+void Field::set_data(const Glib::ValueBase& data)
 {
   m_data = data;
 }
@@ -234,11 +234,11 @@ static std::string glom_escape_text(cons
   }
 }
 
-Glib::ustring Field::sql(const Gnome::Gda::Value& value) const
+Glib::ustring Field::sql(const Glib::ValueBase& value) const
 {
   //g_warning("Field::sql: glom_type=%d", get_glom_type());
 
-  if(value.is_null())
+  if(Gnome::Gda::value_is_null(value))
   {
     switch(get_glom_type())
     {
@@ -275,11 +275,12 @@ Glib::ustring Field::sql(const Gnome::Gd
   {
     case(TYPE_TEXT):
     {
-      if(value.is_null())
+      if(Gnome::Gda::value_is_null(value))
         return "''"; //We want to ignore the concept of NULL strings, and deal only with empty strings.
       else
       {
-        str = glom_escape_text(value.get_string());
+        str = Gnome::Gda::value_get_string(value);
+        str = glom_escape_text(str);
       }
 
       break;
@@ -301,8 +302,8 @@ Glib::ustring Field::sql(const Gnome::Gd
     }
     case(TYPE_BOOLEAN):
     {
-      if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_BOOLEAN)
-        str = ( value.get_bool() ? "TRUE" : "FALSE" );
+      if(G_VALUE_TYPE(value.gobj()) == G_TYPE_BOOLEAN)
+        str = ( Gnome::Gda::value_get_boolean(value) ? "TRUE" : "FALSE" );
       else
         str = "FALSE";
 
@@ -310,13 +311,12 @@ Glib::ustring Field::sql(const Gnome::Gd
     }
     case(TYPE_IMAGE):
     {
-      if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_BINARY)
+      if(G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_BINARY)
       {
-        long buffer_size = 0;
-        const gpointer buffer = value.get_binary(buffer_size);
-        if(buffer && buffer_size)
+        const GdaBinary* gdabinary = Gnome::Gda::value_get_binary(value);
+        if(gdabinary && gdabinary->data && gdabinary->buffer_length)
         {
-          const std::string escaped_binary_data = std::string((char*)buffer, buffer_size);
+          const std::string escaped_binary_data = std::string((char*)gdabinary.data, gdabinary.buffer_length);
           //Now escape that text (to convert \ to \\, for instance):
           str = glom_escape_text(escaped_binary_data) /* has quotes */ + "::bytea";
 
@@ -331,7 +331,7 @@ Glib::ustring Field::sql(const Gnome::Gd
     }
     default:
     {
-      str = value.to_string();
+      str = Gnome::Gda::value_to_string(value);
       if(str.empty() && (m_glom_type != Field::TYPE_TEXT))
         str = "NULL"; //This has probably been handled in get_text_for_gda_value() anyway.
 
@@ -342,7 +342,7 @@ Glib::ustring Field::sql(const Gnome::Gd
   return str;
 }
 
-Glib::ustring Field::sql_find(const Gnome::Gda::Value& value) const
+Glib::ustring Field::sql_find(const Glib::ValueBase& value) const
 {
   switch(get_glom_type())
   {
@@ -350,10 +350,10 @@ Glib::ustring Field::sql_find(const Gnom
     {
       //% means 0 or more characters.
       
-      if(value.is_null())
+      if(Gnome::Gda::value_is_null(value))
         return "''"; //We want to ignore the concept of NULL strings, and deal only with empty strings.
       else
-        return ("'%" + value.to_string() + "%'"); //Add single-quotes. Actually escape it.
+        return ("'%" + Gnome::Gda::value_to_string(value) + "%'"); //Add single-quotes. Actually escape it.
         
       break;
     }
@@ -393,57 +393,59 @@ Glib::ustring Field::sql_find_operator()
 
 Glib::ustring Field::get_name() const
 {
-  return m_field_info.get_name();
+  return m_field_info->get_name();
 }
 
 void Field::set_name(const Glib::ustring& value)
 {
-  m_field_info.set_name(value);
+  m_field_info->set_name(value);
 }
 
 bool Field::get_auto_increment() const
 {
-  return m_field_info.get_auto_increment();
+  return m_field_info->get_auto_increment();
 }
 
 void Field::set_auto_increment(bool val)
 {
-  m_field_info.set_auto_increment(val);
+  m_field_info->set_auto_increment(val);
 }
 
 bool Field::get_primary_key() const
 {
-  return m_field_info.get_primary_key();
+  return m_field_info->get_primary_key();
 }
 
 void Field::set_primary_key(bool val)
 {
-  m_field_info.set_primary_key(val);
+  m_field_info->set_primary_key(val);
 }
 
 bool Field::get_unique_key() const
 {
-  return m_field_info.get_unique_key();
+  return m_field_info->get_unique_key();
 }
 
 void Field::set_unique_key(bool val)
 {
-  m_field_info.set_unique_key(val);
+  m_field_info->set_unique_key(val);
 }
 
-Gnome::Gda::Value Field::get_default_value() const
+Glib::ValueBase Field::get_default_value() const
 {
-  return m_field_info.get_default_value();
+  Glib::ValueBase value;
+  m_field_info->get_default_value(value);
+  return value;
 }
 
-void Field::set_default_value(const Gnome::Gda::Value& val)
+void Field::set_default_value(const Glib::ValueBase& val)
 {
-  m_field_info.set_default_value(val);
+  m_field_info->set_default_value(val);
 }
 
 Glib::ustring Field::get_sql_type() const
 {
-  if(false) //See generate_next_auto_increment() //m_field_info.get_auto_increment())
+  if(false) //See generate_next_auto_increment() //m_field_info->get_auto_increment())
     return "serial"; //See Postgres manual: http://www.postgresql.org/docs/7.4/interactive/datatype.html#DATATYPE-SERIAL. It's actually an integer..
   else
   {
@@ -458,14 +460,14 @@ Glib::ustring Field::get_sql_type() cons
       const FieldTypes* pFieldTypes = pConnectionPool->get_field_types();
       if(pFieldTypes)
       {
-        const Gnome::Gda::ValueType fieldType = m_field_info.get_gdatype();
+        const GType fieldType = m_field_info->get_type();
         strType = pFieldTypes->get_string_name_for_gdavaluetype(fieldType);
       }
     }
 
     if(strType == "unknowntype")
     {
-      g_warning("Field::get_sql_type(): returning unknowntype for field name=%s , glom_type=%d, gda_type=%d", get_name().c_str(), get_glom_type(), m_field_info.get_gdatype());
+      g_warning("Field::get_sql_type(): returning unknowntype for field name=%s , glom_type=%d, gda_type=%d", get_name().c_str(), get_glom_type(), (int)m_field_info->get_type());
     }
 
     return strType;
@@ -473,18 +475,22 @@ Glib::ustring Field::get_sql_type() cons
 }
 
 /// Ignores any part of FieldAttributes that libgda does not properly fill.
-bool Field::field_info_from_database_is_equal(const Gnome::Gda::FieldAttributes& field)
+bool Field::field_info_from_database_is_equal(const Glib::RefPtr<const Gnome::Gda::Column>& field)
 {
-  Gnome::Gda::FieldAttributes temp = m_field_info;
+  Glib::RefPtr<Gnome::Gda::Column> temp = m_field_info->copy();
 
-  temp.set_auto_increment( field.get_auto_increment() ); //Don't compare this, because the data is incorrect when libgda reads it from the database.
-  temp.set_default_value( field.get_default_value() ); //Don't compare this, because the data is incorrect when libgda reads it from the database.
-  temp.set_primary_key( field.get_primary_key() ); //Don't compare this, because the data is incorrect when libgda reads it from the database.
+  temp->set_auto_increment( field->get_auto_increment() ); //Don't compare this, because the data is incorrect when libgda reads it from the database.
 
-  return temp == field; 
+  Glib::ValueBase value;
+  field->get_default_value(value);
+  temp->set_default_value(value); //Don't compare this, because the data is incorrect when libgda reads it from the database.
+
+  temp->set_primary_key( field->get_primary_key() ); //Don't compare this, because the data is incorrect when libgda reads it from the database.
+
+  return temp->equal(field); 
 }
 
-Field::glom_field_type Field::get_glom_type_for_gda_type(Gnome::Gda::ValueType gda_type)
+Field::glom_field_type Field::get_glom_type_for_gda_type(GType gda_type)
 {
   init_map();
 
@@ -497,26 +503,26 @@ Field::glom_field_type Field::get_glom_t
       result = iterFind->second;
     else
     {
-      // g_warning("FieldType::FieldType(Gnome::Gda::ValueType gda_type): Invalid gda type: %d",  gda_type);
+      // g_warning("FieldType::FieldType(GType gda_type): Invalid gda type: %d",  gda_type);
     }
   }
 
   return result;
 }
 
-Gnome::Gda::ValueType Field::get_gda_type_for_glom_type(Field::glom_field_type glom_type)
+GType Field::get_gda_type_for_glom_type(Field::glom_field_type glom_type)
 {
   init_map();
 
   //Get the ideal gda type used for that glom type;
   type_map_glom_type_to_gda_type::iterator iterFind = m_map_glom_type_to_gda_type.find(glom_type);
-  Gnome::Gda::ValueType ideal_gda_type = Gnome::Gda::VALUE_TYPE_UNKNOWN;
+  GType ideal_gda_type = G_TYPE_NONE;
   if(iterFind != m_map_glom_type_to_gda_type.end())
     ideal_gda_type = iterFind->second;
 
-  if(ideal_gda_type == Gnome::Gda::VALUE_TYPE_UNKNOWN)
+  if(ideal_gda_type == G_TYPE_NONE)
   {
-    g_warning("Field::get_gda_type_for_glom_type(): Returning VALUE_TYPE_UNKNOWN for glom_type=%d", glom_type);
+    g_warning("Field::get_gda_type_for_glom_type(): Returning G_TYPE_NONE for glom_type=%d", glom_type);
   }
   
   return ideal_gda_type;
@@ -531,18 +537,18 @@ void Field::init_map()
 
     //Ideals:
     m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_NUMERIC] = TYPE_NUMERIC;
-    m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_INTEGER] = TYPE_NUMERIC; //Only for "serial" (auto-increment) fields.
-    m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_STRING] = TYPE_TEXT;
+    m_map_gda_type_to_glom_type[G_TYPE_INT] = TYPE_NUMERIC; //Only for "serial" (auto-increment) fields.
+    m_map_gda_type_to_glom_type[G_TYPE_STRING] = TYPE_TEXT;
     m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_TIME] = TYPE_TIME;
-    m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_DATE] = TYPE_DATE;
-    m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_BOOLEAN] = TYPE_BOOLEAN;
+    m_map_gda_type_to_glom_type[G_TYPE_DATE] = TYPE_DATE;
+    m_map_gda_type_to_glom_type[G_TYPE_BOOLEAN] = TYPE_BOOLEAN;
     m_map_gda_type_to_glom_type[Gnome::Gda::VALUE_TYPE_BINARY] = TYPE_IMAGE;
 
     m_map_glom_type_to_gda_type[TYPE_NUMERIC] = Gnome::Gda::VALUE_TYPE_NUMERIC;
-    m_map_glom_type_to_gda_type[TYPE_TEXT] = Gnome::Gda::VALUE_TYPE_STRING;
+    m_map_glom_type_to_gda_type[TYPE_TEXT] = G_TYPE_STRING;
     m_map_glom_type_to_gda_type[TYPE_TIME] = Gnome::Gda::VALUE_TYPE_TIME;
-    m_map_glom_type_to_gda_type[TYPE_DATE] = Gnome::Gda::VALUE_TYPE_DATE;
-    m_map_glom_type_to_gda_type[TYPE_BOOLEAN] = Gnome::Gda::VALUE_TYPE_BOOLEAN;
+    m_map_glom_type_to_gda_type[TYPE_DATE] = G_TYPE_DATE;
+    m_map_glom_type_to_gda_type[TYPE_BOOLEAN] = G_TYPE_BOOLEAN;
     m_map_glom_type_to_gda_type[TYPE_IMAGE] = Gnome::Gda::VALUE_TYPE_BINARY;
 
     m_map_type_names_ui[TYPE_INVALID] = _("Invalid");
Index: glom/libglom/data_structure/field.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/field.h,v
retrieving revision 1.2
diff -u -p -r1.2 field.h
--- glom/libglom/data_structure/field.h	27 May 2006 09:26:35 -0000	1.2
+++ glom/libglom/data_structure/field.h	1 Nov 2006 09:41:22 -0000
@@ -94,47 +94,47 @@ public:
   void set_glom_type(glom_field_type fieldtype);
 
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::get_name, so that we can use it in the same predicate template.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::get_name, so that we can use it in the same predicate template.
   virtual Glib::ustring get_name() const;
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::set_name, for convenience
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::set_name, for convenience
   virtual void set_name(const Glib::ustring& value);
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::get_auto_increment.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::get_auto_increment.
   bool get_auto_increment() const;
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::set_auto_increment.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::set_auto_increment.
   void set_auto_increment(bool val = true);
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::get_primary_key.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::get_primary_key.
   bool get_primary_key() const;
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::set_primary_key.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::set_primary_key.
   void set_primary_key(bool val = true);
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::get_unique_key.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::get_unique_key.
   bool get_unique_key() const;
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::set_unique_key.
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::set_unique_key.
   void set_unique_key(bool val = true);
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::get_default_value.
-  Gnome::Gda::Value get_default_value() const;
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::get_default_value.
+  Glib::ValueBase get_default_value() const;
 
-  /// This forwards to the Gnome::Gda::FieldAttributes::set_default_value.
-  void set_default_value(const Gnome::Gda::Value& val);
+  /// This forwards to the Glib::RefPtr<Gnome::Gda::Column>::set_default_value.
+  void set_default_value(const Glib::ValueBase& val);
 
 
   //TODO_Performance: Lots of code calls this just to call one of its methods:
-  Gnome::Gda::FieldAttributes get_field_info() const;
-  void set_field_info(const Gnome::Gda::FieldAttributes& fieldInfo);
+  Glib::RefPtr<Gnome::Gda::Column> get_field_info() const;
+  void set_field_info(const Glib::RefPtr<Gnome::Gda::Column>& fieldInfo);
 
   /// Ignores any part of FieldAttributes that libgda does not properly fill.
-  bool field_info_from_database_is_equal(const Gnome::Gda::FieldAttributes& field);
+  bool field_info_from_database_is_equal(const Glib::RefPtr<const Gnome::Gda::Column>& field);
 
   //These are not used much:
-  Gnome::Gda::Value get_data() const;
-  void set_data(const Gnome::Gda::Value& value);
+  Glib::ValueBase get_data() const;
+  void set_data(const Glib::ValueBase& value);
 
   //Lookup stuff:
   bool get_is_lookup() const;
@@ -153,11 +153,11 @@ public:
 
   /** Escape the value so that it can be used in a SQL command.
    */
-  Glib::ustring sql(const Gnome::Gda::Value& value) const;
+  Glib::ustring sql(const Glib::ValueBase& value) const;
 
   /** Escape the value so that it can be used in a SQL command for a find.
    */
-  Glib::ustring sql_find(const Gnome::Gda::Value& value) const;
+  Glib::ustring sql_find(const Glib::ValueBase& value) const;
 
   /** Get a suitable operator to use when finding records.
    * For instance, == for numbers, or LIKE for text.
@@ -194,8 +194,8 @@ public:
   /// Get the type from a translated name.
   static glom_field_type get_type_for_ui_name(const Glib::ustring& glom_type);
 
-  static glom_field_type get_glom_type_for_gda_type(Gnome::Gda::ValueType gda_type);
-  static Gnome::Gda::ValueType get_gda_type_for_glom_type(Field::glom_field_type glom_type);
+  static glom_field_type get_glom_type_for_gda_type(GType gda_type);
+  static GType get_gda_type_for_glom_type(Field::glom_field_type glom_type);
 
   static bool get_conversion_possible(glom_field_type field_type_src, glom_field_type field_type_dest);
 
@@ -206,11 +206,11 @@ protected:
   static void init_map();
 
   //The glom type to be used for the gda type:
-  typedef std::map<Gnome::Gda::ValueType, glom_field_type> type_map_gda_type_to_glom_type;
+  typedef std::map<GType, glom_field_type> type_map_gda_type_to_glom_type;
   static type_map_gda_type_to_glom_type m_map_gda_type_to_glom_type;
 
   //The gda type to be used for the glom type:
-  typedef std::map<glom_field_type, Gnome::Gda::ValueType> type_map_glom_type_to_gda_type;
+  typedef std::map<glom_field_type, GType> type_map_glom_type_to_gda_type;
   static type_map_glom_type_to_gda_type m_map_glom_type_to_gda_type;
 
   typedef std::list<glom_field_type> type_list_conversion_targets;
@@ -222,9 +222,9 @@ protected:
   static bool m_maps_inited;
 
   glom_field_type m_glom_type;
-  Gnome::Gda::FieldAttributes m_field_info;
+  Glib::RefPtr<Gnome::Gda::Column> m_field_info;
 
-  Gnome::Gda::Value m_data; //Not used much.
+  Glib::ValueBase m_data; //Not used much.
 
   sharedptr<Relationship> m_lookup_relationship;
   Glib::ustring m_strLookupField;
Index: glom/libglom/data_structure/fieldtypes.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/fieldtypes.cc,v
retrieving revision 1.2
diff -u -p -r1.2 fieldtypes.cc
--- glom/libglom/data_structure/fieldtypes.cc	27 May 2006 09:26:35 -0000	1.2
+++ glom/libglom/data_structure/fieldtypes.cc	1 Nov 2006 09:41:22 -0000
@@ -40,7 +40,7 @@ FieldTypes::FieldTypes(const Glib::RefPt
   if(gda_connection && gda_connection->is_open())
   {
     //Read the Types information, so that we can map the string representation of the type (returned by CONNECTION_SCHEMA_FIELDS) to
-    //the Gda::ValueType used by Gnome::Gda::FieldAttributes.
+    //the Gda::ValueType used by Glib::RefPtr<Gnome::Gda::Column>.
     Glib::RefPtr<Gnome::Gda::DataModel> data_model_tables = gda_connection->get_schema(Gnome::Gda::CONNECTION_SCHEMA_TYPES);
     if(data_model_tables && (data_model_tables->get_n_columns() == 0))
     {
@@ -51,24 +51,24 @@ FieldTypes::FieldTypes(const Glib::RefPt
       int rows = data_model_tables->get_n_rows();
       for(int i = 0; i < rows; ++i)
       {
-        Gnome::Gda::Value value_name = data_model_tables->get_value_at(DATAMODEL_FIELDS_COL_NAME, i);
+        Glib::ValueBase value_name = data_model_tables->get_value_at(DATAMODEL_FIELDS_COL_NAME, i);
 
         //Get the types's string representation:
         Glib::ustring schema_type_string;
-        if(value_name.get_value_type() ==  Gnome::Gda::VALUE_TYPE_STRING)
+        if(value_name.get_value_type() ==  G_TYPE_STRING)
           schema_type_string = value_name.get_string();
     
         if(!schema_type_string.empty())
         {
-          Gnome::Gda::Value value_gdatype = data_model_tables->get_value_at(DATAMODEL_FIELDS_COL_GDATYPE, i);
+          Glib::ValueBase value_gdatype = data_model_tables->get_value_at(DATAMODEL_FIELDS_COL_GDATYPE, i);
           if(value_gdatype.get_value_type() ==  Gnome::Gda::VALUE_TYPE_TYPE)
           {
-            Gnome::Gda::ValueType gdatype = value_gdatype.get_vtype();
+            GType gdatype = value_gdatype.get_vtype();
 
             //Save it for later:
             m_mapSchemaStringsToGdaTypes[schema_type_string] = gdatype;
             
-            Glib::ustring gdatypestring = Gnome::Gda::Value::type_to_string(gdatype); 
+            Glib::ustring gdatypestring = g_type_to_string(gdatype); 
             //std::cout << "schema type: " << schema_type_string << " = gdatype " << (guint)gdatype << "(" << gdatypestring << ")" << std::endl;
             
             m_mapGdaTypesToSchemaStrings[gdatype] = schema_type_string; //We save it twice, to just to make searching easier, without using a predicate.
@@ -86,7 +86,7 @@ FieldTypes::~FieldTypes()
 {
 }
 
-Gnome::Gda::ValueType FieldTypes::get_gdavalue_for_schema_type_string(const Glib::ustring& schema_type_string) const
+GType FieldTypes::get_gdavalue_for_schema_type_string(const Glib::ustring& schema_type_string) const
 {
   type_mapSchemaStringsToGdaTypes::const_iterator iterFind = m_mapSchemaStringsToGdaTypes.find(schema_type_string);
   if(iterFind == m_mapSchemaStringsToGdaTypes.end())
@@ -95,7 +95,7 @@ Gnome::Gda::ValueType FieldTypes::get_gd
     return iterFind->second;
 }
 
-Glib::ustring FieldTypes::get_string_name_for_gdavaluetype(Gnome::Gda::ValueType field_type) const
+Glib::ustring FieldTypes::get_string_name_for_gdavaluetype(GType field_type) const
 {
   type_mapGdaTypesToSchemaStrings::const_iterator iterFind = m_mapGdaTypesToSchemaStrings.find(field_type);
   if(iterFind == m_mapGdaTypesToSchemaStrings.end())
Index: glom/libglom/data_structure/fieldtypes.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/fieldtypes.h,v
retrieving revision 1.2
diff -u -p -r1.2 fieldtypes.h
--- glom/libglom/data_structure/fieldtypes.h	27 May 2006 09:26:35 -0000	1.2
+++ glom/libglom/data_structure/fieldtypes.h	1 Nov 2006 09:41:22 -0000
@@ -35,15 +35,15 @@ public:
   FieldTypes(const Glib::RefPtr<Gnome::Gda::Connection>& gda_connection);
   virtual ~FieldTypes();
 
-  Gnome::Gda::ValueType get_gdavalue_for_schema_type_string(const Glib::ustring& schema_type_string) const;
-  Glib::ustring get_string_name_for_gdavaluetype(Gnome::Gda::ValueType field_type) const;
+  GType get_gdavalue_for_schema_type_string(const Glib::ustring& schema_type_string) const;
+  Glib::ustring get_string_name_for_gdavaluetype(GType field_type) const;
   
 protected:
-  typedef std::map<Glib::ustring, Gnome::Gda::ValueType> type_mapSchemaStringsToGdaTypes;
+  typedef std::map<Glib::ustring, GType> type_mapSchemaStringsToGdaTypes;
   type_mapSchemaStringsToGdaTypes m_mapSchemaStringsToGdaTypes;
 
   //Duplicate information, to make searching easier:
-  typedef std::map<Gnome::Gda::ValueType, Glib::ustring> type_mapGdaTypesToSchemaStrings;
+  typedef std::map<GType, Glib::ustring> type_mapGdaTypesToSchemaStrings;
   type_mapGdaTypesToSchemaStrings m_mapGdaTypesToSchemaStrings;
 };
 
Index: glom/libglom/data_structure/glomconversions.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/glomconversions.cc,v
retrieving revision 1.5
diff -u -p -r1.5 glomconversions.cc
--- glom/libglom/data_structure/glomconversions.cc	6 Oct 2006 21:30:43 -0000	1.5
+++ glom/libglom/data_structure/glomconversions.cc	1 Nov 2006 09:41:23 -0000
@@ -158,19 +158,19 @@ class numpunct_no_thousands_separator: p
 
 } //anonymous namespace
 
-Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const NumericFormat& numeric_format)
+Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_type, const Glib::ValueBase& value, const NumericFormat& numeric_format)
 {
   return get_text_for_gda_value(glom_type, value, std::locale("") /* the user's current locale */, numeric_format); //Get the current locale.
 }
 
-Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const std::locale& locale, const NumericFormat& numeric_format, bool iso_format)
+Glib::ustring Conversions::get_text_for_gda_value(Field::glom_field_type glom_type, const Glib::ValueBase& value, const std::locale& locale, const NumericFormat& numeric_format, bool iso_format)
 {
-  if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_NULL) //The type can be null for any of the actual field types.
+  if(G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_NULL) //The type can be null for any of the actual field types.
   {
     return "";
   }
 
-  if( (glom_type == Field::TYPE_DATE) && (value.get_value_type() == Gnome::Gda::VALUE_TYPE_DATE))
+  if( (glom_type == Field::TYPE_DATE) && (G_VALUE_TYPE(value.gobj()) == G_TYPE_DATE))
   {
     Gnome::Gda::Date gda_date = value.get_date();
 
@@ -190,7 +190,7 @@ Glib::ustring Conversions::get_text_for_
     return date.format_string("%x"); //%x means "is replaced by the locale's appropriate date representation".
     */
   }
-  else if((glom_type == Field::TYPE_TIME) && (value.get_value_type() == Gnome::Gda::VALUE_TYPE_TIME))
+  else if((glom_type == Field::TYPE_TIME) && (G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_TIME))
   {
     Gnome::Gda::Time gda_time = value.get_time();
 
@@ -204,7 +204,7 @@ Glib::ustring Conversions::get_text_for_
 
     return format_time(the_c_time, locale, iso_format);
   }
-  else if( (glom_type == Field::TYPE_NUMERIC) && (value.get_value_type() == Gnome::Gda::VALUE_TYPE_NUMERIC))
+  else if( (glom_type == Field::TYPE_NUMERIC) && (G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_NUMERIC))
   {
     const GdaNumeric* gda_numeric = value.get_numeric();
     std::string text_in_c_locale;
@@ -259,11 +259,11 @@ Glib::ustring Conversions::get_text_for_
   }
   else
   {
-    return value.to_string();
+    return Gnome::Gda::value_to_string(value);
   }
 }
 
-Gnome::Gda::Value Conversions::parse_value(double number)
+Glib::ValueBase Conversions::parse_value(double number)
 {
   //This is just a way to get a NUMERIC Gda::Value from a numeric type:
   //Try to parse the inputted number, according to the current locale.
@@ -284,16 +284,16 @@ Gnome::Gda::Value Conversions::parse_val
   */
   gda_numeric.number = g_strdup(number_canonical_text.c_str());
 
-  return Gnome::Gda::Value(&gda_numeric);
+  return Glib::ValueBase(&gda_numeric);
 }
 
-Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, bool iso_format)
+Glib::ValueBase Conversions::parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, bool iso_format)
 {
   NumericFormat ignore_format;
   return parse_value(glom_type, text, ignore_format, success, iso_format);
 }
 
-Gnome::Gda::Value Conversions::parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, const NumericFormat& numeric_format, bool& success, bool iso_format)
+Glib::ValueBase Conversions::parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, const NumericFormat& numeric_format, bool& success, bool iso_format)
 {
   std::locale the_locale = (iso_format ? std::locale::classic() :  std::locale("") /* The user's current locale */);
 
@@ -303,7 +303,7 @@ Gnome::Gda::Value Conversions::parse_val
   {
     if( (glom_type == Field::TYPE_DATE) || (glom_type ==  Field::TYPE_TIME) || (glom_type ==  Field::TYPE_NUMERIC) )
     {
-      Gnome::Gda::Value null_value;
+      Glib::ValueBase null_value;
       success = true;
       return null_value;
     }
@@ -318,7 +318,7 @@ Gnome::Gda::Value Conversions::parse_val
     gda_date.month = the_c_time.tm_mon + 1; //The C month starts at 0.
     gda_date.day = the_c_time.tm_mday; //THe C mday starts at 1.
 
-    return Gnome::Gda::Value(gda_date);
+    return Glib::ValueBase(gda_date);
   }
   else if(glom_type == Field::TYPE_TIME)
   {
@@ -335,7 +335,7 @@ Gnome::Gda::Value Conversions::parse_val
     gda_time.minute = the_c_time.tm_min;
     gda_time.second = the_c_time.tm_sec;
 
-    return Gnome::Gda::Value(gda_time);
+    return Glib::ValueBase(gda_time);
   }
   else if(glom_type == Field::TYPE_NUMERIC)
   {
@@ -380,18 +380,18 @@ Gnome::Gda::Value Conversions::parse_val
     gda_numeric.number = g_strdup(number_canonical_text.c_str());
 
     success = true; //Can this ever fail?
-    return Gnome::Gda::Value(&gda_numeric);
+    return Glib::ValueBase(&gda_numeric);
   }
   else if(glom_type == Field::TYPE_BOOLEAN)
   {
     success = true;
-    return Gnome::Gda::Value( (text == "TRUE" ? true : false) ); //TODO: Internationalize this, but it should never be used anyway.
+    return Glib::ValueBase( (text == "TRUE" ? true : false) ); //TODO: Internationalize this, but it should never be used anyway.
   }
   else if(glom_type == Field::TYPE_IMAGE)
   {
     //We assume that the text is the same format that we use in the document when saving examples.
     //(The SQL format).
-    Gnome::Gda::Value result;
+    Glib::ValueBase result;
 
     //libgda currently assumes that this buffer is an already-escaped string.
     //TODO: Unescape the text when libgda has been fixed.
@@ -401,7 +401,7 @@ Gnome::Gda::Value Conversions::parse_val
   }
 
   success = true;
-  return Gnome::Gda::Value(text);
+  return Glib::ValueBase(text);
 
 }
 
@@ -631,36 +631,36 @@ tm Conversions::parse_tm(const Glib::ust
 }
 */
 
-bool Conversions::value_is_empty(const Gnome::Gda::Value& value)
+bool Conversions::value_is_empty(const Glib::ValueBase& value)
 {
-  switch(value.get_value_type())
+  switch(G_VALUE_TYPE(value.gobj()))
   {
     case(Gnome::Gda::VALUE_TYPE_NULL):
       return true;
-    case(Gnome::Gda::VALUE_TYPE_STRING):
+    case(G_TYPE_STRING):
       return value.get_string().empty();
     default:
       return false; //None of the other types can be empty. (An empty numeric, date, or time type shows up as a null.
   }
 }
 
-Gnome::Gda::Value Conversions::get_empty_value(Field::glom_field_type field_type)
+Glib::ValueBase Conversions::get_empty_value(Field::glom_field_type field_type)
 {
   switch(field_type)
   {
     case(Field::TYPE_TEXT):
-      return Gnome::Gda::Value( Glib::ustring() ); //Use an empty string instead of a null for text fields, because the distinction is confusing for users, and gives no advantages.
+      return Glib::ValueBase( Glib::ustring() ); //Use an empty string instead of a null for text fields, because the distinction is confusing for users, and gives no advantages.
     default:
-      return Gnome::Gda::Value(); //A NULL instance, because there is no suitable empty value for numeric, date, or time fields.
+      return Glib::ValueBase(); //A NULL instance, because there is no suitable empty value for numeric, date, or time fields.
   }
 }
 
-Gnome::Gda::Value Conversions::get_example_value(Field::glom_field_type field_type)
+Glib::ValueBase Conversions::get_example_value(Field::glom_field_type field_type)
 {
   switch(field_type)
   {
     case(Field::TYPE_BOOLEAN):
-      return Gnome::Gda::Value(true);
+      return Glib::ValueBase(true);
     case(Field::TYPE_DATE):
     {
       bool success = false;
@@ -672,14 +672,14 @@ Gnome::Gda::Value Conversions::get_examp
       return parse_value(field_type, "1", success, true /* iso_format */);
     }
     case(Field::TYPE_TEXT):
-      return Gnome::Gda::Value( Glib::ustring("example") ); //Use an empty string instead of a null for text fields, because the distinction is confusing for users, and gives no advantages.
+      return Glib::ValueBase( Glib::ustring("example") ); //Use an empty string instead of a null for text fields, because the distinction is confusing for users, and gives no advantages.
     case(Field::TYPE_TIME):
     {
       bool success = false;
       return parse_value(field_type, "01:02", success, true /* iso_format */);
     }
     default:
-      return Gnome::Gda::Value();
+      return Glib::ValueBase();
   }
 }
 
@@ -871,12 +871,12 @@ Glib::ustring Conversions::get_escaped_b
   return result;
 }
 
-Gnome::Gda::Value Conversions::parse_escaped_binary_data(const Glib::ustring& escaped_data)
+Glib::ValueBase Conversions::parse_escaped_binary_data(const Glib::ustring& escaped_data)
 {
   //Hopefully we don't need to use this because Gda does it for us when we read a part of a "SELECT" result into a Gnome::Value.
   //TODO: Performance
 
-  Gnome::Gda::Value result;
+  Glib::ValueBase result;
   size_t buffer_binary_length = 0;
   guchar* buffer_binary =  Glom_PQunescapeBytea((guchar*)escaped_data.c_str(), &buffer_binary_length);
   if(buffer_binary)
@@ -888,9 +888,9 @@ Gnome::Gda::Value Conversions::parse_esc
   return result;
 }
 
-Gnome::Gda::Value Conversions::convert_value(const Gnome::Gda::Value& value, Field::glom_field_type target_glom_type)
+Glib::ValueBase Conversions::convert_value(const Glib::ValueBase& value, Field::glom_field_type target_glom_type)
 {
-  const Field::glom_field_type source_glom_type = Field::get_glom_type_for_gda_type(value.get_value_type());
+  const Field::glom_field_type source_glom_type = Field::get_glom_type_for_gda_type(G_VALUE_TYPE(value.gobj()));
   if(source_glom_type == target_glom_type)
     return value; //No conversion necessary.
   else
@@ -903,11 +903,11 @@ Gnome::Gda::Value Conversions::convert_v
   return value;
 }
 
-Glib::RefPtr<Gdk::Pixbuf> Conversions::get_pixbuf_for_gda_value(const Gnome::Gda::Value& value)
+Glib::RefPtr<Gdk::Pixbuf> Conversions::get_pixbuf_for_gda_value(const Glib::ValueBase& value)
 {
   Glib::RefPtr<Gdk::Pixbuf> result;
 
-  if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_BINARY)
+  if(G_VALUE_TYPE(value.gobj()) == Gnome::Gda::VALUE_TYPE_BINARY)
   {
     glong size = 0;
     const gpointer pData = value.get_binary(size);
Index: glom/libglom/data_structure/glomconversions.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/glomconversions.h,v
retrieving revision 1.5
diff -u -p -r1.5 glomconversions.h
--- glom/libglom/data_structure/glomconversions.h	6 Oct 2006 21:30:43 -0000	1.5
+++ glom/libglom/data_structure/glomconversions.h	1 Nov 2006 09:41:23 -0000
@@ -34,17 +34,17 @@ namespace Glom
 namespace Conversions
 {
   ///Get text for display to the user.
-  Glib::ustring get_text_for_gda_value(Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const NumericFormat& numeric_format = NumericFormat());
-  Glib::ustring get_text_for_gda_value(Field::glom_field_type glom_type, const Gnome::Gda::Value& value, const std::locale& locale, const NumericFormat& numeric_format = NumericFormat(), bool iso_format = false);
+  Glib::ustring get_text_for_gda_value(Field::glom_field_type glom_type, const Glib::ValueBase& value, const NumericFormat& numeric_format = NumericFormat());
+  Glib::ustring get_text_for_gda_value(Field::glom_field_type glom_type, const Glib::ValueBase& value, const std::locale& locale, const NumericFormat& numeric_format = NumericFormat(), bool iso_format = false);
 
   Glib::ustring format_time(const tm& tm_data);
   Glib::ustring format_time(const tm& tm_data, const std::locale& locale, bool iso_format = false);
   Glib::ustring format_date(const tm& tm_data);
   Glib::ustring format_date(const tm& tm_data, const std::locale& locale, bool iso_format = false);
 
-  Gnome::Gda::Value parse_value(double number);
-  Gnome::Gda::Value parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, bool iso_format = false);
-  Gnome::Gda::Value parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, const NumericFormat& numeric_format, bool& success, bool iso_format = false);
+  Glib::ValueBase parse_value(double number);
+  Glib::ValueBase parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, bool& success, bool iso_format = false);
+  Glib::ValueBase parse_value(Field::glom_field_type glom_type, const Glib::ustring& text, const NumericFormat& numeric_format, bool& success, bool iso_format = false);
 
   tm parse_date(const Glib::ustring& text, bool& success);
   tm parse_date(const Glib::ustring& text, const std::locale& locale, bool& success);
@@ -54,18 +54,18 @@ namespace Conversions
   Glib::ustring format_tm(const tm& tm_data, const std::locale& locale, const char* format);
   //static tm parse_tm(const Glib::ustring& text, const std::locale& locale, char format);
 
-  bool value_is_empty(const Gnome::Gda::Value& value);
-  Gnome::Gda::Value get_empty_value(Field::glom_field_type field_type);
+  bool value_is_empty(const Glib::ValueBase& value);
+  Glib::ValueBase get_empty_value(Field::glom_field_type field_type);
 
-  Gnome::Gda::Value get_example_value(Field::glom_field_type field_type);
+  Glib::ValueBase get_example_value(Field::glom_field_type field_type);
 
   Glib::ustring get_escaped_binary_data(guint8* buffer, size_t buffer_size);
-  Gnome::Gda::Value parse_escaped_binary_data(const Glib::ustring& escaped_data);
+  Glib::ValueBase parse_escaped_binary_data(const Glib::ustring& escaped_data);
 
-  Gnome::Gda::Value convert_value(const Gnome::Gda::Value& value, Field::glom_field_type target_glom_type);
+  Glib::ValueBase convert_value(const Glib::ValueBase& value, Field::glom_field_type target_glom_type);
 
 
-  Glib::RefPtr<Gdk::Pixbuf> get_pixbuf_for_gda_value(const Gnome::Gda::Value& value);
+  Glib::RefPtr<Gdk::Pixbuf> get_pixbuf_for_gda_value(const Glib::ValueBase& value);
 }
 
 //Copied from Postgres's PQunescapeBytea() so I don't have the trouble of finding and linking to the 
Index: glom/libglom/data_structure/system_prefs.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/system_prefs.h,v
retrieving revision 1.2
diff -u -p -r1.2 system_prefs.h
--- glom/libglom/data_structure/system_prefs.h	27 May 2006 09:26:35 -0000	1.2
+++ glom/libglom/data_structure/system_prefs.h	1 Nov 2006 09:41:23 -0000
@@ -32,7 +32,7 @@ class SystemPrefs
 public:
  Glib::ustring m_name, m_org_name,
     m_org_address_street, m_org_address_street2, m_org_address_town, m_org_address_county, m_org_address_country, m_org_address_postcode;
- Gnome::Gda::Value m_org_logo; //TYPE_IMAGE.
+ Glib::ValueBase m_org_logo; //TYPE_IMAGE.
 };
 
 } //namespace Glom
Index: glom/libglom/data_structure/layout/fieldformatting.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/layout/fieldformatting.cc,v
retrieving revision 1.3
diff -u -p -r1.3 fieldformatting.cc
--- glom/libglom/data_structure/layout/fieldformatting.cc	17 Sep 2006 10:08:26 -0000	1.3
+++ glom/libglom/data_structure/layout/fieldformatting.cc	1 Nov 2006 09:41:23 -0000
@@ -57,7 +57,7 @@ bool FieldFormatting::operator==(const F
 {
   return UsesRelationship::operator==(src) &&
     (m_numeric_format == src.m_numeric_format) &&
-    (m_choices_custom_list == src.m_choices_custom_list) &&
+    //TODO: (m_choices_custom_list == src.m_choices_custom_list) &&
     (m_choices_restricted == src.m_choices_restricted) &&
     (m_choices_custom == src.m_choices_custom) &&
     (m_choices_related == src.m_choices_related) &&
Index: glom/libglom/data_structure/layout/fieldformatting.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/layout/fieldformatting.h,v
retrieving revision 1.3
diff -u -p -r1.3 fieldformatting.h
--- glom/libglom/data_structure/layout/fieldformatting.h	17 Sep 2006 10:08:26 -0000	1.3
+++ glom/libglom/data_structure/layout/fieldformatting.h	1 Nov 2006 09:41:23 -0000
@@ -49,7 +49,7 @@ public:
   bool get_has_custom_choices() const;
   void set_has_custom_choices(bool val = true);
 
-  typedef std::list<Gnome::Gda::Value> type_list_values;
+  typedef std::list<Glib::ValueBase> type_list_values;
   virtual type_list_values get_choices_custom() const;
   virtual void set_choices_custom(const type_list_values& choices);
 
Index: glom/libglom/data_structure/layout/layoutitem_image.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/layout/layoutitem_image.cc,v
retrieving revision 1.3
diff -u -p -r1.3 layoutitem_image.cc
--- glom/libglom/data_structure/layout/layoutitem_image.cc	27 May 2006 15:44:16 -0000	1.3
+++ glom/libglom/data_structure/layout/layoutitem_image.cc	1 Nov 2006 09:41:23 -0000
@@ -47,8 +47,8 @@ LayoutItem* LayoutItem_Image::clone() co
 
 bool LayoutItem_Image::operator==(const LayoutItem_Image& src) const
 {
-  bool result = LayoutItem::operator==(src) && 
-                (m_image == src.m_image);
+  bool result = LayoutItem::operator==(src); // && 
+                //(m_image == src.m_image); //TODO.
 
   return result;
 }
@@ -73,12 +73,12 @@ Glib::ustring LayoutItem_Image::get_repo
   return "field"; //We reuse this for this node.
 }
 
-Gnome::Gda::Value LayoutItem_Image::get_image() const
+Glib::ValueBase LayoutItem_Image::get_image() const
 {
   return m_image;
 }
 
-void LayoutItem_Image::set_image(const Gnome::Gda::Value& image)
+void LayoutItem_Image::set_image(const Glib::ValueBase& image)
 {
   m_image = image;
 }
Index: glom/libglom/data_structure/layout/layoutitem_image.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/data_structure/layout/layoutitem_image.h,v
retrieving revision 1.3
diff -u -p -r1.3 layoutitem_image.h
--- glom/libglom/data_structure/layout/layoutitem_image.h	6 Oct 2006 21:30:44 -0000	1.3
+++ glom/libglom/data_structure/layout/layoutitem_image.h	1 Nov 2006 09:41:23 -0000
@@ -23,6 +23,7 @@
 
 #include "layoutitem.h"
 #include <libgdamm/value.h>
+#include <libgda/gda-value.h> //For GDA_TYPE_BINARY. TODO: Remove this.
 
 namespace Glom
 {
@@ -51,18 +52,18 @@ public:
 
   /** Get the image that will be shown on each record.
    */
-  Gnome::Gda::Value get_image() const;
+  Glib::ValueBase get_image() const;
 
   /** Set the image that will be shown on each record.
    */
-  void set_image(const Gnome::Gda::Value& image);
+  void set_image(const Glib::ValueBase& image);
 
   //Saves the image to a temporary file and provides the file URI.
   Glib::ustring create_local_image_uri() const;
 
 protected:
 
-  Gnome::Gda::Value m_image;
+  Glib::ValueBase m_image; //TODO: Use Gnome::Gda::TYPE_BINARY.
 };
 
 } //namespace Glom
Index: glom/libglom/document/document_glom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/document/document_glom.cc,v
retrieving revision 1.17
diff -u -p -r1.17 document_glom.cc
--- glom/libglom/document/document_glom.cc	19 Oct 2006 11:28:58 -0000	1.17
+++ glom/libglom/document/document_glom.cc	1 Nov 2006 09:41:25 -0000
@@ -962,7 +962,7 @@ double Document_Glom::get_node_attribute
   return result;
 }
 
-void Document_Glom::set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Gnome::Gda::Value& value,  Field::glom_field_type field_type)
+void Document_Glom::set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Glib::ValueBase& value,  Field::glom_field_type field_type)
 {
   NumericFormat format_ignored; //Because we use ISO format.
   const Glib::ustring value_as_text = Conversions::get_text_for_gda_value(field_type, value, std::locale() /* Use the C locale */, format_ignored, true /* ISO standard */);
@@ -970,16 +970,16 @@ void Document_Glom::set_node_attribute_v
   set_node_attribute_value(node, strAttributeName, value_as_text);
 }
 
-Gnome::Gda::Value Document_Glom::get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type)
+Glib::ValueBase Document_Glom::get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type)
 {
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
 
   bool success = false;
-  Gnome::Gda::Value  result = Conversions::parse_value(field_type, value_string, success, true /* iso_format */);
+  Glib::ValueBase  result = Conversions::parse_value(field_type, value_string, success, true /* iso_format */);
   if(success)
     return result;
   else 
-    return Gnome::Gda::Value();
+    return Glib::ValueBase();
 }
 
 
@@ -1519,7 +1519,7 @@ void Document_Glom::load_after_layout_it
               field_type = field_temp->get_glom_type();
           }
 
-          const Gnome::Gda::Value value = get_node_attribute_value_as_value(element, GLOM_ATTRIBUTE_VALUE, field_type);
+          const Glib::ValueBase value = get_node_attribute_value_as_value(element, GLOM_ATTRIBUTE_VALUE, field_type);
           list_values.push_back(value);
         }
       }
@@ -2886,7 +2886,7 @@ void Document_Glom::forget_layout_record
   }
 }
 
-void Document_Glom::set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Gnome::Gda::Value& primary_key_value)
+void Document_Glom::set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Glib::ValueBase& primary_key_value)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -2895,7 +2895,7 @@ void Document_Glom::set_layout_record_vi
   }
 }
 
-Gnome::Gda::Value Document_Glom::get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const
+Glib::ValueBase Document_Glom::get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -2906,7 +2906,7 @@ Gnome::Gda::Value Document_Glom::get_lay
       return iterLayoutKeys->second;
   }
 
-  return Gnome::Gda::Value(); //not found.
+  return Glib::ValueBase(); //not found.
 }
 
 void Document_Glom::set_layout_current(const Glib::ustring& table_name, const Glib::ustring& layout_name)
Index: glom/libglom/document/document_glom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/document/document_glom.h,v
retrieving revision 1.7
diff -u -p -r1.7 document_glom.h
--- glom/libglom/document/document_glom.h	19 Oct 2006 11:28:58 -0000	1.7
+++ glom/libglom/document/document_glom.h	1 Nov 2006 09:41:25 -0000
@@ -222,9 +222,9 @@ public: 
   sharedptr<Report> get_report(const Glib::ustring& table_name, const Glib::ustring& report_name) const;
   void remove_report(const Glib::ustring& table_name, const Glib::ustring& report_name);
 
-  void set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Gnome::Gda::Value& primary_key_value);
+  void set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Glib::ValueBase& primary_key_value);
   void forget_layout_record_viewed(const Glib::ustring& table_name);
-  Gnome::Gda::Value get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const;
+  Glib::ValueBase get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const;
 
   void set_layout_current(const Glib::ustring& table_name, const Glib::ustring& layout_name);
   Glib::ustring get_layout_current(const Glib::ustring& table_name) const;
@@ -301,8 +301,8 @@ protected:
   static guint get_node_attribute_value_as_decimal(const xmlpp::Element* node, const Glib::ustring& strAttributeName);
   static double get_node_attribute_value_as_decimal_double(const xmlpp::Element* node, const Glib::ustring& strAttributeName);
 
-  static void set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Gnome::Gda::Value& value, Field::glom_field_type field_type);
-  static Gnome::Gda::Value get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type);
+  static void set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Glib::ValueBase& value, Field::glom_field_type field_type);
+  static Glib::ValueBase get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type);
 
   Glib::ustring get_child_text_node(const xmlpp::Element* node, const Glib::ustring& child_node_name) const;
   void set_child_text_node(xmlpp::Element* node, const Glib::ustring& child_node_name, const Glib::ustring& text);
@@ -343,7 +343,7 @@ protected:
     Glib::ustring m_example_rows;
 
     //Per-session, not saved in document:
-    typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_layout_primarykeys;
+    typedef std::map<Glib::ustring, Glib::ValueBase> type_map_layout_primarykeys;
     type_map_layout_primarykeys m_map_current_record; //The record last viewed in each layout.
 
     Glib::ustring m_layout_current;
Index: glom/libglom/python_embed/py_glom_record.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/python_embed/py_glom_record.h,v
retrieving revision 1.4
diff -u -p -r1.4 py_glom_record.h
--- glom/libglom/python_embed/py_glom_record.h	8 Oct 2006 15:58:19 -0000	1.4
+++ glom/libglom/python_embed/py_glom_record.h	1 Nov 2006 09:41:25 -0000
@@ -40,7 +40,7 @@ struct PyGlomRecord
 public:
   PyObject_HEAD
 
-  //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Gnome::Gda::Value).
+  //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Glib::ValueBase).
   //PyGObject* m_py_gda_connection; //"derived" from PyObject.
   Document_Glom* m_document;
   Glib::ustring* m_table_name;
@@ -48,7 +48,7 @@ public:
   PyGlomRelated* m_related;
 
   //Available, for instance, in python via record["name_first"]
-  typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_field_values;
+  typedef std::map<Glib::ustring, Glib::ValueBase> type_map_field_values;
   //We use a pointer because python will not run the class/struct's default constructor.
   type_map_field_values* m_pMap_field_values;
 
Index: glom/libglom/python_embed/py_glom_related.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/python_embed/py_glom_related.cc,v
retrieving revision 1.4
diff -u -p -r1.4 py_glom_related.cc
--- glom/libglom/python_embed/py_glom_related.cc	27 May 2006 15:44:17 -0000	1.4
+++ glom/libglom/python_embed/py_glom_related.cc	1 Nov 2006 09:41:25 -0000
@@ -146,7 +146,7 @@ Related_tp_as_mapping_getitem(PyGlomRela
           PyGlomRecord::type_map_field_values::const_iterator iterFromKey = self->m_record->m_pMap_field_values->find(from_key);
           if(iterFromKey != self->m_record->m_pMap_field_values->end())
           {
-            const Gnome::Gda::Value from_key_value = iterFromKey->second;
+            const Glib::ValueBase from_key_value = iterFromKey->second;
 
             //TODO_Performance:
             //Get the full field details so we can sqlize its value:
@@ -155,7 +155,7 @@ Related_tp_as_mapping_getitem(PyGlomRela
             if(from_key_field)
             {
               Glib::ustring key_value_sqlized;
-              //std::cout << "from_key_field=" << from_key_field->get_name() << ", from_key_value=" << from_key_value.to_string() << std::endl;
+              //std::cout << "from_key_field=" << from_key_field->get_name() << ", from_key_value=" << Gnome::Gda::value_to_string(from_key_value) << std::endl;
 
               if(!Conversions::value_is_empty(from_key_value)) //Do not link on null-values. That would cause us to link on 0, or "0".
                 key_value_sqlized = from_key_field->sql(from_key_value);
Index: glom/libglom/python_embed/py_glom_relatedrecord.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/python_embed/py_glom_relatedrecord.cc,v
retrieving revision 1.5
diff -u -p -r1.5 py_glom_relatedrecord.cc
--- glom/libglom/python_embed/py_glom_relatedrecord.cc	19 Oct 2006 10:21:25 -0000	1.5
+++ glom/libglom/python_embed/py_glom_relatedrecord.cc	1 Nov 2006 09:41:25 -0000
@@ -212,8 +212,8 @@ RelatedRecord_tp_as_mapping_getitem(PyGl
             Glib::RefPtr<Gnome::Gda::DataModel> datamodel = gda_connection->execute_single_command(sql_query);
             if(datamodel && datamodel->get_n_rows())
             {
-              Gnome::Gda::Value value = datamodel->get_value_at(0, 0);
-              //g_warning("RelatedRecord_tp_as_mapping_getitem(): value from datamodel = %s", value.to_string().c_str());
+              Glib::ValueBase value = datamodel->get_value_at(0, 0);
+              //g_warning("RelatedRecord_tp_as_mapping_getitem(): value from datamodel = %s", Gnome::Gda::value_to_string(value).c_str());
 
               //Cache it, in case it's asked-for again.
               (*(self->m_pMap_field_values))[field_name] = value;
@@ -301,8 +301,8 @@ RelatedRecord_generic_aggregate(PyGlomRe
         Glib::RefPtr<Gnome::Gda::DataModel> datamodel = gda_connection->execute_single_command(sql_query);
         if(datamodel && datamodel->get_n_rows())
         {
-          Gnome::Gda::Value value = datamodel->get_value_at(0, 0);
-          //g_warning("RelatedRecord_generic_aggregate(): value from datamodel = %s", value.to_string().c_str());
+          Glib::ValueBase value = datamodel->get_value_at(0, 0);
+          //g_warning("RelatedRecord_generic_aggregate(): value from datamodel = %s", Gnome::Gda::value_to_string(value).c_str());
 
           //Cache it, in case it's asked-for again.
           (*(self->m_pMap_field_values))[field_name] = value;
Index: glom/libglom/python_embed/py_glom_relatedrecord.h
===================================================================
RCS file: /cvs/gnome/glom/glom/libglom/python_embed/py_glom_relatedrecord.h,v
retrieving revision 1.3
diff -u -p -r1.3 py_glom_relatedrecord.h
--- glom/libglom/python_embed/py_glom_relatedrecord.h	27 May 2006 09:26:37 -0000	1.3
+++ glom/libglom/python_embed/py_glom_relatedrecord.h	1 Nov 2006 09:41:25 -0000
@@ -38,7 +38,7 @@ struct PyGlomRelatedRecord
 public:
   PyObject_HEAD
 
-  //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Gnome::Gda::Value).
+  //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Glib::ValueBase).
   PyGObject* m_py_gda_connection; //"derived" from PyObject.
   //PyGlomRecord* m_record_parent;
   Document_Glom* m_document;
@@ -47,7 +47,7 @@ public:
   Glib::ustring* m_from_key_value_sqlized;
 
   //Available, for instance, in python via record["name_first"]
-  typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_field_values;
+  typedef std::map<Glib::ustring, Glib::ValueBase> type_map_field_values;
   //We use a pointer because python will not run the class/struct's default constructor.
   type_map_field_values* m_pMap_field_values; 
 };
Index: glom/mode_data/box_data.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data.cc,v
retrieving revision 1.109
diff -u -p -r1.109 box_data.cc
--- glom/mode_data/box_data.cc	8 Oct 2006 15:58:20 -0000	1.109
+++ glom/mode_data/box_data.cc	1 Nov 2006 09:41:25 -0000
@@ -82,7 +82,7 @@ Glib::ustring Box_Data::get_find_where_c
   {
     Glib::ustring strClausePart;
 
-    const Gnome::Gda::Value data = get_entered_field_data(*iter);
+    const Glib::ValueBase data = get_entered_field_data(*iter);
 
     if(!Conversions::value_is_empty(data))
     {
@@ -132,17 +132,17 @@ void Box_Data::on_Button_Find()
     signal_find_criteria.emit(where_clause);
 }
 
-Glib::RefPtr<Gnome::Gda::DataModel> Box_Data::record_new(bool use_entered_data, const Gnome::Gda::Value& primary_key_value)
+Glib::RefPtr<Gnome::Gda::DataModel> Box_Data::record_new(bool use_entered_data, const Glib::ValueBase& primary_key_value)
 {
   return record_new(use_entered_data, primary_key_value, Gtk::TreeModel::iterator());
 }
 
-void Box_Data::set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Gnome::Gda::Value& /* value */)
+void Box_Data::set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Glib::ValueBase& /* value */)
 {
   //Box_Data_List overrides this.
 }
 
-Glib::RefPtr<Gnome::Gda::DataModel> Box_Data::record_new(bool use_entered_data, const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row)
+Glib::RefPtr<Gnome::Gda::DataModel> Box_Data::record_new(bool use_entered_data, const Glib::ValueBase& primary_key_value, const Gtk::TreeModel::iterator& row)
 {  
   sharedptr<const Field> fieldPrimaryKey = get_field_primary_key();
 
@@ -173,7 +173,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Box_
     sharedptr<LayoutItem_Field> layout_item = *iter;
 
     //If the user did not enter something in this field:
-    Gnome::Gda::Value value = get_entered_field_data(layout_item);
+    Glib::ValueBase value = get_entered_field_data(layout_item);
 
     if(Conversions::value_is_empty(value)) //This deals with empty strings too.
     {
@@ -189,7 +189,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Box_
           //We need the connection when we run the script, so that the script may use it.
           sharedptr<SharedConnection> sharedconnection = connect_to_server(get_app_window());
 
-          const Gnome::Gda::Value value = glom_evaluate_python_function_implementation(field->get_glom_type(), calculation, field_values, document, m_table_name, sharedconnection->get_gda_connection());
+          const Glib::ValueBase value = glom_evaluate_python_function_implementation(field->get_glom_type(), calculation, field_values, document, m_table_name, sharedconnection->get_gda_connection());
           set_entered_field_data(layout_item, value);
         }
 
@@ -198,7 +198,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Box_
         //TODO_Performance: Add has_default_value()?
         if(Conversions::value_is_empty(value))
         {
-          const Gnome::Gda::Value default_value = field->get_default_value();
+          const Glib::ValueBase default_value = field->get_default_value();
           if(!Conversions::value_is_empty(default_value))
           {
             set_entered_field_data(layout_item, default_value);
@@ -225,7 +225,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Box_
       type_map_added::const_iterator iterFind = map_added.find(field_name);
       if(iterFind == map_added.end()) //If it was not added already
       {
-        Gnome::Gda::Value value;
+        Glib::ValueBase value;
 
         const sharedptr<const Field>& field = layout_item->get_full_field_details();
         if(field)
@@ -288,7 +288,7 @@ Glib::RefPtr<Gnome::Gda::DataModel> Box_
          sharedptr<const LayoutItem_Field> layout_item = *iter;
          
          //TODO_Performance: We just set this with set_entered_field_data() above. Maybe we could just remember it.
-         const Gnome::Gda::Value field_value = get_entered_field_data(layout_item);
+         const Glib::ValueBase field_value = get_entered_field_data(layout_item);
 
          LayoutFieldInRecord field_in_record(layout_item, m_table_name, fieldPrimaryKey, primary_key_value);
 
@@ -391,7 +391,7 @@ Box_Data::type_vecLayoutFields Box_Data:
     return type_vecLayoutFields();
 }
 
-Gnome::Gda::Value Box_Data::generate_next_auto_increment(const Glib::ustring& table_name, const Glib::ustring field_name)
+Glib::ValueBase Box_Data::generate_next_auto_increment(const Glib::ustring& table_name, const Glib::ustring field_name)
 {
   //Get it from the database system table.
   //The developer can change the next value in the Database Preferences
@@ -407,13 +407,13 @@ Gnome::Gda::Value Box_Data::generate_nex
   else
   {
     //The result should be 1 row with 1 column
-    Gnome::Gda::Value value = data_model->get_value_at(0, 0);
+    Glib::ValueBase value = data_model->get_value_at(0, 0);
 
-    //It's a Gnome::Gda::Value::TYPE_NUMERIC, but the GdaNumeric struct is not easy to handle, so let's hack around it:
+    //It's a Glib::ValueBase::TYPE_NUMERIC, but the GdaNumeric struct is not easy to handle, so let's hack around it:
     //if(value.is_number())
     //  result = value.get_integer();
     //else
-    result = decimal_from_string(value.to_string());
+    result = decimal_from_string(Gnome::Gda::value_to_string(value));
 
     ++result; 
   }
@@ -458,7 +458,7 @@ Box_Data::type_vecLayoutFields Box_Data:
   return result;
 }
 
-void Box_Data::refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& /* field_value */)
+void Box_Data::refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& /* field_value */)
 {
   if(field_in_record_changed.m_table_name != m_table_name)
     return; //TODO: Handle these too?
@@ -488,11 +488,11 @@ void Box_Data::refresh_related_fields(co
         guint cols_count = result->get_n_columns();
         for(guint uiCol = 0; uiCol < cols_count; uiCol++)
         {
-          const Gnome::Gda::Value value = result->get_value_at(uiCol, 0 /* row */);
+          const Glib::ValueBase value = result->get_value_at(uiCol, 0 /* row */);
           sharedptr<LayoutItem_Field> layout_item = *iterFields;
 
           //g_warning("list fill: field_name=%s", iterFields->get_name().c_str());
-          //g_warning("  value_as_string=%s", value.to_string().c_str());
+          //g_warning("  value_as_string=%s", Gnome::Gda::value_to_string(value).c_str());
 
           //m_AddDel.set_value(row, layout_item, value);
           set_entered_field_data(row, layout_item, value);
@@ -593,7 +593,7 @@ void Box_Data::fill_layout_group_field_i
   }
 }
 
-bool Box_Data::record_delete(const Gnome::Gda::Value& primary_key_value)
+bool Box_Data::record_delete(const Glib::ValueBase& primary_key_value)
 {
 
   sharedptr<Field> field_primary_key = get_field_primary_key();
@@ -689,7 +689,7 @@ Glib::ustring Box_Data::build_sql_select
 }
 */
 
-bool Box_Data::get_related_record_exists(const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value)
+bool Box_Data::get_related_record_exists(const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value)
 {
   bool result = false;
 
@@ -712,9 +712,9 @@ bool Box_Data::get_related_record_exists
   return result;
 }
 
-bool Box_Data::add_related_record_for_field(const sharedptr<const LayoutItem_Field>& layout_item_parent, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& primary_key_field, const Gnome::Gda::Value& primary_key_value_provided)
+bool Box_Data::add_related_record_for_field(const sharedptr<const LayoutItem_Field>& layout_item_parent, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& primary_key_field, const Glib::ValueBase& primary_key_value_provided)
 {
-  Gnome::Gda::Value primary_key_value = primary_key_value_provided;
+  Glib::ValueBase primary_key_value = primary_key_value_provided;
 
   const bool related_record_exists = get_related_record_exists(relationship, primary_key_field, primary_key_value);
   if(related_record_exists)
@@ -734,7 +734,7 @@ bool Box_Data::add_related_record_for_fi
       dialog.run();
 
       //Clear the field again, discarding the entered data.
-      set_entered_field_data(layout_item_parent, Gnome::Gda::Value());
+      set_entered_field_data(layout_item_parent, Glib::ValueBase());
 
       return false;
     }
@@ -754,7 +754,7 @@ bool Box_Data::add_related_record_for_fi
         dialog.run();
 
         //Clear the field again, discarding the entered data.
-        set_entered_field_data(layout_item_parent, Gnome::Gda::Value());
+        set_entered_field_data(layout_item_parent, Glib::ValueBase());
 
         return false;
       }
@@ -795,8 +795,8 @@ bool Box_Data::add_related_record_for_fi
               }
               else
               {
-                const Gnome::Gda::Value parent_primary_key_value = get_primary_key_value_selected();
-                if(parent_primary_key_value.is_null())
+                const Glib::ValueBase parent_primary_key_value = get_primary_key_value_selected();
+                if(Gnome::Gda::value_is_null(parent_primary_key_value))
                 {
                   g_warning("Box_Data::add_related_record_for_field(): get_primary_key_value_selected() failed. table = %s", get_table_name().c_str());
                   return false;
Index: glom/mode_data/box_data.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data.h,v
retrieving revision 1.47
diff -u -p -r1.47 box_data.h
--- glom/mode_data/box_data.h	27 May 2006 09:26:38 -0000	1.47
+++ glom/mode_data/box_data.h	1 Nov 2006 09:41:25 -0000
@@ -85,12 +85,12 @@ protected:
   ///Fill the existing layout with data from the database.
   virtual bool fill_from_database(); //override.
 
-  virtual void refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value);
+  virtual void refresh_related_fields(const LayoutFieldInRecord& field_in_record_changed, const Gtk::TreeModel::iterator& row, const Glib::ValueBase& field_value);
 
   virtual type_vecLayoutFields get_fields_to_show() const;
   //virtual Glib::ustring build_sql_select_with_where_clause(const Glib::ustring& table_name, const type_vecLayoutFields& fieldsToGet, const Glib::ustring& where_clause);
-  virtual bool get_related_record_exists(const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& key_field, const Gnome::Gda::Value& key_value);
-  virtual bool add_related_record_for_field(const sharedptr<const LayoutItem_Field>& layout_item_parent, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& primary_key_field, const Gnome::Gda::Value& primary_key_value_provided);
+  virtual bool get_related_record_exists(const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& key_field, const Glib::ValueBase& key_value);
+  virtual bool add_related_record_for_field(const sharedptr<const LayoutItem_Field>& layout_item_parent, const sharedptr<const Relationship>& relationship, const sharedptr<const Field>& primary_key_field, const Glib::ValueBase& primary_key_value_provided);
 
   type_vecLayoutFields get_table_fields_to_show(const Glib::ustring& table_name) const;
 
@@ -104,19 +104,19 @@ protected:
   */
   type_vecLayoutFields get_related_fields(const sharedptr<const LayoutItem_Field>& field) const;
 
-  bool record_delete(const Gnome::Gda::Value& primary_key_value);
+  bool record_delete(const Glib::ValueBase& primary_key_value);
 
   ///This allows record_new() to set the generated/entered primary key value, needed by Box_Data_List:
-  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& value);
+  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& row, const Glib::ValueBase& value);
 
   ///New record with all entered field values.
-  Glib::RefPtr<Gnome::Gda::DataModel> record_new(bool use_entered_data = true, const Gnome::Gda::Value& primary_key_value = Gnome::Gda::Value()); 
-  Glib::RefPtr<Gnome::Gda::DataModel> record_new(bool use_entered_data, const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row);
+  Glib::RefPtr<Gnome::Gda::DataModel> record_new(bool use_entered_data = true, const Glib::ValueBase& primary_key_value = Glib::ValueBase()); 
+  Glib::RefPtr<Gnome::Gda::DataModel> record_new(bool use_entered_data, const Glib::ValueBase& primary_key_value, const Gtk::TreeModel::iterator& row);
 
-  Gnome::Gda::Value generate_next_auto_increment(const Glib::ustring& table_name, const Glib::ustring field_name);
+  Glib::ValueBase generate_next_auto_increment(const Glib::ustring& table_name, const Glib::ustring field_name);
 
   virtual sharedptr<Field> get_field_primary_key() const = 0;
-  virtual Gnome::Gda::Value get_primary_key_value_selected() = 0;
+  virtual Glib::ValueBase get_primary_key_value_selected() = 0;
   //virtual bool get_field(const Glib::ustring& name, sharedptr<Field>& field) const;
 
   bool confirm_delete_record();
Index: glom/mode_data/box_data_details.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_details.cc,v
retrieving revision 1.128
diff -u -p -r1.128 box_data_details.cc
--- glom/mode_data/box_data_details.cc	13 Oct 2006 14:33:36 -0000	1.128
+++ glom/mode_data/box_data_details.cc	1 Nov 2006 09:41:25 -0000
@@ -134,19 +134,19 @@ Box_Data_Details::~Box_Data_Details()
   remove_view(&m_FlowTable);
 }
 
-Gnome::Gda::Value Box_Data_Details::get_primary_key_value() const
+Glib::ValueBase Box_Data_Details::get_primary_key_value() const
 {
   return m_primary_key_value;
 }
 
-void Box_Data_Details::set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Gnome::Gda::Value& value)
+void Box_Data_Details::set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Glib::ValueBase& value)
 {
   m_primary_key_value = value;
 }
 
-bool Box_Data_Details::init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value)
+bool Box_Data_Details::init_db_details(const FoundSet& found_set, const Glib::ValueBase& primary_key_value)
 {
-  //std::cout << "Box_Data_Details::init_db_details(): primary_key_value.to_string()=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "Box_Data_Details::init_db_details(): Gnome::Gda::value_to_string(primary_key_value)=" << Gnome::Gda::value_to_string(primary_key_value) << std::endl;
 
   m_primary_key_value = primary_key_value;
 
@@ -155,16 +155,16 @@ bool Box_Data_Details::init_db_details(c
   return Box_Data::init_db_details(found_set); //Calls create_layout(), then fill_from_database()
 }
 
-bool Box_Data_Details::refresh_data_from_database_with_primary_key(const Gnome::Gda::Value& primary_key_value)
+bool Box_Data_Details::refresh_data_from_database_with_primary_key(const Glib::ValueBase& primary_key_value)
 {
-  //std::cout << "refresh_data_from_database_with_primary_key(): primary_key_value.to_string()=" << primary_key_value.to_string() << std::endl;
+  //std::cout << "refresh_data_from_database_with_primary_key(): Gnome::Gda::value_to_string(primary_key_value)=" << Gnome::Gda::value_to_string(primary_key_value) << std::endl;
   m_primary_key_value = primary_key_value;
   return fill_from_database();
 }
 
 bool Box_Data_Details::refresh_data_from_database_blank()
 {
-  return refresh_data_from_database_with_primary_key( Gnome::Gda::Value() );
+  return refresh_data_from_database_with_primary_key( Glib::ValueBase() );
 }
 
 void Box_Data_Details::create_layout()
@@ -194,7 +194,7 @@ void Box_Data_Details::create_layout()
 
 bool Box_Data_Details::fill_from_database()
 {
-  //std::cout << "Box_Data_Details::fill_from_database(): m_primary_key_value.to_string()=" << m_primary_key_value.to_string() << std::endl;
+  //std::cout << "Box_Data_Details::fill_from_database(): Gnome::Gda::value_to_string(m_primary_key_value)=" << Gnome::Gda::value_to_string(m_primary_key_value) << std::endl;
 
   bool bResult = false;
 
@@ -276,7 +276,7 @@ bool Box_Data_Details::fill_from_databas
               sharedptr<LayoutItem_Field> layout_item = fieldsToGet[i];
 
               //Field value:
-              Gnome::Gda::Value value;
+              Glib::ValueBase value;
 
               if(!primary_key_is_empty)
                 value = result->get_value_at(i, row_number);
@@ -319,7 +319,7 @@ void Box_Data_Details::on_button_new()
     if(m_field_primary_key && m_field_primary_key->get_auto_increment()) //If the primary key is an auto-increment:
     {
       //Just make a new record, and show it:
-      Gnome::Gda::Value primary_key_value = generate_next_auto_increment(m_table_name, m_field_primary_key->get_name()); //TODO: This should return a Gda::Value
+      Glib::ValueBase primary_key_value = generate_next_auto_increment(m_table_name, m_field_primary_key->get_name()); //TODO: This should return a Gda::Value
 
       record_new(false /* use entered field data */, primary_key_value);
       refresh_data_from_database_with_primary_key(primary_key_value);
@@ -384,22 +384,22 @@ void Box_Data_Details::on_button_nav_las
     signal_nav_last().emit();
 }
 
-Gnome::Gda::Value Box_Data_Details::get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const
+Glib::ValueBase Box_Data_Details::get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const
 {
   return m_FlowTable.get_field_value(field);
 }
 
-void Box_Data_Details::set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void Box_Data_Details::set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   m_FlowTable.set_field_value(field, value);
 }
 
-void Box_Data_Details::set_entered_field_data(const Gtk::TreeModel::iterator& /* row */, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void Box_Data_Details::set_entered_field_data(const Gtk::TreeModel::iterator& /* row */, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   set_entered_field_data(field, value);
 }
 
-Gnome::Gda::Value Box_Data_Details::get_primary_key_value_selected()
+Glib::ValueBase Box_Data_Details::get_primary_key_value_selected()
 {
   return m_primary_key_value;
 }
@@ -409,7 +409,7 @@ void Box_Data_Details::recalculate_field
   m_FieldsCalculationInProgress.clear();
 
   //Check all fields in the parent table:
-  const Gnome::Gda::Value primary_key_value = get_primary_key_value();
+  const Glib::ValueBase primary_key_value = get_primary_key_value();
   for(type_vecFields::iterator iter = m_TableFields.begin(); iter != m_TableFields.end(); ++iter)
   {
     const sharedptr<const Field> field = *iter;
@@ -439,7 +439,7 @@ void Box_Data_Details::recalculate_field
    m_FieldsCalculationInProgress.clear();
 }
 
-void Box_Data_Details::on_related_record_added(Gnome::Gda::Value /* strKeyValue */, Glib::ustring /* strFromKeyName */)
+void Box_Data_Details::on_related_record_added(Glib::ValueBase /* strKeyValue */, Glib::ustring /* strFromKeyName */)
 {
   //Prevent deletion of Related boxes.
   //One of them emitted this signal, and is probably still being edited.
@@ -518,7 +518,7 @@ void Box_Data_Details::on_flowtable_layo
   fill_from_database();
 }
 
-void Box_Data_Details::on_flowtable_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value)
+void Box_Data_Details::on_flowtable_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value)
 {
   if(Conversions::value_is_empty(primary_key_value))
     return; //Ignore empty ID fields.
@@ -531,7 +531,7 @@ void Box_Data_Details::on_flowtable_rela
   recalculate_fields_for_related_records(relationship_name);
 }
 
-void Box_Data_Details::on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& layout_field, const Gnome::Gda::Value& field_value)
+void Box_Data_Details::on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& layout_field, const Glib::ValueBase& field_value)
 {
   if(Conversions::value_is_empty(field_value))
     return; //Ignore empty ID fields.
@@ -547,7 +547,7 @@ void Box_Data_Details::on_flowtable_scri
 {
   if(layout_item)
   {
-    const Gnome::Gda::Value primary_key_value = get_primary_key_value();
+    const Glib::ValueBase primary_key_value = get_primary_key_value();
     const type_map_fields field_values = get_record_field_values_for_calculation(m_table_name, m_field_primary_key, primary_key_value);
 
    //We need the connection when we run the script, so that the script may use it.
@@ -569,7 +569,7 @@ void Box_Data_Details::on_flowtable_scri
   }
 }
 
-void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& layout_field, const Gnome::Gda::Value& field_value)
+void Box_Data_Details::on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& layout_field, const Glib::ValueBase& field_value)
 {
   if(m_ignore_signals)
     return;
@@ -580,12 +580,12 @@ void Box_Data_Details::on_flowtable_fiel
 
   Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
 
-  Gnome::Gda::Value primary_key_value = get_primary_key_value();
+  Glib::ValueBase primary_key_value = get_primary_key_value();
   if(!Conversions::value_is_empty(primary_key_value)) //If there is not a primary key value:
   {
     Glib::ustring table_name;
     sharedptr<Field> primary_key_field;
-    Gnome::Gda::Value primary_key_value;
+    Glib::ValueBase primary_key_value;
 
     if(!layout_field->get_has_relationship_name())
     {
@@ -637,7 +637,7 @@ void Box_Data_Details::on_flowtable_fiel
     if(!check_entered_value_for_uniqueness(m_table_name, layout_field, field_value, window))
     {
       //Revert to the value in the database:
-      const Gnome::Gda::Value value_old = get_field_value_in_database(field_in_record, window);
+      const Glib::ValueBase value_old = get_field_value_in_database(field_in_record, window);
       set_entered_field_data(layout_field, value_old);
    
       return; 
@@ -704,7 +704,7 @@ void Box_Data_Details::on_flowtable_fiel
       else
       {
         //Make a new record, and show it:
-        Gnome::Gda::Value primary_key_value = generate_next_auto_increment(m_table_name, m_field_primary_key->get_name());
+        Glib::ValueBase primary_key_value = generate_next_auto_increment(m_table_name, m_field_primary_key->get_name());
 
         record_new(true /* use entered field data */, primary_key_value);
         refresh_data_from_database_with_primary_key(primary_key_value);
@@ -719,7 +719,7 @@ void Box_Data_Details::on_flowtable_fiel
         if(!check_entered_value_for_uniqueness(m_table_name, layout_field, field_value, window))
         {
           //Revert to a blank value:
-          const Gnome::Gda::Value value_old = Conversions::get_empty_value(layout_field->get_full_field_details()->get_glom_type());
+          const Glib::ValueBase value_old = Conversions::get_empty_value(layout_field->get_full_field_details()->get_glom_type());
           set_entered_field_data(layout_field, value_old);
         }
         else
@@ -774,7 +774,7 @@ void Box_Data_Details::print_layout_grou
 
         nodeField->set_attribute("title", pLayoutField->get_title_or_name());
 
-        Gnome::Gda::Value value = m_FlowTable.get_field_value(pLayoutField);
+        Glib::ValueBase value = m_FlowTable.get_field_value(pLayoutField);
         const Glib::ustring text_representation = Conversions::get_text_for_gda_value(pLayoutField->get_glom_type(), value,
           pLayoutField->get_formatting_used().m_numeric_format); //In the current locale.
 
Index: glom/mode_data/box_data_details.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_details.h,v
retrieving revision 1.36
diff -u -p -r1.36 box_data_details.h
--- glom/mode_data/box_data_details.h	27 May 2006 09:26:38 -0000	1.36
+++ glom/mode_data/box_data_details.h	1 Nov 2006 09:41:25 -0000
@@ -35,20 +35,20 @@ public: 
   Box_Data_Details(bool bWithNavButtons = true);
   virtual ~Box_Data_Details();
 
-  virtual bool init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value);
-  virtual bool refresh_data_from_database_with_primary_key(const Gnome::Gda::Value& primary_key_value);
+  virtual bool init_db_details(const FoundSet& found_set, const Glib::ValueBase& primary_key_value);
+  virtual bool refresh_data_from_database_with_primary_key(const Glib::ValueBase& primary_key_value);
   virtual bool refresh_data_from_database_blank();
 
   virtual void print_layout();
 
-  virtual Gnome::Gda::Value get_primary_key_value() const; //Actual primary key value of this record.
-  virtual Gnome::Gda::Value get_primary_key_value_selected(); //Value in the primary key's cell.
+  virtual Glib::ValueBase get_primary_key_value() const; //Actual primary key value of this record.
+  virtual Glib::ValueBase get_primary_key_value_selected(); //Value in the primary key's cell.
 
-  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Gnome::Gda::Value& value);
+  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& /* row */, const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
-  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
-  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+  virtual Glib::ValueBase get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
+  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
+  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
 
   //Signals:
   typedef sigc::signal<void> type_signal_void;
@@ -57,13 +57,13 @@ public: 
   type_signal_void signal_nav_next();
   type_signal_void signal_nav_last();
 
-  typedef sigc::signal<void, const Gnome::Gda::Value&> type_signal_record_deleted; //arg is PrimaryKey.   //TODO: pass by const ref?
+  typedef sigc::signal<void, const Glib::ValueBase&> type_signal_record_deleted; //arg is PrimaryKey.   //TODO: pass by const ref?
   type_signal_record_deleted signal_record_deleted();
 
    /** For instance,
-    * void on_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+    * void on_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
     */
-  typedef sigc::signal<void, const Glib::ustring&, Gnome::Gda::Value> type_signal_requested_related_details;
+  typedef sigc::signal<void, const Glib::ustring&, Glib::ValueBase> type_signal_requested_related_details;
   type_signal_requested_related_details signal_requested_related_details();
 
 protected:
@@ -88,22 +88,22 @@ protected:
   virtual void on_flowtable_layout_changed();
 
   //Signal handler: The last 2 args are bind-ed.
-  virtual void on_related_record_added(Gnome::Gda::Value key_value, Glib::ustring strFromKeyName);
+  virtual void on_related_record_added(Glib::ValueBase key_value, Glib::ustring strFromKeyName);
 
   //Signal handler: The last arg is bind-ed.
-  //virtual void on_related_user_requested_details(Gnome::Gda::Value key_value, Glib::ustring table_name);
+  //virtual void on_related_user_requested_details(Glib::ValueBase key_value, Glib::ustring table_name);
 
-  virtual void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& id, const Gnome::Gda::Value& value);
-  void on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& id, const Gnome::Gda::Value& value);
+  virtual void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& id, const Glib::ValueBase& value);
+  void on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& id, const Glib::ValueBase& value);
   void on_flowtable_related_record_changed(const Glib::ustring& relationship_name);
-  void on_flowtable_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+  void on_flowtable_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
 
   void on_flowtable_script_button_clicked(const sharedptr<const LayoutItem_Button>& layout_item);
 
   virtual void recalculate_fields_for_related_records(const Glib::ustring& relationship_name);
 
   sharedptr<Field> m_field_primary_key;
-  Gnome::Gda::Value m_primary_key_value;
+  Glib::ValueBase m_primary_key_value;
 
   //Member widgets:
   Gtk::VPaned m_Paned;
Index: glom/mode_data/box_data_list.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_list.cc,v
retrieving revision 1.133
diff -u -p -r1.133 box_data_list.cc
--- glom/mode_data/box_data_list.cc	20 Oct 2006 17:30:53 -0000	1.133
+++ glom/mode_data/box_data_list.cc	1 Nov 2006 09:41:26 -0000
@@ -215,7 +215,7 @@ void Box_Data_List::on_adddel_user_reque
 
 void Box_Data_List::on_adddel_user_requested_edit(const Gtk::TreeModel::iterator& row)
 {
-  const Gnome::Gda::Value primary_key_value = m_AddDel.get_value_key(row); //The primary key is in the key.
+  const Glib::ValueBase primary_key_value = m_AddDel.get_value_key(row); //The primary key is in the key.
 
   signal_user_requested_details().emit(primary_key_value);
 }
@@ -231,7 +231,7 @@ void Box_Data_List::on_adddel_user_reque
   {
     if(confirm_delete_record())
     {
-      const Gnome::Gda::Value primary_key_value = get_primary_key_value(rowStart);
+      const Glib::ValueBase primary_key_value = get_primary_key_value(rowStart);
       record_delete(primary_key_value);
 
       //Remove the row:
@@ -243,7 +243,7 @@ void Box_Data_List::on_adddel_user_reque
 }
 
 
-void Box_Data_List::set_primary_key_value(const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& value)
+void Box_Data_List::set_primary_key_value(const Gtk::TreeModel::iterator& row, const Glib::ValueBase& value)
 {
   m_AddDel.set_value_key(row, value);
 }
@@ -252,7 +252,7 @@ void Box_Data_List::on_adddel_user_added
 {
   //std::cout << "Box_Data_List::on_adddel_user_added" << std::endl;
 
-  Gnome::Gda::Value primary_key_value;
+  Glib::ValueBase primary_key_value;
 
   sharedptr<Field> primary_key_field = m_AddDel.get_key_field();
 
@@ -261,7 +261,7 @@ void Box_Data_List::on_adddel_user_added
   {
     //Auto-increment is awkward (we can't get the last-generated ID) with postgres, so we auto-generate it ourselves;
     const Glib::ustring& strPrimaryKeyName = primary_key_field->get_name();
-    primary_key_value = generate_next_auto_increment(m_table_name, strPrimaryKeyName);  //TODO: return a Gnome::Gda::Value of an appropriate type.
+    primary_key_value = generate_next_auto_increment(m_table_name, strPrimaryKeyName);  //TODO: return a Glib::ValueBase of an appropriate type.
   }
   else
   {
@@ -347,7 +347,7 @@ void Box_Data_List::on_adddel_user_reord
 
 void Box_Data_List::on_adddel_user_changed(const Gtk::TreeModel::iterator& row, guint col)
 {
-  const Gnome::Gda::Value parent_primary_key_value = get_primary_key_value(row);
+  const Glib::ValueBase parent_primary_key_value = get_primary_key_value(row);
   sharedptr<const LayoutItem_Field> layout_field = m_AddDel.get_column_field(col);
 
   if(!Conversions::value_is_empty(parent_primary_key_value)) //If the record's primary key is filled in:
@@ -358,7 +358,7 @@ void Box_Data_List::on_adddel_user_chang
       
       Glib::ustring table_name = m_table_name;
       sharedptr<Field> primary_key_field;
-      Gnome::Gda::Value primary_key_value;
+      Glib::ValueBase primary_key_value;
 
       if(!layout_field->get_has_relationship_name())
       {
@@ -406,8 +406,8 @@ void Box_Data_List::on_adddel_user_chang
       }
 
       //Update the field in the record (the record with this primary key):
-      const Gnome::Gda::Value field_value = m_AddDel.get_value(row, layout_field);
-      //std::cout << "Box_Data_List::on_adddel_user_changed(): field_value = " << field_value.to_string() << std::endl;
+      const Glib::ValueBase field_value = m_AddDel.get_value(row, layout_field);
+      //std::cout << "Box_Data_List::on_adddel_user_changed(): field_value = " << Gnome::Gda::value_to_string(field_value) << std::endl;
       //const sharedptr<const Field>& field = layout_field->m_field;
       //const Glib::ustring strFieldName = layout_field->get_name();
 
@@ -418,7 +418,7 @@ void Box_Data_List::on_adddel_user_chang
       if(!check_entered_value_for_uniqueness(m_table_name, row, layout_field, field_value, window))
       {
         //Revert to the value in the database:
-        const Gnome::Gda::Value value_old = get_field_value_in_database(field_in_record, window);
+        const Glib::ValueBase value_old = get_field_value_in_database(field_in_record, window);
         set_entered_field_data(row, layout_field, value_old);
 
         return; //The value has been reverted to the value in the database.
@@ -449,7 +449,7 @@ void Box_Data_List::on_adddel_user_chang
     //Actually, on_adddel_user_added() is usually just called directly in response to the user_added signal.
     on_adddel_user_added(row, col);
     
-    const Gnome::Gda::Value primaryKeyValue = get_primary_key_value(row); //TODO_Value
+    const Glib::ValueBase primaryKeyValue = get_primary_key_value(row); //TODO_Value
     if(!(Conversions::value_is_empty(primaryKeyValue))) //If the Add succeeeded:
     {
       if(!(layout_field->get_full_field_details()->get_primary_key())) //Don't try to re-set the primary key field, because we just inserted the record with it.
@@ -516,10 +516,10 @@ void Box_Data_List::on_details_nav_last(
     signal_user_requested_details().emit(m_AddDel.get_value_key_selected());
   }
   else
-    signal_user_requested_details().emit(Gnome::Gda::Value()); //Show a blank record if there are no records.
+    signal_user_requested_details().emit(Glib::ValueBase()); //Show a blank record if there are no records.
 }
 
-void Box_Data_List::on_details_record_deleted(const Gnome::Gda::Value& primary_key_value)
+void Box_Data_List::on_details_record_deleted(const Glib::ValueBase& primary_key_value)
 {
   //Find out which row is affected:
   Gtk::TreeModel::iterator iter = m_AddDel.get_row(primary_key_value);
@@ -552,17 +552,17 @@ void Box_Data_List::on_details_record_de
   }
 }
 
-Gnome::Gda::Value Box_Data_List::get_primary_key_value(const Gtk::TreeModel::iterator& row)
+Glib::ValueBase Box_Data_List::get_primary_key_value(const Gtk::TreeModel::iterator& row)
 {
   return m_AddDel.get_value_key(row);
 }
 
-Gnome::Gda::Value Box_Data_List::get_primary_key_value_selected()
+Glib::ValueBase Box_Data_List::get_primary_key_value_selected()
 {
   return m_AddDel.get_value_key_selected();
 }
 
-Gnome::Gda::Value Box_Data_List::get_primary_key_value_first()
+Glib::ValueBase Box_Data_List::get_primary_key_value_first()
 {
   //std::cout << "Box_Data_List(): get_primary_key_value_first() records_count = " << m_AddDel.get_count() << std::endl;
 
@@ -572,7 +572,7 @@ Gnome::Gda::Value Box_Data_List::get_pri
     Gtk::TreeModel::iterator iter = model->children().begin();
     while(iter != model->children().end())
     {
-      Gnome::Gda::Value value = get_primary_key_value(iter);
+      Glib::ValueBase value = get_primary_key_value(iter);
       if(Conversions::value_is_empty(value))
       {
        //std::cout << "Box_Data_List(): get_primary_key_value_first() iter val is NULL" << std::endl;
@@ -580,27 +580,27 @@ Gnome::Gda::Value Box_Data_List::get_pri
       }
       else
       {
-         //std::cout << "Box_Data_List(): get_primary_key_value_first() returning: " << value.to_string() << std::endl;
+         //std::cout << "Box_Data_List(): get_primary_key_value_first() returning: " << Gnome::Gda::value_to_string(value) << std::endl;
         return value;
       }
     }
   }
 
  // std::cout << "Box_Data_List(): get_primary_key_value_first() return NULL" << std::endl;
-  return Gnome::Gda::Value();
+  return Glib::ValueBase();
 }
 
-Gnome::Gda::Value Box_Data_List::get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const
+Glib::ValueBase Box_Data_List::get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const
 {
   return m_AddDel.get_value_selected(field);
 }
 
-void Box_Data_List::set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void Box_Data_List::set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   return m_AddDel.set_value_selected(field, value);
 }
 
-void Box_Data_List::set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void Box_Data_List::set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   return m_AddDel.set_value(row, field, value);
 }
@@ -702,12 +702,12 @@ void Box_Data_List::create_layout()
 
 }
 
-void Box_Data_List::on_record_deleted(const Gnome::Gda::Value& /* primary_key_value */)
+void Box_Data_List::on_record_deleted(const Glib::ValueBase& /* primary_key_value */)
 {
    //Overridden by Box_Data_List_Related.
 }
 
-void Box_Data_List::on_record_added(const Gnome::Gda::Value& /* strPrimaryKey */, const Gtk::TreeModel::iterator& /* row */)
+void Box_Data_List::on_record_added(const Glib::ValueBase& /* strPrimaryKey */, const Gtk::TreeModel::iterator& /* row */)
 {
   //Overridden by Box_Data_List_Related.
   //m_AddDel.add_item(strPrimaryKey); //Add blank row.
@@ -773,7 +773,7 @@ void Box_Data_List::set_open_button_titl
   m_AddDel.set_open_button_title(title);
 }
 
-void Box_Data_List::set_primary_key_value_selected(const Gnome::Gda::Value& primary_key_value)
+void Box_Data_List::set_primary_key_value_selected(const Glib::ValueBase& primary_key_value)
 {
   Gtk::TreeModel::iterator iter = m_AddDel.get_row(primary_key_value);
   if(iter)
Index: glom/mode_data/box_data_list.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_list.h,v
retrieving revision 1.42
diff -u -p -r1.42 box_data_list.h
--- glom/mode_data/box_data_list.h	6 Oct 2006 21:30:45 -0000	1.42
+++ glom/mode_data/box_data_list.h	1 Nov 2006 09:41:26 -0000
@@ -35,16 +35,16 @@ public: 
 
   void refresh_data_from_database_blank();
 
-  virtual Gnome::Gda::Value get_primary_key_value(const Gtk::TreeModel::iterator& row);
-  virtual Gnome::Gda::Value get_primary_key_value_selected();
-  Gnome::Gda::Value get_primary_key_value_first();
+  virtual Glib::ValueBase get_primary_key_value(const Gtk::TreeModel::iterator& row);
+  virtual Glib::ValueBase get_primary_key_value_selected();
+  Glib::ValueBase get_primary_key_value_first();
 
   ///This allows Box_Data::record_new() to set the generated/entered primary key value, needed by Box_Data_List:
-  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& value);
+  virtual void set_primary_key_value(const Gtk::TreeModel::iterator& row, const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
-  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
-  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+  virtual Glib::ValueBase get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
+  virtual void set_entered_field_data(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
+  virtual void set_entered_field_data(const Gtk::TreeModel::iterator& row, const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
 
   bool get_showing_multiple_records() const;
 
@@ -54,10 +54,10 @@ public: 
   void set_open_button_title(const Glib::ustring& title);
 
   ///Highlight and scroll to the specified record, with primary key value @primary_key_value.
-  void set_primary_key_value_selected(const Gnome::Gda::Value& primary_key_value);
+  void set_primary_key_value_selected(const Glib::ValueBase& primary_key_value);
 
   //Primary Key value:
-  typedef sigc::signal<void, const Gnome::Gda::Value&> type_signal_user_requested_details;
+  typedef sigc::signal<void, const Glib::ValueBase&> type_signal_user_requested_details;
   type_signal_user_requested_details signal_user_requested_details();
 
   //Signal Handlers:
@@ -65,7 +65,7 @@ public: 
   virtual void on_details_nav_previous();
   virtual void on_details_nav_next();
   virtual void on_details_nav_last();
-  virtual void on_details_record_deleted(const Gnome::Gda::Value& primary_key_value);
+  virtual void on_details_record_deleted(const Glib::ValueBase& primary_key_value);
 
   void get_record_counts(gulong& total, gulong& found) const;
 
@@ -90,8 +90,8 @@ protected:
 
   virtual void on_adddel_user_changed(const Gtk::TreeModel::iterator& row, guint col);
 
-  virtual void on_record_added(const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row); //Not a signal handler. To be overridden.
-  virtual void on_record_deleted(const Gnome::Gda::Value& primary_key_value);
+  virtual void on_record_added(const Glib::ValueBase& primary_key_value, const Gtk::TreeModel::iterator& row); //Not a signal handler. To be overridden.
+  virtual void on_record_deleted(const Glib::ValueBase& primary_key_value);
 
   virtual void print_layout();
   virtual void print_layout_group(xmlpp::Element* node_parent, const sharedptr<const LayoutGroup>& group);
Index: glom/mode_data/box_data_list_related.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_list_related.cc,v
retrieving revision 1.82
diff -u -p -r1.82 box_data_list_related.cc
--- glom/mode_data/box_data_list_related.cc	13 Oct 2006 11:33:00 -0000	1.82
+++ glom/mode_data/box_data_list_related.cc	1 Nov 2006 09:41:26 -0000
@@ -132,7 +132,7 @@ bool Box_Data_List_Related::init_db_deta
     return false;
 }
 
-bool Box_Data_List_Related::refresh_data_from_database_with_foreign_key(const Gnome::Gda::Value& foreign_key_value)
+bool Box_Data_List_Related::refresh_data_from_database_with_foreign_key(const Glib::ValueBase& foreign_key_value)
 {
   m_key_value = foreign_key_value;
 
@@ -204,7 +204,7 @@ bool Box_Data_List_Related::fill_from_da
   return result;
 }
 
-void Box_Data_List_Related::on_record_added(const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row)
+void Box_Data_List_Related::on_record_added(const Glib::ValueBase& primary_key_value, const Gtk::TreeModel::iterator& row)
 {
   //primary_key_value is a new autogenerated or human-entered key for the row.
   //It has already been added to the database.
@@ -212,7 +212,7 @@ void Box_Data_List_Related::on_record_ad
   if(!row)
     return;
 
-  Gnome::Gda::Value key_value;
+  Glib::ValueBase key_value;
 
   if(m_key_field)
   {
@@ -271,7 +271,7 @@ sharedptr<const Field> Box_Data_List_Rel
   return m_key_field;
 }
 
-void Box_Data_List_Related::on_record_deleted(const Gnome::Gda::Value& /* primary_key_value */)
+void Box_Data_List_Related::on_record_deleted(const Glib::ValueBase& /* primary_key_value */)
 {
   //Allow the parent record (Details view) to recalculate aggregations:
   signal_record_changed().emit(m_portal->get_relationship_name());
@@ -468,11 +468,11 @@ void Box_Data_List_Related::get_suitable
   relationship = navigation_relationship;
 }
 
-void Box_Data_List_Related::get_suitable_record_to_view_details(const Gnome::Gda::Value& primary_key_value, Glib::ustring& table_name, Gnome::Gda::Value& table_primary_key_value) const
+void Box_Data_List_Related::get_suitable_record_to_view_details(const Glib::ValueBase& primary_key_value, Glib::ustring& table_name, Glib::ValueBase& table_primary_key_value) const
 {
   //Initialize output parameters:
   table_name = Glib::ustring();
-  table_primary_key_value = Gnome::Gda::Value();
+  table_primary_key_value = Glib::ValueBase();
 
   Glib::ustring navigation_table_name;
   sharedptr<const UsesRelationship> navigation_relationship;
@@ -510,7 +510,7 @@ void Box_Data_List_Related::get_suitable
     table_name = navigation_table_name;
     table_primary_key_value = data_model->get_value_at(0, 0);
 
-    //std::cout << "Box_Data_List_Related::get_suitable_record_to_view_details(): table_primary_key_value=" << table_primary_key_value.to_string() << std::endl;
+    //std::cout << "Box_Data_List_Related::get_suitable_record_to_view_details(): table_primary_key_value=" << Gnome::Gda::value_to_string(table_primary_key_value) << std::endl;
 
     //The value is empty when there there is no record to match the key in the related table:
     //For instance, if an invoice lines record mentions a product id, but the product does not exist in the products table.
@@ -530,7 +530,7 @@ void Box_Data_List_Related::get_suitable
   {
     //Clear the output parameters:
     table_name = Glib::ustring();
-    table_primary_key_value = Gnome::Gda::Value();
+    table_primary_key_value = Glib::ValueBase();
 
     Gtk::Window* window = const_cast<Gtk::Window*>(get_app_window());
     if(window)
Index: glom/mode_data/box_data_list_related.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/box_data_list_related.h,v
retrieving revision 1.32
diff -u -p -r1.32 box_data_list_related.h
--- glom/mode_data/box_data_list_related.h	8 Oct 2006 13:30:44 -0000	1.32
+++ glom/mode_data/box_data_list_related.h	1 Nov 2006 09:41:26 -0000
@@ -46,18 +46,18 @@ public: 
    * @param foreign_key_value: The value that should be found in this table.
    * @param from_table_primary_key_value The primary key of the parent record's table, used to associate new related records.
    */
-  virtual bool refresh_data_from_database_with_foreign_key(const Gnome::Gda::Value& foreign_key_value);
+  virtual bool refresh_data_from_database_with_foreign_key(const Glib::ValueBase& foreign_key_value);
 
   virtual sharedptr<Relationship> get_relationship() const;
   virtual sharedptr<const Field> get_key_field() const;
 
   virtual void show_layout_dialog();
 
-  sigc::signal<void, Gnome::Gda::Value> signal_record_added;
+  sigc::signal<void, Glib::ValueBase> signal_record_added;
 
   bool get_has_suitable_record_to_view_details() const;
   void get_suitable_table_to_view_details(Glib::ustring& table_name, sharedptr<const UsesRelationship>& relationship) const;
-  void get_suitable_record_to_view_details(const Gnome::Gda::Value& primary_key_value, Glib::ustring& table_name, Gnome::Gda::Value& table_primary_key_value) const;
+  void get_suitable_record_to_view_details(const Glib::ValueBase& primary_key_value, Glib::ustring& table_name, Glib::ValueBase& table_primary_key_value) const;
 
   ///@param relationship_name
   typedef sigc::signal<void, const Glib::ustring&> type_signal_record_changed;
@@ -70,8 +70,8 @@ protected:
   virtual void on_adddel_user_requested_add();
   virtual void on_adddel_user_changed(const Gtk::TreeModel::iterator& row, guint col);
   virtual void on_adddel_user_added(const Gtk::TreeModel::iterator& row, guint col_with_first_value); //Override.
-  virtual void on_record_added(const Gnome::Gda::Value& primary_key_value, const Gtk::TreeModel::iterator& row); //Override. Not a signal handler.
-  virtual void on_record_deleted(const Gnome::Gda::Value& primary_key_value); //override.
+  virtual void on_record_added(const Glib::ValueBase& primary_key_value, const Gtk::TreeModel::iterator& row); //Override. Not a signal handler.
+  virtual void on_record_deleted(const Glib::ValueBase& primary_key_value); //override.
   virtual void on_dialog_layout_hide(); //override.
 
   virtual void enable_buttons(); //override
@@ -86,7 +86,7 @@ protected:
 
   sharedptr<LayoutItem_Portal> m_portal;
   sharedptr<Field> m_key_field;
-  Gnome::Gda::Value m_key_value;
+  Glib::ValueBase m_key_value;
 
   type_signal_record_changed m_signal_record_changed;
 };
Index: glom/mode_data/notebook_data.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/notebook_data.cc,v
retrieving revision 1.37
diff -u -p -r1.37 notebook_data.cc
--- glom/mode_data/notebook_data.cc	9 Oct 2006 07:24:46 -0000	1.37
+++ glom/mode_data/notebook_data.cc	1 Nov 2006 09:41:26 -0000
@@ -65,7 +65,7 @@ Notebook_Data::~Notebook_Data()
   remove_view(&m_Box_Details);
 }
 
-bool Notebook_Data::init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value_for_details)
+bool Notebook_Data::init_db_details(const FoundSet& found_set, const Glib::ValueBase& primary_key_value_for_details)
 {
   m_table_name = found_set.m_table_name;
   //std::cout << "Notebook_Data::init_db_details: table_name=" << m_table_name << std::endl;
@@ -92,7 +92,7 @@ bool Notebook_Data::init_db_details(cons
     Document_Glom* document = get_document();
     if(document)
     {
-      Gnome::Gda::Value primary_key_for_details;
+      Glib::ValueBase primary_key_for_details;
 
       if(!details_record_specified)
       {
@@ -113,19 +113,19 @@ bool Notebook_Data::init_db_details(cons
       //then ignore it:
       if(!found_set.m_where_clause.empty() && !get_primary_key_is_in_foundset(found_set, primary_key_for_details))
       {
-        primary_key_for_details = Gnome::Gda::Value(); //TODO: We set it to empty just so we can test if for empty.
+        primary_key_for_details = Glib::ValueBase(); //TODO: We set it to empty just so we can test if for empty.
       }
 
       if(Conversions::value_is_empty(primary_key_for_details))
       {
         //Make sure that the details view is not empty, if there are any records to show:
         primary_key_for_details = m_Box_List.get_primary_key_value_selected();
-        //std::cout << "debug:  m_Box_List.get_primary_key_value_selected()=" << primary_key_for_details.to_string() << std::endl;
+        //std::cout << "debug:  m_Box_List.get_primary_key_value_selected()=" << Gnome::Gda::value_to_string(primary_key_for_details) << std::endl;
         if(Conversions::value_is_empty(primary_key_for_details))
         {
           //std::cout << "debug: calling list.get_primary_key_value_first()" << std::endl;
           primary_key_for_details = m_Box_List.get_primary_key_value_first();
-          //std::cout << "  debug:  result=" <<  primary_key_for_details.to_string() << std::endl;
+          //std::cout << "  debug:  result=" <<  Gnome::Gda::value_to_string(primary_key_for_details) << std::endl;
         }
       }
 
@@ -182,14 +182,14 @@ FoundSet Notebook_Data::get_found_set() 
   return m_Box_List.get_found_set();
 }
 
-void Notebook_Data::on_list_user_requested_details(const Gnome::Gda::Value& primary_key_value)
+void Notebook_Data::on_list_user_requested_details(const Glib::ValueBase& primary_key_value)
 {
   //std::cout << "Notebook_Data::on_list_user_requested_details" << std::endl;
   m_Box_Details.refresh_data_from_database_with_primary_key(primary_key_value);
   set_current_page(m_iPage_Details);
 }
 
-void Notebook_Data::on_details_user_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value)
+void Notebook_Data::on_details_user_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value)
 {
   signal_record_details_requested().emit(table_name, primary_key_value);
 
@@ -270,7 +270,7 @@ Notebook_Data::type_signal_record_detail
   return m_signal_record_details_requested;
 }
 
-void Notebook_Data::show_details(const Gnome::Gda::Value& primary_key_value)
+void Notebook_Data::show_details(const Glib::ValueBase& primary_key_value)
 {
   //Reuse this implementation:
   on_list_user_requested_details(primary_key_value);
@@ -295,7 +295,7 @@ void Notebook_Data::on_switch_page_handl
     //TODO_Performance: This causes double refreshes (with database retrieval) when doing finds. We probably want to distinguish between user page-switches and programmatic page-switches.
     if(box == &m_Box_List)
     {
-      Gnome::Gda::Value primary_key_selected = m_Box_List.get_primary_key_value_selected();
+      Glib::ValueBase primary_key_selected = m_Box_List.get_primary_key_value_selected();
       m_Box_List.refresh_data_from_database();
       m_Box_List.set_primary_key_value_selected(primary_key_selected);
     }
Index: glom/mode_data/notebook_data.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_data/notebook_data.h,v
retrieving revision 1.22
diff -u -p -r1.22 notebook_data.h
--- glom/mode_data/notebook_data.h	27 May 2006 09:26:38 -0000	1.22
+++ glom/mode_data/notebook_data.h	1 Nov 2006 09:41:26 -0000
@@ -35,13 +35,13 @@ public: 
   virtual ~Notebook_Data();
 
   //Create the layout for the database structure, and fill it with data.
-  virtual bool init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value_for_details = Gnome::Gda::Value());
+  virtual bool init_db_details(const FoundSet& found_set, const Glib::ValueBase& primary_key_value_for_details = Glib::ValueBase());
 
   ///Get the existing where clause, previously supplied to init_db_details().
   FoundSet get_found_set() const;
 
   ///Show the details for a particular record, without affecting the list view:
-  virtual void show_details(const Gnome::Gda::Value& primary_key_value);
+  virtual void show_details(const Glib::ValueBase& primary_key_value);
 
   virtual void select_page_for_find_results(); //Details for 1, List for > 1.
 
@@ -59,7 +59,7 @@ public: 
   dataview get_current_view() const;
   void set_current_view(dataview view);
 
-  typedef sigc::signal<void, const Glib::ustring&, Gnome::Gda::Value> type_signal_record_details_requested;
+  typedef sigc::signal<void, const Glib::ustring&, Glib::ValueBase> type_signal_record_details_requested;
   type_signal_record_details_requested signal_record_details_requested();
 
 protected:
@@ -68,8 +68,8 @@ protected:
   void update_records_count();
 
   //Signal handlers:
-  virtual void on_list_user_requested_details(const Gnome::Gda::Value& primary_key_value);
-  void on_details_user_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+  virtual void on_list_user_requested_details(const Glib::ValueBase& primary_key_value);
+  void on_details_user_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
 
   virtual void on_switch_page_handler(GtkNotebookPage* pPage, guint uiPageNumber);
 
Index: glom/mode_design/fields/box_db_table_definition.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_design/fields/box_db_table_definition.cc,v
retrieving revision 1.58
diff -u -p -r1.58 box_db_table_definition.cc
--- glom/mode_design/fields/box_db_table_definition.cc	18 Oct 2006 11:54:31 -0000	1.58
+++ glom/mode_design/fields/box_db_table_definition.cc	1 Nov 2006 09:41:27 -0000
@@ -103,7 +103,7 @@ void Box_DB_Table_Definition::fill_field
   m_AddDel.set_value(iter, m_colTitle, title);
 
   //Type:
-  Field::glom_field_type fieldType = Field::get_glom_type_for_gda_type(field->get_field_info().get_gdatype()); //Could be TYPE_INVALID if the gda type is not one of ours.
+  Field::glom_field_type fieldType = Field::get_glom_type_for_gda_type(field->get_field_info().get_type()); //Could be TYPE_INVALID if the gda type is not one of ours.
 
   const Glib::ustring strType = Field::get_type_name_ui( fieldType );
   m_AddDel.set_value(iter, m_colType, strType);
@@ -176,8 +176,8 @@ void Box_DB_Table_Definition::on_adddel_
       field->set_title( Utils::title_from_string(name) ); //Start with a title that might be useful.
       field->set_glom_type(Field::TYPE_NUMERIC);
 
-      Gnome::Gda::FieldAttributes field_info = field->get_field_info();
-      field_info.set_gdatype( Field::get_gda_type_for_glom_type(Field::TYPE_NUMERIC) );
+      Glib::RefPtr<Gnome::Gda::Column> field_info = field->get_field_info();
+      field_info->set_gdatype( Field::get_gda_type_for_glom_type(Field::TYPE_NUMERIC) );
       field->set_field_info(field_info);
 
       fill_field_row(row, field);
@@ -237,7 +237,7 @@ bool Box_DB_Table_Definition::check_fiel
 
   //If we are changing a non-glom type:
   //Refuse to edit field definitions that were not created by glom:
-  if(Field::get_glom_type_for_gda_type( field_old->get_field_info().get_gdatype() )  == Field::TYPE_INVALID)
+  if(Field::get_glom_type_for_gda_type( field_old->get_field_info().get_type() )  == Field::TYPE_INVALID)
   {
     Gtk::MessageDialog dialog(Bakery::App_Gtk::util_bold_message(_("Invalid database structure")), true);
     dialog.set_secondary_text(_("This database field was created or edited outside of Glom. It has a data type that is not supported by Glom. Your system administrator may be able to correct this."));
@@ -365,11 +365,11 @@ sharedptr<Field> Box_DB_Table_Definition
   sharedptr<const Field> field_temp = get_fields_for_table_one_field(m_table_name, strFieldNameBeforeEdit);
   if(field_temp)
   {
-    Gnome::Gda::FieldAttributes fieldInfo = field_temp->get_field_info();
+    Glib::RefPtr<Gnome::Gda::Column> fieldInfo = field_temp->get_field_info();
 
     //Name:
     const Glib::ustring name = m_AddDel.get_value(row, m_colName);
-    fieldInfo.set_name(name);
+    fieldinfo->set_name(name);
 
     //Title:
     const Glib::ustring title = m_AddDel.get_value(row, m_colTitle);
@@ -379,17 +379,17 @@ sharedptr<Field> Box_DB_Table_Definition
     const Glib::ustring& strType = m_AddDel.get_value(row, m_colType);
 
     const Field::glom_field_type glom_type =  Field::get_type_for_ui_name(strType);
-    Gnome::Gda::ValueType fieldType = Field::get_gda_type_for_glom_type(glom_type);
+    GType fieldType = Field::get_gda_type_for_glom_type(glom_type);
 
     //Unique:
     const bool bUnique = m_AddDel.get_value_as_bool(row, m_colUnique);
-    fieldInfo.set_unique_key(bUnique);
+    fieldinfo->set_unique_key(bUnique);
 
     //Primary Key:
     const bool bPrimaryKey = m_AddDel.get_value_as_bool(row, m_colPrimaryKey);
-    fieldInfo.set_primary_key(bPrimaryKey);
+    fieldinfo->set_primary_key(bPrimaryKey);
 
-    fieldInfo.set_gdatype(fieldType);
+    fieldinfo->set_gdatype(fieldType);
 
     //Put it together:
     fieldResult->set_field_info(fieldInfo);
@@ -545,11 +545,11 @@ void Box_DB_Table_Definition::fill_field
 
 sharedptr<Field> Box_DB_Table_Definition::postgres_change_column(const sharedptr<const Field>& field_old, const sharedptr<const Field>& field)
 {
-  const Gnome::Gda::FieldAttributes field_info = field->get_field_info();
-  const Gnome::Gda::FieldAttributes field_info_old = field_old->get_field_info();
+  const Glib::RefPtr<Gnome::Gda::Column> field_info = field->get_field_info();
+  const Glib::RefPtr<Gnome::Gda::Column> field_info_old = field_old->get_field_info();
 
   //If the underlying data type has changed:
-  if( field_info.get_gdatype() != field_info_old.get_gdatype() )
+  if( field_info->get_type() != field_info_old.get_type() )
   {
     postgres_change_column_type(field_old, field); //This will also change everything else at the same time.
     return glom_sharedptr_clone(field);
@@ -576,7 +576,7 @@ void Box_DB_Table_Definition::postgres_c
     bool new_column_created = false;
 
     //If the datatype has changed:
-    if(field->get_field_info().get_gdatype() != field_old->get_field_info().get_gdatype())
+    if(field->get_field_info().get_type() != field_old->get_field_info().get_type())
     {
       //We have to create a new table, and move the data across:
       //See http://www.postgresql.org/docs/faqs/FAQ.html#4.4
Index: glom/mode_design/fields/dialog_fieldcalculation.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_design/fields/dialog_fieldcalculation.cc,v
retrieving revision 1.18
diff -u -p -r1.18 dialog_fieldcalculation.cc
--- glom/mode_design/fields/dialog_fieldcalculation.cc	19 Oct 2006 10:18:13 -0000	1.18
+++ glom/mode_design/fields/dialog_fieldcalculation.cc	1 Nov 2006 09:41:27 -0000
@@ -105,7 +105,7 @@ void Dialog_FieldCalculation::on_button_
     for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       const sharedptr<const Field> field = *iter;
-      const Gnome::Gda::Value example_value = Conversions::get_example_value(field->get_glom_type());
+      const Glib::ValueBase example_value = Conversions::get_example_value(field->get_glom_type());
       field_values[field->get_name()] = example_value;
     }
   }
@@ -113,10 +113,10 @@ void Dialog_FieldCalculation::on_button_
   //We need the connection when we run the script, so that the script may use it.
   sharedptr<SharedConnection> sharedconnection = connect_to_server(this /* parent window */);
 
-  Gnome::Gda::Value value = glom_evaluate_python_function_implementation(Field::TYPE_TEXT, calculation, field_values, //TODO: Maybe use the field's type here.
+  Glib::ValueBase value = glom_evaluate_python_function_implementation(Field::TYPE_TEXT, calculation, field_values, //TODO: Maybe use the field's type here.
     document, m_table_name, sharedconnection->get_gda_connection());
 
-  Frame_Glom::show_ok_dialog(_("Calculation result"), _("The result of the calculation is:\n") + value.to_string(), *this);
+  Frame_Glom::show_ok_dialog(_("Calculation result"), _("The result of the calculation is:\n") + Gnome::Gda::value_to_string(value), *this);
 
 
   //Show what fields would trigger the recalculation:
Index: glom/mode_design/fields/dialog_fielddefinition.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_design/fields/dialog_fielddefinition.cc,v
retrieving revision 1.29
diff -u -p -r1.29 dialog_fielddefinition.cc
--- glom/mode_design/fields/dialog_fielddefinition.cc	19 Oct 2006 10:18:13 -0000	1.29
+++ glom/mode_design/fields/dialog_fielddefinition.cc	1 Nov 2006 09:41:27 -0000
@@ -119,7 +119,7 @@ void Dialog_FieldDefinition::set_field(c
   m_table_name = table_name;  //Used for lookup combo boxes.
 
   //Set the Widgets from the field info:
-  //const Gnome::Gda::FieldAttributes& fieldInfo = field->get_field_info();
+  //const Glib::RefPtr<Gnome::Gda::Column>& fieldInfo = field->get_field_info();
 
   m_pEntry_Name->set_text(field->get_name());
   m_pCombo_Type->set_field_type( field->get_glom_type() );
@@ -136,7 +136,7 @@ void Dialog_FieldDefinition::set_field(c
     disable_default_value = true;
 
   //Default value: simple:
-  Gnome::Gda::Value default_value;
+  Glib::ValueBase default_value;
   if(!disable_default_value)
     default_value = m_Field->get_default_value();
 
@@ -221,20 +221,20 @@ sharedptr<Field> Dialog_FieldDefinition:
 
   //Get the field info from the widgets:
 
-  Gnome::Gda::FieldAttributes fieldInfo = field->get_field_info(); //Preserve previous information.
+  Glib::RefPtr<Gnome::Gda::Column> fieldInfo = field->get_field_info(); //Preserve previous information.
 
-  fieldInfo.set_name(m_pEntry_Name->get_text());
+  fieldinfo->set_name(m_pEntry_Name->get_text());
 
-  fieldInfo.set_gdatype( Field::get_gda_type_for_glom_type( m_pCombo_Type->get_field_type() ) );
+  fieldinfo->set_gdatype( Field::get_gda_type_for_glom_type( m_pCombo_Type->get_field_type() ) );
 
-  fieldInfo.set_unique_key(m_pCheck_Unique->get_active());
-  fieldInfo.set_primary_key(m_pCheck_PrimaryKey->get_active());
-  fieldInfo.set_auto_increment(m_pCheck_AutoIncrement->get_active());
+  fieldinfo->set_unique_key(m_pCheck_Unique->get_active());
+  fieldinfo->set_primary_key(m_pCheck_PrimaryKey->get_active());
+  fieldinfo->set_auto_increment(m_pCheck_AutoIncrement->get_active());
 
-  if(!fieldInfo.get_auto_increment()) //Ignore default_values for auto_increment fields - it's just some obscure postgres code.
+  if(!fieldinfo->get_auto_increment()) //Ignore default_values for auto_increment fields - it's just some obscure postgres code.
   {
     //Simple default value:
-    fieldInfo.set_default_value( m_pDataWidget_DefaultValueSimple->get_value() );
+    fieldinfo->set_default_value( m_pDataWidget_DefaultValueSimple->get_value() );
   }
 
   //Lookup:
@@ -254,7 +254,7 @@ sharedptr<Field> Dialog_FieldDefinition:
   if(m_pRadio_Calculate)
     field->set_calculation(m_pTextView_Calculation->get_buffer()->get_text());
 
-  Gnome::Gda::FieldAttributes field_info_copy = fieldInfo;
+  Glib::RefPtr<Gnome::Gda::Column> field_info_copy = fieldInfo;
 
   field->set_field_info(fieldInfo);
 
@@ -293,7 +293,7 @@ void Dialog_FieldDefinition::enforce_con
   if(m_pCheck_Unique->get_active() || m_pCheck_AutoIncrement->get_active())
   {
     m_pBox_ValueTab->set_sensitive(false); //Disable all controls on the Notebook page.
-    m_pDataWidget_DefaultValueSimple->set_value( Gnome::Gda::Value() ); //Unique fields cannot have default values. //TODO: People will be surprised when they lose information here. We should probably read the text as "" if the widget is disabled.
+    m_pDataWidget_DefaultValueSimple->set_value( Glib::ValueBase() ); //Unique fields cannot have default values. //TODO: People will be surprised when they lose information here. We should probably read the text as "" if the widget is disabled.
   }
   else
   {
Index: glom/mode_find/box_data_details_find.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_find/box_data_details_find.cc,v
retrieving revision 1.23
diff -u -p -r1.23 box_data_details_find.cc
--- glom/mode_find/box_data_details_find.cc	27 May 2006 09:26:40 -0000	1.23
+++ glom/mode_find/box_data_details_find.cc	1 Nov 2006 09:41:27 -0000
@@ -45,7 +45,7 @@ bool Box_Data_Details_Find::init_db_deta
 {
   FoundSet found_set;
   found_set.m_table_name = table_name;
-  return Box_Data_Details::init_db_details(found_set, Gnome::Gda::Value());
+  return Box_Data_Details::init_db_details(found_set, Glib::ValueBase());
 }
 
 bool Box_Data_Details_Find::fill_from_database()
@@ -93,7 +93,7 @@ void Box_Data_Details_Find::fill_related
 }
 
 
-void Box_Data_Details_Find::on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& /* id */, const Gnome::Gda::Value& /* value */)
+void Box_Data_Details_Find::on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& /* id */, const Glib::ValueBase& /* value */)
 {
   //Don't do anything.
   //This just blocks the method in the base class.
Index: glom/mode_find/box_data_details_find.h
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_find/box_data_details_find.h,v
retrieving revision 1.11
diff -u -p -r1.11 box_data_details_find.h
--- glom/mode_find/box_data_details_find.h	27 May 2006 09:26:40 -0000	1.11
+++ glom/mode_find/box_data_details_find.h	1 Nov 2006 09:41:27 -0000
@@ -41,7 +41,7 @@ protected:
   virtual bool fill_from_database(); //override.
   virtual void fill_related(); //override.
 
-  virtual void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& id, const Gnome::Gda::Value& value);
+  virtual void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& id, const Glib::ValueBase& value);
 
 };
 
Index: glom/mode_find/box_data_list_find.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/mode_find/box_data_list_find.cc,v
retrieving revision 1.20
diff -u -p -r1.20 box_data_list_find.cc
--- glom/mode_find/box_data_list_find.cc	20 Oct 2006 10:21:26 -0000	1.20
+++ glom/mode_find/box_data_list_find.cc	1 Nov 2006 09:41:27 -0000
@@ -57,7 +57,7 @@ bool Box_Data_List_Find::fill_from_datab
 
   m_FieldsShown = get_fields_to_show();
 
-  //m_AddDel.add_item(Gnome::Gda::Value("find"));
+  //m_AddDel.add_item(Glib::ValueBase("find"));
 
   return result;
 }
Index: glom/python_embed/glom_python.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/python_embed/glom_python.cc,v
retrieving revision 1.21
diff -u -p -r1.21 glom_python.cc
--- glom/python_embed/glom_python.cc	8 Oct 2006 15:58:21 -0000	1.21
+++ glom/python_embed/glom_python.cc	1 Nov 2006 09:41:27 -0000
@@ -70,20 +70,20 @@ void glom_execute_python_function_implem
   glom_evaluate_python_function_implementation(Field::TYPE_TEXT, func_impl, field_values, pDocument, table_name, opened_connection);
 }
 
-Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
+Glib::ValueBase glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
     const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
 {
   //std::cout << "glom_evaluate_python_function_implementation()" << std::endl;
   //for(type_map_fields::const_iterator iter = field_values.begin(); iter != field_values.end(); ++iter)
   //{
-  //  std::cout << "  field_value: name=" << iter->first << ", value=" << iter->second.to_string() << std::endl; 
+  //  std::cout << "  field_value: name=" << iter->first << ", value=" << Gnome::Gda::value_to_string(iter->second) << std::endl; 
   //}
 
   g_assert(result_type != Field::TYPE_INVALID);
 
   //g_warning("glom_evaluate_python_function_implementation: func=%s", func_impl.c_str());
 
-  Gnome::Gda::Value valueResult;
+  Glib::ValueBase valueResult;
 
   Glib::ustring func_def;
 
Index: glom/python_embed/glom_python.h
===================================================================
RCS file: /cvs/gnome/glom/glom/python_embed/glom_python.h,v
retrieving revision 1.7
diff -u -p -r1.7 glom_python.h
--- glom/python_embed/glom_python.h	8 Oct 2006 15:58:21 -0000	1.7
+++ glom/python_embed/glom_python.h	1 Nov 2006 09:41:27 -0000
@@ -27,11 +27,11 @@
 namespace Glom
 {
 
-typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_fields;
+typedef std::map<Glib::ustring, Glib::ValueBase> type_map_fields;
 
 void glom_execute_python_function_implementation(const Glib::ustring& func_impl, const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
 
-Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
+Glib::ValueBase glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
   const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
 
 } //namespace Glom
Index: glom/reports/report_builder.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/reports/report_builder.cc,v
retrieving revision 1.5
diff -u -p -r1.5 report_builder.cc
--- glom/reports/report_builder.cc	8 Oct 2006 19:30:53 -0000	1.5
+++ glom/reports/report_builder.cc	1 Nov 2006 09:41:27 -0000
@@ -190,7 +190,7 @@ void ReportBuilder::report_build_groupby
       guint rows_count = datamodel->get_n_rows();
       for(guint row = 0; row < rows_count; ++row)
       {
-        const Gnome::Gda::Value group_value = datamodel->get_value_at(0 /* col*/, row);
+        const Glib::ValueBase group_value = datamodel->get_value_at(0 /* col*/, row);
 
         //Add XML node:
         xmlpp::Element* nodeGroupBy = parent_node.add_child(group_by->get_report_part_id());
@@ -370,7 +370,7 @@ void ReportBuilder::report_build_records
   if(vertical)
     nodeField->set_attribute("vertical", "true");
 
-  Gnome::Gda::Value value;
+  Glib::ValueBase value;
   Glib::ustring text_value;
 
   if(!datamodel) //We call this for headers and footers too.
@@ -407,7 +407,7 @@ void ReportBuilder::report_build_records
     if(text_value.empty() && sharedptr<const LayoutItem_FieldSummary>::cast_dynamic(field) && (field_type == Field::TYPE_NUMERIC))
     {
       //Use get_text_for_gda_value() instead of "0" so we get the correct numerical formatting:
-      Gnome::Gda::Value value = Conversions::parse_value(0);
+      Glib::ValueBase value = Conversions::parse_value(0);
       text_value = Conversions::get_text_for_gda_value(field_type, value, field->get_formatting_used().m_numeric_format);
     }
 
Index: glom/utility_widgets/comboentryglom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboentryglom.cc,v
retrieving revision 1.16
diff -u -p -r1.16 comboentryglom.cc
--- glom/utility_widgets/comboentryglom.cc	27 May 2006 15:44:22 -0000	1.16
+++ glom/utility_widgets/comboentryglom.cc	1 Nov 2006 09:41:27 -0000
@@ -124,7 +124,7 @@ void ComboEntryGlom::check_for_change()
     bool success = false;
 
     sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
-    Gnome::Gda::Value value = Conversions::parse_value(layout_item->get_glom_type(), get_entry()->get_text(), layout_item->get_formatting_used().m_numeric_format, success);
+    Glib::ValueBase value = Conversions::parse_value(layout_item->get_glom_type(), get_entry()->get_text(), layout_item->get_formatting_used().m_numeric_format, success);
 
     if(success)
     {
@@ -175,7 +175,7 @@ void ComboEntryGlom::on_entry_changed()
 }
 
 
-void ComboEntryGlom::set_value(const Gnome::Gda::Value& value)
+void ComboEntryGlom::set_value(const Glib::ValueBase& value)
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(layout_item)
@@ -192,7 +192,7 @@ void ComboEntryGlom::set_text(const Glib
   get_entry()->set_text(text);
 }
 
-Gnome::Gda::Value ComboEntryGlom::get_value() const
+Glib::ValueBase ComboEntryGlom::get_value() const
 {
   bool success = false;
 
Index: glom/utility_widgets/comboentryglom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboentryglom.h,v
retrieving revision 1.10
diff -u -p -r1.10 comboentryglom.h
--- glom/utility_widgets/comboentryglom.h	27 May 2006 09:26:44 -0000	1.10
+++ glom/utility_widgets/comboentryglom.h	1 Nov 2006 09:41:27 -0000
@@ -50,11 +50,11 @@ public:
   //This is not virtual, so you must not use it via Gtk::Entry.
   void set_text(const Glib::ustring& text); //override
 
-  /** Set the text from a Gnome::Gda::Value.
+  /** Set the text from a Glib::ValueBase.
    */
-  virtual void set_value(const Gnome::Gda::Value& value);
+  virtual void set_value(const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_value() const;
+  virtual Glib::ValueBase get_value() const;
 
   virtual void set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name);
 
@@ -79,7 +79,7 @@ protected:
 
 
   Glib::ustring m_old_text;
-  //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+  //Glib::ValueBase m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
 } //namespace Glom
Index: glom/utility_widgets/comboglom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboglom.cc,v
retrieving revision 1.10
diff -u -p -r1.10 comboglom.cc
--- glom/utility_widgets/comboglom.cc	14 Jun 2006 18:59:33 -0000	1.10
+++ glom/utility_widgets/comboglom.cc	1 Nov 2006 09:41:27 -0000
@@ -95,7 +95,7 @@ void ComboGlom::check_for_change()
     bool success = false;
 
     sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
-    const Gnome::Gda::Value value = Conversions::parse_value(layout_item->get_glom_type(), new_text, layout_item->get_formatting_used().m_numeric_format, success);
+    const Glib::ValueBase value = Conversions::parse_value(layout_item->get_glom_type(), new_text, layout_item->get_formatting_used().m_numeric_format, success);
 
     if(success)
     {
@@ -117,7 +117,7 @@ void ComboGlom::check_for_change()
   }
 }
 
-void ComboGlom::set_value(const Gnome::Gda::Value& value)
+void ComboGlom::set_value(const Glib::ValueBase& value)
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(layout_item)
@@ -145,7 +145,7 @@ void ComboGlom::set_text(const Glib::ust
   unset_active();
 }
 
-Gnome::Gda::Value ComboGlom::get_value() const
+Glib::ValueBase ComboGlom::get_value() const
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
   bool success = false;
Index: glom/utility_widgets/comboglom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboglom.h,v
retrieving revision 1.5
diff -u -p -r1.5 comboglom.h
--- glom/utility_widgets/comboglom.h	27 May 2006 09:26:44 -0000	1.5
+++ glom/utility_widgets/comboglom.h	1 Nov 2006 09:41:27 -0000
@@ -55,11 +55,11 @@ public:
 
   Glib::ustring get_text() const;
 
-  /** Set the text from a Gnome::Gda::Value.
+  /** Set the text from a Glib::ValueBase.
    */
-  virtual void set_value(const Gnome::Gda::Value& value);
+  virtual void set_value(const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_value() const;
+  virtual Glib::ValueBase get_value() const;
 
 protected:
   void init();
@@ -74,7 +74,7 @@ protected:
 
 
   Glib::ustring m_old_text;
-  //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+  //Glib::ValueBase m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
 } //namespace Glom
Index: glom/utility_widgets/comboglomchoicesbase.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboglomchoicesbase.cc,v
retrieving revision 1.11
diff -u -p -r1.11 comboglomchoicesbase.cc
--- glom/utility_widgets/comboglomchoicesbase.cc	27 May 2006 15:44:22 -0000	1.11
+++ glom/utility_widgets/comboglomchoicesbase.cc	1 Nov 2006 09:41:27 -0000
@@ -88,7 +88,7 @@ void ComboGlomChoicesBase::set_choices(c
     sharedptr<const LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::cast_dynamic(get_layout_item());
     if(layout_item)
     {
-      const Gnome::Gda::Value value = *iter;
+      const Glib::ValueBase value = *iter;
       const Glib::ustring text = Conversions::get_text_for_gda_value(layout_item->get_glom_type(), value, layout_item->get_formatting_used().m_numeric_format);
 
       row[m_Columns.m_col_first] = text;
Index: glom/utility_widgets/comboglomchoicesbase.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/comboglomchoicesbase.h,v
retrieving revision 1.6
diff -u -p -r1.6 comboglomchoicesbase.h
--- glom/utility_widgets/comboglomchoicesbase.h	27 May 2006 09:26:44 -0000	1.6
+++ glom/utility_widgets/comboglomchoicesbase.h	1 Nov 2006 09:41:27 -0000
@@ -41,7 +41,7 @@ public:
 
   void set_choices(const FieldFormatting::type_list_values& list_values);
 
-  typedef std::list< std::pair<Gnome::Gda::Value, Gnome::Gda::Value> > type_list_values_with_second;
+  typedef std::list< std::pair<Glib::ValueBase, Glib::ValueBase> > type_list_values_with_second;
   void set_choices_with_second(const type_list_values_with_second& list_values);
 
 protected:
@@ -65,7 +65,7 @@ protected:
 
   bool m_with_second;
   sharedptr<const LayoutItem_Field> m_layoutitem_second;
-  //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+  //Glib::ValueBase m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
 } //namespace Glom
Index: glom/utility_widgets/datawidget.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/datawidget.cc,v
retrieving revision 1.56
diff -u -p -r1.56 datawidget.cc
--- glom/utility_widgets/datawidget.cc	12 Oct 2006 09:53:38 -0000	1.56
+++ glom/utility_widgets/datawidget.cc	1 Nov 2006 09:41:28 -0000
@@ -262,7 +262,7 @@ DataWidget::type_signal_edited DataWidge
 }
 
 
-void DataWidget::set_value(const Gnome::Gda::Value& value)
+void DataWidget::set_value(const Glib::ValueBase& value)
 {
   Gtk::Widget* widget = get_data_child_widget();
   LayoutWidgetField* generic_field_widget = dynamic_cast<LayoutWidgetField*>(widget);
@@ -279,7 +279,7 @@ void DataWidget::set_value(const Gnome::
     if(checkbutton)
     {
       bool bValue = false;
-      if(!value.is_null() && value.get_value_type() == Gnome::Gda::VALUE_TYPE_BOOLEAN)
+      if(!Gnome::Gda::value_is_null(value) && G_VALUE_TYPE(value.gobj()) == G_TYPE_BOOLEAN)
         bValue = value.get_bool();
 
       checkbutton->set_active( bValue );
@@ -287,7 +287,7 @@ void DataWidget::set_value(const Gnome::
   }
 }
 
-Gnome::Gda::Value DataWidget::get_value() const
+Glib::ValueBase DataWidget::get_value() const
 {
   const Gtk::Widget* widget = get_data_child_widget();
   const LayoutWidgetField* generic_field_widget = dynamic_cast<const LayoutWidgetField*>(widget);
@@ -298,10 +298,10 @@ Gnome::Gda::Value DataWidget::get_value(
     const Gtk::CheckButton* checkbutton = dynamic_cast<const Gtk::CheckButton*>(widget);
     if(checkbutton)
     {
-      return Gnome::Gda::Value(checkbutton->get_active());
+      return Glib::ValueBase(checkbutton->get_active());
     }
     else
-      return Gnome::Gda::Value(); //null.
+      return Glib::ValueBase(); //null.
   }
 }
 
@@ -330,7 +330,7 @@ int DataWidget::get_suitable_width(const
       date.day = 31;
       date.month = 12;
       date.year = 2000;
-      example_text = Conversions::get_text_for_gda_value(field_type, Gnome::Gda::Value(date));
+      example_text = Conversions::get_text_for_gda_value(field_type, Glib::ValueBase(date));
       break;
     }
     case(Field::TYPE_TIME):
@@ -339,7 +339,7 @@ int DataWidget::get_suitable_width(const
       time.hour = 24;
       time.minute = 59;
       time.second = 59;
-      example_text = Conversions::get_text_for_gda_value(field_type, Gnome::Gda::Value(time));
+      example_text = Conversions::get_text_for_gda_value(field_type, Glib::ValueBase(time));
       break;
     }
     case(Field::TYPE_NUMERIC):
@@ -680,7 +680,7 @@ const Gtk::Widget* DataWidget::get_data_
 
  void DataWidget::on_button_select_id()
  {
-   Gnome::Gda::Value chosen_id;
+   Glib::ValueBase chosen_id;
    bool chosen = offer_related_record_id_find(chosen_id);
    if(chosen)
    {
@@ -708,7 +708,7 @@ void DataWidget::on_button_choose_date()
       if(response == Gtk::RESPONSE_OK)
       {
         //Get the chosen date
-        const Gnome::Gda::Value value = dialog->get_date_chosen();
+        const Glib::ValueBase value = dialog->get_date_chosen();
         set_value(value);
 
         m_signal_edited.emit(value);
@@ -723,12 +723,12 @@ void DataWidget::on_button_choose_date()
   }
  }
 
- bool DataWidget::offer_related_record_id_find(Gnome::Gda::Value& chosen_id)
+ bool DataWidget::offer_related_record_id_find(Glib::ValueBase& chosen_id)
  {
   bool result = false;
 
   //Initialize output variable:
-  chosen_id = Gnome::Gda::Value();
+  chosen_id = Glib::ValueBase();
 
   try
   {
Index: glom/utility_widgets/datawidget.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/datawidget.h,v
retrieving revision 1.21
diff -u -p -r1.21 datawidget.h
--- glom/utility_widgets/datawidget.h	27 May 2006 09:26:44 -0000	1.21
+++ glom/utility_widgets/datawidget.h	1 Nov 2006 09:41:28 -0000
@@ -51,9 +51,9 @@ public:
   //This is not virtual, so you must not use it via Gtk::Entry.
   //virtual void set_text(const Glib::ustring& text); //override
 
-  virtual void set_value(const Gnome::Gda::Value& value);
+  virtual void set_value(const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_value() const;
+  virtual Glib::ValueBase get_value() const;
 
   virtual void set_editable(bool editable = true);
   virtual void set_viewable(bool viewable = true);
@@ -66,10 +66,10 @@ public:
   Gtk::Widget* get_data_child_widget();
   const Gtk::Widget* get_data_child_widget() const;
 
-  typedef sigc::signal<void, const Gnome::Gda::Value&> type_signal_edited;
+  typedef sigc::signal<void, const Glib::ValueBase&> type_signal_edited;
   type_signal_edited signal_edited();
 
-  typedef sigc::signal<void, const Gnome::Gda::Value&> type_signal_open_details_requested;
+  typedef sigc::signal<void, const Glib::ValueBase&> type_signal_open_details_requested;
   type_signal_open_details_requested signal_open_details_requested();
 
 protected:
@@ -95,7 +95,7 @@ protected:
 
   /** Show a dialog with a Find so that the user can choose an ID value to indicate the related record.
    */
-  bool offer_related_record_id_find(Gnome::Gda::Value& chosen_id);
+  bool offer_related_record_id_find(Glib::ValueBase& chosen_id);
 
   type_signal_edited m_signal_edited;
   type_signal_open_details_requested m_signal_open_details_requested;
Index: glom/utility_widgets/dialog_choose_date.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/dialog_choose_date.cc,v
retrieving revision 1.2
diff -u -p -r1.2 dialog_choose_date.cc
--- glom/utility_widgets/dialog_choose_date.cc	27 May 2006 09:26:44 -0000	1.2
+++ glom/utility_widgets/dialog_choose_date.cc	1 Nov 2006 09:41:28 -0000
@@ -44,9 +44,9 @@ Dialog_ChooseDate::~Dialog_ChooseDate()
 {
 }
 
-void Dialog_ChooseDate::set_date_chosen(const Gnome::Gda::Value& value)
+void Dialog_ChooseDate::set_date_chosen(const Glib::ValueBase& value)
 {
-  if(value.get_value_type() == Gnome::Gda::VALUE_TYPE_DATE) //Otherwise GtkCalendar defaults to the current (today's) date.
+  if(G_VALUE_TYPE(value.gobj()) == G_TYPE_DATE) //Otherwise GtkCalendar defaults to the current (today's) date.
   {
     Gnome::Gda::Date date = value.get_date();
 
@@ -59,7 +59,7 @@ void Dialog_ChooseDate::set_date_chosen(
   }
 }
 
-Gnome::Gda::Value Dialog_ChooseDate::get_date_chosen() const
+Glib::ValueBase Dialog_ChooseDate::get_date_chosen() const
 {
   Gnome::Gda::Date date = {0, 0, 0};
   guint year = 0;
@@ -75,7 +75,7 @@ Gnome::Gda::Value Dialog_ChooseDate::get
 
   date.day = day;
 
-  return Gnome::Gda::Value(date);
+  return Glib::ValueBase(date);
 }
 
 void Dialog_ChooseDate::on_day_selected_double_click()
Index: glom/utility_widgets/dialog_choose_date.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/dialog_choose_date.h,v
retrieving revision 1.3
diff -u -p -r1.3 dialog_choose_date.h
--- glom/utility_widgets/dialog_choose_date.h	27 May 2006 09:26:44 -0000	1.3
+++ glom/utility_widgets/dialog_choose_date.h	1 Nov 2006 09:41:28 -0000
@@ -38,8 +38,8 @@ public:
   Dialog_ChooseDate(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
   virtual ~Dialog_ChooseDate();
 
-  void set_date_chosen(const Gnome::Gda::Value& value);
-  Gnome::Gda::Value get_date_chosen() const;
+  void set_date_chosen(const Glib::ValueBase& value);
+  Glib::ValueBase get_date_chosen() const;
 
 protected:
   void on_day_selected_double_click();
Index: glom/utility_widgets/dialog_choose_id.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/dialog_choose_id.cc,v
retrieving revision 1.6
diff -u -p -r1.6 dialog_choose_id.cc
--- glom/utility_widgets/dialog_choose_id.cc	27 May 2006 09:26:44 -0000	1.6
+++ glom/utility_widgets/dialog_choose_id.cc	1 Nov 2006 09:41:28 -0000
@@ -85,7 +85,7 @@ void Dialog_ChooseID::setup()
   update_ui_for_stage();
 }
 
-bool Dialog_ChooseID::get_id_chosen(Gnome::Gda::Value& chosen_id) const
+bool Dialog_ChooseID::get_id_chosen(Glib::ValueBase& chosen_id) const
 {
   chosen_id = m_id_chosen;
   return true;
@@ -103,7 +103,7 @@ void Dialog_ChooseID::on_button_quickfin
   }
   else
   {
-    const Glib::ustring where_clause = get_find_where_clause_quick(m_table_name, Gnome::Gda::Value(criteria));
+    const Glib::ustring where_clause = get_find_where_clause_quick(m_table_name, Glib::ValueBase(criteria));
     on_box_find_criteria(where_clause);
   }
 }
@@ -132,7 +132,7 @@ void Dialog_ChooseID::on_box_find_criter
   }
 }
 
-void Dialog_ChooseID::on_box_select_selected(const Gnome::Gda::Value& primary_key)
+void Dialog_ChooseID::on_box_select_selected(const Glib::ValueBase& primary_key)
 {
   m_id_chosen = primary_key;
   response(Gtk::RESPONSE_OK); //Close the dialog.
Index: glom/utility_widgets/dialog_choose_id.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/dialog_choose_id.h,v
retrieving revision 1.4
diff -u -p -r1.4 dialog_choose_id.h
--- glom/utility_widgets/dialog_choose_id.h	27 May 2006 09:26:44 -0000	1.4
+++ glom/utility_widgets/dialog_choose_id.h	1 Nov 2006 09:41:28 -0000
@@ -41,7 +41,7 @@ public:
 
   virtual bool init_db_details(const Glib::ustring& table_name);
 
-  bool get_id_chosen(Gnome::Gda::Value& chosen_id) const;
+  bool get_id_chosen(Glib::ValueBase& chosen_id) const;
 
   enum enumStage
   {
@@ -57,7 +57,7 @@ protected:
 
   void on_button_quickfind();
   void on_box_find_criteria(const Glib::ustring& where_clause);
-  void on_box_select_selected(const Gnome::Gda::Value& primary_key);
+  void on_box_select_selected(const Glib::ValueBase& primary_key);
 
   Gtk::Label* m_label_table_name;
   Gtk::HBox* m_pBox_QuickFind; //Only show this when in Find mode.
@@ -68,7 +68,7 @@ protected:
   Glib::ustring m_table_name;
 
   Document_Glom* m_document;
-  Gnome::Gda::Value m_id_chosen;
+  Glib::ValueBase m_id_chosen;
 
   Box_Data_Details_Find m_box_find;
   Box_Data_List m_box_select;
Index: glom/utility_widgets/entryglom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/entryglom.cc,v
retrieving revision 1.31
diff -u -p -r1.31 entryglom.cc
--- glom/utility_widgets/entryglom.cc	27 May 2006 15:44:22 -0000	1.31
+++ glom/utility_widgets/entryglom.cc	1 Nov 2006 09:41:28 -0000
@@ -73,7 +73,7 @@ void EntryGlom::check_for_change()
     bool success = false;
 
     sharedptr<const LayoutItem_Field> layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
-    Gnome::Gda::Value value = Conversions::parse_value(m_glom_type, get_text(), layout_item->get_formatting_used().m_numeric_format, success);
+    Glib::ValueBase value = Conversions::parse_value(m_glom_type, get_text(), layout_item->get_formatting_used().m_numeric_format, success);
 
     if(success)
     {
@@ -128,7 +128,7 @@ void EntryGlom::on_insert_text(const Gli
   Gtk::Entry::on_insert_text(text, position);
 }
 
-void EntryGlom::set_value(const Gnome::Gda::Value& value)
+void EntryGlom::set_value(const Glib::ValueBase& value)
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(layout_item)
@@ -148,7 +148,7 @@ void EntryGlom::set_text(const Glib::ust
   Gtk::Entry::set_text(text);
 }
 
-Gnome::Gda::Value EntryGlom::get_value() const
+Glib::ValueBase EntryGlom::get_value() const
 {
   bool success = false;
 
Index: glom/utility_widgets/entryglom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/entryglom.h,v
retrieving revision 1.21
diff -u -p -r1.21 entryglom.h
--- glom/utility_widgets/entryglom.h	27 May 2006 09:26:44 -0000	1.21
+++ glom/utility_widgets/entryglom.h	1 Nov 2006 09:41:28 -0000
@@ -46,11 +46,11 @@ public:
   //This is not virtual, so you must not use it via Gtk::Entry.
   void set_text(const Glib::ustring& text); //override
 
-  /** Set the text from a Gnome::Gda::Value.
+  /** Set the text from a Glib::ValueBase.
    */
-  virtual void set_value(const Gnome::Gda::Value& value);
+  virtual void set_value(const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_value() const;
+  virtual Glib::ValueBase get_value() const;
 
   virtual void set_read_only(bool read_only = true);
 
@@ -72,7 +72,7 @@ protected:
   Glib::ustring m_old_text;
   Field::glom_field_type m_glom_type; //Store the type so we can validate the text accordingly.
 
-  //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+  //Glib::ValueBase m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
 } //namespace Glom
Index: glom/utility_widgets/flowtablewithfields.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/flowtablewithfields.cc,v
retrieving revision 1.79
diff -u -p -r1.79 flowtablewithfields.cc
--- glom/utility_widgets/flowtablewithfields.cc	23 Sep 2006 22:41:27 -0000	1.79
+++ glom/utility_widgets/flowtablewithfields.cc	1 Nov 2006 09:41:28 -0000
@@ -559,7 +559,7 @@ void FlowTableWithFields::remove_field(c
   } 
 }
 
-void FlowTableWithFields::set_field_value(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void FlowTableWithFields::set_field_value(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   //Set widgets which should show the value of this field:
   type_list_widgets list_widgets = get_field(field);
@@ -579,13 +579,13 @@ void FlowTableWithFields::set_field_valu
     Box_Data_List_Related* portal = dynamic_cast<Box_Data_List_Related*>(*iter);
     if(portal)
     {
-      //g_warning("FlowTableWithFields::set_field_value: foreign_key_value=%s", value.to_string().c_str());
+      //g_warning("FlowTableWithFields::set_field_value: foreign_key_value=%s", Gnome::Gda::value_to_string(value).c_str());
       portal->refresh_data_from_database_with_foreign_key(value /* foreign key value */);
     }
   }
 }
 
-Gnome::Gda::Value FlowTableWithFields::get_field_value(const sharedptr<const LayoutItem_Field>& field) const
+Glib::ValueBase FlowTableWithFields::get_field_value(const sharedptr<const LayoutItem_Field>& field) const
 {
   type_list_const_widgets list_widgets = get_field(field);
   if(!list_widgets.empty())
@@ -597,7 +597,7 @@ Gnome::Gda::Value FlowTableWithFields::g
   }
 
   //g_warning("FlowTableWithFields::get_field_value(): returning null");
-  return Gnome::Gda::Value(); //null.
+  return Glib::ValueBase(); //null.
 }
 
 void FlowTableWithFields::set_field_editable(const sharedptr<const LayoutItem_Field>& field, bool editable)
@@ -800,22 +800,22 @@ void FlowTableWithFields::on_script_butt
   m_signal_script_button_clicked.emit(layout_item);
 }
 
-void FlowTableWithFields::on_entry_edited(const Gnome::Gda::Value& value, sharedptr<const LayoutItem_Field> field)
+void FlowTableWithFields::on_entry_edited(const Glib::ValueBase& value, sharedptr<const LayoutItem_Field> field)
 {
   m_signal_field_edited.emit(field, value);
 }
 
-void FlowTableWithFields::on_entry_open_details_requested(const Gnome::Gda::Value& value, sharedptr<const LayoutItem_Field> field)
+void FlowTableWithFields::on_entry_open_details_requested(const Glib::ValueBase& value, sharedptr<const LayoutItem_Field> field)
 {
   m_signal_field_open_details_requested.emit(field, value);
 }
 
-void FlowTableWithFields::on_flowtable_entry_edited(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void FlowTableWithFields::on_flowtable_entry_edited(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   m_signal_field_edited.emit(field, value);
 }
 
-void FlowTableWithFields::on_flowtable_entry_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value)
+void FlowTableWithFields::on_flowtable_entry_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value)
 {
   m_signal_field_open_details_requested.emit(field, value);
 }
@@ -1025,7 +1025,7 @@ void FlowTableWithFields::on_flowtable_r
   signal_related_record_changed().emit(relationship_name);
 }
 
-void FlowTableWithFields::on_portal_user_requested_details(Gnome::Gda::Value primary_key_value, Box_Data_List_Related* portal_box)
+void FlowTableWithFields::on_portal_user_requested_details(Glib::ValueBase primary_key_value, Box_Data_List_Related* portal_box)
 {
   sharedptr<const Relationship> relationship = portal_box->get_relationship();
   if(!relationship)
@@ -1036,7 +1036,7 @@ void FlowTableWithFields::on_portal_user
   {
     //Try to find a doubly-related table that is not hidden, and open that instead:
     Glib::ustring doubly_related_table_name;
-    Gnome::Gda::Value doubly_related_primary_key;
+    Glib::ValueBase doubly_related_primary_key;
     portal_box->get_suitable_record_to_view_details(primary_key_value, doubly_related_table_name, doubly_related_primary_key);
 
     if(!(doubly_related_table_name.empty()) && !Conversions::value_is_empty(doubly_related_primary_key))
@@ -1048,7 +1048,7 @@ void FlowTableWithFields::on_portal_user
   }
 }
 
-void FlowTableWithFields::on_flowtable_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value)
+void FlowTableWithFields::on_flowtable_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value)
 {
   //Forward it to the parent:
   signal_requested_related_details().emit(table_name, primary_key_value);
Index: glom/utility_widgets/flowtablewithfields.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/flowtablewithfields.h,v
retrieving revision 1.32
diff -u -p -r1.32 flowtablewithfields.h
--- glom/utility_widgets/flowtablewithfields.h	27 May 2006 09:26:44 -0000	1.32
+++ glom/utility_widgets/flowtablewithfields.h	1 Nov 2006 09:41:28 -0000
@@ -68,10 +68,10 @@ public: 
 
   virtual void set_field_editable(const sharedptr<const LayoutItem_Field>& field, bool editable = true);
 
-  virtual Gnome::Gda::Value get_field_value(const sharedptr<const LayoutItem_Field>& field) const;
-  //virtual Gnome::Gda::Value get_field_value(const Glib::ustring& id) const;
-  virtual void set_field_value(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
-  //virtual void set_field_value(const Glib::ustring& id, const Gnome::Gda::Value& value);
+  virtual Glib::ValueBase get_field_value(const sharedptr<const LayoutItem_Field>& field) const;
+  //virtual Glib::ValueBase get_field_value(const Glib::ustring& id) const;
+  virtual void set_field_value(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
+  //virtual void set_field_value(const Glib::ustring& id, const Glib::ValueBase& value);
 
 
   typedef std::list<Gtk::Widget*> type_list_widgets;
@@ -92,15 +92,15 @@ public: 
   //sharedptr<LayoutGroup> get_layout_group();
 
   /** For instance,
-   * void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+   * void on_flowtable_field_edited(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
    */
-  typedef sigc::signal<void, const sharedptr<const LayoutItem_Field>&, const Gnome::Gda::Value&> type_signal_field_edited;
+  typedef sigc::signal<void, const sharedptr<const LayoutItem_Field>&, const Glib::ValueBase&> type_signal_field_edited;
   type_signal_field_edited signal_field_edited();
   
   /** For instance,
-   * void on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
+   * void on_flowtable_field_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
    */
-  typedef sigc::signal<void, const sharedptr<const LayoutItem_Field>&, const Gnome::Gda::Value&> type_signal_field_open_details_requested;
+  typedef sigc::signal<void, const sharedptr<const LayoutItem_Field>&, const Glib::ValueBase&> type_signal_field_open_details_requested;
   type_signal_field_open_details_requested signal_field_open_details_requested();
 
   /** For instance,
@@ -110,9 +110,9 @@ public: 
   type_signal_related_record_changed signal_related_record_changed();
 
   /** For instance,
-   * void on_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+   * void on_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
    */
-  typedef sigc::signal<void, const Glib::ustring&, Gnome::Gda::Value> type_signal_requested_related_details;
+  typedef sigc::signal<void, const Glib::ustring&, Glib::ValueBase> type_signal_requested_related_details;
   type_signal_requested_related_details signal_requested_related_details();
 
  /** For instance,
@@ -131,14 +131,14 @@ protected:
 
   //int get_suitable_width(Field::glom_field_type field_type);
 
-  void on_entry_edited(const Gnome::Gda::Value& value, sharedptr<const LayoutItem_Field> field);
-  void on_entry_open_details_requested(const Gnome::Gda::Value& value, sharedptr<const LayoutItem_Field> field);
-  void on_flowtable_entry_edited(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value);
-  void on_flowtable_entry_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value); 
+  void on_entry_edited(const Glib::ValueBase& value, sharedptr<const LayoutItem_Field> field);
+  void on_entry_open_details_requested(const Glib::ValueBase& value, sharedptr<const LayoutItem_Field> field);
+  void on_flowtable_entry_edited(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value);
+  void on_flowtable_entry_open_details_requested(const sharedptr<const LayoutItem_Field>& field, const Glib::ValueBase& value); 
 
   void on_portal_record_changed(const Glib::ustring& relationship_name);
   void on_flowtable_related_record_changed(const Glib::ustring& relationship_name);
-  void on_flowtable_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
+  void on_flowtable_requested_related_details(const Glib::ustring& table_name, Glib::ValueBase primary_key_value);
 
   void on_script_button_clicked(const sharedptr<LayoutItem_Button>& layout_item);
 
@@ -147,7 +147,7 @@ protected:
 
   void on_datawidget_layout_item_added(LayoutWidgetBase::enumType item_type, DataWidget* pDataWidget);
 
-  void on_portal_user_requested_details(Gnome::Gda::Value primary_key_value, Box_Data_List_Related* portal_box);
+  void on_portal_user_requested_details(Glib::ValueBase primary_key_value, Box_Data_List_Related* portal_box);
 
   class Info
   {
Index: glom/utility_widgets/imageglom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/imageglom.cc,v
retrieving revision 1.28
diff -u -p -r1.28 imageglom.cc
--- glom/utility_widgets/imageglom.cc	18 Oct 2006 12:39:09 -0000	1.28
+++ glom/utility_widgets/imageglom.cc	1 Nov 2006 09:41:28 -0000
@@ -139,7 +139,7 @@ void ImageGlom::set_pixbuf(const Glib::R
   scale();
 }
 
-void ImageGlom::set_value(const Gnome::Gda::Value& value)
+void ImageGlom::set_value(const Glib::ValueBase& value)
 {
   Glib::RefPtr<Gdk::Pixbuf> pixbuf = Conversions::get_pixbuf_for_gda_value(value);
   if(pixbuf)
@@ -199,11 +199,11 @@ void ImageGlom::set_value(const Gnome::G
   }
 }
 
-Gnome::Gda::Value ImageGlom::get_value() const
+Glib::ValueBase ImageGlom::get_value() const
 {
   //TODO: Return the data from the file that was just chosen.
   //Don't store the original here any longer than necessary,
-  Gnome::Gda::Value result; //TODO: Initialize it as binary.
+  Glib::ValueBase result; //TODO: Initialize it as binary.
 
   if(m_pixbuf_original)
   {
Index: glom/utility_widgets/imageglom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/imageglom.h,v
retrieving revision 1.14
diff -u -p -r1.14 imageglom.h
--- glom/utility_widgets/imageglom.h	18 Oct 2006 12:39:09 -0000	1.14
+++ glom/utility_widgets/imageglom.h	1 Nov 2006 09:41:28 -0000
@@ -42,8 +42,8 @@ public:
 
   virtual ~ImageGlom();
 
-  virtual void set_value(const Gnome::Gda::Value& value);
-  virtual Gnome::Gda::Value get_value() const;
+  virtual void set_value(const Glib::ValueBase& value);
+  virtual Glib::ValueBase get_value() const;
   virtual bool get_has_original_data() const;
 
   //Optionally use this instead of set_value(), to avoid creating an unnecessary Value.
Index: glom/utility_widgets/layoutwidgetfield.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/layoutwidgetfield.h,v
retrieving revision 1.4
diff -u -p -r1.4 layoutwidgetfield.h
--- glom/utility_widgets/layoutwidgetfield.h	27 May 2006 09:26:44 -0000	1.4
+++ glom/utility_widgets/layoutwidgetfield.h	1 Nov 2006 09:41:28 -0000
@@ -32,9 +32,9 @@ public: 
   LayoutWidgetField();
   virtual ~LayoutWidgetField();
 
-  virtual void set_value(const Gnome::Gda::Value& value) = 0;
+  virtual void set_value(const Glib::ValueBase& value) = 0;
 
-  virtual Gnome::Gda::Value get_value() const = 0;
+  virtual Glib::ValueBase get_value() const = 0;
 
   /**Whether this widget still has the original entered data, instead of just a representation.
    * For intance, and image widget might only store a preview.
Index: glom/utility_widgets/textviewglom.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/textviewglom.cc,v
retrieving revision 1.8
diff -u -p -r1.8 textviewglom.cc
--- glom/utility_widgets/textviewglom.cc	27 May 2006 15:44:22 -0000	1.8
+++ glom/utility_widgets/textviewglom.cc	1 Nov 2006 09:41:29 -0000
@@ -84,7 +84,7 @@ void TextViewGlom::check_for_change()
     bool success = false;
 
     sharedptr<const LayoutItem_Field>layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
-    Gnome::Gda::Value value = Conversions::parse_value(m_glom_type, new_text, layout_item->get_formatting_used().m_numeric_format, success);
+    Glib::ValueBase value = Conversions::parse_value(m_glom_type, new_text, layout_item->get_formatting_used().m_numeric_format, success);
 
     if(success)
     {
@@ -144,7 +144,7 @@ void TextViewGlom::on_insert_text(const 
 
 */
 
-void TextViewGlom::set_value(const Gnome::Gda::Value& value)
+void TextViewGlom::set_value(const Glib::ValueBase& value)
 {
   sharedptr<const LayoutItem_Field>layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(layout_item)
@@ -159,7 +159,7 @@ void TextViewGlom::set_text(const Glib::
   m_TextView.get_buffer()->set_text(text);
 }
 
-Gnome::Gda::Value TextViewGlom::get_value() const
+Glib::ValueBase TextViewGlom::get_value() const
 {
   bool success = false;
 
Index: glom/utility_widgets/textviewglom.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/textviewglom.h,v
retrieving revision 1.3
diff -u -p -r1.3 textviewglom.h
--- glom/utility_widgets/textviewglom.h	27 May 2006 09:26:44 -0000	1.3
+++ glom/utility_widgets/textviewglom.h	1 Nov 2006 09:41:29 -0000
@@ -46,11 +46,11 @@ public:
   //This is not virtual, so you must not use it via Gtk::Entry.
   void set_text(const Glib::ustring& text); //override
 
-  /** Set the text from a Gnome::Gda::Value.
+  /** Set the text from a Glib::ValueBase.
    */
-  virtual void set_value(const Gnome::Gda::Value& value);
+  virtual void set_value(const Glib::ValueBase& value);
 
-  virtual Gnome::Gda::Value get_value() const;
+  virtual Glib::ValueBase get_value() const;
 
 protected:
   void init();
@@ -70,7 +70,7 @@ protected:
   Glib::ustring m_old_text;
   Field::glom_field_type m_glom_type; //Store the type so we can validate the text accordingly.
 
-  //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+  //Glib::ValueBase m_value; //The last-stored value. We have this because the displayed value might be unparseable.
   Gtk::TextView m_TextView;
 };
 
Index: glom/utility_widgets/adddel/adddel.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/adddel/adddel.cc,v
retrieving revision 1.51
diff -u -p -r1.51 adddel.cc
--- glom/utility_widgets/adddel/adddel.cc	6 Oct 2006 08:55:59 -0000	1.51
+++ glom/utility_widgets/adddel/adddel.cc	1 Nov 2006 09:41:29 -0000
@@ -722,7 +722,7 @@ void AddDel::construct_specified_columns
 }
 
 /*
-void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, const Gnome::Gda::Value& value)
+void AddDel::set_value(const Gtk::TreeModel::iterator& iter, guint col, const Glib::ValueBase& value)
 {
   //Different model columns have different types of data:
   switch(m_ColumnTypes[col].m_style)
@@ -826,7 +826,7 @@ void AddDel::set_value(const Gtk::TreeMo
 }
 
 /*
-void AddDel::set_value_selected(guint col, const Gnome::Gda::Value& value)
+void AddDel::set_value_selected(guint col, const Glib::ValueBase& value)
 {
   set_value(get_item_selected(), col, value);
 }
@@ -1202,7 +1202,7 @@ void AddDel::on_treeview_cell_edited(con
           //Make sure that the entered data is suitable for this field type:
           bool success = false;
           Glib::ustring text = get_value(row, model_column_index);
-          Gnome::Gda::Value value = Conversions::parse_value(field_type, new_text, success);
+          Glib::ValueBase value = Conversions::parse_value(field_type, new_text, success);
           if(!success)
           {
              //Tell the user and offer to revert or try again:
@@ -1617,8 +1617,8 @@ bool AddDel::row_has_duplicates(const Gt
     {
       Gtk::TreeModel::Row row = *iter;
 
-      //We can't just use ValueBase, because Glib::ValueBase has no operator==, because there is no g_value_equal
-      //Glib::ValueBase value_this_row;
+      //We can't just use ValueBase, because Glib::ValueBaseBase has no operator==, because there is no g_value_equal
+      //Glib::ValueBaseBase value_this_row;
       //iter->get_value(col, value_this_row);
 
       Glib::ustring value_text;
@@ -1640,8 +1640,8 @@ bool AddDel::row_has_duplicates(const Gt
         if(iterCheck != iter) //Don't compare the row with itself
         {
           Gtk::TreeModel::Row check_row = *iterCheck;
-          ////Glib::ValueBase has no operator==, because there is no g_value_equal
-          //Glib::ValueBase value_check_row;
+          ////Glib::ValueBaseBase has no operator==, because there is no g_value_equal
+          //Glib::ValueBaseBase value_check_row;
           //iterCheck->get_value(col, value_check_row);
           //
           //if(value_check_row == value_this_row)
Index: glom/utility_widgets/adddel/adddel.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/adddel/adddel.h,v
retrieving revision 1.26
diff -u -p -r1.26 adddel.h
--- glom/utility_widgets/adddel/adddel.h	27 May 2006 09:26:44 -0000	1.26
+++ glom/utility_widgets/adddel/adddel.h	1 Nov 2006 09:41:29 -0000
@@ -116,12 +116,12 @@ public:
 
   virtual guint get_count() const;
 
-  //virtual void set_value(const Gtk::TreeModel::iterator& iter, guint col, const Gnome::Gda::Value& value);
+  //virtual void set_value(const Gtk::TreeModel::iterator& iter, guint col, const Glib::ValueBase& value);
   virtual void set_value(const Gtk::TreeModel::iterator& iter, guint col, const Glib::ustring& strValue);
   virtual void set_value(const Gtk::TreeModel::iterator& iter, guint col, unsigned long ulValue);
   virtual void set_value(const Gtk::TreeModel::iterator& iter, guint col, bool bVal);
 
-  //virtual void set_value_selected(guint col, const Gnome::Gda::Value& value);
+  //virtual void set_value_selected(guint col, const Glib::ValueBase& value);
 
   virtual bool get_is_first_row(const Gtk::TreeModel::iterator& iter) const;
   virtual bool get_is_last_row(const Gtk::TreeModel::iterator& iter) const;
Index: glom/utility_widgets/db_adddel/db_adddel.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/db_adddel/db_adddel.cc,v
retrieving revision 1.94
diff -u -p -r1.94 db_adddel.cc
--- glom/utility_widgets/db_adddel/db_adddel.cc	20 Oct 2006 17:30:54 -0000	1.94
+++ glom/utility_widgets/db_adddel/db_adddel.cc	1 Nov 2006 09:41:30 -0000
@@ -330,9 +330,9 @@ Gtk::TreeModel::iterator DbAddDel::get_i
   return m_refListStore->get_placeholder_row();
 }
 
-Gnome::Gda::Value DbAddDel::get_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item)
+Glib::ValueBase DbAddDel::get_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item)
 {
-  Gnome::Gda::Value value;
+  Glib::ValueBase value;
 
   if(m_refListStore)
   {
@@ -354,7 +354,7 @@ Gnome::Gda::Value DbAddDel::get_value(co
   return value;
 }
 
-Gnome::Gda::Value DbAddDel::get_value_key_selected()
+Glib::ValueBase DbAddDel::get_value_key_selected()
 {
   Gtk::TreeModel::iterator iter = get_item_selected();
   if(iter)
@@ -362,10 +362,10 @@ Gnome::Gda::Value DbAddDel::get_value_ke
     return get_value_key(iter);
   }
   else
-    return Gnome::Gda::Value();
+    return Glib::ValueBase();
 }
 
-Gnome::Gda::Value DbAddDel::get_value_selected(const sharedptr<const LayoutItem_Field>& layout_item)
+Glib::ValueBase DbAddDel::get_value_selected(const sharedptr<const LayoutItem_Field>& layout_item)
 {
   return get_value(get_item_selected(), layout_item);
 }
@@ -382,7 +382,7 @@ Gtk::TreeModel::iterator DbAddDel::get_i
 }
 
 
-Gtk::TreeModel::iterator DbAddDel::get_row(const Gnome::Gda::Value& key)
+Gtk::TreeModel::iterator DbAddDel::get_row(const Glib::ValueBase& key)
 {
   if(!m_refListStore)
     return Gtk::TreeModel::iterator();
@@ -390,7 +390,7 @@ Gtk::TreeModel::iterator DbAddDel::get_r
   for(Gtk::TreeModel::iterator iter = m_refListStore->children().begin(); iter != m_refListStore->children().end(); ++iter)
   {
     //Gtk::TreeModel::Row row = *iter;
-    const Gnome::Gda::Value& valTemp = get_value_key(iter);
+    const Glib::ValueBase& valTemp = get_value_key(iter);
     if(valTemp == key)
     {
       return iter;
@@ -750,7 +750,7 @@ void DbAddDel::construct_specified_colum
     return;
   }
 
-  typedef Gtk::TreeModelColumn<Gnome::Gda::Value> type_modelcolumn_value;
+  typedef Gtk::TreeModelColumn<Glib::ValueBase> type_modelcolumn_value;
   typedef std::vector< type_modelcolumn_value* > type_vecModelColumns;
   type_vecModelColumns vecModelColumns(m_ColumnTypes.size(), 0);
 
@@ -934,7 +934,7 @@ bool DbAddDel::refresh_from_database_bla
   return true;
 }
 
-void DbAddDel::set_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item, const Gnome::Gda::Value& value)
+void DbAddDel::set_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ValueBase& value)
 {
   //g_warning("DbAddDel::set_value begin");
 
@@ -969,7 +969,7 @@ void DbAddDel::set_value(const Gtk::Tree
   //g_warning("DbAddDel::set_value end");
 }
 
-void DbAddDel::set_value_selected(const sharedptr<const LayoutItem_Field>& layout_item, const Gnome::Gda::Value& value)
+void DbAddDel::set_value_selected(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ValueBase& value)
 {
   set_value(get_item_selected(), layout_item, value);
 }
@@ -1228,9 +1228,9 @@ DbAddDel::InnerIgnore::~InnerIgnore()
   m_pOuter = false;
 }
 
-Gnome::Gda::Value DbAddDel::treeview_get_key(const Gtk::TreeModel::iterator& row)
+Glib::ValueBase DbAddDel::treeview_get_key(const Gtk::TreeModel::iterator& row)
 {
-  Gnome::Gda::Value value;
+  Glib::ValueBase value;
 
   if(m_refListStore)
   {
@@ -1257,12 +1257,12 @@ void DbAddDel::on_treeview_cell_edited_b
 
     int tree_model_column_index = model_column_index + get_count_hidden_system_columns();
 
-    Gnome::Gda::Value value_old;
+    Glib::ValueBase value_old;
     row.get_value(tree_model_column_index, value_old);
 
-    const bool bValueOld = (value_old.get_value_type() == Gnome::Gda::VALUE_TYPE_BOOLEAN) && value_old.get_bool();
+    const bool bValueOld = (value_old.get_value_type() == G_TYPE_BOOLEAN) && value_old.get_bool();
     bool bValueNew = !bValueOld;
-    Gnome::Gda::Value value_new;
+    Glib::ValueBase value_new;
     value_new.set(bValueNew);
     //Store the user's new value in the model:
     row.set_value(tree_model_column_index, value_new);
@@ -1337,7 +1337,7 @@ void DbAddDel::on_treeview_cell_edited(c
 
     const int treemodel_column_index = model_column_index + get_count_hidden_system_columns();
 
-    Gnome::Gda::Value valOld;
+    Glib::ValueBase valOld;
     row.get_value(treemodel_column_index, valOld);
 
     //Store the user's new text in the model:
@@ -1376,7 +1376,7 @@ void DbAddDel::on_treeview_cell_edited(c
       //Make sure that the entered data is suitable for this field type:
       bool success = false;
 
-      Gnome::Gda::Value value = Conversions::parse_value(field_type, new_text, item_field->get_formatting_used().m_numeric_format, success);
+      Glib::ValueBase value = Conversions::parse_value(field_type, new_text, item_field->get_formatting_used().m_numeric_format, success);
       if(!success)
       {
           //Tell the user and offer to revert or try again:
@@ -1567,7 +1567,7 @@ guint DbAddDel::treeview_append_column(c
 
   guint cols_count = m_TreeView.append_column(*pViewColumn);
 
-  //Tell the TreeView how to render the Gnome::Gda::Values:
+  //Tell the TreeView how to render the Glib::ValueBases:
   pViewColumn->set_cell_data_func(cellrenderer, 
     sigc::bind( sigc::mem_fun(*this, &DbAddDel::treeviewcolumn_on_cell_data), model_column_index) );
 
@@ -1723,13 +1723,13 @@ Gtk::TreeModel::iterator DbAddDel::get_l
   return m_refListStore->get_last_row();
 }
 
-Gnome::Gda::Value DbAddDel::get_value_key(const Gtk::TreeModel::iterator& iter)
+Glib::ValueBase DbAddDel::get_value_key(const Gtk::TreeModel::iterator& iter)
 {
   return treeview_get_key(iter);
 }
 
 
-void DbAddDel::set_value_key(const Gtk::TreeModel::iterator& iter, const Gnome::Gda::Value& value)
+void DbAddDel::set_value_key(const Gtk::TreeModel::iterator& iter, const Glib::ValueBase& value)
 {
   if(iter)
   {
@@ -1826,7 +1826,7 @@ void DbAddDel::treeviewcolumn_on_cell_da
   {
     const guint col_real = model_column_index + get_count_hidden_system_columns();
     Gtk::TreeModel::Row treerow = *iter;
-    Gnome::Gda::Value value;
+    Glib::ValueBase value;
     treerow->get_value(col_real, value);
 
     const DbAddDelColumnInfo& column_info = m_ColumnTypes[model_column_index];
@@ -1840,7 +1840,7 @@ void DbAddDel::treeviewcolumn_on_cell_da
         {
           Gtk::CellRendererToggle* pDerived = dynamic_cast<Gtk::CellRendererToggle*>(renderer);
           if(pDerived)
-            pDerived->set_active( (value.get_value_type() == Gnome::Gda::VALUE_TYPE_BOOLEAN) && value.get_bool() ); 
+            pDerived->set_active( (G_VALUE_TYPE(value.gobj()) == G_TYPE_BOOLEAN) && value.get_bool() ); 
 
           break;
         }
Index: glom/utility_widgets/db_adddel/db_adddel.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/db_adddel/db_adddel.h,v
retrieving revision 1.44
diff -u -p -r1.44 db_adddel.h
--- glom/utility_widgets/db_adddel/db_adddel.h	20 Oct 2006 10:21:26 -0000	1.44
+++ glom/utility_widgets/db_adddel/db_adddel.h	1 Nov 2006 09:41:30 -0000
@@ -72,7 +72,7 @@ public:
   virtual void set_allow_add(bool val = true);
   virtual void set_allow_delete(bool val = true);
 
-  //Gtk::TreeModel::iterator add_item(const Gnome::Gda::Value& valKey); //Return index of new row.
+  //Gtk::TreeModel::iterator add_item(const Glib::ValueBase& valKey); //Return index of new row.
 
   /** Get an iterator to the blank row in which the user should add data for the new row.
    * You can then add the row to your underlying data store when some data has been filled, by handling signal_user_changed.
@@ -81,21 +81,21 @@ public:
 
   void remove_item(const Gtk::TreeModel::iterator& iter);
 
-  Gnome::Gda::Value get_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item);
+  Glib::ValueBase get_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item);
 
   /** Get the row's hidden key
    */
-  Gnome::Gda::Value get_value_key(const Gtk::TreeModel::iterator& iter);
+  Glib::ValueBase get_value_key(const Gtk::TreeModel::iterator& iter);
 
   /** Set the row's hidden key
    */
-  void set_value_key(const Gtk::TreeModel::iterator& iter, const Gnome::Gda::Value& value);
+  void set_value_key(const Gtk::TreeModel::iterator& iter, const Glib::ValueBase& value);
 
   /** @param col A value returned from add_column().
    * @result The value on the selected row.
    */
-  Gnome::Gda::Value get_value_selected(const sharedptr<const LayoutItem_Field>& layout_item);
-  Gnome::Gda::Value get_value_key_selected();
+  Glib::ValueBase get_value_selected(const sharedptr<const LayoutItem_Field>& layout_item);
+  Glib::ValueBase get_value_key_selected();
 
   Gtk::TreeModel::iterator get_item_selected();
 
@@ -115,13 +115,13 @@ public:
    * @param layout_item Describes the column(s) whose values should be changed.
    * @param value The new value.
    */
-  virtual void set_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item, const Gnome::Gda::Value& value);
+  virtual void set_value(const Gtk::TreeModel::iterator& iter, const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ValueBase& value);
 
   /** 
    * @param col A value returned from add_column().
    * @param value The new value.
    */
-  virtual void set_value_selected(const sharedptr<const LayoutItem_Field>& layout_item, const Gnome::Gda::Value& value);
+  virtual void set_value_selected(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ValueBase& value);
 
   bool get_is_first_row(const Gtk::TreeModel::iterator& iter) const;
   bool get_is_last_row(const Gtk::TreeModel::iterator& iter) const;
@@ -181,7 +181,7 @@ public:
 
   void set_show_column_titles(bool bVal = true);
 
-  Gtk::TreeModel::iterator get_row(const Gnome::Gda::Value& key);
+  Gtk::TreeModel::iterator get_row(const Glib::ValueBase& key);
 
   void finish_editing(); //Closes active edit controls and commits the data to the cell.
   //virtual void reactivate(); //Sheet doesn't seem to update unless a cell is active.
@@ -246,7 +246,7 @@ protected:
   virtual type_list_indexes get_column_index(const sharedptr<const LayoutItem>& layout_item) const;
 
   virtual void setup_menu();
-  virtual Gnome::Gda::Value treeview_get_key(const Gtk::TreeModel::iterator& row);
+  virtual Glib::ValueBase treeview_get_key(const Gtk::TreeModel::iterator& row);
 
   ///Add a blank row, or return the existing blank row if there already is one.
   //virtual Gtk::TreeModel::iterator get_next_available_row_with_add_if_necessary();
Index: glom/utility_widgets/db_adddel/glom_db_treemodel.cc
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/db_adddel/glom_db_treemodel.cc,v
retrieving revision 1.45
diff -u -p -r1.45 glom_db_treemodel.cc
--- glom/utility_widgets/db_adddel/glom_db_treemodel.cc	20 Oct 2006 17:30:54 -0000	1.45
+++ glom/utility_widgets/db_adddel/glom_db_treemodel.cc	1 Nov 2006 09:41:30 -0000
@@ -293,7 +293,7 @@ GType DbTreeModel::get_column_type_vfunc
     return 0;
 }
 
-void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const
+void DbTreeModel::get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBaseBase& value) const
 {
   if(check_treeiter_validity(iter))
   {
@@ -304,8 +304,8 @@ void DbTreeModel::get_value_vfunc(const 
       value_specific.init( typeModelColumn::ValueType::value_type() );  //TODO: Is there any way to avoid this step?
 
       //Or, instead of asking the compiler for the TreeModelColumn's ValueType:
-      //Glib::Value< DbValue > value_specific;
-      //value_specific.init( Glib::Value< DbValue >::value_type() ); //TODO: Is there any way to avoid this step?
+      //Glib::ValueBase< DbValue > value_specific;
+      //value_specific.init( Glib::ValueBase< DbValue >::value_type() ); //TODO: Is there any way to avoid this step?
 
       type_datamodel_const_iter dataRowIter = get_datamodel_row_iter_from_tree_row_iter(iter);
       //g_warning("DbTreeModel::get_value_vfunc(): dataRowIter=%d, get_internal_rows_count=%d", dataRowIter, get_internal_rows_count());
@@ -340,7 +340,7 @@ void DbTreeModel::get_value_vfunc(const 
 
 
         value_specific.set(result); //The compiler would complain if the type was wrong.
-        value.init( Glib::Value< DbValue >::value_type() ); //TODO: Is there any way to avoid this step? Can't it copy the type as well as the value?
+        value.init( Glib::ValueBase< DbValue >::value_type() ); //TODO: Is there any way to avoid this step? Can't it copy the type as well as the value?
         value = value_specific;
       }
     }
@@ -676,7 +676,7 @@ DbTreeModel::iterator DbTreeModel::appen
 }
 
 
-void DbTreeModel::set_value_impl(const iterator& row, int column, const Glib::ValueBase& value)
+void DbTreeModel::set_value_impl(const iterator& row, int column, const Glib::ValueBaseBase& value)
 {
   if(iter_is_valid(row))
   {
@@ -688,7 +688,7 @@ void DbTreeModel::set_value_impl(const i
 
     //Cast it to the specific value type.
     //It can't work with anything else anyway.
-    typedef Glib::Value< DbValue > ValueDbValue;
+    typedef Glib::ValueBase< DbValue > ValueDbValue;
 
     const ValueDbValue* pDbValue = static_cast<const ValueDbValue*>(&value);
     if(!pDbValue)
@@ -897,7 +897,7 @@ void DbTreeModel::get_record_counts(gulo
       {
         if(datamodel->get_n_rows())
         {
-          Gnome::Gda::Value value = datamodel->get_value_at(0, 0);
+          Glib::ValueBase value = datamodel->get_value_at(0, 0);
           total = (gulong)value.get_bigint(); //I discovered that it's a bigint by trying it.
         }
       }
Index: glom/utility_widgets/db_adddel/glom_db_treemodel.h
===================================================================
RCS file: /cvs/gnome/glom/glom/utility_widgets/db_adddel/glom_db_treemodel.h,v
retrieving revision 1.21
diff -u -p -r1.21 glom_db_treemodel.h
--- glom/utility_widgets/db_adddel/glom_db_treemodel.h	20 Oct 2006 17:30:54 -0000	1.21
+++ glom/utility_widgets/db_adddel/glom_db_treemodel.h	1 Nov 2006 09:41:30 -0000
@@ -37,7 +37,7 @@ class DbTreeModelRow
 public:
   DbTreeModelRow();
 
-  typedef Gnome::Gda::Value DbValue;
+  typedef Glib::ValueBase DbValue;
 
   //Field Values. We store them here after reading them from the database,
   //so that we can change them without changing them in the database immediately.
@@ -121,7 +121,7 @@ protected:
    virtual Gtk::TreeModelFlags get_flags_vfunc() const;
    virtual int get_n_columns_vfunc() const;
    virtual GType get_column_type_vfunc(int index) const;
-   virtual void get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBase& value) const;
+   virtual void get_value_vfunc(const TreeModel::iterator& iter, int column, Glib::ValueBaseBase& value) const;
 
    bool iter_next_vfunc(const iterator& iter, iterator& iter_next) const;
 
@@ -138,7 +138,7 @@ protected:
 
    virtual bool iter_is_valid(const iterator& iter) const;
 
-   virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+   virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBaseBase& value);
 
 private:
    typedef DbTreeModelRow typeRow; //X columns, all of type Value.
