plug-ins/common/plugindetails.c plug-ins/common/pnm.c

* plug-ins/common/plugindetails.c
        * plug-ins/common/pnm.c
        * plug-ins/common/polar.c
        * plug-ins/common/psd.c
        * plug-ins/common/randomize.c
        * plug-ins/common/ripple.c
        * po-plug-ins/POTFILES.in: added gettext support.

        * modules/cdisplay_gamma.c
        * po/POTFILES.in: added gettext support.

-- yasuhiro
This commit is contained in:
SHIRASAKI Yasuhiro 2000-01-03 13:01:51 +00:00
parent c736d6857a
commit 6ad10d4df5
12 changed files with 252 additions and 188 deletions

View File

@ -1,3 +1,16 @@
2000-01-03 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
* plug-ins/common/plugindetails.c
* plug-ins/common/pnm.c
* plug-ins/common/polar.c
* plug-ins/common/psd.c
* plug-ins/common/randomize.c
* plug-ins/common/ripple.c
* po-plug-ins/POTFILES.in: added gettext support.
* modules/cdisplay_gamma.c
* po/POTFILES.in: added gettext support.
Sun Jan 2 23:29:05 PST 2000 Manish Singh <yosh@gimp.org> Sun Jan 2 23:29:05 PST 2000 Manish Singh <yosh@gimp.org>
* app/color_area.[ch]: fill dummy gimage->base_type as well * app/color_area.[ch]: fill dummy gimage->base_type as well

View File

@ -23,6 +23,7 @@
#include <libgimp/color_display.h> #include <libgimp/color_display.h>
#include <libgimp/gimpmodule.h> #include <libgimp/gimpmodule.h>
#include <libgimp/parasite.h> #include <libgimp/parasite.h>
#include <libgimp/stdplugins-intl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -313,7 +314,7 @@ gamma_configure (gpointer cd_ID,
context->shell = gtk_dialog_new (); context->shell = gtk_dialog_new ();
gtk_window_set_wmclass (GTK_WINDOW (context->shell), "gamma", "Gimp"); gtk_window_set_wmclass (GTK_WINDOW (context->shell), "gamma", "Gimp");
gtk_window_set_title (GTK_WINDOW (context->shell), "Gamma"); gtk_window_set_title (GTK_WINDOW (context->shell), _("Gamma"));
gtk_signal_connect (GTK_OBJECT (context->shell), "delete_event", gtk_signal_connect (GTK_OBJECT (context->shell), "delete_event",
GTK_SIGNAL_FUNC (gamma_configure_delete_callback), GTK_SIGNAL_FUNC (gamma_configure_delete_callback),
@ -323,7 +324,7 @@ gamma_configure (gpointer cd_ID,
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (context->shell)->vbox), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (context->shell)->vbox),
hbox, FALSE, FALSE, 0); hbox, FALSE, FALSE, 0);
label = gtk_label_new ("Gamma:"); label = gtk_label_new ( _("Gamma:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, FALSE, 0);
@ -338,14 +339,14 @@ gamma_configure (gpointer cd_ID,
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (context->shell)->action_area), gtk_box_pack_end (GTK_BOX (GTK_DIALOG (context->shell)->action_area),
hbbox, FALSE, FALSE, 0); hbbox, FALSE, FALSE, 0);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ( _("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gamma_configure_ok_callback), GTK_SIGNAL_FUNC (gamma_configure_ok_callback),
cd_ID); cd_ID);
button = gtk_button_new_with_label ("Cancel"); button = gtk_button_new_with_label ( _("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",

View File

@ -25,8 +25,10 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "config.h"
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#define DBL_LIST_WIDTH 250 #define DBL_LIST_WIDTH 250
#define DBL_WIDTH (DBL_LIST_WIDTH + 300) #define DBL_WIDTH (DBL_LIST_WIDTH + 300)
@ -34,10 +36,10 @@
static char *proc_type_str[] = static char *proc_type_str[] =
{ {
"Internal GIMP procedure", N_("Internal GIMP procedure"),
"GIMP Plug-In", N_("GIMP Plug-In"),
"GIMP Extension", N_("GIMP Extension"),
"Temporary Procedure" N_("Temporary Procedure")
}; };
@ -82,13 +84,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]); static int nargs = sizeof (args) / sizeof (args[0]);
INIT_I18N();
gimp_install_procedure ("plug_in_details", gimp_install_procedure ("plug_in_details",
"Displays plugin details", _("Displays plugin details"),
"Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system", _("Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system"),
"Andy Thomas", "Andy Thomas",
"Andy Thomas", "Andy Thomas",
"1999", "1999",
"<Toolbox>/Xtns/Plugin Details...", N_("<Toolbox>/Xtns/Plugin Details..."),
"", "",
PROC_EXTENSION, PROC_EXTENSION,
nargs, 0, nargs, 0,
@ -113,6 +117,8 @@ run (char *name,
values[0].type = PARAM_STATUS; values[0].type = PARAM_STATUS;
values[0].data.d_status = STATUS_CALLING_ERROR; values[0].data.d_status = STATUS_CALLING_ERROR;
INIT_I18N_UI();
if (strcmp (name, "plug_in_details") == 0) if (strcmp (name, "plug_in_details") == 0)
{ {
*nreturn_vals = 1; *nreturn_vals = 1;
@ -200,7 +206,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child1_resize=FALSE; GTK_PANED(pdesc->paned)->child1_resize=FALSE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6);
gtk_label_set_text(lab," Details <<< "); gtk_label_set_text(lab, _(" Details <<< "));
gtk_widget_show (pdesc->descr_scroll); gtk_widget_show (pdesc->descr_scroll);
pdesc->details_showing = TRUE; pdesc->details_showing = TRUE;
} }
@ -211,7 +217,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child2_resize=TRUE; GTK_PANED(pdesc->paned)->child2_resize=TRUE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0);
gtk_label_set_text(lab," Details >>> "); gtk_label_set_text(lab, _(" Details >>> "));
gtk_widget_hide (pdesc->descr_scroll); gtk_widget_hide (pdesc->descr_scroll);
gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/ gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/
pdesc->details_showing = FALSE; pdesc->details_showing = FALSE;
@ -298,7 +304,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* Number of plugins */ /* Number of plugins */
label = gtk_label_new(g_strdup_printf(" Number of plugin interfaces :%d",pdesc->num_plugins)); label = gtk_label_new(g_strdup_printf( _(" Number of plugin interfaces :%d"),pdesc->num_plugins));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -314,7 +320,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* menu path */ /* menu path */
label = gtk_label_new("Menu path :"); label = gtk_label_new( _("Menu path :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -335,7 +341,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the name */ /* show the name */
label = gtk_label_new("Name :"); label = gtk_label_new( _("Name :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
@ -357,7 +363,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the description */ /* show the description */
label = gtk_label_new("Blurb :"); label = gtk_label_new( _("Blurb :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -379,7 +385,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the help */ /* show the help */
if ((selected_proc_help) && (strlen(selected_proc_help) > 1)) if ((selected_proc_help) && (strlen(selected_proc_help) > 1))
{ {
label = gtk_label_new("Help :"); label = gtk_label_new( _("Help :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, 0, 1, table_row, table_row+1,
@ -423,13 +429,13 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the type */ /* show the type */
label = gtk_label_new("Type :"); label = gtk_label_new( _("Type :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
gtk_widget_show(label); gtk_widget_show(label);
label = gtk_label_new(proc_type_str[selected_proc_type]); label = gtk_label_new( gettext(proc_type_str[selected_proc_type]));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -980,7 +986,7 @@ gimp_plugin_desc ()
plugindesc->dlg = gtk_dialog_new(); plugindesc->dlg = gtk_dialog_new();
plugindesc->details_showing = FALSE; plugindesc->details_showing = FALSE;
gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), "Plugin Descriptions"); gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), _("Plugin Descriptions"));
gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE); gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy", gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
(GtkSignalFunc) dialog_close_callback, (GtkSignalFunc) dialog_close_callback,
@ -1012,10 +1018,10 @@ gimp_plugin_desc ()
/* list : list in a scrolled_win */ /* list : list in a scrolled_win */
clabels[0] = g_strdup("Name"); clabels[0] = g_strdup( _("Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Menu Path"); clabels[2] = g_strdup( _("Menu Path"));
clabels[3] = g_strdup("Image Types"); clabels[3] = g_strdup( _("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles(4,clabels); plugindesc->clist = gtk_clist_new_with_titles(4,clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column", gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
@ -1032,16 +1038,16 @@ gimp_plugin_desc ()
(GtkSignalFunc) procedure_clist_select_callback, (GtkSignalFunc) procedure_clist_select_callback,
plugindesc); plugindesc);
label = gtk_label_new ("List view"); label = gtk_label_new ( _("List view"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist); gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist);
gtk_widget_show (plugindesc->clist); gtk_widget_show (plugindesc->clist);
gtk_widget_show (swindow); gtk_widget_show (swindow);
/* notebook->ctree */ /* notebook->ctree */
clabels[0] = g_strdup("Menu Path/Name"); clabels[0] = g_strdup( _("Menu Path/Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Image Types"); clabels[2] = g_strdup( _("Image Types"));
plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels); plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels);
plugindesc->ctree_scrolled_win = plugindesc->ctree_scrolled_win =
swindow = gtk_scrolled_window_new (NULL, NULL); swindow = gtk_scrolled_window_new (NULL, NULL);
@ -1051,7 +1057,7 @@ gimp_plugin_desc ()
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row", gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
(GtkSignalFunc) procedure_ctree_select_callback, (GtkSignalFunc) procedure_ctree_select_callback,
plugindesc); plugindesc);
label = gtk_label_new("Tree view"); label = gtk_label_new( _("Tree view"));
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1073,7 +1079,7 @@ gimp_plugin_desc ()
searchhbox, FALSE, FALSE, 0); searchhbox, FALSE, FALSE, 0);
gtk_widget_show(searchhbox); gtk_widget_show(searchhbox);
label = gtk_label_new("Search : "); label = gtk_label_new( _("Search : "));
gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5); gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (searchhbox), gtk_box_pack_start (GTK_BOX (searchhbox),
label, FALSE, FALSE, 0); label, FALSE, FALSE, 0);
@ -1084,7 +1090,7 @@ gimp_plugin_desc ()
plugindesc->search_entry, TRUE, TRUE, 0); plugindesc->search_entry, TRUE, TRUE, 0);
gtk_widget_show(plugindesc->search_entry); gtk_widget_show(plugindesc->search_entry);
button = gtk_button_new_with_label (" Details >>> "); button = gtk_button_new_with_label ( _(" Details >>> "));
gtk_widget_show(button); gtk_widget_show(button);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) details_callback, plugindesc); (GtkSignalFunc) details_callback, plugindesc);
@ -1098,7 +1104,7 @@ gimp_plugin_desc ()
gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0); gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0);
plugindesc->name_button = gtk_button_new_with_label ("Search by name"); plugindesc->name_button = gtk_button_new_with_label ( _("Search by name"));
GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked", gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked",
(GtkSignalFunc) dialog_search_callback, plugindesc); (GtkSignalFunc) dialog_search_callback, plugindesc);
@ -1107,7 +1113,7 @@ gimp_plugin_desc ()
gtk_widget_show(plugindesc->name_button); gtk_widget_show(plugindesc->name_button);
button = gtk_button_new_with_label ("Close"); button = gtk_button_new_with_label ( _("Close"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) dialog_close_callback, plugindesc); (GtkSignalFunc) dialog_close_callback, plugindesc);

View File

@ -25,8 +25,10 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "config.h"
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#define DBL_LIST_WIDTH 250 #define DBL_LIST_WIDTH 250
#define DBL_WIDTH (DBL_LIST_WIDTH + 300) #define DBL_WIDTH (DBL_LIST_WIDTH + 300)
@ -34,10 +36,10 @@
static char *proc_type_str[] = static char *proc_type_str[] =
{ {
"Internal GIMP procedure", N_("Internal GIMP procedure"),
"GIMP Plug-In", N_("GIMP Plug-In"),
"GIMP Extension", N_("GIMP Extension"),
"Temporary Procedure" N_("Temporary Procedure")
}; };
@ -82,13 +84,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]); static int nargs = sizeof (args) / sizeof (args[0]);
INIT_I18N();
gimp_install_procedure ("plug_in_details", gimp_install_procedure ("plug_in_details",
"Displays plugin details", _("Displays plugin details"),
"Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system", _("Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system"),
"Andy Thomas", "Andy Thomas",
"Andy Thomas", "Andy Thomas",
"1999", "1999",
"<Toolbox>/Xtns/Plugin Details...", N_("<Toolbox>/Xtns/Plugin Details..."),
"", "",
PROC_EXTENSION, PROC_EXTENSION,
nargs, 0, nargs, 0,
@ -113,6 +117,8 @@ run (char *name,
values[0].type = PARAM_STATUS; values[0].type = PARAM_STATUS;
values[0].data.d_status = STATUS_CALLING_ERROR; values[0].data.d_status = STATUS_CALLING_ERROR;
INIT_I18N_UI();
if (strcmp (name, "plug_in_details") == 0) if (strcmp (name, "plug_in_details") == 0)
{ {
*nreturn_vals = 1; *nreturn_vals = 1;
@ -200,7 +206,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child1_resize=FALSE; GTK_PANED(pdesc->paned)->child1_resize=FALSE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6);
gtk_label_set_text(lab," Details <<< "); gtk_label_set_text(lab, _(" Details <<< "));
gtk_widget_show (pdesc->descr_scroll); gtk_widget_show (pdesc->descr_scroll);
pdesc->details_showing = TRUE; pdesc->details_showing = TRUE;
} }
@ -211,7 +217,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child2_resize=TRUE; GTK_PANED(pdesc->paned)->child2_resize=TRUE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0);
gtk_label_set_text(lab," Details >>> "); gtk_label_set_text(lab, _(" Details >>> "));
gtk_widget_hide (pdesc->descr_scroll); gtk_widget_hide (pdesc->descr_scroll);
gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/ gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/
pdesc->details_showing = FALSE; pdesc->details_showing = FALSE;
@ -298,7 +304,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* Number of plugins */ /* Number of plugins */
label = gtk_label_new(g_strdup_printf(" Number of plugin interfaces :%d",pdesc->num_plugins)); label = gtk_label_new(g_strdup_printf( _(" Number of plugin interfaces :%d"),pdesc->num_plugins));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -314,7 +320,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* menu path */ /* menu path */
label = gtk_label_new("Menu path :"); label = gtk_label_new( _("Menu path :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -335,7 +341,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the name */ /* show the name */
label = gtk_label_new("Name :"); label = gtk_label_new( _("Name :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
@ -357,7 +363,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the description */ /* show the description */
label = gtk_label_new("Blurb :"); label = gtk_label_new( _("Blurb :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -379,7 +385,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the help */ /* show the help */
if ((selected_proc_help) && (strlen(selected_proc_help) > 1)) if ((selected_proc_help) && (strlen(selected_proc_help) > 1))
{ {
label = gtk_label_new("Help :"); label = gtk_label_new( _("Help :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, 0, 1, table_row, table_row+1,
@ -423,13 +429,13 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the type */ /* show the type */
label = gtk_label_new("Type :"); label = gtk_label_new( _("Type :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
gtk_widget_show(label); gtk_widget_show(label);
label = gtk_label_new(proc_type_str[selected_proc_type]); label = gtk_label_new( gettext(proc_type_str[selected_proc_type]));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -980,7 +986,7 @@ gimp_plugin_desc ()
plugindesc->dlg = gtk_dialog_new(); plugindesc->dlg = gtk_dialog_new();
plugindesc->details_showing = FALSE; plugindesc->details_showing = FALSE;
gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), "Plugin Descriptions"); gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), _("Plugin Descriptions"));
gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE); gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy", gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
(GtkSignalFunc) dialog_close_callback, (GtkSignalFunc) dialog_close_callback,
@ -1012,10 +1018,10 @@ gimp_plugin_desc ()
/* list : list in a scrolled_win */ /* list : list in a scrolled_win */
clabels[0] = g_strdup("Name"); clabels[0] = g_strdup( _("Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Menu Path"); clabels[2] = g_strdup( _("Menu Path"));
clabels[3] = g_strdup("Image Types"); clabels[3] = g_strdup( _("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles(4,clabels); plugindesc->clist = gtk_clist_new_with_titles(4,clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column", gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
@ -1032,16 +1038,16 @@ gimp_plugin_desc ()
(GtkSignalFunc) procedure_clist_select_callback, (GtkSignalFunc) procedure_clist_select_callback,
plugindesc); plugindesc);
label = gtk_label_new ("List view"); label = gtk_label_new ( _("List view"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist); gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist);
gtk_widget_show (plugindesc->clist); gtk_widget_show (plugindesc->clist);
gtk_widget_show (swindow); gtk_widget_show (swindow);
/* notebook->ctree */ /* notebook->ctree */
clabels[0] = g_strdup("Menu Path/Name"); clabels[0] = g_strdup( _("Menu Path/Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Image Types"); clabels[2] = g_strdup( _("Image Types"));
plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels); plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels);
plugindesc->ctree_scrolled_win = plugindesc->ctree_scrolled_win =
swindow = gtk_scrolled_window_new (NULL, NULL); swindow = gtk_scrolled_window_new (NULL, NULL);
@ -1051,7 +1057,7 @@ gimp_plugin_desc ()
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row", gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
(GtkSignalFunc) procedure_ctree_select_callback, (GtkSignalFunc) procedure_ctree_select_callback,
plugindesc); plugindesc);
label = gtk_label_new("Tree view"); label = gtk_label_new( _("Tree view"));
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1073,7 +1079,7 @@ gimp_plugin_desc ()
searchhbox, FALSE, FALSE, 0); searchhbox, FALSE, FALSE, 0);
gtk_widget_show(searchhbox); gtk_widget_show(searchhbox);
label = gtk_label_new("Search : "); label = gtk_label_new( _("Search : "));
gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5); gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (searchhbox), gtk_box_pack_start (GTK_BOX (searchhbox),
label, FALSE, FALSE, 0); label, FALSE, FALSE, 0);
@ -1084,7 +1090,7 @@ gimp_plugin_desc ()
plugindesc->search_entry, TRUE, TRUE, 0); plugindesc->search_entry, TRUE, TRUE, 0);
gtk_widget_show(plugindesc->search_entry); gtk_widget_show(plugindesc->search_entry);
button = gtk_button_new_with_label (" Details >>> "); button = gtk_button_new_with_label ( _(" Details >>> "));
gtk_widget_show(button); gtk_widget_show(button);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) details_callback, plugindesc); (GtkSignalFunc) details_callback, plugindesc);
@ -1098,7 +1104,7 @@ gimp_plugin_desc ()
gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0); gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0);
plugindesc->name_button = gtk_button_new_with_label ("Search by name"); plugindesc->name_button = gtk_button_new_with_label ( _("Search by name"));
GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked", gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked",
(GtkSignalFunc) dialog_search_callback, plugindesc); (GtkSignalFunc) dialog_search_callback, plugindesc);
@ -1107,7 +1113,7 @@ gimp_plugin_desc ()
gtk_widget_show(plugindesc->name_button); gtk_widget_show(plugindesc->name_button);
button = gtk_button_new_with_label ("Close"); button = gtk_button_new_with_label ( _("Close"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) dialog_close_callback, plugindesc); (GtkSignalFunc) dialog_close_callback, plugindesc);

View File

@ -43,6 +43,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
#include <libgimp/gimpui.h> #include <libgimp/gimpui.h>
#include "libgimp/stdplugins-intl.h"
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include <io.h> #include <io.h>
@ -232,8 +233,10 @@ query ()
}; };
static int nsave_args = sizeof (save_args) / sizeof (save_args[0]); static int nsave_args = sizeof (save_args) / sizeof (save_args[0]);
INIT_I18N();
gimp_install_procedure ("file_pnm_load", gimp_install_procedure ("file_pnm_load",
"loads files of the pnm file format", _("loads files of the pnm file format"),
"FIXME: write help for pnm_load", "FIXME: write help for pnm_load",
"Erik Nygren", "Erik Nygren",
"Erik Nygren", "Erik Nygren",
@ -245,8 +248,8 @@ query ()
load_args, load_return_vals); load_args, load_return_vals);
gimp_install_procedure ("file_pnm_save", gimp_install_procedure ("file_pnm_save",
"saves files in the pnm file format", _("saves files in the pnm file format"),
"PNM saving handles all image types except those with alpha channels.", _("PNM saving handles all image types except those with alpha channels."),
"Erik Nygren", "Erik Nygren",
"Erik Nygren", "Erik Nygren",
"1996", "1996",
@ -283,6 +286,12 @@ run (char *name,
values[1].type = PARAM_IMAGE; values[1].type = PARAM_IMAGE;
values[1].data.d_image = -1; values[1].data.d_image = -1;
if (run_mode == RUN_NONINTERACTIVE) {
INIT_I18N();
} else {
INIT_I18N_UI();
}
if (strcmp (name, "file_pnm_load") == 0) if (strcmp (name, "file_pnm_load") == 0)
{ {
image_ID = load_image (param[1].data.d_string); image_ID = load_image (param[1].data.d_string);
@ -381,7 +390,7 @@ load_image (char *filename)
PNMScanner *scan; PNMScanner *scan;
int ctr; int ctr;
temp = g_strdup_printf ("Loading %s:", filename); temp = g_strdup_printf (_("Loading %s:"), filename);
gimp_progress_init (temp); gimp_progress_init (temp);
g_free (temp); g_free (temp);
@ -466,7 +475,7 @@ load_image (char *filename)
image_ID = gimp_image_new (pnminfo->xres, pnminfo->yres, (pnminfo->np >= 3) ? RGB : GRAY); image_ID = gimp_image_new (pnminfo->xres, pnminfo->yres, (pnminfo->np >= 3) ? RGB : GRAY);
gimp_image_set_filename (image_ID, filename); gimp_image_set_filename (image_ID, filename);
layer_ID = gimp_layer_new (image_ID, "Background", layer_ID = gimp_layer_new (image_ID, _("Background"),
pnminfo->xres, pnminfo->yres, pnminfo->xres, pnminfo->yres,
(pnminfo->np >= 3) ? RGB_IMAGE : GRAY_IMAGE, 100, NORMAL_MODE); (pnminfo->np >= 3) ? RGB_IMAGE : GRAY_IMAGE, 100, NORMAL_MODE);
gimp_image_add_layer (image_ID, layer_ID, 0); gimp_image_add_layer (image_ID, layer_ID, 0);
@ -744,11 +753,11 @@ save_image (char *filename,
/* Make sure we're not saving an image with an alpha channel */ /* Make sure we're not saving an image with an alpha channel */
if (gimp_drawable_has_alpha (drawable_ID)) if (gimp_drawable_has_alpha (drawable_ID))
{ {
gimp_message ("PNM save cannot handle images with alpha channels."); gimp_message ( _("PNM save cannot handle images with alpha channels."));
return FALSE; return FALSE;
} }
temp = g_strdup_printf ("Saving %s:", filename); temp = g_strdup_printf ( _("Saving %s:"), filename);
gimp_progress_init (temp); gimp_progress_init (temp);
g_free (temp); g_free (temp);
@ -912,7 +921,7 @@ save_dialog ()
gint use_ascii = (psvals.raw == FALSE); gint use_ascii = (psvals.raw == FALSE);
dlg = gtk_dialog_new (); dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), "Save as PNM"); gtk_window_set_title (GTK_WINDOW (dlg), _("Save as PNM"));
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy", gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
(GtkSignalFunc) save_close_callback, (GtkSignalFunc) save_close_callback,
@ -926,7 +935,7 @@ save_dialog ()
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox); 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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) save_ok_callback, (GtkSignalFunc) save_ok_callback,
@ -935,7 +944,7 @@ save_dialog ()
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
@ -944,7 +953,7 @@ save_dialog ()
gtk_widget_show (button); gtk_widget_show (button);
/* file save type */ /* file save type */
frame = gtk_frame_new ("Data Formatting"); frame = gtk_frame_new ( _("Data Formatting"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 10); gtk_container_border_width (GTK_CONTAINER (frame), 10);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, FALSE, TRUE, 0);
@ -953,7 +962,7 @@ save_dialog ()
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
group = NULL; group = NULL;
toggle = gtk_radio_button_new_with_label (group, "Raw"); toggle = gtk_radio_button_new_with_label (group, _("Raw"));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -962,7 +971,7 @@ save_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), use_raw); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), use_raw);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_radio_button_new_with_label (group, "Ascii"); toggle = gtk_radio_button_new_with_label (group, _("Ascii"));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",

View File

@ -66,6 +66,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
#include "libgimp/stdplugins-intl.h"
#define WITHIN(a, b, c) ((((a) <= (b)) && ((b) <= (c))) ? 1 : 0) #define WITHIN(a, b, c) ((((a) <= (b)) && ((b) <= (c))) ? 1 : 0)
@ -211,13 +212,15 @@ query(void)
static int nargs = sizeof(args) / sizeof(args[0]); static int nargs = sizeof(args) / sizeof(args[0]);
static int nreturn_vals = 0; static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure(PLUG_IN_NAME, gimp_install_procedure(PLUG_IN_NAME,
"Converts and image to and from polar coords", _("Converts and image to and from polar coords"),
"Remaps and image from rectangular coordinates to polar coordinats or vice versa", _("Remaps and image from rectangular coordinates to polar coordinats or vice versa"),
"Daniel Dunbar and Federico Mena Quintero", "Daniel Dunbar and Federico Mena Quintero",
"Daniel Dunbar and Federico Mena Quintero", "Daniel Dunbar and Federico Mena Quintero",
PLUG_IN_VERSION, PLUG_IN_VERSION,
"<Image>/Filters/Distorts/Polar Coords...", N_("<Image>/Filters/Distorts/Polar Coords..."),
"RGB*, GRAY*", "RGB*, GRAY*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nargs,
@ -302,6 +305,7 @@ run(char *name,
switch (run_mode) { switch (run_mode) {
case RUN_INTERACTIVE: case RUN_INTERACTIVE:
INIT_I18N_UI();
/* Possibly retrieve data */ /* Possibly retrieve data */
gimp_get_data(PLUG_IN_NAME, &pcvals); gimp_get_data(PLUG_IN_NAME, &pcvals);
@ -314,6 +318,7 @@ run(char *name,
break; break;
case RUN_NONINTERACTIVE: case RUN_NONINTERACTIVE:
INIT_I18N();
/* Make sure all the arguments are present */ /* Make sure all the arguments are present */
if (nparams != 8) if (nparams != 8)
@ -330,6 +335,7 @@ run(char *name,
break; break;
case RUN_WITH_LAST_VALS: case RUN_WITH_LAST_VALS:
INIT_I18N();
/* Possibly retrieve data */ /* Possibly retrieve data */
gimp_get_data(PLUG_IN_NAME, &pcvals); gimp_get_data(PLUG_IN_NAME, &pcvals);
@ -410,7 +416,7 @@ polarize(void) {
progress = 0; progress = 0;
max_progress = img_width * img_height; max_progress = img_width * img_height;
gimp_progress_init("Polarizing..."); gimp_progress_init( _("Polarizing..."));
for (pr = gimp_pixel_rgns_register (1, &dest_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr)) { for (pr = gimp_pixel_rgns_register (1, &dest_rgn); pr != NULL; pr = gimp_pixel_rgns_process (pr)) {
dest = dest_rgn.data; dest = dest_rgn.data;
@ -899,7 +905,7 @@ polarize_dialog(void)
build_preview_source_image(); build_preview_source_image();
dialog = gtk_dialog_new(); dialog = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(dialog), "Polarize"); gtk_window_set_title(GTK_WINDOW(dialog), _("Polarize"));
gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
gtk_container_border_width(GTK_CONTAINER(dialog), 0); gtk_container_border_width(GTK_CONTAINER(dialog), 0);
gtk_signal_connect(GTK_OBJECT(dialog), "destroy", gtk_signal_connect(GTK_OBJECT(dialog), "destroy",
@ -946,8 +952,8 @@ polarize_dialog(void)
gtk_table_attach(GTK_TABLE(top_table), table, 0, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(top_table), table, 0, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show(table); gtk_widget_show(table);
dialog_create_value("Circle depth in percent", GTK_TABLE(table), 0, &pcvals.circle, 0, 100.0, 1.0); dialog_create_value( _("Circle depth in percent"), GTK_TABLE(table), 0, &pcvals.circle, 0, 100.0, 1.0);
dialog_create_value("Offset angle", GTK_TABLE(table), 1, &pcvals.angle, 0, 359, 1.0); dialog_create_value( _("Offset angle"), GTK_TABLE(table), 1, &pcvals.angle, 0, 359, 1.0);
/* togglebuttons for backwards, top, polar->rectangular */ /* togglebuttons for backwards, top, polar->rectangular */
@ -956,32 +962,32 @@ polarize_dialog(void)
gtk_table_attach( GTK_TABLE(top_table), hbox, 0, 3, 2, 3, gtk_table_attach( GTK_TABLE(top_table), hbox, 0, 3, 2, 3,
GTK_FILL, 0 , 0, 0); GTK_FILL, 0 , 0, 0);
toggle = gtk_check_button_new_with_label("Map Backwards"); toggle = gtk_check_button_new_with_label(_("Map Backwards"));
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.backwards); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.backwards);
gtk_signal_connect(GTK_OBJECT(toggle), "toggled", gtk_signal_connect(GTK_OBJECT(toggle), "toggled",
(GtkSignalFunc) polar_toggle_callback, (GtkSignalFunc) polar_toggle_callback,
&pcvals.backwards); &pcvals.backwards);
gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0); gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0);
gtk_widget_show(toggle); gtk_widget_show(toggle);
set_tooltip(tips,toggle,"If checked the mapping will begin at the right side, as opposed to beginning at the left."); set_tooltip(tips,toggle, _("If checked the mapping will begin at the right side, as opposed to beginning at the left."));
toggle = gtk_check_button_new_with_label("Map from Top"); toggle = gtk_check_button_new_with_label( _("Map from Top"));
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.inverse); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.inverse);
gtk_signal_connect( GTK_OBJECT(toggle), "toggled", gtk_signal_connect( GTK_OBJECT(toggle), "toggled",
(GtkSignalFunc) polar_toggle_callback, (GtkSignalFunc) polar_toggle_callback,
&pcvals.inverse); &pcvals.inverse);
gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0); gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0);
gtk_widget_show(toggle); gtk_widget_show(toggle);
set_tooltip(tips,toggle,"If unchecked the mapping will put the bottom row in the middle and the top row on the outside. If checked it will be the opposite."); set_tooltip(tips,toggle, _("If unchecked the mapping will put the bottom row in the middle and the top row on the outside. If checked it will be the opposite."));
toggle = gtk_check_button_new_with_label("Polar to Rectangular"); toggle = gtk_check_button_new_with_label( _("To Polar"));
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.polrec); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(toggle), pcvals.polrec);
gtk_signal_connect( GTK_OBJECT(toggle), "toggled", gtk_signal_connect( GTK_OBJECT(toggle), "toggled",
(GtkSignalFunc) polar_toggle_callback, (GtkSignalFunc) polar_toggle_callback,
&pcvals.polrec); &pcvals.polrec);
gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0); gtk_box_pack_start( GTK_BOX (hbox), toggle, TRUE, TRUE, 0);
gtk_widget_show(toggle); gtk_widget_show(toggle);
set_tooltip(tips,toggle,"If unchecked the image will be circularly mapped onto a rectangle. If checked the image will be mapped onto a circle."); set_tooltip(tips,toggle, _("If unchecked the image will be circularly mapped onto a rectangle. If checked the image will be mapped onto a circle."));
gtk_widget_show(hbox); gtk_widget_show(hbox);
@ -993,7 +999,7 @@ polarize_dialog(void)
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox); 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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) dialog_ok_callback, (GtkSignalFunc) dialog_ok_callback,
@ -1002,7 +1008,7 @@ polarize_dialog(void)
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) dialog_cancel_callback, (GtkSignalFunc) dialog_cancel_callback,

View File

@ -153,6 +153,7 @@
#include <glib.h> #include <glib.h>
#include <libgimp/gimp.h> #include <libgimp/gimp.h>
#include "libgimp/stdplugins-intl.h"
/* Local types etc /* Local types etc
*/ */
@ -363,9 +364,11 @@ query ()
static int nload_args = sizeof (load_args) / sizeof (load_args[0]); static int nload_args = sizeof (load_args) / sizeof (load_args[0]);
static int nload_return_vals = sizeof (load_return_vals) / sizeof (load_return_vals[0]); static int nload_return_vals = sizeof (load_return_vals) / sizeof (load_return_vals[0]);
INIT_I18N();
gimp_install_procedure ("file_psd_load", gimp_install_procedure ("file_psd_load",
"loads files of the Photoshop(tm) PSD file format", _("loads files of the Photoshop(tm) PSD file format"),
"This filter loads files of Adobe Photoshop(tm) native PSD format. These files may be of any image type supported by GIMP, with or without layers, layer masks, aux channels and guides.", _("This filter loads files of Adobe Photoshop(tm) native PSD format. These files may be of any image type supported by GIMP, with or without layers, layer masks, aux channels and guides."),
"Adam D. Moss & Torsten Martinsen", "Adam D. Moss & Torsten Martinsen",
"Adam D. Moss & Torsten Martinsen", "Adam D. Moss & Torsten Martinsen",
"1996-1998", "1996-1998",
@ -1511,7 +1514,7 @@ void extract_data_and_channels(guchar* src, gint gimpstep, gint psstep,
} }
channel_ID = gimp_channel_new(image_ID, channel_ID = gimp_channel_new(image_ID,
psd_image.aux_channel[chan-gimpstep].name ? psd_image.aux_channel[chan-gimpstep].name : "Unnamed channel", psd_image.aux_channel[chan-gimpstep].name ? psd_image.aux_channel[chan-gimpstep].name : _("Unnamed channel"),
width, height, width, height,
100.0, colour); 100.0, colour);
gimp_image_add_channel(image_ID, channel_ID, 0); gimp_image_add_channel(image_ID, channel_ID, 0);
@ -1641,12 +1644,7 @@ load_image(char *name)
IFDBG printf("------- %s ---------------------------------\n",name); IFDBG printf("------- %s ---------------------------------\n",name);
name_buf = xmalloc(strlen(name) + 11); name_buf = g_strdup_printf( _("Loading %s:"), name);
if (number > 1)
sprintf (name_buf, "%s-%d", name, number);
else
sprintf (name_buf, "%s", name);
sprintf(name_buf, "Loading %s:", name);
gimp_progress_init(name_buf); gimp_progress_init(name_buf);
@ -2026,7 +2024,7 @@ load_image(char *name)
} }
} }
layer_ID = gimp_layer_new (image_ID, "Background", layer_ID = gimp_layer_new (image_ID, _("Background"),
PSDheader.columns, PSDheader.rows, PSDheader.columns, PSDheader.rows,
psd_type_to_gimp_type(imagetype), psd_type_to_gimp_type(imagetype),
100, NORMAL_MODE); 100, NORMAL_MODE);

View File

@ -71,14 +71,16 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "libgimp/gimp.h"
#include "gtk/gtk.h"
#include <plug-ins/gpc/gpc.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
#include "libgimp/gimp.h"
#include "gtk/gtk.h"
#include <plug-ins/gpc/gpc.h>
#include "libgimp/stdplugins-intl.h"
/********************************* /*********************************
* *
* PLUGIN-SPECIFIC CONSTANTS * PLUGIN-SPECIFIC CONSTANTS
@ -97,9 +99,9 @@ char *PLUG_IN_NAME[] = {
"plug_in_randomize_slur", "plug_in_randomize_slur",
}; };
char *RNDM_VERSION[] = { char *RNDM_VERSION[] = {
"Random Hurl 1.7", N_("Random Hurl 1.7"),
"Random Pick 1.7", N_("Random Pick 1.7"),
"Random Slur 1.7", N_("Random Slur 1.7"),
}; };
#define RNDM_HURL 1 #define RNDM_HURL 1
@ -212,30 +214,32 @@ query()
static int nreturn_vals = 0; static int nreturn_vals = 0;
const char *hurl_blurb = const char *hurl_blurb =
"Add a random factor to the image by hurling random data at it."; _("Add a random factor to the image by hurling random data at it.");
const char *pick_blurb = const char *pick_blurb =
"Add a random factor to the image by picking a random adjacent pixel."; _("Add a random factor to the image by picking a random adjacent pixel.");
const char *slur_blurb = const char *slur_blurb =
"Add a random factor to the image by slurring (similar to melting)."; _("Add a random factor to the image by slurring (similar to melting).");
const char *hurl_help = const char *hurl_help =
"This plug-in ``hurls'' randomly-valued pixels onto the selection or image. You may select the percentage of pixels to modify and the number of times to repeat the process."; _("This plug-in ``hurls'' randomly-valued pixels onto the selection or image. You may select the percentage of pixels to modify and the number of times to repeat the process.");
const char *pick_help = const char *pick_help =
"This plug-in replaces a pixel with a random adjacent pixel. You may select the percentage of pixels to modify and the number of times to repeat the process."; _("This plug-in replaces a pixel with a random adjacent pixel. You may select the percentage of pixels to modify and the number of times to repeat the process.");
const char *slur_help = const char *slur_help =
"This plug-in slurs (melts like a bunch of icicles) an image. You may select the percentage of pixels to modify and the number of times to repeat the process."; _("This plug-in slurs (melts like a bunch of icicles) an image. You may select the percentage of pixels to modify and the number of times to repeat the process.");
const char *author = "Miles O'Neal <meo@rru.com> http://www.rru.com/~meo/"; const char *author = "Miles O'Neal <meo@rru.com> http://www.rru.com/~meo/";
const char *copyrights = "Miles O'Neal, Spencer Kimball, Peter Mattis, Torsten Martinsen, Brian Degenhardt, Federico Mena Quintero, Stephen Norris, Daniel Cotting"; const char *copyrights = "Miles O'Neal, Spencer Kimball, Peter Mattis, Torsten Martinsen, Brian Degenhardt, Federico Mena Quintero, Stephen Norris, Daniel Cotting";
const char *copyright_date = "1995-1998"; const char *copyright_date = "1995-1998";
INIT_I18N();
gimp_install_procedure(PLUG_IN_NAME[0], gimp_install_procedure(PLUG_IN_NAME[0],
(char *) hurl_blurb, (char *) hurl_blurb,
(char *) hurl_help, (char *) hurl_help,
(char *) author, (char *) author,
(char *) copyrights, (char *) copyrights,
(char *) copyright_date, (char *) copyright_date,
"<Image>/Filters/Noise/Hurl...", N_("<Image>/Filters/Noise/Hurl..."),
"RGB*, GRAY*, INDEXED*", "RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nreturn_vals, nargs, nreturn_vals,
@ -247,7 +251,7 @@ query()
(char *) author, (char *) author,
(char *) copyrights, (char *) copyrights,
(char *) copyright_date, (char *) copyright_date,
"<Image>/Filters/Noise/Pick...", N_("<Image>/Filters/Noise/Pick..."),
"RGB*, GRAY*, INDEXED*", "RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nreturn_vals, nargs, nreturn_vals,
@ -259,7 +263,7 @@ query()
(char *) author, (char *) author,
(char *) copyrights, (char *) copyrights,
(char *) copyright_date, (char *) copyright_date,
"<Image>/Filters/Noise/Slur...", N_("<Image>/Filters/Noise/Slur..."),
"RGB*, GRAY*, INDEXED*", "RGB*, GRAY*, INDEXED*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nreturn_vals, nargs, nreturn_vals,
@ -316,6 +320,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
* If we're running interactively, pop up the dialog box. * If we're running interactively, pop up the dialog box.
*/ */
case RUN_INTERACTIVE: case RUN_INTERACTIVE:
INIT_I18N_UI();
gimp_get_data(PLUG_IN_NAME[rndm_type - 1], &pivals); gimp_get_data(PLUG_IN_NAME[rndm_type - 1], &pivals);
if (!randomize_dialog()) /* return on Cancel */ if (!randomize_dialog()) /* return on Cancel */
return; return;
@ -327,6 +332,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
* parameters have legitimate values. * parameters have legitimate values.
*/ */
case RUN_NONINTERACTIVE: case RUN_NONINTERACTIVE:
INIT_I18N();
if (nparams != 7) { if (nparams != 7) {
status = STATUS_CALLING_ERROR; status = STATUS_CALLING_ERROR;
} }
@ -349,6 +355,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
* If we're running with the last set of values, get those values. * If we're running with the last set of values, get those values.
*/ */
case RUN_WITH_LAST_VALS: case RUN_WITH_LAST_VALS:
INIT_I18N();
gimp_get_data(PLUG_IN_NAME[rndm_type - 1], &pivals); gimp_get_data(PLUG_IN_NAME[rndm_type - 1], &pivals);
break; break;
/* /*
@ -366,7 +373,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals,
case RNDM_PICK: rndm_type_str = "pick"; break; case RNDM_PICK: rndm_type_str = "pick"; break;
case RNDM_SLUR: rndm_type_str = "slur"; break; case RNDM_SLUR: rndm_type_str = "slur"; break;
} }
sprintf(prog_label, "%s (%s)", RNDM_VERSION[rndm_type - 1], sprintf(prog_label, "%s (%s)", gettext(RNDM_VERSION[rndm_type - 1]),
rndm_type_str); rndm_type_str);
gimp_progress_init(prog_label); gimp_progress_init(prog_label);
gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1)); gimp_tile_cache_ntiles(2 * (drawable->width / gimp_tile_width() + 1));
@ -673,7 +680,7 @@ randomize_dialog()
* destroy callback. * destroy callback.
*/ */
dlg = gtk_dialog_new(); dlg = gtk_dialog_new();
gtk_window_set_title(GTK_WINDOW(dlg), RNDM_VERSION[rndm_type - 1]); gtk_window_set_title(GTK_WINDOW(dlg), gettext(RNDM_VERSION[rndm_type - 1]));
gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE); gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect(GTK_OBJECT(dlg), "destroy", gtk_signal_connect(GTK_OBJECT(dlg), "destroy",
(GtkSignalFunc) gpc_close_callback, NULL); (GtkSignalFunc) gpc_close_callback, NULL);
@ -682,7 +689,7 @@ randomize_dialog()
* *
* First set up the basic containers, label them, etc. * First set up the basic containers, label them, etc.
*/ */
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_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width(GTK_CONTAINER(frame), 10); gtk_container_border_width(GTK_CONTAINER(frame), 10);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame, TRUE, TRUE, 0);
@ -694,14 +701,14 @@ randomize_dialog()
/* /*
* Action area OK & Cancel buttons * Action area OK & Cancel buttons
*/ */
gpc_add_action_button("OK", (GtkSignalFunc) randomize_ok_callback, dlg, gpc_add_action_button( _("OK"), (GtkSignalFunc) randomize_ok_callback, dlg,
"Accept settings and apply filter to image"); _("Accept settings and apply filter to image"));
gpc_add_action_button("Cancel", (GtkSignalFunc) gpc_cancel_callback, dlg, gpc_add_action_button( _("Cancel"), (GtkSignalFunc) gpc_cancel_callback, dlg,
"Close plug-in without making any changes"); _("Close plug-in without making any changes"));
/* /*
* Randomization seed initialization controls * Randomization seed initialization controls
*/ */
gpc_add_label("Randomization Seed:", table, 0, 1, 1, 2); gpc_add_label( _("Randomization Seed:"), table, 0, 1, 1, 2);
/* /*
* Box to hold seed initialization radio buttons * Box to hold seed initialization radio buttons
*/ */
@ -712,8 +719,8 @@ randomize_dialog()
/* /*
* Time button * Time button
*/ */
gpc_add_radio_button(&seed_group, "Current Time", seed_vbox, &do_time, gpc_add_radio_button(&seed_group, _("Current Time"), seed_vbox, &do_time,
"Seed random number generator from the current time - this guarantees a reasonable randomization"); _("Seed random number generator from the current time - this guarantees a reasonable randomization"));
/* /*
* Box to hold seed user initialization controls * Box to hold seed user initialization controls
*/ */
@ -723,8 +730,8 @@ randomize_dialog()
/* /*
* User button * User button
*/ */
gpc_add_radio_button(&seed_group, "Other Value", seed_hbox, &do_user, gpc_add_radio_button(&seed_group, _("Other Value"), seed_hbox, &do_user,
"Enable user-entered value for random number generator seed - this allows you to repeat a given \"random\" operation"); _("Enable user-entered value for random number generator seed - this allows you to repeat a given \"random\" operation"));
/* /*
* Randomization seed number (text) * Randomization seed number (text)
*/ */
@ -736,23 +743,23 @@ randomize_dialog()
gtk_signal_connect(GTK_OBJECT(entry), "changed", gtk_signal_connect(GTK_OBJECT(entry), "changed",
(GtkSignalFunc) gpc_text_update, &pivals.rndm_seed); (GtkSignalFunc) gpc_text_update, &pivals.rndm_seed);
gtk_widget_show(entry); gtk_widget_show(entry);
gpc_set_tooltip(entry, "Value for seeding the random number generator"); gpc_set_tooltip(entry, _("Value for seeding the random number generator"));
gtk_widget_show(seed_hbox); gtk_widget_show(seed_hbox);
/* /*
* Randomization percentage label & scale (1 to 100) * Randomization percentage label & scale (1 to 100)
*/ */
gpc_add_label("Randomization %:", table, 0, 1, 2, 3); gpc_add_label( _("Randomization %:"), table, 0, 1, 2, 3);
gpc_add_hscale(table, SCALE_WIDTH, gpc_add_hscale(table, SCALE_WIDTH,
1.0, 100.0, &pivals.rndm_pct, 1, 2, 2, 3, 1.0, 100.0, &pivals.rndm_pct, 1, 2, 2, 3,
"Percentage of pixels to be filtered"); _("Percentage of pixels to be filtered"));
/* /*
* Repeat count label & scale (1 to 100) * Repeat count label & scale (1 to 100)
*/ */
gpc_add_label("Repeat:", table, 0, 1, 3, 4); gpc_add_label( _("Repeat:"), table, 0, 1, 3, 4);
gpc_add_hscale(table, SCALE_WIDTH, gpc_add_hscale(table, SCALE_WIDTH,
1.0, 100.0, &pivals.rndm_rcount, 1, 2, 3, 4, 1.0, 100.0, &pivals.rndm_rcount, 1, 2, 3, 4,
"Number of times to apply filter"); _("Number of times to apply filter"));
/* /*
* Display everything. * Display everything.

View File

@ -28,7 +28,7 @@
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
/* Some useful macros */ /* Some useful macros */
#define SCALE_WIDTH 200 #define SCALE_WIDTH 200
@ -155,13 +155,15 @@ query ()
static gint nargs = sizeof (args) / sizeof (args[0]); static gint nargs = sizeof (args) / sizeof (args[0]);
static gint nreturn_vals = 0; static gint nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_ripple", gimp_install_procedure ("plug_in_ripple",
"Ripple the contents of the specified drawable", _("Ripple the contents of the specified drawable"),
"Ripples the pixels of the specified drawable. Each row or colum will be displaced a certain number of pixels coinciding with the given wave form", _("Ripples the pixels of the specified drawable. Each row or colum will be displaced a certain number of pixels coinciding with the given wave form"),
"Brian Degenhardt <bdegenha@ucsd.edu>", "Brian Degenhardt <bdegenha@ucsd.edu>",
"Brian Degenhardt", "Brian Degenhardt",
"1997", "1997",
"<Image>/Filters/Distorts/Ripple...", N_("<Image>/Filters/Distorts/Ripple..."),
"RGB*, GRAY*", "RGB*, GRAY*",
PROC_PLUG_IN, PROC_PLUG_IN,
nargs, nreturn_vals, nargs, nreturn_vals,
@ -194,6 +196,7 @@ run (gchar *name,
switch (run_mode) switch (run_mode)
{ {
case RUN_INTERACTIVE: case RUN_INTERACTIVE:
INIT_I18N_UI();
/* Possibly retrieve data */ /* Possibly retrieve data */
gimp_get_data ("plug_in_ripple", &rvals); gimp_get_data ("plug_in_ripple", &rvals);
@ -203,6 +206,7 @@ run (gchar *name,
break; break;
case RUN_NONINTERACTIVE: case RUN_NONINTERACTIVE:
INIT_I18N();
/* Make sure all the arguments are there! */ /* Make sure all the arguments are there! */
if (nparams != 10) if (nparams != 10)
status = STATUS_CALLING_ERROR; status = STATUS_CALLING_ERROR;
@ -222,6 +226,7 @@ run (gchar *name,
break; break;
case RUN_WITH_LAST_VALS: case RUN_WITH_LAST_VALS:
INIT_I18N();
/* Possibly retrieve data */ /* Possibly retrieve data */
gimp_get_data ("plug_in_ripple", &rvals); gimp_get_data ("plug_in_ripple", &rvals);
break; break;
@ -235,7 +240,7 @@ run (gchar *name,
/* Make sure that the drawable is gray or RGB color */ /* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id)) if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))
{ {
gimp_progress_init ("Rippling..."); gimp_progress_init ( _("Rippling..."));
/* set the tile cache size */ /* set the tile cache size */
gimp_tile_cache_ntiles (TILE_CACHE_SIZE); gimp_tile_cache_ntiles (TILE_CACHE_SIZE);
@ -574,7 +579,7 @@ ripple_dialog ()
gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
dlg = gtk_dialog_new (); dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), "Ripple"); gtk_window_set_title (GTK_WINDOW (dlg), _("Ripple"));
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy", gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
(GtkSignalFunc) ripple_close_callback, (GtkSignalFunc) ripple_close_callback,
@ -588,7 +593,7 @@ ripple_dialog ()
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox); 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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) ripple_ok_callback, (GtkSignalFunc) ripple_ok_callback,
@ -597,7 +602,7 @@ ripple_dialog ()
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (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_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
@ -623,7 +628,7 @@ ripple_dialog ()
/* Options section */ /* Options section */
/* the vertical box and its toggle buttons */ /* the vertical box and its toggle buttons */
frame = gtk_frame_new ("Options"); frame = gtk_frame_new ( _("Options"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 5); GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 5);
@ -631,7 +636,7 @@ ripple_dialog ()
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_check_button_new_with_label ("Antialiasing"); toggle = gtk_check_button_new_with_label ( _("Antialiasing"));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) ripple_toggle_update, (GtkSignalFunc) ripple_toggle_update,
@ -639,7 +644,7 @@ ripple_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), rvals.antialias); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), rvals.antialias);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_check_button_new_with_label ("Retain Tilability"); toggle = gtk_check_button_new_with_label ( _("Retain Tilability"));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
(GtkSignalFunc) ripple_toggle_update, (GtkSignalFunc) ripple_toggle_update,
@ -652,7 +657,7 @@ ripple_dialog ()
/* Orientation toggle box */ /* Orientation toggle box */
frame = gtk_frame_new ("Orientation"); frame = gtk_frame_new ( _("Orientation"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (table), frame, 1, 2, 0, 1, gtk_table_attach (GTK_TABLE (table), frame, 1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 5); GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 5);
@ -660,7 +665,7 @@ ripple_dialog ()
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (orientation_group, "Horizontal"); toggle = gtk_radio_button_new_with_label (orientation_group, _("Horizontal"));
orientation_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); orientation_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -669,7 +674,7 @@ ripple_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_horizontal); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_horizontal);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_radio_button_new_with_label (orientation_group, "Vertical"); toggle = gtk_radio_button_new_with_label (orientation_group, _("Vertical"));
orientation_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); orientation_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -688,14 +693,14 @@ ripple_dialog ()
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), hbox, TRUE, TRUE, 0);
/* Edges toggle box */ /* Edges toggle box */
frame = gtk_frame_new ("Edges"); frame = gtk_frame_new ( _("Edges"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5);
toggle_vbox = gtk_vbox_new (FALSE, 5); toggle_vbox = gtk_vbox_new (FALSE, 5);
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (edges_group, "Wrap"); toggle = gtk_radio_button_new_with_label (edges_group, _("Wrap"));
edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -704,7 +709,7 @@ ripple_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_wrap); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_wrap);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_radio_button_new_with_label (edges_group, "Smear"); toggle = gtk_radio_button_new_with_label (edges_group, _("Smear"));
edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -713,7 +718,7 @@ ripple_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_smear); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_smear);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_radio_button_new_with_label (edges_group, "Black"); toggle = gtk_radio_button_new_with_label (edges_group, _("Black"));
edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); edges_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -727,14 +732,14 @@ ripple_dialog ()
/* Edges toggle box */ /* Edges toggle box */
frame = gtk_frame_new ("Wave Type"); frame = gtk_frame_new ( _("Wave Type"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_table_attach (GTK_TABLE (table), frame, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5); gtk_table_attach (GTK_TABLE (table), frame, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 5);
toggle_vbox = gtk_vbox_new (FALSE, 5); toggle_vbox = gtk_vbox_new (FALSE, 5);
gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5); gtk_container_border_width (GTK_CONTAINER (toggle_vbox), 5);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox); gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
toggle = gtk_radio_button_new_with_label (waveform_group, "Sawtooth"); toggle = gtk_radio_button_new_with_label (waveform_group, _("Sawtooth"));
waveform_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); waveform_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -743,7 +748,7 @@ ripple_dialog ()
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_sawtooth); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), do_sawtooth);
gtk_widget_show (toggle); gtk_widget_show (toggle);
toggle = gtk_radio_button_new_with_label (waveform_group, "Sine"); toggle = gtk_radio_button_new_with_label (waveform_group, _("Sine"));
waveform_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); waveform_group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled", gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
@ -759,7 +764,7 @@ ripple_dialog ()
/* parameter settings */ /* 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_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 10); gtk_container_border_width (GTK_CONTAINER (frame), 10);
gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
@ -771,7 +776,7 @@ ripple_dialog ()
/* Period */ /* Period */
label = gtk_label_new ("Period"); label = gtk_label_new ( _("Period"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); 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_EXPAND, GTK_FILL, 10, 5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 10, 5);
gtk_widget_show (label); gtk_widget_show (label);
@ -809,7 +814,7 @@ ripple_dialog ()
/* Amplitude */ /* Amplitude */
label = gtk_label_new ("Amplitude"); label = gtk_label_new ( _("Amplitude"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); 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_EXPAND, GTK_FILL, 10, 5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL, 10, 5);
gtk_widget_show (label); gtk_widget_show (label);

View File

@ -25,8 +25,10 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "config.h"
#include "gtk/gtk.h" #include "gtk/gtk.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#define DBL_LIST_WIDTH 250 #define DBL_LIST_WIDTH 250
#define DBL_WIDTH (DBL_LIST_WIDTH + 300) #define DBL_WIDTH (DBL_LIST_WIDTH + 300)
@ -34,10 +36,10 @@
static char *proc_type_str[] = static char *proc_type_str[] =
{ {
"Internal GIMP procedure", N_("Internal GIMP procedure"),
"GIMP Plug-In", N_("GIMP Plug-In"),
"GIMP Extension", N_("GIMP Extension"),
"Temporary Procedure" N_("Temporary Procedure")
}; };
@ -82,13 +84,15 @@ query ()
static int nargs = sizeof (args) / sizeof (args[0]); static int nargs = sizeof (args) / sizeof (args[0]);
INIT_I18N();
gimp_install_procedure ("plug_in_details", gimp_install_procedure ("plug_in_details",
"Displays plugin details", _("Displays plugin details"),
"Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system", _("Helps browse the plugin menus system. You can search for plugin names, sort by name or menu location and you can view a tree representation of the plugin menus. Can also be of help to find where new plugins have installed themselves in the menuing system"),
"Andy Thomas", "Andy Thomas",
"Andy Thomas", "Andy Thomas",
"1999", "1999",
"<Toolbox>/Xtns/Plugin Details...", N_("<Toolbox>/Xtns/Plugin Details..."),
"", "",
PROC_EXTENSION, PROC_EXTENSION,
nargs, 0, nargs, 0,
@ -113,6 +117,8 @@ run (char *name,
values[0].type = PARAM_STATUS; values[0].type = PARAM_STATUS;
values[0].data.d_status = STATUS_CALLING_ERROR; values[0].data.d_status = STATUS_CALLING_ERROR;
INIT_I18N_UI();
if (strcmp (name, "plug_in_details") == 0) if (strcmp (name, "plug_in_details") == 0)
{ {
*nreturn_vals = 1; *nreturn_vals = 1;
@ -200,7 +206,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child1_resize=FALSE; GTK_PANED(pdesc->paned)->child1_resize=FALSE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),10);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),6);
gtk_label_set_text(lab," Details <<< "); gtk_label_set_text(lab, _(" Details <<< "));
gtk_widget_show (pdesc->descr_scroll); gtk_widget_show (pdesc->descr_scroll);
pdesc->details_showing = TRUE; pdesc->details_showing = TRUE;
} }
@ -211,7 +217,7 @@ details_callback (GtkWidget *widget,
GTK_PANED(pdesc->paned)->child2_resize=TRUE; GTK_PANED(pdesc->paned)->child2_resize=TRUE;
gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_handle_size(GTK_PANED(pdesc->paned),0);
gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0); gtk_paned_set_gutter_size(GTK_PANED(pdesc->paned),0);
gtk_label_set_text(lab," Details >>> "); gtk_label_set_text(lab, _(" Details >>> "));
gtk_widget_hide (pdesc->descr_scroll); gtk_widget_hide (pdesc->descr_scroll);
gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/ gtk_paned_set_position(GTK_PANED(pdesc->paned),p->allocation.width);/*plugindesc->c1size);*/
pdesc->details_showing = FALSE; pdesc->details_showing = FALSE;
@ -298,7 +304,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* Number of plugins */ /* Number of plugins */
label = gtk_label_new(g_strdup_printf(" Number of plugin interfaces :%d",pdesc->num_plugins)); label = gtk_label_new(g_strdup_printf( _(" Number of plugin interfaces :%d"),pdesc->num_plugins));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 0, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -314,7 +320,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* menu path */ /* menu path */
label = gtk_label_new("Menu path :"); label = gtk_label_new( _("Menu path :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -335,7 +341,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the name */ /* show the name */
label = gtk_label_new("Name :"); label = gtk_label_new( _("Name :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
@ -357,7 +363,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the description */ /* show the description */
label = gtk_label_new("Blurb :"); label = gtk_label_new( _("Blurb :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 0);
@ -379,7 +385,7 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the help */ /* show the help */
if ((selected_proc_help) && (strlen(selected_proc_help) > 1)) if ((selected_proc_help) && (strlen(selected_proc_help) > 1))
{ {
label = gtk_label_new("Help :"); label = gtk_label_new( _("Help :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, 0, 1, table_row, table_row+1,
@ -423,13 +429,13 @@ procedure_general_select_callback (PDesc *pdesc,
/* show the type */ /* show the type */
label = gtk_label_new("Type :"); label = gtk_label_new( _("Type :"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6); 0, 1, table_row, table_row+1, GTK_FILL, GTK_FILL, 3, 6);
gtk_widget_show(label); gtk_widget_show(label);
label = gtk_label_new(proc_type_str[selected_proc_type]); label = gtk_label_new( gettext(proc_type_str[selected_proc_type]));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (pdesc->info_table), label, gtk_table_attach (GTK_TABLE (pdesc->info_table), label,
1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0); 1, 4, table_row, table_row+1, GTK_FILL, GTK_FILL, 0, 0);
@ -980,7 +986,7 @@ gimp_plugin_desc ()
plugindesc->dlg = gtk_dialog_new(); plugindesc->dlg = gtk_dialog_new();
plugindesc->details_showing = FALSE; plugindesc->details_showing = FALSE;
gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), "Plugin Descriptions"); gtk_window_set_title (GTK_WINDOW (plugindesc->dlg), _("Plugin Descriptions"));
gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE); gtk_window_position (GTK_WINDOW (plugindesc->dlg), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy", gtk_signal_connect (GTK_OBJECT (plugindesc->dlg), "destroy",
(GtkSignalFunc) dialog_close_callback, (GtkSignalFunc) dialog_close_callback,
@ -1012,10 +1018,10 @@ gimp_plugin_desc ()
/* list : list in a scrolled_win */ /* list : list in a scrolled_win */
clabels[0] = g_strdup("Name"); clabels[0] = g_strdup( _("Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Menu Path"); clabels[2] = g_strdup( _("Menu Path"));
clabels[3] = g_strdup("Image Types"); clabels[3] = g_strdup( _("Image Types"));
plugindesc->clist = gtk_clist_new_with_titles(4,clabels); plugindesc->clist = gtk_clist_new_with_titles(4,clabels);
gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column", gtk_signal_connect (GTK_OBJECT (plugindesc->clist), "click_column",
@ -1032,16 +1038,16 @@ gimp_plugin_desc ()
(GtkSignalFunc) procedure_clist_select_callback, (GtkSignalFunc) procedure_clist_select_callback,
plugindesc); plugindesc);
label = gtk_label_new ("List view"); label = gtk_label_new ( _("List view"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), swindow, label);
gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist); gtk_container_add (GTK_CONTAINER (swindow), plugindesc->clist);
gtk_widget_show (plugindesc->clist); gtk_widget_show (plugindesc->clist);
gtk_widget_show (swindow); gtk_widget_show (swindow);
/* notebook->ctree */ /* notebook->ctree */
clabels[0] = g_strdup("Menu Path/Name"); clabels[0] = g_strdup( _("Menu Path/Name"));
clabels[1] = g_strdup("Ins Date"); clabels[1] = g_strdup( _("Ins Date"));
clabels[2] = g_strdup("Image Types"); clabels[2] = g_strdup( _("Image Types"));
plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels); plugindesc->ctree = gtk_ctree_new_with_titles(3,0,clabels);
plugindesc->ctree_scrolled_win = plugindesc->ctree_scrolled_win =
swindow = gtk_scrolled_window_new (NULL, NULL); swindow = gtk_scrolled_window_new (NULL, NULL);
@ -1051,7 +1057,7 @@ gimp_plugin_desc ()
gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row", gtk_signal_connect (GTK_OBJECT (plugindesc->ctree), "tree_select_row",
(GtkSignalFunc) procedure_ctree_select_callback, (GtkSignalFunc) procedure_ctree_select_callback,
plugindesc); plugindesc);
label = gtk_label_new("Tree view"); label = gtk_label_new( _("Tree view"));
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 0, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 1, TRUE);
gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE); gtk_clist_set_column_auto_resize (GTK_CLIST (plugindesc->ctree), 2, TRUE);
@ -1073,7 +1079,7 @@ gimp_plugin_desc ()
searchhbox, FALSE, FALSE, 0); searchhbox, FALSE, FALSE, 0);
gtk_widget_show(searchhbox); gtk_widget_show(searchhbox);
label = gtk_label_new("Search : "); label = gtk_label_new( _("Search : "));
gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5); gtk_misc_set_alignment( GTK_MISC(label), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (searchhbox), gtk_box_pack_start (GTK_BOX (searchhbox),
label, FALSE, FALSE, 0); label, FALSE, FALSE, 0);
@ -1084,7 +1090,7 @@ gimp_plugin_desc ()
plugindesc->search_entry, TRUE, TRUE, 0); plugindesc->search_entry, TRUE, TRUE, 0);
gtk_widget_show(plugindesc->search_entry); gtk_widget_show(plugindesc->search_entry);
button = gtk_button_new_with_label (" Details >>> "); button = gtk_button_new_with_label ( _(" Details >>> "));
gtk_widget_show(button); gtk_widget_show(button);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) details_callback, plugindesc); (GtkSignalFunc) details_callback, plugindesc);
@ -1098,7 +1104,7 @@ gimp_plugin_desc ()
gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0); gtk_container_border_width (GTK_CONTAINER (GTK_DIALOG(plugindesc->dlg)->action_area), 0);
plugindesc->name_button = gtk_button_new_with_label ("Search by name"); plugindesc->name_button = gtk_button_new_with_label ( _("Search by name"));
GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (plugindesc->name_button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked", gtk_signal_connect (GTK_OBJECT (plugindesc->name_button), "clicked",
(GtkSignalFunc) dialog_search_callback, plugindesc); (GtkSignalFunc) dialog_search_callback, plugindesc);
@ -1107,7 +1113,7 @@ gimp_plugin_desc ()
gtk_widget_show(plugindesc->name_button); gtk_widget_show(plugindesc->name_button);
button = gtk_button_new_with_label ("Close"); button = gtk_button_new_with_label ( _("Close"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) dialog_close_callback, plugindesc); (GtkSignalFunc) dialog_close_callback, plugindesc);

View File

@ -85,9 +85,15 @@ plug-ins/common/pcx.c
plug-ins/common/pix.c plug-ins/common/pix.c
plug-ins/common/pixelize.c plug-ins/common/pixelize.c
plug-ins/common/plasma.c plug-ins/common/plasma.c
plug-ins/common/plugindetails.c
plug-ins/common/png.c plug-ins/common/png.c
plug-ins/common/pnm.c
plug-ins/common/polar.c
plug-ins/common/ps.c plug-ins/common/ps.c
plug-ins/common/psd.c
plug-ins/common/psp.c plug-ins/common/psp.c
plug-ins/common/randomize.c
plug-ins/common/ripple.c
plug-ins/common/rotate.c plug-ins/common/rotate.c
plug-ins/common/sample_colorize.c plug-ins/common/sample_colorize.c
plug-ins/common/screenshot.c plug-ins/common/screenshot.c

View File

@ -123,3 +123,4 @@ app/undo_history.c
app/undo.c app/undo.c
app/xcf.c app/xcf.c
app/xinput_airbrush.c app/xinput_airbrush.c
modules/cdisplay_gamma.c