1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "appenv.h"
|
|
|
|
#include "about_dialog.h"
|
|
|
|
#include "app_procs.h"
|
|
|
|
#include "brightness_contrast.h"
|
1998-07-09 13:31:06 +08:00
|
|
|
#include "gimpbrushlist.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "by_color_select.h"
|
|
|
|
#include "channels_dialog.h"
|
|
|
|
#include "colormaps.h"
|
1999-01-08 03:53:05 +08:00
|
|
|
#include "colormap_dialog.i.h"
|
|
|
|
#include "color_area.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "color_balance.h"
|
|
|
|
#include "commands.h"
|
|
|
|
#include "convert.h"
|
|
|
|
#include "curves.h"
|
|
|
|
#include "desaturate.h"
|
1998-06-06 11:49:01 +08:00
|
|
|
#include "devices.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "channel_ops.h"
|
|
|
|
#include "drawable.h"
|
|
|
|
#include "equalize.h"
|
1998-08-13 23:25:41 +08:00
|
|
|
#include "errorconsole.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "fileops.h"
|
|
|
|
#include "floating_sel.h"
|
|
|
|
#include "gdisplay_ops.h"
|
|
|
|
#include "general.h"
|
1998-01-22 15:02:57 +08:00
|
|
|
#include "gimage_cmds.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "gimage_mask.h"
|
|
|
|
#include "gimprc.h"
|
|
|
|
#include "global_edit.h"
|
|
|
|
#include "gradient.h"
|
|
|
|
#include "histogram_tool.h"
|
|
|
|
#include "hue_saturation.h"
|
|
|
|
#include "image_render.h"
|
|
|
|
#include "info_window.h"
|
|
|
|
#include "interface.h"
|
|
|
|
#include "invert.h"
|
|
|
|
#include "layers_dialog.h"
|
|
|
|
#include "layer_select.h"
|
|
|
|
#include "levels.h"
|
1999-01-19 08:03:00 +08:00
|
|
|
#include "module_db.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "palette.h"
|
|
|
|
#include "patterns.h"
|
|
|
|
#include "plug_in.h"
|
|
|
|
#include "posterize.h"
|
|
|
|
#include "resize.h"
|
|
|
|
#include "scale.h"
|
|
|
|
#include "threshold.h"
|
|
|
|
#include "tips_dialog.h"
|
|
|
|
#include "tools.h"
|
|
|
|
#include "undo.h"
|
|
|
|
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
Resize * resize;
|
1998-06-30 23:31:32 +08:00
|
|
|
GimpImage* gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
} ImageResize;
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
/* external functions */
|
|
|
|
extern void layers_dialog_layer_merge_query (GImage *, int);
|
1997-12-10 06:09:10 +08:00
|
|
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* local functions */
|
|
|
|
static void image_resize_callback (GtkWidget *, gpointer);
|
|
|
|
static void image_scale_callback (GtkWidget *, gpointer);
|
|
|
|
static void image_cancel_callback (GtkWidget *, gpointer);
|
|
|
|
static gint image_delete_callback (GtkWidget *, GdkEvent *, gpointer);
|
|
|
|
static void gimage_mask_feather_callback (GtkWidget *, gpointer, gpointer);
|
|
|
|
static void gimage_mask_border_callback (GtkWidget *, gpointer, gpointer);
|
|
|
|
static void gimage_mask_grow_callback (GtkWidget *, gpointer, gpointer);
|
|
|
|
static void gimage_mask_shrink_callback (GtkWidget *, gpointer, gpointer);
|
|
|
|
|
|
|
|
/* variables declared in gimage_mask.c--we need them to set up
|
|
|
|
* initial values for the various dialog boxes which query for values
|
|
|
|
*/
|
|
|
|
extern double gimage_mask_feather_radius;
|
|
|
|
extern int gimage_mask_border_radius;
|
|
|
|
extern int gimage_mask_grow_pixels;
|
|
|
|
extern int gimage_mask_shrink_pixels;
|
|
|
|
|
|
|
|
|
1998-07-14 08:29:08 +08:00
|
|
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
file_open_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
file_open_callback (widget, client_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
file_save_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
file_save_callback (widget, client_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
file_save_as_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
file_save_as_callback (widget, client_data);
|
|
|
|
}
|
|
|
|
|
1999-01-12 09:31:49 +08:00
|
|
|
void
|
|
|
|
file_revert_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
file_revert_callback (widget, client_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
file_close_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gdisplay_close_window (gdisp, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
file_quit_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
app_exit (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_cut_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
global_edit_cut (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_copy_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
global_edit_copy (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_paste_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
global_edit_paste (gdisp, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_paste_into_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
global_edit_paste (gdisp, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_clear_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
edit_clear (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
|
|
|
|
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_fill_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
edit_fill (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
|
|
|
|
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_stroke_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_stroke (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
|
|
|
|
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_undo_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
undo_pop (gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_redo_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
undo_redo (gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_named_cut_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
named_edit_cut (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_named_copy_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
named_edit_copy (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
edit_named_paste_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
named_edit_paste (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_toggle_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
selection_hide (gdisp->select, (void *) gdisp);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_invert_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_invert (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_all_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_all (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_none_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_none (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_float_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_float (gdisp->gimage, gimage_active_drawable (gdisp->gimage), 0, 0);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_sharpen_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_sharpen (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_border_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
char initial[16];
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
sprintf (initial, "%d", gimage_mask_border_radius);
|
1998-12-26 02:22:01 +08:00
|
|
|
query_string_box (N_("Border Selection"),
|
|
|
|
N_("Border selection by:"),
|
|
|
|
initial,
|
1998-06-30 09:14:36 +08:00
|
|
|
gimage_mask_border_callback, gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_feather_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
char initial[16];
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
sprintf (initial, "%f", gimage_mask_feather_radius);
|
1998-12-26 02:22:01 +08:00
|
|
|
query_string_box (N_("Feather Selection"),
|
|
|
|
N_("Feather selection by:"),
|
|
|
|
initial,
|
1998-06-30 09:14:36 +08:00
|
|
|
gimage_mask_feather_callback, gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_grow_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
char initial[16];
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
sprintf (initial, "%d", gimage_mask_grow_pixels);
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
query_string_box (_("Grow Selection"), _("Grow selection by:"), initial,
|
1998-06-30 09:14:36 +08:00
|
|
|
gimage_mask_grow_callback, gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_shrink_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
char initial[16];
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
sprintf (initial, "%d", gimage_mask_shrink_pixels);
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
query_string_box (_("Shrink Selection"), _("Shrink selection by:"), initial,
|
1998-06-30 09:14:36 +08:00
|
|
|
gimage_mask_shrink_callback, gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
select_save_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
gimage_mask_save (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
1998-12-06 05:48:37 +08:00
|
|
|
void
|
|
|
|
view_dot_for_dot_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gdisplay_set_dot_for_dot (gdisp, GTK_CHECK_MENU_ITEM (widget)->active);
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
view_zoomin_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
change_scale (gdisp, ZOOMIN);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoomout_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
change_scale (gdisp, ZOOMOUT);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
view_zoom_val (GtkWidget *widget,
|
|
|
|
gpointer client_data,
|
|
|
|
int val)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
change_scale (gdisp, val);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_16_1_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 1601);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_8_1_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 801);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_4_1_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 401);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_2_1_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 201);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_1_1_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 101);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_1_2_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 102);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_1_4_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 104);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_1_8_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 108);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_zoom_1_16_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
view_zoom_val (widget, client_data, 116);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_window_info_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
if (! gdisp->window_info_dialog)
|
|
|
|
gdisp->window_info_dialog = info_window_create ((void *) gdisp);
|
|
|
|
|
|
|
|
info_dialog_popup (gdisp->window_info_dialog);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_toggle_rulers_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
/* This routine use promiscuous knowledge of gtk internals
|
|
|
|
* in order to hide and show the rulers "smoothly". This
|
|
|
|
* is kludgy and a hack and may break if gtk is changed
|
|
|
|
* internally.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!GTK_CHECK_MENU_ITEM (widget)->active)
|
|
|
|
{
|
|
|
|
if (GTK_WIDGET_VISIBLE (gdisp->origin))
|
|
|
|
{
|
|
|
|
gtk_widget_unmap (gdisp->origin);
|
|
|
|
gtk_widget_unmap (gdisp->hrule);
|
|
|
|
gtk_widget_unmap (gdisp->vrule);
|
|
|
|
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->origin, GTK_VISIBLE);
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->hrule, GTK_VISIBLE);
|
|
|
|
GTK_WIDGET_UNSET_FLAGS (gdisp->vrule, GTK_VISIBLE);
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (gdisp->origin->parent));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!GTK_WIDGET_VISIBLE (gdisp->origin))
|
|
|
|
{
|
|
|
|
gtk_widget_map (gdisp->origin);
|
|
|
|
gtk_widget_map (gdisp->hrule);
|
|
|
|
gtk_widget_map (gdisp->vrule);
|
|
|
|
|
|
|
|
GTK_WIDGET_SET_FLAGS (gdisp->origin, GTK_VISIBLE);
|
|
|
|
GTK_WIDGET_SET_FLAGS (gdisp->hrule, GTK_VISIBLE);
|
|
|
|
GTK_WIDGET_SET_FLAGS (gdisp->vrule, GTK_VISIBLE);
|
|
|
|
|
|
|
|
gtk_widget_queue_resize (GTK_WIDGET (gdisp->origin->parent));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_toggle_guides_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
int old_val;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
old_val = gdisp->draw_guides;
|
|
|
|
gdisp->draw_guides = GTK_CHECK_MENU_ITEM (widget)->active;
|
|
|
|
|
|
|
|
if ((old_val != gdisp->draw_guides) && gdisp->gimage->guides)
|
|
|
|
{
|
|
|
|
gdisplay_expose_full (gdisp);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_snap_to_guides_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
|
|
|
|
}
|
|
|
|
|
1998-08-05 20:38:11 +08:00
|
|
|
void
|
|
|
|
view_toggle_statusbar_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
if (!GTK_CHECK_MENU_ITEM (widget)->active)
|
|
|
|
{
|
|
|
|
if (GTK_WIDGET_VISIBLE (gdisp->statusarea))
|
|
|
|
gtk_widget_hide (gdisp->statusarea);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!GTK_WIDGET_VISIBLE (gdisp->statusarea))
|
|
|
|
gtk_widget_show (gdisp->statusarea);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
view_new_view_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gdisplay_new_view (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
view_shrink_wrap_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
shrink_wrap_display (gdisp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_equalize_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
image_equalize ((void *) gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_invert_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
image_invert ((void *) gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_desaturate_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
image_desaturate ((void *) gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
channel_ops_duplicate_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
channel_ops_duplicate ((void *) gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
channel_ops_offset_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
channel_ops_offset ((void *) gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_convert_rgb_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
convert_to_rgb ((void *) gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_convert_grayscale_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
convert_to_grayscale ((void *) gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_convert_indexed_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
convert_to_indexed ((void *) gdisp->gimage);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_resize_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
1999-02-15 05:09:55 +08:00
|
|
|
GimpImage * gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
ImageResize *image_resize;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
1999-02-15 05:09:55 +08:00
|
|
|
g_return_if_fail (gdisp != NULL);
|
|
|
|
|
|
|
|
gimage = gdisp->gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* the ImageResize structure */
|
|
|
|
image_resize = (ImageResize *) g_malloc (sizeof (ImageResize));
|
1999-02-15 05:09:55 +08:00
|
|
|
image_resize->gimage = gimage;
|
|
|
|
image_resize->resize = resize_widget_new (ResizeWidget,
|
|
|
|
ResizeImage,
|
|
|
|
GTK_OBJECT (gimage),
|
|
|
|
gimage->width,
|
|
|
|
gimage->height,
|
|
|
|
gimage->xresolution,
|
|
|
|
gimage->yresolution,
|
|
|
|
image_resize_callback,
|
|
|
|
image_cancel_callback,
|
|
|
|
image_delete_callback,
|
|
|
|
image_resize);
|
1999-02-14 09:53:23 +08:00
|
|
|
|
1999-02-15 05:09:55 +08:00
|
|
|
gtk_widget_show (image_resize->resize->resize_shell);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
image_scale_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
1999-02-15 05:09:55 +08:00
|
|
|
GimpImage * gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
ImageResize *image_scale;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
1999-02-15 05:09:55 +08:00
|
|
|
g_return_if_fail (gdisp != NULL);
|
|
|
|
|
|
|
|
gimage = gdisp->gimage;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* the ImageResize structure */
|
|
|
|
image_scale = (ImageResize *) g_malloc (sizeof (ImageResize));
|
1999-02-15 05:09:55 +08:00
|
|
|
image_scale->gimage = gimage;
|
|
|
|
image_scale->resize = resize_widget_new (ScaleWidget,
|
|
|
|
ResizeImage,
|
|
|
|
GTK_OBJECT (gimage),
|
|
|
|
gimage->width,
|
|
|
|
gimage->height,
|
|
|
|
gimage->xresolution,
|
|
|
|
gimage->yresolution,
|
|
|
|
image_scale_callback,
|
|
|
|
image_cancel_callback,
|
|
|
|
image_delete_callback,
|
|
|
|
image_scale);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-02-15 05:09:55 +08:00
|
|
|
gtk_widget_show (image_scale->resize->resize_shell);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_raise_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_raise_layer (gdisp->gimage, gdisp->gimage->active_layer);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_lower_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_lower_layer (gdisp->gimage, gdisp->gimage->active_layer);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
int value;
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_anchor_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
floating_sel_anchor (gimage_get_active_layer (gdisp->gimage));
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_merge_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
layers_dialog_layer_merge_query (gdisp->gimage, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_flatten_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_flatten (gdisp->gimage);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_alpha_select_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_layer_alpha (gdisp->gimage, gdisp->gimage->active_layer);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
layers_mask_select_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gimage_mask_layer_mask (gdisp->gimage, gdisp->gimage->active_layer);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
1998-04-03 19:58:04 +08:00
|
|
|
void
|
|
|
|
layers_add_alpha_channel_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay * gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
layer_add_alpha ( gdisp->gimage->active_layer);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
1998-03-02 03:38:25 +08:00
|
|
|
void
|
|
|
|
tools_default_colors_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
palette_set_default_colors ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
tools_swap_colors_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
palette_swap_colors ();
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
1998-06-07 21:55:36 +08:00
|
|
|
tools_select_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_action)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
1998-04-06 06:49:16 +08:00
|
|
|
GDisplay * gdisp;
|
|
|
|
|
1998-06-22 04:17:21 +08:00
|
|
|
if (!tool_info[callback_action].init_func)
|
|
|
|
{
|
|
|
|
/* Activate the approriate widget */
|
|
|
|
gtk_widget_activate (tool_info[callback_action].tool_widget);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* if the tool_info has an init_func */
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
gtk_widget_activate (tool_info[callback_action].tool_widget);
|
|
|
|
|
|
|
|
(* tool_info[callback_action].init_func) (gdisp);
|
|
|
|
}
|
|
|
|
|
1998-04-06 06:49:16 +08:00
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1998-06-07 21:55:36 +08:00
|
|
|
filters_repeat_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_action)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
1998-06-07 21:55:36 +08:00
|
|
|
plug_in_repeat (callback_action);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_brushes_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
create_brush_dialog ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_patterns_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
create_pattern_dialog ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_palette_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
palette_create ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1998-07-12 06:23:23 +08:00
|
|
|
dialogs_gradient_editor_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
grad_create_gradient_editor ();
|
|
|
|
} /* dialogs_gradient_editor_cmd_callback */
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_lc_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
1998-06-24 05:28:22 +08:00
|
|
|
if (gdisp == NULL)
|
1998-06-29 08:24:44 +08:00
|
|
|
lc_dialog_create (NULL);
|
1998-06-24 05:28:22 +08:00
|
|
|
else
|
1998-06-29 08:24:44 +08:00
|
|
|
lc_dialog_create (gdisp->gimage);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
1999-01-08 03:53:05 +08:00
|
|
|
static void
|
|
|
|
cmap_dlg_sel_cb(ColormapDialog* dlg, gpointer user_data)
|
|
|
|
{
|
|
|
|
guchar* c;
|
|
|
|
|
|
|
|
GimpImage* img = colormap_dialog_image(dlg);
|
|
|
|
c = &img->cmap[colormap_dialog_col_index(dlg) * 3];
|
|
|
|
if(active_color == FOREGROUND)
|
|
|
|
palette_set_foreground (c[0], c[1], c[2]);
|
|
|
|
else if(active_color == BACKGROUND)
|
|
|
|
palette_set_background (c[0], c[1], c[2]);
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
dialogs_indexed_palette_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
1999-01-08 03:53:05 +08:00
|
|
|
static ColormapDialog* cmap_dlg;
|
|
|
|
if(!cmap_dlg){
|
|
|
|
cmap_dlg = colormap_dialog_create (image_context);
|
|
|
|
colormap_dialog_connect_selected(cmap_dlg_sel_cb, NULL,
|
|
|
|
cmap_dlg);
|
|
|
|
}
|
|
|
|
gtk_widget_show(GTK_WIDGET(cmap_dlg));
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_tools_options_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
tools_options_dialog_show ();
|
|
|
|
}
|
|
|
|
|
1998-06-06 11:49:01 +08:00
|
|
|
void
|
|
|
|
dialogs_input_devices_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
create_input_dialog ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dialogs_device_status_cmd_callback (GtkWidget *widget,
|
1998-08-03 03:05:02 +08:00
|
|
|
gpointer client_data)
|
1998-06-06 11:49:01 +08:00
|
|
|
{
|
|
|
|
create_device_status ();
|
|
|
|
}
|
|
|
|
|
1998-08-03 03:05:02 +08:00
|
|
|
void
|
|
|
|
dialogs_error_console_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
error_console_add (NULL);
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
about_dialog_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
about_dialog_create (FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
tips_dialog_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
tips_dialog_create ();
|
|
|
|
}
|
|
|
|
|
1999-01-19 08:03:00 +08:00
|
|
|
void
|
|
|
|
dialogs_module_browser_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
GtkWidget *w;
|
|
|
|
|
|
|
|
w = module_db_browser_new ();
|
|
|
|
gtk_widget_show (w);
|
|
|
|
}
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/****************************************************/
|
|
|
|
/** LOCAL FUNCTIONS **/
|
|
|
|
/****************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*********************/
|
|
|
|
/* Local functions */
|
|
|
|
/*********************/
|
|
|
|
|
|
|
|
static void
|
|
|
|
image_resize_callback (GtkWidget *w,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
ImageResize *image_resize;
|
|
|
|
GImage *gimage;
|
|
|
|
|
|
|
|
image_resize = (ImageResize *) client_data;
|
1999-02-14 09:53:23 +08:00
|
|
|
|
1998-06-30 23:31:32 +08:00
|
|
|
if ((gimage = image_resize->gimage) != NULL)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
if (image_resize->resize->width > 0 &&
|
|
|
|
image_resize->resize->height > 0)
|
|
|
|
{
|
|
|
|
gimage_resize (gimage,
|
|
|
|
image_resize->resize->width,
|
|
|
|
image_resize->resize->height,
|
|
|
|
image_resize->resize->off_x,
|
|
|
|
image_resize->resize->off_y);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
g_message (_("Resize Error: Both width and height must be greater than zero."));
|
1997-11-25 06:05:25 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resize_widget_free (image_resize->resize);
|
|
|
|
g_free (image_resize);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
image_scale_callback (GtkWidget *w,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
ImageResize *image_scale;
|
|
|
|
GImage *gimage;
|
|
|
|
|
|
|
|
image_scale = (ImageResize *) client_data;
|
1999-02-14 09:53:23 +08:00
|
|
|
|
1999-02-16 16:53:54 +08:00
|
|
|
if ((gimage = image_scale->gimage) != NULL &&
|
|
|
|
(image_scale->resize->width != gimage->width ||
|
|
|
|
image_scale->resize->height != gimage->height))
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
if (image_scale->resize->width > 0 &&
|
|
|
|
image_scale->resize->height > 0)
|
|
|
|
{
|
|
|
|
gimage_scale (gimage,
|
|
|
|
image_scale->resize->width,
|
|
|
|
image_scale->resize->height);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
g_message (_("Scale Error: Both width and height must be greater than zero."));
|
1997-11-25 06:05:25 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resize_widget_free (image_scale->resize);
|
|
|
|
g_free (image_scale);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
image_delete_callback (GtkWidget *w,
|
|
|
|
GdkEvent *e,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
image_cancel_callback (w, client_data);
|
|
|
|
|
1998-03-13 06:01:43 +08:00
|
|
|
return TRUE;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
image_cancel_callback (GtkWidget *w,
|
|
|
|
gpointer client_data)
|
|
|
|
{
|
|
|
|
ImageResize *image_resize;
|
|
|
|
image_resize = (ImageResize *) client_data;
|
|
|
|
|
|
|
|
resize_widget_free (image_resize->resize);
|
|
|
|
g_free (image_resize);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimage_mask_feather_callback (GtkWidget *w,
|
|
|
|
gpointer client_data,
|
|
|
|
gpointer call_data)
|
|
|
|
{
|
1998-06-30 09:14:36 +08:00
|
|
|
GImage *gimage=GIMP_IMAGE(client_data);
|
1997-11-25 06:05:25 +08:00
|
|
|
double feather_radius;
|
|
|
|
|
|
|
|
feather_radius = atof (call_data);
|
|
|
|
|
|
|
|
gimage_mask_feather (gimage, feather_radius);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimage_mask_border_callback (GtkWidget *w,
|
|
|
|
gpointer client_data,
|
|
|
|
gpointer call_data)
|
|
|
|
{
|
|
|
|
GImage *gimage;
|
|
|
|
int border_radius;
|
|
|
|
|
1998-06-30 09:14:36 +08:00
|
|
|
gimage=GIMP_IMAGE(client_data);
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
border_radius = atoi (call_data);
|
|
|
|
|
|
|
|
gimage_mask_border (gimage, border_radius);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimage_mask_grow_callback (GtkWidget *w,
|
|
|
|
gpointer client_data,
|
|
|
|
gpointer call_data)
|
|
|
|
{
|
1998-06-30 09:14:36 +08:00
|
|
|
GImage *gimage=GIMP_IMAGE(client_data);
|
1997-11-25 06:05:25 +08:00
|
|
|
int grow_pixels;
|
|
|
|
|
|
|
|
grow_pixels = atoi (call_data);
|
|
|
|
|
|
|
|
gimage_mask_grow (gimage, grow_pixels);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimage_mask_shrink_callback (GtkWidget *w,
|
|
|
|
gpointer client_data,
|
|
|
|
gpointer call_data)
|
|
|
|
{
|
1998-06-30 09:14:36 +08:00
|
|
|
GImage *gimage=GIMP_IMAGE(client_data);
|
1997-11-25 06:05:25 +08:00
|
|
|
int shrink_pixels;
|
|
|
|
|
|
|
|
shrink_pixels = atoi (call_data);
|
|
|
|
|
|
|
|
gimage_mask_shrink (gimage, shrink_pixels);
|
|
|
|
gdisplays_flush ();
|
|
|
|
}
|
1998-03-17 11:53:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|