1998-06-09 05:53:45 +08:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "appenv.h"
|
|
|
|
#include "actionarea.h"
|
|
|
|
#include "app_procs.h"
|
|
|
|
#include "commands.h"
|
|
|
|
#include "general.h"
|
1998-06-13 03:43:55 +08:00
|
|
|
#include "gimage.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
#include "gimprc.h"
|
1998-06-13 03:43:55 +08:00
|
|
|
#include "global_edit.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
#include "interface.h"
|
|
|
|
#include "plug_in.h"
|
1998-06-13 03:43:55 +08:00
|
|
|
#include "tile_manager_pvt.h"
|
1998-08-16 08:34:20 +08:00
|
|
|
#include "gdisplay.h"
|
1999-03-02 08:31:39 +08:00
|
|
|
#include "libgimp/gimpchainbutton.h"
|
1999-02-25 19:25:53 +08:00
|
|
|
#include "libgimp/gimpsizeentry.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
|
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"
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
typedef struct {
|
|
|
|
GtkWidget *dlg;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
|
|
|
GtkWidget *size_sizeentry;
|
1999-03-02 08:31:39 +08:00
|
|
|
GtkWidget *simple_res;
|
1999-02-25 19:25:53 +08:00
|
|
|
GtkWidget *resolution_sizeentry;
|
|
|
|
GtkWidget *change_size;
|
1999-03-02 08:31:39 +08:00
|
|
|
GtkWidget *couple_resolutions;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
int width;
|
|
|
|
int height;
|
1999-02-25 19:25:53 +08:00
|
|
|
GUnit unit;
|
|
|
|
|
|
|
|
float xresolution;
|
|
|
|
float yresolution;
|
|
|
|
GUnit res_unit;
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
int type;
|
|
|
|
int fill_type;
|
|
|
|
} NewImageValues;
|
|
|
|
|
|
|
|
/* new image local functions */
|
|
|
|
static void file_new_ok_callback (GtkWidget *, gpointer);
|
|
|
|
static void file_new_cancel_callback (GtkWidget *, gpointer);
|
|
|
|
static gint file_new_delete_callback (GtkWidget *, GdkEvent *, gpointer);
|
|
|
|
static void file_new_toggle_callback (GtkWidget *, gpointer);
|
|
|
|
static void file_new_resolution_callback (GtkWidget *, gpointer);
|
1999-03-02 08:31:39 +08:00
|
|
|
static void file_new_advanced_res_callback (GtkWidget *, gpointer);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
/* static variables */
|
|
|
|
static int last_width = 256;
|
|
|
|
static int last_height = 256;
|
|
|
|
static int last_type = RGB;
|
|
|
|
static int last_fill_type = BACKGROUND_FILL;
|
1999-02-25 19:25:53 +08:00
|
|
|
static float last_xresolution = 72; /* always in DPI */
|
|
|
|
static float last_yresolution = 72;
|
|
|
|
static GUnit last_unit = UNIT_INCH;
|
|
|
|
static GUnit last_res_unit = UNIT_INCH;
|
1998-06-13 03:43:55 +08:00
|
|
|
static gboolean last_new_image = TRUE;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
static int new_dialog_run;
|
1998-06-13 03:43:55 +08:00
|
|
|
extern TileManager *global_buf;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
static void
|
|
|
|
file_new_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
NewImageValues *vals;
|
|
|
|
GImage *gimage;
|
|
|
|
GDisplay *gdisplay;
|
|
|
|
Layer *layer;
|
|
|
|
int type;
|
|
|
|
|
|
|
|
vals = data;
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
/* get the image size in pixels */
|
|
|
|
vals->width =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (vals->size_sizeentry), 0);
|
|
|
|
vals->height =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (vals->size_sizeentry), 1);
|
1998-10-19 04:38:36 +08:00
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
/* get the resolution in dpi */
|
|
|
|
vals->xresolution =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 0);
|
|
|
|
vals->yresolution =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 1);
|
1998-06-14 04:57:23 +08:00
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
/* get the units */
|
|
|
|
vals->unit =
|
|
|
|
gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (vals->size_sizeentry));
|
|
|
|
vals->res_unit =
|
|
|
|
gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (vals->resolution_sizeentry));
|
1998-06-14 04:57:23 +08:00
|
|
|
|
1998-06-13 03:43:55 +08:00
|
|
|
last_new_image = TRUE;
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_destroy (vals->dlg);
|
|
|
|
|
|
|
|
last_width = vals->width;
|
|
|
|
last_height = vals->height;
|
|
|
|
last_type = vals->type;
|
|
|
|
last_fill_type = vals->fill_type;
|
1999-02-25 19:25:53 +08:00
|
|
|
last_xresolution = vals->xresolution;
|
|
|
|
last_yresolution = vals->yresolution;
|
1998-06-09 05:53:45 +08:00
|
|
|
last_unit = vals->unit;
|
1998-06-10 05:21:23 +08:00
|
|
|
last_res_unit = vals->res_unit;
|
1998-06-13 03:43:55 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
switch (vals->fill_type)
|
|
|
|
{
|
|
|
|
case BACKGROUND_FILL:
|
1998-07-14 13:35:42 +08:00
|
|
|
case FOREGROUND_FILL:
|
1998-06-09 05:53:45 +08:00
|
|
|
case WHITE_FILL:
|
|
|
|
type = (vals->type == RGB) ? RGB_GIMAGE : GRAY_GIMAGE;
|
|
|
|
break;
|
|
|
|
case TRANSPARENT_FILL:
|
|
|
|
type = (vals->type == RGB) ? RGBA_GIMAGE : GRAYA_GIMAGE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
type = RGB_IMAGE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
gimage = gimage_new (vals->width, vals->height, vals->type);
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
gimp_image_set_resolution (gimage, vals->xresolution, vals->yresolution);
|
|
|
|
gimp_image_set_unit (gimage, vals->unit);
|
1998-10-05 18:05:29 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
/* Make the background (or first) layer */
|
1998-06-29 08:24:44 +08:00
|
|
|
layer = layer_new (gimage, gimage->width, gimage->height,
|
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
|
|
|
type, _("Background"), OPAQUE_OPACITY, NORMAL);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
if (layer) {
|
|
|
|
/* add the new layer to the gimage */
|
|
|
|
gimage_disable_undo (gimage);
|
|
|
|
gimage_add_layer (gimage, layer, 0);
|
|
|
|
gimage_enable_undo (gimage);
|
|
|
|
|
|
|
|
drawable_fill (GIMP_DRAWABLE(layer), vals->fill_type);
|
|
|
|
|
|
|
|
gimage_clean_all (gimage);
|
|
|
|
|
|
|
|
gdisplay = gdisplay_new (gimage, 0x0101);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_free (vals);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
|
|
|
file_new_delete_callback (GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
file_new_cancel_callback (widget, data);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
file_new_cancel_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
NewImageValues *vals;
|
|
|
|
|
|
|
|
vals = data;
|
|
|
|
|
|
|
|
gtk_widget_destroy (vals->dlg);
|
|
|
|
g_free (vals);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
file_new_toggle_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
int *val;
|
|
|
|
|
|
|
|
if (GTK_TOGGLE_BUTTON (widget)->active)
|
|
|
|
{
|
|
|
|
val = data;
|
|
|
|
*val = (long) gtk_object_get_user_data (GTK_OBJECT (widget));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-03-02 08:31:39 +08:00
|
|
|
static void
|
|
|
|
file_new_advanced_res_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
NewImageValues *vals;
|
|
|
|
|
|
|
|
vals = data;
|
|
|
|
gtk_widget_hide(widget);
|
|
|
|
gtk_widget_hide(vals->simple_res);
|
|
|
|
gtk_widget_show(vals->resolution_sizeentry);
|
|
|
|
gtk_widget_show (vals->couple_resolutions);
|
|
|
|
}
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
static void
|
|
|
|
file_new_resolution_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
NewImageValues *vals;
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
static float xres = 0.0;
|
|
|
|
static float yres = 0.0;
|
|
|
|
float new_xres;
|
|
|
|
float new_yres;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
vals = data;
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
new_xres = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-03-02 08:31:39 +08:00
|
|
|
if (widget == vals->simple_res)
|
1999-02-25 19:25:53 +08:00
|
|
|
{
|
|
|
|
if (new_xres != xres)
|
|
|
|
{
|
1999-03-02 08:31:39 +08:00
|
|
|
xres = new_xres;
|
|
|
|
yres = xres;
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 1, xres);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 0, yres);
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
1999-03-02 08:31:39 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
new_yres = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
|
|
|
|
if (gimp_chain_button_get_active (GIMP_CHAIN_BUTTON (vals->couple_resolutions)))
|
1999-02-25 19:25:53 +08:00
|
|
|
{
|
1999-03-02 08:31:39 +08:00
|
|
|
if (new_xres != xres)
|
|
|
|
{
|
|
|
|
yres = new_yres = xres = new_xres;
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 1, yres);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (new_yres != yres)
|
|
|
|
{
|
|
|
|
xres = new_xres = yres = new_yres;
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 0, xres);
|
|
|
|
}
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
1999-03-03 20:35:12 +08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (new_xres != xres)
|
|
|
|
xres = new_xres;
|
|
|
|
if (new_yres != yres)
|
|
|
|
yres = new_yres;
|
|
|
|
}
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (vals->size_sizeentry), 0,
|
|
|
|
xres,
|
1999-03-02 08:31:39 +08:00
|
|
|
FALSE);
|
1999-02-25 19:25:53 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (vals->size_sizeentry), 1,
|
|
|
|
yres,
|
1999-03-02 08:31:39 +08:00
|
|
|
FALSE);
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|
1998-06-10 05:21:23 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
void
|
|
|
|
file_new_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_action)
|
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
NewImageValues *vals;
|
|
|
|
GtkWidget *button;
|
|
|
|
GtkWidget *vbox;
|
1999-02-25 19:25:53 +08:00
|
|
|
GtkWidget *vbox2;
|
1998-06-09 05:53:45 +08:00
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *frame;
|
|
|
|
GtkWidget *radio_box;
|
1999-03-02 08:31:39 +08:00
|
|
|
gboolean advanced_options = FALSE;
|
1998-06-09 05:53:45 +08:00
|
|
|
GSList *group;
|
|
|
|
|
|
|
|
if(!new_dialog_run)
|
|
|
|
{
|
|
|
|
last_width = default_width;
|
|
|
|
last_height = default_height;
|
|
|
|
last_type = default_type;
|
1999-03-03 20:35:12 +08:00
|
|
|
last_xresolution = default_xresolution; /* these values are taken */
|
|
|
|
last_yresolution = default_yresolution; /* from gimprc */
|
|
|
|
last_unit = default_units;
|
|
|
|
last_res_unit = default_resolution_units;
|
1998-06-18 13:04:01 +08:00
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
new_dialog_run = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Before we try to determine the responsible gdisplay,
|
|
|
|
* make sure this wasn't called from the toolbox
|
|
|
|
*/
|
|
|
|
if (callback_action)
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
else
|
|
|
|
gdisp = NULL;
|
|
|
|
|
|
|
|
vals = g_malloc (sizeof (NewImageValues));
|
|
|
|
vals->fill_type = last_fill_type;
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
{
|
|
|
|
vals->width = gdisp->gimage->width;
|
|
|
|
vals->height = gdisp->gimage->height;
|
|
|
|
vals->type = gimage_base_type (gdisp->gimage);
|
1999-02-25 19:25:53 +08:00
|
|
|
vals->xresolution = gdisp->gimage->xresolution;
|
|
|
|
vals->yresolution = gdisp->gimage->yresolution;
|
|
|
|
vals->unit = gdisp->gimage->unit;
|
1999-03-15 02:03:58 +08:00
|
|
|
vals->res_unit = last_res_unit;
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
vals->width = last_width;
|
|
|
|
vals->height = last_height;
|
|
|
|
vals->type = last_type;
|
1999-02-25 19:25:53 +08:00
|
|
|
vals->xresolution = last_xresolution;
|
|
|
|
vals->yresolution = last_yresolution;
|
1998-06-09 05:53:45 +08:00
|
|
|
vals->unit = last_unit;
|
1998-06-10 05:21:23 +08:00
|
|
|
vals->res_unit = last_res_unit;
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|
|
|
|
|
1999-03-04 01:48:29 +08:00
|
|
|
if (ABS (vals->xresolution - vals->yresolution) > 1e-5)
|
1999-03-02 08:31:39 +08:00
|
|
|
advanced_options = TRUE;
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
if (vals->type == INDEXED)
|
|
|
|
vals->type = RGB; /* no indexed images */
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
/* if a cut buffer exist, default to using its size for the new image */
|
1998-06-13 03:43:55 +08:00
|
|
|
/* also check to see if a new_image has been opened */
|
|
|
|
|
|
|
|
if(global_buf && !last_new_image)
|
|
|
|
{
|
1998-08-16 03:17:36 +08:00
|
|
|
vals->width = global_buf->width;
|
|
|
|
vals->height = global_buf->height;
|
1998-10-19 04:38:36 +08:00
|
|
|
/* It would be good to set the resolution here, but that would
|
|
|
|
* require TileManagers to know about the resolution of tiles
|
|
|
|
* they're dealing with. It's not clear we want to go down that
|
|
|
|
* road. -- austin */
|
1998-06-13 03:43:55 +08:00
|
|
|
}
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
vals->dlg = gtk_dialog_new ();
|
|
|
|
gtk_window_set_wmclass (GTK_WINDOW (vals->dlg), "new_image", "Gimp");
|
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
|
|
|
gtk_window_set_title (GTK_WINDOW (vals->dlg), _("New Image"));
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_window_set_position (GTK_WINDOW (vals->dlg), GTK_WIN_POS_MOUSE);
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
gtk_window_set_policy(GTK_WINDOW (vals->dlg), FALSE, FALSE, FALSE);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
/* handle the wm close signal */
|
|
|
|
gtk_signal_connect (GTK_OBJECT (vals->dlg), "delete_event",
|
|
|
|
GTK_SIGNAL_FUNC (file_new_delete_callback),
|
|
|
|
vals);
|
|
|
|
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (vals->dlg)->action_area), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
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
|
|
|
button = gtk_button_new_with_label (_("OK"));
|
1998-06-09 05:53:45 +08:00
|
|
|
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
|
|
(GtkSignalFunc) file_new_ok_callback,
|
|
|
|
vals);
|
|
|
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
|
|
|
|
button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_grab_default (button);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
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
|
|
|
button = gtk_button_new_with_label (_("Cancel"));
|
1998-06-09 05:53:45 +08:00
|
|
|
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
|
|
(GtkSignalFunc) file_new_cancel_callback,
|
|
|
|
vals);
|
|
|
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->action_area),
|
|
|
|
button, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
/* vbox holding the rest of the dialog */
|
1998-06-09 05:53:45 +08:00
|
|
|
vbox = gtk_vbox_new (FALSE, 1);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (vals->dlg)->vbox),
|
|
|
|
vbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
vals->size_sizeentry = gimp_size_entry_new (2, vals->unit, "%p",
|
|
|
|
FALSE, TRUE, 75,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (vals->size_sizeentry), 0,
|
|
|
|
vals->xresolution, FALSE);
|
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (vals->size_sizeentry), 1,
|
|
|
|
vals->yresolution, FALSE);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (vals->size_sizeentry),
|
|
|
|
0, 1, 32767);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (vals->size_sizeentry),
|
|
|
|
1, 1, 32767);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->size_sizeentry), 0,
|
|
|
|
vals->width);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->size_sizeentry), 1,
|
|
|
|
vals->height);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->size_sizeentry),
|
|
|
|
_("Width"), 0, 1, 0.0);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->size_sizeentry),
|
|
|
|
_("Height"), 0, 2, 0.0);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->size_sizeentry),
|
|
|
|
_("Pixels"), 1, 4, 0.0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vals->size_sizeentry), 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), vals->size_sizeentry, TRUE, TRUE, 0);
|
1999-03-02 08:31:39 +08:00
|
|
|
|
1999-03-15 02:03:58 +08:00
|
|
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (vals->size_sizeentry));
|
1999-02-25 19:25:53 +08:00
|
|
|
gtk_widget_show (vals->size_sizeentry);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
/* resolution frame */
|
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
|
|
|
frame = gtk_frame_new (_("Resolution"));
|
1999-02-25 19:25:53 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 1);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
|
1999-03-02 08:31:39 +08:00
|
|
|
vals->simple_res = gimp_size_entry_new (1, vals->res_unit, "%s",
|
|
|
|
FALSE, FALSE, 75,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (vals->simple_res),
|
|
|
|
0, 1, 32767);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->simple_res), 0,
|
|
|
|
MIN(vals->xresolution, vals->yresolution));
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->simple_res),
|
|
|
|
_("pixels per "), 1, 2, 0.0);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (vals->simple_res), "value_changed",
|
|
|
|
(GtkSignalFunc)file_new_resolution_callback, vals);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), vals->simple_res, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
/* the advanced resolution stuff
|
|
|
|
(not shown by default, but used to keep track of all the variables) */
|
1999-02-25 19:25:53 +08:00
|
|
|
vals->resolution_sizeentry = gimp_size_entry_new (2, vals->res_unit, "%s",
|
|
|
|
FALSE, TRUE, 75,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
0, 1, 32767);
|
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
1, 1, 32767);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 0,
|
|
|
|
vals->xresolution);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (vals->resolution_sizeentry), 1,
|
|
|
|
vals->yresolution);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
_("Horizontal"), 0, 1, 0.0);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
_("Vertical"), 0, 2, 0.0);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
_("dpi"), 1, 3, 0.0);
|
|
|
|
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (vals->resolution_sizeentry),
|
|
|
|
_("pixels per "), 2, 3, 0.0);
|
1999-03-02 08:31:39 +08:00
|
|
|
vals->couple_resolutions = gimp_chain_button_new (GIMP_CHAIN_BOTTOM);
|
1999-03-04 01:48:29 +08:00
|
|
|
if (ABS (vals->xresolution - vals->yresolution) < 1e-5)
|
|
|
|
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (vals->couple_resolutions), TRUE);
|
1999-03-02 08:31:39 +08:00
|
|
|
gtk_table_attach_defaults (GTK_TABLE (vals->resolution_sizeentry),
|
|
|
|
vals->couple_resolutions, 1, 3, 3, 4);
|
1999-02-25 19:25:53 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (vals->resolution_sizeentry), "value_changed",
|
|
|
|
(GtkSignalFunc)file_new_resolution_callback, vals);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (vals->resolution_sizeentry), "refval_changed",
|
|
|
|
(GtkSignalFunc)file_new_resolution_callback, vals);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), vals->resolution_sizeentry,
|
|
|
|
TRUE, TRUE, 0);
|
1999-03-04 01:48:29 +08:00
|
|
|
if (advanced_options != FALSE)
|
1999-03-02 08:31:39 +08:00
|
|
|
{
|
|
|
|
gtk_widget_show (vals->resolution_sizeentry);
|
|
|
|
gtk_widget_show (vals->couple_resolutions);
|
1999-03-04 01:48:29 +08:00
|
|
|
} else {
|
|
|
|
gtk_widget_show (vals->simple_res);
|
|
|
|
button = gtk_button_new_with_label (_("Advanced options >>"));
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), button,
|
|
|
|
FALSE, FALSE, 0);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
|
|
|
(GtkSignalFunc)file_new_advanced_res_callback, vals);
|
|
|
|
gtk_widget_show (button);
|
1999-03-02 08:31:39 +08:00
|
|
|
}
|
1999-02-25 19:25:53 +08:00
|
|
|
|
|
|
|
/* hbox containing the Image type and fill type frames */
|
1998-06-09 05:53:45 +08:00
|
|
|
hbox = gtk_hbox_new(FALSE, 1);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show(hbox);
|
|
|
|
|
|
|
|
/* frame for Image Type */
|
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
|
|
|
frame = gtk_frame_new (_("Image Type"));
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
|
|
|
/* radio buttons and box */
|
|
|
|
radio_box = gtk_vbox_new (FALSE, 1);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (radio_box), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (frame), radio_box);
|
|
|
|
gtk_widget_show (radio_box);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (NULL, _("RGB"));
|
1998-06-09 05:53:45 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, FALSE, TRUE, 0);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) RGB);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->type);
|
|
|
|
if (vals->type == RGB)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (group, _("Grayscale"));
|
1998-06-09 05:53:45 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>
* app/tips_dialog.c: Add default to Cancel button, remove
unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
are like toolbar buttons), changed abreviated prev to
previous, prev/next button are now same size, cancel button
is in a button box. Added vboxes where necessary to prevent
prev/next and check button from filling vertically.
* app/app_procs.c: when splashscreen dialog is larger than the
logo, (due to huge font), center logo.
* app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
disallows resizing, changes vertical expanding of widgets to
not occur
* app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes
+/- buttons for zoom pixmaps (eventually, these can be replaced
with a magnifying glass with a little +/- I think), so that they
no longer expand as they did before. I modified his patch so it
did not create a misused toolbar. I did some other stuff here too,
moved Close button to the left, made it the window's default,
and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.
* app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
This one changes buttons to be put in a button box which is right
justified. If we decide later that spread is better, we can
change this easy enough.
* app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.
* libgimp/gimpunit.h
libgimp/gimpunit.c: New files from Michael Natterer
<mitschel@cs.tu-berlin.de>, gimp_unit_* routines.
* app/gimage.h
app/gimpimage.h
app/gimpimage.c
app/gimpimageP.h
app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, FALSE, TRUE, 0);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) GRAY);
|
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->type);
|
|
|
|
if (vals->type == GRAY)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
|
|
|
|
|
|
|
/* frame for fill type */
|
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
|
|
|
frame = gtk_frame_new (_("Fill Type"));
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (frame);
|
|
|
|
|
|
|
|
radio_box = gtk_vbox_new (FALSE, 1);
|
1998-12-04 07:01:44 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (radio_box), 2);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (frame), radio_box);
|
|
|
|
gtk_widget_show (radio_box);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (NULL, _("Foreground"));
|
1998-06-09 05:53:45 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0);
|
1998-07-29 03:24:23 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) FOREGROUND_FILL);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->fill_type);
|
1998-07-29 03:24:23 +08:00
|
|
|
if (vals->fill_type == FOREGROUND_FILL)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (group, _("Background"));
|
1998-06-09 05:53:45 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0);
|
1998-07-29 03:24:23 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) BACKGROUND_FILL);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->fill_type);
|
1998-07-29 03:24:23 +08:00
|
|
|
if (vals->fill_type == BACKGROUND_FILL)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (group, _("White"));
|
1998-06-09 05:53:45 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0);
|
1998-07-29 03:24:23 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) WHITE_FILL);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->fill_type);
|
1998-07-29 03:24:23 +08:00
|
|
|
if (vals->fill_type == WHITE_FILL)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
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
|
|
|
button = gtk_radio_button_new_with_label (group, _("Transparent"));
|
1998-07-14 13:35:42 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0);
|
1998-07-29 03:24:23 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) TRANSPARENT_FILL);
|
1998-07-14 13:35:42 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
|
|
|
(GtkSignalFunc) file_new_toggle_callback,
|
|
|
|
&vals->fill_type);
|
1998-07-29 03:24:23 +08:00
|
|
|
if (vals->fill_type == TRANSPARENT_FILL)
|
1999-01-16 01:35:04 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
1998-07-14 13:35:42 +08:00
|
|
|
gtk_widget_show (button);
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
gtk_widget_show (vals->dlg);
|
|
|
|
}
|
|
|
|
|
1998-06-13 03:43:55 +08:00
|
|
|
void file_new_reset_current_cut_buffer()
|
|
|
|
{
|
1999-02-25 19:25:53 +08:00
|
|
|
/* this function just changes the status of last_image_new
|
1998-06-13 03:43:55 +08:00
|
|
|
so i can if theres been a cut/copy since the last file new */
|
|
|
|
last_new_image = FALSE;
|
1998-06-18 13:04:01 +08:00
|
|
|
}
|