[glom] glom/mode_data/datawidget/: Clean up classes, putting them in a namespace.



commit 2c40be3629434daa7bca891df66dea4e15a978fb
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 8 15:05:36 2010 +0200

    glom/mode_data/datawidget/: Clean up classes, putting them in a namespace.
    
      * glom/mode_data/datawidget/: Removed Glom suffixes from class names
      and filenames, and put classes in a DataWidgetChildren sub-namespace,
      to make it clearer where we occasionally use these outside of DataWidget.

 ChangeLog                                          |    8 +++
 Makefile_glom.am                                   |   24 ++++----
 .../datawidget/{checkglom.cc => checkbutton.cc}    |   20 ++++---
 .../datawidget/{checkglom.h => checkbutton.h}      |   10 +++-
 .../datawidget/{comboglom.cc => combo.cc}          |    6 ++-
 glom/mode_data/datawidget/{comboglom.h => combo.h} |    4 ++
 .../mode_data/datawidget/combo_as_radio_buttons.cc |    4 ++
 glom/mode_data/datawidget/combo_as_radio_buttons.h |    4 ++
 glom/mode_data/datawidget/combochoices.cc          |    5 ++-
 glom/mode_data/datawidget/combochoices.h           |    4 ++
 .../datawidget/combochoiceswithtreemodel.cc        |    5 ++-
 .../datawidget/combochoiceswithtreemodel.h         |    4 ++
 .../{comboentryglom.cc => comboentry.cc}           |   55 ++++++++++---------
 .../datawidget/{comboentryglom.h => comboentry.h}  |   12 +++--
 glom/mode_data/datawidget/datawidget.cc            |   35 ++++++------
 glom/mode_data/datawidget/dialog_choose_date.cc    |    4 ++
 glom/mode_data/datawidget/dialog_choose_date.h     |    4 ++
 glom/mode_data/datawidget/dialog_choose_id.cc      |    5 ++-
 glom/mode_data/datawidget/dialog_choose_id.h       |    4 ++
 .../datawidget/{entryglom.cc => entry.cc}          |   46 +++++++++--------
 glom/mode_data/datawidget/{entryglom.h => entry.h} |   11 +++--
 .../datawidget/{labelglom.cc => label.cc}          |   24 +++++----
 glom/mode_data/datawidget/{labelglom.h => label.h} |   14 +++--
 .../datawidget/{textviewglom.cc => textview.cc}    |   46 +++++++++--------
 .../datawidget/{textviewglom.h => textview.h}      |   12 +++--
 glom/mode_data/flowtablewithfields.cc              |    8 ++--
 glom/mode_data/placeholder-glom.cc                 |    1 -
 glom/utility_widgets/flowtable_dnd.cc              |    2 -
 glom/utility_widgets/layoutwidgetbase.cc           |   10 ++--
 glom/utility_widgets/notebooklabelglom.cc          |   24 ++++----
 glom/utility_widgets/notebooklabelglom.h           |    8 ++--
 31 files changed, 255 insertions(+), 168 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c5c8134..944590f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-04-08  Murray Cumming  <murrayc murrayc com>
 
+  glom/mode_data/datawidget/: Clean up classes, putting them in a namespace.
+  
+  * glom/mode_data/datawidget/: Removed Glom suffixes from class names 
+  and filenames, and put classes in a DataWidgetChildren sub-namespace,
+  to make it clearer where we occasionally use these outside of DataWidget.
+
+2010-04-08  Murray Cumming  <murrayc murrayc com>
+
   Cleaned glom/utility_widgets/ a little.
   
   * glom/utility_widgets/datawidget.[h|cc]: Moved to glom/mode_data/datawidget/
diff --git a/Makefile_glom.am b/Makefile_glom.am
index e0bd170..64b5058 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -106,22 +106,22 @@ glom_glom_SOURCES =							\
 	glom/mode_data/placeholder-glom.h				\
 	glom/mode_data/datawidget/datawidget.cc				\
 	glom/mode_data/datawidget/datawidget.h				\
-	glom/mode_data/datawidget/checkglom.cc				\
-	glom/mode_data/datawidget/checkglom.h				\
-	glom/mode_data/datawidget/entryglom.cc				\
-	glom/mode_data/datawidget/entryglom.h				\
-	glom/mode_data/datawidget/labelglom.cc				\
-	glom/mode_data/datawidget/labelglom.h				\
-	glom/mode_data/datawidget/textviewglom.cc				\
-	glom/mode_data/datawidget/textviewglom.h				\
+	glom/mode_data/datawidget/checkbutton.cc				\
+	glom/mode_data/datawidget/checkbutton.h				\
+	glom/mode_data/datawidget/entry.cc				\
+	glom/mode_data/datawidget/entry.h				\
+	glom/mode_data/datawidget/label.cc				\
+	glom/mode_data/datawidget/label.h				\
+	glom/mode_data/datawidget/textview.cc				\
+	glom/mode_data/datawidget/textview.h				\
 	glom/mode_data/datawidget/dialog_choose_date.cc			\
 	glom/mode_data/datawidget/dialog_choose_date.h			\
 	glom/mode_data/datawidget/dialog_choose_id.cc			\
 	glom/mode_data/datawidget/dialog_choose_id.h				\
-	glom/mode_data/datawidget/comboentryglom.cc				\
-	glom/mode_data/datawidget/comboentryglom.h				\
-	glom/mode_data/datawidget/comboglom.cc				\
-	glom/mode_data/datawidget/comboglom.h				\
+	glom/mode_data/datawidget/comboentry.cc				\
+	glom/mode_data/datawidget/comboentry.h				\
+	glom/mode_data/datawidget/combo.cc				\
+	glom/mode_data/datawidget/combo.h				\
 	glom/mode_data/datawidget/combochoices.cc			\
 	glom/mode_data/datawidget/combochoices.h			\
 	glom/mode_data/datawidget/combochoiceswithtreemodel.cc			\
diff --git a/glom/mode_data/datawidget/checkglom.cc b/glom/mode_data/datawidget/checkbutton.cc
similarity index 86%
rename from glom/mode_data/datawidget/checkglom.cc
rename to glom/mode_data/datawidget/checkbutton.cc
index 14436b1..22ca99e 100644
--- a/glom/mode_data/datawidget/checkglom.cc
+++ b/glom/mode_data/datawidget/checkbutton.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "checkglom.h"
+#include "checkbutton.h"
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
 #include <glom/application.h>
@@ -29,7 +29,10 @@
 namespace Glom
 {
 
-CheckGlom::CheckGlom(const Glib::ustring& title)
+namespace DataWidgetChildren
+{
+
+CheckButton::CheckButton(const Glib::ustring& title)
   : Gtk::CheckButton(title)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -39,17 +42,17 @@ CheckGlom::CheckGlom(const Glib::ustring& title)
   init();
 }
 
-CheckGlom::~CheckGlom()
+CheckButton::~CheckButton()
 {
 }
 
-void CheckGlom::init()
+void CheckButton::init()
 {
 
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool CheckGlom::on_button_press_event(GdkEventButton *event)
+bool CheckButton::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
@@ -81,7 +84,7 @@ bool CheckGlom::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* CheckGlom::get_application()
+Application* CheckButton::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -89,14 +92,15 @@ Application* CheckGlom::get_application()
   return dynamic_cast<Application*>(pWindow);
 }
 
-void CheckGlom::set_value(const Gnome::Gda::Value& value)
+void CheckButton::set_value(const Gnome::Gda::Value& value)
 {
   set_active (value.get_boolean());
 }
 
-Gnome::Gda::Value CheckGlom::get_value() const
+Gnome::Gda::Value CheckButton::get_value() const
 {
   return Gnome::Gda::Value(get_active());
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/checkglom.h b/glom/mode_data/datawidget/checkbutton.h
similarity index 90%
rename from glom/mode_data/datawidget/checkglom.h
rename to glom/mode_data/datawidget/checkbutton.h
index 0ebe9bf..4022caa 100644
--- a/glom/mode_data/datawidget/checkglom.h
+++ b/glom/mode_data/datawidget/checkbutton.h
@@ -33,13 +33,16 @@ namespace Glom
 
 class Application;
 
-class CheckGlom
+namespace DataWidgetChildren
+{
+
+class CheckButton
 : public Gtk::CheckButton,
   public LayoutWidgetField
 {
 public:
-  explicit CheckGlom(const Glib::ustring& title);
-  virtual ~CheckGlom();
+  explicit CheckButton(const Glib::ustring& title);
+  virtual ~CheckButton();
 
   virtual void set_value(const Gnome::Gda::Value& value);
   virtual Gnome::Gda::Value get_value() const;    
@@ -54,6 +57,7 @@ private:
   virtual Application* get_application();
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_CHECK_GLOM_H
diff --git a/glom/mode_data/datawidget/comboglom.cc b/glom/mode_data/datawidget/combo.cc
similarity index 99%
rename from glom/mode_data/datawidget/comboglom.cc
rename to glom/mode_data/datawidget/combo.cc
index 6589f71..452a945 100644
--- a/glom/mode_data/datawidget/comboglom.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "comboglom.h"
+#include "combo.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
@@ -34,6 +34,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 ComboGlom::ComboGlom()
 : ComboChoicesWithTreeModel()
 {
@@ -313,4 +316,5 @@ void ComboGlom::set_read_only(bool /* read_only */)
   //TODO
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/comboglom.h b/glom/mode_data/datawidget/combo.h
similarity index 97%
rename from glom/mode_data/datawidget/comboglom.h
rename to glom/mode_data/datawidget/combo.h
index 79331e2..4620fb5 100644
--- a/glom/mode_data/datawidget/comboglom.h
+++ b/glom/mode_data/datawidget/combo.h
@@ -35,6 +35,9 @@ namespace Glom
 
 class Application;
 
+namespace DataWidgetChildren
+{
+
 /** A Gtk::ComboBox that can show choices of field values.
  * Use this when the user should only be allowed to enter values that are in the choices.
  */
@@ -100,6 +103,7 @@ private:
   #endif
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_COMBOENTRY_GLOM_H
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.cc b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
index c77a6db..07b1fd9 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.cc
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
@@ -32,6 +32,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 ComboAsRadioButtons::ComboAsRadioButtons()
 : ComboChoices()
 {
@@ -299,4 +302,5 @@ void ComboAsRadioButtons::set_read_only(bool /* read_only */)
   //TODO
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.h b/glom/mode_data/datawidget/combo_as_radio_buttons.h
index cdf3dca..1f62689 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.h
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.h
@@ -30,6 +30,9 @@ namespace Glom
 
 class Application;
 
+namespace DataWidgetChildren
+{
+
 /** A set of radio buttons, with an API similar to a ComboBox with restricted values.
  * Use this only when the user should only be allowed to enter values that are in the choices.
  */
@@ -89,6 +92,7 @@ private:
   type_map_buttons m_map_buttons;
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_COMBOENTRY_GLOM_H
diff --git a/glom/mode_data/datawidget/combochoices.cc b/glom/mode_data/datawidget/combochoices.cc
index 2228e29..55e3b58 100644
--- a/glom/mode_data/datawidget/combochoices.cc
+++ b/glom/mode_data/datawidget/combochoices.cc
@@ -31,6 +31,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 ComboChoices::ComboChoices()
 : m_with_second(false)
 {
@@ -52,5 +55,5 @@ ComboChoices::~ComboChoices()
 {
 }
 
-
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/combochoices.h b/glom/mode_data/datawidget/combochoices.h
index 06a8f61..a31054a 100644
--- a/glom/mode_data/datawidget/combochoices.h
+++ b/glom/mode_data/datawidget/combochoices.h
@@ -28,6 +28,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 /** A polymorphic base class for all the combo-like widgets.
  */
 class ComboChoices : public LayoutWidgetField
@@ -54,6 +57,7 @@ protected:
   //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_COMBO_CHOICES_H
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
index 00545c7..7a81cc4 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
@@ -31,6 +31,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 ComboChoicesWithTreeModel::ComboChoicesWithTreeModel()
 {
   init();
@@ -95,5 +98,5 @@ void ComboChoicesWithTreeModel::set_choices(const FieldFormatting::type_list_val
   }
 }
 
-
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.h b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
index 776e583..4fc23cf 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.h
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
@@ -26,6 +26,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 class ComboChoicesWithTreeModel : public ComboChoices
 {
 public:
@@ -60,6 +63,7 @@ protected:
   Glib::RefPtr<Gtk::ListStore> m_refModel;
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_COMBO_CHOICES_WITH_TREE_MODEL_H
diff --git a/glom/mode_data/datawidget/comboentryglom.cc b/glom/mode_data/datawidget/comboentry.cc
similarity index 89%
rename from glom/mode_data/datawidget/comboentryglom.cc
rename to glom/mode_data/datawidget/comboentry.cc
index 43e6217..9bae074 100644
--- a/glom/mode_data/datawidget/comboentryglom.cc
+++ b/glom/mode_data/datawidget/comboentry.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "comboentryglom.h"
+#include "comboentry.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
@@ -38,7 +38,10 @@
 namespace Glom
 {
 
-ComboEntryGlom::ComboEntryGlom()
+namespace DataWidgetChildren
+{
+
+ComboEntry::ComboEntry()
 : ComboChoicesWithTreeModel()
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -48,7 +51,7 @@ ComboEntryGlom::ComboEntryGlom()
   init();
 }
 
-ComboEntryGlom::ComboEntryGlom(const sharedptr<LayoutItem_Field>& field_second)
+ComboEntry::ComboEntry(const sharedptr<LayoutItem_Field>& field_second)
 : ComboChoicesWithTreeModel(field_second)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -58,7 +61,7 @@ ComboEntryGlom::ComboEntryGlom(const sharedptr<LayoutItem_Field>& field_second)
   init();
 }
 
-Gtk::Entry* ComboEntryGlom::get_entry()
+Gtk::Entry* ComboEntry::get_entry()
 {
   #ifndef GLOM_ENABLE_MAEMO
   return Gtk::ComboBoxEntry::get_entry();
@@ -67,7 +70,7 @@ Gtk::Entry* ComboEntryGlom::get_entry()
   #endif
 }
 
-const Gtk::Entry* ComboEntryGlom::get_entry() const
+const Gtk::Entry* ComboEntry::get_entry() const
 {
   #ifndef GLOM_ENABLE_MAEMO
   return Gtk::ComboBoxEntry::get_entry();
@@ -76,7 +79,7 @@ const Gtk::Entry* ComboEntryGlom::get_entry() const
   #endif
 }
 
-void ComboEntryGlom::init()
+void ComboEntry::init()
 {
 #ifndef GLOM_ENABLE_MAEMO
   set_model(m_refModel);
@@ -107,17 +110,17 @@ void ComboEntryGlom::init()
 
   //We use connect(slot, false) to connect before the default signal handler, because the default signal handler prevents _further_ handling.
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  get_entry()->signal_button_press_event().connect(sigc::mem_fun(*this, &ComboEntryGlom::on_entry_button_press_event), false);
+  get_entry()->signal_button_press_event().connect(sigc::mem_fun(*this, &ComboEntry::on_entry_button_press_event), false);
 #endif // GLOM_ENABLE_CLIENT_ONLY
 
-  get_entry()->signal_focus_out_event().connect(sigc::mem_fun(*this, &ComboEntryGlom::on_entry_focus_out_event), false);
-  get_entry()->signal_activate().connect(sigc::mem_fun(*this, &ComboEntryGlom::on_entry_activate));
+  get_entry()->signal_focus_out_event().connect(sigc::mem_fun(*this, &ComboEntry::on_entry_focus_out_event), false);
+  get_entry()->signal_activate().connect(sigc::mem_fun(*this, &ComboEntry::on_entry_activate));
 
 #ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   #ifndef GLOM_ENABLE_MAEMO
-  signal_changed().connect(sigc::mem_fun(*this, &ComboEntryGlom::on_changed));
+  signal_changed().connect(sigc::mem_fun(*this, &ComboEntry::on_changed));
   #else
-  m_maemo_selector.signal_changed().connect(sigc::mem_fun(*this, &ComboEntryGlom::on_changed));
+  m_maemo_selector.signal_changed().connect(sigc::mem_fun(*this, &ComboEntry::on_changed));
   #endif
 #endif // GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 
@@ -147,11 +150,11 @@ void ComboEntryGlom::init()
   }
 }
 
-ComboEntryGlom::~ComboEntryGlom()
+ComboEntry::~ComboEntry()
 {
 }
 
-void ComboEntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
+void ComboEntry::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
 {
   //Call base class:
   ComboChoicesWithTreeModel::set_layout_item(layout_item, table_name);
@@ -171,7 +174,7 @@ void ComboEntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, c
   get_entry()->set_alignment(x_align); 
 }
 
-void ComboEntryGlom::check_for_change()
+void ComboEntry::check_for_change()
 {
   if(!(get_entry()->get_editable()))
   {
@@ -218,7 +221,7 @@ void ComboEntryGlom::check_for_change()
   }
 }
 
-bool ComboEntryGlom::on_entry_focus_out_event(GdkEventFocus* /* event */)
+bool ComboEntry::on_entry_focus_out_event(GdkEventFocus* /* event */)
 {
   //bool result = Gtk::ComboBoxEntry::on_focus_out_event(event);
 
@@ -229,7 +232,7 @@ bool ComboEntryGlom::on_entry_focus_out_event(GdkEventFocus* /* event */)
   return false;
 }
 
-void ComboEntryGlom::on_entry_activate()
+void ComboEntry::on_entry_activate()
 { 
   //Call base class:
   //get_entry()->on_activate();
@@ -238,7 +241,7 @@ void ComboEntryGlom::on_entry_activate()
   check_for_change();
 }
 
-void ComboEntryGlom::on_entry_changed()
+void ComboEntry::on_entry_changed()
 {
   //The text is being edited, but the user has not finished yet.
 
@@ -247,7 +250,7 @@ void ComboEntryGlom::on_entry_changed()
 }
 
 
-void ComboEntryGlom::set_value(const Gnome::Gda::Value& value)
+void ComboEntry::set_value(const Gnome::Gda::Value& value)
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(!layout_item)
@@ -271,7 +274,7 @@ void ComboEntryGlom::set_value(const Gnome::Gda::Value& value)
   }
 }
 
-void ComboEntryGlom::set_text(const Glib::ustring& text)
+void ComboEntry::set_text(const Glib::ustring& text)
 {
   m_old_text = text;
   
@@ -291,7 +294,7 @@ void ComboEntryGlom::set_text(const Glib::ustring& text)
   get_entry()->set_text(text);
 }
 
-Gnome::Gda::Value ComboEntryGlom::get_value() const
+Gnome::Gda::Value ComboEntry::get_value() const
 {
   bool success = false;
 
@@ -300,7 +303,7 @@ Gnome::Gda::Value ComboEntryGlom::get_value() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool ComboEntryGlom::on_entry_button_press_event(GdkEventButton *event)
+bool ComboEntry::on_entry_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
@@ -334,7 +337,7 @@ bool ComboEntryGlom::on_entry_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* ComboEntryGlom::get_application()
+Application* ComboEntry::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -343,9 +346,9 @@ Application* ComboEntryGlom::get_application()
 }
 
 #ifndef GLOM_ENABLE_MAEMO
-void ComboEntryGlom::on_changed()
+void ComboEntry::on_changed()
 #else
-void ComboEntryGlom::on_changed(int /* column */)
+void ComboEntry::on_changed(int /* column */)
 #endif 
 {
 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
@@ -370,12 +373,12 @@ void ComboEntryGlom::on_changed(int /* column */)
   //Entry of text that is not in the menu will be handled by the ->get_entry() signal handlers._
 }
 
-void ComboEntryGlom::set_read_only(bool read_only)
+void ComboEntry::set_read_only(bool read_only)
 {
   Gtk::Entry* entry = get_entry();
   if(entry)
     entry->set_editable(!read_only);
 }
 
-
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/comboentryglom.h b/glom/mode_data/datawidget/comboentry.h
similarity index 94%
rename from glom/mode_data/datawidget/comboentryglom.h
rename to glom/mode_data/datawidget/comboentry.h
index 308644e..8f7bff7 100644
--- a/glom/mode_data/datawidget/comboentryglom.h
+++ b/glom/mode_data/datawidget/comboentry.h
@@ -35,11 +35,14 @@ namespace Glom
 
 class Application;
 
+namespace DataWidgetChildren
+{
+
 /** A Gtk::ComboBoxEntry that can show choices of field values.
  * Use this when the user should be allowed to enter values directly too,
  * including values that are not in the choices.
  */
-class ComboEntryGlom
+class ComboEntry
 : 
 #ifndef GLOM_ENABLE_MAEMO
   public Gtk::ComboBoxEntry,
@@ -50,12 +53,12 @@ class ComboEntryGlom
 {
 public:
   ///You must call set_layout_item() to specify the field type and formatting of the main column.
-  ComboEntryGlom();
+  ComboEntry();
 
   ///You must call set_layout_item() to specify the field type and formatting of the main column.
-  explicit ComboEntryGlom(const sharedptr<LayoutItem_Field>& field_second);
+  explicit ComboEntry(const sharedptr<LayoutItem_Field>& field_second);
 
-  virtual ~ComboEntryGlom();
+  virtual ~ComboEntry();
 
   //Override this so we can store the text to compare later.
   //This is not virtual, so you must not use it via Gtk::Entry.
@@ -110,6 +113,7 @@ private:
   #endif
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_COMBOENTRY_GLOM_H
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index 3db282f..7d44efd 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -20,13 +20,13 @@
 
 #include "config.h"
 #include "datawidget.h"
-#include "entryglom.h"
-#include "checkglom.h"
-#include "labelglom.h"
-#include <glom/mode_data/datawidget/comboentryglom.h>
-#include <glom/mode_data/datawidget/comboglom.h>
+#include "entry.h"
+#include "checkbutton.h"
+#include "label.h"
+#include <glom/mode_data/datawidget/comboentry.h>
+#include <glom/mode_data/datawidget/combo.h>
 #include <glom/mode_data/datawidget/combo_as_radio_buttons.h>
-#include <glom/mode_data/datawidget/textviewglom.h>
+#include <glom/mode_data/datawidget/textview.h>
 #include <glom/utility_widgets/imageglom.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/application.h>
@@ -46,20 +46,20 @@
 namespace Glom
 {
 
-static ComboChoices* create_combo_widget_for_field(const sharedptr<LayoutItem_Field>& field, const sharedptr<LayoutItem_Field>& layout_item_second = sharedptr<LayoutItem_Field>())
+static DataWidgetChildren::ComboChoices* create_combo_widget_for_field(const sharedptr<LayoutItem_Field>& field, const sharedptr<LayoutItem_Field>& layout_item_second = sharedptr<LayoutItem_Field>())
 {
-  ComboChoices* result = 0;
+  DataWidgetChildren::ComboChoices* result = 0;
   bool as_radio_buttons = false; //TODO: Use this.
   const bool restricted = field->get_formatting_used().get_choices_restricted(as_radio_buttons);
   if(restricted)
   {
     if(as_radio_buttons)
-      result = Gtk::manage(new ComboAsRadioButtons(layout_item_second));
+      result = Gtk::manage(new DataWidgetChildren::ComboAsRadioButtons(layout_item_second));
     else
-      result = Gtk::manage(new ComboGlom(layout_item_second));
+      result = Gtk::manage(new DataWidgetChildren::ComboGlom(layout_item_second));
   }
   else
-    result = Gtk::manage(new ComboEntryGlom(layout_item_second));
+    result = Gtk::manage(new DataWidgetChildren::ComboEntry(layout_item_second));
 
   return result;
 }
@@ -76,7 +76,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
   const Glib::ustring title = field->get_title_or_name();
   if(glom_type == Field::TYPE_BOOLEAN)
   {
-    CheckGlom* checkbutton = Gtk::manage( new CheckGlom( title ) );
+    DataWidgetChildren::CheckButton* checkbutton = Gtk::manage( new DataWidgetChildren::CheckButton( title ) );
     checkbutton->show();
     checkbutton->signal_toggled().connect( sigc::mem_fun(*this, &DataWidget::on_widget_edited)  );
 
@@ -116,7 +116,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
     //Use a Combo if there is a drop-down of choices (A "value list"), else an Entry:
     if(field->get_formatting_used().get_has_choices())
     {
-      ComboChoices* combo = create_combo_widget_for_field(field);
+      DataWidgetChildren::ComboChoices* combo = create_combo_widget_for_field(field);
 
       if(field->get_formatting_used().get_has_custom_choices())
       {
@@ -168,12 +168,12 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
     {
       if((glom_type == Field::TYPE_TEXT) && (field->get_formatting_used().get_text_format_multiline()))
       {
-        TextViewGlom* textview = Gtk::manage(new TextViewGlom(glom_type));
+        DataWidgetChildren::TextView* textview = Gtk::manage(new DataWidgetChildren::TextView(glom_type));
         pFieldWidget = textview;
       }
       else  //TYPE_DATE, TYPE_NUMBER, etc.
       {
-        EntryGlom* entry = Gtk::manage(new EntryGlom(glom_type));
+        DataWidgetChildren::Entry* entry = Gtk::manage(new DataWidgetChildren::Entry(glom_type));
         pFieldWidget = entry;
       }
 
@@ -697,7 +697,7 @@ void DataWidget::on_button_choose_date()
   } 
 #endif
 
-  Dialog_ChooseDate* dialog = 0;
+  DataWidgetChildren::Dialog_ChooseDate* dialog = 0;
   refXml->get_widget_derived("dialog_choose_date", dialog);
 
   if(dialog)
@@ -756,7 +756,7 @@ bool DataWidget::offer_related_record_id_find(Gnome::Gda::Value& chosen_id)
   }
 #endif
 
-  Dialog_ChooseID* dialog = 0;
+  DataWidgetChildren::Dialog_ChooseID* dialog = 0;
   refXml->get_widget_derived("dialog_find_id", dialog);
 
   if(dialog)
@@ -798,5 +798,4 @@ bool DataWidget::offer_related_record_id_find(Gnome::Gda::Value& chosen_id)
   return result;
 }
 
-
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/dialog_choose_date.cc b/glom/mode_data/datawidget/dialog_choose_date.cc
index 55a9c16..6be07c0 100644
--- a/glom/mode_data/datawidget/dialog_choose_date.cc
+++ b/glom/mode_data/datawidget/dialog_choose_date.cc
@@ -26,6 +26,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 Dialog_ChooseDate::Dialog_ChooseDate()
 : m_calendar(0)
 {
@@ -80,6 +83,7 @@ void Dialog_ChooseDate::on_day_selected_double_click()
   response(Gtk::RESPONSE_OK);
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 
diff --git a/glom/mode_data/datawidget/dialog_choose_date.h b/glom/mode_data/datawidget/dialog_choose_date.h
index f2e41ae..0655b73 100644
--- a/glom/mode_data/datawidget/dialog_choose_date.h
+++ b/glom/mode_data/datawidget/dialog_choose_date.h
@@ -30,6 +30,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 class Dialog_ChooseDate
   : public Gtk::Dialog
 {
@@ -47,6 +50,7 @@ private:
   Gtk::Calendar* m_calendar;
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_MODE_DATA_DIALOG_CHOOSE_DATE_H
diff --git a/glom/mode_data/datawidget/dialog_choose_id.cc b/glom/mode_data/datawidget/dialog_choose_id.cc
index 1f5be08..c55864c 100644
--- a/glom/mode_data/datawidget/dialog_choose_id.cc
+++ b/glom/mode_data/datawidget/dialog_choose_id.cc
@@ -33,6 +33,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 Dialog_ChooseID::Dialog_ChooseID()
 : m_label_table_name(0),
   m_pBox_QuickFind(0),
@@ -188,5 +191,5 @@ bool Dialog_ChooseID::init_db_details(const Glib::ustring& table_name, const Gli
   return result;
 }
 
-
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/dialog_choose_id.h b/glom/mode_data/datawidget/dialog_choose_id.h
index faeb04f..38f62db 100644
--- a/glom/mode_data/datawidget/dialog_choose_id.h
+++ b/glom/mode_data/datawidget/dialog_choose_id.h
@@ -30,6 +30,9 @@
 namespace Glom
 {
 
+namespace DataWidgetChildren
+{
+
 class Dialog_ChooseID
   : public Gtk::Dialog,
     public Base_DB
@@ -77,6 +80,7 @@ private:
   enumStage m_stage;
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_MODE_DATA_DIALOG_CHOOSE_ID_H
diff --git a/glom/mode_data/datawidget/entryglom.cc b/glom/mode_data/datawidget/entry.cc
similarity index 84%
rename from glom/mode_data/datawidget/entryglom.cc
rename to glom/mode_data/datawidget/entry.cc
index 99dd267..8c3c1da 100644
--- a/glom/mode_data/datawidget/entryglom.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "entryglom.h"
+#include "entry.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
@@ -34,7 +34,10 @@
 namespace Glom
 {
 
-EntryGlom::EntryGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
+namespace DataWidgetChildren
+{
+
+Entry::Entry(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
 :
 #ifdef GLOM_ENABLE_MAEMO
   Hildon::Entry(cobject),
@@ -49,7 +52,7 @@ EntryGlom::EntryGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>&
   init();
 }
 
-EntryGlom::EntryGlom(Field::glom_field_type glom_type)
+Entry::Entry(Field::glom_field_type glom_type)
 :
 #ifdef GLOM_ENABLE_MAEMO
   Hildon::Entry(Gtk::Hildon::SIZE_AUTO),
@@ -63,20 +66,20 @@ EntryGlom::EntryGlom(Field::glom_field_type glom_type)
   init();
 }
 
-EntryGlom::~EntryGlom()
+Entry::~Entry()
 {
 }
 
-void EntryGlom::init()
+void Entry::init()
 {
 #ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
-  signal_focus_out_event().connect(sigc::mem_fun(*this, &EntryGlom::on_focus_out_event));
-  signal_activate().connect(sigc::mem_fun(*this, &EntryGlom::on_activate));
-  signal_changed().connect(sigc::mem_fun(*this, &EntryGlom::on_changed));
+  signal_focus_out_event().connect(sigc::mem_fun(*this, &Entry::on_focus_out_event));
+  signal_activate().connect(sigc::mem_fun(*this, &Entry::on_activate));
+  signal_changed().connect(sigc::mem_fun(*this, &Entry::on_changed));
 #endif // !GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 }
 
-void EntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
+void Entry::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
 {
   LayoutWidgetField::set_layout_item(layout_item, table_name);
 #ifdef GTKMM_ATKMM_ENABLED
@@ -95,12 +98,12 @@ void EntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const
   set_alignment(x_align);
 }
 
-void EntryGlom::set_glom_type(Field::glom_field_type glom_type)
+void Entry::set_glom_type(Field::glom_field_type glom_type)
 {
   m_glom_type = glom_type;
 }
 
-void EntryGlom::check_for_change()
+void Entry::check_for_change()
 {
   Glib::ustring new_text = get_text();
   if(new_text != m_old_text)
@@ -132,11 +135,11 @@ void EntryGlom::check_for_change()
 }
 
 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
-bool EntryGlom::on_focus_out_event(GdkEventFocus* event)
+bool Entry::on_focus_out_event(GdkEventFocus* event)
 {
   const bool result = Gtk::Entry::on_focus_out_event(event);
 #else
-bool EntryGlom::on_focus_out_event(GdkEventFocus* /* event */)
+bool Entry::on_focus_out_event(GdkEventFocus* /* event */)
 {
   const bool result = false;
 #endif // GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
@@ -148,7 +151,7 @@ bool EntryGlom::on_focus_out_event(GdkEventFocus* /* event */)
   return result;
 }
 
-void EntryGlom::on_activate()
+void Entry::on_activate()
 {
 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   //Call base class:
@@ -159,7 +162,7 @@ void EntryGlom::on_activate()
   check_for_change();
 }
 
-void EntryGlom::on_changed()
+void Entry::on_changed()
 {
   //The text is being edited, but the user has not finished yet.
 
@@ -169,7 +172,7 @@ void EntryGlom::on_changed()
 #endif // GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 }
 
-void EntryGlom::set_value(const Gnome::Gda::Value& value)
+void Entry::set_value(const Gnome::Gda::Value& value)
 {
   sharedptr<const LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(!layout_item)
@@ -190,7 +193,7 @@ void EntryGlom::set_value(const Gnome::Gda::Value& value)
   }
 }
 
-void EntryGlom::set_text(const Glib::ustring& text)
+void Entry::set_text(const Glib::ustring& text)
 {
   m_old_text = text;
 
@@ -198,7 +201,7 @@ void EntryGlom::set_text(const Glib::ustring& text)
   Gtk::Entry::set_text(text);
 }
 
-Gnome::Gda::Value EntryGlom::get_value() const
+Gnome::Gda::Value Entry::get_value() const
 {
   bool success = false;
 
@@ -207,7 +210,7 @@ Gnome::Gda::Value EntryGlom::get_value() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool EntryGlom::on_button_press_event(GdkEventButton *event)
+bool Entry::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
@@ -241,7 +244,7 @@ bool EntryGlom::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* EntryGlom::get_application()
+Application* Entry::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -249,9 +252,10 @@ Application* EntryGlom::get_application()
   return dynamic_cast<Application*>(pWindow);
 }
 
-void EntryGlom::set_read_only(bool read_only)
+void Entry::set_read_only(bool read_only)
 {
   set_editable(!read_only);
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/entryglom.h b/glom/mode_data/datawidget/entry.h
similarity index 91%
rename from glom/mode_data/datawidget/entryglom.h
rename to glom/mode_data/datawidget/entry.h
index 570b0ca..dc11877 100644
--- a/glom/mode_data/datawidget/entryglom.h
+++ b/glom/mode_data/datawidget/entry.h
@@ -37,8 +37,10 @@ namespace Glom
 
 class Application;
 
+namespace DataWidgetChildren
+{
 
-class EntryGlom
+class Entry
 :
 #ifdef GLOM_ENABLE_MAEMO
   public Hildon::Entry,
@@ -48,9 +50,9 @@ class EntryGlom
   public LayoutWidgetField
 {
 public:
-  explicit EntryGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
-  explicit EntryGlom(Field::glom_field_type glom_type = Field::TYPE_TEXT);
-  virtual ~EntryGlom();
+  explicit Entry(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
+  explicit Entry(Field::glom_field_type glom_type = Field::TYPE_TEXT);
+  virtual ~Entry();
 
   virtual void set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name);
 
@@ -92,6 +94,7 @@ private:
   //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_ENTRY_GLOM_H
diff --git a/glom/mode_data/datawidget/labelglom.cc b/glom/mode_data/datawidget/label.cc
similarity index 87%
rename from glom/mode_data/datawidget/labelglom.cc
rename to glom/mode_data/datawidget/label.cc
index 8912f2c..c3a79ea 100644
--- a/glom/mode_data/datawidget/labelglom.cc
+++ b/glom/mode_data/datawidget/label.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "labelglom.h"
+#include "label.h"
 #include <gtkmm/messagedialog.h>
 #include <glom/application.h>
 #include <glibmm/i18n.h>
@@ -30,28 +30,31 @@
 namespace Glom
 {
 
-LabelGlom::LabelGlom()
+namespace DataWidgetChildren
+{
+
+Label::Label()
 {
   init();
 }
 
-LabelGlom::LabelGlom(const Glib::ustring& label, bool mnemonic)
+Label::Label(const Glib::ustring& label, bool mnemonic)
 : m_label(label, mnemonic)
 {
   init();
 }
 
-LabelGlom::LabelGlom(const Glib::ustring& label, float xalign, float yalign, bool mnemonic)
+Label::Label(const Glib::ustring& label, float xalign, float yalign, bool mnemonic)
 : m_label(label, xalign, yalign, mnemonic)
 {
   init();
 }
 
-LabelGlom::~LabelGlom()
+Label::~Label()
 {
 }
 
-void LabelGlom::init()
+void Label::init()
 {
   add(m_label);
   m_label.show();
@@ -60,7 +63,7 @@ void LabelGlom::init()
   //but we also want to allow changing of the background color, so we don't use it: set_visible_window(false);
 }
 
-Application* LabelGlom::get_application()
+Application* Label::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -69,7 +72,7 @@ Application* LabelGlom::get_application()
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void LabelGlom::on_menu_properties_activate()
+void Label::on_menu_properties_activate()
 {
   sharedptr<LayoutItem_Text> textobject = sharedptr<LayoutItem_Text>::cast_dynamic(m_pLayoutItem);
   if(!textobject)
@@ -103,7 +106,7 @@ void LabelGlom::on_menu_properties_activate()
   }
 }
 
-bool LabelGlom::on_button_press_event(GdkEventButton *event)
+bool Label::on_button_press_event(GdkEventButton *event)
 {
   Application* pApp = get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
@@ -122,9 +125,10 @@ bool LabelGlom::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Gtk::Label* LabelGlom::get_label()
+Gtk::Label* Label::get_label()
 {
   return &m_label;
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/labelglom.h b/glom/mode_data/datawidget/label.h
similarity index 85%
rename from glom/mode_data/datawidget/labelglom.h
rename to glom/mode_data/datawidget/label.h
index 80a4f88..2e4be89 100644
--- a/glom/mode_data/datawidget/labelglom.h
+++ b/glom/mode_data/datawidget/label.h
@@ -32,15 +32,18 @@ namespace Glom
 
 class Application;
 
-class LabelGlom
+namespace DataWidgetChildren
+{
+
+class Label
 : public Gtk::EventBox,
   public LayoutWidgetUtils
 {
 public:
-  LabelGlom();
-  explicit LabelGlom(const Glib::ustring& label, bool mnemonic = false);
-  explicit LabelGlom(const Glib::ustring& label, float xalign, float yalign, bool mnemonic = false);
-  virtual ~LabelGlom();
+  Label();
+  explicit Label(const Glib::ustring& label, bool mnemonic = false);
+  explicit Label(const Glib::ustring& label, float xalign, float yalign, bool mnemonic = false);
+  virtual ~Label();
   
   Gtk::Label* get_label();
 
@@ -57,6 +60,7 @@ private:
     
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_LABEL_GLOM_H
diff --git a/glom/mode_data/datawidget/textviewglom.cc b/glom/mode_data/datawidget/textview.cc
similarity index 81%
rename from glom/mode_data/datawidget/textviewglom.cc
rename to glom/mode_data/datawidget/textview.cc
index 887d1c0..a34a4a0 100644
--- a/glom/mode_data/datawidget/textviewglom.cc
+++ b/glom/mode_data/datawidget/textview.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "textviewglom.h"
+#include "textview.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
@@ -34,20 +34,23 @@
 namespace Glom
 {
 
-TextViewGlom::TextViewGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
+namespace DataWidgetChildren
+{
+
+TextView::TextView(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
 : Gtk::ScrolledWindow(cobject),
   m_glom_type(Field::TYPE_TEXT)
 {
   init();
 }
 
-TextViewGlom::TextViewGlom(Field::glom_field_type glom_type)
+TextView::TextView(Field::glom_field_type glom_type)
 : m_glom_type(glom_type)
 {
   init();
 }
 
-void TextViewGlom::init()
+void TextView::init()
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   setup_menu();
@@ -64,20 +67,20 @@ void TextViewGlom::init()
   m_TextView.set_wrap_mode(Gtk::WRAP_WORD);
 
   //We use connect(slot, false) to connect before the default signal handler, because the default signal handler prevents _further_ handling.
-  m_TextView.signal_focus_out_event().connect(sigc::mem_fun(*this, &TextViewGlom::on_textview_focus_out_event), false);
-  // m_TextView.get_buffer()->signal_end_user_action().connect(sigc::mem_fun(*this, &TextViewGlom::on_buffer_changed));
+  m_TextView.signal_focus_out_event().connect(sigc::mem_fun(*this, &TextView::on_textview_focus_out_event), false);
+  // m_TextView.get_buffer()->signal_end_user_action().connect(sigc::mem_fun(*this, &TextView::on_buffer_changed));
 }
 
-TextViewGlom::~TextViewGlom()
+TextView::~TextView()
 {
 }
 
-void TextViewGlom::set_glom_type(Field::glom_field_type glom_type)
+void TextView::set_glom_type(Field::glom_field_type glom_type)
 {
   m_glom_type = glom_type;
 }
 
-void TextViewGlom::check_for_change()
+void TextView::check_for_change()
 {
   const Glib::ustring new_text = m_TextView.get_buffer()->get_text();
   if(new_text != m_old_text)
@@ -109,12 +112,12 @@ void TextViewGlom::check_for_change()
 }
 
 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
-bool TextViewGlom::on_textview_focus_out_event(GdkEventFocus* event)
+bool TextView::on_textview_focus_out_event(GdkEventFocus* event)
 {
   //Call base class:
   bool result = Gtk::ScrolledWindow::on_focus_out_event(event);
 #else
-bool TextViewGlom::on_textview_focus_out_event(GdkEventFocus* /* event */)
+bool TextView::on_textview_focus_out_event(GdkEventFocus* /* event */)
 {
   bool result = false;
 #endif
@@ -128,7 +131,7 @@ bool TextViewGlom::on_textview_focus_out_event(GdkEventFocus* /* event */)
 
 /*
 
-void TextViewGlom::on_activate()
+void TextView::on_activate()
 { 
   //Call base class:
   Gtk::TextView::on_activate();
@@ -138,27 +141,27 @@ void TextViewGlom::on_activate()
 }
 */
 
-void TextViewGlom::on_buffer_changed()
+void TextView::on_buffer_changed()
 {
   check_for_change();
 }
 
 /*
-void TextViewGlom::on_insert_text(const Glib::ustring& text, int* position)
+void TextView::on_insert_text(const Glib::ustring& text, int* position)
 {
   Gtk::TextView::on_insert_text(text, position);
 }
 
 */
 
-void TextViewGlom::set_value(const Gnome::Gda::Value& value)
+void TextView::set_value(const Gnome::Gda::Value& value)
 {
   sharedptr<const LayoutItem_Field>layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
   if(layout_item)
     set_text(Conversions::get_text_for_gda_value(m_glom_type, value, layout_item->get_formatting_used().m_numeric_format));
 }
 
-void TextViewGlom::set_text(const Glib::ustring& text)
+void TextView::set_text(const Glib::ustring& text)
 {
   m_old_text = text;
 
@@ -166,18 +169,18 @@ void TextViewGlom::set_text(const Glib::ustring& text)
   m_TextView.get_buffer()->set_text(text);
 }
 
-Gnome::Gda::Value TextViewGlom::get_value() const
+Gnome::Gda::Value TextView::get_value() const
 {
   bool success = false;
 
   sharedptr<const LayoutItem_Field>layout_item = sharedptr<const LayoutItem_Field>::cast_dynamic(get_layout_item());
 
-  TextViewGlom* pNonConstThis = const_cast<TextViewGlom*>(this); //Gtk::TextBuffer::get_text() is non-const in gtkmm <=2.6.
+  TextView* pNonConstThis = const_cast<TextView*>(this); //Gtk::TextBuffer::get_text() is non-const in gtkmm <=2.6.
   return Conversions::parse_value(m_glom_type, pNonConstThis->m_TextView.get_buffer()->get_text(true), layout_item->get_formatting_used().m_numeric_format, success);
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool TextViewGlom::on_button_press_event(GdkEventButton *event)
+bool TextView::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
@@ -211,7 +214,7 @@ bool TextViewGlom::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* TextViewGlom::get_application()
+Application* TextView::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -219,9 +222,10 @@ Application* TextViewGlom::get_application()
   return dynamic_cast<Application*>(pWindow);
 }
 
-TextViewGlom::type_text_view* TextViewGlom::get_textview()
+TextView::type_text_view* TextView::get_textview()
 {
   return &m_TextView;
 }
 
+} //namespace DataWidetChildren
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/textviewglom.h b/glom/mode_data/datawidget/textview.h
similarity index 90%
rename from glom/mode_data/datawidget/textviewglom.h
rename to glom/mode_data/datawidget/textview.h
index 6b95bbd..09b2fbb 100644
--- a/glom/mode_data/datawidget/textviewglom.h
+++ b/glom/mode_data/datawidget/textview.h
@@ -37,14 +37,17 @@ namespace Glom
 
 class Application;
 
-class TextViewGlom
+namespace DataWidgetChildren
+{
+
+class TextView
 : public Gtk::ScrolledWindow,
   public LayoutWidgetField
 {
 public:
-  explicit TextViewGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
-  explicit TextViewGlom(Field::glom_field_type glom_type = Field::TYPE_TEXT);
-  virtual ~TextViewGlom();
+  explicit TextView(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
+  explicit TextView(Field::glom_field_type glom_type = Field::TYPE_TEXT);
+  virtual ~TextView();
 
   void set_glom_type(Field::glom_field_type glom_type);
 
@@ -91,6 +94,7 @@ private:
   type_text_view m_TextView;
 };
 
+} //namespace DataWidetChildren
 } //namespace Glom
 
 #endif //GLOM_UTILITY_WIDGETS_TEXTVIEW_GLOM_H
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 8ee3478..a3c270a 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -24,7 +24,7 @@
 #include <glom/utility_widgets/notebookglom.h>
 #include <glom/utility_widgets/notebooklabelglom.h>
 #include <glom/utility_widgets/imageglom.h>
-#include <glom/mode_data/datawidget/labelglom.h>
+#include <glom/mode_data/datawidget/label.h>
 #include <glom/utility_widgets/dialog_flowtable.h>
 #include <glom/mode_data/placeholder-glom.h>
 #include <glom/application.h>
@@ -367,7 +367,7 @@ void FlowTableWithFields::add_layout_notebook_at_position(const sharedptr<Layout
     if(group)
     {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-      NotebookLabelGlom* tab_label = Gtk::manage(new NotebookLabelGlom(notebook_widget));
+      NotebookLabel* tab_label = Gtk::manage(new NotebookLabel(notebook_widget));
       tab_label->show();
 #else
       Gtk::Label* tab_label = Gtk::manage(new Gtk::Label());
@@ -640,7 +640,7 @@ void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_
   alignment_label->show();
   
   const Glib::ustring text = layoutitem_text->get_text();
-  LabelGlom* label = Gtk::manage(new LabelGlom(text));
+  DataWidgetChildren::Label* label = Gtk::manage(new DataWidgetChildren::Label(text));
   label->set_layout_item(layoutitem_text, table_name);
   label->show();
   alignment_label->add(*label);
@@ -664,7 +664,7 @@ void FlowTableWithFields::add_textobject_at_position(const sharedptr<LayoutItem_
     alignment_title->set(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
     alignment_title->show();
 
-    LabelGlom* title_label = Gtk::manage(new LabelGlom(title, 0, 0, false));
+    DataWidgetChildren::Label* title_label = Gtk::manage(new DataWidgetChildren::Label(title, 0, 0, false));
     title_label->set_layout_item(layoutitem_text, table_name);
     title_label->show();
     alignment_title->add(*title_label);
diff --git a/glom/mode_data/placeholder-glom.cc b/glom/mode_data/placeholder-glom.cc
index 2b3ae22..f938fdc 100644
--- a/glom/mode_data/placeholder-glom.cc
+++ b/glom/mode_data/placeholder-glom.cc
@@ -23,7 +23,6 @@
  */
 
 #include "placeholder-glom.h"
-//#include "labelglom.h"
 #include <gtkmm/messagedialog.h>
 #include <glom/application.h>
 #include <glibmm/i18n.h>
diff --git a/glom/utility_widgets/flowtable_dnd.cc b/glom/utility_widgets/flowtable_dnd.cc
index 66c86f3..9edf349 100644
--- a/glom/utility_widgets/flowtable_dnd.cc
+++ b/glom/utility_widgets/flowtable_dnd.cc
@@ -23,8 +23,6 @@
 #include <gtkmm/toolpalette.h>
 #include <glom/mode_data/placeholder-glom.h>
 #include "layouttoolbarbutton.h"
-//#include <glom/mode_data/data_widget/entryglom.h>
-//#include "labelglom.h"
 #include <glom/mode_data/buttonglom.h>
 #include "imageglom.h"
 
diff --git a/glom/utility_widgets/layoutwidgetbase.cc b/glom/utility_widgets/layoutwidgetbase.cc
index 67156ae..e343c69 100644
--- a/glom/utility_widgets/layoutwidgetbase.cc
+++ b/glom/utility_widgets/layoutwidgetbase.cc
@@ -21,8 +21,8 @@
 #include "layoutwidgetbase.h"
 #include <glibmm/i18n.h>
 #include <glom/application.h>
-#include <glom/mode_data/datawidget/textviewglom.h>
-#include <glom/mode_data/datawidget/labelglom.h>
+#include <glom/mode_data/datawidget/textview.h>
+#include <glom/mode_data/datawidget/label.h>
 
 namespace Glom
 {
@@ -91,12 +91,12 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
   Gtk::Widget* widget_to_change = &widget;
 
   Gtk::Button* button = dynamic_cast<Gtk::Button*>(&widget);
-  LabelGlom* labelglom = dynamic_cast<LabelGlom*>(&widget);
+  DataWidgetChildren::Label* labelglom = dynamic_cast<DataWidgetChildren::Label*>(&widget);
   if(button)
     widget_to_change = button->get_child();
   else
   {
-    TextViewGlom* textview = dynamic_cast<TextViewGlom*>(&widget);
+    DataWidgetChildren::TextView* textview = dynamic_cast<DataWidgetChildren::TextView*>(&widget);
     if(textview)
       widget_to_change = textview->get_textview();
     else if(labelglom)
@@ -158,7 +158,7 @@ void LayoutWidgetBase::apply_formatting(Gtk::Widget& widget, const sharedptr<con
     }
     //According to the gtk_widget_modify_base() documentation, 
     //a GtkLabel can only have a background color by, for instance, placing it 
-    //in a GtkEventBox. Luckily LabelGlom is actually derived from EventBox.
+    //in a GtkEventBox. Luckily Label is actually derived from EventBox.
     else if(labelglom)
     {
       //label->modify_base(Gtk::STATE_NORMAL, Gdk::Color("bg"));
diff --git a/glom/utility_widgets/notebooklabelglom.cc b/glom/utility_widgets/notebooklabelglom.cc
index cf599be..b9298ed 100644
--- a/glom/utility_widgets/notebooklabelglom.cc
+++ b/glom/utility_widgets/notebooklabelglom.cc
@@ -25,14 +25,14 @@
 namespace Glom
 {
 
-NotebookLabelGlom::NotebookLabelGlom(NotebookGlom* notebook) 
+NotebookLabel::NotebookLabel(NotebookGlom* notebook) 
 : m_notebook(notebook),
   m_pPopupMenu(0)
 {
   init();
 }
 
-NotebookLabelGlom::NotebookLabelGlom(const Glib::ustring& label, NotebookGlom* notebook)
+NotebookLabel::NotebookLabel(const Glib::ustring& label, NotebookGlom* notebook)
 : m_label(label),
   m_notebook (notebook),
   m_pPopupMenu(0)
@@ -40,12 +40,12 @@ NotebookLabelGlom::NotebookLabelGlom(const Glib::ustring& label, NotebookGlom* n
   init();
 }
 
-NotebookLabelGlom::~NotebookLabelGlom()
+NotebookLabel::~NotebookLabel()
 {
 
 }
 
-void NotebookLabelGlom::init()
+void NotebookLabel::init()
 {
   add(m_label);
   m_label.show();
@@ -54,12 +54,12 @@ void NotebookLabelGlom::init()
   setup_menu();
 }
 
-void NotebookLabelGlom::set_label (const Glib::ustring& title)
+void NotebookLabel::set_label (const Glib::ustring& title)
 {
   m_label.set_label (title); 
 }
 
-Application* NotebookLabelGlom::get_application()
+Application* NotebookLabel::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
@@ -67,7 +67,7 @@ Application* NotebookLabelGlom::get_application()
   return dynamic_cast<Application*>(pWindow);
 }
 
-void NotebookLabelGlom::on_menu_new_group_activate()
+void NotebookLabel::on_menu_new_group_activate()
 {
   sharedptr<LayoutGroup> group(new LayoutGroup());
   group->set_title(_("New Group"));
@@ -79,7 +79,7 @@ void NotebookLabelGlom::on_menu_new_group_activate()
   m_notebook->signal_layout_changed().emit();
 }
 
-void NotebookLabelGlom::on_menu_delete_activate()
+void NotebookLabel::on_menu_delete_activate()
 {
   Glib::ustring message;
   if(!m_notebook->get_layout_item()->get_title().empty())
@@ -104,7 +104,7 @@ void NotebookLabelGlom::on_menu_delete_activate()
   }
 }
 
-void NotebookLabelGlom::setup_menu()
+void NotebookLabel::setup_menu()
 {
   m_refUIManager = Gtk::UIManager::create();
   m_refActionGroup = Gtk::ActionGroup::create();
@@ -114,9 +114,9 @@ void NotebookLabelGlom::setup_menu()
   m_refDelete = Gtk::Action::create("Delete", _("Delete"));
   
   m_refActionGroup->add(m_refNewGroup,
-    sigc::mem_fun(*this, &NotebookLabelGlom::on_menu_new_group_activate) );
+    sigc::mem_fun(*this, &NotebookLabel::on_menu_new_group_activate) );
   m_refActionGroup->add(m_refDelete,
-    sigc::mem_fun(*this, &NotebookLabelGlom::on_menu_delete_activate) );
+    sigc::mem_fun(*this, &NotebookLabel::on_menu_delete_activate) );
     
   m_refUIManager->insert_action_group(m_refActionGroup);
 
@@ -144,7 +144,7 @@ void NotebookLabelGlom::setup_menu()
     g_warning("menu not found");
 }
 
-bool NotebookLabelGlom::on_button_press_event(GdkEventButton *event)
+bool NotebookLabel::on_button_press_event(GdkEventButton *event)
 {
   Application* pApp = get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
diff --git a/glom/utility_widgets/notebooklabelglom.h b/glom/utility_widgets/notebooklabelglom.h
index ee19513..8ded8e4 100644
--- a/glom/utility_widgets/notebooklabelglom.h
+++ b/glom/utility_widgets/notebooklabelglom.h
@@ -30,13 +30,13 @@ namespace Glom
 
 class Application;
 
-class NotebookLabelGlom
+class NotebookLabel
 : public Gtk::EventBox
 {
 public:
-  explicit NotebookLabelGlom(NotebookGlom* notebook);
-  explicit NotebookLabelGlom(const Glib::ustring& label, NotebookGlom* notebook);
-  virtual ~NotebookLabelGlom();
+  explicit NotebookLabel(NotebookGlom* notebook);
+  explicit NotebookLabel(const Glib::ustring& label, NotebookGlom* notebook);
+  virtual ~NotebookLabel();
 
   void set_label (const Glib::ustring& title);  
     



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