Rename gtk_activatable_reset to gtk_activatable_sync_action_properties,

* gtk/gtk.symbols:
        * gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to
        gtk_activatable_sync_action_properties, since the previous name
        was deemed too generic. Update all implementations.


svn path=/trunk/; revision=22389
This commit is contained in:
Matthias Clasen 2009-02-22 05:20:14 +00:00
parent 005f5773df
commit e6f6ee193d
17 changed files with 237 additions and 227 deletions

View File

@ -1,3 +1,10 @@
2009-02-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to
gtk_activatable_sync_action_properties, since the previous name
was deemed too generic. Update all implementations.
2009-02-19 Ray Strode <rstrode@redhat.com>
* gdk/x11/gdkscreen-x11.c

View File

@ -236,7 +236,7 @@ GtkActivatableIface
gtk_activatable_do_set_related_action
gtk_activatable_get_related_action
gtk_activatable_get_use_action_appearance
gtk_activatable_reset
gtk_activatable_sync_action_properties
gtk_activatable_set_related_action
gtk_activatable_set_use_action_appearance
<SUBSECTION Standard>

View File

@ -234,7 +234,7 @@ gtk_activatable_do_set_related_action
gtk_activatable_get_related_action
gtk_activatable_get_type G_GNUC_CONST
gtk_activatable_get_use_action_appearance
gtk_activatable_reset
gtk_activatable_sync_action_properties
gtk_activatable_set_related_action
gtk_activatable_set_use_action_appearance
#endif

View File

@ -30,14 +30,15 @@
* <title>Implementing GtkActivatable</title>
* <para>
* When extending a class that is already #GtkActivatable; it is only
* necessary to implement the #GtkActivatable->reset() and #GtkActivatable->update()
* methods and chain up to the parent implementation, however when introducing
* necessary to implement the #GtkActivatable->sync_action_properties()
* and #GtkActivatable->update() methods and chain up to the parent
* implementation, however when introducing
* a new #GtkActivatable class; the #GtkActivatable:related-action and
* #GtkActivatable:use-action-appearance properties need to be handled by
* the implementor. Handling these properties is mostly a matter of installing
* the action pointer and boolean flag on your instance, and calling
* gtk_activatable_do_set_related_action() and gtk_activatable_reset() at the
* appropriate times.
* gtk_activatable_do_set_related_action() and
* gtk_activatable_sync_action_properties() at the appropriate times.
* </para>
* <example>
* <title>A class fragment implementing #GtkActivatable</title>
@ -65,7 +66,7 @@
* static void foo_bar_activatable_update (GtkActivatable *activatable,
* GtkAction *action,
* const gchar *property_name);
* static void foo_bar_activatable_reset (GtkActivatable *activatable,
* static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable,
* GtkAction *action);
* ...
*
@ -87,7 +88,7 @@
* foo_bar_activatable_interface_init (GtkActivatableIface *iface)
* {
* iface->update = foo_bar_activatable_update;
* iface->reset = foo_bar_activatable_reset;
* iface->sync_action_properties = foo_bar_activatable_sync_action_properties;
* }
*
* ... Break the reference using gtk_activatable_do_set_related_action()...
@ -173,7 +174,7 @@
* {
* priv->use_action_appearance = use_appearance;
*
* gtk_activatable_reset (GTK_ACTIVATABLE (bar), priv->action);
* gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action);
* }
* }
*
@ -196,7 +197,7 @@
*
* ... Selectively reset and update activatable depending on the use-action-appearance property ...
* static void
* gtk_button_activatable_reset (GtkActivatable *activatable,
* gtk_button_activatable_sync_action_properties (GtkActivatable *activatable,
* GtkAction *action)
* {
* GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
@ -316,7 +317,8 @@ gtk_activatable_class_init (gpointer g_iface)
* should be ignored by the #GtkActivatable when this property is %FALSE.
*
* <note><para>#GtkActivatable implementors need to handle this property
* and call gtk_activatable_reset() on the activatable widget when it changes.</para></note>
* and call gtk_activatable_sync_action_properties() on the activatable
* widget when it changes.</para></note>
*
* Since: 2.16
*/
@ -348,18 +350,19 @@ gtk_activatable_update (GtkActivatable *activatable,
}
/**
* gtk_activatable_reset:
* gtk_activatable_sync_action_properties:
* @activatable: a #GtkActivatable
* @action: the related #GtkAction or %NULL
*
* This is called to update the activatable completely, this is called internally when
* the #GtkActivatable::related-action property is set or unset and by the implementing
* class when #GtkActivatable::use-action-appearance changes.
* This is called to update the activatable completely, this is called
* internally when the #GtkActivatable::related-action property is set
* or unset and by the implementing class when
* #GtkActivatable::use-action-appearance changes.
*
* Since: 2.16
**/
void
gtk_activatable_reset (GtkActivatable *activatable,
gtk_activatable_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkActivatableIface *iface;
@ -367,10 +370,10 @@ gtk_activatable_reset (GtkActivatable *activatable,
g_return_if_fail (GTK_IS_ACTIVATABLE (activatable));
iface = GTK_ACTIVATABLE_GET_IFACE (activatable);
if (iface->reset)
iface->reset (activatable, action);
if (iface->sync_action_properties)
iface->sync_action_properties (activatable, action);
else
g_critical ("GtkActivatable->reset() unimplemented for type %s",
g_critical ("GtkActivatable->sync_action_properties() unimplemented for type %s",
g_type_name (G_OBJECT_TYPE (activatable)));
}
@ -450,16 +453,16 @@ gtk_activatable_do_set_related_action (GtkActivatable *activatable,
/*
* We don't want prev_action to be activated
* during the reset() call when syncing "active".
* during the sync_action_properties() call when syncing "active".
*/
gtk_action_block_activate (prev_action);
}
/* Some applications rely on their proxy UI to be set up
* before they receive the ::connect-proxy signal, so we
* need to call reset() before add_to_proxy_list().
* need to call sync_action_properties() before add_to_proxy_list().
*/
gtk_activatable_reset (activatable, action);
gtk_activatable_sync_action_properties (activatable, action);
if (prev_action)
{
@ -514,8 +517,10 @@ gtk_activatable_get_related_action (GtkActivatable *activatable)
* Sets whether this activatable should reset its layout and appearance
* when setting the related action or when the action changes appearance
*
* <note><para>#GtkActivatable implementors need to handle the #GtkActivatable:use-action-appearance
* property and call gtk_activatable_reset() to update @activatable if needed.</para></note>
* <note><para>#GtkActivatable implementors need to handle the
* #GtkActivatable:use-action-appearance property and call
* gtk_activatable_sync_action_properties() to update @activatable
* if needed.</para></note>
*
* Since: 2.16
**/

View File

@ -45,7 +45,7 @@ typedef struct _GtkActivatableIface GtkActivatableIface;
* @update: Called to update the activatable when its related action's properties change.
* You must check the #GtkActivatable:use-action-appearance property only apply action
* properties that are meant to effect the appearance accordingly.
* @reset: Called to update the activatable completely, this is called internally when
* @sync_action_properties: Called to update the activatable completely, this is called internally when
* #GtkActivatable::related-action property is set or unset and by the implementor when
* #GtkActivatable::use-action-appearance changes.<note><para>This method can be called
* with a %NULL action at times</para></note>
@ -61,14 +61,14 @@ struct _GtkActivatableIface
void (* update) (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
void (* reset) (GtkActivatable *activatable,
void (* sync_action_properties) (GtkActivatable *activatable,
GtkAction *action);
};
GType gtk_activatable_get_type (void) G_GNUC_CONST;
void gtk_activatable_reset (GtkActivatable *activatable,
void gtk_activatable_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
void gtk_activatable_set_related_action (GtkActivatable *activatable,

View File

@ -149,10 +149,10 @@ static void gtk_button_grab_notify (GtkWidget *widget,
static void gtk_button_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_button_activatable_update (GtkActivatable *activatable,
static void gtk_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_button_activatable_reset (GtkActivatable *activatable,
static void gtk_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static void gtk_button_set_related_action (GtkButton *button,
GtkAction *action);
@ -741,8 +741,8 @@ gtk_button_get_property (GObject *object,
static void
gtk_button_activatable_interface_init (GtkActivatableIface *iface)
{
iface->update = gtk_button_activatable_update;
iface->reset = gtk_button_activatable_reset;
iface->update = gtk_button_update;
iface->sync_action_properties = gtk_button_sync_action_properties;
}
static void
@ -808,7 +808,7 @@ activatable_update_gicon (GtkButton *button,
}
static void
gtk_button_activatable_update (GtkActivatable *activatable,
gtk_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -838,7 +838,7 @@ gtk_button_activatable_update (GtkActivatable *activatable,
}
static void
gtk_button_activatable_reset (GtkActivatable *activatable,
gtk_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
@ -895,7 +895,7 @@ gtk_button_set_use_action_appearance (GtkButton *button,
{
priv->use_action_appearance = use_appearance;
gtk_activatable_reset (GTK_ACTIVATABLE (button), priv->action);
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (button), priv->action);
}
}

View File

@ -65,10 +65,10 @@ static void gtk_check_menu_item_get_property (GObject *obj
GParamSpec *pspec);
static void gtk_check_menu_item_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_check_menu_item_activatable_update (GtkActivatable *activatable,
static void gtk_check_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_check_menu_item_activatable_reset (GtkActivatable *activatable,
static void gtk_check_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static GtkActivatableIface *parent_activatable_iface;
@ -148,12 +148,12 @@ static void
gtk_check_menu_item_activatable_interface_init (GtkActivatableIface *iface)
{
parent_activatable_iface = g_type_interface_peek_parent (iface);
iface->update = gtk_check_menu_item_activatable_update;
iface->reset = gtk_check_menu_item_activatable_reset;
iface->update = gtk_check_menu_item_update;
iface->sync_action_properties = gtk_check_menu_item_sync_action_properties;
}
static void
gtk_check_menu_item_activatable_update (GtkActivatable *activatable,
gtk_check_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -179,14 +179,14 @@ gtk_check_menu_item_activatable_update (GtkActivatable *activatable,
}
static void
gtk_check_menu_item_activatable_reset (GtkActivatable *activatable,
gtk_check_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkCheckMenuItem *check_menu_item;
check_menu_item = GTK_CHECK_MENU_ITEM (activatable);
parent_activatable_iface->reset (activatable, action);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
return;

View File

@ -72,10 +72,10 @@ static void gtk_image_menu_item_screen_changed (GtkWidget *widget,
static void gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item);
static void gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_image_menu_item_activatable_update (GtkActivatable *activatable,
static void gtk_image_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_image_menu_item_activatable_reset (GtkActivatable *activatable,
static void gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
typedef struct {
@ -552,8 +552,8 @@ static void
gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface)
{
parent_activatable_iface = g_type_interface_peek_parent (iface);
iface->update = gtk_image_menu_item_activatable_update;
iface->reset = gtk_image_menu_item_activatable_reset;
iface->update = gtk_image_menu_item_update;
iface->sync_action_properties = gtk_image_menu_item_sync_action_properties;
}
static gboolean
@ -610,7 +610,7 @@ activatable_update_icon_name (GtkImageMenuItem *image_menu_item, GtkAction *acti
}
static void
gtk_image_menu_item_activatable_update (GtkActivatable *activatable,
gtk_image_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -635,7 +635,7 @@ gtk_image_menu_item_activatable_update (GtkActivatable *activatable,
}
static void
gtk_image_menu_item_activatable_reset (GtkActivatable *activatable,
gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkImageMenuItem *image_menu_item;
@ -644,7 +644,7 @@ gtk_image_menu_item_activatable_reset (GtkActivatable *activatable,
image_menu_item = GTK_IMAGE_MENU_ITEM (activatable);
parent_activatable_iface->reset (activatable, action);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!action)
return;

View File

@ -134,10 +134,10 @@ static void gtk_menu_item_buildable_add_child (GtkBuildable *buildab
const gchar *type);
static void gtk_menu_item_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_menu_item_activatable_update (GtkActivatable *activatable,
static void gtk_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_menu_item_activatable_reset (GtkActivatable *activatable,
static void gtk_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static void gtk_menu_item_set_related_action (GtkMenuItem *menu_item,
GtkAction *action);
@ -576,8 +576,8 @@ gtk_menu_item_buildable_add_child (GtkBuildable *buildable,
static void
gtk_menu_item_activatable_interface_init (GtkActivatableIface *iface)
{
iface->update = gtk_menu_item_activatable_update;
iface->reset = gtk_menu_item_activatable_reset;
iface->update = gtk_menu_item_update;
iface->sync_action_properties = gtk_menu_item_sync_action_properties;
}
static void
@ -597,7 +597,7 @@ activatable_update_label (GtkMenuItem *menu_item, GtkAction *action)
gboolean _gtk_menu_is_empty (GtkWidget *menu);
static void
gtk_menu_item_activatable_update (GtkActivatable *activatable,
gtk_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -617,7 +617,7 @@ gtk_menu_item_activatable_update (GtkActivatable *activatable,
}
static void
gtk_menu_item_activatable_reset (GtkActivatable *activatable,
gtk_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkMenuItem *menu_item = GTK_MENU_ITEM (activatable);
@ -700,7 +700,7 @@ gtk_menu_item_set_use_action_appearance (GtkMenuItem *menu_item,
{
priv->use_action_appearance = use_appearance;
gtk_activatable_reset (GTK_ACTIVATABLE (menu_item), priv->action);
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (menu_item), priv->action);
}
}

View File

@ -1094,7 +1094,7 @@ _gtk_recent_chooser_selection_changed (GtkRecentChooser *chooser)
}
void
_gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
_gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -1124,7 +1124,7 @@ _gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
}
void
_gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
_gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
@ -1186,7 +1186,7 @@ _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));
gtk_activatable_reset (GTK_ACTIVATABLE (recent_chooser), action);
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (recent_chooser), action);
}
}

View File

@ -284,10 +284,10 @@ static gboolean recent_view_query_tooltip_cb (GtkWidget *widget,
gpointer user_data);
static void gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface);
static void gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
static void gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
static void gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserDefault,
@ -322,8 +322,8 @@ static void
gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface)
{
iface->update = gtk_recent_chooser_activatable_update;
iface->reset = gtk_recent_chooser_activatable_reset;
iface->update = gtk_recent_chooser_update;
iface->sync_action_properties = gtk_recent_chooser_sync_action_properties;
}
static void
@ -1949,7 +1949,7 @@ set_recent_manager (GtkRecentChooserDefault *impl,
}
static void
gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -1964,12 +1964,12 @@ gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
if (strcmp (property_name, "sensitive") == 0)
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
_gtk_recent_chooser_activatable_update (activatable, action, property_name);
_gtk_recent_chooser_update (activatable, action, property_name);
}
static void
gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
if (action)
@ -1982,7 +1982,7 @@ gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
}
_gtk_recent_chooser_activatable_reset (activatable, action);
_gtk_recent_chooser_sync_action_properties (activatable, action);
}

View File

@ -161,10 +161,10 @@ static void manager_changed_cb (GtkRecentManager *manager,
gpointer user_data);
static void gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface);
static void gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
static void gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
static void gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserMenu,
@ -195,10 +195,9 @@ gtk_recent_chooser_iface_init (GtkRecentChooserIface *iface)
static void
gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface)
{
iface->update = gtk_recent_chooser_activatable_update;
iface->reset = gtk_recent_chooser_activatable_reset;
iface->update = gtk_recent_chooser_update;
iface->sync_action_properties = gtk_recent_chooser_sync_action_properties;
}
static void
@ -1174,23 +1173,23 @@ gtk_recent_chooser_menu_set_show_tips (GtkRecentChooserMenu *menu,
}
static void
gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
if (strcmp (property_name, "sensitive") == 0)
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
_gtk_recent_chooser_activatable_update (activatable, action, property_name);
_gtk_recent_chooser_update (activatable, action, property_name);
}
static void
gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
_gtk_recent_chooser_activatable_reset (activatable, action);
_gtk_recent_chooser_sync_action_properties (activatable, action);
}

View File

@ -38,10 +38,10 @@ GList * _gtk_recent_chooser_get_items (GtkRecentChooser
void _gtk_recent_chooser_item_activated (GtkRecentChooser *chooser);
void _gtk_recent_chooser_selection_changed (GtkRecentChooser *chooser);
void _gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
void _gtk_recent_chooser_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
void _gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
void _gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
void _gtk_recent_chooser_set_related_action (GtkRecentChooser *recent_chooser,
GtkAction *action);

View File

@ -71,10 +71,10 @@ static void gtk_toggle_button_update_state (GtkButton *button);
static void gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_toggle_button_activatable_update (GtkActivatable *activatable,
static void gtk_toggle_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_toggle_button_activatable_reset (GtkActivatable *activatable,
static void gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static GtkActivatableIface *parent_activatable_iface;
@ -151,17 +151,16 @@ gtk_toggle_button_init (GtkToggleButton *toggle_button)
GTK_BUTTON (toggle_button)->depress_on_activate = TRUE;
}
static void
gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface)
{
parent_activatable_iface = g_type_interface_peek_parent (iface);
iface->update = gtk_toggle_button_activatable_update;
iface->reset = gtk_toggle_button_activatable_reset;
iface->update = gtk_toggle_button_update;
iface->sync_action_properties = gtk_toggle_button_sync_action_properties;
}
static void
gtk_toggle_button_activatable_update (GtkActivatable *activatable,
gtk_toggle_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -181,12 +180,12 @@ gtk_toggle_button_activatable_update (GtkActivatable *activatable,
}
static void
gtk_toggle_button_activatable_reset (GtkActivatable *activatable,
gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkToggleButton *button;
parent_activatable_iface->reset (activatable, action);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
return;

View File

@ -71,10 +71,10 @@ static void menu_item_activated (GtkWidget *widget,
static void gtk_toggle_tool_button_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_toggle_tool_button_activatable_update (GtkActivatable *activatable,
static void gtk_toggle_tool_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_toggle_tool_button_activatable_reset (GtkActivatable *activatable,
static void gtk_toggle_tool_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static GtkActivatableIface *parent_activatable_iface;
@ -315,12 +315,12 @@ static void
gtk_toggle_tool_button_activatable_interface_init (GtkActivatableIface *iface)
{
parent_activatable_iface = g_type_interface_peek_parent (iface);
iface->update = gtk_toggle_tool_button_activatable_update;
iface->reset = gtk_toggle_tool_button_activatable_reset;
iface->update = gtk_toggle_tool_button_update;
iface->sync_action_properties = gtk_toggle_tool_button_sync_action_properties;
}
static void
gtk_toggle_tool_button_activatable_update (GtkActivatable *activatable,
gtk_toggle_tool_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -339,12 +339,12 @@ gtk_toggle_tool_button_activatable_update (GtkActivatable *activatable,
}
static void
gtk_toggle_tool_button_activatable_reset (GtkActivatable *activatable,
gtk_toggle_tool_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkToggleToolButton *button;
parent_activatable_iface->reset (activatable, action);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!GTK_IS_TOGGLE_ACTION (action))
return;

View File

@ -80,10 +80,10 @@ static void gtk_tool_button_style_set (GtkWidget *widget,
static void gtk_tool_button_construct_contents (GtkToolItem *tool_item);
static void gtk_tool_button_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_tool_button_activatable_update (GtkActivatable *activatable,
static void gtk_tool_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_tool_button_activatable_reset (GtkActivatable *activatable,
static void gtk_tool_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
@ -740,12 +740,12 @@ static void
gtk_tool_button_activatable_interface_init (GtkActivatableIface *iface)
{
parent_activatable_iface = g_type_interface_peek_parent (iface);
iface->update = gtk_tool_button_activatable_update;
iface->reset = gtk_tool_button_activatable_reset;
iface->update = gtk_tool_button_update;
iface->sync_action_properties = gtk_tool_button_sync_action_properties;
}
static void
gtk_tool_button_activatable_update (GtkActivatable *activatable,
gtk_tool_button_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -789,14 +789,14 @@ gtk_tool_button_activatable_update (GtkActivatable *activatable,
}
static void
gtk_tool_button_activatable_reset (GtkActivatable *activatable,
gtk_tool_button_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkToolButton *button;
GIcon *icon;
const gchar *stock_id;
parent_activatable_iface->reset (activatable, action);
parent_activatable_iface->sync_action_properties (activatable, action);
if (!action)
return;

View File

@ -128,10 +128,10 @@ static gboolean gtk_tool_item_real_set_tooltip (GtkToolItem *tool_item,
const gchar *tip_private);
static void gtk_tool_item_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_tool_item_activatable_update (GtkActivatable *activatable,
static void gtk_tool_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_tool_item_activatable_reset (GtkActivatable *activatable,
static void gtk_tool_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
static void gtk_tool_item_set_related_action (GtkToolItem *item,
GtkAction *action);
@ -582,12 +582,12 @@ _gtk_tool_item_create_menu_proxy (GtkToolItem *item)
static void
gtk_tool_item_activatable_interface_init (GtkActivatableIface *iface)
{
iface->update = gtk_tool_item_activatable_update;
iface->reset = gtk_tool_item_activatable_reset;
iface->update = gtk_tool_item_update;
iface->sync_action_properties = gtk_tool_item_sync_action_properties;
}
static void
gtk_tool_item_activatable_update (GtkActivatable *activatable,
gtk_tool_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name)
{
@ -615,7 +615,7 @@ gtk_tool_item_activatable_update (GtkActivatable *activatable,
}
static void
gtk_tool_item_activatable_reset (GtkActivatable *activatable,
gtk_tool_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
if (!action)
@ -663,7 +663,7 @@ gtk_tool_item_set_use_action_appearance (GtkToolItem *item,
{
item->priv->use_action_appearance = use_appearance;
gtk_activatable_reset (GTK_ACTIVATABLE (item), item->priv->action);
gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (item), item->priv->action);
}
}