[gtkmm-documentation] Do not use deprecated API.



commit 90fb25d18c116051ba613b4be2a9550a2fb0abbb
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Dec 30 09:11:24 2009 +0100

    Do not use deprecated API.
    
    * configure.ac: Add *MM to the list of MM_ARG_ENABLE_WARNINGS()
      deprecation defines.
    * examples/book/combo/: Remove this because it is about deprecated API.
    * examples/book/custom/custom_container/mycontainer.cc:
    * examples/book/statusicon/main.cc:
    * examples/book/toolpalette/canvas.cc:
    * examples/others/calendar/calendar.cc:
    Correct use of deprecated API.
    Bug #601929 (Deng Xiyue)

 ChangeLog                                          |   14 ++++
 configure.ac                                       |    2 +-
 examples/Makefile.am                               |    6 --
 examples/book/combo/examplewindow.cc               |   76 --------------------
 examples/book/combo/examplewindow.h                |   39 ----------
 examples/book/combo/main.cc                        |   31 --------
 .../book/custom/custom_container/mycontainer.cc    |   10 ++--
 examples/book/statusicon/main.cc                   |    2 +-
 examples/book/toolpalette/canvas.cc                |    4 +-
 examples/others/calendar/calendar.cc               |    2 +-
 10 files changed, 24 insertions(+), 162 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d5b3417..27dfb4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-30  Murray Cumming  <murrayc murrayc com>
+
+	Do not use deprecated API.
+
+	* configure.ac: Add *MM to the list of MM_ARG_ENABLE_WARNINGS() 
+	deprecation defines.
+	* examples/book/combo/: Remove this because it is about deprecated API.
+	* examples/book/custom/custom_container/mycontainer.cc:
+	* examples/book/statusicon/main.cc:
+	* examples/book/toolpalette/canvas.cc:
+	* examples/others/calendar/calendar.cc:
+	Correct use of deprecated API.
+	Bug #601929 (Deng Xiyue)
+
 2009-12-28  Murray Cumming  <murrayc murrayc com>
 
 	ToolPalette example: Correction.
diff --git a/configure.ac b/configure.ac
index eb3112d..9e68b4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_CHECK_FUNCS([mkfifo])
 MM_ARG_ENABLE_WARNINGS([EXAMPLES_WXXFLAGS],
                        [-Wall],
                        [-pedantic -Wall -Wextra],
-                       [G PANGO ATK GDK GDK_PIXBUF GTK])
+                       [G PANGO ATK GDK GDK_PIXBUF GTK GDKMM ATKMM PANGOMM GTKMM])
 
 GNOME_DOC_INIT([0.9.0],,
   [AC_MSG_WARN([[gnome-doc-utils not found: tutorial will not be built.]])])
diff --git a/examples/Makefile.am b/examples/Makefile.am
index afb306b..0db3fd1 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -20,7 +20,6 @@ check_PROGRAMS =					\
 	book/buttons/togglebutton/example		\
 	book/clipboard/ideal/example			\
 	book/clipboard/simple/example			\
-	book/combo/example				\
 	book/combobox/complex/example			\
 	book/combobox/text/example			\
 	book/comboboxentry/complex/example		\
@@ -196,11 +195,6 @@ book_clipboard_simple_example_SOURCES =		\
 	book/clipboard/simple/examplewindow.h	\
 	book/clipboard/simple/main.cc
 
-book_combo_example_SOURCES =		\
-	book/combo/examplewindow.cc	\
-	book/combo/examplewindow.h	\
-	book/combo/main.cc
-
 book_combobox_complex_example_SOURCES =		\
 	book/combobox/complex/examplewindow.cc	\
 	book/combobox/complex/examplewindow.h	\
diff --git a/examples/book/custom/custom_container/mycontainer.cc b/examples/book/custom/custom_container/mycontainer.cc
index cc5510d..e513e56 100644
--- a/examples/book/custom/custom_container/mycontainer.cc
+++ b/examples/book/custom/custom_container/mycontainer.cc
@@ -51,10 +51,10 @@ void MyContainer::on_size_request(Gtk::Requisition* requisition)
 
    Gtk::Requisition child_requisition_one = {0, 0};
    Gtk::Requisition child_requisition_two = {0, 0};
-   if(m_child_one && m_child_one->is_visible())
+   if(m_child_one && m_child_one->get_visible())
      child_requisition_one = m_child_one->size_request();
 
-   if(m_child_two && m_child_two->is_visible())
+   if(m_child_two && m_child_two->get_visible())
      child_requisition_two = m_child_two->size_request();
 
   //See which one has the most width:
@@ -93,7 +93,7 @@ void MyContainer::on_size_allocate(Gtk::Allocation& allocation)
   //Make it take up half the height available:
   child_allocation_one.set_height( allocation.get_height() / 2);
 
-  if(m_child_one && m_child_one->is_visible())
+  if(m_child_one && m_child_one->get_visible())
     m_child_one->size_allocate(child_allocation_one);
 
   //Place the second child below the first child:
@@ -108,7 +108,7 @@ void MyContainer::on_size_allocate(Gtk::Allocation& allocation)
   child_allocation_two.set_height( allocation.get_height() -
           child_allocation_one.get_height());
 
-  if(m_child_two && m_child_two->is_visible())
+  if(m_child_two && m_child_two->get_visible())
     m_child_two->size_allocate(child_allocation_two);
 }
 
@@ -140,7 +140,7 @@ void MyContainer::on_remove(Gtk::Widget* child)
 {
   if(child)
   {
-    const bool visible = child->is_visible();
+    const bool visible = child->get_visible();
     bool found = false;
 
     if(child == m_child_one)
diff --git a/examples/book/statusicon/main.cc b/examples/book/statusicon/main.cc
index e5c5f0e..03f663d 100644
--- a/examples/book/statusicon/main.cc
+++ b/examples/book/statusicon/main.cc
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
   //Use your own icon in real life.
   Glib::RefPtr<Gtk::StatusIcon> status_icon =
       Gtk::StatusIcon::create(Gtk::Stock::HELP);
-  status_icon->set_tooltip("gtkmm StatusIcon example tooltip.");
+  status_icon->set_tooltip_text("gtkmm StatusIcon example tooltip.");
 
   //Show a window:
   //The program will stop, and the status icon will disappear, when the window
diff --git a/examples/book/toolpalette/canvas.cc b/examples/book/toolpalette/canvas.cc
index df472e6..85a30c6 100644
--- a/examples/book/toolpalette/canvas.cc
+++ b/examples/book/toolpalette/canvas.cc
@@ -69,7 +69,7 @@ bool Canvas::on_expose_event(GdkEventExpose* event)
 
   Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
   const Gdk::Region region(event->region, true /* copy */);
-  Gdk::Cairo::region(cr, region);
+  Gdk::Cairo::add_region_to_path(cr, region);
   cr->clip();
 
   cr->set_source_rgb(1.0, 1.0, 1.0);
@@ -175,7 +175,7 @@ void Canvas::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context
 }
 
 
-bool Canvas::on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+bool Canvas::on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int /* x */, int /* y */, guint time)
 {
   // Request DnD data for creating a dopped item.
   // This will cause on_drag_data_received() to be called.
diff --git a/examples/others/calendar/calendar.cc b/examples/others/calendar/calendar.cc
index 6ad56ec..0f5a1ed 100644
--- a/examples/others/calendar/calendar.cc
+++ b/examples/others/calendar/calendar.cc
@@ -136,7 +136,7 @@ void CalendarExample::select_font()
     //font_dialog_->get_cancel_button()->signal_clicked.connect(sigc::bind(sigc::mem_fun(this, &CalendarExample::destroy_widget), font_dialog_));
   }
 
-  if (!font_dialog_->is_visible())
+  if (!font_dialog_->get_visible())
     font_dialog_->show();
   else
   {



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