Add and use internal accessor for accelerables in GtkAccelGroup

This commit is contained in:
Christian Dywan 2009-10-23 01:58:54 +02:00 committed by Javier Jardón
parent a13d2c200b
commit 059c22c3b2
3 changed files with 10 additions and 1 deletions

View File

@ -815,6 +815,14 @@ _gtk_accel_group_reconnect (GtkAccelGroup *accel_group,
g_object_unref (accel_group);
}
GSList*
_gtk_accel_group_get_accelerables (GtkAccelGroup *accel_group)
{
g_return_val_if_fail (GTK_IS_ACCEL_GROUP (accel_group), NULL);
return accel_group->priv->acceleratables;
}
/**
* gtk_accel_group_query:
* @accel_group: the accelerator group to query

View File

@ -179,6 +179,7 @@ GtkAccelGroupEntry* gtk_accel_group_query (GtkAccelGroup *accel_group,
void _gtk_accel_group_reconnect (GtkAccelGroup *accel_group,
GQuark accel_path_quark);
GSList* _gtk_accel_group_get_accelerables (GtkAccelGroup *accel_group);
struct _GtkAccelGroupEntry
{

View File

@ -319,7 +319,7 @@ internal_change_entry (const gchar *accel_path,
{
GtkAccelGroup *group = slist->data;
for (node = group->acceleratables; node; node = node->next)
for (node = _gtk_accel_group_get_accelerables (group); node; node = node->next)
g_hash_table_insert (window_hm, node->data, node->data);
}
g_slist_free (group_list);