app/actions/file-actions.c app/actions/image-actions.c
2005-02-08 Michael Natterer <mitch@gimp.org> * app/actions/file-actions.c * app/actions/image-actions.c * app/actions/qmask-actions.c * app/actions/tools-actions.c: removed ugly accel_path hacks (don't g_object_set_data(action, "gimp-accel-path", "foo")). * app/widgets/gimpactionview.c (gimp_action_view_accel_edited): simply use gtk_action_get_accel_path() instead of doing even more ugly stuff than above.
This commit is contained in:

committed by
Michael Natterer

parent
ac01f3b810
commit
3d69ff1108
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2005-02-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/actions/file-actions.c
|
||||||
|
* app/actions/image-actions.c
|
||||||
|
* app/actions/qmask-actions.c
|
||||||
|
* app/actions/tools-actions.c: removed ugly accel_path hacks
|
||||||
|
(don't g_object_set_data(action, "gimp-accel-path", "foo")).
|
||||||
|
|
||||||
|
* app/widgets/gimpactionview.c (gimp_action_view_accel_edited):
|
||||||
|
simply use gtk_action_get_accel_path() instead of doing even more
|
||||||
|
ugly stuff than above.
|
||||||
|
|
||||||
2005-02-08 Michael Natterer <mitch@gimp.org>
|
2005-02-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/actions/actions.c (action_data_get_widget): return the
|
* app/actions/actions.c (action_data_get_widget): return the
|
||||||
|
@ -130,12 +130,6 @@ file_actions_setup (GimpActionGroup *group)
|
|||||||
"file-open-from-image");
|
"file-open-from-image");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/file/file-open");
|
gtk_action_set_accel_path (action, "<Actions>/file/file-open");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/file/file-open");
|
|
||||||
|
|
||||||
n_entries = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
|
n_entries = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
|
||||||
|
|
||||||
entries = g_new0 (GimpEnumActionEntry, n_entries);
|
entries = g_new0 (GimpEnumActionEntry, n_entries);
|
||||||
|
@ -181,12 +181,6 @@ image_actions_setup (GimpActionGroup *group)
|
|||||||
"image-new-from-image");
|
"image-new-from-image");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/image/image-new");
|
gtk_action_set_accel_path (action, "<Actions>/image/image-new");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/image/image-new");
|
|
||||||
|
|
||||||
gimp_action_group_add_enum_actions (group,
|
gimp_action_group_add_enum_actions (group,
|
||||||
image_convert_actions,
|
image_convert_actions,
|
||||||
G_N_ELEMENTS (image_convert_actions),
|
G_N_ELEMENTS (image_convert_actions),
|
||||||
|
@ -100,12 +100,6 @@ qmask_actions_setup (GimpActionGroup *group)
|
|||||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||||
"qmask-active");
|
"qmask-active");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/qmask/qmask-toggle");
|
gtk_action_set_accel_path (action, "<Actions>/qmask/qmask-toggle");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/qmask/qmask-toggle");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -100,12 +100,6 @@ qmask_actions_setup (GimpActionGroup *group)
|
|||||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||||
"qmask-active");
|
"qmask-active");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/qmask/qmask-toggle");
|
gtk_action_set_accel_path (action, "<Actions>/qmask/qmask-toggle");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/qmask/qmask-toggle");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -130,22 +130,10 @@ tools_actions_setup (GimpActionGroup *group)
|
|||||||
"tools-by-color-select-short");
|
"tools-by-color-select-short");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/tools/tools-by-color-select");
|
gtk_action_set_accel_path (action, "<Actions>/tools/tools-by-color-select");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/tools/tools-by-color-select");
|
|
||||||
|
|
||||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||||
"tools-rotate-arbitrary");
|
"tools-rotate-arbitrary");
|
||||||
gtk_action_set_accel_path (action, "<Actions>/tools/tools-rotate");
|
gtk_action_set_accel_path (action, "<Actions>/tools/tools-rotate");
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
g_object_set_data (G_OBJECT (action), "gimp-accel-path",
|
|
||||||
"<Actions>/tools/tools-rotate");
|
|
||||||
|
|
||||||
for (list = GIMP_LIST (group->gimp->tool_info_list)->list;
|
for (list = GIMP_LIST (group->gimp->tool_info_list)->list;
|
||||||
list;
|
list;
|
||||||
list = g_list_next (list))
|
list = g_list_next (list))
|
||||||
|
@ -601,7 +601,7 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||||||
{
|
{
|
||||||
GtkAction *action;
|
GtkAction *action;
|
||||||
GtkActionGroup *group;
|
GtkActionGroup *group;
|
||||||
gchar *accel_path;
|
const gchar *accel_path;
|
||||||
|
|
||||||
gtk_tree_model_get (model, &iter,
|
gtk_tree_model_get (model, &iter,
|
||||||
GIMP_ACTION_VIEW_COLUMN_ACTION, &action,
|
GIMP_ACTION_VIEW_COLUMN_ACTION, &action,
|
||||||
@ -618,17 +618,7 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __GNUC__
|
accel_path = gtk_action_get_accel_path (action);
|
||||||
#warning FIXME: remove accel_path hack
|
|
||||||
#endif
|
|
||||||
accel_path = g_object_get_data (G_OBJECT (action), "gimp-accel-path");
|
|
||||||
|
|
||||||
if (accel_path)
|
|
||||||
accel_path = g_strdup (accel_path);
|
|
||||||
else
|
|
||||||
accel_path = g_strdup_printf ("<Actions>/%s/%s",
|
|
||||||
gtk_action_group_get_name (group),
|
|
||||||
gtk_action_get_name (action));
|
|
||||||
|
|
||||||
if (delete)
|
if (delete)
|
||||||
{
|
{
|
||||||
@ -703,7 +693,6 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (accel_path);
|
|
||||||
g_object_unref (group);
|
g_object_unref (group);
|
||||||
g_object_unref (action);
|
g_object_unref (action);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user