[gtkmm] MenuButton: Added get/set_popup(), deprecated get/set_menu().



commit faafa53652eaf796c020e9bdb065b6b0ef8e2d17
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Aug 30 00:24:23 2012 +0200

    MenuButton: Added get/set_popup(), deprecated get/set_menu().
    
            * gtk/src/menubutton.[hg|ccg]: Added get/set/unset_popup().
    Deprecated get/set/unset_menu() and changed their implementations
    to use the gtk_menu_button_set/get_menu() functions. This
    change in GTK+ was cosmetic and we already used the correct type.

 ChangeLog              |    9 +++++++++
 gtk/src/menubutton.ccg |   11 ++++++++++-
 gtk/src/menubutton.hg  |   23 +++++++++++++++++++----
 3 files changed, 38 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 52a723e..b8bd7f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-08-29  Murray Cumming  <murrayc murrayc com>
 
+        MenuButton: Added get/set_popup(), deprecated get/set_menu().
+
+        * gtk/src/menubutton.[hg|ccg]: Added get/set/unset_popup().
+	Deprecated get/set/unset_menu() and changed their implementations
+	to use the gtk_menu_button_set/get_menu() functions. This
+	change in GTK+ was cosmetic and we already used the correct type.
+
+2012-08-29  Murray Cumming  <murrayc murrayc com>
+
         Application: Add get_active_window().
 
         * gtk/src/application.hg: Added get_active_window() and 
diff --git a/gtk/src/menubutton.ccg b/gtk/src/menubutton.ccg
index a74d64f..3f29214 100644
--- a/gtk/src/menubutton.ccg
+++ b/gtk/src/menubutton.ccg
@@ -20,9 +20,16 @@
 namespace Gtk
 {
 
+_DEPRECATE_IFDEF_START
 void MenuButton::unset_menu()
 {
-  gtk_menu_button_set_menu(gobj(), 0);
+  gtk_menu_button_set_popup(gobj(), 0);
+}
+_DEPRECATE_IFDEF_END
+
+void MenuButton::unset_popup()
+{
+  gtk_menu_button_set_popup(gobj(), 0);
 }
 
 void MenuButton::unset_menu_model()
@@ -31,4 +38,6 @@ void MenuButton::unset_menu_model()
 }
 
 
+
+
 } //namespace Gtk
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index 4b2143f..ba1f530 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -43,14 +43,28 @@ public:
   _CTOR_DEFAULT
 
  
-  _WRAP_METHOD(void set_menu(Menu& menu), gtk_menu_button_set_menu)
+  _WRAP_METHOD(void set_menu(Menu& menu), gtk_menu_button_set_popup, deprecated "Use set_popup() instead.")
 
   /** Disables the button.
+   *
+   * @deprecated Use unset_popup() instead.
    */
   void unset_menu();
 
-  _WRAP_METHOD(Menu* get_menu(), gtk_menu_button_get_menu)
-  _WRAP_METHOD(const Menu* get_menu() const, gtk_menu_button_get_menu, constversion)
+  _WRAP_METHOD(Menu* get_menu(), gtk_menu_button_get_popup, deprecated "Use get_popup() instead.")
+  _WRAP_METHOD(const Menu* get_menu() const, gtk_menu_button_get_popup, constversion, deprecated "Use get_popup() instead.")
+
+  _WRAP_METHOD(void set_popup(Menu& menu), gtk_menu_button_set_popup)
+
+_DEPRECATE_IFDEF_START
+  /** Disables the button.
+   */
+  void unset_popup();
+_DEPRECATE_IFDEF_END
+
+  _WRAP_METHOD(Menu* get_popup(), gtk_menu_button_get_popup)
+  _WRAP_METHOD(const Menu* get_popup() const, gtk_menu_button_get_popup, constversion)
+  _IGNORE(gtk_menu_button_set_menu)
 
   _WRAP_METHOD(void set_direction(ArrowType   direction), gtk_menu_button_set_direction)
   _WRAP_METHOD(ArrowType get_direction() const, gtk_menu_button_get_direction)
@@ -69,7 +83,8 @@ public:
   _WRAP_METHOD(Widget* get_align_widget(), gtk_menu_button_get_align_widget)
   _WRAP_METHOD(const Widget* get_align_widget() const, gtk_menu_button_get_align_widget)
 
-  _WRAP_PROPERTY("menu", Menu*)
+  _WRAP_PROPERTY("menu", Menu*, deprecated "Use popup instead.")
+  _WRAP_PROPERTY("popup", Menu*)
   _WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
   _WRAP_PROPERTY("align-widget", Widget*)
   _WRAP_PROPERTY("direction", ArrowType)



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