mirror of https://github.com/GNOME/gimp.git
parent
b48c534756
commit
8057d056f2
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
Sun Jan 2 16:43:46 CET 2000 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/AlienMap/AlienMap.c
|
||||
* plug-ins/AlienMap2/AlienMap2.c
|
||||
* plug-ins/borderaverage/borderaverage.c
|
||||
* plug-ins/common/illusion.c
|
||||
* plug-ins/common/max_rgb.c
|
||||
* plug-ins/common/sample_colorize.c
|
||||
* plug-ins/common/sel_gauss.c
|
||||
* plug-ins/script-fu/script-fu-scripts.c
|
||||
* plug-ins/unsharp/Makefile.am
|
||||
* plug-ins/unsharp/unsharp.c
|
||||
* plug-ins/webbrowser/Makefile.am
|
||||
* plug-ins/webbrowser/webbrowser.c
|
||||
* po-plug-ins/POTFILES.in: dialog layout and i18n
|
||||
|
||||
2000-01-02 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Some clarifications.
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "gtk/gtk.h"
|
||||
#include "config.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "logo.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
@ -625,6 +625,7 @@ alienmap_dialog(void)
|
|||
GtkWidget *toggle;
|
||||
GtkWidget *toggle_vbox;
|
||||
GtkWidget *table, *table2, *table3;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *button;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
|
@ -853,17 +854,34 @@ alienmap_dialog(void)
|
|||
/* gtk_widget_show (table); */
|
||||
|
||||
|
||||
/* Buttons */
|
||||
/* Action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE);
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
GTK_SIGNAL_FUNC (alienmap_logo_dialog),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Show information about this plug-in and the author"));
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) dialog_ok_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Accept settings and apply filter on image"));
|
||||
|
@ -873,21 +891,10 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
|
|||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
(GtkSignalFunc) dialog_cancel_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Reject any changes and close plug-in"));
|
||||
|
||||
button = gtk_button_new_with_label(_("About..."));
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
GTK_SIGNAL_FUNC (alienmap_logo_dialog),
|
||||
NULL);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
|
||||
button, TRUE, TRUE, 0);
|
||||
gtk_widget_show(button);
|
||||
set_tooltip(tips,button,_("Show information about this plug-in and the author"));
|
||||
|
||||
|
||||
/* Done */
|
||||
|
||||
gtk_widget_show(dialog);
|
||||
|
|
|
@ -628,6 +628,7 @@ alienmap2_dialog(void)
|
|||
GtkWidget *toggle;
|
||||
GtkWidget *toggle_vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *button;
|
||||
GSList *mode_group = NULL;
|
||||
gint argc;
|
||||
|
@ -776,17 +777,34 @@ if (wvals.redfrequency!=1.0) exit;
|
|||
gtk_widget_show (frame);
|
||||
|
||||
|
||||
/* Buttons */
|
||||
/* Action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE);
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
GTK_SIGNAL_FUNC (alienmap2_logo_dialog),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Show information about this plug-in and the author"));
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) dialog_ok_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Accept settings and apply filter on image"));
|
||||
|
@ -796,22 +814,10 @@ gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 6);
|
|||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
(GtkSignalFunc) dialog_cancel_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
set_tooltip(tips,button,_("Reject any changes and close plug-in"));
|
||||
|
||||
button = gtk_button_new_with_label(_("About..."));
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
GTK_SIGNAL_FUNC (alienmap2_logo_dialog),
|
||||
NULL);
|
||||
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
|
||||
button, TRUE, TRUE, 0);
|
||||
gtk_widget_show(button);
|
||||
set_tooltip(tips,button,_("Show information about this plug-in and the author"));
|
||||
|
||||
|
||||
|
||||
/* Done */
|
||||
|
||||
gtk_widget_show(dialog);
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <libgimp/gimp.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gck/gck.h>
|
||||
#include <plug-ins/megawidget/megawidget.h>
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include "gck/gck.h"
|
||||
#include "plug-ins/megawidget/megawidget.h"
|
||||
|
||||
|
||||
|
||||
/* Declare local functions.
|
||||
|
@ -63,7 +63,7 @@ struct borderaverage_data {
|
|||
|
||||
gchar * menu_labels[] =
|
||||
{
|
||||
"1 (nonsens?)", "2", "4", "8", "16", "32", "64", "128", "256 (nonsens?)"
|
||||
"1 (nonsense?)", "2", "4", "8", "16", "32", "64", "128", "256 (nonsense?)"
|
||||
};
|
||||
|
||||
MAIN ()
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <libgimp/gimp.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gck/gck.h>
|
||||
#include <plug-ins/megawidget/megawidget.h>
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include "gck/gck.h"
|
||||
#include "plug-ins/megawidget/megawidget.h"
|
||||
|
||||
|
||||
|
||||
/* Declare local functions.
|
||||
|
@ -63,7 +63,7 @@ struct borderaverage_data {
|
|||
|
||||
gchar * menu_labels[] =
|
||||
{
|
||||
"1 (nonsens?)", "2", "4", "8", "16", "32", "64", "128", "256 (nonsens?)"
|
||||
"1 (nonsense?)", "2", "4", "8", "16", "32", "64", "128", "256 (nonsense?)"
|
||||
};
|
||||
|
||||
MAIN ()
|
||||
|
|
|
@ -25,19 +25,13 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <math.h>
|
||||
#include "libgimp/gimpmath.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#define PLUG_IN_NAME "plug_in_illusion"
|
||||
#define PLUG_IN_VERSION "v0.7 (Dec. 25 1997)"
|
||||
|
||||
#ifndef PI
|
||||
#define PI 3.141592653589793238462643383279
|
||||
#endif
|
||||
#ifndef PI_2
|
||||
#define PI_2 (PI*2)
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
@ -235,8 +229,8 @@ static void filter( GDrawable *drawable )
|
|||
cy = ((gdouble)y - center_y) / scale;
|
||||
for( x = select_x1; x < select_x2; x++ ){
|
||||
cx = ((gdouble)x - center_x) / scale;
|
||||
angle = floor( atan2(cy,cx) * parameters.division / PI_2 )
|
||||
* PI_2 / parameters.division + ( PI / parameters.division );
|
||||
angle = floor( atan2(cy,cx) * parameters.division / G_PI_2 )
|
||||
* G_PI_2 / parameters.division + ( G_PI / parameters.division );
|
||||
radius = sqrt((gdouble)(cx*cx+cy*cy));
|
||||
xx = x - offset * cos( angle );
|
||||
yy = y - offset * sin( angle );
|
||||
|
@ -315,27 +309,34 @@ static int dialog( void )
|
|||
gtk_container_border_width( GTK_CONTAINER( GTK_DIALOG( window )->vbox ), 5 );
|
||||
|
||||
{
|
||||
/* buttons */
|
||||
/* Action area */
|
||||
GtkWidget *button;
|
||||
GtkWidget *hbbox;
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (window)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (window)->action_area), FALSE);
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (window)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
/* ok button */
|
||||
button = gtk_button_new_with_label( _("OK") );
|
||||
GTK_WIDGET_SET_FLAGS( button, GTK_CAN_DEFAULT );
|
||||
gtk_signal_connect( GTK_OBJECT( button ), "clicked",
|
||||
GTK_SIGNAL_FUNC( dialog_ok_handler ),
|
||||
GTK_OBJECT( window ) );
|
||||
GTK_WIDGET_SET_FLAGS( button, GTK_CAN_DEFAULT );
|
||||
gtk_box_pack_start( GTK_BOX( GTK_DIALOG( window )->action_area ),
|
||||
button, TRUE, TRUE, 0 );
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default( button );
|
||||
gtk_widget_show( button );
|
||||
|
||||
/* cancel button */
|
||||
button = gtk_button_new_with_label( _("Cancel") );
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect( GTK_OBJECT( button ), "clicked",
|
||||
GTK_SIGNAL_FUNC( dialog_cancel_handler ),
|
||||
GTK_OBJECT( window )) ;
|
||||
gtk_box_pack_start( GTK_BOX( GTK_DIALOG( window )->action_area ),
|
||||
button, TRUE, TRUE, 0 );
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show( button );
|
||||
}
|
||||
|
||||
|
@ -354,7 +355,7 @@ static int dialog( void )
|
|||
gtk_widget_show( table );
|
||||
|
||||
/* tile width */
|
||||
label = gtk_label_new( _("division: ") );
|
||||
label = gtk_label_new( _("Division: ") );
|
||||
entry_division = gtk_entry_new();
|
||||
sprintf( buffer, "%d", parameters.division );
|
||||
gtk_entry_set_text( GTK_ENTRY( entry_division ), buffer );
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Replace them with the right ones */
|
||||
#define PLUG_IN_NAME "plug_in_max_rgb"
|
||||
|
@ -36,7 +36,6 @@
|
|||
/* you need not change the following names */
|
||||
#define INTERFACE max_rgb_interface
|
||||
#define DIALOG max_rgb_dialog
|
||||
#define ERROR_DIALOG max_rgb_error_dialog
|
||||
#define VALS max_rgb_vals
|
||||
#define OK_CALLBACK _max_rgbok_callback
|
||||
|
||||
|
@ -48,7 +47,6 @@ static void run (char *name,
|
|||
GParam **return_vals);
|
||||
static GStatusType MAIN_FUNCTION (gint32 drawable_id);
|
||||
static gint DIALOG ();
|
||||
static void ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message);
|
||||
|
||||
static void
|
||||
OK_CALLBACK (GtkWidget *widget, gpointer data);
|
||||
|
@ -65,8 +63,6 @@ static GtkWidget *
|
|||
gtkW_dialog_new (char *name,
|
||||
GtkSignalFunc ok_callback,
|
||||
GtkSignalFunc close_callback);
|
||||
static GtkWidget *
|
||||
gtkW_error_dialog_new (char * name);
|
||||
static GSList *
|
||||
gtkW_vbox_add_radio_button (GtkWidget *vbox,
|
||||
gchar *name,
|
||||
|
@ -172,7 +168,7 @@ run (char *name,
|
|||
/* Since a channel might be selected, we must check wheter RGB or not. */
|
||||
if (!gimp_drawable_is_rgb(drawable_id))
|
||||
{
|
||||
ERROR_DIALOG (1, _("RGB drawable is not selected."));
|
||||
gimp_message (_("RGB drawable is not selected."));
|
||||
return;
|
||||
}
|
||||
if (! DIALOG ())
|
||||
|
@ -282,7 +278,7 @@ DIALOG ()
|
|||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
dlg = gtkW_dialog_new (PLUG_IN_NAME,
|
||||
dlg = gtkW_dialog_new (_("Max RGB"),
|
||||
(GtkSignalFunc) OK_CALLBACK,
|
||||
(GtkSignalFunc) gtkW_close_callback);
|
||||
|
||||
|
@ -308,41 +304,6 @@ DIALOG ()
|
|||
return INTERFACE.run;
|
||||
}
|
||||
|
||||
static void
|
||||
ERROR_DIALOG (gint gtk_was_not_initialized, gchar *message)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
if (gtk_was_not_initialized)
|
||||
{
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup (PLUG_IN_NAME);
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
}
|
||||
|
||||
dlg = gtkW_error_dialog_new (PLUG_IN_NAME);
|
||||
|
||||
table = gtk_table_new (1,1, FALSE);
|
||||
gtk_container_border_width (GTK_CONTAINER (table), 10);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table, TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new (message);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL|GTK_EXPAND,
|
||||
0, 0, 0);
|
||||
|
||||
gtk_widget_show (label);
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (dlg);
|
||||
|
||||
gtk_main ();
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
static void
|
||||
OK_CALLBACK (GtkWidget *widget,
|
||||
|
@ -382,7 +343,7 @@ gtkW_dialog_new (char * name,
|
|||
GtkSignalFunc ok_callback,
|
||||
GtkSignalFunc close_callback)
|
||||
{
|
||||
GtkWidget *dlg, *button;
|
||||
GtkWidget *dlg, *button, *hbbox;
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), name);
|
||||
|
@ -390,13 +351,20 @@ gtkW_dialog_new (char * name,
|
|||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) gtkW_close_callback, NULL);
|
||||
|
||||
/* Action Area */
|
||||
/* Action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
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"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) ok_callback, dlg);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button,
|
||||
TRUE, TRUE, 0);
|
||||
(GtkSignalFunc) ok_callback,
|
||||
dlg);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -405,38 +373,13 @@ gtkW_dialog_new (char * name,
|
|||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (dlg));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_show (dlg);
|
||||
|
||||
return dlg;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
gtkW_error_dialog_new (char * name)
|
||||
{
|
||||
GtkWidget *dlg, *button;
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), name);
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) gtkW_close_callback, NULL);
|
||||
|
||||
/* Action Area */
|
||||
button = gtk_button_new_with_label ( _("OK"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtkW_close_callback, dlg);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
return dlg;
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
gtkW_table_new (GtkWidget *parent, gint col, gint row)
|
||||
{
|
||||
|
|
|
@ -1244,6 +1244,7 @@ p_smp_dialog (void)
|
|||
GtkWidget *dialog;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox2;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *button;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *pframe;
|
||||
|
@ -1292,38 +1293,44 @@ p_smp_dialog (void)
|
|||
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
|
||||
(GtkSignalFunc) p_smp_close_callback,
|
||||
dialog);
|
||||
|
||||
/* Action area */
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (dialog));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
|
||||
button, TRUE, TRUE, 0);
|
||||
gtk_widget_show (button);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE);
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
button = gtk_button_new_with_label (_("Apply"));
|
||||
g_di.apply_button = button;
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) p_smp_apply_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
|
||||
button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
g_di.apply_button = button;
|
||||
gtk_widget_set_sensitive(g_di.apply_button,FALSE);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Get Sample Colors"));
|
||||
g_di.get_smp_colors_button = button;
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) p_smp_get_colors_callback,
|
||||
dialog);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
|
||||
button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (dialog));
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* parameter settings */
|
||||
frame = gtk_frame_new (_("settings"));
|
||||
frame = gtk_frame_new (_("Settings"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
|
@ -1384,7 +1391,7 @@ p_smp_dialog (void)
|
|||
gtk_widget_show (menu_item);
|
||||
|
||||
/* Add extra menu items for Inverted Gradient */
|
||||
menu_item = gtk_menu_item_new_with_label (_("** From INVERS GRADIENT **"));
|
||||
menu_item = gtk_menu_item_new_with_label (_("** From INVERSE GRADIENT **"));
|
||||
gtk_container_add (GTK_CONTAINER (menu), menu_item);
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
(GtkSignalFunc) p_gradient_callback,
|
||||
|
|
|
@ -34,16 +34,14 @@
|
|||
* - optimization
|
||||
*
|
||||
*/
|
||||
#include <math.h>
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif /* M_PI */
|
||||
#include "libgimp/gimpmath.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#define ENTRY_WIDTH 100
|
||||
|
||||
|
@ -120,13 +118,15 @@ static void query ()
|
|||
static gint nargs = sizeof (args) / sizeof (args[0]);
|
||||
static gint nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("plug_in_sel_gauss",
|
||||
"Applies a selective gaussian blur to the specified drawable.",
|
||||
"This filter functions similar to the regular gaussian blur filter except that neighbouring pixels that differ more than the given maxdelta parameter will not be blended with. This way with the correct parameters, an image can be smoothed out without losing details. However, this filter can be rather slow.",
|
||||
_("Applies a selective gaussian blur to the specified drawable."),
|
||||
_("This filter functions similar to the regular gaussian blur filter except that neighbouring pixels that differ more than the given maxdelta parameter will not be blended with. This way with the correct parameters, an image can be smoothed out without losing details. However, this filter can be rather slow."),
|
||||
"Thom van Os",
|
||||
"Thom van Os",
|
||||
"1999",
|
||||
"<Image>/Filters/Blur/Selective Gaussian Blur...",
|
||||
N_("<Image>/Filters/Blur/Selective Gaussian Blur..."),
|
||||
"RGB*, GRAY*",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -151,6 +151,8 @@ static void run (
|
|||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
values[0].type = PARAM_STATUS;
|
||||
values[0].data.d_status = status;
|
||||
|
||||
|
@ -201,7 +203,7 @@ static void run (
|
|||
if (gimp_drawable_is_rgb (drawable->id) ||
|
||||
gimp_drawable_is_gray (drawable->id)) {
|
||||
|
||||
gimp_progress_init ("Selective Gaussian Blur");
|
||||
gimp_progress_init (_("Selective Gaussian Blur"));
|
||||
|
||||
radius = fabs (bvals.radius) + 1.0;
|
||||
|
||||
|
@ -216,7 +218,7 @@ static void run (
|
|||
if (run_mode != RUN_NONINTERACTIVE)
|
||||
gimp_displays_flush ();
|
||||
} else {
|
||||
gimp_message ("sel_gauss: cannot operate on indexed color images");
|
||||
gimp_message (_("sel_gauss: Cannot operate on indexed color images"));
|
||||
status = STATUS_EXECUTION_ERROR;
|
||||
}
|
||||
|
||||
|
@ -246,7 +248,7 @@ static gint sel_gauss_dialog ()
|
|||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Selective Gaussian Blur");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Selective Gaussian Blur"));
|
||||
gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE);
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) sel_gauss_close_callback, NULL);
|
||||
|
@ -259,7 +261,7 @@ static gint sel_gauss_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) sel_gauss_ok_callback,
|
||||
|
@ -268,7 +270,7 @@ static gint sel_gauss_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,
|
||||
|
@ -277,7 +279,7 @@ static gint sel_gauss_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,
|
||||
|
@ -289,7 +291,7 @@ static gint sel_gauss_dialog ()
|
|||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new ("Blur Radius: ");
|
||||
label = gtk_label_new (_("Blur Radius: "));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -306,7 +308,7 @@ static gint sel_gauss_dialog ()
|
|||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new ("Max. delta: ");
|
||||
label = gtk_label_new (_("Max. delta: "));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -337,7 +339,7 @@ void init_matrix(gdouble radius, gdouble **mat, gint num)
|
|||
|
||||
/* This formula isn't really correct, but it'll do */
|
||||
sd = radius / 3.329042969;
|
||||
c1 = 1.0 / sqrt(2.0 * M_PI * sd);
|
||||
c1 = 1.0 / sqrt(2.0 * G_PI * sd);
|
||||
c2 = -2.0 * (sd * sd);
|
||||
|
||||
for (dy=0; dy<num; dy++) {
|
||||
|
|
|
@ -22,14 +22,16 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "dialog_f.h"
|
||||
#include "dialog_i.h"
|
||||
|
@ -161,14 +163,16 @@ static void query () {
|
|||
static GParamDef *return_vals = NULL;
|
||||
static int nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
/* Install a procedure in the procedure database. */
|
||||
gimp_install_procedure ("plug_in_unsharp_mask",
|
||||
"An unsharp mask filter",
|
||||
"Long description / help",
|
||||
_("An unsharp mask filter"),
|
||||
"",
|
||||
"Winston Chang <wchang3@students.wisc.edu>",
|
||||
"Winston Chang",
|
||||
"1999",
|
||||
"<Image>/Filters/Enhance/Unsharp Mask",
|
||||
N_("<Image>/Filters/Enhance/Unsharp Mask..."),
|
||||
"GRAY*, RGB*",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -196,6 +200,8 @@ static void run(char *name, int nparams, GParam *param, int *nreturn_vals,
|
|||
*return_vals = values;
|
||||
*nreturn_vals = 1;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
switch (run_mode) {
|
||||
case RUN_INTERACTIVE:
|
||||
gimp_get_data ("plug_in_unsharp_mask", &unsharp_params);
|
||||
|
@ -264,7 +270,7 @@ static void unsharp_mask(GDrawable *drawable, gint radius, gdouble amount) {
|
|||
|
||||
/* Get the input */
|
||||
gimp_drawable_mask_bounds(drawable->id, &x1, &y1, &x2, &y2);
|
||||
gimp_progress_init("Blurring...");
|
||||
gimp_progress_init(_("Blurring..."));
|
||||
|
||||
/* generate convolution matrix */
|
||||
cmatrix_length = gen_convolve_matrix(radius, &cmatrix);
|
||||
|
@ -371,7 +377,7 @@ static void unsharp_region (GPixelRgn srcPR, GPixelRgn destPR,
|
|||
if (col%5 == 0) gimp_progress_update((gdouble)col/(3*x) + 0.33);
|
||||
}
|
||||
|
||||
gimp_progress_init("Merging...");
|
||||
gimp_progress_init(_("Merging..."));
|
||||
|
||||
/* find integer value of threshold */
|
||||
threshold = unsharp_params.threshold;
|
||||
|
@ -724,7 +730,7 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
gint argc = 1;
|
||||
gchar** argv = g_new(gchar*, 1);
|
||||
argv[0] = g_strdup("unsharp mask");
|
||||
argv[0] = g_strdup("unsharp_mask");
|
||||
|
||||
/* initialize */
|
||||
gtk_init(&argc, &argv);
|
||||
|
@ -736,10 +742,10 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
/* create a new window */
|
||||
window = gtk_dialog_new();
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Unsharp Mask " PLUG_IN_VERSION);
|
||||
gtk_window_set_title(GTK_WINDOW(window), _("Unsharp Mask"));
|
||||
/* I have no idea what the following two lines do.
|
||||
I took them from sharpen.c */
|
||||
gtk_window_set_wmclass(GTK_WINDOW(window), "unsharp mask", "Gimp");
|
||||
gtk_window_set_wmclass(GTK_WINDOW(window), "unsharp_mask", "Gimp");
|
||||
gtk_window_position(GTK_WINDOW(window), GTK_WIN_POS_MOUSE);
|
||||
|
||||
|
||||
|
@ -758,11 +764,11 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
|
||||
/* create each of the inputs */
|
||||
dialog_create_value_f("Radius:", GTK_TABLE(table), 1, &unsharp_params.radius,
|
||||
dialog_create_value_f(_("Radius:"), GTK_TABLE(table), 1, &unsharp_params.radius,
|
||||
0.1, 1, 1.0, 25.0);
|
||||
dialog_create_value_f("Amount:", GTK_TABLE(table), 2, &unsharp_params.amount,
|
||||
dialog_create_value_f(_("Amount:"), GTK_TABLE(table), 2, &unsharp_params.amount,
|
||||
0.01, 2, 0.01, 5.0);
|
||||
dialog_create_value_i("Threshold:", GTK_TABLE(table), 3, &unsharp_params.threshold,
|
||||
dialog_create_value_i(_("Threshold:"), GTK_TABLE(table), 3, &unsharp_params.threshold,
|
||||
1, 0, 255);
|
||||
|
||||
|
||||
|
@ -778,7 +784,7 @@ static gint unsharp_mask_dialog()
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (window)->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) unsharp_ok_callback,
|
||||
|
@ -787,7 +793,7 @@ static gint unsharp_mask_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 (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) unsharp_cancel_callback,
|
||||
|
|
|
@ -1355,10 +1355,25 @@ script_fu_interface (SFScript *script)
|
|||
gtk_widget_show (frame);
|
||||
|
||||
/* Action area */
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), hbox, FALSE, TRUE, 0);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), bbox, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) script_fu_about_callback,
|
||||
title);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (bbox);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
|
@ -1377,15 +1392,8 @@ script_fu_interface (SFScript *script)
|
|||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) script_fu_about_callback,
|
||||
title);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (bbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The statusbar (well it's a faked statusbar...) */
|
||||
sf_interface.status = gtk_entry_new ();
|
||||
|
@ -1762,7 +1770,7 @@ script_fu_about_callback (GtkWidget *widget,
|
|||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 6);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 2);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
@ -1860,6 +1868,7 @@ script_fu_about_callback (GtkWidget *widget,
|
|||
gtk_text_thaw (GTK_TEXT (text));
|
||||
|
||||
/* action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
|
|
|
@ -1355,10 +1355,25 @@ script_fu_interface (SFScript *script)
|
|||
gtk_widget_show (frame);
|
||||
|
||||
/* Action area */
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), hbox, FALSE, TRUE, 0);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (main_box), bbox, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) script_fu_about_callback,
|
||||
title);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (bbox);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
|
@ -1377,15 +1392,8 @@ script_fu_interface (SFScript *script)
|
|||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) script_fu_about_callback,
|
||||
title);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (bbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The statusbar (well it's a faked statusbar...) */
|
||||
sf_interface.status = gtk_entry_new ();
|
||||
|
@ -1762,7 +1770,7 @@ script_fu_about_callback (GtkWidget *widget,
|
|||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 6);
|
||||
gtk_container_border_width (GTK_CONTAINER (frame), 2);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
@ -1860,6 +1868,7 @@ script_fu_about_callback (GtkWidget *widget,
|
|||
gtk_text_thaw (GTK_TEXT (text));
|
||||
|
||||
/* action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
|
||||
button = gtk_button_new_with_label (_("Close"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
|
|
|
@ -11,6 +11,9 @@ unsharp_SOURCES = \
|
|||
dialog_i.c \
|
||||
unsharp.c
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DLOCALEDIR=\""$(localedir)"\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
|
|
|
@ -22,14 +22,16 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "dialog_f.h"
|
||||
#include "dialog_i.h"
|
||||
|
@ -161,14 +163,16 @@ static void query () {
|
|||
static GParamDef *return_vals = NULL;
|
||||
static int nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
/* Install a procedure in the procedure database. */
|
||||
gimp_install_procedure ("plug_in_unsharp_mask",
|
||||
"An unsharp mask filter",
|
||||
"Long description / help",
|
||||
_("An unsharp mask filter"),
|
||||
"",
|
||||
"Winston Chang <wchang3@students.wisc.edu>",
|
||||
"Winston Chang",
|
||||
"1999",
|
||||
"<Image>/Filters/Enhance/Unsharp Mask",
|
||||
N_("<Image>/Filters/Enhance/Unsharp Mask..."),
|
||||
"GRAY*, RGB*",
|
||||
PROC_PLUG_IN,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -196,6 +200,8 @@ static void run(char *name, int nparams, GParam *param, int *nreturn_vals,
|
|||
*return_vals = values;
|
||||
*nreturn_vals = 1;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
switch (run_mode) {
|
||||
case RUN_INTERACTIVE:
|
||||
gimp_get_data ("plug_in_unsharp_mask", &unsharp_params);
|
||||
|
@ -264,7 +270,7 @@ static void unsharp_mask(GDrawable *drawable, gint radius, gdouble amount) {
|
|||
|
||||
/* Get the input */
|
||||
gimp_drawable_mask_bounds(drawable->id, &x1, &y1, &x2, &y2);
|
||||
gimp_progress_init("Blurring...");
|
||||
gimp_progress_init(_("Blurring..."));
|
||||
|
||||
/* generate convolution matrix */
|
||||
cmatrix_length = gen_convolve_matrix(radius, &cmatrix);
|
||||
|
@ -371,7 +377,7 @@ static void unsharp_region (GPixelRgn srcPR, GPixelRgn destPR,
|
|||
if (col%5 == 0) gimp_progress_update((gdouble)col/(3*x) + 0.33);
|
||||
}
|
||||
|
||||
gimp_progress_init("Merging...");
|
||||
gimp_progress_init(_("Merging..."));
|
||||
|
||||
/* find integer value of threshold */
|
||||
threshold = unsharp_params.threshold;
|
||||
|
@ -724,7 +730,7 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
gint argc = 1;
|
||||
gchar** argv = g_new(gchar*, 1);
|
||||
argv[0] = g_strdup("unsharp mask");
|
||||
argv[0] = g_strdup("unsharp_mask");
|
||||
|
||||
/* initialize */
|
||||
gtk_init(&argc, &argv);
|
||||
|
@ -736,10 +742,10 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
/* create a new window */
|
||||
window = gtk_dialog_new();
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Unsharp Mask " PLUG_IN_VERSION);
|
||||
gtk_window_set_title(GTK_WINDOW(window), _("Unsharp Mask"));
|
||||
/* I have no idea what the following two lines do.
|
||||
I took them from sharpen.c */
|
||||
gtk_window_set_wmclass(GTK_WINDOW(window), "unsharp mask", "Gimp");
|
||||
gtk_window_set_wmclass(GTK_WINDOW(window), "unsharp_mask", "Gimp");
|
||||
gtk_window_position(GTK_WINDOW(window), GTK_WIN_POS_MOUSE);
|
||||
|
||||
|
||||
|
@ -758,11 +764,11 @@ static gint unsharp_mask_dialog()
|
|||
|
||||
|
||||
/* create each of the inputs */
|
||||
dialog_create_value_f("Radius:", GTK_TABLE(table), 1, &unsharp_params.radius,
|
||||
dialog_create_value_f(_("Radius:"), GTK_TABLE(table), 1, &unsharp_params.radius,
|
||||
0.1, 1, 1.0, 25.0);
|
||||
dialog_create_value_f("Amount:", GTK_TABLE(table), 2, &unsharp_params.amount,
|
||||
dialog_create_value_f(_("Amount:"), GTK_TABLE(table), 2, &unsharp_params.amount,
|
||||
0.01, 2, 0.01, 5.0);
|
||||
dialog_create_value_i("Threshold:", GTK_TABLE(table), 3, &unsharp_params.threshold,
|
||||
dialog_create_value_i(_("Threshold:"), GTK_TABLE(table), 3, &unsharp_params.threshold,
|
||||
1, 0, 255);
|
||||
|
||||
|
||||
|
@ -778,7 +784,7 @@ static gint unsharp_mask_dialog()
|
|||
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (window)->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) unsharp_ok_callback,
|
||||
|
@ -787,7 +793,7 @@ static gint unsharp_mask_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 (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) unsharp_cancel_callback,
|
||||
|
|
|
@ -11,6 +11,9 @@ libexec_PROGRAMS = webbrowser
|
|||
webbrowser_SOURCES = \
|
||||
webbrowser.c
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DLOCALEDIR=\""$(localedir)"\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -45,6 +46,7 @@
|
|||
|
||||
#include "gtk/gtk.h"
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
/* Browser program name -- start in case it's not already running */
|
||||
#define BROWSER_PROGNAME "netscape"
|
||||
|
@ -111,13 +113,15 @@ query ()
|
|||
static GParamDef *return_vals = NULL;
|
||||
static int nreturn_vals = 0;
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("extension_web_browser",
|
||||
"open URL in Netscape",
|
||||
"You need to have Netscape installed",
|
||||
_("open URL in Netscape"),
|
||||
_("You need to have Netscape installed"),
|
||||
"Misha Dynin <misha@xcf.berkeley.edu>",
|
||||
"Misha Dynin, Jamie Zawinski, Spencer Kimball & Peter Mattis",
|
||||
"1997",
|
||||
"<Toolbox>/Xtns/Web Browser/Open URL...",
|
||||
_("<Toolbox>/Xtns/Web Browser/Open URL..."),
|
||||
NULL,
|
||||
PROC_EXTENSION,
|
||||
nargs, nreturn_vals,
|
||||
|
@ -149,6 +153,7 @@ run (char *name,
|
|||
switch (run_mode)
|
||||
{
|
||||
case RUN_INTERACTIVE:
|
||||
INIT_I18N_UI ();
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("extension_web_browser", &url_info);
|
||||
|
||||
|
@ -189,7 +194,7 @@ run (char *name,
|
|||
values[0].data.d_status = STATUS_EXECUTION_ERROR;
|
||||
}
|
||||
else
|
||||
g_assert (FALSE);
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -231,6 +236,7 @@ static gint
|
|||
open_url_dialog ()
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *button;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *table;
|
||||
|
@ -251,37 +257,46 @@ open_url_dialog ()
|
|||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Open URL");
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Open URL"));
|
||||
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
|
||||
(GtkSignalFunc) close_callback, NULL);
|
||||
/* action area */
|
||||
/* Okay buton */
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
|
||||
/* Action area */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
|
||||
button = gtk_button_new_with_label (_("About"));
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
(GtkSignalFunc) about_callback,
|
||||
dlg);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
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"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) ok_callback,
|
||||
dlg);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
||||
/* cancel button */
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (dlg));
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* about button */
|
||||
button = gtk_button_new_with_label ("About...");
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0);
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) about_callback,
|
||||
dlg);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* table */
|
||||
|
@ -294,7 +309,7 @@ open_url_dialog ()
|
|||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
|
||||
/* URL: Label */
|
||||
label = gtk_label_new ("URL:");
|
||||
label = gtk_label_new (_("URL:"));
|
||||
gtk_table_attach (GTK_TABLE (table), label,
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL,
|
||||
|
@ -317,7 +332,7 @@ open_url_dialog ()
|
|||
gtk_widget_show (entry);
|
||||
|
||||
/* Window label */
|
||||
label = gtk_label_new ("Window:");
|
||||
label = gtk_label_new (_("Window:"));
|
||||
gtk_table_attach( GTK_TABLE (table), label ,
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL,
|
||||
|
@ -326,9 +341,9 @@ open_url_dialog ()
|
|||
gtk_widget_show(label);
|
||||
|
||||
/* Window radiobutton */
|
||||
button1 = gtk_radio_button_new_with_label( NULL, "new");
|
||||
button1 = gtk_radio_button_new_with_label( NULL, _("New"));
|
||||
group = gtk_radio_button_group( GTK_RADIO_BUTTON( button1 ) );
|
||||
button2 = gtk_radio_button_new_with_label( group, "current" );
|
||||
button2 = gtk_radio_button_new_with_label( group, _("Current"));
|
||||
if( url_info.new_window == OPEN_URL_NEW_WINDOW ) {
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button1),TRUE);
|
||||
} else {
|
||||
|
|
|
@ -91,6 +91,7 @@ plug-ins/common/psp.c
|
|||
plug-ins/common/rotate.c
|
||||
plug-ins/common/sample_colorize.c
|
||||
plug-ins/common/screenshot.c
|
||||
plug-ins/common/sel_gauss.c
|
||||
plug-ins/common/spheredesigner.c
|
||||
plug-ins/common/sunras.c
|
||||
plug-ins/common/threshold_alpha.c
|
||||
|
@ -205,6 +206,8 @@ plug-ins/sel2path/sel2path.c
|
|||
plug-ins/sgi/sgi.c
|
||||
plug-ins/sinus/sinus.c
|
||||
plug-ins/struc/struc.c
|
||||
plug-ins/unsharp/unsharp.c
|
||||
plug-ins/webbrowser/webbrowser.c
|
||||
libgimp/gimpcolorbutton.c
|
||||
libgimp/gimpexport.c
|
||||
libgimp/gimpfileselection.c
|
||||
|
|
Loading…
Reference in New Issue