Deprecate GtkAction and GtkUIManager

It is recommended to use GAction et al and GtkBuilder.
This commit is contained in:
William Jon McCann 2013-06-28 11:27:19 -04:00
parent 32ce8fa60a
commit c96a1c4980
29 changed files with 727 additions and 143 deletions

View File

@ -72,6 +72,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkaction.h"
#include "gtkactiongroup.h"
#include "gtkaccellabel.h"
@ -216,6 +218,13 @@ gtk_action_class_init (GtkActionClass *klass)
klass->connect_proxy = connect_proxy;
klass->disconnect_proxy = disconnect_proxy;
/**
* GtkAction:name:
*
* A unique name for the action.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_NAME,
g_param_spec_string ("name",
@ -234,6 +243,8 @@ gtk_action_class_init (GtkActionClass *klass)
*
* This is an appearance property and thus only applies if
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_LABEL,
@ -251,6 +262,8 @@ gtk_action_class_init (GtkActionClass *klass)
*
* This is an appearance property and thus only applies if
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_SHORT_LABEL,
@ -261,6 +274,13 @@ gtk_action_class_init (GtkActionClass *klass)
GTK_PARAM_READWRITE));
/**
* GtkAction:tooltip:
*
* A tooltip for this action.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_TOOLTIP,
g_param_spec_string ("tooltip",
@ -276,6 +296,8 @@ gtk_action_class_init (GtkActionClass *klass)
*
* This is an appearance property and thus only applies if
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_STOCK_ID,
@ -297,6 +319,8 @@ gtk_action_class_init (GtkActionClass *klass)
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_GICON,
@ -318,6 +342,8 @@ gtk_action_class_init (GtkActionClass *klass)
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Since: 2.10
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_ICON_NAME,
@ -327,6 +353,13 @@ gtk_action_class_init (GtkActionClass *klass)
NULL,
GTK_PARAM_READWRITE));
/**
* GtkAction:visible-horizontal:
*
* Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VISIBLE_HORIZONTAL,
g_param_spec_boolean ("visible-horizontal",
@ -342,6 +375,8 @@ gtk_action_class_init (GtkActionClass *klass)
* toolbar overflow menu.
*
* Since: 2.6
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VISIBLE_OVERFLOWN,
@ -351,6 +386,14 @@ gtk_action_class_init (GtkActionClass *klass)
"are represented in the toolbar overflow menu."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkAction:visible-vertical:
*
* Whether the toolbar item is visible when the toolbar is in a vertical orientation.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VISIBLE_VERTICAL,
g_param_spec_boolean ("visible-vertical",
@ -359,6 +402,14 @@ gtk_action_class_init (GtkActionClass *klass)
"is in a vertical orientation."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkAction:is-important:
*
* Whether the action is considered important. When TRUE, toolitem
* proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_IS_IMPORTANT,
g_param_spec_boolean ("is-important",
@ -368,6 +419,13 @@ gtk_action_class_init (GtkActionClass *klass)
"show text in GTK_TOOLBAR_BOTH_HORIZ mode."),
FALSE,
GTK_PARAM_READWRITE));
/**
* GtkAction:hide-if-empty:
*
* When TRUE, empty menu proxies for this action are hidden.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_HIDE_IF_EMPTY,
g_param_spec_boolean ("hide-if-empty",
@ -375,6 +433,13 @@ gtk_action_class_init (GtkActionClass *klass)
P_("When TRUE, empty menu proxies for this action are hidden."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkAction:sensitive:
*
* Whether the action is enabled.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_SENSITIVE,
g_param_spec_boolean ("sensitive",
@ -382,6 +447,13 @@ gtk_action_class_init (GtkActionClass *klass)
P_("Whether the action is enabled."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkAction:visible:
*
* Whether the action is visible.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VISIBLE,
g_param_spec_boolean ("visible",
@ -389,6 +461,14 @@ gtk_action_class_init (GtkActionClass *klass)
P_("Whether the action is visible."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkAction:action-group:
*
* The GtkActionGroup this GtkAction is associated with, or NULL
* (for internal use).
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_ACTION_GROUP,
g_param_spec_object ("action-group",
@ -406,6 +486,8 @@ gtk_action_class_init (GtkActionClass *klass)
* without their image.
*
* Since: 2.20
*
* Deprecated: 3.10
**/
g_object_class_install_property (gobject_class,
PROP_ALWAYS_SHOW_IMAGE,
@ -422,6 +504,8 @@ gtk_action_class_init (GtkActionClass *klass)
* The "activate" signal is emitted when the action is activated.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
action_signals[ACTIVATE] =
g_signal_new (I_("activate"),
@ -520,6 +604,8 @@ gtk_action_buildable_get_name (GtkBuildable *buildable)
* Return value: a new #GtkAction
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkAction *
gtk_action_new (const gchar *name,
@ -759,6 +845,8 @@ disconnect_proxy (GtkAction *action,
* </itemizedlist>
*
* This function is used in the implementation of #GtkUIManager.
*
* Deprecated: 3.10
**/
void
_gtk_action_sync_menu_visible (GtkAction *action,
@ -820,6 +908,8 @@ _gtk_action_emit_activate (GtkAction *action)
* It can also be used to manually activate an action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_activate (GtkAction *action)
@ -845,6 +935,8 @@ gtk_action_activate (GtkAction *action)
* cases (updating toggle state for instance).
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_block_activate (GtkAction *action)
@ -861,6 +953,8 @@ gtk_action_block_activate (GtkAction *action)
* Reenable activation signals from the action
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_unblock_activate (GtkAction *action)
@ -881,6 +975,8 @@ gtk_action_unblock_activate (GtkAction *action)
* Returns: (transfer none): a widget that displays the icon for this action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkWidget *
gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size)
@ -913,6 +1009,8 @@ gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size)
* Returns: (transfer none): a menu item connected to the action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkWidget *
gtk_action_create_menu_item (GtkAction *action)
@ -938,6 +1036,8 @@ gtk_action_create_menu_item (GtkAction *action)
* Returns: (transfer none): a toolbar item connected to the action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkWidget *
gtk_action_create_tool_item (GtkAction *action)
@ -985,6 +1085,8 @@ _gtk_action_remove_from_proxy_list (GtkAction *action,
* and must not be modified.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GSList*
gtk_action_get_proxies (GtkAction *action)
@ -1004,6 +1106,8 @@ gtk_action_get_proxies (GtkAction *action)
* be freed.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
const gchar *
gtk_action_get_name (GtkAction *action)
@ -1023,6 +1127,8 @@ gtk_action_get_name (GtkAction *action)
* are both sensitive.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gboolean
gtk_action_is_sensitive (GtkAction *action)
@ -1047,6 +1153,8 @@ gtk_action_is_sensitive (GtkAction *action)
* Return value: %TRUE if the action itself is sensitive.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gboolean
gtk_action_get_sensitive (GtkAction *action)
@ -1067,6 +1175,8 @@ gtk_action_get_sensitive (GtkAction *action)
* for that.
*
* Since: 2.6
*
* Deprecated: 3.10
**/
void
gtk_action_set_sensitive (GtkAction *action,
@ -1094,6 +1204,8 @@ gtk_action_set_sensitive (GtkAction *action,
* are both visible.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gboolean
gtk_action_is_visible (GtkAction *action)
@ -1118,6 +1230,8 @@ gtk_action_is_visible (GtkAction *action)
* Return value: %TRUE if the action itself is visible.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gboolean
gtk_action_get_visible (GtkAction *action)
@ -1138,6 +1252,8 @@ gtk_action_get_visible (GtkAction *action)
* for that.
*
* Since: 2.6
*
* Deprecated: 3.10
**/
void
gtk_action_set_visible (GtkAction *action,
@ -1164,6 +1280,8 @@ gtk_action_set_visible (GtkAction *action,
* or not.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_is_important (GtkAction *action,
@ -1190,6 +1308,8 @@ gtk_action_set_is_important (GtkAction *action,
* Returns: whether @action is important
*
* Since: 2.16
*
* Deprecated: 3.10
*/
gboolean
gtk_action_get_is_important (GtkAction *action)
@ -1211,6 +1331,8 @@ gtk_action_get_is_important (GtkAction *action)
* without their image.
*
* Since: 2.20
*
* Deprecated: 3.10
*/
void
gtk_action_set_always_show_image (GtkAction *action,
@ -1242,6 +1364,8 @@ gtk_action_set_always_show_image (GtkAction *action,
* Returns: %TRUE if the menu item proxies will always show their image
*
* Since: 2.20
*
* Deprecated: 3.10
*/
gboolean
gtk_action_get_always_show_image (GtkAction *action)
@ -1259,6 +1383,8 @@ gtk_action_get_always_show_image (GtkAction *action)
* Sets the label of @action.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_label (GtkAction *action,
@ -1304,6 +1430,8 @@ gtk_action_set_label (GtkAction *action,
* Returns: the label text
*
* Since: 2.16
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_label (GtkAction *action)
@ -1321,6 +1449,8 @@ gtk_action_get_label (GtkAction *action)
* Sets a shorter label text on @action.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_short_label (GtkAction *action,
@ -1350,6 +1480,8 @@ gtk_action_set_short_label (GtkAction *action,
* Returns: the short label text.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_short_label (GtkAction *action)
@ -1367,6 +1499,8 @@ gtk_action_get_short_label (GtkAction *action)
* Sets whether @action is visible when horizontal
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_visible_horizontal (GtkAction *action,
@ -1395,6 +1529,8 @@ gtk_action_set_visible_horizontal (GtkAction *action,
* Returns: whether @action is visible when horizontal
*
* Since: 2.16
*
* Deprecated: 3.10
*/
gboolean
gtk_action_get_visible_horizontal (GtkAction *action)
@ -1412,6 +1548,8 @@ gtk_action_get_visible_horizontal (GtkAction *action)
* Sets whether @action is visible when vertical
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_visible_vertical (GtkAction *action,
@ -1440,6 +1578,8 @@ gtk_action_set_visible_vertical (GtkAction *action,
* Returns: whether @action is visible when horizontal
*
* Since: 2.16
*
* Deprecated: 3.10
*/
gboolean
gtk_action_get_visible_vertical (GtkAction *action)
@ -1457,6 +1597,8 @@ gtk_action_get_visible_vertical (GtkAction *action)
* Sets the tooltip text on @action
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_tooltip (GtkAction *action,
@ -1482,6 +1624,8 @@ gtk_action_set_tooltip (GtkAction *action,
* Returns: the tooltip text
*
* Since: 2.16
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_tooltip (GtkAction *action)
@ -1499,6 +1643,8 @@ gtk_action_get_tooltip (GtkAction *action)
* Sets the stock id on @action
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_stock_id (GtkAction *action,
@ -1544,6 +1690,8 @@ gtk_action_set_stock_id (GtkAction *action,
* Returns: the stock id
*
* Since: 2.16
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_stock_id (GtkAction *action)
@ -1561,6 +1709,8 @@ gtk_action_get_stock_id (GtkAction *action)
* Sets the icon name on @action
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_icon_name (GtkAction *action,
@ -1586,6 +1736,8 @@ gtk_action_set_icon_name (GtkAction *action,
* Returns: the icon name
*
* Since: 2.16
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_icon_name (GtkAction *action)
@ -1603,6 +1755,8 @@ gtk_action_get_icon_name (GtkAction *action)
* Sets the icon of @action.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_action_set_gicon (GtkAction *action,
@ -1630,6 +1784,8 @@ gtk_action_set_gicon (GtkAction *action,
* Returns: (transfer none): The action's #GIcon if one is set.
*
* Since: 2.16
*
* Deprecated: 3.10
*/
GIcon *
gtk_action_get_gicon (GtkAction *action)
@ -1682,6 +1838,8 @@ gtk_action_set_action_group (GtkAction *action,
* g_intern_static_string().
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_set_accel_path (GtkAction *action,
@ -1703,6 +1861,8 @@ gtk_action_set_accel_path (GtkAction *action,
* Returns: the accel path for this action, or %NULL
* if none is set. The returned string is owned by GTK+
* and must not be freed or modified.
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_get_accel_path (GtkAction *action)
@ -1726,6 +1886,8 @@ gtk_action_get_accel_path (GtkAction *action)
* Returns: (transfer none): the accel closure for this action. The
* returned closure is owned by GTK+ and must not be unreffed
* or modified.
*
* Deprecated: 3.10
*/
GClosure *
gtk_action_get_accel_closure (GtkAction *action)
@ -1745,6 +1907,8 @@ gtk_action_get_accel_closure (GtkAction *action)
* will be installed.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_set_accel_group (GtkAction *action,
@ -1775,6 +1939,8 @@ gtk_action_set_accel_group (GtkAction *action,
* gtk_action_disconnect_accelerator() has been called as many times.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_connect_accelerator (GtkAction *action)
@ -1805,6 +1971,8 @@ gtk_action_connect_accelerator (GtkAction *action)
* Undoes the effect of one call to gtk_action_connect_accelerator().
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_disconnect_accelerator (GtkAction *action)
@ -1834,6 +2002,8 @@ gtk_action_disconnect_accelerator (GtkAction *action)
* action, or %NULL.
*
* Since: 2.12
*
* Deprecated: 3.10
*/
GtkWidget *
gtk_action_create_menu (GtkAction *action)

View File

@ -83,53 +83,53 @@ struct _GtkActionClass
void (*_gtk_reserved4) (void);
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_action_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_action_new (const gchar *name,
const gchar *label,
const gchar *tooltip,
const gchar *stock_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar* gtk_action_get_name (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_is_sensitive (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_sensitive (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_sensitive (GtkAction *action,
gboolean sensitive);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_is_visible (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_visible (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_visible (GtkAction *action,
gboolean visible);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_activate (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkWidget * gtk_action_create_icon (GtkAction *action,
GtkIconSize icon_size);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkWidget * gtk_action_create_menu_item (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkWidget * gtk_action_create_tool_item (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkWidget * gtk_action_create_menu (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GSList * gtk_action_get_proxies (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_connect_accelerator (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_disconnect_accelerator (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar *gtk_action_get_accel_path (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GClosure *gtk_action_get_accel_closure (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_block_activate (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_unblock_activate (GtkAction *action);
void _gtk_action_add_to_proxy_list (GtkAction *action,
@ -141,65 +141,65 @@ void _gtk_action_remove_from_proxy_list(GtkAction *action,
void _gtk_action_emit_activate (GtkAction *action);
/* protected ... for use by action groups */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_accel_path (GtkAction *action,
const gchar *accel_path);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_accel_group (GtkAction *action,
GtkAccelGroup *accel_group);
void _gtk_action_sync_menu_visible (GtkAction *action,
GtkWidget *proxy,
gboolean empty);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_label (GtkAction *action,
const gchar *label);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_get_label (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_short_label (GtkAction *action,
const gchar *short_label);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_get_short_label (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_tooltip (GtkAction *action,
const gchar *tooltip);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_get_tooltip (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_stock_id (GtkAction *action,
const gchar *stock_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_get_stock_id (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_gicon (GtkAction *action,
GIcon *icon);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GIcon *gtk_action_get_gicon (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_icon_name (GtkAction *action,
const gchar *icon_name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_get_icon_name (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_visible_horizontal (GtkAction *action,
gboolean visible_horizontal);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_visible_horizontal (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_visible_vertical (GtkAction *action,
gboolean visible_vertical);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_visible_vertical (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_is_important (GtkAction *action,
gboolean is_important);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_is_important (GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_set_always_show_image (GtkAction *action,
gboolean always_show);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_get_always_show_image (GtkAction *action);

View File

@ -89,6 +89,8 @@
#include "config.h"
#include <string.h>
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkactiongroup.h"
#include "gtkbuildable.h"
#include "gtkiconfactory.h"
@ -222,6 +224,13 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
gobject_class->get_property = gtk_action_group_get_property;
klass->get_action = gtk_action_group_real_get_action;
/**
* GtkActionGroup:name:
*
* A name for the action.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_NAME,
g_param_spec_string ("name",
@ -229,6 +238,13 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
P_("A name for the action group."),
NULL,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
* GtkActionGroup:sensitive:
*
* Whether the action group is enabled.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_SENSITIVE,
g_param_spec_boolean ("sensitive",
@ -236,6 +252,13 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
P_("Whether the action group is enabled."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkActionGroup:visible:
*
* Whether the action group is visible.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VISIBLE,
g_param_spec_boolean ("visible",
@ -243,6 +266,13 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
P_("Whether the action group is visible."),
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkActionGroup:accel-group:
*
* The accelerator group the actions of this group should use.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_ACCEL_GROUP,
g_param_spec_object ("accel-group",
@ -270,6 +300,8 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* convenient to use.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
action_group_signals[CONNECT_PROXY] =
g_signal_new (I_("connect-proxy"),
@ -293,6 +325,8 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* convenient to use.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
action_group_signals[DISCONNECT_PROXY] =
g_signal_new (I_("disconnect-proxy"),
@ -314,6 +348,8 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* notification just before any action is activated.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
action_group_signals[PRE_ACTIVATE] =
g_signal_new (I_("pre-activate"),
@ -335,6 +371,8 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
* notification just after any action is activated.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
action_group_signals[POST_ACTIVATE] =
g_signal_new (I_("post-activate"),
@ -535,6 +573,8 @@ gtk_action_group_buildable_custom_tag_end (GtkBuildable *buildable,
* Returns: the new #GtkActionGroup
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkActionGroup *
gtk_action_group_new (const gchar *name)
@ -659,6 +699,8 @@ gtk_action_group_real_get_action (GtkActionGroup *self,
* Returns: the name of the action group.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
const gchar *
gtk_action_group_get_name (GtkActionGroup *action_group)
@ -684,6 +726,8 @@ gtk_action_group_get_name (GtkActionGroup *action_group)
* Return value: %TRUE if the group is sensitive.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
gboolean
gtk_action_group_get_sensitive (GtkActionGroup *action_group)
@ -715,6 +759,8 @@ cb_set_action_sensitivity (const gchar *name,
* Changes the sensitivity of @action_group
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_set_sensitive (GtkActionGroup *action_group,
@ -749,6 +795,8 @@ gtk_action_group_set_sensitive (GtkActionGroup *action_group,
* Return value: %TRUE if the group is visible.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
gboolean
gtk_action_group_get_visible (GtkActionGroup *action_group)
@ -772,6 +820,8 @@ gtk_action_group_get_visible (GtkActionGroup *action_group)
* group or %NULL if there is none.
*
* Since: 3.6
*
* Deprecated: 3.10
*/
GtkAccelGroup *
gtk_action_group_get_accel_group (GtkActionGroup *action_group)
@ -798,6 +848,8 @@ cb_set_action_visiblity (const gchar *name,
* Changes the visible of @action_group.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_set_visible (GtkActionGroup *action_group,
@ -834,6 +886,8 @@ gtk_action_group_accel_group_foreach (gpointer key, gpointer val, gpointer data)
* Sets the accelerator group to be used by every action in this group.
*
* Since: 3.6
*
* Deprecated: 3.10
*/
void
gtk_action_group_set_accel_group (GtkActionGroup *action_group,
@ -871,6 +925,8 @@ gtk_action_group_set_accel_group (GtkActionGroup *action_group,
* Returns: (transfer none): the action, or %NULL if no action by that name exists
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkAction *
gtk_action_group_get_action (GtkActionGroup *action_group,
@ -915,6 +971,8 @@ check_unique_action (GtkActionGroup *action_group,
* <literal>gtk_action_group_add_action_with_accel (..., NULL)</literal>.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_action (GtkActionGroup *action_group,
@ -960,6 +1018,8 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
* <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
@ -1029,6 +1089,8 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
* Removes an action object from the action group.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_remove_action (GtkActionGroup *action_group,
@ -1067,6 +1129,8 @@ add_single_action (gpointer key,
* Returns: (element-type GtkAction) (transfer container): an allocated list of the action objects in the action group
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GList *
gtk_action_group_list_actions (GtkActionGroup *action_group)
@ -1099,6 +1163,8 @@ gtk_action_group_list_actions (GtkActionGroup *action_group)
* <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_actions (GtkActionGroup *action_group,
@ -1147,6 +1213,8 @@ shared_data_unref (gpointer data)
* callback for @user_data.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_actions_full (GtkActionGroup *action_group,
@ -1230,6 +1298,8 @@ gtk_action_group_add_actions_full (GtkActionGroup *action_group,
* <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,
@ -1255,6 +1325,8 @@ gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,
* #GDestroyNotify callback for @user_data.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_group,
@ -1346,6 +1418,8 @@ gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_gro
* <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_group_add_radio_actions (GtkActionGroup *action_group,
@ -1376,6 +1450,8 @@ gtk_action_group_add_radio_actions (GtkActionGroup *action_group,
* #GDestroyNotify callback for @user_data.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
@ -1461,6 +1537,8 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group
* with gtk_action_group_set_translation_domain().
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
@ -1507,6 +1585,8 @@ dgettext_swapped (const gchar *msgid,
* gtk_action_group_set_translate_func().
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
@ -1533,6 +1613,8 @@ gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
* Returns: the translation of @string
*
* Since: 2.6
*
* Deprecated: 3.10
**/
const gchar *
gtk_action_group_translate_string (GtkActionGroup *action_group,

View File

@ -90,6 +90,8 @@ struct _GtkActionGroupClass
*
* #GtkActionEntry structs are used with gtk_action_group_add_actions() to
* construct actions.
*
* Deprecated: 3.10
*/
struct _GtkActionEntry
{
@ -117,6 +119,8 @@ struct _GtkActionEntry
*
* #GtkToggleActionEntry structs are used with
* gtk_action_group_add_toggle_actions() to construct toggle actions.
*
* Deprecated: 3.10
*/
struct _GtkToggleActionEntry
{
@ -145,6 +149,8 @@ struct _GtkToggleActionEntry
*
* #GtkRadioActionEntry structs are used with
* gtk_action_group_add_radio_actions() to construct groups of radio actions.
*
* Deprecated: 3.10
*/
struct _GtkRadioActionEntry
{
@ -156,20 +162,20 @@ struct _GtkRadioActionEntry
gint value;
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_action_group_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkActionGroup *gtk_action_group_new (const gchar *name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar *gtk_action_group_get_name (GtkActionGroup *action_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_group_get_sensitive (GtkActionGroup *action_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_set_sensitive (GtkActionGroup *action_group,
gboolean sensitive);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_action_group_get_visible (GtkActionGroup *action_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_set_visible (GtkActionGroup *action_group,
gboolean visible);
GDK_AVAILABLE_IN_3_6
@ -178,51 +184,51 @@ GDK_AVAILABLE_IN_3_6
void gtk_action_group_set_accel_group (GtkActionGroup *action_group,
GtkAccelGroup *accel_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_action_group_get_action (GtkActionGroup *action_group,
const gchar *action_name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GList *gtk_action_group_list_actions (GtkActionGroup *action_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_action (GtkActionGroup *action_group,
GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
GtkAction *action,
const gchar *accelerator);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_remove_action (GtkActionGroup *action_group,
GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_actions (GtkActionGroup *action_group,
const GtkActionEntry *entries,
guint n_entries,
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,
const GtkToggleActionEntry *entries,
guint n_entries,
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_radio_actions (GtkActionGroup *action_group,
const GtkRadioActionEntry *entries,
guint n_entries,
gint value,
GCallback on_change,
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_actions_full (GtkActionGroup *action_group,
const GtkActionEntry *entries,
guint n_entries,
gpointer user_data,
GDestroyNotify destroy);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_toggle_actions_full (GtkActionGroup *action_group,
const GtkToggleActionEntry *entries,
guint n_entries,
gpointer user_data,
GDestroyNotify destroy);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
const GtkRadioActionEntry *entries,
guint n_entries,
@ -230,15 +236,15 @@ void gtk_action_group_add_radio_actions_full (GtkActionGroup
GCallback on_change,
gpointer user_data,
GDestroyNotify destroy);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_set_translate_func (GtkActionGroup *action_group,
GtkTranslateFunc func,
gpointer data,
GDestroyNotify notify);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_action_group_set_translation_domain (GtkActionGroup *action_group,
const gchar *domain);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
const gchar * gtk_action_group_translate_string (GtkActionGroup *action_group,
const gchar *string);

View File

@ -259,6 +259,7 @@
*/
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkactivatable.h"
#include "gtkactiongroup.h"
#include "gtkprivate.h"
@ -281,6 +282,8 @@ gtk_activatable_default_init (GtkActivatableInterface *iface)
* call gtk_activatable_do_set_related_action() when it changes.</para></note>
*
* Since: 2.16
*
* Deprecated: 3.10
*/
g_object_interface_install_property (iface,
g_param_spec_object ("related-action",
@ -304,6 +307,8 @@ gtk_activatable_default_init (GtkActivatableInterface *iface)
* widget when it changes.</para></note>
*
* Since: 2.16
*
* Deprecated: 3.10
*/
g_object_interface_install_property (iface,
g_param_spec_boolean ("use-action-appearance",
@ -343,6 +348,8 @@ gtk_activatable_update (GtkActivatable *activatable,
* #GtkActivatable:use-action-appearance changes.
*
* Since: 2.16
*
* Deprecated: 3.10
**/
void
gtk_activatable_sync_action_properties (GtkActivatable *activatable,
@ -372,6 +379,8 @@ gtk_activatable_sync_action_properties (GtkActivatable *activatable,
* property and call gtk_activatable_do_set_related_action() when it changes.</para></note>
*
* Since: 2.16
*
* Deprecated: 3.10
**/
void
gtk_activatable_set_related_action (GtkActivatable *activatable,
@ -413,6 +422,8 @@ gtk_activatable_action_notify (GtkAction *action,
* previous action</para></note>
*
* Since: 2.16
*
* Deprecated: 3.10
*/
void
gtk_activatable_do_set_related_action (GtkActivatable *activatable,
@ -479,6 +490,8 @@ gtk_activatable_do_set_related_action (GtkActivatable *activatable,
* Returns: (transfer none): the related #GtkAction if one is set.
*
* Since: 2.16
*
* Deprecated: 3.10
**/
GtkAction *
gtk_activatable_get_related_action (GtkActivatable *activatable)
@ -510,7 +523,9 @@ gtk_activatable_get_related_action (GtkActivatable *activatable)
* if needed.</para></note>
*
* Since: 2.16
**/
*
* Deprecated: 3.10
**/
void
gtk_activatable_set_use_action_appearance (GtkActivatable *activatable,
gboolean use_appearance)
@ -529,7 +544,9 @@ gtk_activatable_set_use_action_appearance (GtkActivatable *activatable,
* Returns: whether @activatable uses its actions appearance.
*
* Since: 2.16
**/
*
* Deprecated: 3.10
**/
gboolean
gtk_activatable_get_use_action_appearance (GtkActivatable *activatable)
{

View File

@ -48,6 +48,8 @@ typedef struct _GtkActivatableIface GtkActivatableIface;
* with a %NULL action at times</para></note>
*
* Since: 2.16
*
* Deprecated: 3.10
*/
struct _GtkActivatableIface
@ -63,27 +65,27 @@ struct _GtkActivatableIface
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_activatable_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_activatable_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_activatable_set_related_action (GtkActivatable *activatable,
GtkAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_activatable_get_related_action (GtkActivatable *activatable);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_activatable_set_use_action_appearance (GtkActivatable *activatable,
gboolean use_appearance);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_activatable_get_use_action_appearance (GtkActivatable *activatable);
/* For use in activatable implementations */
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_activatable_do_set_related_action (GtkActivatable *activatable,
GtkAction *action);

View File

@ -188,10 +188,12 @@ static void gtk_button_get_preferred_height_and_baseline_for_width (GtkWidget *w
static guint button_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkButton, gtk_button, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE, gtk_button_actionable_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_button_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_button_class_init (GtkButtonClass *klass)
@ -381,8 +383,10 @@ gtk_button_class_init (GtkButtonClass *klass)
g_object_class_override_property (gobject_class, PROP_ACTION_NAME, "action-name");
g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target");
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance");
G_GNUC_END_IGNORE_DEPRECATIONS;
/**
* GtkButton::pressed:
@ -721,7 +725,9 @@ gtk_button_dispose (GObject *object)
if (priv->action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (button), NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->action = NULL;
}
G_OBJECT_CLASS (gtk_button_parent_class)->dispose (object);
@ -950,7 +956,9 @@ activatable_update_short_label (GtkButton *button,
child == NULL ||
GTK_IS_LABEL (child))
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_button_set_label (button, gtk_action_get_short_label (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_button_set_use_underline (button, TRUE);
}
}
@ -974,8 +982,12 @@ activatable_update_icon_name (GtkButton *button,
if (GTK_IS_IMAGE (image) &&
(gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_EMPTY ||
gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_ICON_NAME))
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_image_set_from_icon_name (GTK_IMAGE (image),
gtk_action_get_icon_name (action), GTK_ICON_SIZE_MENU);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
static void
@ -983,7 +995,11 @@ activatable_update_gicon (GtkButton *button,
GtkAction *action)
{
GtkWidget *image = gtk_button_get_image (button);
GIcon *icon = gtk_action_get_gicon (action);
GIcon *icon;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
icon = gtk_action_get_gicon (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (GTK_IS_IMAGE (image) &&
(gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_EMPTY ||
@ -1001,13 +1017,19 @@ gtk_button_update (GtkActivatable *activatable,
if (strcmp (property_name, "visible") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (gtk_action_is_visible (action))
gtk_widget_show (GTK_WIDGET (activatable));
else
gtk_widget_hide (GTK_WIDGET (activatable));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else if (strcmp (property_name, "sensitive") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
if (!priv->use_action_appearance)
return;
@ -1028,16 +1050,21 @@ gtk_button_sync_action_properties (GtkActivatable *activatable,
{
GtkButton *button = GTK_BUTTON (activatable);
GtkButtonPrivate *priv = button->priv;
gboolean always_show_image;
if (!action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (gtk_action_is_visible (action))
gtk_widget_show (GTK_WIDGET (activatable));
else
gtk_widget_hide (GTK_WIDGET (activatable));
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
always_show_image = gtk_action_get_always_show_image (action);
G_GNUC_END_IGNORE_DEPRECATIONS
if (priv->use_action_appearance)
{
@ -1047,8 +1074,7 @@ gtk_button_sync_action_properties (GtkActivatable *activatable,
activatable_update_icon_name (GTK_BUTTON (activatable), action);
}
gtk_button_set_always_show_image (button,
gtk_action_get_always_show_image (action));
gtk_button_set_always_show_image (button, always_show_image);
}
static void
@ -1071,7 +1097,9 @@ gtk_button_set_related_action (GtkButton *button,
g_signal_connect_after (button, "clicked",
G_CALLBACK (gtk_real_button_clicked), NULL);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (button), action);
G_GNUC_END_IGNORE_DEPRECATIONS
priv->action = action;
}
@ -1086,7 +1114,10 @@ gtk_button_set_use_action_appearance (GtkButton *button,
{
priv->use_action_appearance = use_appearance;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (button), priv->action);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
}
}

View File

@ -95,9 +95,11 @@ static void gtk_check_menu_item_sync_action_properties (GtkActivatable
static GtkActivatableIface *parent_activatable_iface;
static guint check_menu_item_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkCheckMenuItem, gtk_check_menu_item, GTK_TYPE_MENU_ITEM,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_check_menu_item_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
@ -192,11 +194,14 @@ gtk_check_menu_item_update (GtkActivatable *activatable,
const gchar *property_name)
{
GtkCheckMenuItem *check_menu_item;
gboolean use_action_appearance;
check_menu_item = GTK_CHECK_MENU_ITEM (activatable);
parent_activatable_iface->update (activatable, action, property_name);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "active") == 0)
{
gtk_action_block_activate (action);
@ -204,12 +209,19 @@ gtk_check_menu_item_update (GtkActivatable *activatable,
gtk_action_unblock_activate (action);
}
if (!gtk_activatable_get_use_action_appearance (activatable))
use_action_appearance = gtk_activatable_get_use_action_appearance (activatable);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!use_action_appearance)
return;
if (strcmp (property_name, "draw-as-radio") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_check_menu_item_set_draw_as_radio (check_menu_item,
gtk_toggle_action_get_draw_as_radio (GTK_TOGGLE_ACTION (action)));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
static void
@ -217,23 +229,35 @@ gtk_check_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkCheckMenuItem *check_menu_item;
gboolean use_action_appearance;
gboolean is_toggle_action;
check_menu_item = GTK_CHECK_MENU_ITEM (activatable);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
is_toggle_action = GTK_IS_TOGGLE_ACTION (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!is_toggle_action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_block_activate (action);
gtk_check_menu_item_set_active (check_menu_item, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
use_action_appearance = gtk_activatable_get_use_action_appearance (activatable);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!gtk_activatable_get_use_action_appearance (activatable))
if (!use_action_appearance)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_check_menu_item_set_draw_as_radio (check_menu_item,
gtk_toggle_action_get_draw_as_radio (GTK_TOGGLE_ACTION (action)));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
/**

View File

@ -213,6 +213,7 @@ static guint menu_item_signals[LAST_SIGNAL] = { 0 };
static GtkBuildableIface *parent_buildable_iface;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkMenuItem, gtk_menu_item, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
gtk_menu_item_buildable_interface_init)
@ -220,6 +221,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkMenuItem, gtk_menu_item, GTK_TYPE_BIN,
gtk_menu_item_activatable_interface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE,
gtk_menu_item_actionable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_menu_item_set_action_name (GtkActionable *actionable,
@ -634,8 +636,10 @@ gtk_menu_item_dispose (GObject *object)
if (priv->action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_disconnect_accelerator (priv->action);
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (menu_item), NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->action = NULL;
}
G_OBJECT_CLASS (gtk_menu_item_parent_class)->dispose (object);
@ -1119,7 +1123,9 @@ activatable_update_label (GtkMenuItem *menu_item, GtkAction *action)
{
const gchar *label;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
label = gtk_action_get_label (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_menu_item_set_label (menu_item, label);
}
}
@ -1184,10 +1190,18 @@ gtk_menu_item_update (GtkActivatable *activatable,
GtkMenuItemPrivate *priv = menu_item->priv;
if (strcmp (property_name, "visible") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
_gtk_action_sync_menu_visible (action, GTK_WIDGET (menu_item),
gtk_menu_is_empty (gtk_menu_item_get_submenu (menu_item)));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else if (strcmp (property_name, "sensitive") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_sensitive (GTK_WIDGET (menu_item), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else if (priv->use_action_appearance)
{
if (strcmp (property_name, "label") == 0)
@ -1217,7 +1231,9 @@ gtk_menu_item_sync_action_properties (GtkActivatable *activatable,
_gtk_action_sync_menu_visible (action, GTK_WIDGET (menu_item),
gtk_menu_is_empty (gtk_menu_item_get_submenu (menu_item)));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_sensitive (GTK_WIDGET (menu_item), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
if (priv->use_action_appearance)
{
@ -1236,12 +1252,14 @@ gtk_menu_item_sync_action_properties (GtkActivatable *activatable,
/* Make label point to the menu_item's label */
label = gtk_bin_get_child (GTK_BIN (menu_item));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (GTK_IS_ACCEL_LABEL (label) && gtk_action_get_accel_path (action))
{
gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (label), NULL);
gtk_accel_label_set_accel_closure (GTK_ACCEL_LABEL (label),
gtk_action_get_accel_closure (action));
}
G_GNUC_END_IGNORE_DEPRECATIONS;
activatable_update_label (menu_item, action);
}
@ -1256,6 +1274,8 @@ gtk_menu_item_set_related_action (GtkMenuItem *menu_item,
if (priv->action == action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (priv->action)
{
gtk_action_disconnect_accelerator (priv->action);
@ -1275,6 +1295,8 @@ gtk_menu_item_set_related_action (GtkMenuItem *menu_item,
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (menu_item), action);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->action = action;
}
@ -1288,7 +1310,9 @@ gtk_menu_item_set_use_action_appearance (GtkMenuItem *menu_item,
{
priv->use_action_appearance = use_appearance;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (menu_item), priv->action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
@ -1777,11 +1801,15 @@ gtk_real_menu_item_activate (GtkMenuItem *menu_item)
{
GtkMenuItemPrivate *priv = menu_item->priv;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (priv->action_helper)
gtk_action_helper_activate (priv->action_helper);
if (priv->action)
gtk_action_activate (priv->action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}

View File

@ -28,6 +28,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkradioaction.h"
#include "gtkradiomenuitem.h"
#include "gtktoggletoolbutton.h"
@ -109,6 +111,8 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
* for convenient ways to get and set this property.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_VALUE,
@ -126,6 +130,8 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
* Sets a new group for a radio action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_GROUP,
@ -142,6 +148,8 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
* this action belongs.
*
* Since: 2.10
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_CURRENT_VALUE,
@ -163,6 +171,8 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass)
* for the previous and current active members.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
radio_action_signals[CHANGED] =
g_signal_new (I_("changed"),
@ -206,6 +216,8 @@ gtk_radio_action_init (GtkRadioAction *action)
* Return value: a new #GtkRadioAction
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkRadioAction *
gtk_radio_action_new (const gchar *name,
@ -411,6 +423,8 @@ create_menu_item (GtkAction *action)
* Returns: (element-type GtkRadioAction) (transfer none): the list representing the radio group for this object
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GSList *
gtk_radio_action_get_group (GtkRadioAction *action)
@ -428,6 +442,8 @@ gtk_radio_action_get_group (GtkRadioAction *action)
* Sets the radio group for the radio action object.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_radio_action_set_group (GtkRadioAction *action,
@ -495,6 +511,8 @@ gtk_radio_action_set_group (GtkRadioAction *action,
* ]|
*
* Since: 3.0
*
* Deprecated: 3.10
*/
void
gtk_radio_action_join_group (GtkRadioAction *action,
@ -534,6 +552,8 @@ gtk_radio_action_join_group (GtkRadioAction *action,
* Return value: The value of the currently active group member
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gint
gtk_radio_action_get_current_value (GtkRadioAction *action)
@ -565,6 +585,8 @@ gtk_radio_action_get_current_value (GtkRadioAction *action)
* property @current_value.
*
* Since: 2.10
*
* Deprecated: 3.10
**/
void
gtk_radio_action_set_current_value (GtkRadioAction *action,

View File

@ -69,25 +69,25 @@ struct _GtkRadioActionClass
void (*_gtk_reserved4) (void);
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_radio_action_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkRadioAction *gtk_radio_action_new (const gchar *name,
const gchar *label,
const gchar *tooltip,
const gchar *stock_id,
gint value);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GSList *gtk_radio_action_get_group (GtkRadioAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_radio_action_set_group (GtkRadioAction *action,
GSList *group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_radio_action_join_group (GtkRadioAction *action,
GtkRadioAction *group_source);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gint gtk_radio_action_get_current_value (GtkRadioAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_radio_action_set_current_value (GtkRadioAction *action,
gint current_value);

View File

@ -497,10 +497,14 @@ gtk_radio_menu_item_activate (GtkMenuItem *menu_item)
gboolean active;
gint toggled;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (menu_item));
if (action && gtk_menu_item_get_submenu (menu_item) == NULL)
gtk_action_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
toggled = FALSE;
active = gtk_check_menu_item_get_active (check_menu_item);

View File

@ -19,6 +19,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkintl.h"
#include "gtkrecentaction.h"
#include "gtkimagemenuitem.h"
@ -631,6 +633,13 @@ gtk_recent_action_class_init (GtkRecentActionClass *klass)
_gtk_recent_chooser_install_properties (gobject_class);
/**
* GtkRecentAction:show-numbers:
*
* Whether the items should be displayed with a number.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_SHOW_NUMBERS,
g_param_spec_boolean ("show-numbers",
@ -685,6 +694,8 @@ gtk_recent_action_init (GtkRecentAction *action)
* Return value: the newly created #GtkRecentAction.
*
* Since: 2.12
*
* Deprecated: 3.10
*/
GtkAction *
gtk_recent_action_new (const gchar *name,
@ -720,6 +731,8 @@ gtk_recent_action_new (const gchar *name,
* Return value: the newly created #GtkRecentAction
*
* Since: 2.12
*
* Deprecated: 3.10
*/
GtkAction *
gtk_recent_action_new_for_manager (const gchar *name,
@ -749,6 +762,8 @@ gtk_recent_action_new_for_manager (const gchar *name,
* Return value: %TRUE if numbers should be shown.
*
* Since: 2.12
*
* Deprecated: 3.10
*/
gboolean
gtk_recent_action_get_show_numbers (GtkRecentAction *action)
@ -769,6 +784,8 @@ gtk_recent_action_get_show_numbers (GtkRecentAction *action)
* label. Only the first ten items get a number to avoid clashes.
*
* Since: 2.12
*
* Deprecated: 3.10
*/
void
gtk_recent_action_set_show_numbers (GtkRecentAction *action,

View File

@ -59,22 +59,22 @@ struct _GtkRecentActionClass
void (*_gtk_reserved4) (void);
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_recent_action_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_recent_action_new (const gchar *name,
const gchar *label,
const gchar *tooltip,
const gchar *stock_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_recent_action_new_for_manager (const gchar *name,
const gchar *label,
const gchar *tooltip,
const gchar *stock_id,
GtkRecentManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_recent_action_get_show_numbers (GtkRecentAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_recent_action_set_show_numbers (GtkRecentAction *action,
gboolean show_numbers);

View File

@ -1030,13 +1030,19 @@ _gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
GtkRecentAction *recent_action = GTK_RECENT_ACTION (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "show-numbers") == 0 && recent_chooser_has_show_numbers (recent_chooser))
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_object_set (recent_chooser, "show-numbers",
gtk_recent_action_get_show_numbers (recent_action), NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else if (strcmp (property_name, "show-private") == 0)
gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser));
else if (strcmp (property_name, "show-not-found") == 0)
@ -1059,16 +1065,22 @@ void
_gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!action)
return;
if (recent_chooser_has_show_numbers (recent_chooser))
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_object_set (recent_chooser, "show-numbers",
gtk_recent_action_get_show_numbers (GTK_RECENT_ACTION (action)),
NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
gtk_recent_chooser_set_show_private (recent_chooser, gtk_recent_chooser_get_show_private (action_chooser));
gtk_recent_chooser_set_show_not_found (recent_chooser, gtk_recent_chooser_get_show_not_found (action_chooser));
gtk_recent_chooser_set_show_tips (recent_chooser, gtk_recent_chooser_get_show_tips (action_chooser));
@ -1090,7 +1102,9 @@ _gtk_recent_chooser_set_related_action (GtkRecentChooser *recent_chooser,
if (prev_action == action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (recent_chooser), action);
G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_set_qdata (G_OBJECT (recent_chooser), quark_gtk_related_action, action);
}
@ -1118,7 +1132,9 @@ _gtk_recent_chooser_set_use_action_appearance (GtkRecentChooser *recent_chooser,
g_object_set_qdata (G_OBJECT (recent_chooser), quark_gtk_use_action_appearance, GINT_TO_POINTER (!use_appearance));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (recent_chooser), action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}

View File

@ -287,6 +287,7 @@ static void gtk_recent_chooser_update (GtkActivatable *act
static void gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserDefault,
_gtk_recent_chooser_default,
GTK_TYPE_BOX,
@ -294,7 +295,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserDefault,
gtk_recent_chooser_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_recent_chooser_activatable_iface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
@ -1862,6 +1863,7 @@ gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "visible") == 0)
{
if (gtk_action_is_visible (action))
@ -1873,6 +1875,8 @@ gtk_recent_chooser_update (GtkActivatable *activatable,
if (strcmp (property_name, "sensitive") == 0)
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
_gtk_recent_chooser_update (activatable, action, property_name);
}
@ -1881,6 +1885,7 @@ static void
gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (action)
{
if (gtk_action_is_visible (action))
@ -1890,6 +1895,7 @@ gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
}
G_GNUC_END_IGNORE_DEPRECATIONS;
_gtk_recent_chooser_sync_action_properties (activatable, action);
}

View File

@ -184,6 +184,7 @@ static void gtk_recent_chooser_update (GtkActivatable *act
static void gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserMenu,
gtk_recent_chooser_menu,
GTK_TYPE_MENU,
@ -191,7 +192,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserMenu,
gtk_recent_chooser_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_recent_chooser_activatable_iface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_recent_chooser_iface_init (GtkRecentChooserIface *iface)
@ -1200,9 +1201,13 @@ gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "sensitive") == 0)
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
_gtk_recent_chooser_update (activatable, action, property_name);
}
@ -1213,8 +1218,12 @@ gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
if (!action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
_gtk_recent_chooser_sync_action_properties (activatable, action);
}

View File

@ -95,11 +95,13 @@ static GParamSpec *switch_props[LAST_PROP] = { NULL, };
static void gtk_switch_actionable_iface_init (GtkActionableInterface *iface);
static void gtk_switch_activatable_interface_init (GtkActivatableIface *iface);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkSwitch, gtk_switch, GTK_TYPE_WIDGET,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIONABLE,
gtk_switch_actionable_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_switch_activatable_interface_init));
G_GNUC_END_IGNORE_DEPRECATIONS;
static gboolean
gtk_switch_button_press (GtkWidget *widget,
@ -640,7 +642,9 @@ gtk_switch_set_related_action (GtkSwitch *sw,
if (priv->action == action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (sw), action);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->action = action;
}
@ -655,7 +659,9 @@ gtk_switch_set_use_action_appearance (GtkSwitch *sw,
{
priv->use_action_appearance = use_appearance;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (sw), priv->action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
@ -787,7 +793,9 @@ gtk_switch_dispose (GObject *object)
if (priv->action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (object), NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->action = NULL;
}
@ -803,7 +811,10 @@ gtk_switch_class_init (GtkSwitchClass *klass)
g_type_class_add_private (klass, sizeof (GtkSwitchPrivate));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
activatable_iface = g_type_default_interface_peek (GTK_TYPE_ACTIVATABLE);
G_GNUC_END_IGNORE_DEPRECATIONS;
switch_props[PROP_RELATED_ACTION] =
g_param_spec_override ("related-action",
g_object_interface_find_property (activatable_iface,
@ -942,8 +953,10 @@ gtk_switch_set_active (GtkSwitch *sw,
if (priv->action_helper)
gtk_action_helper_activate (priv->action_helper);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (priv->action)
gtk_action_activate (priv->action);
G_GNUC_END_IGNORE_DEPRECATIONS;
accessible = gtk_widget_get_accessible (GTK_WIDGET (sw));
atk_object_notify_state_change (accessible, ATK_STATE_CHECKED, priv->is_active);
@ -980,6 +993,8 @@ gtk_switch_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "visible") == 0)
{
if (gtk_action_is_visible (action))
@ -997,6 +1012,8 @@ gtk_switch_update (GtkActivatable *activatable,
gtk_switch_set_active (GTK_SWITCH (activatable), gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
}
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void
@ -1006,6 +1023,8 @@ gtk_switch_sync_action_properties (GtkActivatable *activatable,
if (!action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (gtk_action_is_visible (action))
gtk_widget_show (GTK_WIDGET (activatable));
else
@ -1016,6 +1035,8 @@ gtk_switch_sync_action_properties (GtkActivatable *activatable,
gtk_action_block_activate (action);
gtk_switch_set_active (GTK_SWITCH (activatable), gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void

View File

@ -28,6 +28,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include "gtkintl.h"
#include "gtktoggleaction.h"
#include "gtktoggletoolbutton.h"
@ -109,6 +111,8 @@ gtk_toggle_action_class_init (GtkToggleActionClass *klass)
*
* This is an appearance property and thus only applies if
* #GtkActivatable:use-action-appearance is %TRUE.
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_DRAW_AS_RADIO,
@ -124,6 +128,8 @@ gtk_toggle_action_class_init (GtkToggleActionClass *klass)
* Whether the toggle action should be active.
*
* Since: 2.10
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_ACTIVE,
@ -138,6 +144,8 @@ gtk_toggle_action_class_init (GtkToggleActionClass *klass)
*
* Should be connected if you wish to perform an action
* whenever the #GtkToggleAction state is changed.
*
* Deprecated: 3.10
*/
action_signals[TOGGLED] =
g_signal_new (I_("toggled"),
@ -177,6 +185,8 @@ gtk_toggle_action_init (GtkToggleAction *action)
* Return value: a new #GtkToggleAction
*
* Since: 2.4
*
* Deprecated: 3.10
*/
GtkToggleAction *
gtk_toggle_action_new (const gchar *name,
@ -261,6 +271,8 @@ gtk_toggle_action_activate (GtkAction *action)
* Emits the "toggled" signal on the toggle action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_toggle_action_toggled (GtkToggleAction *action)
@ -278,6 +290,8 @@ gtk_toggle_action_toggled (GtkToggleAction *action)
* Sets the checked state on the toggle action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_toggle_action_set_active (GtkToggleAction *action,
@ -300,6 +314,8 @@ gtk_toggle_action_set_active (GtkToggleAction *action,
* Returns: the checked state of the toggle action
*
* Since: 2.4
*
* Deprecated: 3.10
*/
gboolean
gtk_toggle_action_get_active (GtkToggleAction *action)
@ -319,6 +335,8 @@ gtk_toggle_action_get_active (GtkToggleAction *action)
* Sets whether the action should have proxies like a radio action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
void
gtk_toggle_action_set_draw_as_radio (GtkToggleAction *action,
@ -345,6 +363,8 @@ gtk_toggle_action_set_draw_as_radio (GtkToggleAction *action,
* Returns: whether the action should have proxies like a radio action.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
gboolean
gtk_toggle_action_get_draw_as_radio (GtkToggleAction *action)
@ -374,6 +394,8 @@ create_menu_item (GtkAction *action)
*
* Sets the #GtkToggleAction:active property directly. This function does
* not emit signals or notifications: it is left to the caller to do so.
*
* Deprecated: 3.10
*/
void
_gtk_toggle_action_set_active (GtkToggleAction *toggle_action,

View File

@ -69,24 +69,24 @@ struct _GtkToggleActionClass
void (*_gtk_reserved4) (void);
};
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_toggle_action_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkToggleAction *gtk_toggle_action_new (const gchar *name,
const gchar *label,
const gchar *tooltip,
const gchar *stock_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_toggle_action_toggled (GtkToggleAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_toggle_action_set_active (GtkToggleAction *action,
gboolean is_active);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_toggle_action_get_active (GtkToggleAction *action);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_toggle_action_set_draw_as_radio (GtkToggleAction *action,
gboolean draw_as_radio);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gboolean gtk_toggle_action_get_draw_as_radio (GtkToggleAction *action);
/* private */

View File

@ -139,9 +139,11 @@ static void gtk_toggle_button_sync_action_properties (GtkActivatable *acti
static GtkActivatableIface *parent_activatable_iface;
static guint toggle_button_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkToggleButton, gtk_toggle_button, GTK_TYPE_BUTTON,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_toggle_button_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_toggle_button_class_init (GtkToggleButtonClass *class)
@ -248,9 +250,11 @@ gtk_toggle_button_update (GtkActivatable *activatable,
if (strcmp (property_name, "active") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_block_activate (action);
gtk_toggle_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
@ -260,17 +264,24 @@ gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkToggleButton *button;
gboolean is_toggle_action;
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
is_toggle_action = GTK_IS_TOGGLE_ACTION (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!is_toggle_action)
return;
button = GTK_TOGGLE_BUTTON (activatable);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_block_activate (action);
gtk_toggle_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
/**

View File

@ -90,9 +90,11 @@ static void gtk_toggle_tool_button_sync_action_properties (GtkActivatable
static GtkActivatableIface *parent_activatable_iface;
static guint toggle_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkToggleToolButton, gtk_toggle_tool_button, GTK_TYPE_TOOL_BUTTON,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_toggle_tool_button_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass)
@ -349,9 +351,11 @@ gtk_toggle_tool_button_update (GtkActivatable *activatable,
if (strcmp (property_name, "active") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_block_activate (action);
gtk_toggle_tool_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
@ -360,17 +364,24 @@ gtk_toggle_tool_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkToggleToolButton *button;
gboolean is_toggle_action;
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
is_toggle_action = GTK_IS_TOGGLE_ACTION (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!is_toggle_action)
return;
button = GTK_TOGGLE_TOOL_BUTTON (activatable);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_block_activate (action);
gtk_toggle_tool_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
gtk_action_unblock_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}

View File

@ -163,9 +163,11 @@ gtk_tool_button_get_type (void)
(GInstanceInitFunc) gtk_tool_button_init,
0);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_type_add_interface_static (type, GTK_TYPE_ACTIONABLE, &actionable_info);
g_type_add_interface_static (type, GTK_TYPE_ACTIVATABLE,
&activatable_info);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
return type;
}
@ -899,11 +901,15 @@ button_clicked (GtkWidget *widget,
{
GtkAction *action;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (button));
if (action)
gtk_action_activate (action);
G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_emit_by_name (button, "clicked");
}
@ -952,22 +958,25 @@ gtk_tool_button_update (GtkActivatable *activatable,
{
GtkToolButton *button;
GtkWidget *image;
gboolean use_action_appearance;
parent_activatable_iface->update (activatable, action, property_name);
if (!gtk_activatable_get_use_action_appearance (activatable))
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
use_action_appearance = gtk_activatable_get_use_action_appearance (activatable);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!use_action_appearance)
return;
button = GTK_TOOL_BUTTON (activatable);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "short-label") == 0)
gtk_tool_button_set_label (button, gtk_action_get_short_label (action));
else if (strcmp (property_name, "stock-id") == 0)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else if (strcmp (property_name, "gicon") == 0)
{
const gchar *stock_id = gtk_action_get_stock_id (action);
@ -981,6 +990,7 @@ gtk_tool_button_update (GtkActivatable *activatable,
icon_set = gtk_icon_factory_lookup_default (stock_id);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (icon_set != NULL || !icon)
image = NULL;
@ -999,6 +1009,8 @@ gtk_tool_button_update (GtkActivatable *activatable,
}
else if (strcmp (property_name, "icon-name") == 0)
gtk_tool_button_set_icon_name (button, gtk_action_get_icon_name (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void

View File

@ -153,9 +153,11 @@ static void gtk_tool_item_set_use_action_appearance (GtkToolItem *item
static guint toolitem_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkToolItem, gtk_tool_item, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_tool_item_activatable_interface_init))
G_GNUC_END_IGNORE_DEPRECATIONS;
static void
gtk_tool_item_class_init (GtkToolItemClass *klass)
@ -314,7 +316,9 @@ gtk_tool_item_dispose (GObject *object)
if (item->priv->action)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (item), NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
item->priv->action = NULL;
}
G_OBJECT_CLASS (gtk_tool_item_parent_class)->dispose (object);
@ -559,6 +563,9 @@ _gtk_tool_item_create_menu_proxy (GtkToolItem *item)
{
GtkWidget *menu_item;
gboolean visible_overflown;
gboolean ret = FALSE;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (item->priv->action)
{
@ -575,10 +582,12 @@ _gtk_tool_item_create_menu_proxy (GtkToolItem *item)
else
gtk_tool_item_set_proxy_menu_item (item, "gtk-action-menu-item", NULL);
return TRUE;
ret = TRUE;
}
return FALSE;
G_GNUC_END_IGNORE_DEPRECATIONS;
return ret;
}
static void
@ -593,6 +602,8 @@ gtk_tool_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (strcmp (property_name, "visible") == 0)
{
if (gtk_action_is_visible (action))
@ -614,6 +625,8 @@ gtk_tool_item_update (GtkActivatable *activatable,
else if (strcmp (property_name, "is-important") == 0)
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (activatable),
gtk_action_get_is_important (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void
@ -623,6 +636,8 @@ gtk_tool_item_sync_action_properties (GtkActivatable *activatable,
if (!action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (gtk_action_is_visible (action))
gtk_widget_show (GTK_WIDGET (activatable));
else
@ -638,6 +653,8 @@ gtk_tool_item_sync_action_properties (GtkActivatable *activatable,
gtk_action_get_visible_vertical (action));
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (activatable),
gtk_action_get_is_important (action));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void
@ -647,7 +664,9 @@ gtk_tool_item_set_related_action (GtkToolItem *item,
if (item->priv->action == action)
return;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (item), action);
G_GNUC_END_IGNORE_DEPRECATIONS;
item->priv->action = action;
@ -665,7 +684,9 @@ gtk_tool_item_set_use_action_appearance (GtkToolItem *item,
{
item->priv->use_action_appearance = use_appearance;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (item), item->priv->action);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}

View File

@ -28,6 +28,8 @@
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include <string.h>
#include "gtkaccellabel.h"
#include "gtkactivatable.h"
@ -503,6 +505,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* gtk_ui_manager_get_widget().
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[ADD_WIDGET] =
g_signal_new (I_("add-widget"),
@ -522,6 +526,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* changes.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[ACTIONS_CHANGED] =
g_signal_new (I_("actions-changed"),
@ -546,6 +552,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* statusbar.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[CONNECT_PROXY] =
g_signal_new (I_("connect-proxy"),
@ -568,6 +576,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* from an action in the group.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[DISCONNECT_PROXY] =
g_signal_new (I_("disconnect-proxy"),
@ -592,6 +602,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* just before any action is activated.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[PRE_ACTIVATE] =
g_signal_new (I_("pre-activate"),
@ -615,6 +627,8 @@ gtk_ui_manager_class_init (GtkUIManagerClass *klass)
* just after any action is activated.
*
* Since: 2.4
*
* Deprecated: 3.10
*/
ui_manager_signals[POST_ACTIVATE] =
g_signal_new (I_("post-activate"),
@ -847,6 +861,8 @@ gtk_ui_manager_real_get_action (GtkUIManager *manager,
* Return value: a new ui manager object.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GtkUIManager*
gtk_ui_manager_new (void)
@ -968,6 +984,8 @@ cb_proxy_post_activate (GtkActionGroup *group,
* list.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_ui_manager_insert_action_group (GtkUIManager *manager,
@ -1025,6 +1043,8 @@ gtk_ui_manager_insert_action_group (GtkUIManager *manager,
* with @manager.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_ui_manager_remove_action_group (GtkUIManager *manager,
@ -1063,6 +1083,8 @@ gtk_ui_manager_remove_action_group (GtkUIManager *manager,
* and should not be modified.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GList *
gtk_ui_manager_get_action_groups (GtkUIManager *manager)
@ -1081,6 +1103,8 @@ gtk_ui_manager_get_action_groups (GtkUIManager *manager)
* Return value: (transfer none): the #GtkAccelGroup.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GtkAccelGroup *
gtk_ui_manager_get_accel_group (GtkUIManager *manager)
@ -1113,6 +1137,8 @@ gtk_ui_manager_get_accel_group (GtkUIManager *manager)
* was found.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GtkWidget *
gtk_ui_manager_get_widget (GtkUIManager *manager,
@ -1169,6 +1195,8 @@ collect_toplevels (GNode *node,
* all toplevel widgets of the requested types. Free the returned list with g_slist_free().
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GSList *
gtk_ui_manager_get_toplevels (GtkUIManager *manager,
@ -1205,6 +1233,8 @@ gtk_ui_manager_get_toplevels (GtkUIManager *manager,
* or %NULL if no widget was found.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
GtkAction *
gtk_ui_manager_get_action (GtkUIManager *manager,
@ -1414,6 +1444,8 @@ free_node (GNode *node)
* Return value: an unused merge id.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
guint
gtk_ui_manager_new_merge_id (GtkUIManager *manager)
@ -1938,6 +1970,8 @@ add_ui_from_string (GtkUIManager *manager,
* the return value is 0.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
guint
gtk_ui_manager_add_ui_from_string (GtkUIManager *manager,
@ -1980,6 +2014,8 @@ gtk_ui_manager_add_ui_from_string (GtkUIManager *manager,
* the return value is 0.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
guint
gtk_ui_manager_add_ui_from_file (GtkUIManager *manager,
@ -2015,6 +2051,8 @@ gtk_ui_manager_add_ui_from_file (GtkUIManager *manager,
* the return value is 0.
*
* Since: 3.4
*
* Deprecated: 3.10
**/
guint
gtk_ui_manager_add_ui_from_resource (GtkUIManager *manager,
@ -2058,6 +2096,8 @@ gtk_ui_manager_add_ui_from_resource (GtkUIManager *manager,
* before or after this item, depending on @top.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_ui_manager_add_ui (GtkUIManager *manager,
@ -2216,6 +2256,8 @@ remove_ui (GNode *node,
* Unmerges the part of @manager<!-- -->s content identified by @merge_id.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_ui_manager_remove_ui (GtkUIManager *manager,
@ -3165,6 +3207,8 @@ queue_update (GtkUIManager *manager)
* ]|
*
* Since: 2.4
*
* Deprecated: 3.10
**/
void
gtk_ui_manager_ensure_update (GtkUIManager *manager)
@ -3331,6 +3375,8 @@ gtk_ui_manager_buildable_custom_tag_end (GtkBuildable *buildable,
* the merged UI.
*
* Since: 2.4
*
* Deprecated: 3.10
**/
gchar *
gtk_ui_manager_get_ui (GtkUIManager *manager)

View File

@ -107,6 +107,8 @@ struct _GtkUIManagerClass {
*
* These enumeration values are used by gtk_ui_manager_add_ui() to determine
* what UI element to create.
*
* Deprecated: 3.10
*/
typedef enum {
GTK_UI_MANAGER_AUTO = 0,
@ -122,9 +124,9 @@ typedef enum {
GTK_UI_MANAGER_POPUP_WITH_ACCELS = 1 << 9
} GtkUIManagerItemType;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GType gtk_ui_manager_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkUIManager *gtk_ui_manager_new (void);
GDK_DEPRECATED_IN_3_4
void gtk_ui_manager_set_add_tearoffs (GtkUIManager *manager,
@ -132,40 +134,40 @@ void gtk_ui_manager_set_add_tearoffs (GtkUIManager *manage
GDK_DEPRECATED_IN_3_4
gboolean gtk_ui_manager_get_add_tearoffs (GtkUIManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_ui_manager_insert_action_group (GtkUIManager *manager,
GtkActionGroup *action_group,
gint pos);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_ui_manager_remove_action_group (GtkUIManager *manager,
GtkActionGroup *action_group);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GList *gtk_ui_manager_get_action_groups (GtkUIManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAccelGroup *gtk_ui_manager_get_accel_group (GtkUIManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkWidget *gtk_ui_manager_get_widget (GtkUIManager *manager,
const gchar *path);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GSList *gtk_ui_manager_get_toplevels (GtkUIManager *manager,
GtkUIManagerItemType types);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
GtkAction *gtk_ui_manager_get_action (GtkUIManager *manager,
const gchar *path);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
guint gtk_ui_manager_add_ui_from_string (GtkUIManager *manager,
const gchar *buffer,
gssize length,
GError **error);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
guint gtk_ui_manager_add_ui_from_file (GtkUIManager *manager,
const gchar *filename,
GError **error);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
guint gtk_ui_manager_add_ui_from_resource(GtkUIManager *manager,
const gchar *resource_path,
GError **error);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_ui_manager_add_ui (GtkUIManager *manager,
guint merge_id,
const gchar *path,
@ -173,14 +175,14 @@ void gtk_ui_manager_add_ui (GtkUIManager *manage
const gchar *action,
GtkUIManagerItemType type,
gboolean top);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_ui_manager_remove_ui (GtkUIManager *manager,
guint merge_id);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
gchar *gtk_ui_manager_get_ui (GtkUIManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
void gtk_ui_manager_ensure_update (GtkUIManager *manager);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_10
guint gtk_ui_manager_new_merge_id (GtkUIManager *manager);
G_END_DECLS

View File

@ -16,6 +16,7 @@
*/
#include "config.h"
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include <gtk/gtk.h>
static GtkActionGroup *action_group = NULL;

View File

@ -16,6 +16,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#define GDK_DISABLE_DEPRECATION_WARNINGS
#include <gtk/gtk.h>
/* Fixture */

View File

@ -349,7 +349,9 @@ test_uimanager_simple (void)
builder = builder_new_from_string (buffer, -1, NULL);
uimgr = gtk_builder_get_object (builder, "uimgr1");
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_assert (GTK_IS_UI_MANAGER (uimgr));
G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_unref (builder);
builder = builder_new_from_string (buffer2, -1, NULL);