[gtkmm] Demo: Fix use of deprecated API.



commit 7c2b031703491ad9668bc10c5f8390ff47ce913e
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 18 13:02:01 2010 +0100

    Demo: Fix use of deprecated API.
    
    * configure.ac: Add PANGOMM to the list of deprecations to check for.
    * demos/Makefile.am: Add GTKMM's own deprecation defines so we don't ever use
        deprecated API in this code.
    * demos/gtk-demo/example_colorsel.cc:
    * demos/gtk-demo/example_uimanager.cc: Correct use of deprecated API.

 ChangeLog                           |   10 ++++++++++
 configure.ac                        |    2 +-
 demos/Makefile.am                   |    2 +-
 demos/gtk-demo/example_colorsel.cc  |    4 ++--
 demos/gtk-demo/example_uimanager.cc |    2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b2fe59a..628b7e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-18  Murray Cumming  <murrayc murrayc com>
+
+    Demo: Fix use of deprecated API.
+
+	* configure.ac: Add PANGOMM to the list of deprecations to check for.
+	* demos/Makefile.am: Add GTKMM's own deprecation defines so we don't ever use 
+    deprecated API in this code.
+	* demos/gtk-demo/example_colorsel.cc:
+	* demos/gtk-demo/example_uimanager.cc: Correct use of deprecated API.
+
 2.19.7:
 
 2010-03-17  Murray Cumming  <murrayc murrayc com>
diff --git a/configure.ac b/configure.ac
index e50be10..679d5e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@ AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo])
 MM_ARG_ENABLE_WARNINGS([GTKMM_WXXFLAGS],
                        [-Wall],
                        [-pedantic -Wall -Wextra -DGSEAL_ENABLE],
-                       [G PANGO ATK GDK GDK_PIXBUF GTK])
+                       [G PANGO ATK GDK GDK_PIXBUF GTK PANGOMM])
 
 AC_CONFIG_FILES([Makefile
                  tools/Makefile
diff --git a/demos/Makefile.am b/demos/Makefile.am
index da9c735..aa52222 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -85,7 +85,7 @@ local_ldadd    = $(atkmm_ldadd) $(gdkmm_ldadd) $(gtkmm_ldadd)
 local_cppflags = -DDEMOCODEDIR=\""$(democodedir)"\"
 
 AM_CPPFLAGS = $(local_includes) $(GTHREAD_CFLAGS) $(GTKMM_CFLAGS) $(local_cppflags)
-AM_CXXFLAGS = $(GTKMM_WXXFLAGS)
+AM_CXXFLAGS = $(GTKMM_WXXFLAGS) -DGTKMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DATKMM_DISABLE_DEPRECATED
 
 pixbuf_demo_LDADD         = $(GTKMM_LIBS) $(local_ldadd)
 gtk_demo_gtkmm_demo_LDADD = $(GTKMM_LIBS) $(local_ldadd)
diff --git a/demos/gtk-demo/example_colorsel.cc b/demos/gtk-demo/example_colorsel.cc
index bc552a3..5e8a65d 100644
--- a/demos/gtk-demo/example_colorsel.cc
+++ b/demos/gtk-demo/example_colorsel.cc
@@ -1,4 +1,4 @@
-/* Color Selector
+ /* Color Selector
  *
  * GtkColorSelection lets the user choose a color. GtkColorSelectionDialog is
  * a prebuilt dialog containing a GtkColorSelection.
@@ -81,7 +81,7 @@ void Example_ColorSel::on_button_clicked()
   Gtk::ColorSelectionDialog dialog ("Changing color");
   dialog.set_transient_for(*this);
 
-  Gtk::ColorSelection *const pColorSel = dialog.get_colorsel();
+  Gtk::ColorSelection *const pColorSel = dialog.get_color_selection();
 
   pColorSel->set_previous_color(m_Color);
   pColorSel->set_current_color(m_Color);
diff --git a/demos/gtk-demo/example_uimanager.cc b/demos/gtk-demo/example_uimanager.cc
index 7fb2deb..4c457db 100644
--- a/demos/gtk-demo/example_uimanager.cc
+++ b/demos/gtk-demo/example_uimanager.cc
@@ -192,7 +192,7 @@ Example_UIManager::Example_UIManager()
   m_Button.signal_clicked().connect( sigc::mem_fun( *this, &Example_UIManager::on_button_clicked ) );
   
   m_Box2.pack_start(m_Button, Gtk::PACK_EXPAND_WIDGET);
-  m_Button.set_flags(Gtk::CAN_DEFAULT);
+  m_Button.set_can_default();
   m_Button.grab_default();
 
   show_all();



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