[gtkmm] Gtk::ScrolledWindow: Do not use a deprecated function.



commit b919f1e7c7297b40027132d5387054b04f6723bb
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Feb 21 13:33:00 2013 +0100

    Gtk::ScrolledWindow: Do not use a deprecated function.
    
        * gtk/src/iconinfo.[hg|ccg]: We no longer need to call
        gtk_scrolled_window_add_with_viewport() because
        its gtk_container_add() vfunc implementation now does the
        same thing for us.
        See https://bugzilla.gnome.org/show_bug.cgi?id=693015
    
        This partly fixes the build with --enable-warnings=fatal

 ChangeLog                  |   12 ++++++++++++
 gtk/src/scrolledwindow.ccg |   16 ++++------------
 2 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 832ae7e..2c2c2be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2013-02-21  Murray Cumming  <murrayc murrayc com>
 
+       Gtk::ScrolledWindow: Do not use a deprecated function.
+
+       * gtk/src/iconinfo.[hg|ccg]: We no longer need to call
+       gtk_scrolled_window_add_with_viewport() because
+       its gtk_container_add() vfunc implementation now does the
+       same thing for us.
+       See https://bugzilla.gnome.org/show_bug.cgi?id=693015
+
+       This partly fixes the build with --enable-warnings=fatal
+
+2013-02-21  Murray Cumming  <murrayc murrayc com>
+
        Gtk::IconInfo: Do not use deprecated copy/free functions.
 
        * gtk/src/iconinfo.[hg|ccg]: Replace use of deprecated
diff --git a/gtk/src/scrolledwindow.ccg b/gtk/src/scrolledwindow.ccg
index 24be794..7c1a696 100644
--- a/gtk/src/scrolledwindow.ccg
+++ b/gtk/src/scrolledwindow.ccg
@@ -27,18 +27,10 @@ namespace Gtk
 
 void ScrolledWindow::add(Gtk::Widget& widget)
 {
-  GtkWidget* gwidget = widget.gobj();
-
-  if( GTK_IS_SCROLLABLE(gwidget) )
-  {
-    //It can work directly with a GtkScrolledWindow, so just use the Container::add():
-    Bin::add(widget);
-  }
-  else
-  {
-    //It doesn't have native scrolling capability, so it should be put inside a viewport first:
-    gtk_scrolled_window_add_with_viewport(gobj(), gwidget);
-  }
+  //TODO: Remove this method overload completely when we can break ABI.
+  //We used to do what GTK+ now does for us:
+  //See https://bugzilla.gnome.org/show_bug.cgi?id=693015
+  Bin::add(widget);
 }
 
 void ScrolledWindow::remove_with_viewport()


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