[gtkmm] Gtk::Stack: Don't hide Container::add()



commit fff186e79ad6d8be7a4528c526369bd17ab45006
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Jul 13 15:38:34 2014 +0200

    Gtk::Stack: Don't hide Container::add()
    
    * gtk/src/stack.[ccg|hg]: Don't let Stack::add() hide Container::add().
    Let them all be overloaded add() functions in Stack. Bug #724732.

 gtk/src/stack.ccg |    5 +++++
 gtk/src/stack.hg  |   12 ++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/src/stack.ccg b/gtk/src/stack.ccg
index acb379f..89373fb 100644
--- a/gtk/src/stack.ccg
+++ b/gtk/src/stack.ccg
@@ -21,4 +21,9 @@
 namespace Gtk
 {
 
+void Stack::add(Widget& child)
+{
+  Container::add(child);
+}
+
 } //namespace Gtk
diff --git a/gtk/src/stack.hg b/gtk/src/stack.hg
index ad26925..8d0e195 100644
--- a/gtk/src/stack.hg
+++ b/gtk/src/stack.hg
@@ -46,6 +46,18 @@ public:
 
   _WRAP_METHOD(void add(Widget& child, const Glib::ustring& name, const Glib::ustring& title), 
gtk_stack_add_titled)
 
+  //TODO: Remove this method overload when we can break ABI and API, and Container::add()
+  //has been made non-virtual. It's not very useful in Stack. It's needed only to
+  //avoid a compilation error when compiling with -Woverloaded-virtual -Werror.
+  //See https://bugzilla.gnome.org/show_bug.cgi?id=724732
+  /** Adds a child.
+   *
+   * @newin{3,14}
+   *
+   * @deprecated Use one of the other add() methods instead. This method was added only to avoid a 
compilation error.
+   */
+  void add(Widget& child);
+
   _WRAP_METHOD(void set_visible_child(Widget& child), gtk_stack_set_visible_child)
 
   _WRAP_METHOD(Widget* get_visible_child(), gtk_stack_get_visible_child)


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