mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
plug-ins/common/gbr.c plug-ins/common/gee.c plug-ins/common/gicon.c
* plug-ins/common/gbr.c * plug-ins/common/gee.c * plug-ins/common/gicon.c * plug-ins/common/glasstile.c * plug-ins/common/gpb.c * plug-ins/common/gqbist.c * plug-ins/common/gradmap.c * plug-ins/common/gtm.c * plug-ins/common/gz.c * plug-ins/common/hot.c * po-plug-ins/POTFILES.in: Added gettext support. -- yasuhiro
This commit is contained in:
parent
c60db90ff7
commit
a9f0061c70
13 changed files with 265 additions and 192 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
1999-12-26 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
|
||||
|
||||
* plug-ins/common/gbr.c
|
||||
* plug-ins/common/gee.c
|
||||
* plug-ins/common/gicon.c
|
||||
* plug-ins/common/glasstile.c
|
||||
* plug-ins/common/gpb.c
|
||||
* plug-ins/common/gqbist.c
|
||||
* plug-ins/common/gradmap.c
|
||||
* plug-ins/common/gtm.c
|
||||
* plug-ins/common/gz.c
|
||||
* plug-ins/common/hot.c
|
||||
* po-plug-ins/POTFILES.in: Added gettext support.
|
||||
|
||||
1999-12-25 Garry R. Osgood <gosgood@idt.net>
|
||||
Season's Greetings!
|
||||
* app/clone.c
|
||||
|
|
|
@ -88,7 +88,9 @@
|
|||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Author 1: Josh MacDonald (url.c) */
|
||||
/* Author 2: Daniel Risacher (gz.c) */
|
||||
|
@ -152,9 +154,11 @@ query ()
|
|||
};
|
||||
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_gz_load",
|
||||
"loads files compressed with gzip",
|
||||
"You need to have gzip installed.",
|
||||
_("loads files compressed with gzip"),
|
||||
_("You need to have gzip installed."),
|
||||
"Daniel Risacher",
|
||||
"Daniel Risacher, Spencer Kimball and Peter Mattis",
|
||||
"1995-1997",
|
||||
|
@ -165,8 +169,8 @@ query ()
|
|||
load_args, load_return_vals);
|
||||
|
||||
gimp_install_procedure ("file_gz_save",
|
||||
"saves files compressed with gzip",
|
||||
"You need to have gzip installed",
|
||||
_("saves files compressed with gzip"),
|
||||
_("You need to have gzip installed"),
|
||||
"Daniel Risacher",
|
||||
"Daniel Risacher, Spencer Kimball and Peter Mattis",
|
||||
"1995-1997",
|
||||
|
@ -196,6 +200,8 @@ run (char *name,
|
|||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
|
@ -258,7 +264,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
int tfd;
|
||||
|
||||
if (!(f = fopen(filename,"w"))){
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -267,7 +273,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
/* make stdout for this process be the output file */
|
||||
if (dup2(fileno(f),fileno(stdout)) == -1)
|
||||
{
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
close(tfd);
|
||||
return -1;
|
||||
}
|
||||
|
@ -279,7 +285,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
close(tfd);
|
||||
if (*pid == -1)
|
||||
{
|
||||
g_message ("gz: spawn failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: spawn failed: %s\n"), g_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -310,7 +316,7 @@ save_image (char *filename,
|
|||
|
||||
ext = find_extension(filename);
|
||||
if (0 == *ext) {
|
||||
g_message("gz: no sensible extension, saving as gzip'd xcf\n");
|
||||
g_message( _("gz: no sensible extension, saving as gzip'd xcf\n"));
|
||||
ext = ".xcf";
|
||||
}
|
||||
|
||||
|
@ -350,7 +356,7 @@ save_image (char *filename,
|
|||
/* fork off a gzip process */
|
||||
if ((pid = fork()) < 0)
|
||||
{
|
||||
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: fork failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -358,18 +364,18 @@ save_image (char *filename,
|
|||
{
|
||||
|
||||
if (!(f = fopen(filename,"w"))) {
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
||||
/* make stdout for this process be the output file */
|
||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
|
||||
/* and gzip into it */
|
||||
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
||||
g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: exec failed: gzip: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -387,7 +393,7 @@ save_image (char *filename,
|
|||
if (!WIFEXITED(status) ||
|
||||
WEXITSTATUS(status) != 0)
|
||||
{
|
||||
g_message ("gz: gzip exited abnormally on file %s\n", tmpname);
|
||||
g_message ( _("gz: gzip exited abnormally on file %s\n"), tmpname);
|
||||
g_free (tmpname);
|
||||
return 0;
|
||||
}
|
||||
|
@ -401,7 +407,7 @@ save_image (char *filename,
|
|||
&secattr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL))
|
||||
== INVALID_HANDLE_VALUE)
|
||||
{
|
||||
g_message ("gz: CreateFile failed\n");
|
||||
g_message ( _("gz: CreateFile failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -425,7 +431,7 @@ save_image (char *filename,
|
|||
TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL,
|
||||
&startupinfo, &processinfo))
|
||||
{
|
||||
g_message ("gz: CreateProcess failed\n");
|
||||
g_message ( _("gz: CreateProcess failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -461,7 +467,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
|
||||
ext = find_extension(filename);
|
||||
if (0 == *ext) {
|
||||
g_message("gz: no sensible extension, attempting to load with file magic\n");
|
||||
g_message( _("gz: no sensible extension, attempting to load with file magic\n"));
|
||||
}
|
||||
|
||||
/* find a temp name */
|
||||
|
@ -480,7 +486,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
/* fork off a g(un)zip and wait for it */
|
||||
if ((pid = fork()) < 0)
|
||||
{
|
||||
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: fork failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -488,7 +494,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
{
|
||||
FILE* f;
|
||||
if (!(f = fopen(tmpname,"w"))){
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -497,12 +503,12 @@ load_image (char *filename, gint32 run_mode)
|
|||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||
{
|
||||
g_free (tmpname);
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
}
|
||||
|
||||
/* and unzip into it */
|
||||
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
||||
g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: exec failed: gunzip: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -520,7 +526,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
if (!WIFEXITED(status) ||
|
||||
WEXITSTATUS(status) != 0)
|
||||
{
|
||||
g_message ("gz: gzip exited abnormally on file %s\n", filename);
|
||||
g_message ( _("gz: gzip exited abnormally on file %s\n"), filename);
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -534,7 +540,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
&secattr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL))
|
||||
== INVALID_HANDLE_VALUE)
|
||||
{
|
||||
g_message ("gz: CreateFile failed\n");
|
||||
g_message ( _("gz: CreateFile failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -558,7 +564,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL,
|
||||
&startupinfo, &processinfo))
|
||||
{
|
||||
g_message ("gz: CreateProcess failed: %d\n", GetLastError ());
|
||||
g_message ( _("gz: CreateProcess failed: %d\n"), GetLastError ());
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include "app/brush_header.h"
|
||||
|
||||
|
||||
|
@ -120,9 +121,11 @@ query ()
|
|||
};
|
||||
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_gbr_load",
|
||||
"loads files of the .gbr file format",
|
||||
"FIXME: write help",
|
||||
_("loads files of the .gbr file format"),
|
||||
_("FIXME: write help"),
|
||||
"Tim Newsome",
|
||||
"Tim Newsome",
|
||||
"1997",
|
||||
|
@ -133,8 +136,8 @@ query ()
|
|||
load_args, load_return_vals);
|
||||
|
||||
gimp_install_procedure ("file_gbr_save",
|
||||
"saves files in the .gbr file format",
|
||||
"Yeah!",
|
||||
_("saves files in the .gbr file format"),
|
||||
_("Yeah!"),
|
||||
"Tim Newsome",
|
||||
"Tim Newsome",
|
||||
"1997",
|
||||
|
@ -193,6 +196,7 @@ run (char *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
INIT_I18N_UI();
|
||||
init_gtk ();
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "GBR",
|
||||
CAN_HANDLE_GRAY);
|
||||
|
@ -204,6 +208,7 @@ run (char *name,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INIT_I18N();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -256,7 +261,7 @@ load_image (char *filename)
|
|||
int version_extra;
|
||||
|
||||
temp = g_malloc(strlen (filename) + 11);
|
||||
sprintf(temp, "Loading %s:", filename);
|
||||
sprintf(temp, _("Loading %s:"), filename);
|
||||
gimp_progress_init(temp);
|
||||
g_free (temp);
|
||||
|
||||
|
@ -318,7 +323,7 @@ load_image (char *filename)
|
|||
image_ID = gimp_image_new (ph.width, ph.height, (ph.bytes >= 3) ? RGB : GRAY);
|
||||
gimp_image_set_filename (image_ID, filename);
|
||||
|
||||
layer_ID = gimp_layer_new (image_ID, "Background", ph.width, ph.height,
|
||||
layer_ID = gimp_layer_new (image_ID, _("Background"), ph.width, ph.height,
|
||||
(ph.bytes >= 3) ? RGB_IMAGE : GRAY_IMAGE, 100, NORMAL_MODE);
|
||||
gimp_image_add_layer (image_ID, layer_ID, 0);
|
||||
|
||||
|
@ -362,7 +367,7 @@ save_image (char *filename,
|
|||
return FALSE;
|
||||
|
||||
temp = g_malloc(strlen (filename) + 10);
|
||||
sprintf(temp, "Saving %s:", filename);
|
||||
sprintf(temp, _("Saving %s:"), filename);
|
||||
gimp_progress_init(temp);
|
||||
g_free(temp);
|
||||
|
||||
|
@ -374,7 +379,7 @@ save_image (char *filename,
|
|||
|
||||
if (fd == -1)
|
||||
{
|
||||
g_message("Unable to open %s", filename);
|
||||
g_message( _("Unable to open %s"), filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -443,7 +448,7 @@ save_dialog (void)
|
|||
gchar buffer[12];
|
||||
|
||||
dlg = gtk_dialog_new();
|
||||
gtk_window_set_title (GTK_WINDOW(dlg), "Save As Brush");
|
||||
gtk_window_set_title (GTK_WINDOW(dlg), _("Save As Brush"));
|
||||
gtk_window_position (GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT(dlg), "destroy",
|
||||
(GtkSignalFunc) close_callback, NULL);
|
||||
|
@ -456,7 +461,7 @@ save_dialog (void)
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
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,
|
||||
|
@ -465,7 +470,7 @@ save_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,
|
||||
|
@ -486,7 +491,7 @@ save_dialog (void)
|
|||
/**********************
|
||||
* label
|
||||
**********************/
|
||||
label = gtk_label_new("Spacing:");
|
||||
label = gtk_label_new( _("Spacing:"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0,
|
||||
0);
|
||||
|
@ -508,7 +513,7 @@ save_dialog (void)
|
|||
/**********************
|
||||
* label
|
||||
**********************/
|
||||
label = gtk_label_new("Description:");
|
||||
label = gtk_label_new( _("Description:"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0,
|
||||
0);
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "glib.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Test for GTK1.2-style gdkrgb code, else use old 'preview' code. */
|
||||
#ifdef __GDK_RGB_H__
|
||||
|
@ -126,13 +127,15 @@ static void query()
|
|||
static int nargs = sizeof(args) / sizeof(args[0]);
|
||||
static int nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure("plug_in_the_egg",
|
||||
"A big hello from the GIMP team!",
|
||||
"",
|
||||
_("A big hello from the GIMP team!"),
|
||||
_("FIXME: write help"),
|
||||
"Adam D. Moss <adam@gimp.org>",
|
||||
"Adam D. Moss <adam@gimp.org>",
|
||||
"1998",
|
||||
"<Image>/Filters/Toys/The Egg...",
|
||||
N_("<Image>/Filters/Toys/The Egg..."),
|
||||
/*NULL,*/
|
||||
"RGB*, INDEXED*, GRAY*",
|
||||
PROC_PLUG_IN,
|
||||
|
@ -154,6 +157,8 @@ static void run(char *name, int n_params, GParam * param, int *nreturn_vals,
|
|||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
/* if (run_mode == RUN_NONINTERACTIVE) {*/
|
||||
if (n_params != 3)
|
||||
{
|
||||
|
@ -223,7 +228,7 @@ build_dialog(GImageType basetype,
|
|||
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "GEE! The GIMP E'er Egg!");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("GEE! The GIMP E'er Egg!"));
|
||||
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "delete_event",
|
||||
|
@ -233,7 +238,7 @@ build_dialog(GImageType basetype,
|
|||
|
||||
/* Action area - 'close' button only. */
|
||||
|
||||
button = gtk_button_new_with_label ("** Thank you for choosing GIMP **");
|
||||
button = gtk_button_new_with_label ( _("** Thank you for choosing GIMP **"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) window_close_callback,
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -118,9 +118,11 @@ query ()
|
|||
};
|
||||
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_gicon_load",
|
||||
"loads files of the .ico file format",
|
||||
"FIXME: write help",
|
||||
_("loads files of the .ico file format"),
|
||||
_("FIXME: write help"),
|
||||
"Spencer Kimball",
|
||||
"Spencer Kimball",
|
||||
"1997",
|
||||
|
@ -131,8 +133,8 @@ query ()
|
|||
load_args, load_return_vals);
|
||||
|
||||
gimp_install_procedure ("file_gicon_save",
|
||||
"saves files in the .ico file format",
|
||||
"FIXME: write help",
|
||||
_("saves files in the .ico file format"),
|
||||
_("FIXME: write help"),
|
||||
"Spencer Kimball",
|
||||
"Spencer Kimball",
|
||||
"1997",
|
||||
|
@ -193,6 +195,7 @@ run (char *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
INIT_I18N_UI();
|
||||
init_gtk ();
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "GIcon",
|
||||
(CAN_HANDLE_GRAY | CAN_HANDLE_ALPHA));
|
||||
|
@ -203,6 +206,7 @@ run (char *name,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INIT_I18N();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -268,7 +272,7 @@ load_image (char *filename)
|
|||
/* Open the requested file */
|
||||
if (! (fp = fopen (filename, "r")))
|
||||
{
|
||||
fprintf (stderr, "gicon: can't open \"%s\"\n", filename);
|
||||
fprintf (stderr, _("gicon: can't open \"%s\"\n"), filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -276,7 +280,7 @@ load_image (char *filename)
|
|||
fscanf (fp, "/* %s icon image format -- S. Kimball, P. Mattis */\n", name_buf);
|
||||
if (strcmp ("GIMP", name_buf))
|
||||
{
|
||||
fprintf (stderr, "Not a GIcon file: %s!\n", filename);
|
||||
fprintf (stderr, _("Not a GIcon file: %s!\n"), filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -429,7 +433,7 @@ save_dialog ()
|
|||
GtkWidget *table;
|
||||
|
||||
dlg = gtk_dialog_new();
|
||||
gtk_window_set_title(GTK_WINDOW(dlg), "Save As GIcon");
|
||||
gtk_window_set_title(GTK_WINDOW(dlg), _("Save As GIcon"));
|
||||
gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect(GTK_OBJECT(dlg), "destroy",
|
||||
(GtkSignalFunc) close_callback, NULL);
|
||||
|
@ -442,7 +446,7 @@ save_dialog ()
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
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,
|
||||
|
@ -451,7 +455,7 @@ save_dialog ()
|
|||
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,
|
||||
|
@ -472,7 +476,7 @@ save_dialog ()
|
|||
/**********************
|
||||
* label
|
||||
**********************/
|
||||
label = gtk_label_new("Icon Name:");
|
||||
label = gtk_label_new( _("Icon Name:"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_widget_show(label);
|
||||
|
|
|
@ -31,10 +31,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "config.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* --- Typedefs --- */
|
||||
typedef struct {
|
||||
|
@ -94,13 +95,15 @@ static void query ()
|
|||
static int nargs = sizeof (args) / sizeof (args[0]);
|
||||
static int nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("plug_in_glasstile",
|
||||
"Divide the image into square glassblocks",
|
||||
"More here later",
|
||||
_("Divide the image into square glassblocks"),
|
||||
_("More here later"),
|
||||
"Karl-Johan Andersson", /* Author */
|
||||
"Karl-Johan Andersson", /* Copyright */
|
||||
"1997",
|
||||
"<Image>/Filters/Glass Effects/Glass Tile...",
|
||||
N_("<Image>/Filters/Glass Effects/Glass Tile..."),
|
||||
"RGB*, GRAY*",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -132,6 +135,7 @@ static void run (gchar *name,
|
|||
switch (run_mode)
|
||||
{
|
||||
case RUN_INTERACTIVE:
|
||||
INIT_I18N_UI();
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("plug_in_glasstile", >vals);
|
||||
|
||||
|
@ -144,6 +148,7 @@ static void run (gchar *name,
|
|||
break;
|
||||
|
||||
case RUN_NONINTERACTIVE:
|
||||
INIT_I18N();
|
||||
/* Make sure all the arguments are there! */
|
||||
if (nparams != 5)
|
||||
status = STATUS_CALLING_ERROR;
|
||||
|
@ -159,6 +164,7 @@ static void run (gchar *name,
|
|||
break;
|
||||
|
||||
case RUN_WITH_LAST_VALS:
|
||||
INIT_I18N();
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("plug_in_glasstile", >vals);
|
||||
break;
|
||||
|
@ -172,7 +178,7 @@ static void run (gchar *name,
|
|||
/* Make sure that the drawable is gray or RGB color */
|
||||
if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
|
||||
{
|
||||
gimp_progress_init ("Glass Tile...");
|
||||
gimp_progress_init ( _("Glass Tile..."));
|
||||
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
|
||||
|
||||
glasstile (drawable);
|
||||
|
@ -216,7 +222,7 @@ static gint glass_dialog ()
|
|||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Glass Tile");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Glass Tile"));
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) glass_close_callback,
|
||||
|
@ -230,7 +236,7 @@ static gint glass_dialog ()
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
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) glass_ok_callback,
|
||||
|
@ -239,7 +245,7 @@ static gint glass_dialog ()
|
|||
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,
|
||||
|
@ -248,7 +254,7 @@ static gint glass_dialog ()
|
|||
gtk_widget_show (button);
|
||||
|
||||
/* Parameter settings */
|
||||
frame = gtk_frame_new ("Parameter Settings");
|
||||
frame = gtk_frame_new ( _("Parameter Settings"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 10);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
|
||||
|
@ -257,7 +263,7 @@ static gint glass_dialog ()
|
|||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
/* Horizontal scale - Width */
|
||||
label = gtk_label_new ("Tile Width");
|
||||
label = gtk_label_new ( _("Tile Width"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 0);
|
||||
/* xStart, xEnd, yStart, yEnd */
|
||||
|
@ -277,7 +283,7 @@ static gint glass_dialog ()
|
|||
gtk_widget_show (scale);
|
||||
|
||||
/* Horizontal scale - Height */
|
||||
label = gtk_label_new ("Tile Height");
|
||||
label = gtk_label_new ( _("Tile Height"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 0);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
#include <libgimp/parasiteio.h>
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "app/brush_header.h"
|
||||
#include "app/pattern_header.h"
|
||||
|
@ -129,11 +130,11 @@ query ()
|
|||
};
|
||||
static int ngih_save_args = sizeof (gih_save_args) / sizeof (gih_save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_gpb_save",
|
||||
"saves images in GIMP pixmap brush format",
|
||||
"This plug-in saves a layer of an image in "
|
||||
"the GIMP pixmap brush format. "
|
||||
"The image must have an alpha channel.",
|
||||
_("saves images in GIMP pixmap brush format"),
|
||||
_("This plug-in saves a layer of an image in the GIMP pixmap brush format. The image must have an alpha channel."),
|
||||
"Tor Lillqvist",
|
||||
"Tor Lillqvist",
|
||||
"1999",
|
||||
|
@ -146,13 +147,8 @@ query ()
|
|||
gimp_register_save_handler ("file_gpb_save", "gpb", "");
|
||||
|
||||
gimp_install_procedure ("file_gih_save",
|
||||
"saves images in GIMP pixmap brush pipe format",
|
||||
"This plug-in saves an image in "
|
||||
"the GIMP pixmap brush pipe format. "
|
||||
"The image must have an alpha channel."
|
||||
"The image can be multi-layered, "
|
||||
"and additionally the layers can be divided into "
|
||||
"a rectangular array of brushes.",
|
||||
_("saves images in GIMP pixmap brush pipe format"),
|
||||
_("This plug-in saves an image in the GIMP pixmap brush pipe format. The image must have an alpha channel. The image can be multi-layered, and additionally the layers can be divided into a rectangular array of brushes."),
|
||||
"Tor Lillqvist",
|
||||
"Tor Lillqvist",
|
||||
"1999",
|
||||
|
@ -303,7 +299,7 @@ common_save_dialog (GtkWidget *dlg,
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
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,
|
||||
|
@ -312,7 +308,7 @@ common_save_dialog (GtkWidget *dlg,
|
|||
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,
|
||||
|
@ -329,7 +325,7 @@ common_save_dialog (GtkWidget *dlg,
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Spacing (percent):");
|
||||
label = gtk_label_new ( _("Spacing (percent):"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -358,7 +354,7 @@ common_save_dialog (GtkWidget *dlg,
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Description:");
|
||||
label = gtk_label_new ( _("Description:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -383,7 +379,7 @@ gpb_save_dialog ()
|
|||
GtkWidget *table;
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Save As Pixmap Brush");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Save As Pixmap Brush"));
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) close_callback, NULL);
|
||||
|
@ -434,7 +430,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
}
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Save As Pixmap Brush Pipe");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Save As Pixmap Brush Pipe"));
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) close_callback, NULL);
|
||||
|
@ -454,7 +450,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Cell size:");
|
||||
label = gtk_label_new ( _("Cell size:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -507,7 +503,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
&cellh_adjust);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
label = gtk_label_new (" pixels");
|
||||
label = gtk_label_new ( _(" pixels"));
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -525,7 +521,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Number of cells:");
|
||||
label = gtk_label_new ( _("Number of cells:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -559,7 +555,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Display as:");
|
||||
label = gtk_label_new ( _("Display as:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -576,7 +572,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
cellh_adjust.other_count = &gihparms.cols;
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (" rows of ");
|
||||
label = gtk_label_new ( _(" rows of "));
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -588,15 +584,15 @@ gih_save_dialog (gint32 image_ID)
|
|||
cellw_adjust.other_count = &gihparms.rows;
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (" columns on each layer");
|
||||
label = gtk_label_new ( _(" columns on each layer"));
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
label = gtk_label_new (" (width mismatch!) ");
|
||||
label = gtk_label_new ( _(" (width mismatch!) "));
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
cellw_adjust.warning_label = label;
|
||||
|
||||
label = gtk_label_new (" (height mismatch!) ");
|
||||
label = gtk_label_new ( _(" (height mismatch!) "));
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
cellh_adjust.warning_label = label;
|
||||
|
||||
|
@ -612,7 +608,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Dimension:");
|
||||
label = gtk_label_new ( _("Dimension:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -642,7 +638,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Ranks:");
|
||||
label = gtk_label_new ( _("Ranks:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -686,7 +682,7 @@ gih_save_dialog (gint32 image_ID)
|
|||
gtk_table_resize (GTK_TABLE (table),
|
||||
GTK_TABLE (table)->nrows + 1, GTK_TABLE (table)->ncols);
|
||||
|
||||
label = gtk_label_new ("Selection:");
|
||||
label = gtk_label_new ( _("Selection:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1,
|
||||
GTK_TABLE (table)->nrows - 1, GTK_TABLE (table)->nrows,
|
||||
|
@ -751,7 +747,7 @@ try_fwrite (gpointer buffer,
|
|||
{
|
||||
if (fwrite (buffer, size, nitems, file) < nitems)
|
||||
{
|
||||
g_message ("GPB: write error");
|
||||
g_message ( _("GPB: write error"));
|
||||
fclose (file);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -908,7 +904,7 @@ gpb_save_image (char *filename,
|
|||
|
||||
if (!(gimp_drawable_has_alpha (drawable_ID)))
|
||||
{
|
||||
g_warning ("drawable has no alpha channel -- aborting!\n");
|
||||
g_warning ( _("drawable has no alpha channel -- aborting!\n"));
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -917,7 +913,7 @@ gpb_save_image (char *filename,
|
|||
|
||||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE);
|
||||
|
||||
temp = g_strdup_printf ("Saving %s:", filename);
|
||||
temp = g_strdup_printf ( _("Saving %s:"), filename);
|
||||
gimp_progress_init (temp);
|
||||
g_free (temp);
|
||||
|
||||
|
@ -925,7 +921,7 @@ gpb_save_image (char *filename,
|
|||
|
||||
if (file == NULL)
|
||||
{
|
||||
g_message ("GPB: can't open \"%s\"", filename);
|
||||
g_message ( _("GPB: can't open \"%s\""), filename);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -957,7 +953,7 @@ gih_save_image (char *filename,
|
|||
imageh = gimp_image_height (image_ID);
|
||||
gimp_tile_cache_size (gimp_tile_height () * imagew * 4);
|
||||
|
||||
msg = g_strdup_printf ("Saving %s:", filename);
|
||||
msg = g_strdup_printf ( _("Saving %s:"), filename);
|
||||
gimp_progress_init (msg);
|
||||
g_free (msg);
|
||||
|
||||
|
@ -965,7 +961,7 @@ gih_save_image (char *filename,
|
|||
|
||||
if (file == NULL)
|
||||
{
|
||||
g_message ("GPB: can't open \"%s\"", filename);
|
||||
g_message ( _("GPB: can't open \"%s\""), filename);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1075,6 +1071,7 @@ run (char *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
INIT_I18N_UI();
|
||||
init_gtk ();
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "GPB",
|
||||
(CAN_HANDLE_RGB | CAN_HANDLE_ALPHA |
|
||||
|
@ -1087,6 +1084,7 @@ run (char *name,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
INIT_I18N();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1158,7 +1156,7 @@ run (char *name,
|
|||
if (!gimp_drawable_has_alpha (layer_ID[layer]))
|
||||
{
|
||||
layer_name = gimp_layer_get_name (layer_ID[layer]);
|
||||
g_message ("Layer %s doesn't have an alpha channel, skipped",
|
||||
g_message ( _("Layer %s doesn't have an alpha channel, skipped"),
|
||||
layer_name);
|
||||
g_free (layer_name);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,10 @@
|
|||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/** qbist renderer ***********************************************************/
|
||||
|
||||
|
@ -283,15 +285,15 @@ MAIN()
|
|||
|
||||
void query(void)
|
||||
{
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure(PLUG_IN_NAME,
|
||||
"Create images based on a random genetic formula",
|
||||
"This Plug-in is based on an article by "
|
||||
"Jörn Loviscach (appeared in c't 10/95, page 326). It generates modern art "
|
||||
"pictures from a random genetic formula.",
|
||||
_("Create images based on a random genetic formula"),
|
||||
_("This Plug-in is based on an article by Jörn Loviscach (appeared in c't 10/95, page 326). It generates modern art pictures from a random genetic formula."),
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
"Jörn Loviscach, Jens Ch. Restemeier",
|
||||
PLUG_IN_VERSION,
|
||||
"<Image>/Filters/Render/Pattern/Qbist...",
|
||||
N_("<Image>/Filters/Render/Pattern/Qbist..."),
|
||||
"RGB*",
|
||||
PROC_PLUG_IN,
|
||||
nargs,
|
||||
|
@ -321,6 +323,12 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
|
|||
status=STATUS_CALLING_ERROR;
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
if (run_mode == RUN_INTERACTIVE) {
|
||||
INIT_I18N_UI();
|
||||
} else {
|
||||
INIT_I18N();
|
||||
}
|
||||
|
||||
if (param[2].type!=PARAM_DRAWABLE)
|
||||
status=STATUS_CALLING_ERROR;
|
||||
drawable = gimp_drawable_get(param[2].data.d_drawable);
|
||||
|
@ -373,7 +381,7 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
|
|||
|
||||
optimize(qbist_info);
|
||||
|
||||
gimp_progress_init ("Qbist ...");
|
||||
gimp_progress_init ( _("Qbist ..."));
|
||||
for (row=sel_y1; row<sel_y2; row++) {
|
||||
qbist(qbist_info, (gchar *)row_data, 0, row, sel_x2-sel_x1, sel_x2-sel_x1, sel_y2-sel_y1, img_bpp);
|
||||
gimp_pixel_rgn_set_row(&imagePR, row_data, sel_x1, row, (sel_x2-sel_x1));
|
||||
|
@ -502,7 +510,7 @@ void file_selection_cancel(GtkWidget *widget, GtkWidget *file_select)
|
|||
void dialog_load(GtkWidget *widget, gpointer d)
|
||||
{
|
||||
GtkWidget *file_select;
|
||||
file_select = gtk_file_selection_new ("Load QBE file...");
|
||||
file_select = gtk_file_selection_new ( _("Load QBE file..."));
|
||||
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_select)->ok_button),
|
||||
"clicked", (GtkSignalFunc) file_selection_load,
|
||||
(gpointer)file_select);
|
||||
|
@ -515,7 +523,7 @@ void dialog_load(GtkWidget *widget, gpointer d)
|
|||
void dialog_save(GtkWidget *widget, gpointer d)
|
||||
{
|
||||
GtkWidget *file_select;
|
||||
file_select=gtk_file_selection_new("Save (middle transform) as QBE file...");
|
||||
file_select=gtk_file_selection_new( _("Save (middle transform) as QBE file..."));
|
||||
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_select)->ok_button),
|
||||
"clicked", (GtkSignalFunc) file_selection_save,
|
||||
(gpointer)file_select);
|
||||
|
@ -558,7 +566,7 @@ int dialog_create()
|
|||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
|
||||
dialog=gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW(dialog), "G-Qbist 1.10");
|
||||
gtk_window_set_title (GTK_WINDOW(dialog), _("G-Qbist 1.10"));
|
||||
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
|
||||
(GtkSignalFunc) dialog_close,
|
||||
NULL);
|
||||
|
@ -590,7 +598,7 @@ int dialog_create()
|
|||
|
||||
dialog_update_previews(NULL, NULL);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
button = gtk_button_new_with_label ( _("OK"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) dialog_ok,
|
||||
(gpointer) dialog);
|
||||
|
@ -598,7 +606,7 @@ int dialog_create()
|
|||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Load");
|
||||
button = gtk_button_new_with_label ( _("Load"));
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
(GtkSignalFunc)dialog_load,
|
||||
(gpointer)dialog);
|
||||
|
@ -606,7 +614,7 @@ int dialog_create()
|
|||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_widget_show(button);
|
||||
|
||||
button = gtk_button_new_with_label ("Save");
|
||||
button = gtk_button_new_with_label ( _("Save"));
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
(GtkSignalFunc)dialog_save,
|
||||
(gpointer)dialog);
|
||||
|
@ -614,7 +622,7 @@ int dialog_create()
|
|||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_widget_show(button);
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label ( _("Cancel"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) dialog_cancel,
|
||||
(gpointer) dialog);
|
||||
|
|
|
@ -49,7 +49,9 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "config.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#ifdef RCSID
|
||||
static char rcsid[] = "$Id$";
|
||||
|
@ -96,22 +98,16 @@ query()
|
|||
static GParamDef *return_vals = NULL;
|
||||
static gint nargs = sizeof (args) / sizeof (args[0]);
|
||||
static gint nreturn_vals = 0;
|
||||
gchar *help_string =
|
||||
" This plug-in maps the contents of the specified drawable with"
|
||||
" active gradient. It calculates luminosity of each pixel and"
|
||||
" replaces the pixel by the sample of active gradient at the"
|
||||
" position proportional to that luminosity. Complete black pixel"
|
||||
" becomes the leftmost color of the gradient, and complete white"
|
||||
" becomes the rightmost. Works on both Grayscale and RGB image"
|
||||
" with/without alpha channel.";
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("plug_in_gradmap",
|
||||
"Map the contents of the specified drawable with active gradient",
|
||||
help_string,
|
||||
_("Map the contents of the specified drawable with active gradient"),
|
||||
_(" This plug-in maps the contents of the specified drawable with active gradient. It calculates luminosity of each pixel and replaces the pixel by the sample of active gradient at the position proportional to that luminosity. Complete black pixel becomes the leftmost color of the gradient, and complete white becomes the rightmost. Works on both Grayscale and RGB image with/without alpha channel."),
|
||||
"Eiichi Takamori",
|
||||
"Eiichi Takamori",
|
||||
"1997",
|
||||
"<Image>/Filters/Colors/Map/Gradient Map",
|
||||
N_("<Image>/Filters/Colors/Map/Gradient Map"),
|
||||
"RGB*, GRAY*",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -132,6 +128,8 @@ run (gchar *name,
|
|||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
|
@ -144,7 +142,7 @@ run (gchar *name,
|
|||
/* Make sure that the drawable is gray or RGB color */
|
||||
if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
|
||||
{
|
||||
gimp_progress_init ("Gradient Map...");
|
||||
gimp_progress_init ( _("Gradient Map..."));
|
||||
gimp_tile_cache_ntiles (TILE_CACHE_SIZE);
|
||||
|
||||
gradmap (drawable);
|
||||
|
|
|
@ -52,8 +52,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Typedefs */
|
||||
|
||||
|
@ -145,9 +147,11 @@ query ()
|
|||
|
||||
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_GTM_save",
|
||||
"GIMP Table Magic",
|
||||
"Allows you to draw an HTML table in GIMP. See help for more info.",
|
||||
_("GIMP Table Magic"),
|
||||
_("Allows you to draw an HTML table in GIMP. See help for more info."),
|
||||
"Daniel Dunbar",
|
||||
"Daniel Dunbar",
|
||||
"1998",
|
||||
|
@ -170,6 +174,8 @@ run (char *name,
|
|||
static GParam values[2];
|
||||
GDrawable *drawable;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
drawable = gimp_drawable_get (param[2].data.d_int32);
|
||||
|
||||
*nreturn_vals = 1;
|
||||
|
@ -217,7 +223,7 @@ save_image (char *filename,
|
|||
fprintf (fp,"<CAPTION>%s</CAPTION>\n",gtmvals.captiontxt);
|
||||
|
||||
name = g_malloc (strlen (filename) + 11);
|
||||
sprintf (name, "Saving %s:", filename);
|
||||
sprintf (name, _("Saving %s:"), filename);
|
||||
gimp_progress_init (name);
|
||||
g_free (name);
|
||||
|
||||
|
@ -349,7 +355,7 @@ static gint save_dialog ()
|
|||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "GIMP HTML Magic");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("GIMP HTML Magic"));
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) save_close_callback,
|
||||
|
@ -378,7 +384,7 @@ static gint save_dialog ()
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
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) save_ok_callback,
|
||||
|
@ -387,7 +393,7 @@ static gint save_dialog ()
|
|||
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,
|
||||
|
@ -397,25 +403,25 @@ static gint save_dialog ()
|
|||
|
||||
/* HTML Page Options */
|
||||
|
||||
frame = gtk_frame_new ("HTML Page Options");
|
||||
frame = gtk_frame_new ( _("HTML Page Options"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 10);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg) -> vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
toggle = gtk_check_button_new_with_label ("Generate Full HTML Document");
|
||||
toggle = gtk_check_button_new_with_label ( _("Generate Full HTML Document"));
|
||||
gtk_container_add (GTK_CONTAINER(frame), toggle);
|
||||
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
|
||||
(GtkSignalFunc) gtm_toggle_callback,
|
||||
>mvals.fulldoc);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gtmvals.fulldoc);
|
||||
gtk_widget_show (toggle);
|
||||
set_tooltip(tips,toggle,"If checked GTM will output a full HTML document with <HTML>, <BODY>, etc. tags instead of just the table html.");
|
||||
set_tooltip(tips,toggle, _("If checked GTM will output a full HTML document with <HTML>, <BODY>, etc. tags instead of just the table html."));
|
||||
|
||||
gtk_widget_show (frame);
|
||||
|
||||
/* HTML Table Creation Options */
|
||||
|
||||
frame = gtk_frame_new ("Table Creation Options");
|
||||
frame = gtk_frame_new ( _("Table Creation Options"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 10);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg) -> vbox), frame, TRUE, TRUE, 0);
|
||||
|
@ -424,32 +430,32 @@ static gint save_dialog ()
|
|||
gtk_container_border_width (GTK_CONTAINER (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
toggle = gtk_check_button_new_with_label ("Use Cellspan");
|
||||
toggle = gtk_check_button_new_with_label ( _("Use Cellspan"));
|
||||
gtk_table_attach (GTK_TABLE (table), toggle, 0, 1, 0, 1, GTK_FILL, 0, 5, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
|
||||
(GtkSignalFunc) gtm_toggle_callback,
|
||||
>mvals.spantags);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gtmvals.spantags);
|
||||
gtk_widget_show (toggle);
|
||||
set_tooltip(tips,toggle,"If checked GTM will replace any rectangular sections of identically colored blocks with one large cell with ROWSPAN and COLSPAN values.");
|
||||
set_tooltip(tips,toggle, _("If checked GTM will replace any rectangular sections of identically colored blocks with one large cell with ROWSPAN and COLSPAN values."));
|
||||
|
||||
toggle = gtk_check_button_new_with_label ("Compress TD tags");
|
||||
toggle = gtk_check_button_new_with_label ( _("Compress TD tags"));
|
||||
gtk_table_attach (GTK_TABLE (table), toggle, 1, 2, 0, 1, GTK_FILL, 0, 5, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
|
||||
(GtkSignalFunc) gtm_toggle_callback,
|
||||
>mvals.tdcomp);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gtmvals.tdcomp);
|
||||
gtk_widget_show (toggle);
|
||||
set_tooltip(tips,toggle,"Checking this tag will cause GTM to leave no whitespace between the TD tags and the cellcontent. This is only necessary for pixel level positioning control.");
|
||||
set_tooltip(tips,toggle, _("Checking this tag will cause GTM to leave no whitespace between the TD tags and the cellcontent. This is only necessary for pixel level positioning control."));
|
||||
|
||||
toggle = gtk_check_button_new_with_label ("Caption");
|
||||
toggle = gtk_check_button_new_with_label ( _("Caption"));
|
||||
gtk_table_attach (GTK_TABLE (table), toggle, 0, 1, 1, 2, GTK_FILL, 0, 5, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
|
||||
(GtkSignalFunc) gtm_toggle_callback,
|
||||
>mvals.caption);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), gtmvals.caption);
|
||||
gtk_widget_show (toggle);
|
||||
set_tooltip(tips,toggle,"Check if you would like to have the table captioned.");
|
||||
set_tooltip(tips,toggle, _("Check if you would like to have the table captioned."));
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2, GTK_FILL, 0, 5, 0);
|
||||
|
@ -459,9 +465,9 @@ static gint save_dialog ()
|
|||
NULL);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.captiontxt);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The text for the table caption.");
|
||||
set_tooltip(tips,entry, _("The text for the table caption."));
|
||||
|
||||
label = gtk_label_new ("Cell Content");
|
||||
label = gtk_label_new ( _("Cell Content"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -473,14 +479,14 @@ static gint save_dialog ()
|
|||
NULL);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.cellcontent);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The text to go into each cell.");
|
||||
set_tooltip(tips,entry, _("The text to go into each cell."));
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
/* HTML Table Options */
|
||||
|
||||
frame = gtk_frame_new ("Table Options");
|
||||
frame = gtk_frame_new ( _("Table Options"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 10);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg) -> vbox), frame, TRUE, TRUE, 0);
|
||||
|
@ -489,7 +495,7 @@ static gint save_dialog ()
|
|||
gtk_container_border_width (GTK_CONTAINER (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
label = gtk_label_new ("Border");
|
||||
label = gtk_label_new ( _("Border"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -502,9 +508,9 @@ static gint save_dialog ()
|
|||
sprintf(buffer, "%d", gtmvals.border);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The number of pixels in the table border. Can only be a number.");
|
||||
set_tooltip(tips,entry, _("The number of pixels in the table border. Can only be a number."));
|
||||
|
||||
label = gtk_label_new ("Width");
|
||||
label = gtk_label_new ( _("Width"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -516,9 +522,9 @@ static gint save_dialog ()
|
|||
NULL);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.clwidth);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The width for each table cell. Can be a number or a percent.");
|
||||
set_tooltip(tips,entry, _("The width for each table cell. Can be a number or a percent."));
|
||||
|
||||
label = gtk_label_new ("Height");
|
||||
label = gtk_label_new ( _("Height"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -530,9 +536,9 @@ static gint save_dialog ()
|
|||
NULL);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), gtmvals.clheight);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The height for each table cell. Can be a number or a percent.");
|
||||
set_tooltip(tips,entry, _("The height for each table cell. Can be a number or a percent."));
|
||||
|
||||
label = gtk_label_new ("Cell-Padding");
|
||||
label = gtk_label_new ( _("Cell-Padding"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -545,10 +551,10 @@ static gint save_dialog ()
|
|||
sprintf(buffer, "%d", gtmvals.cellpadding);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The amount of cellpadding. Can only be a number.");
|
||||
set_tooltip(tips,entry, _("The amount of cellpadding. Can only be a number."));
|
||||
|
||||
|
||||
label = gtk_label_new ("Cell-Spacing");
|
||||
label = gtk_label_new ( _("Cell-Spacing"));
|
||||
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 5, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -561,7 +567,7 @@ static gint save_dialog ()
|
|||
sprintf(buffer, "%d", gtmvals.cellspacing);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
|
||||
gtk_widget_show (entry);
|
||||
set_tooltip(tips,entry,"The amount of cellspacing. Can only be a number.");
|
||||
set_tooltip(tips,entry, _("The amount of cellspacing. Can only be a number."));
|
||||
|
||||
|
||||
gtk_widget_show (frame);
|
||||
|
|
|
@ -88,7 +88,9 @@
|
|||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Author 1: Josh MacDonald (url.c) */
|
||||
/* Author 2: Daniel Risacher (gz.c) */
|
||||
|
@ -152,9 +154,11 @@ query ()
|
|||
};
|
||||
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_gz_load",
|
||||
"loads files compressed with gzip",
|
||||
"You need to have gzip installed.",
|
||||
_("loads files compressed with gzip"),
|
||||
_("You need to have gzip installed."),
|
||||
"Daniel Risacher",
|
||||
"Daniel Risacher, Spencer Kimball and Peter Mattis",
|
||||
"1995-1997",
|
||||
|
@ -165,8 +169,8 @@ query ()
|
|||
load_args, load_return_vals);
|
||||
|
||||
gimp_install_procedure ("file_gz_save",
|
||||
"saves files compressed with gzip",
|
||||
"You need to have gzip installed",
|
||||
_("saves files compressed with gzip"),
|
||||
_("You need to have gzip installed"),
|
||||
"Daniel Risacher",
|
||||
"Daniel Risacher, Spencer Kimball and Peter Mattis",
|
||||
"1995-1997",
|
||||
|
@ -196,6 +200,8 @@ run (char *name,
|
|||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
|
@ -258,7 +264,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
int tfd;
|
||||
|
||||
if (!(f = fopen(filename,"w"))){
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -267,7 +273,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
/* make stdout for this process be the output file */
|
||||
if (dup2(fileno(f),fileno(stdout)) == -1)
|
||||
{
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
close(tfd);
|
||||
return -1;
|
||||
}
|
||||
|
@ -279,7 +285,7 @@ static int spawn_gzip(char *filename, char* tmpname, char *parms, int *pid)
|
|||
close(tfd);
|
||||
if (*pid == -1)
|
||||
{
|
||||
g_message ("gz: spawn failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: spawn failed: %s\n"), g_strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -310,7 +316,7 @@ save_image (char *filename,
|
|||
|
||||
ext = find_extension(filename);
|
||||
if (0 == *ext) {
|
||||
g_message("gz: no sensible extension, saving as gzip'd xcf\n");
|
||||
g_message( _("gz: no sensible extension, saving as gzip'd xcf\n"));
|
||||
ext = ".xcf";
|
||||
}
|
||||
|
||||
|
@ -350,7 +356,7 @@ save_image (char *filename,
|
|||
/* fork off a gzip process */
|
||||
if ((pid = fork()) < 0)
|
||||
{
|
||||
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: fork failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -358,18 +364,18 @@ save_image (char *filename,
|
|||
{
|
||||
|
||||
if (!(f = fopen(filename,"w"))) {
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
||||
/* make stdout for this process be the output file */
|
||||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
|
||||
/* and gzip into it */
|
||||
execlp ("gzip", "gzip", "-cf", tmpname, NULL);
|
||||
g_message ("gz: exec failed: gzip: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: exec failed: gzip: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -387,7 +393,7 @@ save_image (char *filename,
|
|||
if (!WIFEXITED(status) ||
|
||||
WEXITSTATUS(status) != 0)
|
||||
{
|
||||
g_message ("gz: gzip exited abnormally on file %s\n", tmpname);
|
||||
g_message ( _("gz: gzip exited abnormally on file %s\n"), tmpname);
|
||||
g_free (tmpname);
|
||||
return 0;
|
||||
}
|
||||
|
@ -401,7 +407,7 @@ save_image (char *filename,
|
|||
&secattr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL))
|
||||
== INVALID_HANDLE_VALUE)
|
||||
{
|
||||
g_message ("gz: CreateFile failed\n");
|
||||
g_message ( _("gz: CreateFile failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -425,7 +431,7 @@ save_image (char *filename,
|
|||
TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL,
|
||||
&startupinfo, &processinfo))
|
||||
{
|
||||
g_message ("gz: CreateProcess failed\n");
|
||||
g_message ( _("gz: CreateProcess failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -461,7 +467,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
|
||||
ext = find_extension(filename);
|
||||
if (0 == *ext) {
|
||||
g_message("gz: no sensible extension, attempting to load with file magic\n");
|
||||
g_message( _("gz: no sensible extension, attempting to load with file magic\n"));
|
||||
}
|
||||
|
||||
/* find a temp name */
|
||||
|
@ -480,7 +486,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
/* fork off a g(un)zip and wait for it */
|
||||
if ((pid = fork()) < 0)
|
||||
{
|
||||
g_message ("gz: fork failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: fork failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -488,7 +494,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
{
|
||||
FILE* f;
|
||||
if (!(f = fopen(tmpname,"w"))){
|
||||
g_message("gz: fopen failed: %s\n", g_strerror(errno));
|
||||
g_message( _("gz: fopen failed: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -497,12 +503,12 @@ load_image (char *filename, gint32 run_mode)
|
|||
if (-1 == dup2(fileno(f),fileno(stdout)))
|
||||
{
|
||||
g_free (tmpname);
|
||||
g_message ("gz: dup2 failed: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: dup2 failed: %s\n"), g_strerror(errno));
|
||||
}
|
||||
|
||||
/* and unzip into it */
|
||||
execlp ("gzip", "gzip", "-cfd", filename, NULL);
|
||||
g_message ("gz: exec failed: gunzip: %s\n", g_strerror(errno));
|
||||
g_message ( _("gz: exec failed: gunzip: %s\n"), g_strerror(errno));
|
||||
g_free (tmpname);
|
||||
_exit(127);
|
||||
}
|
||||
|
@ -520,7 +526,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
if (!WIFEXITED(status) ||
|
||||
WEXITSTATUS(status) != 0)
|
||||
{
|
||||
g_message ("gz: gzip exited abnormally on file %s\n", filename);
|
||||
g_message ( _("gz: gzip exited abnormally on file %s\n"), filename);
|
||||
g_free (tmpname);
|
||||
return -1;
|
||||
}
|
||||
|
@ -534,7 +540,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
&secattr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL))
|
||||
== INVALID_HANDLE_VALUE)
|
||||
{
|
||||
g_message ("gz: CreateFile failed\n");
|
||||
g_message ( _("gz: CreateFile failed\n"));
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
@ -558,7 +564,7 @@ load_image (char *filename, gint32 run_mode)
|
|||
TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL,
|
||||
&startupinfo, &processinfo))
|
||||
{
|
||||
g_message ("gz: CreateProcess failed: %d\n", GetLastError ());
|
||||
g_message ( _("gz: CreateProcess failed: %d\n"), GetLastError ());
|
||||
g_free (tmpname);
|
||||
_exit (127);
|
||||
}
|
||||
|
|
|
@ -67,8 +67,10 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include <libgimp/gimp.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include <plug-ins/megawidget/megawidget.h>
|
||||
|
||||
struct Grgb {
|
||||
|
@ -202,17 +204,15 @@ query(void){
|
|||
static GParamDef *rets = NULL;
|
||||
static int nrets = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure("plug_in_hot",
|
||||
"Look for hot NTSC or PAL pixels ",
|
||||
"hot scans an image for pixels that will give "
|
||||
"unsave values of chrominance or composite "
|
||||
"signale amplitude when encoded into an NTSC "
|
||||
"or PAL signal. Three actions can be performed on these ``hot'' "
|
||||
"pixels. (0) reduce luminance, (1) reduce saturation, or (2) Blacken.",
|
||||
_("Look for hot NTSC or PAL pixels "),
|
||||
_("hot scans an image for pixels that will give unsave values of chrominance or composite signale amplitude when encoded into an NTSC or PAL signal. Three actions can be performed on these ``hot'' pixels. (0) reduce luminance, (1) reduce saturation, or (2) Blacken."),
|
||||
"Eric L. Hernes, Alan Wm Paeth",
|
||||
"Eric L. Hernes",
|
||||
"1997",
|
||||
"<Image>/Filters/Colors/Hot...",
|
||||
N_("<Image>/Filters/Colors/Hot..."),
|
||||
"RGB",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nrets,
|
||||
|
@ -241,6 +241,7 @@ run(char *name, int nparam, GParam *param,
|
|||
rvals[0].data.d_status = STATUS_SUCCESS;
|
||||
switch (param[0].data.d_int32) {
|
||||
case RUN_INTERACTIVE:
|
||||
INIT_I18N_UI();
|
||||
/* XXX: add code here for interactive running */
|
||||
if(args.mode == -1) {
|
||||
args.mode = mode_ntsc;
|
||||
|
@ -256,6 +257,7 @@ run(char *name, int nparam, GParam *param,
|
|||
break;
|
||||
|
||||
case RUN_NONINTERACTIVE:
|
||||
INIT_I18N();
|
||||
/* XXX: add code here for non-interactive running */
|
||||
if (nparam != 6) {
|
||||
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
||||
|
@ -272,6 +274,7 @@ run(char *name, int nparam, GParam *param,
|
|||
break;
|
||||
|
||||
case RUN_WITH_LAST_VALS:
|
||||
INIT_I18N();
|
||||
/* XXX: add code here for last-values running */
|
||||
if (pluginCore(&args)==-1) {
|
||||
rvals[0].data.d_status = STATUS_EXECUTION_ERROR;
|
||||
|
@ -343,7 +346,7 @@ pluginCore(struct piArgs *argp) {
|
|||
|
||||
build_tab(argp->mode);
|
||||
|
||||
gimp_progress_init("Hot");
|
||||
gimp_progress_init( _("Hot"));
|
||||
prog_interval=height/10;
|
||||
|
||||
for(y=0;y<height;y++) {
|
||||
|
@ -503,13 +506,17 @@ pluginCoreIA(struct piArgs *argp) {
|
|||
{ NULL, 0 }
|
||||
};
|
||||
struct mwRadioGroup actions[] = {
|
||||
{ "Reduce Luminance", 0 },
|
||||
{ "Reduce Saturation", 0 },
|
||||
{ "Blacken (flag)", 0 },
|
||||
{ N_("Reduce Luminance"), 0 },
|
||||
{ N_("Reduce Saturation"), 0 },
|
||||
{ N_("Blacken (flag)"), 0 },
|
||||
{ NULL, 0}
|
||||
};
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
gint i;
|
||||
|
||||
for (i = 0; actions[i].name != NULL; i++)
|
||||
actions[i].name = gettext(actions[i].name);
|
||||
|
||||
/* Set args */
|
||||
argc = 1;
|
||||
|
@ -520,7 +527,7 @@ pluginCoreIA(struct piArgs *argp) {
|
|||
|
||||
actions[argp->action].var = 1;
|
||||
|
||||
dlg = mw_app_new("plug_in_hot", "Hot", &runp);
|
||||
dlg = mw_app_new("plug_in_hot", _("Hot"), &runp);
|
||||
hbox = gtk_hbox_new(FALSE, 5);
|
||||
gtk_container_border_width(GTK_CONTAINER(hbox), 5);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), hbox, TRUE, TRUE, 0);
|
||||
|
@ -530,10 +537,10 @@ pluginCoreIA(struct piArgs *argp) {
|
|||
gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show(vbox);
|
||||
|
||||
mw_toggle_button_new(vbox, NULL, "Create New Layer", &argp->new_layerp);
|
||||
mw_radio_group_new(vbox, "Mode", modes);
|
||||
mw_toggle_button_new(vbox, NULL, _("Create New Layer"), &argp->new_layerp);
|
||||
mw_radio_group_new(vbox, _("Mode"), modes);
|
||||
|
||||
mw_radio_group_new(hbox, "Action", actions);
|
||||
mw_radio_group_new(hbox, _("Action"), actions);
|
||||
|
||||
gtk_widget_show(dlg);
|
||||
gtk_main();
|
||||
|
|
|
@ -48,10 +48,20 @@ plug-ins/common/flarefx.c
|
|||
plug-ins/common/fractaltrace.c
|
||||
plug-ins/common/gauss_iir.c
|
||||
plug-ins/common/gauss_rle.c
|
||||
plug-ins/common/gbr.c
|
||||
plug-ins/common/gee.c
|
||||
plug-ins/common/gicon.c
|
||||
plug-ins/common/gif.c
|
||||
plug-ins/common/gifload.c
|
||||
plug-ins/common/glasstile.c
|
||||
plug-ins/common/gpb.c
|
||||
plug-ins/common/gqbist.c
|
||||
plug-ins/common/gradmap.c
|
||||
plug-ins/common/grid.c
|
||||
plug-ins/common/gtm.c
|
||||
plug-ins/common/guillotine.c
|
||||
plug-ins/common/gz.c
|
||||
plug-ins/common/hot.c
|
||||
plug-ins/common/jpeg.c
|
||||
plug-ins/common/lic.c
|
||||
plug-ins/common/mail.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue