gtk+ r22389 - in trunk: . docs/reference/gtk gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22389 - in trunk: . docs/reference/gtk gtk
- Date: Sun, 22 Feb 2009 05:20:14 +0000 (UTC)
Author: matthiasc
Date: Sun Feb 22 05:20:14 2009
New Revision: 22389
URL: http://svn.gnome.org/viewvc/gtk+?rev=22389&view=rev
Log:
* 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.
Modified:
trunk/ChangeLog
trunk/docs/reference/gtk/gtk-sections.txt
trunk/gtk/gtk.symbols
trunk/gtk/gtkactivatable.c
trunk/gtk/gtkactivatable.h
trunk/gtk/gtkbutton.c
trunk/gtk/gtkcheckmenuitem.c
trunk/gtk/gtkimagemenuitem.c
trunk/gtk/gtkmenuitem.c
trunk/gtk/gtkrecentchooser.c
trunk/gtk/gtkrecentchooserdefault.c
trunk/gtk/gtkrecentchoosermenu.c
trunk/gtk/gtkrecentchooserprivate.h
trunk/gtk/gtktogglebutton.c
trunk/gtk/gtktoggletoolbutton.c
trunk/gtk/gtktoolbutton.c
trunk/gtk/gtktoolitem.c
Modified: trunk/docs/reference/gtk/gtk-sections.txt
==============================================================================
--- trunk/docs/reference/gtk/gtk-sections.txt (original)
+++ trunk/docs/reference/gtk/gtk-sections.txt Sun Feb 22 05:20:14 2009
@@ -236,7 +236,7 @@
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>
Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols (original)
+++ trunk/gtk/gtk.symbols Sun Feb 22 05:20:14 2009
@@ -234,7 +234,7 @@
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
Modified: trunk/gtk/gtkactivatable.c
==============================================================================
--- trunk/gtk/gtkactivatable.c (original)
+++ trunk/gtk/gtkactivatable.c Sun Feb 22 05:20:14 2009
@@ -23,29 +23,30 @@
*
* Activatable widgets can be connected to a #GtkAction and reflects
* the state of its action. A #GtkActivatable can also provide feedback
- * through its action, as they are responsible for activating their
+ * through its action, as they are responsible for activating their
* related actions.
*
* <refsect2>
* <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.
- * </para>
+ * 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_sync_action_properties() at the appropriate times.
+ * </para>
* <example>
* <title>A class fragment implementing #GtkActivatable</title>
* <programlisting><![CDATA[
*
* enum {
* ...
- *
+ *
* PROP_ACTIVATABLE_RELATED_ACTION,
* PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
* }
@@ -61,33 +62,33 @@
*
* ...
*
- * static void foo_bar_activatable_interface_init (GtkActivatableIface *iface);
- * static void foo_bar_activatable_update (GtkActivatable *activatable,
- * GtkAction *action,
- * const gchar *property_name);
- * static void foo_bar_activatable_reset (GtkActivatable *activatable,
- * GtkAction *action);
+ * static void foo_bar_activatable_interface_init (GtkActivatableIface *iface);
+ * static void foo_bar_activatable_update (GtkActivatable *activatable,
+ * GtkAction *action,
+ * const gchar *property_name);
+ * static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable,
+ * GtkAction *action);
* ...
- *
- *
+ *
+ *
* static void
* foo_bar_class_init (FooBarClass *klass)
* {
- *
+ *
* ...
- *
+ *
* 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");
- *
+ *
* ...
* }
- *
- *
- * static void
+ *
+ *
+ * static void
* 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);
* }
* }
*
@@ -195,9 +196,9 @@
* }
*
* ... Selectively reset and update activatable depending on the use-action-appearance property ...
- * static void
- * gtk_button_activatable_reset (GtkActivatable *activatable,
- * GtkAction *action)
+ * static void
+ * gtk_button_activatable_sync_action_properties (GtkActivatable *activatable,
+ * GtkAction *action)
* {
* GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
*
@@ -227,8 +228,8 @@
*
* static void
* foo_bar_activatable_update (GtkActivatable *activatable,
- * GtkAction *action,
- * const gchar *property_name)
+ * GtkAction *action,
+ * const gchar *property_name)
* {
* FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable);
*
@@ -316,7 +317,8 @@
* 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,29 +350,30 @@
}
/**
- * 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,
- GtkAction *action)
+gtk_activatable_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
GtkActivatableIface *iface;
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 @@
/*
* 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)
{
@@ -470,9 +473,9 @@
if (action)
{
g_object_ref (action);
-
+
g_signal_connect (G_OBJECT (action), "notify", G_CALLBACK (gtk_activatable_action_notify), activatable);
-
+
_gtk_action_add_to_proxy_list (action, GTK_WIDGET (activatable));
g_object_set_data (activatable, "gtk-action", action);
@@ -511,17 +514,19 @@
* @activatable: a #GtkActivatable
* @use_appearance: whether to use the actions appearance
*
- * Sets whether this activatable should reset its layout and appearance
- * when setting the related action or when the action changes appearance
+ * 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
**/
void
-gtk_activatable_set_use_action_appearance (GtkActivatable *activatable,
- gboolean use_appearance)
+gtk_activatable_set_use_action_appearance (GtkActivatable *activatable,
+ gboolean use_appearance)
{
g_object_set (activatable, "use-action-appearance", use_appearance, NULL);
}
Modified: trunk/gtk/gtkactivatable.h
==============================================================================
--- trunk/gtk/gtkactivatable.h (original)
+++ trunk/gtk/gtkactivatable.h Sun Feb 22 05:20:14 2009
@@ -45,8 +45,8 @@
* @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
- * #GtkActivatable::related-action property is set or unset and by the implementor 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>
*
@@ -58,17 +58,17 @@
GTypeInterface g_iface;
/* virtual table */
- void (* update) (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name);
- void (* reset) (GtkActivatable *activatable,
- GtkAction *action);
+ void (* update) (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name);
+ 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,
Modified: trunk/gtk/gtkbutton.c
==============================================================================
--- trunk/gtk/gtkbutton.c (original)
+++ trunk/gtk/gtkbutton.c Sun Feb 22 05:20:14 2009
@@ -148,16 +148,16 @@
gboolean was_grabbed);
-static void gtk_button_activatable_interface_init (GtkActivatableIface *iface);
-static void gtk_button_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name);
-static void gtk_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action);
-static void gtk_button_set_related_action (GtkButton *button,
- GtkAction *action);
-static void gtk_button_set_use_action_appearance (GtkButton *button,
- gboolean use_appearance);
+static void gtk_button_activatable_interface_init (GtkActivatableIface *iface);
+static void gtk_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name);
+static void gtk_button_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action);
+static void gtk_button_set_related_action (GtkButton *button,
+ GtkAction *action);
+static void gtk_button_set_use_action_appearance (GtkButton *button,
+ gboolean use_appearance);
static guint button_signals[LAST_SIGNAL] = { 0 };
@@ -741,8 +741,8 @@
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,9 +808,9 @@
}
static void
-gtk_button_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+gtk_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
@@ -837,9 +837,9 @@
activatable_update_icon_name (GTK_BUTTON (activatable), action);
}
-static void
-gtk_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+static void
+gtk_button_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
@@ -863,8 +863,8 @@
}
static void
-gtk_button_set_related_action (GtkButton *button,
- GtkAction *action)
+gtk_button_set_related_action (GtkButton *button,
+ GtkAction *action)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
@@ -877,7 +877,7 @@
*/
g_signal_handlers_disconnect_by_func (button, gtk_real_button_clicked, NULL);
if (action)
- g_signal_connect_after (button, "clicked",
+ g_signal_connect_after (button, "clicked",
G_CALLBACK (gtk_real_button_clicked), NULL);
gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (button), action);
@@ -886,16 +886,16 @@
}
static void
-gtk_button_set_use_action_appearance (GtkButton *button,
- gboolean use_appearance)
+gtk_button_set_use_action_appearance (GtkButton *button,
+ gboolean use_appearance)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
if (priv->use_action_appearance != use_appearance)
{
priv->use_action_appearance = use_appearance;
-
- gtk_activatable_reset (GTK_ACTIVATABLE (button), priv->action);
+
+ gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (button), priv->action);
}
}
Modified: trunk/gtk/gtkcheckmenuitem.c
==============================================================================
--- trunk/gtk/gtkcheckmenuitem.c (original)
+++ trunk/gtk/gtkcheckmenuitem.c Sun Feb 22 05:20:14 2009
@@ -65,10 +65,10 @@
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,14 +148,14 @@
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,
- GtkAction *action,
- const gchar *property_name)
+static void
+gtk_check_menu_item_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkCheckMenuItem *check_menu_item;
@@ -174,19 +174,19 @@
return;
if (strcmp (property_name, "draw-as-radio") == 0)
- gtk_check_menu_item_set_draw_as_radio (check_menu_item,
+ gtk_check_menu_item_set_draw_as_radio (check_menu_item,
gtk_toggle_action_get_draw_as_radio (GTK_TOGGLE_ACTION (action)));
}
-static void
-gtk_check_menu_item_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+static void
+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;
@@ -198,7 +198,7 @@
if (!gtk_activatable_get_use_action_appearance (activatable))
return;
- gtk_check_menu_item_set_draw_as_radio (check_menu_item,
+ gtk_check_menu_item_set_draw_as_radio (check_menu_item,
gtk_toggle_action_get_draw_as_radio (GTK_TOGGLE_ACTION (action)));
}
Modified: trunk/gtk/gtkimagemenuitem.c
==============================================================================
--- trunk/gtk/gtkimagemenuitem.c (original)
+++ trunk/gtk/gtkimagemenuitem.c Sun Feb 22 05:20:14 2009
@@ -72,10 +72,10 @@
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 @@
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
@@ -609,10 +609,10 @@
}
}
-static void
-gtk_image_menu_item_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+static void
+gtk_image_menu_item_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkImageMenuItem *image_menu_item;
GtkWidget *image;
@@ -635,8 +635,8 @@
}
static void
-gtk_image_menu_item_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
GtkImageMenuItem *image_menu_item;
GtkWidget *image;
@@ -644,7 +644,7 @@
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;
Modified: trunk/gtk/gtkmenuitem.c
==============================================================================
--- trunk/gtk/gtkmenuitem.c (original)
+++ trunk/gtk/gtkmenuitem.c Sun Feb 22 05:20:14 2009
@@ -134,10 +134,10 @@
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,15 +576,15 @@
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
+static void
activatable_update_label (GtkMenuItem *menu_item, GtkAction *action)
{
GtkWidget *child = GTK_BIN (menu_item)->child;
-
+
if (GTK_IS_LABEL (child))
{
const gchar *label;
@@ -597,9 +597,9 @@
gboolean _gtk_menu_is_empty (GtkWidget *menu);
static void
-gtk_menu_item_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+gtk_menu_item_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkMenuItem *menu_item = GTK_MENU_ITEM (activatable);
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
@@ -617,8 +617,8 @@
}
static void
-gtk_menu_item_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+gtk_menu_item_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
GtkMenuItem *menu_item = GTK_MENU_ITEM (activatable);
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
@@ -626,7 +626,7 @@
if (!action)
return;
- _gtk_action_sync_menu_visible (action, GTK_WIDGET (menu_item),
+ _gtk_action_sync_menu_visible (action, GTK_WIDGET (menu_item),
_gtk_menu_is_empty (gtk_menu_item_get_submenu (menu_item)));
gtk_widget_set_sensitive (GTK_WIDGET (menu_item), gtk_action_is_sensitive (action));
@@ -634,14 +634,14 @@
if (priv->use_action_appearance)
{
GtkWidget *label = GTK_BIN (menu_item)->child;
-
+
/* make sure label is a label */
if (label && !GTK_IS_LABEL (label))
{
gtk_container_remove (GTK_CONTAINER (menu_item), label);
label = NULL;
}
-
+
if (!label)
label = g_object_new (GTK_TYPE_ACCEL_LABEL,
"use-underline", TRUE,
@@ -649,18 +649,18 @@
"visible", TRUE,
"parent", menu_item,
NULL);
-
+
if (GTK_IS_ACCEL_LABEL (label) && gtk_action_get_accel_path (action))
g_object_set (label,
"accel-closure", gtk_action_get_accel_closure (action),
NULL);
-
+
activatable_update_label (menu_item, action);
}
}
static void
-gtk_menu_item_set_related_action (GtkMenuItem *menu_item,
+gtk_menu_item_set_related_action (GtkMenuItem *menu_item,
GtkAction *action)
{
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
@@ -691,7 +691,7 @@
}
static void
-gtk_menu_item_set_use_action_appearance (GtkMenuItem *menu_item,
+gtk_menu_item_set_use_action_appearance (GtkMenuItem *menu_item,
gboolean use_appearance)
{
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
@@ -699,8 +699,8 @@
if (priv->use_action_appearance != use_appearance)
{
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);
}
}
Modified: trunk/gtk/gtkrecentchooser.c
==============================================================================
--- trunk/gtk/gtkrecentchooser.c (original)
+++ trunk/gtk/gtkrecentchooser.c Sun Feb 22 05:20:14 2009
@@ -1094,9 +1094,9 @@
}
void
-_gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+_gtk_recent_chooser_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
@@ -1124,8 +1124,8 @@
}
void
-_gtk_recent_chooser_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+_gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
GtkRecentChooser *recent_chooser = GTK_RECENT_CHOOSER (activatable);
GtkRecentChooser *action_chooser = GTK_RECENT_CHOOSER (action);
@@ -1148,7 +1148,7 @@
}
void
-_gtk_recent_chooser_set_related_action (GtkRecentChooser *recent_chooser,
+_gtk_recent_chooser_set_related_action (GtkRecentChooser *recent_chooser,
GtkAction *action)
{
GtkAction *prev_action;
@@ -1185,8 +1185,8 @@
{
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);
}
}
Modified: trunk/gtk/gtkrecentchooserdefault.c
==============================================================================
--- trunk/gtk/gtkrecentchooserdefault.c (original)
+++ trunk/gtk/gtkrecentchooserdefault.c Sun Feb 22 05:20:14 2009
@@ -284,10 +284,10 @@
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,
@@ -318,12 +318,12 @@
iface->list_filters = gtk_recent_chooser_default_list_filters;
}
-static void
-gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *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
@@ -1948,10 +1948,10 @@
}
}
-static void
-gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+static void
+gtk_recent_chooser_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
if (strcmp (property_name, "visible") == 0)
{
@@ -1964,13 +1964,13 @@
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,
- GtkAction *action)
+gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
if (action)
{
@@ -1982,7 +1982,7 @@
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);
}
Modified: trunk/gtk/gtkrecentchoosermenu.c
==============================================================================
--- trunk/gtk/gtkrecentchoosermenu.c (original)
+++ trunk/gtk/gtkrecentchoosermenu.c Sun Feb 22 05:20:14 2009
@@ -161,10 +161,10 @@
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,
@@ -193,12 +193,11 @@
iface->list_filters = gtk_recent_chooser_menu_list_filters;
}
-static void
-gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface)
-
-{
- iface->update = gtk_recent_chooser_activatable_update;
- iface->reset = gtk_recent_chooser_activatable_reset;
+static void
+gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface)
+{
+ iface->update = gtk_recent_chooser_update;
+ iface->sync_action_properties = gtk_recent_chooser_sync_action_properties;
}
static void
@@ -1173,24 +1172,24 @@
gtk_container_foreach (GTK_CONTAINER (menu), foreach_set_shot_tips, menu);
}
-static void
-gtk_recent_chooser_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
+static void
+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,
- GtkAction *action)
+static void
+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);
}
Modified: trunk/gtk/gtkrecentchooserprivate.h
==============================================================================
--- trunk/gtk/gtkrecentchooserprivate.h (original)
+++ trunk/gtk/gtkrecentchooserprivate.h Sun Feb 22 05:20:14 2009
@@ -38,10 +38,10 @@
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);
Modified: trunk/gtk/gtktogglebutton.c
==============================================================================
--- trunk/gtk/gtktogglebutton.c (original)
+++ trunk/gtk/gtktogglebutton.c Sun Feb 22 05:20:14 2009
@@ -71,11 +71,11 @@
static void gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface);
-static void gtk_toggle_button_activatable_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name);
-static void gtk_toggle_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action);
+static void gtk_toggle_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name);
+static void gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action);
static GtkActivatableIface *parent_activatable_iface;
static guint toggle_button_signals[LAST_SIGNAL] = { 0 };
@@ -151,19 +151,18 @@
GTK_BUTTON (toggle_button)->depress_on_activate = TRUE;
}
-
-static void
-gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface)
+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,
- GtkAction *action,
- const gchar *property_name)
+gtk_toggle_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkToggleButton *button;
@@ -181,12 +180,12 @@
}
static void
-gtk_toggle_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+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;
Modified: trunk/gtk/gtktoggletoolbutton.c
==============================================================================
--- trunk/gtk/gtktoggletoolbutton.c (original)
+++ trunk/gtk/gtktoggletoolbutton.c Sun Feb 22 05:20:14 2009
@@ -71,10 +71,10 @@
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;
@@ -311,18 +311,18 @@
}
}
-static void
-gtk_toggle_tool_button_activatable_interface_init (GtkActivatableIface *iface)
+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,
- GtkAction *action,
- const gchar *property_name)
+gtk_toggle_tool_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkToggleToolButton *button;
@@ -339,12 +339,12 @@
}
static void
-gtk_toggle_tool_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+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;
Modified: trunk/gtk/gtktoolbutton.c
==============================================================================
--- trunk/gtk/gtktoolbutton.c (original)
+++ trunk/gtk/gtktoolbutton.c Sun Feb 22 05:20:14 2009
@@ -80,10 +80,10 @@
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,14 +740,14 @@
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,
- GtkAction *action,
- const gchar *property_name)
+gtk_tool_button_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
GtkToolButton *button;
GtkWidget *image;
@@ -789,14 +789,14 @@
}
static void
-gtk_tool_button_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+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;
Modified: trunk/gtk/gtktoolitem.c
==============================================================================
--- trunk/gtk/gtktoolitem.c (original)
+++ trunk/gtk/gtktoolitem.c Sun Feb 22 05:20:14 2009
@@ -128,10 +128,10 @@
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);
@@ -579,17 +579,17 @@
return FALSE;
}
-static void
-gtk_tool_item_activatable_interface_init (GtkActivatableIface *iface)
+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,
- GtkAction *action,
- const gchar *property_name)
+static void
+gtk_tool_item_update (GtkActivatable *activatable,
+ GtkAction *action,
+ const gchar *property_name)
{
if (strcmp (property_name, "visible") == 0)
{
@@ -614,9 +614,9 @@
gtk_action_get_is_important (action));
}
-static void
-gtk_tool_item_activatable_reset (GtkActivatable *activatable,
- GtkAction *action)
+static void
+gtk_tool_item_sync_action_properties (GtkActivatable *activatable,
+ GtkAction *action)
{
if (!action)
return;
@@ -656,14 +656,14 @@
}
static void
-gtk_tool_item_set_use_action_appearance (GtkToolItem *item,
+gtk_tool_item_set_use_action_appearance (GtkToolItem *item,
gboolean use_appearance)
{
if (item->priv->use_action_appearance != use_appearance)
{
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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]