[glom] Added accessible names for DbAdddel and layout entries/images



commit e89fb14df37f4c8f732a9463b096b66392f8bdc5
Author: Armin Burgmeier <armin arbur net>
Date:   Mon Jun 8 20:29:27 2009 +0200

    Added accessible names for DbAdddel and layout entries/images
    
    	* glom/utility_widgets/db_adddel/db_adddel.cc: Added an accessible
    	name for the TreeView.
    
    	* glom/utility_widgets/imageglom.h:
    	* glom/utility_widgets/imageglom.cc:
    	* glom/utility_widgets/entryglom.h:
    	* glom/utility_widgets/entryglom.cc: Set an accessible name, based on
    	the layout item's name.
---
 ChangeLog                                   |   11 +++++++++++
 glom/utility_widgets/db_adddel/db_adddel.cc |    4 ++++
 glom/utility_widgets/entryglom.cc           |    6 ++++++
 glom/utility_widgets/entryglom.h            |    2 ++
 glom/utility_widgets/imageglom.cc           |    5 +++++
 glom/utility_widgets/imageglom.h            |    2 ++
 6 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 77d93c7..9b60f69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-06-08  Armin Burgmeier  <armin openismus com>
 
+	* glom/utility_widgets/db_adddel/db_adddel.cc: Added an accessible
+	name for the TreeView.
+
+	* glom/utility_widgets/imageglom.h:
+	* glom/utility_widgets/imageglom.cc:
+	* glom/utility_widgets/entryglom.h:
+	* glom/utility_widgets/entryglom.cc: Set an accessible name, based on
+	the layout item's name.
+
+2009-06-08  Armin Burgmeier  <armin openismus com>
+
 	* glom/utility_widgets/layoutwidgetbase.cc: Initialize m_pLayoutItem
 	in client only mode, to avoid an uninitialized pointer in that case.
 
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index 7bd6635..6de206e 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -90,6 +90,10 @@ DbAddDel::DbAddDel()
   //set_columns_count(1);
   //construct_specified_columns();
   
+  // 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.
+  m_TreeView.get_accessible()->set_name(_("Table Content"));
 
   m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
   m_ScrolledWindow.add(m_TreeView);
diff --git a/glom/utility_widgets/entryglom.cc b/glom/utility_widgets/entryglom.cc
index 8e8162e..9db3eec 100644
--- a/glom/utility_widgets/entryglom.cc
+++ b/glom/utility_widgets/entryglom.cc
@@ -71,6 +71,12 @@ void EntryGlom::init()
 #endif // !GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 }
 
+void EntryGlom::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
+{
+  LayoutWidgetField::set_layout_item(layout_item, table_name);
+  get_accessible()->set_name(layout_item->get_name());
+}
+
 void EntryGlom::set_glom_type(Field::glom_field_type glom_type)
 {
   m_glom_type = glom_type;
diff --git a/glom/utility_widgets/entryglom.h b/glom/utility_widgets/entryglom.h
index a417520..6f6dbc2 100644
--- a/glom/utility_widgets/entryglom.h
+++ b/glom/utility_widgets/entryglom.h
@@ -42,6 +42,8 @@ public:
   explicit EntryGlom(Field::glom_field_type glom_type = Field::TYPE_TEXT);
   virtual ~EntryGlom();
 
+  virtual void set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name);
+
   void set_glom_type(Field::glom_field_type glom_type);
 
   //Override this so we can store the text to compare later.
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index d2f262b..95e6df9 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -77,6 +77,11 @@ 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);
+  get_accessible()->set_name(layout_item->get_name());
+}
 
 bool ImageGlom::on_button_press_event(GdkEventButton *event)
 {
diff --git a/glom/utility_widgets/imageglom.h b/glom/utility_widgets/imageglom.h
index 7ac4ebc..0b56da6 100644
--- a/glom/utility_widgets/imageglom.h
+++ b/glom/utility_widgets/imageglom.h
@@ -42,6 +42,8 @@ public:
 
 
   virtual ~ImageGlom();
+  
+  virtual void set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name);
 
   virtual void set_value(const Gnome::Gda::Value& value);
   virtual Gnome::Gda::Value get_value() const;



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