dialog layout and i18n

--Sven
This commit is contained in:
Sven Neumann
1999-12-27 16:18:06 +00:00
parent aa79cb37f1
commit d3315b90e2
12 changed files with 234 additions and 273 deletions

View File

@ -1,3 +1,16 @@
Mon Dec 27 17:16:14 CET 1999 Sven Neumann <sven@gimp.org>
* plug-ins/common/grid.c
* plug-ins/fp/fp.c
* plug-ins/fp/fp.h
* plug-ins/fp/fp_gtk.c
* plug-ins/gap/gap_decode_mpeg_main.c
* plug-ins/rcm/rcm.c
* plug-ins/rcm/rcm_callback.c
* plug-ins/rcm/rcm_dialog.c
* plug-ins/rcm/rcm_gdk.c
* po-plug-ins/POTFILES.in: dialog layout and i18n
Mon Dec 27 15:11:53 CET 1999 Sven Neumann <sven@gimp.org>
* plug-ins/flame/flame.c: worked on the dialog layout

View File

@ -2,6 +2,7 @@
#include <stdlib.h>
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#include "fp.h"
#include "fp_hsv.h"
@ -57,13 +58,14 @@ query ()
int nargs = sizeof (args) / sizeof (args[0]);
int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_filter_pack",
"Allows the user to change H, S, or C with many previews",
"Then something else here",
_("Allows the user to change H, S, or C with many previews"),
_("No help available"),
"Pavel Grinfeld (pavel@ml.com)",
"Pavel Grinfeld (pavel@ml.com)",
"27th March 1997",
"<Image>/Image/Colors/Filter Pack...",
N_("<Image>/Image/Colors/Filter Pack..."),
"RGB*,INDEXED*,GRAY*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -84,6 +86,8 @@ run (char *name,
*nreturn_vals = 1;
*return_vals = values;
INIT_I18N_UI();
values[0].type = PARAM_STATUS;
values[0].data.d_status = status;
@ -93,13 +97,13 @@ run (char *name,
mask=gimp_drawable_get(gimp_image_get_selection(param[1].data.d_image));
if (gimp_drawable_is_indexed (drawable->id) ||gimp_drawable_is_gray (drawable->id) ) {
ErrorMessage("Convert the image to RGB first!");
gimp_message (_("Convert the image to RGB first!"));
status = STATUS_EXECUTION_ERROR;
}
else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{
gimp_progress_init ("Applying the Filter Pack...");
gimp_progress_init (_("Applying the Filter Pack..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
fp (drawable);
gimp_displays_flush ();
@ -237,45 +241,3 @@ void fp (GDrawable *drawable)
free (dest_row);
}
void
ErrorMessage(guchar *message)
{
GtkWidget *window, *label, *button,*table;
gchar **argv=g_new (gchar *, 1);
gint argc=1;
argv[0] = g_strdup ("fp");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc());
window=gtk_dialog_new();
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_window_set_title(GTK_WINDOW(window),"Filter Pack Simulation Message");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) fp_close_callback,
NULL);
button = gtk_button_new_with_label ("Got It!");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) fp_ok_callback,
window);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button, TRUE, TRUE, 0);
table=gtk_table_new(2,2,FALSE);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),table,TRUE,TRUE,0);
gtk_widget_show(table);
label=gtk_label_new("");
gtk_label_set_text(GTK_LABEL(label),message);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table),label,0,1,0,1,
GTK_FILL|GTK_EXPAND,GTK_FILL|GTK_EXPAND,15,15);
gtk_widget_show(window);
gtk_main ();
}

View File

@ -122,6 +122,8 @@ void query (void)
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_grid",
_("Draws a grid."),
_("no help available"),

View File

@ -2,6 +2,7 @@
#include <stdlib.h>
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#include "fp.h"
#include "fp_hsv.h"
@ -57,13 +58,14 @@ query ()
int nargs = sizeof (args) / sizeof (args[0]);
int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug_in_filter_pack",
"Allows the user to change H, S, or C with many previews",
"Then something else here",
_("Allows the user to change H, S, or C with many previews"),
_("No help available"),
"Pavel Grinfeld (pavel@ml.com)",
"Pavel Grinfeld (pavel@ml.com)",
"27th March 1997",
"<Image>/Image/Colors/Filter Pack...",
N_("<Image>/Image/Colors/Filter Pack..."),
"RGB*,INDEXED*,GRAY*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -84,6 +86,8 @@ run (char *name,
*nreturn_vals = 1;
*return_vals = values;
INIT_I18N_UI();
values[0].type = PARAM_STATUS;
values[0].data.d_status = status;
@ -93,13 +97,13 @@ run (char *name,
mask=gimp_drawable_get(gimp_image_get_selection(param[1].data.d_image));
if (gimp_drawable_is_indexed (drawable->id) ||gimp_drawable_is_gray (drawable->id) ) {
ErrorMessage("Convert the image to RGB first!");
gimp_message (_("Convert the image to RGB first!"));
status = STATUS_EXECUTION_ERROR;
}
else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{
gimp_progress_init ("Applying the Filter Pack...");
gimp_progress_init (_("Applying the Filter Pack..."));
gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1));
fp (drawable);
gimp_displays_flush ();
@ -237,45 +241,3 @@ void fp (GDrawable *drawable)
free (dest_row);
}
void
ErrorMessage(guchar *message)
{
GtkWidget *window, *label, *button,*table;
gchar **argv=g_new (gchar *, 1);
gint argc=1;
argv[0] = g_strdup ("fp");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc());
window=gtk_dialog_new();
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_window_set_title(GTK_WINDOW(window),"Filter Pack Simulation Message");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) fp_close_callback,
NULL);
button = gtk_button_new_with_label ("Got It!");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) fp_ok_callback,
window);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button, TRUE, TRUE, 0);
table=gtk_table_new(2,2,FALSE);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),table,TRUE,TRUE,0);
gtk_widget_show(table);
label=gtk_label_new("");
gtk_label_set_text(GTK_LABEL(label),message);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table),label,0,1,0,1,
GTK_FILL|GTK_EXPAND,GTK_FILL|GTK_EXPAND,15,15);
gtk_widget_show(window);
gtk_main ();
}

View File

@ -1,9 +1,9 @@
#define MAX_PREVIEW_SIZE 125
#define MAX_ROUGHNESS 128
#define RANGE_HEIGHT 15
#define PR_BX_BRDR 10
#define PR_BX_BRDR 4
#define ALL 255
#define MARGIN 5
#define MARGIN 4
#define RANGE_ADJUST_MASK GDK_EXPOSURE_MASK | \
GDK_ENTER_NOTIFY_MASK | \
@ -212,7 +212,6 @@ gint FP_Range_Change_Events (GtkWidget *,
void As_You_Drag (GtkWidget *button);
void preview_size_scale_update (GtkAdjustment *adjustment,
float *scale_val);
void ErrorMessage (guchar *);
void fp_advanced_ok();

View File

@ -4,6 +4,7 @@
#include <math.h>
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#include "fp.h"
#include "fp_hsv.h"
@ -59,7 +60,7 @@ GtkWidget *fp_create_bna(void)
frame = gtk_frame_new ("Before And After");
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
/* All the previews */
alabel=gtk_label_new("Current:");
@ -71,7 +72,7 @@ GtkWidget *fp_create_bna(void)
gtk_misc_set_alignment(GTK_MISC(blabel), 0.0, 0.5);
table=gtk_table_new(2,2,FALSE);
gtk_container_border_width(GTK_CONTAINER(table),10);
gtk_container_border_width(GTK_CONTAINER(table), 4);
gtk_table_set_row_spacings(GTK_TABLE(table),0);
gtk_table_set_col_spacings(GTK_TABLE(table),20);
@ -124,13 +125,13 @@ GtkWidget *fp_create_circle_palette(void)
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show (frame);
table = gtk_table_new(11,11,FALSE);
gtk_container_border_width(GTK_CONTAINER(table),0);
gtk_table_set_row_spacings(GTK_TABLE(table),0);
gtk_table_set_col_spacings(GTK_TABLE(table),3);
gtk_table_set_col_spacings(GTK_TABLE(table),2);
gtk_widget_show (table);
gtk_container_add (GTK_CONTAINER (frame), table);
@ -143,13 +144,13 @@ GtkWidget *fp_create_circle_palette(void)
Create_A_Preview(&mPreview,&mFrame, reduced->width, reduced->height);
Create_A_Preview(&centerPreview,&centerFrame, reduced->width, reduced->height);
Create_A_Table_Entry(&rVbox,rFrame,"Red:");
Create_A_Table_Entry(&gVbox,gFrame,"Green:");
Create_A_Table_Entry(&bVbox,bFrame,"Blue:");
Create_A_Table_Entry(&cVbox,cFrame,"Cyan:");
Create_A_Table_Entry(&yVbox,yFrame,"Yellow:");
Create_A_Table_Entry(&mVbox,mFrame,"Magenta:");
Create_A_Table_Entry(&centerVbox,centerFrame,"Current:");
Create_A_Table_Entry(&rVbox,rFrame, N_("Red:"));
Create_A_Table_Entry(&gVbox,gFrame, N_("Green:"));
Create_A_Table_Entry(&bVbox,bFrame, N_("Blue:"));
Create_A_Table_Entry(&cVbox,cFrame, N_("Cyan:"));
Create_A_Table_Entry(&yVbox,yFrame, N_("Yellow:"));
Create_A_Table_Entry(&mVbox,mFrame, N_("Magenta:"));
Create_A_Table_Entry(&centerVbox,centerFrame, N_("Current:"));
gtk_table_attach( GTK_TABLE(table), rVbox,8,11,4,7,
GTK_EXPAND , GTK_EXPAND,0,0);
@ -167,7 +168,7 @@ GtkWidget *fp_create_circle_palette(void)
GTK_EXPAND, GTK_EXPAND,0,0);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win),"Hue Variations");
gtk_window_set_title(GTK_WINDOW(win), _("Hue Variations"));
gtk_container_add(GTK_CONTAINER(win),frame);
gtk_signal_connect(GTK_OBJECT(win), "delete_event",
(GtkSignalFunc)sub_dialog_destroy, NULL);
@ -180,9 +181,9 @@ GtkWidget *fp_create_rough(void)
GtkWidget *frame, *scale, *vbox;
GtkObject *data;
frame = gtk_frame_new ("Roughness");
frame = gtk_frame_new (_("Roughness"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show (frame);
data = gtk_adjustment_new (Current.Rough,
@ -198,9 +199,9 @@ GtkWidget *fp_create_rough(void)
&Current.Rough);
gtk_widget_show (scale);
vbox=gtk_vbox_new(FALSE,5);
vbox=gtk_vbox_new(FALSE,4);
gtk_widget_show(vbox);
gtk_box_pack_start (GTK_BOX(vbox), scale,TRUE,TRUE,5);
gtk_box_pack_start (GTK_BOX(vbox), scale,TRUE,TRUE,4);
gtk_container_add (GTK_CONTAINER(frame), vbox);
return frame;
@ -211,27 +212,27 @@ GtkWidget *fp_create_range(void)
GtkWidget *frame, *vbox;
GSList *group=NULL;
frame = gtk_frame_new ("Affected Range");
frame = gtk_frame_new (_("Affected Range"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show (frame);
/********THE THREE RANGES*************/
vbox=gtk_vbox_new(FALSE,5);
vbox=gtk_vbox_new(FALSE,4);
gtk_container_add(GTK_CONTAINER(frame),vbox);
gtk_container_border_width(GTK_CONTAINER(vbox),5);
gtk_container_border_width(GTK_CONTAINER(vbox),4);
gtk_widget_show(vbox);
group=Button_In_A_Box(vbox,group,"Shadows",
group=Button_In_A_Box(vbox,group, _("Shadows"),
(GtkSignalFunc) fp_change_current_range,
ShMidHi+SHADOWS,
Current.Range==SHADOWS);
group=Button_In_A_Box(vbox,group,"Midtones",
group=Button_In_A_Box(vbox,group, _("Midtones"),
(GtkSignalFunc) fp_change_current_range,
ShMidHi+MIDTONES,
Current.Range==MIDTONES);
group=Button_In_A_Box(vbox,group,"Highlights",
group=Button_In_A_Box(vbox,group, _("Highlights"),
(GtkSignalFunc) fp_change_current_range,
ShMidHi+HIGHLIGHTS,
Current.Range==HIGHLIGHTS);
@ -247,31 +248,31 @@ GtkWidget *fp_create_control(void)
{
GtkWidget *frame, *box;
frame = gtk_frame_new ("Windows");
frame = gtk_frame_new (_("Windows"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show (frame);
/********THE THREE RANGES*************/
box=gtk_vbox_new(FALSE,5);
box=gtk_vbox_new(FALSE,4);
gtk_container_add(GTK_CONTAINER(frame),box);
gtk_container_border_width(GTK_CONTAINER(box),5);
gtk_container_border_width(GTK_CONTAINER(box),4);
gtk_widget_show(box);
Frames_Check_Button_In_A_Box(box,"Hue",
Frames_Check_Button_In_A_Box(box, _("Hue"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.palette,
Current.VisibleFrames&HUE);
Frames_Check_Button_In_A_Box(box,"Saturation",
Frames_Check_Button_In_A_Box(box, _("Saturation"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.satur,
Current.VisibleFrames&SATURATION);
Frames_Check_Button_In_A_Box(box,"Value",
Frames_Check_Button_In_A_Box(box, _("Value"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.lnd,
Current.VisibleFrames&VALUE);
Frames_Check_Button_In_A_Box(box,"Advanced",
Frames_Check_Button_In_A_Box(box, _("Advanced"),
(GtkSignalFunc) fp_show_hide_frame,
AW.window,
FALSE);
@ -289,19 +290,19 @@ GtkWidget *fp_create_lnd()
Create_A_Preview(&middlePreview,&middleFrame, reduced->width, reduced->height);
Create_A_Preview(&darkerPreview,&darkerFrame, reduced->width, reduced->height);
Create_A_Table_Entry(&lighterVbox,lighterFrame,"Lighter:");
Create_A_Table_Entry(&middleVbox,middleFrame,"Current:");
Create_A_Table_Entry(&darkerVbox,darkerFrame,"Darker:");
Create_A_Table_Entry(&lighterVbox,lighterFrame, N_("Lighter:"));
Create_A_Table_Entry(&middleVbox,middleFrame, N_("Current:"));
Create_A_Table_Entry(&darkerVbox,darkerFrame, N_("Darker:"));
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show (frame);
table = gtk_table_new(1,11,FALSE);
gtk_container_border_width(GTK_CONTAINER(table),0);
gtk_table_set_row_spacings(GTK_TABLE(table),0);
gtk_table_set_col_spacings(GTK_TABLE(table),3);
gtk_table_set_col_spacings(GTK_TABLE(table),2);
gtk_widget_show (table);
@ -314,7 +315,7 @@ GtkWidget *fp_create_lnd()
gtk_container_add (GTK_CONTAINER (frame), table);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win),"Value Variations");
gtk_window_set_title(GTK_WINDOW(win), _("Value Variations"));
gtk_container_add(GTK_CONTAINER(win),frame);
gtk_signal_connect(GTK_OBJECT(win), "delete_event",
(GtkSignalFunc)sub_dialog_destroy, NULL);
@ -333,19 +334,19 @@ GtkWidget *fp_create_msnls()
Create_A_Preview(&SatPreview,&middleFrame, reduced->width, reduced->height);
Create_A_Preview(&plusSatPreview,&moreFrame, reduced->width, reduced->height);
Create_A_Table_Entry(&moreVbox,moreFrame,"More Sat:");
Create_A_Table_Entry(&middleVbox,middleFrame,"Current:");
Create_A_Table_Entry(&lessVbox,lessFrame,"Less Sat:");
Create_A_Table_Entry(&moreVbox,moreFrame, N_("More Sat:"));
Create_A_Table_Entry(&middleVbox,middleFrame, N_("Current:"));
Create_A_Table_Entry(&lessVbox,lessFrame, N_("Less Sat:"));
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show(frame);
table = gtk_table_new(1,11,FALSE);
gtk_container_border_width(GTK_CONTAINER(table),0);
gtk_table_set_row_spacings(GTK_TABLE(table),0);
gtk_table_set_col_spacings(GTK_TABLE(table),3);
gtk_table_set_col_spacings(GTK_TABLE(table),2);
gtk_widget_show (table);
@ -358,7 +359,7 @@ GtkWidget *fp_create_msnls()
gtk_container_add (GTK_CONTAINER (frame), table);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win),"Saturation Variations");
gtk_window_set_title(GTK_WINDOW(win), _("Saturation Variations"));
gtk_container_add(GTK_CONTAINER(win),frame);
gtk_signal_connect(GTK_OBJECT(win), "delete_event",
(GtkSignalFunc)sub_dialog_destroy, NULL);
@ -372,26 +373,26 @@ GtkWidget *fp_create_pixels_select_by()
GtkWidget *frame, *vbox;
GSList *group=NULL;
frame = gtk_frame_new ("Select Pixels By");
frame = gtk_frame_new (_("Select Pixels By"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 5);
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show(frame);
vbox=gtk_vbox_new(FALSE,5);
vbox=gtk_vbox_new(FALSE,4);
gtk_container_add(GTK_CONTAINER(frame),vbox);
gtk_container_border_width(GTK_CONTAINER(vbox),5);
gtk_container_border_width(GTK_CONTAINER(vbox),4);
gtk_widget_show(vbox);
group=Button_In_A_Box(vbox,group,"Hue",
group=Button_In_A_Box(vbox,group, _("Hue"),
(GtkSignalFunc) fp_change_current_pixels_by,
HueSatVal+0,
Current.ValueBy==BY_HUE);
group=Button_In_A_Box(vbox,group,"Saturation",
group=Button_In_A_Box(vbox,group, _("Saturation"),
(GtkSignalFunc) fp_change_current_pixels_by,
HueSatVal+1,
Current.ValueBy==BY_SAT);
group=Button_In_A_Box(vbox,group,"Value",
group=Button_In_A_Box(vbox,group, _("Value"),
(GtkSignalFunc) fp_change_current_pixels_by,
HueSatVal+2,
Current.ValueBy==BY_VAL);
@ -403,27 +404,27 @@ GtkWidget *fp_create_show()
GtkWidget *frame, *vbox;
GSList *group=NULL;
frame=gtk_frame_new("Show");
gtk_container_border_width (GTK_CONTAINER (frame), 5);
frame=gtk_frame_new(_("Show"));
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show(frame);
vbox=gtk_vbox_new(FALSE,5);
vbox=gtk_vbox_new(FALSE,4);
gtk_container_add(GTK_CONTAINER(frame),vbox);
gtk_container_border_width(GTK_CONTAINER(vbox),5);
gtk_container_border_width(GTK_CONTAINER(vbox),4);
gtk_widget_show(vbox);
group=Button_In_A_Box(vbox,group,"Entire Image",
group=Button_In_A_Box(vbox,group, _("Entire Image"),
(GtkSignalFunc) fp_entire_image,
&Current.SlctnOnly,
FALSE);
group=Button_In_A_Box(vbox,group,"Selection Only",
group=Button_In_A_Box(vbox,group, _("Selection Only"),
(GtkSignalFunc) fp_selection_only,
&Current.SlctnOnly,
TRUE);
group=Button_In_A_Box(vbox,group,"Selection In Context",
group=Button_In_A_Box(vbox,group, _("Selection In Context"),
(GtkSignalFunc) fp_selection_in_context,
&Current.SlctnOnly,
FALSE);
@ -435,22 +436,22 @@ GtkWidget *fp_create_frame_select()
{
GtkWidget *frame, *box;
frame=gtk_frame_new("Display");
gtk_container_border_width (GTK_CONTAINER (frame), 5);
frame=gtk_frame_new (_("Display"));
gtk_container_border_width (GTK_CONTAINER (frame), 4);
gtk_widget_show(frame);
box=gtk_hbox_new(FALSE,15);
box=gtk_hbox_new(FALSE,8);
gtk_container_add(GTK_CONTAINER(frame),box);
gtk_container_border_width(GTK_CONTAINER(box),5);
gtk_container_border_width(GTK_CONTAINER(box),4);
gtk_widget_show(box);
Check_Button_In_A_Box (box,"CirclePalette",
Check_Button_In_A_Box (box, _("CirclePalette"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.palette,TRUE);
Check_Button_In_A_Box (box,"Lighter And Darker",
Check_Button_In_A_Box (box, _("Lighter And Darker"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.lnd,TRUE);
Check_Button_In_A_Box (box,"Saturation",
Check_Button_In_A_Box (box, _("Saturation"),
(GtkSignalFunc) fp_show_hide_frame,
fpFrames.satur,FALSE);
return frame;
@ -536,14 +537,14 @@ void Frames_Check_Button_In_A_Box (GtkWidget *vbox,
void Create_A_Table_Entry (GtkWidget **box,
GtkWidget *SmallerFrame,
char *description)
GtkWidget *SmallerFrame,
char *description)
{
GtkWidget *label, *button, *table;
*box = gtk_vbox_new(FALSE,1);
gtk_container_border_width (GTK_CONTAINER (*box),PR_BX_BRDR);
gtk_widget_show (*box);
label = gtk_label_new(description);
label = gtk_label_new (gettext (description));
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
gtk_widget_show (label);
@ -555,7 +556,7 @@ void Create_A_Table_Entry (GtkWidget **box,
gtk_table_attach(GTK_TABLE(table),label,0,1,0,1,0,0,0,0);
if (strcmp(description,"Current:")) {
button = gtk_button_new();
button = gtk_button_new ();
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) selectionMade,
description);
@ -563,10 +564,10 @@ void Create_A_Table_Entry (GtkWidget **box,
gtk_container_add(GTK_CONTAINER(button),SmallerFrame);
gtk_container_border_width (GTK_CONTAINER (button),0);
gtk_widget_show(button);
gtk_table_attach(GTK_TABLE(table), button, 0,1,1,2,0,0,0,5);
gtk_table_attach(GTK_TABLE(table), button, 0,1,1,2,0,0,0,4);
}
else
gtk_table_attach(GTK_TABLE(table), SmallerFrame, 0,1,1,2,0,0,0,5);
gtk_table_attach(GTK_TABLE(table), SmallerFrame, 0,1,1,2,0,0,0,4);
}
void
@ -853,7 +854,7 @@ int fp_dialog()
/********************************************************************/
/************************* All the Standard Stuff *******************/
dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), "Filter Pack Simulation");
gtk_window_set_title (GTK_WINDOW (dlg), _("Filter Pack Simulation"));
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
(GtkSignalFunc) fp_close_callback,
NULL);
@ -866,7 +867,7 @@ int fp_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) fp_ok_callback,
@ -875,7 +876,7 @@ int fp_dialog()
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Reset");
button = gtk_button_new_with_label (_("Reset"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) resetFilterPacks,
@ -883,7 +884,7 @@ int fp_dialog()
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
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,
@ -1001,7 +1002,7 @@ preview_size_scale_update (GtkAdjustment *adjustment,
gint fp_advanced_dialog()
{
guchar *rangeNames[]={"Shadows:", "Midtones:", "Highlights:"};
guchar *rangeNames[] = { N_("Shadows:"), N_("Midtones:"), N_("Highlights:")};
GtkWidget *frame, *mainvbox;
GtkObject *smoothnessData;
GtkWidget *graphFrame, *table, *scale;
@ -1010,7 +1011,7 @@ gint fp_advanced_dialog()
int i;
AW.window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(AW.window),"Advanced Filter Pack Options");
gtk_window_set_title(GTK_WINDOW(AW.window), _("Advanced Filter Pack Options"));
gtk_signal_connect(GTK_OBJECT(AW.window), "delete_event",
(GtkSignalFunc)sub_dialog_destroy, NULL);
@ -1018,8 +1019,8 @@ gint fp_advanced_dialog()
gtk_container_add(GTK_CONTAINER(AW.window),mainvbox);
gtk_widget_show(mainvbox);
/************************************************************/
frame = gtk_frame_new("Smoothness of Aliasing");
gtk_container_border_width(GTK_CONTAINER(frame),10);
frame = gtk_frame_new (_("Smoothness of Aliasing"));
gtk_container_border_width(GTK_CONTAINER(frame),4);
gtk_widget_show(frame);
gtk_box_pack_start(GTK_BOX (mainvbox),frame, TRUE, TRUE,0);
@ -1035,7 +1036,7 @@ gint fp_advanced_dialog()
gtk_table_attach(GTK_TABLE(table),graphFrame,0,1,0,1,
GTK_EXPAND,
0,
10,10);
4,4);
vbox=gtk_vbox_new(FALSE,0);
gtk_widget_show(vbox);
@ -1059,18 +1060,18 @@ gint fp_advanced_dialog()
gtk_table_attach(GTK_TABLE(table),labelTable,0,1,1,2,
GTK_EXPAND,
0,
0,15);
0,8);
for (i=0; i<12; i++)
{
label=Current.rangeLabels[i]=gtk_label_new("-");
if (!(i%4)) {
gtk_label_set_text(GTK_LABEL(label),rangeNames[i/4]);
gtk_label_set_text(GTK_LABEL(label), gettext (rangeNames[i/4]));
gtk_misc_set_alignment(GTK_MISC(label),0.0,1.0);
}
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(labelTable),label,i%4, i%4+1,i/4, i/4+1,
GTK_EXPAND|GTK_FILL,0,5,0);
GTK_EXPAND|GTK_FILL,0,4,0);
}
/************************************************************/
/************************************************************/
@ -1106,15 +1107,15 @@ gint fp_advanced_dialog()
(GtkSignalFunc) fp_scale_update,
&Current.Alias);
gtk_widget_show (scale);
gtk_table_attach(GTK_TABLE(table),scale,0,1,2,3,0,0,0,15);
gtk_table_attach(GTK_TABLE(table),scale,0,1,2,3,0,0,0,8);
/************************************************************/
/******************* MISC OPTIONS ***************************/
/************************************************************/
optionsFrame=gtk_frame_new("Miscellaneous Options");
gtk_container_border_width(GTK_CONTAINER(optionsFrame),10);
optionsFrame=gtk_frame_new (_("Miscellaneous Options"));
gtk_container_border_width(GTK_CONTAINER(optionsFrame),4);
gtk_widget_show(optionsFrame);
gtk_box_pack_start(GTK_BOX(mainvbox),optionsFrame, TRUE, TRUE,0);
@ -1124,17 +1125,17 @@ gint fp_advanced_dialog()
gtk_container_add(GTK_CONTAINER(optionsFrame),table);
vbox=gtk_vbox_new(FALSE,8);
gtk_container_border_width(GTK_CONTAINER(vbox),10);
gtk_container_border_width(GTK_CONTAINER(vbox),4);
gtk_widget_show(vbox);
gtk_table_attach(GTK_TABLE(table),vbox,0,1,0,1,0,0,5,5);
gtk_table_attach(GTK_TABLE(table),vbox,0,1,0,1,0,0,4,4);
Check_Button_In_A_Box (vbox,"Preview As You Drag",
Check_Button_In_A_Box (vbox, _("Preview As You Drag"),
(GtkSignalFunc) As_You_Drag,
NULL,TRUE);
frame=gtk_frame_new("Preview Size");
frame=gtk_frame_new (_("Preview Size"));
gtk_widget_show(frame);
gtk_container_border_width(GTK_CONTAINER(frame),10);
gtk_container_border_width(GTK_CONTAINER(frame),4);
smoothnessData = gtk_adjustment_new (Current.PreviewSize,
50, MAX_PREVIEW_SIZE,
@ -1151,7 +1152,7 @@ gint fp_advanced_dialog()
(GtkSignalFunc) preview_size_scale_update,
&Current.PreviewSize);
gtk_widget_show (scale);
gtk_table_attach(GTK_TABLE(table),frame,0,1,1,2,GTK_FILL,0,5,5);
gtk_table_attach(GTK_TABLE(table),frame,0,1,1,2,GTK_FILL,0,4,4);
return 1;
}

View File

@ -80,7 +80,6 @@
#include "gtk/gtk.h"
#include "config.h"
#include "libgimp/stdplugins-intl.h"
#include <libgimp/gimpintl.h>
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"

View File

@ -42,7 +42,7 @@
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpintl.h>
#include "libgimp/stdplugins-intl.h"
#include "rcm.h"
#include "rcm_misc.h"
@ -53,8 +53,8 @@
/* Forward declarations */
/*-----------------------------------------------------------------------------------*/
void query(void);
void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_vals);
void query (void);
void run (char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_vals);
/*-----------------------------------------------------------------------------------*/
/* Global variables */
@ -91,7 +91,8 @@ MAIN()
/* Query plug-in */
/*-----------------------------------------------------------------------------------*/
void query(void)
void
query (void)
{
GParamDef args[] =
{
@ -104,15 +105,16 @@ void query(void)
int nargs = sizeof (args) / sizeof (args[0]);
int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure ("plug-in-rotate-colormap",
"Colormap rotation as in xv",
"Exchanges two color ranges. "\
"Based on code from Pavel Grinfeld (pavel@ml.com). "\
"This version written by Sven Anders (anderss@fmi.uni-passau.de).",
_("Colormap rotation as in xv"),
_("Exchanges two color ranges."
"Based on code from Pavel Grinfeld (pavel@ml.com)."
"This version written by Sven Anders (anderss@fmi.uni-passau.de)."),
"Sven Anders (anderss@fmi.uni-passau.de) and Pavel Grinfeld (pavel@ml.com)",
"Sven Anders (anderss@fmi.uni-passau.de)",
"04th April 1999",
"<Image>/Image/Colors/Colormap Rotation...",
N_("<Image>/Image/Colors/Colormap Rotation..."),
"RGB*",
PROC_PLUG_IN,
nargs, nreturn_vals,
@ -123,8 +125,12 @@ void query(void)
/* Rotate colormap of a single row */
/*-----------------------------------------------------------------------------------*/
void rcm_row(const guchar *src_row, guchar *dest_row,
gint row, gint row_width, gint bytes)
void
rcm_row (const guchar *src_row,
guchar *dest_row,
gint row,
gint row_width,
gint bytes)
{
gint col, bytenum, skip;
hsv H,S,V,R,G,B;
@ -188,7 +194,8 @@ void rcm_row(const guchar *src_row, guchar *dest_row,
/* Rotate colormap row by row ... */
/*-----------------------------------------------------------------------------------*/
void rcm(GDrawable *drawable)
void
rcm (GDrawable *drawable)
{
GPixelRgn srcPR, destPR;
gint width, height;
@ -235,7 +242,12 @@ void rcm(GDrawable *drawable)
/* STANDARD RUN */
/*-----------------------------------------------------------------------------------*/
void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_vals)
void
run (char *name,
int nparams,
GParam *param,
int *nreturn_vals,
GParam **return_vals)
{
GParam values[1];
GStatusType status = STATUS_SUCCESS;
@ -260,6 +272,8 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
{
/* call dialog and rotate the colormap */
INIT_I18N_UI();
if (gimp_drawable_is_rgb(Current.drawable->id) && rcm_dialog())
{
gimp_progress_init(_("Rotating the colormap..."));
@ -276,3 +290,6 @@ void run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **ret
if (status == STATUS_SUCCESS)
gimp_drawable_detach(Current.drawable);
}

View File

@ -42,7 +42,7 @@
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpintl.h>
#include "libgimp/stdplugins-intl.h"
#include "rcm.h"
#include "rcm_misc.h"

View File

@ -42,7 +42,7 @@
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpintl.h>
#include "libgimp/stdplugins-intl.h"
#include "rcm.h"
#include "rcm_misc.h"
@ -72,8 +72,11 @@
/* Previews: create one preview */
/*-----------------------------------------------------------------------------------*/
void rcm_create_one_preview(GtkWidget **preview, GtkWidget **frame,
int previewWidth, int previewHeight)
void
rcm_create_one_preview (GtkWidget **preview,
GtkWidget **frame,
int previewWidth,
int previewHeight)
{
*frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(*frame), GTK_SHADOW_IN);
@ -91,7 +94,8 @@ void rcm_create_one_preview(GtkWidget **preview, GtkWidget **frame,
/* Previews */
/*-----------------------------------------------------------------------------------*/
GtkWidget *rcm_create_previews(void)
GtkWidget*
rcm_create_previews (void)
{
GtkWidget *frame, *blabel, *alabel, *bframe, *aframe, *table;
@ -107,7 +111,7 @@ GtkWidget *rcm_create_previews(void)
frame = gtk_frame_new(_("Preview"));
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width(GTK_CONTAINER(frame), 5);
gtk_container_border_width(GTK_CONTAINER(frame), 4);
alabel = gtk_label_new(_("Rotated"));
gtk_widget_show(alabel);
@ -116,10 +120,10 @@ GtkWidget *rcm_create_previews(void)
gtk_widget_show(blabel);
table = gtk_table_new(4, 1, FALSE);
gtk_container_border_width(GTK_CONTAINER(table), 10);
gtk_container_border_width(GTK_CONTAINER(table), 4);
gtk_table_set_row_spacings(GTK_TABLE(table), 0);
gtk_table_set_col_spacings(GTK_TABLE(table), 20);
gtk_table_set_col_spacings(GTK_TABLE(table), 4);
gtk_container_add(GTK_CONTAINER(frame), table);
gtk_table_attach(GTK_TABLE(table), blabel, 0, 1, 0, 1,
@ -144,9 +148,15 @@ GtkWidget *rcm_create_previews(void)
/* Main: Create one pixmap button */
/*-----------------------------------------------------------------------------------*/
void rcm_create_pixmap_button(GtkWidget **label, GtkWidget **xpm_button,
GtkWidget **label_box, GtkSignalFunc callback,
gpointer data, gchar *text, GtkWidget *parent, gint pos)
void
rcm_create_pixmap_button (GtkWidget **label,
GtkWidget **xpm_button,
GtkWidget **label_box,
GtkSignalFunc callback,
gpointer data,
gchar *text,
GtkWidget *parent,
gint pos)
{
/* create button */
@ -155,7 +165,7 @@ void rcm_create_pixmap_button(GtkWidget **label, GtkWidget **xpm_button,
gtk_widget_show(*xpm_button);
gtk_table_attach(GTK_TABLE(parent), *xpm_button,
0, 1, pos, pos+1, GTK_EXPAND|GTK_FILL, GTK_FILL, 5, 2);
0, 1, pos, pos+1, GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 2);
/* create hbox */
@ -180,7 +190,8 @@ void rcm_create_pixmap_button(GtkWidget **label, GtkWidget **xpm_button,
/* Set buttons pixmaps */
/*-----------------------------------------------------------------------------------*/
void rcm_set_pixmaps(RcmCircle *circle)
void
rcm_set_pixmaps (RcmCircle *circle)
{
rcm_set_pixmap(&circle->cw_ccw_pixmap, circle->cw_ccw_button->parent, circle->cw_ccw_box, rcm_cw);
rcm_set_pixmap(&circle->a_b_pixmap, circle->a_b_button->parent, circle->a_b_box, rcm_a_b);
@ -191,7 +202,9 @@ void rcm_set_pixmaps(RcmCircle *circle)
/* Main: One circles with values and buttons */
/*-----------------------------------------------------------------------------------*/
RcmCircle *rcm_create_one_circle(gint height, gchar *label_content)
RcmCircle*
rcm_create_one_circle (gint height,
gchar *label_content)
{
GtkWidget *frame, *button_table, *legend_table;
GtkWidget *label, *label_box, *xpm_button, *entry;
@ -292,22 +305,22 @@ RcmCircle *rcm_create_one_circle(gint height, gchar *label_content)
gtk_widget_show(entry);
gtk_signal_connect(GTK_OBJECT(entry), "changed", (GtkSignalFunc)rcm_set_alpha, st);
gtk_table_attach(GTK_TABLE(legend_table), entry, 1,2, 0,1,
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2 ,5);
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2, 4);
/* label */
st->alpha_units_label = gtk_label_new(rcm_units_string(Current.Units));
gtk_widget_show(st->alpha_units_label);
gtk_table_attach(GTK_TABLE(legend_table), st->alpha_units_label, 2,3, 0,1,
0, GTK_EXPAND, 5, 5);
gtk_table_attach(GTK_TABLE(legend_table), st->alpha_units_label, 2, 3, 0, 1,
0, GTK_EXPAND, 4, 4);
/* spinbutton 2 */
label = gtk_label_new(_("to"));
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(legend_table), label, 3,4, 0,1,
0, GTK_EXPAND, 5, 5);
0, GTK_EXPAND, 4, 4);
st->angle->beta = INITIAL_BETA;
adj = (GtkAdjustment *) gtk_adjustment_new(st->angle->beta, 0.0, 2.0, 0.0001, 0.001, 0.0);
@ -316,7 +329,7 @@ RcmCircle *rcm_create_one_circle(gint height, gchar *label_content)
gtk_widget_show(entry);
gtk_signal_connect(GTK_OBJECT(entry), "changed", (GtkSignalFunc)rcm_set_beta, st);
gtk_table_attach(GTK_TABLE(legend_table), entry, 4,5, 0,1,
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2 ,5);
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2, 4);
/* label */
@ -324,7 +337,7 @@ RcmCircle *rcm_create_one_circle(gint height, gchar *label_content)
gtk_widget_show(st->beta_units_label);
gtk_table_attach(GTK_TABLE(legend_table), st->beta_units_label, 5,6, 0,1,
0, GTK_EXPAND, 5, 5);
0, GTK_EXPAND, 4, 4);
/* Main: Circle: create table for Preview / Buttons / Legend */
@ -351,15 +364,10 @@ RcmCircle *rcm_create_one_circle(gint height, gchar *label_content)
/* Main */
/*-----------------------------------------------------------------------------------*/
GtkWidget *rcm_create_main(void)
GtkWidget*
rcm_create_main (void)
{
GtkWidget *frame, *table;
/* Main: create frame */
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width(GTK_CONTAINER(frame), 5);
GtkWidget *table;
/* Main: create previews */
@ -369,8 +377,7 @@ GtkWidget *rcm_create_main(void)
/* Main: create table */
table = gtk_table_new(3, 2, FALSE);
gtk_container_border_width(GTK_CONTAINER(table), 5);
gtk_container_add(GTK_CONTAINER(frame), table);
gtk_container_border_width(GTK_CONTAINER(table), 0);
/* Main: insert previews in table */
@ -381,16 +388,16 @@ GtkWidget *rcm_create_main(void)
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 0, 0);
gtk_widget_show(table);
gtk_widget_show(frame);
return frame;
return table;
}
/*-----------------------------------------------------------------------------------*/
/* Misc: Gray */
/*-----------------------------------------------------------------------------------*/
RcmGray *rcm_create_gray(void)
RcmGray*
rcm_create_gray (void)
{
GtkWidget *frame, *preview, *as_or_to_frame;
GtkWidget *table, *previewframe, *legend_table;
@ -489,12 +496,12 @@ RcmGray *rcm_create_gray(void)
/** Gray: Operation-Mode **/
as_or_to_frame = gtk_frame_new(_("Mode"));
gtk_container_border_width (GTK_CONTAINER (as_or_to_frame), 5);
gtk_container_border_width (GTK_CONTAINER (as_or_to_frame), 4);
gtk_widget_show(as_or_to_frame);
radio_box = gtk_vbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(as_or_to_frame), radio_box);
gtk_container_border_width(GTK_CONTAINER(radio_box), 5);
gtk_container_border_width(GTK_CONTAINER(radio_box), 4);
gtk_widget_show(radio_box);
/* Gray: Operation-Mode: two radio buttons */
@ -521,7 +528,7 @@ RcmGray *rcm_create_gray(void)
/** Gray: What is gray? **/
gray_sat_frame = gtk_frame_new(_("What is Gray?"));
gtk_container_border_width(GTK_CONTAINER(gray_sat_frame), 5);
gtk_container_border_width(GTK_CONTAINER(gray_sat_frame), 4);
gtk_widget_show(gray_sat_frame);
table = gtk_table_new(1, 3, FALSE);
@ -539,9 +546,10 @@ RcmGray *rcm_create_gray(void)
adj = (GtkAdjustment *) gtk_adjustment_new(st->gray_sat, 0.0, 1.0, 0.0001, 0.001, 0.0);
st->gray_sat_entry = entry = gtk_spin_button_new(adj, 0.01, 4);
gtk_widget_set_usize (entry, 75, 0);
gtk_widget_show(entry);
gtk_signal_connect(GTK_OBJECT(entry), "changed", (GtkSignalFunc)rcm_set_gray_sat, st);
gtk_table_attach(GTK_TABLE(table), entry, 2, 3, 0, 1, GTK_EXPAND|GTK_FILL, GTK_EXPAND, 3,0);
gtk_table_attach(GTK_TABLE(table), entry, 2, 3, 0, 1, GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2, 0);
gtk_container_add(GTK_CONTAINER(gray_sat_frame), table);
@ -585,9 +593,10 @@ RcmGray *rcm_create_gray(void)
/* Misc */
/*-----------------------------------------------------------------------------------*/
GtkWidget *rcm_create_misc(void)
GtkWidget*
rcm_create_misc (void)
{
GtkWidget *frame, *label,*table;
GtkWidget *label, *table;
GtkWidget *units_frame, *units_vbox;
GtkWidget *preview_frame, *preview_vbox;
GtkWidget *item, *menu, *root, *hbox;
@ -595,13 +604,7 @@ GtkWidget *rcm_create_misc(void)
GSList *units_group = NULL;
GSList *preview_group = NULL;
/** Misc: Main frame **/
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_container_border_width(GTK_CONTAINER(frame), 5);
/** Misc: Gray circle **/
Current.Gray = rcm_create_gray();
@ -613,7 +616,7 @@ GtkWidget *rcm_create_misc(void)
units_vbox=gtk_vbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(units_frame), units_vbox);
gtk_container_border_width(GTK_CONTAINER(units_vbox), 5);
gtk_container_border_width(GTK_CONTAINER(units_vbox), 4);
gtk_widget_show(units_vbox);
/* Misc: Used unit selection: 3 radio buttons */
@ -646,8 +649,8 @@ GtkWidget *rcm_create_misc(void)
/* Misc: Preview settings: Continuous update ?! */
preview_frame = gtk_frame_new(_("Preview"));
preview_vbox = gtk_vbox_new(FALSE, 5);
gtk_container_border_width(GTK_CONTAINER(preview_vbox), 5);
preview_vbox = gtk_vbox_new(FALSE, 4);
gtk_container_border_width(GTK_CONTAINER(preview_vbox), 4);
gtk_widget_show(preview_vbox);
gtk_container_add(GTK_CONTAINER(preview_frame), preview_vbox);
@ -665,13 +668,13 @@ GtkWidget *rcm_create_misc(void)
/* Misc: Preview settings: Area */
hbox = gtk_hbox_new(FALSE,3);
hbox = gtk_hbox_new(FALSE,2);
gtk_widget_show(hbox);
gtk_box_pack_start(GTK_BOX(preview_vbox), hbox, TRUE, FALSE, 5);
gtk_box_pack_start(GTK_BOX(preview_vbox), hbox, TRUE, FALSE, 4);
label = gtk_label_new(_("Area"));
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4);
/* create menu entries */
@ -711,29 +714,28 @@ GtkWidget *rcm_create_misc(void)
gtk_widget_show(table);
gtk_container_border_width(GTK_CONTAINER(table),0);
gtk_container_add(GTK_CONTAINER(frame), table);
/** add frames (gray/preview/units) to table **/
gtk_table_attach(GTK_TABLE(table), Current.Gray->frame, 0, 2, 0, 1,
GTK_EXPAND|GTK_FILL, GTK_FILL, 5, 3);
GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
gtk_table_attach(GTK_TABLE(table), preview_frame, 0, 1, 1, 2,
GTK_EXPAND|GTK_FILL, GTK_FILL, 5, 3);
GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
gtk_table_attach(GTK_TABLE(table), units_frame, 1, 2, 1, 2,
GTK_EXPAND|GTK_FILL, GTK_FILL, 5, 3);
GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
gtk_widget_show (frame);
gtk_widget_show (table);
return frame;
return table;
}
/*-----------------------------------------------------------------------------------*/
/* create and call main dialog */
/*-----------------------------------------------------------------------------------*/
gint rcm_dialog(void)
gint
rcm_dialog (void)
{
GtkWidget *table, *dlg, *hbox, *notebook;
GtkWidget *previews, *mains, *miscs;
@ -781,7 +783,7 @@ gint rcm_dialog(void)
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK");
button = gtk_button_new_with_label (_("OK"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) rcm_ok_callback,
@ -790,7 +792,7 @@ gint rcm_dialog(void)
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel");
button = gtk_button_new_with_label (_("Cancel"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
@ -820,7 +822,7 @@ gint rcm_dialog(void)
/* Notebook */
notebook = gtk_notebook_new();
gtk_container_border_width(GTK_CONTAINER(notebook), 10);
gtk_container_border_width(GTK_CONTAINER(notebook), 4);
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
gtk_box_pack_start(GTK_BOX(hbox), notebook, TRUE, TRUE, 0);
gtk_widget_show(notebook);
@ -829,7 +831,7 @@ gint rcm_dialog(void)
gtk_widget_show(table);
gtk_table_attach(GTK_TABLE(table), mains, 1, 2, 0, 1,
GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 5, 0);
GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 4, 0);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, gtk_label_new(_("Main")));

View File

@ -42,7 +42,6 @@
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpintl.h>
#include "rcm.h"
#include "rcm_misc.h"

View File

@ -43,7 +43,6 @@ plug-ins/common/emboss.c
plug-ins/common/engrave.c
plug-ins/common/exchange.c
plug-ins/common/film.c
plug-ins/flame/flame.c
plug-ins/common/flarefx.c
plug-ins/common/fractaltrace.c
plug-ins/common/gauss_iir.c
@ -74,13 +73,18 @@ plug-ins/common/png.c
plug-ins/common/ps.c
plug-ins/common/psp.c
plug-ins/common/rotate.c
plug-ins/common/sample_colorize.c
plug-ins/common/screenshot.c
plug-ins/common/spheredesigner.c
plug-ins/common/threshold_alpha.c
plug-ins/common/warp.c
plug-ins/common/xbm.c
plug-ins/common/xpm.c
plug-ins/common/xwd.c
plug-ins/common/zealouscrop.c
plug-ins/flame/flame.c
plug-ins/fp/fp.c
plug-ins/fp/fp_gtk.c
plug-ins/gap/gap_arr_dialog.c
plug-ins/gap/gap_dbbrowser_utils.c
plug-ins/gap/gap_filter_foreach.c
@ -159,21 +163,22 @@ plug-ins/imagemap/imap_selection.c
plug-ins/imagemap/imap_settings.c
plug-ins/imagemap/imap_source.c
plug-ins/imagemap/imap_toolbar.c
plug-ins/megawidget/megawidget.c
plug-ins/mosaic/mosaic.c
plug-ins/print/print-escp2.c
plug-ins/print/print-pcl.c
plug-ins/print/print-ps.c
plug-ins/print/print.c
plug-ins/common/sample_colorize.c
plug-ins/rcm/rcm.c
plug-ins/rcm/rcm_callback.c
plug-ins/rcm/rcm_dialog.c
plug-ins/script-fu/script-fu-console.c
plug-ins/script-fu/script-fu-scripts.c
plug-ins/script-fu/script-fu-server.c
plug-ins/script-fu/script-fu.c
plug-ins/sel2path/sel2path.c
plug-ins/sinus/sinus.c
plug-ins/common/spheredesigner.c
plug-ins/struc/struc.c
plug-ins/megawidget/megawidget.c
libgimp/gimpcolorbutton.c
libgimp/gimpexport.c
libgimp/gimpfileselection.c