[gtkmm-documentation] Replace deprecated GTK+ symbols in example code



commit fcdccc439cabcfe0e9b6875055971d4171767a62
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Thu Sep 17 00:22:36 2009 +0200

    Replace deprecated GTK+ symbols in example code
    
    * examples/book/box/main.cc (main): Do not use gtk_exit().
    * examples/book/custom/custom_container/mycontainer.{cc,h}:
    Substitute GType for GtkType.

 ChangeLog                                          |    8 ++++++++
 examples/book/box/main.cc                          |    3 +--
 .../book/custom/custom_container/mycontainer.cc    |    5 ++---
 .../book/custom/custom_container/mycontainer.h     |    2 +-
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9f69563..e98ac6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-09-16  Daniel Elstner  <daniel kitta gmail com>
 
+	Replace deprecated GTK+ symbols in example code
+
+	* examples/book/box/main.cc (main): Do not use gtk_exit().
+	* examples/book/custom/custom_container/mycontainer.{cc,h}:
+	Substitute GType for GtkType.
+
+2009-09-16  Daniel Elstner  <daniel kitta gmail com>
+
 	Do not use broken doc-dist-hook rule (bgo #574530)
 
 	* docs/tutorial/Makefile.am (dist_noinst_DATA): List files formerly
diff --git a/examples/book/box/main.cc b/examples/book/box/main.cc
index f242b74..0aed61a 100644
--- a/examples/book/box/main.cc
+++ b/examples/book/box/main.cc
@@ -30,8 +30,7 @@ int main(int argc, char *argv[])
   if(argc != 2)
   {
     std::cerr << "usage: packbox num, where num is 1, 2, or 3." << std::endl;
-    // this just does cleanup in GTK, and exits with an exit status of 1.
-    gtk_exit (1);
+    return 1;
   }
 
   ExampleWindow window( atoi(argv[1]) );
diff --git a/examples/book/custom/custom_container/mycontainer.cc b/examples/book/custom/custom_container/mycontainer.cc
index 6e6caab..cc5510d 100644
--- a/examples/book/custom/custom_container/mycontainer.cc
+++ b/examples/book/custom/custom_container/mycontainer.cc
@@ -112,8 +112,7 @@ void MyContainer::on_size_allocate(Gtk::Allocation& allocation)
     m_child_two->size_allocate(child_allocation_two);
 }
 
-void MyContainer::forall_vfunc(gboolean /* include_internals */,
-        GtkCallback callback, gpointer callback_data)
+void MyContainer::forall_vfunc(gboolean, GtkCallback callback, gpointer callback_data)
 {
   if(m_child_one)
     callback(m_child_one->gobj(), callback_data);
@@ -165,7 +164,7 @@ void MyContainer::on_remove(Gtk::Widget* child)
   }
 }
 
-GtkType MyContainer::child_type_vfunc() const
+GType MyContainer::child_type_vfunc() const
 {
   //If there is still space for one widget, then report the type of widget that
   //may be added.
diff --git a/examples/book/custom/custom_container/mycontainer.h b/examples/book/custom/custom_container/mycontainer.h
index 2c7e584..fe5f0af 100644
--- a/examples/book/custom/custom_container/mycontainer.h
+++ b/examples/book/custom/custom_container/mycontainer.h
@@ -39,7 +39,7 @@ protected:
 
   virtual void on_add(Gtk::Widget* child);
   virtual void on_remove(Gtk::Widget* child);
-  virtual GtkType child_type_vfunc() const;
+  virtual GType child_type_vfunc() const;
 
   Gtk::Widget* m_child_one;
   Gtk::Widget* m_child_two;



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