[gtkmm] Remove more deprecated methods.



commit a3de9f8e2bf5d9b68a58d91cb6e2e83f72e46f90
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jan 5 10:53:30 2010 +0100

    Remove more deprecated methods.
    
    * gtk/src/filelist.am:
    * gtk/src/curve.[hg|cc]:
    * gtk/src/inputdialog.[hg|ccg]: Removed deprecated classes.
    * gtk/gtkmm/border.h: Removed because this file is now generated.
    * gtk/src/toolbar: Inherit (and implement) from CellLayout.
    * gtk/src/button.hg, fixed.hg, recentmanager.hg, scalebutton.hg,
    toolbar.hg, treeview.hg, treeviewcolumn.hg, widget.hg:
    Removed deprecated methods, discovered by removing undefs.
    * gtk/src/celllayout.hg: Added get_first_cell() as a replacement for
    TreeViewColumn::get_first_cell().
    * gdk/src/event.hg:
    * gdk/src/pixbuf.hg:
    * gdk/src/window.hg:
    * gtk/src/aboutdialog.hg:
    * gtk/src/action.hg:
    * gtk/src/button.hg:
    * gtk/src/calendar.hg:
    * gtk/src/cellrenderer.hg:
    * gtk/src/cellview.hg:
    * gtk/src/menuitem.hg:
    * gtk/src/menutoolbutton.hg:
    * gtk/src/notebook.[hg|ccg]: Removed more undefs and removed deprecated
    methods that it showed.
    * gtk/gtkmm.h: Don't mention the removed curve.h and inputdialog.h files.
    * demos/gtk-demo/example_treeview_treestore.cc:
    * demos/gtk-demo/example_treeview_editable_cells.cc: Adapted.

 ChangeLog                                         |   31 +++++++
 demos/gtk-demo/example_treeview_editable_cells.cc |    4 +-
 demos/gtk-demo/example_treeview_treestore.cc      |   12 ++--
 gdk/src/event.hg                                  |    4 -
 gdk/src/pixbuf.hg                                 |    3 -
 gdk/src/window.hg                                 |    3 -
 gtk/gtkmm.h                                       |    2 -
 gtk/gtkmm/border.h                                |   61 --------------
 gtk/src/aboutdialog.hg                            |    3 -
 gtk/src/action.hg                                 |    3 -
 gtk/src/button.hg                                 |   12 +---
 gtk/src/calendar.hg                               |    3 -
 gtk/src/celllayout.ccg                            |   18 ++++-
 gtk/src/celllayout.hg                             |   12 +++
 gtk/src/cellrenderer.hg                           |    3 -
 gtk/src/cellview.hg                               |    3 -
 gtk/src/curve.ccg                                 |   42 ----------
 gtk/src/curve.hg                                  |   87 ---------------------
 gtk/src/fixed.hg                                  |    8 +--
 gtk/src/inputdialog.ccg                           |   26 ------
 gtk/src/inputdialog.hg                            |   75 ------------------
 gtk/src/menuitem.hg                               |    3 -
 gtk/src/menutoolbutton.hg                         |    3 -
 gtk/src/notebook.ccg                              |   25 ------
 gtk/src/notebook.hg                               |   26 +------
 gtk/src/recentmanager.hg                          |    7 +-
 gtk/src/scalebutton.hg                            |   13 +---
 gtk/src/statusicon.hg                             |    3 -
 gtk/src/toolbar.hg                                |   13 ++--
 gtk/src/toolitem.hg                               |    3 -
 gtk/src/treeview.ccg                              |    2 +-
 gtk/src/treeview.hg                               |    7 +-
 gtk/src/treeviewcolumn.ccg                        |   15 ----
 gtk/src/treeviewcolumn.hg                         |   24 +-----
 gtk/src/widget.ccg                                |    1 -
 gtk/src/widget.hg                                 |   37 +--------
 36 files changed, 94 insertions(+), 503 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a9da231..3e18432 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2010-01-05  Murray Cumming  <murrayc murrayc com>
+
+	Remove more deprecated methods.
+
+	* gtk/src/filelist.am:
+	* gtk/src/curve.[hg|cc]:
+	* gtk/src/inputdialog.[hg|ccg]: Removed deprecated classes.
+	* gtk/gtkmm/border.h: Removed because this file is now generated.
+	* gtk/src/toolbar: Inherit (and implement) from CellLayout.
+	* gtk/src/button.hg, fixed.hg, recentmanager.hg, scalebutton.hg, 
+	toolbar.hg, treeview.hg, treeviewcolumn.hg, widget.hg:
+	Removed deprecated methods, discovered by removing undefs.
+	* gtk/src/celllayout.hg: Added get_first_cell() as a replacement for 
+	TreeViewColumng::get_first_cell().
+	* gdk/src/event.hg:
+	* gdk/src/pixbuf.hg:
+	* gdk/src/window.hg:
+	* gtk/src/aboutdialog.hg:
+	* gtk/src/action.hg:
+	* gtk/src/button.hg:
+	* gtk/src/calendar.hg:
+	* gtk/src/cellrenderer.hg:
+	* gtk/src/cellview.hg:
+	* gtk/src/menuitem.hg:
+	* gtk/src/menutoolbutton.hg:
+	* gtk/src/notebook.[hg|ccg]: Removed more undefs and removed deprecated 
+	methods that it showed.
+	* gtk/gtkmm.h: Don't mention the removed curve.h and inputdialog.h files.
+	* demos/gtk-demo/example_treeview_treestore.cc:
+	* demos/gtk-demo/example_treeview_editable_cells.cc: Adapted.
+
 2009-12-11  Krzesimir Nowak  <qdlacz gmail com>
 
 	* gtk/src/border.[hg|ccg]: Wrapped GtkBorder.
diff --git a/demos/gtk-demo/example_treeview_editable_cells.cc b/demos/gtk-demo/example_treeview_editable_cells.cc
index ad8e930..69fb951 100644
--- a/demos/gtk-demo/example_treeview_editable_cells.cc
+++ b/demos/gtk-demo/example_treeview_editable_cells.cc
@@ -247,7 +247,7 @@ void Example_TreeView_EditableCells::add_columns()
     Gtk::TreeView::Column* pViewColumn = Gtk::manage(new Gtk::TreeView::Column("Number", m_columns.number));
   
     //connect signal handlers for auto-storing of edited cell data
-    Gtk::CellRenderer* pCellRenderer = pViewColumn->get_first_cell_renderer();
+    Gtk::CellRenderer* pCellRenderer = pViewColumn->get_first_cell();
     Gtk::CellRendererText* pCellRenderText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
     if(pCellRenderText)
     {
@@ -269,7 +269,7 @@ void Example_TreeView_EditableCells::add_columns()
     Gtk::TreeView::Column* pViewColumn = Gtk::manage(new Gtk::TreeView::Column("Product", m_columns.product));
   
     //connect signal handlers for auto-storing of edited cell data
-    Gtk::CellRenderer* pCellRenderer = pViewColumn->get_first_cell_renderer();
+    Gtk::CellRenderer* pCellRenderer = pViewColumn->get_first_cell();
     Gtk::CellRendererText* pCellRenderText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
     if(pCellRenderText)
     {
diff --git a/demos/gtk-demo/example_treeview_treestore.cc b/demos/gtk-demo/example_treeview_treestore.cc
index 995753f..f4666fd 100644
--- a/demos/gtk-demo/example_treeview_treestore.cc
+++ b/demos/gtk-demo/example_treeview_treestore.cc
@@ -333,7 +333,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRenderer* pRenderer = pColumn->get_first_cell_renderer();
+      Gtk::CellRenderer* pRenderer = pColumn->get_first_cell();
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
@@ -350,7 +350,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell_renderer());
+      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell());
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
@@ -377,7 +377,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell_renderer());
+      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell());
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
@@ -402,7 +402,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell_renderer());
+      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell());
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
@@ -429,7 +429,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell_renderer());
+      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell());
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
@@ -454,7 +454,7 @@ void Example_TreeView_TreeStore::add_columns()
     Gtk::TreeViewColumn* pColumn = m_TreeView.get_column(cols_count-1);
     if(pColumn)
     {
-      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell_renderer());
+      Gtk::CellRendererToggle* pRenderer = static_cast<Gtk::CellRendererToggle*>(pColumn->get_first_cell());
       #ifdef GLIBMM_PROPERTIES_ENABLED  
       pRenderer->property_xalign().set_value(0.0);
       #else
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index 9c5fbfe..26faa12 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -15,10 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#m4 _POP()
-
 _DEFS(gdkmm,gdk)
 _CC_INCLUDE(gdk/gdk.h)
 
diff --git a/gdk/src/pixbuf.hg b/gdk/src/pixbuf.hg
index 69d8aca..67b7231 100644
--- a/gdk/src/pixbuf.hg
+++ b/gdk/src/pixbuf.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#m4 _POP()
 // This is for including the config header before any code (such as
 // the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gdkmmconfig.h)
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index 6549c12..be75ba7 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -15,9 +15,6 @@
  * Software Foundation Inc. 675 Mass Ave Cambridge MA 02139 USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gdkmmconfig.h)
 
 #include <gdkmm/drawable.h>
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 3fb65fb..44b1920 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -123,7 +123,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/comboboxentrytext.h>
 #include <gtkmm/comboboxtext.h>
 #include <gtkmm/container.h>
-#include <gtkmm/curve.h>
 #include <gtkmm/dialog.h>
 #include <gtkmm/drawingarea.h>
 #include <gtkmm/editable.h>
@@ -150,7 +149,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/image.h>
 #include <gtkmm/imagemenuitem.h>
 #include <gtkmm/infobar.h>
-#include <gtkmm/inputdialog.h>
 #include <gtkmm/item.h>
 #include <gtkmm/calendar.h>
 #include <gtkmm/invisible.h>
diff --git a/gtk/src/aboutdialog.hg b/gtk/src/aboutdialog.hg
index 8e487f5..a16329d 100644
--- a/gtk/src/aboutdialog.hg
+++ b/gtk/src/aboutdialog.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/dialog.h>
diff --git a/gtk/src/action.hg b/gtk/src/action.hg
index 67b1d3f..03ee812 100644
--- a/gtk/src/action.hg
+++ b/gtk/src/action.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/widget.h>
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 9a49464..73deafe 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -19,12 +19,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-// So we can still wrap the (deprecated) gtk_button_pressed(), gtk_button_clicked(), 
-// and gtk_button_enter functions.
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
-
 #include <gtkmm/bin.h>
 #include <gtkmm/activatable.h>
 #include <gtkmm/stockid.h>
@@ -81,11 +75,7 @@ public:
   explicit Button(const StockID& stock_id);
 
 
-  _WRAP_METHOD(void pressed(), gtk_button_pressed, deprecated)
-  _WRAP_METHOD(void released(),gtk_button_released, deprecated)
-  _WRAP_METHOD(void clicked(), gtk_button_clicked, deprecated)
-  _WRAP_METHOD(void enter(), gtk_button_enter, deprecated)
-  _WRAP_METHOD(void leave(), gtk_button_leave, deprecated)
+  _IGNORE(gtk_button_pressed, gtk_button_released, gtk_button_clicked, gtk_button_enter, gtk_button_leave) //deprecated
 
   _WRAP_METHOD(void set_relief(ReliefStyle newstyle), gtk_button_set_relief)
   _WRAP_METHOD(ReliefStyle get_relief() const, gtk_button_get_relief)
diff --git a/gtk/src/calendar.hg b/gtk/src/calendar.hg
index 0e9ffbe..bcf3369 100644
--- a/gtk/src/calendar.hg
+++ b/gtk/src/calendar.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/widget.h>
diff --git a/gtk/src/celllayout.ccg b/gtk/src/celllayout.ccg
index 5ea3f88..891798c 100644
--- a/gtk/src/celllayout.ccg
+++ b/gtk/src/celllayout.ccg
@@ -74,7 +74,23 @@ void CellLayout::set_cell_data_func(CellRenderer& cell, const SlotCellData& slot
       &SignalProxy_CellData_gtk_callback, slot_copy,
       &SignalProxy_CellData_gtk_callback_destroy);
 }
-  
+
+CellRenderer* CellLayout::get_first_cell()
+{
+  typedef std::vector<Gtk::CellRenderer*> type_vecCellRenderers;
+  type_vecCellRenderers vecCellRenderers = get_cells();
+  if(!vecCellRenderers.empty())
+    return vecCellRenderers[0];
+  else
+    return 0;
+}
+
+const CellRenderer* CellLayout::get_first_cell() const
+{
+  //Do some const_cast-ing to avoid repetition of code:
+  return const_cast<CellLayout*>(this)->get_first_cell();
+}
+
 
 } //namespace Gtk
 
diff --git a/gtk/src/celllayout.hg b/gtk/src/celllayout.hg
index d796c33..3fbfd64 100644
--- a/gtk/src/celllayout.hg
+++ b/gtk/src/celllayout.hg
@@ -57,6 +57,18 @@ public:
   _WRAP_METHOD(Glib::ListHandle<CellRenderer*> get_cells(), gtk_cell_layout_get_cells)
   _WRAP_METHOD(Glib::ListHandle<const CellRenderer*> get_cells() const, gtk_cell_layout_get_cells)
 
+  /** Gets the CellRenderer for the column.
+    * You should dynamic_cast<> to the expected derived CellRenderer type.
+    * This assumes that the CellLayout contains only one CellRenderer.
+    */
+  CellRenderer* get_first_cell();
+
+  /** Gets the CellRenderer for the column.
+    * You should dynamic_cast<> to the expected derived CellRenderer type.
+    * This assumes that the CellLayout contains only one CellRenderer.
+    */
+  const CellRenderer* get_first_cell() const;
+
   _WRAP_METHOD(void clear(), gtk_cell_layout_clear)
 
   _IGNORE(gtk_cell_layout_set_attributes) //I think this is just a convenience method, equivalent to clear() and multiple add_attribute()s. murrayc.
diff --git a/gtk/src/cellrenderer.hg b/gtk/src/cellrenderer.hg
index 79d6051..121db0f 100644
--- a/gtk/src/cellrenderer.hg
+++ b/gtk/src/cellrenderer.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/object.h>
diff --git a/gtk/src/cellview.hg b/gtk/src/cellview.hg
index ca2e226..92e99b9 100644
--- a/gtk/src/cellview.hg
+++ b/gtk/src/cellview.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/widget.h>
diff --git a/gtk/src/fixed.hg b/gtk/src/fixed.hg
index 93feaa6..a3d9c36 100644
--- a/gtk/src/fixed.hg
+++ b/gtk/src/fixed.hg
@@ -19,11 +19,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-// So we can still wrap the (deprecated) function.
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
-
 #include <gtkmm/container.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
@@ -53,8 +48,7 @@ public:
 
   _WRAP_METHOD(void put(Widget& widget, int x, int y), gtk_fixed_put)
   _WRAP_METHOD(void move(Widget& widget, int x, int y), gtk_fixed_move)
-  _WRAP_METHOD(void set_has_window(bool has_window = true), gtk_fixed_set_has_window, deprecated)
-  _WRAP_METHOD(bool get_has_window() const, gtk_fixed_get_has_window, deprecated)
+  _IGNORE(gtk_fixed_set_has_window, gtk_fixed_get_has_window) // deprecated
 };
 
 } /* namespace Gtk */
diff --git a/gtk/src/menuitem.hg b/gtk/src/menuitem.hg
index a53d44f..b7e3987 100644
--- a/gtk/src/menuitem.hg
+++ b/gtk/src/menuitem.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/item.h>
diff --git a/gtk/src/menutoolbutton.hg b/gtk/src/menutoolbutton.hg
index 5195b41..997ed52 100644
--- a/gtk/src/menutoolbutton.hg
+++ b/gtk/src/menutoolbutton.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/toolbutton.h>
diff --git a/gtk/src/notebook.ccg b/gtk/src/notebook.ccg
index 380188f..5b71a50 100644
--- a/gtk/src/notebook.ccg
+++ b/gtk/src/notebook.ccg
@@ -155,18 +155,6 @@ Glib::ustring Page::get_menu_label_text() const
   return parent_->get_menu_label_text(*get_child());
 }
 
-_DEPRECATE_IFDEF_START
-void Page::query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type)
-{
-  parent_->query_tab_label_packing(*get_child(), expand, fill, pack_type);
-}
-
-void Page::set_tab_label_packing(bool expand, bool fill, PackType pack_type)
-{
-  parent_->set_tab_label_packing(*get_child(), expand, fill, pack_type);
-}
-_DEPRECATE_IFDEF_END
-
 /*********************************************************************
 ***** List properties
 *********************************************************************/
@@ -432,19 +420,6 @@ void Notebook::remove_page(Widget& child)
     remove_page(pos);
 }
 
-_DEPRECATE_IFDEF_START
-void Notebook::query_tab_label_packing(Widget& child, bool& expand, bool& fill, PackType& pack_type)
-{
-  gboolean gexpand = false;
-  gboolean gfill = false;
-  GtkPackType gpack_type = GTK_PACK_START;
-  gtk_notebook_query_tab_label_packing(gobj(), child.gobj(), &gexpand, &gfill, &gpack_type);
-  expand = gexpand;
-  fill = gfill;
-  pack_type = (PackType)gpack_type;
-}
-_DEPRECATE_IFDEF_END
-
 int Notebook::prepend_page(Widget& child)
 {
   return gtk_notebook_prepend_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index 305c51a..5a42480 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #m4 _PUSH(SECTION_CC_PRE_INCLUDES)
@@ -134,16 +131,6 @@ public:
   void set_menu_label(Widget& menu_label);
   void set_menu_label_text(const Glib::ustring& menu_text);
   Glib::ustring get_menu_label_text() const;
-
-  _DEPRECATE_IFDEF_START
-  /** @deprecated Query the "tab-expand" and "tab-fill" child properties instead.
-   */
-  void query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type);
-
-  /** @deprecated Modify the "tab-expand" and "tab-fill" child properties instead.
-   */
-  void set_tab_label_packing(bool expand, bool fill, PackType pack_type);
-  _DEPRECATE_IFDEF_END
 };
 
 // Element is the input class
@@ -391,16 +378,7 @@ public:
   _WRAP_METHOD(void set_menu_label(Widget& child, Widget& menu_label), gtk_notebook_set_menu_label)
   _WRAP_METHOD(void set_menu_label_text(Widget& child, const Glib::ustring& menu_text), gtk_notebook_set_menu_label_text)
   _WRAP_METHOD(Glib::ustring get_menu_label_text(Widget& child) const, gtk_notebook_get_menu_label_text)
-
-  _DEPRECATE_IFDEF_START
-  /** @deprecated Modify the "tab-expand" and "tab-fill" child properties instead.
-   */
-  void query_tab_label_packing(Widget& child, bool& expand, bool& fill, PackType& pack_type);
-  _IGNORE(gtk_notebook_query_tab_label_packing)
-  _DEPRECATE_IFDEF_END
-
-  _WRAP_METHOD(void set_tab_label_packing(Widget& child, bool expand, bool fill, PackType pack_type), gtk_notebook_set_tab_label_packing, deprecated)
-
+  _IGNORE(gtk_notebook_query_tab_label_packing, gtk_notebook_set_tab_label_packing) //deprecated
   _WRAP_METHOD(void reorder_child(Widget& child, int position), gtk_notebook_reorder_child)
 
   _WRAP_METHOD(bool get_tab_reorderable(Widget& child) const, gtk_notebook_get_tab_reorderable)
@@ -442,6 +420,8 @@ public:
   _WRAP_PROPERTY("enable-popup", bool)
   _WRAP_PROPERTY("homogeneous", bool)
 
+  //TODO: Wrap the child properties, such as tab-fill and tab-expand.
+
 protected:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
   mutable PageList pages_proxy_;
diff --git a/gtk/src/recentmanager.hg b/gtk/src/recentmanager.hg
index f9e5399..6101636 100644
--- a/gtk/src/recentmanager.hg
+++ b/gtk/src/recentmanager.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gdkmm/screen.h>
@@ -74,7 +71,7 @@ public:
   _WRAP_CREATE()
 
   _WRAP_METHOD(static Glib::RefPtr<RecentManager> get_default(), gtk_recent_manager_get_default, refreturn)
-  _IGNORE(gtk_recent_manager_get_for_screen, refreturn, deprecated)
+  _IGNORE(gtk_recent_manager_get_for_screen) //deprecated
 
   /** Meta-data passed to add_item().  You should
    * use RecentManager::Data if you want to control the meta-data associated
@@ -105,7 +102,7 @@ public:
     bool is_private;
   };
 
-  _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), gtk_recent_manager_set_screen, deprecated)
+  _IGNORE(gtk_recent_manager_set_screen) //deprecated
 
   /** Adds a new resource into the recently used resources list. This function
    * will try and guess some of the meta-data associated to a URI. If you
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 903e78b..afb0a9d 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/button.h>
@@ -53,16 +50,12 @@ public:
   _WRAP_METHOD(double get_value() const, gtk_scale_button_get_value)
   _WRAP_METHOD(void set_value(double value), gtk_scale_button_set_value)
 
-  _WRAP_METHOD(Gtk::Adjustment*	get_adjustment(), gtk_scale_button_get_adjustment, deprecated)
-
-  //The return type should bge const. This has been fixed in the gtkmm-3maybe branch.
-  _WRAP_METHOD(Gtk::Adjustment*	get_adjustment() const, gtk_scale_button_get_adjustment, constversion, deprecated)
+  _WRAP_METHOD(Gtk::Adjustment*	get_adjustment(), gtk_scale_button_get_adjustment)
+  _WRAP_METHOD(const Gtk::Adjustment* get_adjustment() const, gtk_scale_button_get_adjustment, constversion)
 
   _WRAP_METHOD(void set_adjustment(Gtk::Adjustment& adjustment), gtk_scale_button_set_adjustment)
 
-  // TODO: Should be deprecated, but we have no replacement yet.
-  _WRAP_METHOD(Orientation get_orientation(), gtk_scale_button_get_orientation)
-  _WRAP_METHOD(void set_orientation(Orientation orientation), gtk_scale_button_set_orientation)
+  _IGNORE(gtk_scale_button_get_orientation, gtk_scale_button_set_orientation) //deprecated
 
   _WRAP_METHOD(Widget* get_plus_button(), gtk_scale_button_get_plus_button)
   _WRAP_METHOD(const Widget* get_plus_button() const, gtk_scale_button_get_plus_button, constversion)
diff --git a/gtk/src/statusicon.hg b/gtk/src/statusicon.hg
index 42862d5..78ba1c8 100644
--- a/gtk/src/statusicon.hg
+++ b/gtk/src/statusicon.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/toolbar.hg b/gtk/src/toolbar.hg
index 61c5114..3fae5ed 100644
--- a/gtk/src/toolbar.hg
+++ b/gtk/src/toolbar.hg
@@ -15,13 +15,11 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 // This is for including the config header before any code (such as
 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gtkmmconfig.h)
 
+#include <gtkmm/toolshell.h>
 #include <gtkmm/toolitem.h>
 #include <gtkmm/toolbutton.h>
 #include <gtkmm/toggletoolbutton.h>
@@ -41,9 +39,12 @@ namespace Gtk
  * @ingroup Containers
  * @ingroup Toolbars
  */
-class Toolbar : public Container
+class Toolbar
+ : public Container,
+   public ToolShell
 {
   _CLASS_GTKOBJECT(Toolbar,GtkToolbar,GTK_TOOLBAR,Gtk::Container,GtkContainer)
+  _IMPLEMENTS_INTERFACE(ToolShell)
 public:
   _CTOR_DEFAULT()
 
@@ -68,9 +69,7 @@ public:
 
 /* Style methods */
 
-  // TODO: Remove these when we derive from ToolShell, which has the same methods:
-  _WRAP_METHOD(void set_orientation(Orientation orientation), gtk_toolbar_set_orientation)
-  _WRAP_METHOD(Orientation get_orientation() const, gtk_toolbar_get_orientation)
+  _IGNORE(gtk_toolbar_set_orientation, gtk_toolbar_get_orientation) //deprecated
 
   _WRAP_METHOD(void set_toolbar_style(ToolbarStyle style), gtk_toolbar_set_style)
   _WRAP_METHOD(ToolbarStyle get_toolbar_style() const, gtk_toolbar_get_style)
diff --git a/gtk/src/toolitem.hg b/gtk/src/toolitem.hg
index e884b99..65ae538 100644
--- a/gtk/src/toolitem.hg
+++ b/gtk/src/toolitem.hg
@@ -16,9 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 // This is for including the config header before any code (such as
 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gtkmmconfig.h)
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index 97910cf..9ea5016 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -332,7 +332,7 @@ CellRenderer* TreeView::get_column_cell_renderer(int n)
 {
   TreeViewColumn* pColumn = get_column(n);
   if(pColumn)
-    return pColumn->get_first_cell_renderer();
+    return pColumn->get_first_cell();
   else
     return 0;
 }
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 533c499..0a68813 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 // This is for including the config header before any code (such as
 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gtkmmconfig.h)
@@ -917,7 +914,7 @@ int TreeView::append_column_editable(const Glib::ustring& title, const TreeModel
   TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
 
   //connect signal handlers for auto-storing of edited cell data
-  CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
+  CellRenderer* pCellRender = pViewColumn->get_first_cell();
   TreeView_Private::_connect_auto_store_editable_signal_handler<ColumnType>(this, pCellRender, model_column);
 
   return append_column(*pViewColumn);
@@ -941,7 +938,7 @@ int TreeView::insert_column_editable(const Glib::ustring& title, const TreeModel
   TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
 
    //connect signal handlers for auto-storing of edited cell data
-  CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
+  CellRenderer* pCellRender = pViewColumn->get_first_cell();
   TreeView_Private::_connect_auto_store_editable_signal_handler(this, pCellRender, model_column);
 
   return insert_column(*pViewColumn, position);
diff --git a/gtk/src/treeviewcolumn.ccg b/gtk/src/treeviewcolumn.ccg
index 7e6dcb7..cb3e7b9 100644
--- a/gtk/src/treeviewcolumn.ccg
+++ b/gtk/src/treeviewcolumn.ccg
@@ -88,21 +88,6 @@ void TreeViewColumn::unset_cell_data_func(CellRenderer& cell_renderer)
   gtk_tree_view_column_set_cell_data_func(gobj(), cell_renderer.gobj(), 0, 0, 0);
 }
 
-CellRenderer* TreeViewColumn::get_first_cell_renderer()
-{
-  typedef std::vector<Gtk::CellRenderer*> type_vecCellRenderers;
-  type_vecCellRenderers vecCellRenderers = get_cell_renderers();
-  if(!vecCellRenderers.empty())
-    return vecCellRenderers[0];
-  else
-    return 0;
-}
-
-const CellRenderer* TreeViewColumn::get_first_cell_renderer() const
-{
-  //Do some const_cast-ing to avoid repetition of code:
-  return const_cast<TreeViewColumn*>(this)->get_first_cell_renderer();
-}
 
 } // namespace Gtk
 
diff --git a/gtk/src/treeviewcolumn.hg b/gtk/src/treeviewcolumn.hg
index af138fa..94ae31d 100644
--- a/gtk/src/treeviewcolumn.hg
+++ b/gtk/src/treeviewcolumn.hg
@@ -15,9 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
 // This is for including the config header before any code (such as
 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gtkmmconfig.h)
@@ -78,7 +75,7 @@ public:
    * the cell is allocated no more space than it needs. Any unused space is divided
    * evenly between cells for which @a expand is <tt>true</tt>.
    *
-   * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
+   * You can use get_first_cell() or get_cells() to access the generated CellRenderer.
    *
    * @param column The model column that will be rendered by the view cell.
    * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
@@ -91,7 +88,7 @@ public:
    * the cell is allocated no more space than it needs. Any unused space is divided
    * evenly between cells for which @a expand is <tt>true</tt>.
    *
-   * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
+   * You can use get_first_cell() or get_cells() to access the generated CellRenderer.
    *
    * @param column The model column that will be rendered by the view cell.
    * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
@@ -101,22 +98,7 @@ public:
 
   _WRAP_METHOD(void clear(), gtk_tree_view_column_clear)
 
-  /** Gets the CellRenderer for the column.
-    * You should dynamic_cast<> to the expected derived CellRenderer type.
-    * This assumes that the TreeViewColumn contains only one CellRenderer.
-    */
-  CellRenderer* get_first_cell_renderer();
-
-  /** Gets the CellRenderer for the column.
-    * You should dynamic_cast<> to the expected derived CellRenderer type.
-    * This assumes that the TreeViewColumn contains only one CellRenderer.
-    */
-  const CellRenderer* get_first_cell_renderer() const;
-
-  // TODO: Should be deprecated, but we cannot derive from CellLayout
-  // without breaking API and ABI.
-  _WRAP_METHOD(Glib::ListHandle<CellRenderer*> get_cell_renderers(), gtk_tree_view_column_get_cell_renderers)
-  _WRAP_METHOD(Glib::ListHandle<const CellRenderer*> get_cell_renderers() const, gtk_tree_view_column_get_cell_renderers)
+  _IGNORE(gtk_tree_view_column_get_cell_renderers, gtk_tree_view_column_get_cell_renderers) //deprecated
 
   _WRAP_METHOD(void add_attribute(CellRenderer& cell_renderer, const Glib::ustring& attribute, int column),
                gtk_tree_view_column_add_attribute)
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 133f037..01202c6 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -345,7 +345,6 @@ bool Widget::parent_sensitive() const
   return parent->get_sensitive();
 }
 
-
 WidgetFlags Widget::get_flags() const
   { return static_cast<WidgetFlags>(GTK_WIDGET_FLAGS(gobj())); }
 
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 7dc596c..5ca3df0 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -15,16 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#m4 _POP()
-
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-//Allow us to set the struct fields.
-//TODO: Remove these functions anyway in an ABI break.
-#undef GSEAL_ENABLE
-#m4 _POP()
-
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 
@@ -45,12 +35,10 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <gdkmm/screen.h>
 #include <gtkmm/enums.h>
 #include <gdkmm/display.h>
-//#include <gtkmm/style.h>
 #include <gtkmm/targetlist.h>
 #include <gtkmm/rc.h>
 #include <gtkmm/object.h>
 #include <gtkmm/clipboard.h>
-//#include <gtkmm/action.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/object_p.h)
@@ -645,13 +633,7 @@ _DEPRECATE_IFDEF_START
    */
   bool rc_style() const;
 
-  _DEPRECATE_IFDEF_START
-  /** Returns trye if the widget is a composite child of its parent.
-   * @deprecated Use the "composite-child" property instead.
-   */
-  bool is_composite_child() const;
-
-  /**  @deprecated: Use the proper method to test individual states, suchas 
+  /**  @deprecated: Use the proper method to test individual states, such as 
    * get_app_paintable(), get_can_default(),
    * get_can_focus(), get_double_buffered(),
    * has_default(), is_drawable(),
@@ -681,9 +663,9 @@ _DEPRECATE_IFDEF_START
 
   _WRAP_METHOD(bool is_composited() const, gtk_widget_is_composited)
 
-  //TODO: Deprecate this when the other widgets can derive from Gtk::Activatable.
-  _WRAP_METHOD(Glib::RefPtr<Action> get_action(), gtk_widget_get_action, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Action> get_action() const, gtk_widget_get_action, refreturn, constversion)
+  _IGNORE(gtk_widget_get_action) //deprecated
+  _WRAP_METHOD(Glib::RefPtr<Action> get_related_action(), gtk_widget_get_related_action, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Action> get_related_action() const, gtk_widget_get_related_action, refreturn, constversion)
 
   //TODO: Move this to protected when we can break API:
   /**  Retrieves the widget's requisition.
@@ -965,17 +947,6 @@ dnl
    */
   _WRAP_SIGNAL(void drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time), "drag_data_received")
 
-<<<<<<< HEAD
-  //Note that the deprecated keyword has no effect on _WRAP_SIGNAL() yet.
-  //It doesn't seem like a good idea to put virtual functions in #ifdefs, because that would change the size of the class instances.
-  /** @deprecated This should never have been in the API. It was never meaningful.
-   */
-  _WRAP_SIGNAL(Glib::RefPtr<Atk::Object> get_accessible(), "get_accessible", ifdef GTKMM_ATKMM_ENABLED, refreturn, deprecated)
-
-=======
-  //_WRAP_SIGNAL(Glib::RefPtr<Atk::Object> get_accessible(), "get_accessible", ifdef GTKMM_ATKMM_ENABLED, refreturn, deprecated)
-  
->>>>>>> Removed most deprecated methods.
   _WRAP_SIGNAL(void screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen), "screen_changed")
 
   _WRAP_SIGNAL(void composited_changed(), "composited_changed", no_default_handler)



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