Index: gtk/src/treeview.hg
===================================================================
RCS file: /cvs/gnome/gtkmm-root/gtk-src/treeview.hg,v
retrieving revision 1.50
diff -u -3 -r1.50 treeview.hg
--- gtk/src/treeview.hg	7 Aug 2002 21:02:41 -0000	1.50
+++ gtk/src/treeview.hg	9 Aug 2002 20:11:26 -0000
@@ -243,8 +243,8 @@
 protected:
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-  template <class ColumnType> inline
-  void _connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer, const TreeModelColumn<ColumnType>& model_column);
+//  template <class ColumnType> inline
+//  void _connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer, const TreeModelColumn<ColumnType>& model_column);
 
   //I had to use a TreeModelColumn pointer here instead of a reference, to avoid some strange libsigc++ template errors about constructors not matching.
   template <class ColumnType> inline //Must be explicitly specialized.
@@ -255,6 +255,15 @@
 
   void _auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string, const Gtk::CellRendererToggle* cell_renderer, int model_column);
 #endif //DOXYGEN_SHOULD_SKIP_THIS
+
+  class Hack {
+  public:
+    //make compilers happy that don't like it if both _connect_auto_store_editable_signal_handler and _auto_store_on_cellrenderer_*_edited are member functions.
+    template <class ColumnType> inline
+    static void _connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer, const TreeModelColumn<ColumnType>& model_column);
+  };
+
+  friend class Hack;
 };
 
 
@@ -279,7 +288,7 @@
 
   //connect signal handlers for auto-storing of edited cell data
   CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
-  _connect_auto_store_editable_signal_handler<ColumnType>(pCellRender, model_column);
+  Hack::_connect_auto_store_editable_signal_handler<ColumnType>(this, pCellRender, model_column);
 
   return append_column(*pViewColumn);
 }
@@ -303,7 +312,7 @@
 
    //connect signal handlers for auto-storing of edited cell data
   CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
-  _connect_auto_store_editable_signal_handler(pCellRender, model_column);
+  Hack::_connect_auto_store_editable_signal_handler(this, pCellRender, model_column);
 
   return insert_column(*pViewColumn, position);
 }
@@ -313,7 +322,7 @@
 
 //bool specialization:
 template<> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<bool>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<bool>& model_column)
 {
   CellRendererToggle* pCellToggle = dynamic_cast<CellRendererToggle*>(pCellRenderer);
   if(pCellToggle)
@@ -323,13 +332,13 @@
 
     //Connect to the appropriate signal, sending the model_column too,
     pCellToggle->signal_toggled().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_toggle_edited), pCellToggle, model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_toggle_edited), pCellToggle, model_column.index()) );
   }
 }
 
 //int specialization:
 template<> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<int>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<int>& model_column)
 {
   CellRendererText* pCellText = dynamic_cast<CellRendererText*>(pCellRenderer);
   if(pCellText)
@@ -339,13 +348,13 @@
 
     //Connect to the appropriate signal, sending the model_column too,
     pCellText->signal_edited().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<int>), model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<int>), model_column.index()) );
   }
 }
 
-//int specialization:
+//unsigned int specialization:
 template<> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<unsigned int>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<unsigned int>& model_column)
 {
   CellRendererText* pCellText = dynamic_cast<CellRendererText*>(pCellRenderer);
   if(pCellText)
@@ -355,13 +364,13 @@
 
     //Connect to the appropriate signal, sending the model_column too,
     pCellText->signal_edited().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<unsigned int>), model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<unsigned int>), model_column.index()) );
   }
 }
 
 //long specialization:
 template<> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<long>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<long>& model_column)
 {
   CellRendererText* pCellText = dynamic_cast<CellRendererText*>(pCellRenderer);
   if(pCellText)
@@ -371,13 +380,13 @@
 
     //Connect to the appropriate signal, sending the model_column too,
     pCellText->signal_edited().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<long>), model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<long>), model_column.index()) );
   }
 }
 
 //unsigned long specialization:
 template<> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<unsigned long>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<unsigned long>& model_column)
 {
   CellRendererText* pCellText = dynamic_cast<CellRendererText*>(pCellRenderer);
   if(pCellText)
@@ -387,7 +396,7 @@
 
     //Connect to the appropriate signal, sending the model_column too,
     pCellText->signal_edited().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<unsigned long>), model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_text_edited_numerical<unsigned long>), model_column.index()) );
   }
 }
 
@@ -433,7 +442,7 @@
 }
 
 template <class ColumnType> inline
-void TreeView::_connect_auto_store_editable_signal_handler(CellRenderer* pCellRenderer,  const TreeModelColumn<ColumnType>& model_column)
+void TreeView::Hack::_connect_auto_store_editable_signal_handler(TreeView* this_p, CellRenderer* pCellRenderer,  const TreeModelColumn<ColumnType>& model_column)
 {
   g_assert(model_column.type() != 0);
 
@@ -450,7 +459,7 @@
     pCellText->property_editable() = true;
 
     pCellText->signal_edited().connect(
-      SigC::bind( SigC::slot(*this, &TreeView::_auto_store_on_cellrenderer_text_edited_string<ColumnType>), model_column.index()) );
+      SigC::bind( SigC::slot(*this_p, &TreeView::_auto_store_on_cellrenderer_text_edited_string<ColumnType>), model_column.index()) );
   }
 }
 
