[gtkmm-documentation/gmenu] Adapt to improved Action API.



commit 7cf6593928af4281e839515ef081066c7cd89eeb
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Aug 9 12:14:44 2013 +0200

    Adapt to improved Action API.

 examples/book/menus/main_menu/examplewindow.cc |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/examples/book/menus/main_menu/examplewindow.cc b/examples/book/menus/main_menu/examplewindow.cc
index 2f0ed1c..10aeff5 100644
--- a/examples/book/menus/main_menu/examplewindow.cc
+++ b/examples/book/menus/main_menu/examplewindow.cc
@@ -231,8 +231,7 @@ void ExampleWindow::on_menu_others()
 void ExampleWindow::on_menu_choices(const Glib::ustring& parameter)
 {
   //The radio action's state does not change automatically:
-  m_refChoice->change_state(
-    Glib::Variant<Glib::ustring>::create(parameter) );
+  m_refChoice->change_state(parameter);
   
   Glib::ustring message;
   if(parameter == "a")
@@ -246,8 +245,7 @@ void ExampleWindow::on_menu_choices(const Glib::ustring& parameter)
 void ExampleWindow::on_menu_choices_other(int parameter)
 {
   //The radio action's state does not change automatically:
-  m_refChoice->change_state(
-   Glib::Variant<int>::create(parameter) );
+  m_refChoice->change_state(parameter);
 
   Glib::ustring message;
   if(parameter == 1)
@@ -264,8 +262,7 @@ void ExampleWindow::on_menu_toggle()
   m_refToggle->get_state(active);
 
   //The toggle action's state does not change automatically:
-  m_refToggle->change_state(
-   Glib::Variant<bool>::create(!active) );
+  m_refToggle->change_state(!active);
   active = !active;
 
   Glib::ustring message;


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