[glom] FlowTable::add(): Rename to add_widgets().



commit dbeb7e94df69f7b8c44bd5069b5f5c7fdcdbf1aa
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 14 11:14:45 2012 +0100

    FlowTable::add(): Rename to add_widgets().
    
    	* glom/mode_data/flowtablewithfields.cc:
    	* glom/utility_widgets/flowtable.[h|cc]: This avoids a clash with
    	Gtk::Widget::add(), which is virtual, but takes different parameters.
    	This fixes warnings found by clang++.

 ChangeLog                             |   10 ++++++++++
 glom/mode_data/flowtablewithfields.cc |   20 ++++++++++----------
 glom/utility_widgets/flowtable.cc     |    4 ++--
 glom/utility_widgets/flowtable.h      |    4 ++--
 4 files changed, 24 insertions(+), 14 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d681b30..ba26d65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,19 @@
 2012-03-14  Murray Cumming  <murrayc murrayc com>
 
+	FlowTable::add(): Rename to add_widgets().
+
+	* glom/mode_data/flowtablewithfields.cc:
+	* glom/utility_widgets/flowtable.[h|cc]: This avoids a clash with 
+	Gtk::Widget::add(), which is virtual, but takes different parameters.
+	This fixes warnings found by clang++.
+
+2012-03-14  Murray Cumming  <murrayc murrayc com>
+
 	Dialog_ImportCSVProgress: rename a signal handler.
 
 	* glom/import_csv/dialog_import_csv_progress[h|cc]: Avoid a clash with 
 	a virtual method of the same name in Gtk::Widget.
+	This fixes warnings found by clang++.
 
 2012-03-14  Murray Cumming  <murrayc murrayc com>
 
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index e2aeac9..004c6ee 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -228,7 +228,7 @@ void FlowTableWithFields::add_layout_group(const sharedptr<LayoutGroup>& group,
       }
     }
 
-    add(*frame, true /* expand */);
+    add_widgets(*frame, true /* expand */);
 
     m_sub_flow_tables.push_back(flow_table);
     flow_table->set_layout_item(group, m_table_name);
@@ -338,7 +338,7 @@ void FlowTableWithFields::add_layout_portal(const sharedptr<LayoutItem_Portal>&
 
   if(portal_box)
   {
-    add(*portal_box, true /* expand */);
+    add_widgets(*portal_box, true /* expand */);
     add_layoutwidgetbase(portal_box);
   }
   else
@@ -444,7 +444,7 @@ void FlowTableWithFields::add_layout_notebook(const sharedptr<LayoutItem_Noteboo
 
   add_layoutwidgetbase(notebook_widget);
   //add_view(button); //So it can get the document.
-  add(*notebook_widget, true /* expand */);
+  add_widgets(*notebook_widget, true /* expand */);
 }
 
 /*
@@ -490,7 +490,7 @@ void FlowTableWithFields::add_group(const Glib::ustring& group_name, const Glib:
       flow_table->add_field(*iter);
     }
 
-    add(*frame);
+    add_widgets(*frame);
 
     m_sub_flow_tables.push_back(flow_table);
 
@@ -545,7 +545,7 @@ void FlowTableWithFields::add_field(const sharedptr<LayoutItem_Field>& layoutite
   eventbox->set_events(Gdk::ALL_EVENTS_MASK);
   eventbox->show_all();
 
-  add(*eventbox, *(info.m_second), true);
+  add_widgets(*eventbox, *(info.m_second), true);
 
   info.m_second->signal_edited().connect( sigc::bind(sigc::mem_fun(*this, &FlowTableWithFields::on_entry_edited), layoutitem_field)  ); //TODO:  Is it a good idea to bind the LayoutItem? sigc::bind() probably stores a copy at this point.
 
@@ -598,7 +598,7 @@ void FlowTableWithFields::add_button(const sharedptr<LayoutItem_Button>& layouti
     expand = true;
   }
 
-  add(*widget_to_add, expand);
+  add_widgets(*widget_to_add, expand);
 
   apply_formatting(*button, layoutitem_button);
 }
@@ -627,7 +627,7 @@ void FlowTableWithFields::add_textobject(const sharedptr<LayoutItem_Text>& layou
   const Glib::ustring title = item_get_title(layoutitem_text);
   if(title.empty())
   {
-    add(*alignment_label, true /* expand */);
+    add_widgets(*alignment_label, true /* expand */);
   }
   else
   {
@@ -641,7 +641,7 @@ void FlowTableWithFields::add_textobject(const sharedptr<LayoutItem_Text>& layou
     alignment_title->add(*title_label);
     add_layoutwidgetbase(title_label);
 
-    add(*alignment_title, *alignment_label, true /* expand */);
+    add_widgets(*alignment_title, *alignment_label, true /* expand */);
   }
 }
 
@@ -661,7 +661,7 @@ void FlowTableWithFields::add_imageobject(const sharedptr<LayoutItem_Image>& lay
   const Glib::ustring title = item_get_title(layoutitem_image);
   if(title.empty())
   {
-    add(*image, true /* expand */);
+    add_widgets(*image, true /* expand */);
   }
   else
   {
@@ -672,7 +672,7 @@ void FlowTableWithFields::add_imageobject(const sharedptr<LayoutItem_Image>& lay
     Gtk::Label* title_label = Gtk::manage(new Gtk::Label(title));
     title_label->show();
     alignment_title->add(*title_label);
-    add(*alignment_title, *image, true /* expand */);
+    add_widgets(*alignment_title, *image, true /* expand */);
   }
 }
 
diff --git a/glom/utility_widgets/flowtable.cc b/glom/utility_widgets/flowtable.cc
index 3dc77d6..8a6f235 100644
--- a/glom/utility_widgets/flowtable.cc
+++ b/glom/utility_widgets/flowtable.cc
@@ -125,12 +125,12 @@ void FlowTable::set_design_mode(bool value)
   queue_draw(); //because this changes how the widget would be drawn.
 }
 
-void FlowTable::add(Gtk::Widget& first, Gtk::Widget& second, bool expand_second)
+void FlowTable::add_widgets(Gtk::Widget& first, Gtk::Widget& second, bool expand_second)
 {
   insert(&first, &second, -1, expand_second);
 }
 
-void FlowTable::add(Gtk::Widget& first, bool expand)
+void FlowTable::add_widgets(Gtk::Widget& first, bool expand)
 {
   insert(&first, 0 /* second */, -1, expand);
 }
diff --git a/glom/utility_widgets/flowtable.h b/glom/utility_widgets/flowtable.h
index d169d2f..aaad29d 100644
--- a/glom/utility_widgets/flowtable.h
+++ b/glom/utility_widgets/flowtable.h
@@ -36,8 +36,8 @@ public:
 
   typedef Gtk::Container type_base;
 
-  virtual void add(Gtk::Widget& first, Gtk::Widget& second, bool expand_second = false);
-  virtual void add(Gtk::Widget& first, bool expand = false); //override
+  void add_widgets(Gtk::Widget& first, Gtk::Widget& second, bool expand_second = false);
+  void add_widgets(Gtk::Widget& first, bool expand = false); //override
  
   /** Show extra UI that is useful in RAD tools:
    */



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