[glom] Fix the client-only non-maemo build on maemo.



commit 9c637c9f39243375b711365f90f34e8946c84469
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Sep 4 12:34:19 2009 +0200

    Fix the client-only non-maemo build on maemo.
    
    * configure.ac: Correct the AS_IF() calls so that we really do not
    need iso-codes in client-only mode.
    * glom/print_layout/canvas_layout_item.cc:
    * glom/print_layout/canvas_print_layout.cc:
    * glom/printoperation_printlayout.cc: Fix the build without
    exceptions, without properties and without default signal handlers,
    with ifdefs.
    
    * glom/base_db.cc: get_fields_for_table_from_database(): Actually add
    a no-exceptions ifdef for the use of Gda::MetaStruct::complement()
    instead of just ifdefing it out for Maemo.
    * glom/mode_data/notebook_data.cc:
    * glom/utility_widgets/adddel/adddel.cc:
    * glom/utility_widgets/db_adddel/db_adddel.cc:
    * glom/utility_widgets/entryglom.cc:
    * glom/utility_widgets/imageglom.cc:
    Likewise, ifdef the use of get_accessible on GTKMM_ATKMM_ENABLED instead
    of GLOM_ENABLE_MAEMO, to fix the client-only non-maemo build on Maemo.
    Again, please stop abusing the MAEMO ifdef for hacks without even a TODO.

 ChangeLog                                   |   24 +++++++++++++
 configure.ac                                |   14 ++++---
 glom/base_db.cc                             |   31 ++++++++++++++---
 glom/mode_data/notebook_data.cc             |    2 +-
 glom/print_layout/canvas_layout_item.cc     |   44 ++++++++++++++++++++++++
 glom/print_layout/canvas_print_layout.cc    |   48 +++++++++++++++++++++++++++
 glom/printoperation_printlayout.cc          |   15 ++++++++
 glom/utility_widgets/adddel/adddel.cc       |    2 +-
 glom/utility_widgets/db_adddel/db_adddel.cc |    2 +-
 glom/utility_widgets/entryglom.cc           |    2 +-
 glom/utility_widgets/imageglom.cc           |    2 +-
 11 files changed, 169 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5c8ded4..d996057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
 2009-09-04  Murray Cumming  <murrayc murrayc com>
 
+	Fix the client-only non-maemo build on maemo.
+
+	* configure.ac: Correct the AS_IF() calls so that we really do not 
+	need iso-codes in client-only mode.
+	* glom/print_layout/canvas_layout_item.cc:
+	* glom/print_layout/canvas_print_layout.cc:
+	* glom/printoperation_printlayout.cc: Fix the build without 
+	exceptions, without properties and without default signal handlers, 
+	with ifdefs.
+
+	* glom/base_db.cc: get_fields_for_table_from_database(): Actually add 
+	a no-exceptions ifdef for the use of Gda::MetaStruct::complement() 
+	instead of just ifdefing it out for Maemo.
+	* glom/mode_data/notebook_data.cc:
+	* glom/utility_widgets/adddel/adddel.cc:
+	* glom/utility_widgets/db_adddel/db_adddel.cc:
+	* glom/utility_widgets/entryglom.cc:
+	* glom/utility_widgets/imageglom.cc:
+	Likewise, ifdef the use of get_accessible on GTKMM_ATKMM_ENABLED instead 
+	of GLOM_ENABLE_MAEMO, to fix the client-only non-maemo build on Maemo.
+	Again, please stop abusing the MAEMO ifdef for hacks without even a TODO.
+
+2009-09-04  Murray Cumming  <murrayc murrayc com>
+
 	* glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h:
 	Removed unnecessary GLOM_ENABLE_CLIENT_ONLY ifndef.
 
diff --git a/configure.ac b/configure.ac
index ad73a44..fedc433 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,19 +138,21 @@ AC_ARG_ENABLE([maemo-launcher],
 # libgda >= 4.1.2 is also OK, but not 4.1.<2.
 REQUIRED_LIBGLOM_LIBS='gthread-2.0 giomm-2.4 libxml++-2.6 pygda-4.0 >= 2.25.3 pygobject-2.0 >= 2.6.0 libgdamm-4.0 >= 3.99.14 libgda-4.0 >= 4.0.4 libgda-postgres-4.0'
 
-# TODO: Package iso-codes for Windows?
-AS_IF([test "x$glom_host_win32" != xyes],
-      [REQUIRED_LIBGLOM_LIBS="$REQUIRED_LIBGLOM_LIBS iso-codes"])
-
 AS_IF([test "x$glom_host_win32" != xyes],
       [REQUIRED_LIBGLOM_LIBS="$REQUIRED_LIBGLOM_LIBS libepc-1.0 >= 0.3.1 avahi-ui"])
 
 # Libraries used by Glom:
 REQUIRED_GLOM_LIBS="$REQUIRED_LIBGLOM_LIBS gtkmm-2.4 >= 2.14 gthread-2.0 gconfmm-2.6 libxml++-2.6 libxslt >= 1.1.10 goocanvasmm-1.0 >= 0.14.0"
 
-# Do not require gtksourceviewmm or iso-codes in client only mode
+# Do not require iso-codes in client-only mode, or on Windows:
+# TODO: Package iso-codes for Windows?
+AS_IF([test "x$glom_enable_client_only" != xyes && test "x$glom_host_win32" != xyes],
+      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS iso-codes"])
+
+# Do not require gtksourceviewmm in client only mode
 AS_IF([test "x$glom_enable_client_only" != xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS gtksourceviewmm-2.0 iso-codes"])
+      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS gtksourceviewmm-2.0"])
+
 AS_IF([test "x$glom_enable_sqlite" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS libgda-sqlite-4.0"])
 AS_IF([test "x$glom_enable_maemo" = xyes],
diff --git a/glom/base_db.cc b/glom/base_db.cc
index e1a1095..2cdcc35 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -684,13 +684,32 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
       Glib::RefPtr<Gnome::Gda::MetaStore> store = connection->get_meta_store();
       Glib::RefPtr<Gnome::Gda::MetaStruct> metastruct = 
         Gnome::Gda::MetaStruct::create(store, Gnome::Gda::META_STRUCT_FEATURE_NONE);
-#ifndef GLOM_ENABLE_MAEMO
-      GdaMetaDbObject* meta_dbobject = metastruct->complement(Gnome::Gda::META_DB_TABLE, 
+      GdaMetaDbObject* meta_dbobject = 0;
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+      try
+      {
+        meta_dbobject = metastruct->complement(Gnome::Gda::META_DB_TABLE, 
+          Gnome::Gda::Value(), /* catalog */
+          Gnome::Gda::Value(), /* schema */
+          Gnome::Gda::Value(quoted_table_name)); //It's a static instance inside the MetaStore.
+      }
+      catch(const Gnome::Gda::MetaStructError& ex)
+      {
+        handle_error(ex);
+        //TODO: Really fail.
+      }
+#else
+      std::auto_ptr<Glib::Error> ex;
+      meta_dbobject = metastruct->complement(Gnome::Gda::META_DB_TABLE, 
         Gnome::Gda::Value(), /* catalog */
         Gnome::Gda::Value(), /* schema */
-        Gnome::Gda::Value(quoted_table_name)); //It's a static instance inside the MetaStore. 
-      GdaMetaTable* meta_table = GDA_META_TABLE(meta_dbobject);
-#endif   
+        Gnome::Gda::Value(quoted_table_name), ex); //It's a static instance inside the MetaStore. 
+       if(error.get())
+       {
+         handle_error(*ex);
+       }
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+      GdaMetaTable* meta_table = GDA_META_TABLE(meta_dbobject); 
    
       //Examine each field:
       guint row = 0;
@@ -700,7 +719,7 @@ Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib:
         Glib::RefPtr<Gnome::Gda::Column> field_info = Gnome::Gda::Column::create();
 
         //Get the field name:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED        
+#ifdef GLIBMM_EXCEPTIONS_ENABLED //TODO: Actually catch exceptions.      
         Gnome::Gda::Value value_name = data_model_fields->get_value_at(DATAMODEL_FIELDS_COL_NAME, row);
 #else
         std::auto_ptr<Glib::Error> value_error;
diff --git a/glom/mode_data/notebook_data.cc b/glom/mode_data/notebook_data.cc
index c97652b..58712f9 100644
--- a/glom/mode_data/notebook_data.cc
+++ b/glom/mode_data/notebook_data.cc
@@ -35,7 +35,7 @@ Notebook_Data::Notebook_Data()
   m_iPage_Details = 1;
 
   // Set accessible name for the notebook, to be able to access it via LDTP
-#ifndef GLOM_ENABLE_MAEMO  
+#ifdef GTKMM_ATKMM_ENABLED
   get_accessible()->set_name(_("List Or Details View"));
 #endif  
 
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index b7de579..4bfe695 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -94,11 +94,23 @@ void CanvasLayoutItem::check_and_apply_formatting(const Glib::RefPtr<CanvasTextM
   //TODO: Are these sensible properties? Maybe we need to use markup:
   const Glib::ustring fg = formatting.get_text_format_color_foreground();
   if(!fg.empty())
+  {
+    #ifdef GLIBMM_PROPERTIES_ENABLED
     canvas_item->property_stroke_color() = fg;
+    #else
+    canvas_item->set_property("stroke-color", fg);
+    #endif
+  }
 
   const Glib::ustring bg = formatting.get_text_format_color_background();
   if(!bg.empty())
+  {
+    #ifdef GLIBMM_PROPERTIES_ENABLED
     canvas_item->property_fill_color() = bg;
+    #else
+    canvas_item->set_property("fill-color", bg);
+    #endif
+  }
 }
 
 void CanvasLayoutItem::on_resized()
@@ -179,7 +191,11 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
   if(text)
   {
     Glib::RefPtr<CanvasTextMovable> canvas_item = CanvasTextMovable::create();
+    #ifdef GLIBMM_PROPERTIES_ENABLED
     canvas_item->property_line_width() = 0;
+    #else
+    canvas_item->set_property("line-width", 0);
+    #endif
 
     FieldFormatting& formatting = text->m_formatting;
     check_and_apply_formatting(canvas_item, formatting);
@@ -200,7 +216,12 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
       else
         canvas_item->set_image_empty(); //show a no-image picture.
 
+      #ifdef GLIBMM_PROPERTIES_ENABLED
       canvas_item->property_fill_color() = "white"; //This makes the whole area clickable, not just the outline stroke.
+      #else
+      canvas_item->set_property("fill-color", Glib::ustring("white")); //This makes the whole area clickable, not just the outline stroke.
+      #endif
+
       child = canvas_item;
       child_item = canvas_item;
     }
@@ -216,13 +237,22 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
         line->get_coordinates(start_x, start_y, end_x, end_y);
         
         Glib::RefPtr<CanvasLineMovable> canvas_item = CanvasLineMovable::create();
+        #ifdef GLIBMM_PROPERTIES_ENABLED
         canvas_item->property_line_width() = 1;
         canvas_item->property_stroke_color() = "black";
+        #else
+        canvas_item->set_property("line-width", 1);
+        canvas_item->set_property("stroke-color", Glib::ustring("black"));
+        #endif
 
         Goocanvas::Points points(2);
         points.set_coordinate(0, start_x, start_y);
         points.set_coordinate(0, end_x, end_y);
+        #ifdef GLIBMM_PROPERTIES_ENABLED
         canvas_item->property_points() = points;
+        #else
+        canvas_item->set_property("points", points);
+        #endif
         child = canvas_item;
         child_item = canvas_item;
       }
@@ -243,7 +273,11 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
           else //text, numbers, date, time, boolean:
           {
             Glib::RefPtr<CanvasTextMovable> canvas_item = CanvasTextMovable::create();
+            #ifdef GLIBMM_PROPERTIES_ENABLED
             canvas_item->property_line_width() = 0;
+            #else
+            canvas_item->set_property("line-width", 0);
+            #endif
          
             FieldFormatting& formatting = field->m_formatting;
             check_and_apply_formatting(canvas_item, formatting);
@@ -264,9 +298,15 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
           if(portal)
           {
             Glib::RefPtr<CanvasTableMovable> canvas_item = CanvasTableMovable::create();
+            #ifdef GLIBMM_PROPERTIES_ENABLED
             canvas_item->property_vert_grid_line_width() = 1;
             canvas_item->property_horz_grid_line_width() = 1;
             canvas_item->property_stroke_color() = "black";
+            #else
+            canvas_item->set_property("vert-grid-line-width", 1);
+            canvas_item->set_property("horz-grid-line-width", 1);
+            canvas_item->set_property("stroke-color", Glib::ustring("black"));
+            #endif
 
             //Show as many rows as can fit in the height.
             double row_height = 0;
@@ -426,7 +466,11 @@ void CanvasLayoutItem::remove_empty_indicators()
     if(canvas_image->get_image_empty())
     {
       Glib::RefPtr<Gdk::Pixbuf> really_empty;
+      #ifdef GLIBMM_PROPERTIES_ENABLED
       canvas_image->property_pixbuf() = really_empty;
+      #else
+      canvas_image->set_property("pixbuf", really_empty);
+      #endif
     }
   }
 }
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 89e13a3..b4a0de9 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -54,7 +54,11 @@ Canvas_PrintLayout::Canvas_PrintLayout()
 
   //Use millimeters, because that's something that is meaningful to the user,
   //and we can use it with Gtk::PageSetup too:
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   property_units() = Gtk::UNIT_MM;
+  #else
+  set_property("units", Gtk::UNIT_MM);
+  #endif
 
   m_items_group = Goocanvas::Group::create();
   //m_items_group->signal_button_press_event().connect( sigc::ptr_fun(&on_group_button_press_event), false );
@@ -471,8 +475,14 @@ Glib::RefPtr<Goocanvas::Polyline> Canvas_PrintLayout::create_margin_line(double
 {
   Glib::RefPtr<Goocanvas::Polyline> line = 
     Goocanvas::Polyline::create(x1, y1, x2, y2);
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   line->property_line_width() = 0.5;
   line->property_stroke_color() = "light gray";
+  #else
+  line->set_property("line-width", 0.5);
+  line->set_property("stroke-color", Glib::ustring("light gray"));
+  #endif
+
   m_bounds_group->add_child(line);
   return line;
 }
@@ -489,7 +499,13 @@ void Canvas_PrintLayout::set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page
   bounds.set_x1(0);
   bounds.set_y1(0);
 
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   const Gtk::Unit units = property_units();
+  #else
+  Gtk::Unit units = Gtk::UNIT_MM;
+  get_property("units", units);
+  #endif
+
   //std::cout << "Canvas_PrintLayout::set_page_setup(): width=" << paper_size.get_width(units) << ", height=" paper_size.get_height(units) << std::endl;
 
   if(m_page_setup->get_orientation() == Gtk::PAGE_ORIENTATION_PORTRAIT) //TODO: Handle the reverse orientations too?
@@ -508,7 +524,11 @@ void Canvas_PrintLayout::set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page
   set_bounds(bounds);
 
   //Show the bounds with a rectangle, because the scrolled window might contain extra empty space.
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   property_background_color() = "light gray";
+  #else
+  set_property("background-color", Glib::ustring("light gray"));
+  #endif
   if(m_bounds_group)
   {
     m_bounds_group->remove();
@@ -521,8 +541,13 @@ void Canvas_PrintLayout::set_page_setup(const Glib::RefPtr<Gtk::PageSetup>& page
   
  
   m_bounds_rect = Goocanvas::Rect::create(bounds.get_x1(), bounds.get_y1(), bounds.get_x2(), bounds.get_y2());
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   m_bounds_rect->property_fill_color() = "white";
   m_bounds_rect->property_line_width() = 0;
+  #else
+  m_bounds_rect->set_property("fill-color", Glib::ustring("white"));
+  m_bounds_rect->set_property("line-width", 0);
+  #endif
   m_bounds_group->add_child(m_bounds_rect);
 
   //Make sure that the bounds rect is at the bottom, 
@@ -657,7 +682,14 @@ void Canvas_PrintLayout::fill_with_data(const Glib::RefPtr<Goocanvas::Group>& ca
       {
         //Set the data from the database:
         const guint col_index = iterFind->second;
+
+        #ifdef GLIBMM_EXCEPTIONS_ENABLED
+        //TODO: Actually catch exception:
         const Gnome::Gda::Value value = datamodel->get_value_at(col_index, 0);
+        #else
+        std::auto_ptr<Glib::Error> ex;
+        const Gnome::Gda::Value value = datamodel->get_value_at(col_index, 0, ex);
+        #endif
         canvas_item->set_db_data(value);
       }
     }
@@ -740,7 +772,15 @@ void Canvas_PrintLayout::fill_with_data_portal(const Glib::RefPtr<CanvasLayoutIt
       {
         Gnome::Gda::Value db_value;
         if( row < datamodel->get_n_rows() )
+        {
+          #ifdef GLIBMM_EXCEPTIONS_ENABLED
+          //TODO: Actually catch exception.
           db_value = datamodel->get_value_at(db_col, row);
+          #else
+          std::auto_ptr<Glib::Error> ex;
+          db_value = datamodel->get_value_at(db_col, row, ex);
+          #endif
+        }
           
         set_canvas_item_field_value(canvas_child, field, db_value);
         ++db_col;
@@ -764,7 +804,11 @@ void Canvas_PrintLayout::set_canvas_item_field_value(const Glib::RefPtr<Goocanva
       return;
 
     Glib::RefPtr<Gdk::Pixbuf> pixbuf = Utils::get_pixbuf_for_gda_value(value);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
     canvas_image->property_pixbuf() = pixbuf;
+    #else
+    canvas_image->set_property("pixbuf", pixbuf);
+    #endif
   }
   else //text, numbers, date, time, boolean:
   {
@@ -802,7 +846,11 @@ guint Canvas_PrintLayout::get_zoom_percent() const
 
 void Canvas_PrintLayout::hide_page_bounds()
 {
+  #ifdef GLIBMM_PROPERTIES_ENABLED
   m_bounds_group->property_visibility() = Goocanvas::ITEM_HIDDEN;
+  #else
+  m_bounds_group->set_property("visibility", Goocanvas::ITEM_HIDDEN);
+  #endif
 }
 
 void Canvas_PrintLayout::set_grid_gap(double gap)
diff --git a/glom/printoperation_printlayout.cc b/glom/printoperation_printlayout.cc
index 7e97885..aec90d9 100644
--- a/glom/printoperation_printlayout.cc
+++ b/glom/printoperation_printlayout.cc
@@ -27,6 +27,15 @@ PrintOperationPrintLayout::PrintOperationPrintLayout()
   set_use_full_page(true); //Because we show the margins on our canvas.
 
   set_n_pages(1); //There is always at least one page.
+
+#ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+  signal_begin_print().connect(
+    sigc::mem_fun(*this, &PrintOperationPrintLayout::on_begin_print));
+  signal_paginate().connect(
+    sigc::mem_fun(*this, &PrintOperationPrintLayout::on_paginate));
+  signal_draw_page().connect(
+    sigc::mem_fun(*this, &PrintOperationPrintLayout::on_draw_page));
+#endif
 }
 
 PrintOperationPrintLayout::~PrintOperationPrintLayout()
@@ -41,8 +50,10 @@ Glib::RefPtr<PrintOperationPrintLayout> PrintOperationPrintLayout::create()
 void PrintOperationPrintLayout::on_begin_print(
         const Glib::RefPtr<Gtk::PrintContext>& print_context)
 {
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   //Call base class:
   Gtk::PrintOperation::on_begin_print(print_context);
+#endif
 }
 
 bool PrintOperationPrintLayout::on_paginate(const Glib::RefPtr<Gtk::PrintContext>& print_context)
@@ -51,8 +62,10 @@ bool PrintOperationPrintLayout::on_paginate(const Glib::RefPtr<Gtk::PrintContext
 
   set_n_pages(1); //on_draw_page() will be called for any new pages.
 
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   //Call base class:
   Gtk::PrintOperation::on_paginate(print_context);
+#endif
 
   return true; //Pagination has finished. Don't call this again.
 }
@@ -73,8 +86,10 @@ void PrintOperationPrintLayout::on_draw_page(
   if(m_canvas)
     m_canvas->render(cairo_context);
 
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   //Call base class:
   Gtk::PrintOperation::on_draw_page(print_context, page_nr);
+#endif
 }
 
 void PrintOperationPrintLayout::set_canvas(Canvas_PrintLayout* canvas)
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 5facedb..ab0401a 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -146,7 +146,7 @@ AddDel::~AddDel()
 
 void AddDel::set_treeview_accessible_name(const Glib::ustring& name)
 {
-#ifndef GLOM_ENABLE_MAEMO
+#ifdef GTKMM_ATKMM_ENABLED
   m_TreeView.get_accessible()->set_name(name);
 #endif  
 }
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index a78c898..d4a0881 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -93,7 +93,7 @@ DbAddDel::DbAddDel()
   // Give the TreeView an accessible name, to access it in LDTP
   // TODO: Maybe this should be a constructor parameter, so that multiple
   // DbAddDels in a single Window can be addressed separately.
-#ifndef GLOM_ENABLE_MAEMO
+#ifdef GTKMM_ATKMM_ENABLED
   m_TreeView.get_accessible()->set_name(_("Table Content"));
 #endif  
 
diff --git a/glom/utility_widgets/entryglom.cc b/glom/utility_widgets/entryglom.cc
index cd91253..f8a5ef0 100644
--- a/glom/utility_widgets/entryglom.cc
+++ b/glom/utility_widgets/entryglom.cc
@@ -74,7 +74,7 @@ void EntryGlom::init()
 void EntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
 {
   LayoutWidgetField::set_layout_item(layout_item, table_name);
-#ifndef GLOM_ENABLE_MAEMO  
+#ifdef GTKMM_ATKMM_ENABLED
   get_accessible()->set_name(layout_item->get_name());
 #endif  
 }
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 97ea346..3442715 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -80,7 +80,7 @@ ImageGlom::~ImageGlom()
 void ImageGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
 {
   LayoutWidgetField::set_layout_item(layout_item, table_name);
-#ifndef GLOM_ENABLE_MAEMO  
+#ifdef GTKMM_ATKMM_ENABLED
   get_accessible()->set_name(layout_item->get_name());
 #endif  
 }



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