[gtkmm] Deprecate some methods that wrap deprecated C functions.



commit f9642224ca13c343b34a7d4907c06d3eedb96781
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jan 5 11:57:55 2010 +0100

    Deprecate some methods that wrap deprecated C functions.
    
    * gtk/src/button.hg:
    * gtk/src/notebook.[hg|ccg]:
    * gtk/src/recentmanager.hg:
    * gtk/src/scalebutton.hg:
    * gtk/src/widget.[hg|ccg]: Deprecate some more methods, noticed in the
    gtkmm-3maybe branch, where there are no undefs.

 ChangeLog                |   11 +++++++++++
 gtk/src/button.hg        |    4 ++--
 gtk/src/notebook.ccg     |    4 ++++
 gtk/src/notebook.hg      |   17 ++++++++++++++++-
 gtk/src/recentmanager.hg |    2 +-
 gtk/src/scalebutton.hg   |    8 ++++----
 gtk/src/widget.ccg       |    2 ++
 gtk/src/widget.hg        |   16 +++++++++++++---
 8 files changed, 53 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ac6ce68..6f393ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-05  Murray Cumming  <murrayc murrayc com>
+
+	Deprecate some methods that wrap deprecated C functions.
+
+	* gtk/src/button.hg:
+	* gtk/src/notebook.[hg|ccg]:
+	* gtk/src/recentmanager.hg:
+	* gtk/src/scalebutton.hg:
+	* gtk/src/widget.[hg|ccg]: Deprecate some more methods, noticed in the 
+	gtkmm-3maybe branch, where there are no undefs.
+
 2.19.2:
 
 2010-01-04  Murray Cumming  <murrayc murrayc com>
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 30f73d4..3958b6e 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -82,8 +82,8 @@ public:
   _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)
-  _WRAP_METHOD(void leave(), gtk_button_leave)
+  _WRAP_METHOD(void enter(), gtk_button_enter, deprecated)
+  _WRAP_METHOD(void leave(), 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/notebook.ccg b/gtk/src/notebook.ccg
index 59a8846..380188f 100644
--- a/gtk/src/notebook.ccg
+++ b/gtk/src/notebook.ccg
@@ -155,6 +155,7 @@ 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);
@@ -164,6 +165,7 @@ 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
@@ -430,6 +432,7 @@ 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;
@@ -440,6 +443,7 @@ void Notebook::query_tab_label_packing(Widget& child, bool& expand, bool& fill,
   fill = gfill;
   pack_type = (PackType)gpack_type;
 }
+_DEPRECATE_IFDEF_END
 
 int Notebook::prepend_page(Widget& child)
 {
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index d9109a2..eed6824 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -128,8 +128,16 @@ 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
@@ -380,9 +388,16 @@ 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)
-  _WRAP_METHOD(void set_tab_label_packing(Widget& child, bool expand, bool fill, PackType pack_type), gtk_notebook_set_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)
+
   _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)
diff --git a/gtk/src/recentmanager.hg b/gtk/src/recentmanager.hg
index e705b1e..77122cc 100644
--- a/gtk/src/recentmanager.hg
+++ b/gtk/src/recentmanager.hg
@@ -105,7 +105,7 @@ public:
     bool is_private;
   };
 
-  _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), gtk_recent_manager_set_screen)
+  _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), 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 c191037..29d1de9 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -52,10 +52,10 @@ public:
   _WRAP_METHOD(double get_value() const, gtk_scale_button_get_value)
   _WRAP_METHOD(void set_value(double value), gtk_scale_button_set_value)
 
-  // TODO: The overload makes no sense, as the same type is returned
-  // by both methods.  Also, the refreturn looks fishy to me.
-  _WRAP_METHOD(Gtk::Adjustment*	get_adjustment(), gtk_scale_button_get_adjustment, refreturn)
-  _WRAP_METHOD(Gtk::Adjustment*	get_adjustment() const, gtk_scale_button_get_adjustment, constversion)
+  _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(void set_adjustment(Gtk::Adjustment& adjustment), gtk_scale_button_set_adjustment)
 
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 54ab381..9e41043 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -336,8 +336,10 @@ bool Widget::parent_sensitive() const
 bool Widget::rc_style() const
   { return GTK_WIDGET_RC_STYLE(gobj()); }
 
+_DEPRECATE_IFDEF_START
 bool Widget::is_composite_child() const
   { return GTK_WIDGET_COMPOSITE_CHILD(gobj()); }
+_DEPRECATE_IFDEF_END
 
 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 bbba782..d448e4b 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -628,7 +628,13 @@ _DEPRECATE_IFDEF_END
   bool parent_sensitive() const;
 
   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;
+  _DEPRECATE_IFDEF_END
 
   WidgetFlags get_flags() const;
   void set_flags(WidgetFlags flags);
@@ -639,9 +645,12 @@ _DEPRECATE_IFDEF_END
 
   _WRAP_METHOD(bool is_composited() const, gtk_widget_is_composited)
 
-  // TODO: Deprecated, but we cannot replace them without breaking API and ABI.
-  _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)
+  _WRAP_METHOD(Glib::RefPtr<Action> get_action(), gtk_widget_get_action, refreturn, deprecated)
+  _WRAP_METHOD(Glib::RefPtr<const Action> get_action() const, gtk_widget_get_action, refreturn, constversion, 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)
+
 
   _MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8)
   _MEMBER_GET(requisition, requisition, Requisition, GtkRequisition)
@@ -958,6 +967,7 @@ dnl
   _WRAP_PROPERTY("tooltip_markup", Glib::ustring)
   _WRAP_PROPERTY("tooltip_text", Glib::ustring)
   _WRAP_PROPERTY("window", Glib::RefPtr<Gdk::Window>)
+  _WRAP_PROPERTY("no-show-all", bool)
 
 protected:
   //comment in GTK+ header: "seldomly overidden"



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