added "..." to "Clear undo history" because it has a confirmation dialog.
2004-07-07 Michael Natterer <mitch@gimp.org> * app/actions/edit-actions.c (edit_actions): added "..." to "Clear undo history" because it has a confirmation dialog. * app/actions/edit-commands.c: cleanup: moved static functions to the end of the file and prototyped them.
This commit is contained in:

committed by
Michael Natterer

parent
2d412472c2
commit
c5640071f5
@ -1,3 +1,11 @@
|
|||||||
|
2004-07-07 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/actions/edit-actions.c (edit_actions): added "..." to "Clear
|
||||||
|
undo history" because it has a confirmation dialog.
|
||||||
|
|
||||||
|
* app/actions/edit-commands.c: cleanup: moved static functions to
|
||||||
|
the end of the file and prototyped them.
|
||||||
|
|
||||||
2004-07-07 Sven Neumann <sven@gimp.org>
|
2004-07-07 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/widgets/gimphistogramview.c (gimp_histogram_view_expose):
|
* app/widgets/gimphistogramview.c (gimp_histogram_view_expose):
|
||||||
|
@ -75,7 +75,7 @@ static GimpActionEntry edit_actions[] =
|
|||||||
|
|
||||||
{ "edit-undo-clear", GTK_STOCK_CLEAR,
|
{ "edit-undo-clear", GTK_STOCK_CLEAR,
|
||||||
N_("_Clear Undo History"), "",
|
N_("_Clear Undo History"), "",
|
||||||
N_("Clear undo history"),
|
N_("Clear undo history..."),
|
||||||
G_CALLBACK (edit_undo_clear_cmd_callback),
|
G_CALLBACK (edit_undo_clear_cmd_callback),
|
||||||
GIMP_HELP_EDIT_UNDO_CLEAR },
|
GIMP_HELP_EDIT_UNDO_CLEAR },
|
||||||
|
|
||||||
|
@ -52,6 +52,11 @@
|
|||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static void edit_paste (GimpDisplay *gdisp,
|
||||||
|
gboolean paste_into);
|
||||||
|
static void edit_undo_clear_callback (GtkWidget *widget,
|
||||||
|
gboolean clear,
|
||||||
|
gpointer data);
|
||||||
static void cut_named_buffer_callback (GtkWidget *widget,
|
static void cut_named_buffer_callback (GtkWidget *widget,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
@ -84,21 +89,6 @@ edit_redo_cmd_callback (GtkAction *action,
|
|||||||
gimp_image_flush (gimage);
|
gimp_image_flush (gimage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
edit_undo_clear_callback (GtkWidget *widget,
|
|
||||||
gboolean clear,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
if (clear)
|
|
||||||
{
|
|
||||||
GimpImage *gimage = data;
|
|
||||||
|
|
||||||
gimp_image_undo_disable (gimage);
|
|
||||||
gimp_image_undo_enable (gimage);
|
|
||||||
gimp_image_flush (gimage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
edit_undo_clear_cmd_callback (GtkAction *action,
|
edit_undo_clear_cmd_callback (GtkAction *action,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -146,31 +136,6 @@ edit_copy_cmd_callback (GtkAction *action,
|
|||||||
gimp_image_flush (gimage);
|
gimp_image_flush (gimage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
edit_paste (GimpDisplay *gdisp,
|
|
||||||
gboolean paste_into)
|
|
||||||
{
|
|
||||||
GimpBuffer *buffer = clipboard_get_buffer (gdisp->gimage->gimp);
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
{
|
|
||||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
|
||||||
gint x, y;
|
|
||||||
gint width, height;
|
|
||||||
|
|
||||||
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
|
|
||||||
|
|
||||||
if (gimp_edit_paste (gdisp->gimage,
|
|
||||||
gimp_image_active_drawable (gdisp->gimage),
|
|
||||||
buffer, paste_into, x, y, width, height))
|
|
||||||
{
|
|
||||||
gimp_image_flush (gdisp->gimage);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_unref (buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
edit_paste_cmd_callback (GtkAction *action,
|
edit_paste_cmd_callback (GtkAction *action,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -293,6 +258,46 @@ edit_fill_cmd_callback (GtkAction *action,
|
|||||||
|
|
||||||
/* private functions */
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
edit_paste (GimpDisplay *gdisp,
|
||||||
|
gboolean paste_into)
|
||||||
|
{
|
||||||
|
GimpBuffer *buffer = clipboard_get_buffer (gdisp->gimage->gimp);
|
||||||
|
|
||||||
|
if (buffer)
|
||||||
|
{
|
||||||
|
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||||
|
gint x, y;
|
||||||
|
gint width, height;
|
||||||
|
|
||||||
|
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
|
||||||
|
|
||||||
|
if (gimp_edit_paste (gdisp->gimage,
|
||||||
|
gimp_image_active_drawable (gdisp->gimage),
|
||||||
|
buffer, paste_into, x, y, width, height))
|
||||||
|
{
|
||||||
|
gimp_image_flush (gdisp->gimage);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_object_unref (buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
edit_undo_clear_callback (GtkWidget *widget,
|
||||||
|
gboolean clear,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
if (clear)
|
||||||
|
{
|
||||||
|
GimpImage *gimage = data;
|
||||||
|
|
||||||
|
gimp_image_undo_disable (gimage);
|
||||||
|
gimp_image_undo_enable (gimage);
|
||||||
|
gimp_image_flush (gimage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cut_named_buffer_callback (GtkWidget *widget,
|
cut_named_buffer_callback (GtkWidget *widget,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
|
Reference in New Issue
Block a user