(from gimp-narazaki-990909-0)

* app/layers_dialog.c: check for layer validity in
layer_widget_preview_events

* app/lc_dialog.c: remove GIMP_IMAGE() cast from the
menu_preview_update callback like the comment says to

(from gimp-yasuhiro-990907-0)

* app/menus.c
* plug-ins/common/autocrop.c
* plug-ins/common/c_astretch.c
* plug-ins/common/color_enhance.c
* plug-ins/common/guillotine.c
* plug-ins/common/normalize.c
* plug-ins/common/rotate.c
* plug-ins/common/rotators.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/threshold_alpha.c
* plug-ins/common/zealouscrop.c: i18n markings

-Yosh
This commit is contained in:
Manish Singh 1999-09-09 07:09:33 +00:00
parent fa20334c49
commit 322627964d
22 changed files with 193 additions and 83 deletions

View File

@ -1,3 +1,27 @@
Wed Sep 8 23:58:14 PDT 1999 Manish Singh <yosh@gimp.org>
(from gimp-narazaki-990909-0)
* app/layers_dialog.c: check for layer validity in
layer_widget_preview_events
* app/lc_dialog.c: remove GIMP_IMAGE() cast from the
menu_preview_update callback like the comment says to
(from gimp-yasuhiro-990907-0)
* app/menus.c
* plug-ins/common/autocrop.c
* plug-ins/common/c_astretch.c
* plug-ins/common/color_enhance.c
* plug-ins/common/guillotine.c
* plug-ins/common/normalize.c
* plug-ins/common/rotate.c
* plug-ins/common/rotators.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/threshold_alpha.c
* plug-ins/common/zealouscrop.c: i18n markings
1999-09-08 Kelly Lynn Martin <kelly@gimp.org>
* plug-ins/FractalExplorer/FractalExplorer.[ch]

View File

@ -2502,6 +2502,8 @@ layer_widget_preview_events (GtkWidget *widget,
valid = FALSE;
layer_widget = (LayerWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
if (!GIMP_IS_DRAWABLE (layer_widget->layer))
return FALSE;
if (widget == layer_widget->layer_preview)
preview_type = LAYER_PREVIEW;

View File

@ -46,10 +46,12 @@
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
N_("/File"),
N_("/File/Dialogs"),
N_("/Image/Transforms"),
N_("/Layers"),
N_("/Tools"),
N_("/Dialogs"),
N_("/View/Zoom") };
N_("/View/Zoom"),
N_("/Stack")};
static void menus_init (void);
static gchar* menu_translate (const gchar *path,

View File

@ -2502,6 +2502,8 @@ layer_widget_preview_events (GtkWidget *widget,
valid = FALSE;
layer_widget = (LayerWidget *) gtk_object_get_user_data (GTK_OBJECT (widget));
if (!GIMP_IS_DRAWABLE (layer_widget->layer))
return FALSE;
if (widget == layer_widget->layer_preview)
preview_type = LAYER_PREVIEW;

View File

@ -320,7 +320,7 @@ lc_dialog_image_menu_preview_update_cb (GtkWidget *widget,
*/
menu_preview = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(widget),"menu_preview");
gimage = GIMP_IMAGE((GimpImage *)gtk_object_get_data(GTK_OBJECT(widget),"menu_preview_gimage"));
gimage = (GimpImage *)gtk_object_get_data(GTK_OBJECT(widget),"menu_preview_gimage");
if(menu_preview && gimage && gimage_to_update == gimage)
{

View File

@ -46,10 +46,12 @@
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
N_("/File"),
N_("/File/Dialogs"),
N_("/Image/Transforms"),
N_("/Layers"),
N_("/Tools"),
N_("/Dialogs"),
N_("/View/Zoom") };
N_("/View/Zoom"),
N_("/Stack")};
static void menus_init (void);
static gchar* menu_translate (const gchar *path,

View File

@ -46,10 +46,12 @@
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
N_("/File"),
N_("/File/Dialogs"),
N_("/Image/Transforms"),
N_("/Layers"),
N_("/Tools"),
N_("/Dialogs"),
N_("/View/Zoom") };
N_("/View/Zoom"),
N_("/Stack")};
static void menus_init (void);
static gchar* menu_translate (const gchar *path,

View File

@ -46,10 +46,12 @@
static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "),
N_("/File"),
N_("/File/Dialogs"),
N_("/Image/Transforms"),
N_("/Layers"),
N_("/Tools"),
N_("/Dialogs"),
N_("/View/Zoom") };
N_("/View/Zoom"),
N_("/Stack")};
static void menus_init (void);
static gchar* menu_translate (const gchar *path,

View File

@ -13,7 +13,9 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions. */
static void query(void);
@ -54,13 +56,15 @@ static void query()
static int nargs = sizeof(args) / sizeof(args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure("plug_in_autocrop",
"Automagically crops a picture.",
_("Automagically crops a picture."),
"",
"Tim Newsome",
"Tim Newsome",
"1997",
"<Image>/Image/Transforms/Autocrop",
N_("<Image>/Image/Transforms/Autocrop"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -80,6 +84,8 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
*return_vals = values;
run_mode = param[0].data.d_int32;
INIT_I18N();
if (run_mode == RUN_NONINTERACTIVE) {
if (n_params != 3)
@ -96,7 +102,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
gimp_drawable_gray(drawable->id) ||
gimp_drawable_indexed(drawable->id))
{
gimp_progress_init("Cropping...");
gimp_progress_init(_("Cropping..."));
gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1));
doit(drawable, image_id);

View File

@ -32,6 +32,9 @@
#include <stdio.h>
#include "libgimp/gimp.h"
#include "config.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions.
*/
static void query (void);
@ -69,13 +72,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_c_astretch",
"Automatically stretch the contrast of the specified drawable to cover all possible ranges.",
"This simple plug-in does an automatic contrast stretch. For each channel in the image, it finds the minimum and maximum values... it uses those values to stretch the individual histograms to the full contrast range. For some images it may do just what you want; for others it may be total crap :)",
_("Automatically stretch the contrast of the specified drawable to cover all possible ranges."),
_("This simple plug-in does an automatic contrast stretch. For each channel in the image, it finds the minimum and maximum values... it uses those values to stretch the individual histograms to the full contrast range. For some images it may do just what you want; for others it may be total crap :)"),
"Federico Mena Quintero",
"Federico Mena Quintero",
"1996",
"<Image>/Image/Colors/Auto-Stretch Contrast",
N_("<Image>/Image/Colors/Auto-Stretch Contrast"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -96,6 +101,8 @@ run (char *name,
gint32 image_ID;
INIT_I18N();
run_mode = param[0].data.d_int32;
/* Get the specified drawable */
@ -105,7 +112,7 @@ run (char *name,
/* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_gray (drawable->id))
{
gimp_progress_init ("Auto-Stretching Contrast...");
gimp_progress_init (_("Auto-Stretching Contrast..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
c_astretch (drawable);
@ -146,7 +153,7 @@ indexed_c_astretch(gint32 image_ID) /* a.d.m. */
if (cmap==NULL)
{
printf("c_astretch: cmap was NULL! Quitting...\n");
printf(_("c_astretch: cmap was NULL! Quitting...\n"));
gimp_quit();
}

View File

@ -34,6 +34,9 @@
#include <stdio.h>
#include "libgimp/gimp.h"
#include "config.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions.
*/
static void query (void);
@ -75,13 +78,15 @@ query (void)
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_Color_Enhance",
"Automatically stretch the saturation of the specified drawable to cover all possible ranges.",
"This simple plug-in does an automatic saturation stretch. For each channel in the image, it finds the minimum and maximum values... it uses those values to stretch the individual histograms to the full range. For some images it may do just what you want; for others it may be total crap :). This version differs from Contrast Autostretch in that it works in HSV space, and preserves hue.",
_("Automatically stretch the saturation of the specified drawable to cover all possible ranges."),
_("This simple plug-in does an automatic saturation stretch. For each channel in the image, it finds the minimum and maximum values... it uses those values to stretch the individual histograms to the full range. For some images it may do just what you want; for others it may be total crap :). This version differs from Contrast Autostretch in that it works in HSV space, and preserves hue."),
"Martin Weber",
"Martin Weber",
"1997",
"<Image>/Image/Colors/Color Enhance",
N_("<Image>/Image/Colors/Color Enhance"),
"RGB*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -102,6 +107,8 @@ run (char *name,
gint32 image_ID;
INIT_I18N();
run_mode = param[0].data.d_int32;
/* Get the specified drawable */
@ -111,7 +118,7 @@ run (char *name,
/* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_gray (drawable->id))
{
gimp_progress_init ("Color Enhance...");
gimp_progress_init (_("Color Enhance..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
Color_Enhance (drawable);
@ -153,7 +160,7 @@ indexed_Color_Enhance(gint32 image_ID) /* a.d.m. */
if (cmap==NULL)
{
printf("Color_Enhance: cmap was NULL! Quitting...\n");
printf(_("Color_Enhance: cmap was NULL! Quitting...\n"));
gimp_quit();
}

View File

@ -30,8 +30,9 @@
#include <stdio.h>
#include <stdlib.h>
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions.
*/
@ -69,13 +70,15 @@ query (void)
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_guillotine",
"Slice up the image into subimages, cutting along the image's Guides. Fooey to you and your broccoli, Pokey.",
"This function takes an image and blah blah. Hooray!",
_("Slice up the image into subimages, cutting along the image's Guides. Fooey to you and your broccoli, Pokey."),
_("This function takes an image and blah blah. Hooray!"),
"Adam D. Moss (adam@foxbox.org)",
"Adam D. Moss (adam@foxbox.org)",
"1998",
"<Image>/Image/Transforms/Guillotine",
N_("<Image>/Image/Transforms/Guillotine"),
"RGB*, INDEXED*, GRAY*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -101,13 +104,14 @@ run (char *name,
values[0].type = PARAM_STATUS;
values[0].data.d_status = status;
INIT_I18N();
/* Get the specified drawable */
image_ID = param[1].data.d_image;
if (status == STATUS_SUCCESS)
{
gimp_progress_init ("Guillotine...");
gimp_progress_init (_("Guillotine..."));
guillotine (image_ID);
gimp_displays_flush ();
}
@ -154,7 +158,7 @@ guillotine(gint32 image_ID)
case ORIENTATION_HORIZONTAL:
num_hguides++; break;
default:
printf("Aie! Aie! Aie!\n");
printf(_("Aie! Aie! Aie!\n"));
gimp_quit();
}
guide_num = gimp_image_find_next_guide(image_ID, guide_num);
@ -164,12 +168,12 @@ guillotine(gint32 image_ID)
if (num_vguides+num_hguides)
{
printf("Yay... found %d horizontal guides and %d vertical guides.\n",
printf(_("Yay... found %d horizontal guides and %d vertical guides.\n"),
num_hguides, num_vguides);
}
else
{
printf("Poopy, no guides.\n");
printf(_("Poopy, no guides.\n"));
return;
}
@ -272,6 +276,3 @@ guillotine(gint32 image_ID)
}
}
}

View File

@ -32,6 +32,9 @@
#include <stdio.h>
#include "libgimp/gimp.h"
#include "config.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions.
*/
static void query (void);
@ -69,13 +72,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_normalize",
"Normalize the contrast of the specified drawable to cover all possible ranges.",
"This plugin performs almost the same operation as the 'contrast autostretch' plugin, except that it won't allow the colour channels to normalize independently. This is actually what most people probably want instead of contrast-autostretch; use c-a only if you wish to remove an undesirable colour-tint from a source image which is supposed to contain pure-white and pure-black.",
_("Normalize the contrast of the specified drawable to cover all possible ranges."),
_("This plugin performs almost the same operation as the 'contrast autostretch' plugin, except that it won't allow the colour channels to normalize independently. This is actually what most people probably want instead of contrast-autostretch; use c-a only if you wish to remove an undesirable colour-tint from a source image which is supposed to contain pure-white and pure-black."),
"Adam D. Moss, Federico Mena Quintero",
"Adam D. Moss, Federico Mena Quintero",
"1997",
"<Image>/Image/Colors/Normalize",
N_("<Image>/Image/Colors/Normalize"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -96,6 +101,8 @@ run (char *name,
gint32 image_ID;
INIT_I18N();
run_mode = param[0].data.d_int32;
/* Get the specified drawable */
@ -105,7 +112,7 @@ run (char *name,
/* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_color (drawable->id) || gimp_drawable_gray (drawable->id))
{
gimp_progress_init ("Normalizing...");
gimp_progress_init (_("Normalizing..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
norma (drawable);
@ -145,7 +152,7 @@ indexed_norma(gint32 image_ID) /* a.d.m. */
if (cmap==NULL)
{
printf("normalize: cmap was NULL! Quitting...\n");
printf(_("normalize: cmap was NULL! Quitting...\n"));
gimp_quit();
}

View File

@ -52,18 +52,16 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Defines */
#define PLUG_IN_NAME "plug_in_rotate"
#define PLUG_IN_PRINT_NAME "Rotate"
#define PLUG_IN_VERSION "v0.6 (01/15/98)"
#define PLUG_IN_MENU_PATH "<Image>/Image/Transforms/Rotate"
#define PLUG_IN_IMAGE_TYPES "RGB*, INDEXED*, GRAY*"
#define PLUG_IN_AUTHOR "Sven Neumann (neumanns@uni-duesseldorf.de)"
#define PLUG_IN_COPYRIGHT "Sven Neumann"
#define PLUG_IN_DESCRIBTION "Rotates a layer or the whole image by 90, 180 or 270 degrees"
#define PLUG_IN_HELP "This plug-in does rotate the active layer or the whole image clockwise by multiples of 90 degrees. When the whole image is choosen, the image is resized if necessary."
#define NUMBER_IN_ARGS 5
#define IN_ARGS { PARAM_INT32, "run_mode", "Interactive, non-interactive"},\
@ -147,14 +145,16 @@ static gint nargs = NUMBER_IN_ARGS;
static GParamDef *return_vals = OUT_ARGS;
static gint nreturn_vals = NUMBER_OUT_ARGS;
INIT_I18N();
/* the actual installation of the plugin */
gimp_install_procedure (PLUG_IN_NAME,
PLUG_IN_DESCRIBTION,
PLUG_IN_HELP,
_("Rotates a layer or the whole image by 90, 180 or 270 degrees"),
_("This plug-in does rotate the active layer or the whole image clockwise by multiples of 90 degrees. When the whole image is choosen, the image is resized if necessary."),
PLUG_IN_AUTHOR,
PLUG_IN_COPYRIGHT,
PLUG_IN_VERSION,
PLUG_IN_MENU_PATH,
_("<Image>/Image/Transforms/Rotate"),
PLUG_IN_IMAGE_TYPES,
PROC_PLUG_IN,
nargs,
@ -187,6 +187,12 @@ run (gchar *name, /* name of plugin */
*nreturn_vals = 1;
*return_vals = values;
if (run_mode != RUN_INTERACTIVE) {
INIT_I18N();
} else {
INIT_I18N_UI();
}
/* get image and drawable */
image_ID = param[1].data.d_int32;
active_drawable = gimp_drawable_get (param[2].data.d_drawable);
@ -497,19 +503,19 @@ rotate (void)
{
if ( !my_gimp_selection_is_empty (image_ID) )
{
gimp_message("You can not rotate the whole image if there's a selection.");
gimp_message(_("You can not rotate the whole image if there's a selection."));
gimp_drawable_detach (active_drawable);
return;
}
if ( gimp_layer_is_floating_selection (active_drawable->id) )
{
gimp_message("You can not rotate the whole image if there's a floating selection.");
gimp_message(_("You can not rotate the whole image if there's a floating selection."));
gimp_drawable_detach (active_drawable);
return;
}
}
gimp_progress_init ("Rotating...");
gimp_progress_init (_("Rotating..."));
gimp_run_procedure ("gimp_undo_push_group_start", &nreturn_vals,
PARAM_IMAGE, image_ID, PARAM_END);
@ -590,13 +596,13 @@ rotate_dialog (void)
/* Main Dialog */
dialog = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dialog), PLUG_IN_PRINT_NAME);
gtk_window_set_title (GTK_WINDOW (dialog), _("Rotate"));
gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
(GtkSignalFunc) rotate_close_callback,
NULL);
/* Action area */
button = gtk_button_new_with_label ("OK");
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) rotate_ok_callback,
@ -606,7 +612,7 @@ rotate_dialog (void)
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel");
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
@ -616,7 +622,7 @@ rotate_dialog (void)
gtk_widget_show (button);
/* parameter settings */
frame = gtk_frame_new ("Rotate clockwise by");
frame = gtk_frame_new (_("Rotate clockwise by"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
@ -689,7 +695,7 @@ rotate_dialog (void)
/* label: degrees */
unit_label = gtk_label_new ( "degrees" );
unit_label = gtk_label_new ( _("degrees") );
gtk_table_attach ( GTK_TABLE (table), unit_label, 5, 6, 5, 6, 0, 0, 0, 0);
gtk_widget_show (unit_label);
@ -703,7 +709,7 @@ rotate_dialog (void)
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
hbox, TRUE, TRUE, 0);
/* check button */
check_button = gtk_check_button_new_with_label ("Rotate the whole image");
check_button = gtk_check_button_new_with_label ( _("Rotate the whole image"));
gtk_box_pack_end (GTK_BOX (hbox), check_button, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (check_button), "toggled",
(GtkSignalFunc) rotate_toggle_update,
@ -764,8 +770,3 @@ rotate_toggle_update (GtkWidget *widget,
*toggle_val = FALSE;
}

View File

@ -23,7 +23,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions. */
static void query(void);
@ -44,6 +46,10 @@ GPlugInInfo PLUG_IN_INFO =
};
static gchar * G_GNUC_UNUSED dummy[]
= { N_("<Image>/Image/Transforms/Image"),
N_("<Image>/Image/Transforms/Layer")};
MAIN()
static void query()
@ -58,49 +64,51 @@ static void query()
static int nargs = sizeof(args) / sizeof(args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure("plug_in_layer_rot90",
"Rotates the given layer 90 degrees clockwise.",
_("Rotates the given layer 90 degrees clockwise."),
"",
"Adam D. Moss (adam@gimp.org)",
"Adam D. Moss (adam@gimp.org)",
"1997",
"<Image>/Image/Transforms/Layer/Rotate 90",
N_("<Image>/Image/Transforms/Layer/Rotate 90"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args, return_vals);
gimp_install_procedure("plug_in_layer_rot270",
"Rotates the given layer 90 degrees anticlockwise.",
_("Rotates the given layer 90 degrees anticlockwise."),
"",
"Adam D. Moss (adam@gimp.org)",
"Adam D. Moss (adam@gimp.org)",
"1997",
"<Image>/Image/Transforms/Layer/Rotate 270",
N_("<Image>/Image/Transforms/Layer/Rotate 270"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args, return_vals);
gimp_install_procedure("plug_in_image_rot90",
"Rotates the given image 90 degrees clockwise.",
_("Rotates the given image 90 degrees clockwise."),
"",
"Adam D. Moss (adam@gimp.org)",
"Adam D. Moss (adam@gimp.org)",
"1997",
"<Image>/Image/Transforms/Image/Rotate 90",
N_("<Image>/Image/Transforms/Image/Rotate 90"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args, return_vals);
gimp_install_procedure("plug_in_image_rot270",
"Rotates the current image 90 degrees anticlockwise.",
_("Rotates the current image 90 degrees anticlockwise."),
"",
"Adam D. Moss (adam@gimp.org)",
"Adam D. Moss (adam@gimp.org)",
"1997",
"<Image>/Image/Transforms/Image/Rotate 270",
N_("<Image>/Image/Transforms/Image/Rotate 270"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,

View File

@ -1796,7 +1796,7 @@ void drawit(gpointer data)
if(!drawarea) return;
gdk_draw_rgb_image(drawarea->window,
drawarea->style->white_gc,
0, 0, PREVIEWSIZE, PREVIEWSIZE, GDK_RGB_DITHER_NORMAL,
0, 0, PREVIEWSIZE, PREVIEWSIZE, GDK_RGB_DITHER_MAX,
data, PREVIEWSIZE*3);
}

View File

@ -1,6 +1,6 @@
/* threshold_alpha.c -- This is a plug-in for the GIMP (1.0's API)
* Author: Shuji Narazaki <narazaki@InetQ.or.jp>
* Time-stamp: <1997/06/08 22:34:26 narazaki@InetQ.or.jp>
* Time-stamp: <1999-09-05 04:24:02 yasuhiro>
* Version: 0.13A (the 'A' is for Adam who hacked in greyscale
* support - don't know if there's a more recent official
* version)
@ -22,18 +22,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gtk/gtk.h"
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Replace them with the right ones */
#define PLUG_IN_NAME "plug_in_threshold_alpha"
#define SHORT_NAME "threshold_alpha"
#define PROGRESS_NAME "threshold_alpha (0.13):coloring transparency..."
#define MENU_POSITION "<Image>/Image/Alpha/Threshold Alpha"
#define MAIN_FUNCTION threshold_alpha
/* you need not change the following names */
#define INTERFACE threshold_alpha_interface
@ -185,14 +186,14 @@ query ()
static GParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
gimp_install_procedure (PLUG_IN_NAME,
"",
"",
"Shuji Narazaki (narazaki@InetQ.or.jp)",
"Shuji Narazaki",
"1997",
MENU_POSITION,
N_("<Image>/Image/Alpha/Threshold Alpha"),
"RGBA,GRAYA",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -214,6 +215,12 @@ run (char *name,
run_mode = param[0].data.d_int32;
drawable_id = param[2].data.d_int32;
if (run_mode != RUN_INTERACTIVE) {
INIT_I18N();
} else {
INIT_I18N_UI();
}
*nreturn_vals = 1;
*return_vals = values;
@ -290,7 +297,7 @@ MAIN_FUNCTION (gint32 drawable_id)
gimp_pixel_rgn_init (&dest_rgn, drawable, x1, y1, (x2 - x1), (y2 - y1), TRUE, TRUE);
pr = gimp_pixel_rgns_register (2, &src_rgn, &dest_rgn);
gimp_progress_init (PROGRESS_NAME);
gimp_progress_init (_("threshold_alpha (0.13):coloring transparency..."));
for (; pr != NULL; pr = gimp_pixel_rgns_process (pr))
{
int offset, index;
@ -342,9 +349,9 @@ DIALOG ()
(GtkSignalFunc) gtkW_close_callback);
hbox = gtkW_hbox_new ((GTK_DIALOG (dlg)->vbox));
frame = gtkW_frame_new (hbox, "Parameter Settings");
frame = gtkW_frame_new (hbox, _("Parameter Settings"));
table = gtkW_table_new (frame, 2, 2);
gtkW_table_add_iscale_entry (table, "Threshold", 0, 0,
gtkW_table_add_iscale_entry (table, _("Threshold"), 0, 0,
(GtkSignalFunc) gtkW_iscale_update,
(GtkSignalFunc) gtkW_ientry_update,
&VALS.threshold,
@ -457,7 +464,7 @@ gtkW_dialog_new (char * name,
(GtkSignalFunc) close_callback, NULL);
/* Action Area */
button = gtk_button_new_with_label ("OK");
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) ok_callback, dlg);
@ -466,7 +473,7 @@ gtkW_dialog_new (char * name,
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel");
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
@ -490,7 +497,7 @@ gtkW_error_dialog_new (char * name)
(GtkSignalFunc) gtkW_close_callback, NULL);
/* Action Area */
button = gtk_button_new_with_label ("OK");
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtkW_close_callback, dlg);

View File

@ -13,7 +13,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "config.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -56,13 +58,15 @@ static void query()
static int nargs = sizeof(args) / sizeof(args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure("plug_in_zealouscrop",
"Automagically crops unused space from the edges and middle of a picture.",
_("Automagically crops unused space from the edges and middle of a picture."),
"",
"Adam D. Moss",
"Adam D. Moss",
"1997",
"<Image>/Image/Transforms/Zealous Crop",
N_("<Image>/Image/Transforms/Zealous Crop"),
"RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -78,6 +82,8 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
GStatusType status = STATUS_SUCCESS;
gint32 image_id;
INIT_I18N();
*nreturn_vals = 1;
*return_vals = values;
@ -96,7 +102,7 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
/* Make sure that the drawable is gray or RGB or indexed */
if (gimp_drawable_color(drawable->id) || gimp_drawable_gray(drawable->id) || gimp_drawable_indexed(drawable->id)) {
gimp_progress_init("ZealousCropping(tm)...");
gimp_progress_init(_("ZealousCropping(tm)..."));
gimp_tile_cache_ntiles(1 + 2*(
drawable->width > drawable->height ?
@ -200,7 +206,7 @@ static void do_zcrop(GDrawable *drawable, gint32 image_id)
if (((livingcols==0) || (livingrows==0)) ||
((livingcols==width) && (livingrows==height)))
{
printf("ZealousCrop(tm): Nothing to be done.\n");
printf(_("ZealousCrop(tm): Nothing to be done.\n"));
return;
}

View File

@ -0,0 +1,6 @@
Makefile.in
Makefile
.deps
_libs
.libs
gflare

View File

@ -0,0 +1,5 @@
Makefile.in
Makefile
.deps
_libs
.libs

View File

@ -1,3 +1,7 @@
Thu Sep 9 00:03:04 PDT 1999 Manish Singh <yosh@gimp.org>
* POTFILES.in: list more files
1999-09-09 Yukihiro Nakai <nacai@iname.com>
* ja.po: Update from SHIRASAKI Yasuhiro

View File

@ -6,6 +6,7 @@ plug-ins/common/CML_explorer.c
plug-ins/Lighting/lighting_main.c
plug-ins/Lighting/lighting_ui.c
plug-ins/common/apply_lens.c
plug-ins/common/autocrop.c
plug-ins/common/autostretch_hsv.c
plug-ins/common/blur.c
plug-ins/bmp/bmp.c
@ -14,8 +15,10 @@ plug-ins/bmp/bmpwrite.c
plug-ins/borderaverage/borderaverage.c
plug-ins/common/bumpmap.c
plug-ins/common/bz2.c
plug-ins/common/c_astretch.c
plug-ins/common/checkerboard.c
plug-ins/common/colorify.c
plug-ins/common/color_enhance.c
plug-ins/common/compose.c
plug-ins/common/convmatrix.c
plug-ins/common/cubism.c
@ -24,16 +27,22 @@ plug-ins/common/depthmerge.c
plug-ins/common/destripe.c
plug-ins/common/gif.c
plug-ins/common/gifload.c
plug-ins/common/guillotine.c
plug-ins/common/jpeg.c
plug-ins/common/mail.c
plug-ins/common/normalize.c
plug-ins/common/oilify.c
plug-ins/common/png.c
plug-ins/print/print-escp2.c
plug-ins/print/print-pcl.c
plug-ins/print/print-ps.c
plug-ins/print/print.c
plug-ins/sel2path/sel2path.c
plug-ins/common/ps.c
plug-ins/common/rotate.c
plug-ins/common/rotators.c
plug-ins/sel2path/sel2path.c
plug-ins/common/threshold_alpha.c
plug-ins/common/xbm.c
plug-ins/common/xpm.c
plug-ins/common/xwd.c
plug-ins/common/zealouscrop.c