[gtkmm/gtkmm-2-24] Deprecate some API which wraps deprecated GTK+ API.



commit 6c454197cc17b2c7b80cfe5a863f0c6b372a94d3
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Jan 14 14:22:59 2011 +0100

    Deprecate some API which wraps deprecated GTK+ API.
    
    * gtk/src/range.hg: Deprecate get/set_update_policy() with no replacement.
    * gtk/src/treeview.hg: append*(): Use only non-deprecated API in the
    template implementation.
    * gtk/src/treeviewcolumn.hg: Documentation: Do not suggest use of deprecated
      API.
    * gtk/src/window.hg: Deprecate get/set_has_frame() and
      get/set_frame_dimensions() with no replacements.

 ChangeLog                 |   12 ++++++++++++
 gtk/src/range.hg          |    9 +++++++--
 gtk/src/treeview.hg       |    4 ++--
 gtk/src/treeviewcolumn.hg |    6 +++---
 gtk/src/window.hg         |   13 +++++++++----
 5 files changed, 33 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 61f6907..0a90821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-01-14  Murray Cumming  <murrayc murrayc com>
 
+	Deprecate some API which wraps deprecated GTK+ API.
+
+	* gtk/src/range.hg: Deprecate get/set_update_policy() with no replacement.
+	* gtk/src/treeview.hg: append*(): Use only non-deprecated API in the 
+	template implementation.
+	* gtk/src/treeviewcolumn.hg: Documentation: Do not suggest use of deprecated 
+  API.
+	* gtk/src/window.hg: Deprecate get/set_has_frame() and 
+  get/set_frame_dimensions() with no replacements.
+
+2011-01-14  Murray Cumming  <murrayc murrayc com>
+
 	Regenerated the XML files containing the C API documentation.
 
 	* gdk/src/gdk_docs.xml:
diff --git a/gtk/src/range.hg b/gtk/src/range.hg
index df4b2b8..2d38a1f 100644
--- a/gtk/src/range.hg
+++ b/gtk/src/range.hg
@@ -23,6 +23,10 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/widget_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow use of deprecated API, to avoid the need to break our own ABI:
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
 
 namespace Gtk
 {
@@ -41,8 +45,9 @@ protected:
 public:
   
 
-  _WRAP_METHOD(void set_update_policy(UpdateType policy), gtk_range_set_update_policy)
-  _WRAP_METHOD(UpdateType get_update_policy() const, gtk_range_get_update_policy)
+  _WRAP_METHOD(void set_update_policy(UpdateType policy), gtk_range_set_update_policy, deprecated)
+  _WRAP_METHOD(UpdateType get_update_policy() const, gtk_range_get_update_policy, deprecated)
+
   _WRAP_METHOD(void set_adjustment(Gtk::Adjustment& adjustment), gtk_range_set_adjustment)
   void unset_adjustment();
 
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 367ead6..b723288 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -929,7 +929,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);
@@ -953,7 +953,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.hg b/gtk/src/treeviewcolumn.hg
index acd3515..890bb7e 100644
--- a/gtk/src/treeviewcolumn.hg
+++ b/gtk/src/treeviewcolumn.hg
@@ -76,7 +76,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_cell_renderers() 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.
@@ -89,7 +89,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_cell_renderers() 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.
@@ -99,7 +99,7 @@ public:
 
   _WRAP_METHOD(void clear(), gtk_tree_view_column_clear)
 
-  //We replaced get_first_cell_renderer() with get_first_cell() because that
+  //We replaced get_first_cell() with get_first_cell() because that
   //is the name of the method in CellLayout, which this class derives from in gtkmm-3.0.
   //That allows more code to be ported before actually using gtkmm-3.0.
 
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 92c9b63..7bf6930 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -32,6 +32,11 @@ _PINCLUDE(gtkmm/private/bin_p.h)
 #undef GSEAL_ENABLE
 #m4 _POP()
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Allow use of deprecated API, to avoid the need to break our own ABI:
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 namespace Gtk
 {
 
@@ -235,17 +240,17 @@ dnl
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Screen> get_screen() const, gtk_window_get_screen, refreturn, constversion)
 
 
-  _WRAP_METHOD(void set_has_frame(bool setting = true), gtk_window_set_has_frame)
+  _WRAP_METHOD(void set_has_frame(bool setting = true), gtk_window_set_has_frame, deprecated)
 
-  _WRAP_METHOD(bool get_has_frame() const, gtk_window_get_has_frame)
+  _WRAP_METHOD(bool get_has_frame() const, gtk_window_get_has_frame, deprecated)
 
   _WRAP_METHOD(void set_frame_dimensions(int left,  int top,
                                          int right, int bottom),
-               gtk_window_set_frame_dimensions)
+               gtk_window_set_frame_dimensions, deprecated)
 
   _WRAP_METHOD(void get_frame_dimensions(int& left,  int& top,
                                          int& right, int& bottom) const,
-               gtk_window_get_frame_dimensions)
+               gtk_window_get_frame_dimensions, deprecated)
 
   _WRAP_METHOD(void set_decorated(bool setting = true), gtk_window_set_decorated)
   _WRAP_METHOD(bool get_decorated() const, gtk_window_get_decorated)



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