Commit fcd4d8a2 authored by Benjamin Otte's avatar Benjamin Otte

uimanager: Deprecate add-tearoffs property

Don't use it. Please.
parent b1354417
......@@ -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,
......
......@@ -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);
......
......@@ -24,6 +24,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#ifndef STDOUT_FILENO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment