#include "gtkprivate.h"
#include "gtkintl.h"
-#define GTK_ACTION_GROUP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ACTION_GROUP, GtkActionGroupPrivate))
struct _GtkActionGroupPrivate
{
}
static void
-gtk_action_group_init (GtkActionGroup *self)
+gtk_action_group_init (GtkActionGroup *action_group)
{
GtkActionGroupPrivate *private;
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ action_group->priv = G_TYPE_INSTANCE_GET_PRIVATE (action_group,
+ GTK_TYPE_ACTION_GROUP,
+ GtkActionGroupPrivate);
+ private = action_group->priv;
private->name = NULL;
private->sensitive = TRUE;
const gchar *name)
{
GtkActionGroup *self = GTK_ACTION_GROUP (buildable);
- GtkActionGroupPrivate *private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ GtkActionGroupPrivate *private = self->priv;
private->name = g_strdup (name);
}
gtk_action_group_buildable_get_name (GtkBuildable *buildable)
{
GtkActionGroup *self = GTK_ACTION_GROUP (buildable);
- GtkActionGroupPrivate *private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ GtkActionGroupPrivate *private = self->priv;
+
return private->name;
}
data = (AcceleratorParserData*)user_data;
action_group = GTK_ACTION_GROUP (buildable);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
action = GTK_ACTION (child);
accel_path = g_strconcat ("<Actions>/",
GtkActionGroupPrivate *private;
self = g_object_new (GTK_TYPE_ACTION_GROUP, NULL);
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ private = self->priv;
private->name = g_strdup (name);
return self;
GtkActionGroupPrivate *private;
self = GTK_ACTION_GROUP (object);
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ private = self->priv;
g_free (private->name);
private->name = NULL;
gchar *tmp;
self = GTK_ACTION_GROUP (object);
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ private = self->priv;
switch (prop_id)
{
GtkActionGroupPrivate *private;
self = GTK_ACTION_GROUP (object);
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ private = self->priv;
switch (prop_id)
{
{
GtkActionGroupPrivate *private;
- private = GTK_ACTION_GROUP_GET_PRIVATE (self);
+ private = self->priv;
return g_hash_table_lookup (private->actions, action_name);
}
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
return private->name;
}
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), FALSE);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
return private->sensitive;
}
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
sensitive = sensitive != FALSE;
if (private->sensitive != sensitive)
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), FALSE);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
return private->visible;
}
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
visible = visible != FALSE;
if (private->visible != visible)
{
GtkActionGroupPrivate *private;
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
g_warning ("Refusing to add non-unique action '%s' to action group '%s'",
action_name,
if (!check_unique_action (action_group, name))
return;
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
g_hash_table_insert (private->actions,
(gpointer) name,
if (!check_unique_action (action_group, name))
return;
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
accel_path = g_strconcat ("<Actions>/",
private->name, "/", name, NULL);
name = gtk_action_get_name (action);
g_return_if_fail (name != NULL);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
g_hash_table_remove (private->actions, name);
}
g_return_val_if_fail (GTK_IS_ACTION_GROUP (action_group), NULL);
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
g_hash_table_foreach (private->actions, add_single_action, &actions);
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
if (private->translate_notify)
private->translate_notify (private->translate_data);
if (string == NULL)
return NULL;
- private = GTK_ACTION_GROUP_GET_PRIVATE (action_group);
+ private = action_group->priv;
translate_func = private->translate_func;
translate_data = private->translate_data;