* @action_group: the action group
* @action: an action
*
- * Adds an action object to the action group.
+ * Adds an action object to the action group. Note that this function
+ * does not set up the accel path of the action, which can lead to problems
+ * if a user tries to modify the accelerator of a menuitem associated with
+ * the action. Therefore you must either set the accel path yourself with
+ * gtk_action_set_accel_path(), or use
+ * <literal>gtk_action_group_add_action_with_accel (..., NULL)</literal>.
*
* Since: 2.4
*/
action_group->private_data->name, "/", name, NULL);
if (accelerator)
+ {
gtk_accelerator_parse (accelerator, &accel_key, &accel_mods);
+ if (accel_key == 0)
+ g_warning ("Unable to parse accelerator '%s' for action '%s'",
+ accelerator, name);
+ }
else if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
{
accel_key = stock_item.keyval;