[gtk+] uimanager: Deprecate add-tearoffs property



commit fcd4d8a208dbadac430183610aa1b54e08685ee0
Author: Benjamin Otte <otte redhat com>
Date:   Sat Oct 1 05:58:27 2011 +0200

    uimanager: Deprecate add-tearoffs property
    
    Don't use it. Please.

 gtk/gtkuimanager.c |   13 +++++++++++--
 gtk/gtkuimanager.h |    2 ++
 tests/testmerge.c  |    3 +++
 3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c
index 0a80ce5..b05d53a 100644
--- a/gtk/gtkuimanager.c
+++ b/gtk/gtkuimanager.c
@@ -44,11 +44,11 @@
 #include "gtkseparatormenuitem.h"
 #include "gtkseparatortoolitem.h"
 #include "gtktoolbar.h"
-#include "gtkuimanager.h"
 #include "gtkwindow.h"
 #include "gtkprivate.h"
 
 #undef GTK_DISABLE_DEPRECATED
+#include "gtkuimanager.h"
 #include "gtktearoffmenuitem.h"
 
 /**
@@ -473,6 +473,9 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
    * menus never have tearoff menu items.   
    *
    * Since: 2.4
+   *
+   * Deprecated: 3.4: Tearoff menus are deprecated and should not
+   *     be used in newly written code.
    */
   g_object_class_install_property (gobject_class,
                                    PROP_ADD_TEAROFFS,
@@ -480,7 +483,7 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
 							 P_("Add tearoffs to menus"),
 							 P_("Whether tearoff menu items should be added to menus"),
                                                          FALSE,
-							 GTK_PARAM_READWRITE));
+							 GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   g_object_class_install_property (gobject_class,
 				   PROP_UI,
@@ -866,6 +869,9 @@ gtk_ui_manager_new (void)
  * Return value: whether tearoff menu items are added
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.4: Tearoff menus are deprecated and should not
+ *     be used in newly written code.
  **/
 gboolean 
 gtk_ui_manager_get_add_tearoffs (GtkUIManager *manager)
@@ -888,6 +894,9 @@ gtk_ui_manager_get_add_tearoffs (GtkUIManager *manager)
  * menus never have tearoff menu items.
  *
  * Since: 2.4
+ *
+ * Deprecated: 3.4: Tearoff menus are deprecated and should not
+ *     be used in newly written code.
  **/
 void 
 gtk_ui_manager_set_add_tearoffs (GtkUIManager *manager,
diff --git a/gtk/gtkuimanager.h b/gtk/gtkuimanager.h
index 8e8b618..90b804f 100644
--- a/gtk/gtkuimanager.h
+++ b/gtk/gtkuimanager.h
@@ -126,9 +126,11 @@ typedef enum {
 
 GType          gtk_ui_manager_get_type            (void) G_GNUC_CONST;
 GtkUIManager  *gtk_ui_manager_new                 (void);
+#ifndef GTK_DISABLE_DEPRECATED
 void           gtk_ui_manager_set_add_tearoffs    (GtkUIManager          *manager,
 						   gboolean               add_tearoffs);
 gboolean       gtk_ui_manager_get_add_tearoffs    (GtkUIManager          *manager);
+#endif
 void           gtk_ui_manager_insert_action_group (GtkUIManager          *manager,
 						   GtkActionGroup        *action_group,
 						   gint                   pos);
diff --git a/tests/testmerge.c b/tests/testmerge.c
index 37c470a..82c7949 100644
--- a/tests/testmerge.c
+++ b/tests/testmerge.c
@@ -24,6 +24,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+
+#undef GTK_DISABLE_DEPRECATED
+
 #include <gtk/gtk.h>
 
 #ifndef STDOUT_FILENO



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