Allow to paste a new image using Ctrl-V (bug 169477):

2005-05-21  Sven Neumann  <sven@gimp.org>

	Allow to paste a new image using Ctrl-V (bug 169477):

	* menus/toolbox-menu.xml.in: added an accelerator for "edit-paste".

	* app/actions/edit-actions.c: keep "edit-paste" always enabled,
	even if no image is present.

	* app/actions/edit-commands.c (edit_paste_cmd_callback): forward
	to "edit-paste-as-new" if we are being called from the toolbox.
This commit is contained in:
Sven Neumann 2005-05-21 14:25:06 +00:00 committed by Sven Neumann
parent 5dd652faba
commit 8386ca04a1
4 changed files with 22 additions and 6 deletions

View File

@ -1,7 +1,19 @@
2005-05-21 Sven Neumann <sven@gimp.org>
* app/widgets/gimpuimanager.c: improved reporting of errors
while parsing the menu definitions.
Allow to paste a new image using Ctrl-V (bug 169477):
* menus/toolbox-menu.xml.in: added an accelerator for "edit-paste".
* app/actions/edit-actions.c: keep "edit-paste" always enabled,
even if no image is present.
* app/actions/edit-commands.c (edit_paste_cmd_callback): forward
to "edit-paste-as-new" if we are being called from the toolbox.
2005-05-21 Sven Neumann <sven@gimp.org>
* app/widgets/gimpuimanager.c: improved reporting of errors while
parsing the menu definitions.
2005-05-21 Sven Neumann <sven@gimp.org>

View File

@ -240,7 +240,7 @@ edit_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("edit-cut", drawable);
SET_SENSITIVE ("edit-copy", drawable);
SET_SENSITIVE ("edit-copy-visible", gimage);
SET_SENSITIVE ("edit-paste", gimage);
/* "edit-paste" is always enabled */
SET_SENSITIVE ("edit-paste-into", gimage);
SET_SENSITIVE ("edit-named-cut", drawable);

View File

@ -189,10 +189,12 @@ void
edit_paste_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *gdisp;
return_if_no_display (gdisp, data);
GimpDisplay *gdisp = action_data_get_display (data);
edit_paste (gdisp, FALSE);
if (gdisp)
edit_paste (gdisp, FALSE);
else
edit_paste_as_new_cmd_callback (action, data);
}
void

View File

@ -62,4 +62,6 @@
</menubar>
<accelerator action="edit-paste"/>
</ui>