[gtkmm] Deprecate HandleBox and TearOffMenuItem.



commit 0024d5c5d47ffda8b937cfa93608338c0aaacd84
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 26 14:06:06 2011 +0200

    Deprecate HandleBox and TearOffMenuItem.
    
    	* gtk/src/handlebox.hg:
    	* gtk/src/tearoffmenuitem.hg: Deprecate these completely, without replcement,
    	because that has happened in GTK+.
    	* gtk/src/uimanager.hg: Deprecate set/get_add_tearoffs().

 ChangeLog                  |    9 +++++++++
 gtk/src/handlebox.hg       |   10 ++++++++++
 gtk/src/tearoffmenuitem.hg |    8 ++++++++
 gtk/src/uimanager.hg       |    8 ++++++--
 4 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d4b7934..2fd4758 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-10-26  Murray Cumming  <murrayc murrayc com>
 
+	Deprecate HandleBox and TearOffMenuItem.
+
+	* gtk/src/handlebox.hg:
+	* gtk/src/tearoffmenuitem.hg: Deprecate these completely, without replcement,
+	because that has happened in GTK+.
+	* gtk/src/uimanager.hg: Deprecate set/get_add_tearoffs().
+
+2011-10-26  Murray Cumming  <murrayc murrayc com>
+
   Avoid some deprecation warnings with the recent GTK+.
     
 	* gtk/src/fontselection.hg:
diff --git a/gtk/src/handlebox.hg b/gtk/src/handlebox.hg
index d307045..d493437 100644
--- a/gtk/src/handlebox.hg
+++ b/gtk/src/handlebox.hg
@@ -23,6 +23,11 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 #m4 _CONVERSION(`int',`PositionType',`($2)$3')
 
 namespace Gtk
@@ -36,12 +41,17 @@ namespace Gtk
  * To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached.
  * For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox's allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to GTK_POS_BOTTOM.
  *
+ * @deprecated This is very specialized, lacks features
+ * to make it useful and most importantly does not fit well into modern
+ * application design. There is no replacement.
+ *
  * @ingroup Widgets
  * @ingroup Containers
  */
 class HandleBox : public Bin
 {
   _CLASS_GTKOBJECT(HandleBox,GtkHandleBox,GTK_HANDLE_BOX,Gtk::Bin,GtkBin)
+  _IS_DEPRECATED
 public:
   _CTOR_DEFAULT
 
diff --git a/gtk/src/tearoffmenuitem.hg b/gtk/src/tearoffmenuitem.hg
index 187a7de..0d00c4f 100644
--- a/gtk/src/tearoffmenuitem.hg
+++ b/gtk/src/tearoffmenuitem.hg
@@ -24,6 +24,10 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/menuitem_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
 
 namespace Gtk
 {
@@ -31,12 +35,16 @@ namespace Gtk
 /** A special Gtk::MenuItem which is used to tear off and reattach its menu.
  * When its menu is shown normally, the Gtk::TearoffMenuItem is drawn as a dotted line indicating that the menu can be torn off. Activating it causes its menu to be torn off and displayed in its own window.
  * When its menu is shown as a tearoff menu, the Gtk::TearoffMenuItem is drawn as a dotted line which has a left pointing arrow graphic indicating that the tearoff menu can be reattached. Activating it will erase the tearoff menu window.
+ *
+ * @deprecated Menus are not meant to be torn around. There is no replacement.
+ *
  * @ingroup Widgets
  * @ingroup Menus
  */
 class TearoffMenuItem : public MenuItem
 {
   _CLASS_GTKOBJECT(TearoffMenuItem,GtkTearoffMenuItem,GTK_TEAROFF_MENU_ITEM,Gtk::MenuItem,GtkMenuItem)
+  _IS_DEPRECATED
 public:
   _CTOR_DEFAULT
 };
diff --git a/gtk/src/uimanager.hg b/gtk/src/uimanager.hg
index d323eb6..6f4f6a1 100644
--- a/gtk/src/uimanager.hg
+++ b/gtk/src/uimanager.hg
@@ -26,6 +26,10 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
 
 namespace Gtk
 {
@@ -183,8 +187,8 @@ protected:
 public:
   _WRAP_CREATE()
 
-  _WRAP_METHOD(void set_add_tearoffs(bool add_tearoffs = true), gtk_ui_manager_set_add_tearoffs)
-  _WRAP_METHOD(bool get_add_tearoffs() const, gtk_ui_manager_get_add_tearoffs)
+  _WRAP_METHOD(void set_add_tearoffs(bool add_tearoffs = true), gtk_ui_manager_set_add_tearoffs, deprecated "Tearoff menus are deprecated and should not be used in newly written code.")
+  _WRAP_METHOD(bool get_add_tearoffs() const, gtk_ui_manager_get_add_tearoffs, deprecated "Tearoff menus are deprecated and should not be used in newly written code.")
   _WRAP_METHOD(void insert_action_group(const Glib::RefPtr<ActionGroup>& action_group, int pos = 0), gtk_ui_manager_insert_action_group)
   _WRAP_METHOD(void remove_action_group(const Glib::RefPtr<ActionGroup>& action_group), gtk_ui_manager_remove_action_group)
 



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