1999-05-19 01:33:39 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995-1999 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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
1999-07-10 19:53:42 +08:00
|
|
|
#include "file_new_dialog.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
#include "gimprc.h"
|
1999-09-28 01:58:10 +08:00
|
|
|
#include "gimpui.h"
|
1998-08-16 08:34:20 +08:00
|
|
|
#include "gdisplay.h"
|
1998-06-09 05:53:45 +08:00
|
|
|
|
2000-02-01 07:59:05 +08:00
|
|
|
#include "config.h"
|
1999-04-03 03:46:59 +08:00
|
|
|
#include "libgimp/gimpchainbutton.h"
|
1999-05-10 00:38:05 +08:00
|
|
|
#include "libgimp/gimplimits.h"
|
1999-04-03 03:46:59 +08:00
|
|
|
#include "libgimp/gimpsizeentry.h"
|
1999-05-10 00:38:05 +08:00
|
|
|
#include "libgimp/gimpintl.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
|
|
|
|
1999-09-28 01:58:10 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
1998-06-09 05:53:45 +08:00
|
|
|
GtkWidget *dlg;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
GtkWidget *confirm_dlg;
|
|
|
|
|
|
|
|
GtkWidget *size_frame;
|
|
|
|
GtkWidget *size_se;
|
|
|
|
GtkWidget *resolution_se;
|
1999-03-02 08:31:39 +08:00
|
|
|
GtkWidget *couple_resolutions;
|
1999-02-25 19:25:53 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
/* this should be a list */
|
1999-05-19 01:33:39 +08:00
|
|
|
GtkWidget *type_w[2];
|
|
|
|
GtkWidget *fill_type_w[4];
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
GimpImageNewValues *values;
|
|
|
|
gdouble size;
|
|
|
|
} NewImageInfo;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
|
|
|
/* new image local functions */
|
2000-01-14 20:41:00 +08:00
|
|
|
static void file_new_confirm_dialog (NewImageInfo *);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
2000-01-14 20:41:00 +08:00
|
|
|
static void file_new_ok_callback (GtkWidget *, gpointer);
|
|
|
|
static void file_new_reset_callback (GtkWidget *, gpointer);
|
|
|
|
static void file_new_cancel_callback (GtkWidget *, gpointer);
|
1998-06-09 05:53:45 +08:00
|
|
|
static void file_new_resolution_callback (GtkWidget *, gpointer);
|
1999-05-19 01:33:39 +08:00
|
|
|
static void file_new_image_size_callback (GtkWidget *, gpointer);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
static void
|
|
|
|
file_new_ok_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
|
|
|
GimpImageNewValues *values;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = (NewImageInfo*) data;
|
|
|
|
values = info->values;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
/* get the image size in pixels */
|
1999-08-26 12:39:21 +08:00
|
|
|
values->width = (int)
|
|
|
|
(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->size_se), 0) + 0.5);
|
|
|
|
values->height = (int)
|
|
|
|
(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->size_se), 1) + 0.5);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
/* get the resolution in dpi */
|
1999-08-26 12:39:21 +08:00
|
|
|
values->xresolution =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->resolution_se), 0);
|
|
|
|
values->yresolution =
|
|
|
|
gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->resolution_se), 1);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
/* get the units */
|
1999-08-26 12:39:21 +08:00
|
|
|
values->unit =
|
|
|
|
gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (info->size_se));
|
|
|
|
values->res_unit =
|
|
|
|
gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (info->resolution_se));
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
if (info->size > max_new_image_size)
|
1999-05-19 01:33:39 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
file_new_confirm_dialog (info);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_destroy (info->dlg);
|
|
|
|
image_new_create_image (values);
|
|
|
|
image_new_values_free (values);
|
1999-11-04 08:03:27 +08:00
|
|
|
g_free (info);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
file_new_reset_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = (NewImageInfo*) data;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_signal_handler_block_by_data (GTK_OBJECT (info->resolution_se), info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
gimp_chain_button_set_active
|
1999-08-26 12:39:21 +08:00
|
|
|
(GIMP_CHAIN_BUTTON (info->couple_resolutions),
|
1999-05-19 01:33:39 +08:00
|
|
|
ABS (default_xresolution - default_yresolution) < GIMP_MIN_RESOLUTION);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
0, default_xresolution);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
1, default_yresolution);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
default_resolution_units);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_signal_handler_unblock_by_data (GTK_OBJECT (info->resolution_se), info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
0, default_xresolution, TRUE);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
1, default_yresolution, TRUE);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
0, default_width);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
1, default_height);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
default_units);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (info->type_w[default_type]),
|
1999-05-19 01:33:39 +08:00
|
|
|
TRUE);
|
|
|
|
gtk_toggle_button_set_active
|
1999-08-26 12:39:21 +08:00
|
|
|
(GTK_TOGGLE_BUTTON (info->fill_type_w[BACKGROUND_FILL]), TRUE);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
static void
|
|
|
|
file_new_cancel_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = (NewImageInfo*) data;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_destroy (info->dlg);
|
|
|
|
image_new_values_free(info->values);
|
|
|
|
g_free (info);
|
1998-06-09 05:53:45 +08:00
|
|
|
}
|
|
|
|
|
2000-02-23 23:52:33 +08:00
|
|
|
/* local callback of file_new_confirm_dialog() */
|
1999-05-19 01:33:39 +08:00
|
|
|
static void
|
2000-02-23 23:52:33 +08:00
|
|
|
file_new_confirm_dialog_callback (GtkWidget *widget,
|
|
|
|
gboolean create,
|
|
|
|
gpointer data)
|
1999-05-19 01:33:39 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
|
|
|
|
|
|
|
info = (NewImageInfo*) data;
|
|
|
|
|
|
|
|
info->confirm_dlg = NULL;
|
2000-02-23 23:52:33 +08:00
|
|
|
|
|
|
|
if (create)
|
|
|
|
{
|
|
|
|
gtk_widget_destroy (info->dlg);
|
|
|
|
image_new_create_image (info->values);
|
|
|
|
image_new_values_free (info->values);
|
|
|
|
g_free (info);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gtk_widget_set_sensitive (info->dlg, TRUE);
|
|
|
|
}
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1999-08-26 12:39:21 +08:00
|
|
|
file_new_confirm_dialog (NewImageInfo *info)
|
1999-05-19 01:33:39 +08:00
|
|
|
{
|
|
|
|
gchar *size;
|
|
|
|
gchar *max_size;
|
|
|
|
gchar *text;
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_set_sensitive (info->dlg, FALSE);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
size = image_new_get_size_string (info->size);
|
|
|
|
max_size = image_new_get_size_string (max_new_image_size);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-12-31 05:45:28 +08:00
|
|
|
/* xgettext:no-c-format */
|
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
text = g_strdup_printf (_("You are trying to create an image which\n"
|
|
|
|
"has an initial size of %s.\n\n"
|
|
|
|
"Choose OK to create this image anyway.\n"
|
|
|
|
"Choose Cancel if you didn't mean to\n"
|
|
|
|
"create such a large image.\n\n"
|
|
|
|
"To prevent this dialog from appearing,\n"
|
|
|
|
"increase the \"Maximum Image Size\"\n"
|
|
|
|
"setting (currently %s) in the\n"
|
|
|
|
"preferences dialog."),
|
1999-08-26 12:39:21 +08:00
|
|
|
size, max_size);
|
2000-02-23 23:52:33 +08:00
|
|
|
|
|
|
|
info->confirm_dlg =
|
|
|
|
gimp_query_boolean_box (_("Confirm Image Size"),
|
|
|
|
gimp_standard_help_func,
|
|
|
|
"dialogs/file_new.html#confirm_size",
|
|
|
|
FALSE,
|
|
|
|
text,
|
|
|
|
_("OK"), _("Cancel"),
|
|
|
|
NULL, NULL,
|
|
|
|
file_new_confirm_dialog_callback,
|
|
|
|
info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
g_free (text);
|
|
|
|
g_free (max_size);
|
|
|
|
g_free (size);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_show (info->confirm_dlg);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
|
1998-06-09 05:53:45 +08:00
|
|
|
static void
|
|
|
|
file_new_resolution_callback (GtkWidget *widget,
|
1999-04-03 03:46:59 +08:00
|
|
|
gpointer data)
|
1998-06-09 05:53:45 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
static gdouble xres = 0.0;
|
|
|
|
static gdouble yres = 0.0;
|
|
|
|
gdouble new_xres;
|
|
|
|
gdouble new_yres;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = (NewImageInfo*) data;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
new_xres = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
|
1999-05-19 01:33:39 +08:00
|
|
|
new_yres = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
if (gimp_chain_button_get_active
|
1999-08-26 12:39:21 +08:00
|
|
|
(GIMP_CHAIN_BUTTON (info->couple_resolutions)))
|
1999-02-25 19:25:53 +08:00
|
|
|
{
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_handler_block_by_data
|
1999-08-26 12:39:21 +08:00
|
|
|
(GTK_OBJECT (info->resolution_se), info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-02-25 19:25:53 +08:00
|
|
|
if (new_xres != xres)
|
|
|
|
{
|
1999-04-03 03:46:59 +08:00
|
|
|
yres = new_yres = xres = new_xres;
|
1999-05-19 01:33:39 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, yres);
|
1999-02-25 19:25:53 +08:00
|
|
|
}
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
if (new_yres != yres)
|
1999-03-03 20:35:12 +08:00
|
|
|
{
|
1999-05-19 01:33:39 +08:00
|
|
|
xres = new_xres = yres = new_yres;
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, xres);
|
1999-03-03 20:35:12 +08:00
|
|
|
}
|
1999-04-03 03:46:59 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_handler_unblock_by_data
|
1999-08-26 12:39:21 +08:00
|
|
|
(GTK_OBJECT (info->resolution_se), info);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (new_xres != xres)
|
|
|
|
xres = new_xres;
|
|
|
|
if (new_yres != yres)
|
|
|
|
yres = new_yres;
|
|
|
|
}
|
1999-04-03 03:46:59 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se), 0,
|
1999-04-03 03:46:59 +08:00
|
|
|
xres, FALSE);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se), 1,
|
1999-04-03 03:46:59 +08:00
|
|
|
yres, FALSE);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
file_new_image_size_callback (widget, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
file_new_image_size_callback (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
NewImageInfo *info;
|
1999-05-19 01:33:39 +08:00
|
|
|
gchar *text;
|
|
|
|
gchar *label;
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = (NewImageInfo*) data;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-09-28 01:58:10 +08:00
|
|
|
info->values->width = (gdouble) (gint)
|
1999-08-26 12:39:21 +08:00
|
|
|
(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->size_se), 0) + 0.5);
|
1999-09-28 01:58:10 +08:00
|
|
|
info->values->height = (gdouble) (gint)
|
1999-08-26 12:39:21 +08:00
|
|
|
(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (info->size_se), 1) + 0.5);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info->size = image_new_calculate_size (info->values);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
label = g_strdup_printf (_("Image Size: %s"),
|
1999-08-26 12:39:21 +08:00
|
|
|
text = image_new_get_size_string (info->size));
|
|
|
|
gtk_frame_set_label (GTK_FRAME (info->size_frame), label);
|
1999-05-31 22:11:10 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
g_free (label);
|
|
|
|
g_free (text);
|
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
|
1999-04-03 03:46:59 +08:00
|
|
|
file_new_cmd_callback (GtkWidget *widget,
|
|
|
|
gpointer callback_data,
|
|
|
|
guint callback_action)
|
1998-06-09 05:53:45 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
GDisplay *gdisp;
|
|
|
|
GimpImage *image = NULL;
|
|
|
|
|
|
|
|
/* Before we try to determine the responsible gdisplay,
|
|
|
|
* make sure this wasn't called from the toolbox
|
|
|
|
*/
|
|
|
|
if (callback_action)
|
|
|
|
{
|
|
|
|
gdisp = gdisplay_active ();
|
|
|
|
|
|
|
|
if (gdisp)
|
|
|
|
image = gdisp->gimage;
|
|
|
|
}
|
|
|
|
|
|
|
|
image_new_create_window (NULL, image);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ui_new_image_window_create (const GimpImageNewValues *values_orig)
|
|
|
|
{
|
|
|
|
NewImageInfo *info;
|
|
|
|
GimpImageNewValues *values;
|
1999-04-03 03:46:59 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
GtkWidget *top_vbox;
|
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
GtkWidget *abox;
|
|
|
|
GtkWidget *frame;
|
|
|
|
GtkWidget *table;
|
|
|
|
GtkWidget *separator;
|
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *button;
|
|
|
|
GtkObject *adjustment;
|
|
|
|
GtkWidget *spinbutton;
|
|
|
|
GtkWidget *spinbutton2;
|
|
|
|
GtkWidget *radio_box;
|
|
|
|
GSList *group;
|
1999-08-26 12:39:21 +08:00
|
|
|
GList *list;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info = g_new (NewImageInfo, 1);
|
|
|
|
info->values = values = image_new_values_new (values_orig);
|
1999-05-31 22:11:10 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info->confirm_dlg = NULL;
|
|
|
|
info->size = 0.0;
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-09-28 01:58:10 +08:00
|
|
|
info->dlg = gimp_dialog_new (_("New Image"), "new_image",
|
|
|
|
gimp_standard_help_func,
|
1999-10-03 21:50:19 +08:00
|
|
|
"dialogs/file_new.html",
|
1999-09-28 01:58:10 +08:00
|
|
|
GTK_WIN_POS_MOUSE,
|
|
|
|
FALSE, FALSE, TRUE,
|
|
|
|
|
1999-11-24 03:11:29 +08:00
|
|
|
_("OK"), file_new_ok_callback,
|
2000-01-07 00:40:17 +08:00
|
|
|
info, NULL, NULL, TRUE, FALSE,
|
1999-12-02 21:00:18 +08:00
|
|
|
_("Reset"), file_new_reset_callback,
|
2000-01-07 00:40:17 +08:00
|
|
|
info, NULL, NULL, FALSE, FALSE,
|
1999-09-28 01:58:10 +08:00
|
|
|
_("Cancel"), file_new_cancel_callback,
|
2000-01-07 00:40:17 +08:00
|
|
|
info, NULL, NULL, FALSE, TRUE,
|
1999-09-28 01:58:10 +08:00
|
|
|
|
|
|
|
NULL);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
/* vbox holding the rest of the dialog */
|
1999-11-24 03:11:29 +08:00
|
|
|
top_vbox = gtk_vbox_new (FALSE, 4);
|
1999-04-03 03:46:59 +08:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (top_vbox), 4);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->dlg)->vbox),
|
1999-04-03 03:46:59 +08:00
|
|
|
top_vbox, TRUE, TRUE, 0);
|
|
|
|
gtk_widget_show (top_vbox);
|
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
/* Image size frame */
|
1999-08-26 12:39:21 +08:00
|
|
|
info->size_frame = gtk_frame_new (NULL);
|
|
|
|
gtk_box_pack_start (GTK_BOX (top_vbox), info->size_frame, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (info->size_frame);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
vbox = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_container_add (GTK_CONTAINER (info->size_frame), vbox);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_widget_show (vbox);
|
|
|
|
|
|
|
|
table = gtk_table_new (7, 2, FALSE);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (table), 1, 4);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (table), 2, 4);
|
|
|
|
gtk_table_set_row_spacing (GTK_TABLE (table), 4, 4);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (table);
|
|
|
|
|
|
|
|
/* the pixel size labels */
|
|
|
|
label = gtk_label_new (_("Width:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
label = gtk_label_new (_("Height:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
/* a separator after the pixel section */
|
|
|
|
separator = gtk_hseparator_new ();
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), separator, 0, 2, 2, 3);
|
|
|
|
gtk_widget_show (separator);
|
|
|
|
|
|
|
|
/* the unit size labels */
|
|
|
|
label = gtk_label_new (_("Width:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
label = gtk_label_new (_("Height:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
/* create the sizeentry which keeps it all together */
|
|
|
|
abox = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), abox, 1, 2, 3, 5);
|
1999-08-26 12:39:21 +08:00
|
|
|
info->size_se =
|
|
|
|
gimp_size_entry_new (0, values->unit, "%a", FALSE, FALSE, TRUE, 75,
|
1999-05-19 01:33:39 +08:00
|
|
|
GIMP_SIZE_ENTRY_UPDATE_SIZE);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (info->size_se), 1, 2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (abox), info->size_se);
|
|
|
|
gtk_widget_show (info->size_se);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_widget_show (abox);
|
|
|
|
|
|
|
|
/* height in units */
|
|
|
|
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
|
|
|
|
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 2);
|
|
|
|
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton),
|
|
|
|
GTK_SHADOW_NONE);
|
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
|
|
|
gtk_widget_set_usize (spinbutton, 75, 0);
|
|
|
|
/* add the "height in units" spinbutton to the sizeentry */
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_table_attach_defaults (GTK_TABLE (info->size_se), spinbutton,
|
1999-05-19 01:33:39 +08:00
|
|
|
0, 1, 2, 3);
|
|
|
|
gtk_widget_show (spinbutton);
|
|
|
|
|
|
|
|
/* height in pixels */
|
|
|
|
hbox = gtk_hbox_new (FALSE, 2);
|
|
|
|
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
|
|
|
|
spinbutton2 = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0);
|
|
|
|
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton2),
|
|
|
|
GTK_SHADOW_NONE);
|
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton2), TRUE);
|
|
|
|
gtk_widget_set_usize (spinbutton2, 75, 0);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), spinbutton2, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (spinbutton2);
|
|
|
|
|
|
|
|
label = gtk_label_new (_("Pixels"));
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
/* add the "height in pixels" spinbutton to the main table */
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2);
|
1999-04-03 03:46:59 +08:00
|
|
|
gtk_widget_show (hbox);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
/* register the height spinbuttons with the sizeentry */
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
GTK_SPIN_BUTTON (spinbutton),
|
|
|
|
GTK_SPIN_BUTTON (spinbutton2));
|
|
|
|
|
|
|
|
/* width in units */
|
|
|
|
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
|
|
|
|
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 2);
|
|
|
|
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton),
|
|
|
|
GTK_SHADOW_NONE);
|
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
|
|
|
gtk_widget_set_usize (spinbutton, 75, 0);
|
|
|
|
/* add the "width in units" spinbutton to the sizeentry */
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_table_attach_defaults (GTK_TABLE (info->size_se), spinbutton,
|
1999-05-19 01:33:39 +08:00
|
|
|
0, 1, 1, 2);
|
|
|
|
gtk_widget_show (spinbutton);
|
|
|
|
|
|
|
|
/* width in pixels */
|
|
|
|
abox = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (table), abox, 1, 2, 0, 1);
|
|
|
|
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
|
|
|
|
spinbutton2 = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0);
|
|
|
|
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton2),
|
|
|
|
GTK_SHADOW_NONE);
|
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton2), TRUE);
|
|
|
|
gtk_widget_set_usize (spinbutton2, 75, 0);
|
|
|
|
/* add the "width in pixels" spinbutton to the main table */
|
|
|
|
gtk_container_add (GTK_CONTAINER (abox), spinbutton2);
|
|
|
|
gtk_widget_show (spinbutton2);
|
|
|
|
gtk_widget_show (abox);
|
|
|
|
|
|
|
|
/* register the width spinbuttons with the sizeentry */
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (info->size_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
GTK_SPIN_BUTTON (spinbutton),
|
|
|
|
GTK_SPIN_BUTTON (spinbutton2));
|
|
|
|
|
|
|
|
/* initialize the sizeentry */
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se), 0,
|
|
|
|
values->xresolution, FALSE);
|
|
|
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (info->size_se), 1,
|
|
|
|
values->yresolution, FALSE);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (info->size_se), 0,
|
1999-05-19 01:33:39 +08:00
|
|
|
GIMP_MIN_IMAGE_SIZE,
|
|
|
|
GIMP_MAX_IMAGE_SIZE);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (info->size_se), 1,
|
1999-05-19 01:33:39 +08:00
|
|
|
GIMP_MIN_IMAGE_SIZE,
|
|
|
|
GIMP_MAX_IMAGE_SIZE);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->size_se), 0, values->width);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->size_se), 1, values->height);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (info->size_se), "refval_changed",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (file_new_image_size_callback),
|
|
|
|
info);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (info->size_se), "value_changed",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (file_new_image_size_callback),
|
|
|
|
info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
/* initialize the size label */
|
1999-08-26 12:39:21 +08:00
|
|
|
file_new_image_size_callback (info->size_se, info);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
|
|
|
/* the resolution labels */
|
|
|
|
label = gtk_label_new (_("Resolution X:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
label = gtk_label_new (_("Y:"));
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
|
|
|
|
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7,
|
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
|
|
|
gtk_widget_show (label);
|
|
|
|
|
|
|
|
/* the resolution sizeentry */
|
|
|
|
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
|
|
|
|
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 2);
|
|
|
|
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton),
|
|
|
|
GTK_SHADOW_NONE);
|
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
|
|
|
|
gtk_widget_set_usize (spinbutton, 75, 0);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info->resolution_se =
|
|
|
|
gimp_size_entry_new (1, default_resolution_units, _("pixels/%a"),
|
|
|
|
FALSE, FALSE, FALSE, 75,
|
|
|
|
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (info->resolution_se), 1, 2);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (info->resolution_se), 2, 2);
|
|
|
|
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
GTK_SPIN_BUTTON (spinbutton), NULL);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_table_attach_defaults (GTK_TABLE (info->resolution_se), spinbutton,
|
1999-05-19 01:33:39 +08:00
|
|
|
1, 2, 0, 1);
|
|
|
|
gtk_widget_show (spinbutton);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_table_attach (GTK_TABLE (table), info->resolution_se, 1, 2, 5, 7,
|
1999-05-19 01:33:39 +08:00
|
|
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_show (info->resolution_se);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
0, GIMP_MIN_RESOLUTION,
|
|
|
|
GIMP_MAX_RESOLUTION);
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (info->resolution_se),
|
1999-05-19 01:33:39 +08:00
|
|
|
1, GIMP_MIN_RESOLUTION,
|
|
|
|
GIMP_MAX_RESOLUTION);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->resolution_se),
|
|
|
|
0, values->xresolution);
|
|
|
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (info->resolution_se),
|
|
|
|
1, values->yresolution);
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (info->resolution_se), "value_changed",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (file_new_resolution_callback),
|
|
|
|
info);
|
1999-04-03 03:46:59 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
/* the resolution chainbutton */
|
1999-08-26 12:39:21 +08:00
|
|
|
info->couple_resolutions = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
1999-05-19 01:33:39 +08:00
|
|
|
gimp_chain_button_set_active
|
1999-08-26 12:39:21 +08:00
|
|
|
(GIMP_CHAIN_BUTTON (info->couple_resolutions),
|
|
|
|
ABS (values->xresolution - values->yresolution) < GIMP_MIN_RESOLUTION);
|
|
|
|
gtk_table_attach_defaults (GTK_TABLE (info->resolution_se),
|
|
|
|
info->couple_resolutions, 2, 3, 0, 2);
|
|
|
|
gtk_widget_show (info->couple_resolutions);
|
1999-02-25 19:25:53 +08:00
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
/* hbox containing the Image type and fill type frames */
|
|
|
|
hbox = gtk_hbox_new (FALSE, 2);
|
1999-04-03 03:46:59 +08:00
|
|
|
gtk_box_pack_start (GTK_BOX (top_vbox), hbox, FALSE, FALSE, 0);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_widget_show (hbox);
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
/* 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);
|
|
|
|
|
1999-05-31 22:11:10 +08:00
|
|
|
/* radio buttons and box */
|
1998-06-09 05:53:45 +08:00
|
|
|
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);
|
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
group = NULL;
|
1999-08-26 12:39:21 +08:00
|
|
|
list = g_list_first (image_new_get_image_base_type_names ());
|
|
|
|
while (list)
|
1999-05-19 01:33:39 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
GimpImageBaseTypeName *name_info;
|
|
|
|
|
|
|
|
name_info = (GimpImageBaseTypeName*) list->data;
|
|
|
|
|
|
|
|
button = gtk_radio_button_new_with_label (group, name_info->name);
|
1999-05-19 01:33:39 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, FALSE, TRUE, 0);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) name_info->type);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (gimp_radio_button_update),
|
1999-08-26 12:39:21 +08:00
|
|
|
&values->type);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (file_new_image_size_callback),
|
|
|
|
info);
|
1999-08-26 12:39:21 +08:00
|
|
|
if (values->type == name_info->type)
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info->type_w[name_info->type] = button;
|
|
|
|
|
|
|
|
list = g_list_next (list);
|
1999-05-19 01:33:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
group = NULL;
|
1999-08-26 12:39:21 +08:00
|
|
|
list = g_list_first (image_new_get_fill_type_names ());
|
|
|
|
while (list)
|
1999-05-19 01:33:39 +08:00
|
|
|
{
|
1999-08-26 12:39:21 +08:00
|
|
|
GimpFillTypeName *name_info;
|
|
|
|
|
|
|
|
name_info = (GimpFillTypeName*) list->data;
|
|
|
|
|
1999-05-19 01:33:39 +08:00
|
|
|
button =
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_radio_button_new_with_label (group, name_info->name);
|
1999-05-19 01:33:39 +08:00
|
|
|
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
|
|
|
gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0);
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) name_info->type);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (gimp_radio_button_update),
|
1999-08-26 12:39:21 +08:00
|
|
|
&values->fill_type);
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
2000-01-14 20:41:00 +08:00
|
|
|
GTK_SIGNAL_FUNC (file_new_image_size_callback),
|
|
|
|
info);
|
1999-08-26 12:39:21 +08:00
|
|
|
if (values->fill_type == name_info->type)
|
1999-05-19 01:33:39 +08:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
|
|
|
gtk_widget_show (button);
|
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
info->fill_type_w[name_info->type] = button;
|
1999-05-19 01:33:39 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
list = g_list_next (list);
|
|
|
|
}
|
1999-05-31 22:11:10 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (info->size_se));
|
1998-06-09 05:53:45 +08:00
|
|
|
|
1999-08-26 12:39:21 +08:00
|
|
|
gtk_widget_show (info->dlg);
|
1998-06-18 13:04:01 +08:00
|
|
|
}
|