Commit 7af78258 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added some stock icons.

2004-05-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/channel_mixer.c: added some stock icons.

	* plug-ins/common/edge.c
	* plug-ins/common/emboss.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c: HIG-ified.

	* plug-ins/common/sel_gauss.c: tiny changes for a more consistent
	HIG-ification.
parent 540aa5ce
2004-05-19 Sven Neumann <sven@gimp.org>
* plug-ins/common/channel_mixer.c: added some stock icons.
* plug-ins/common/edge.c
* plug-ins/common/emboss.c
* plug-ins/common/engrave.c
* plug-ins/common/exchange.c: HIG-ified.
* plug-ins/common/sel_gauss.c: tiny changes for a more consistent
HIG-ification.
2004-05-19 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/plug_in.pdb: made plugin_icon_register() an
......
......@@ -486,6 +486,7 @@ cm_dialog (void)
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *label;
GtkWidget *image;
GtkWidget *table;
gdouble red_value, green_value, blue_value;
gboolean run;
......@@ -545,7 +546,7 @@ cm_dialog (void)
/*........................................................... */
/* preview */
vbox = gtk_vbox_new (FALSE, 12);
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
......@@ -587,13 +588,28 @@ cm_dialog (void)
gtk_widget_show (hbox);
label = gtk_label_new_with_mnemonic (_("O_utput Channel:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
mix.combo = gimp_int_combo_box_new (_("Red"), CM_RED_CHANNEL,
_("Green"), CM_GREEN_CHANNEL,
_("Blue"), CM_BLUE_CHANNEL,
NULL);
mix.combo = gimp_int_combo_box_new (NULL, 0);
gimp_int_combo_box_append (GIMP_INT_COMBO_BOX (mix.combo),
GIMP_INT_STORE_VALUE, CM_RED_CHANNEL,
GIMP_INT_STORE_LABEL, _("Red"),
GIMP_INT_STORE_STOCK_ID, GIMP_STOCK_CHANNEL_RED,
-1);
gimp_int_combo_box_append (GIMP_INT_COMBO_BOX (mix.combo),
GIMP_INT_STORE_VALUE, CM_GREEN_CHANNEL,
GIMP_INT_STORE_LABEL, _("Green"),
GIMP_INT_STORE_STOCK_ID, GIMP_STOCK_CHANNEL_GREEN,
-1);
gimp_int_combo_box_append (GIMP_INT_COMBO_BOX (mix.combo),
GIMP_INT_STORE_VALUE, CM_BLUE_CHANNEL,
GIMP_INT_STORE_LABEL, _("Blue"),
GIMP_INT_STORE_STOCK_ID, GIMP_STOCK_CHANNEL_BLUE,
-1);
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (mix.combo),
mix.output_channel);
......@@ -601,7 +617,7 @@ cm_dialog (void)
G_CALLBACK (cm_combo_callback),
&mix);
gtk_box_pack_start (GTK_BOX (hbox), mix.combo, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), mix.combo, TRUE, TRUE, 0);
gtk_widget_show (mix.combo);
if (mix.monochrome_flag)
......@@ -611,14 +627,20 @@ cm_dialog (void)
/*........................................................... */
table = gtk_table_new (3, 3, FALSE);
table = gtk_table_new (3, 4, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_RED,
GTK_ICON_SIZE_BUTTON);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
mix.red_data =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 1, 0,
_("_Red:"), 150, -1,
red_value, -200.0, 200.0,
1.0, 10.0, 1,
......@@ -629,8 +651,14 @@ cm_dialog (void)
G_CALLBACK (cm_red_scale_callback),
&mix);
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_GREEN,
GTK_ICON_SIZE_BUTTON);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
mix.green_data =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 1, 1,
_("_Green:"), 150, -1,
green_value, -200.0, 200.0,
1.0, 10.0, 1,
......@@ -642,8 +670,14 @@ cm_dialog (void)
&mix);
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_BLUE,
GTK_ICON_SIZE_BUTTON);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
mix.blue_data =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 1, 2,
_("_Blue:"), 150, -1,
blue_value, -200.0, 200.0,
1.0, 10.0, 1,
......
......@@ -92,7 +92,7 @@ static void run (const gchar *name,
GimpParam **return_vals);
static void edge (GimpDrawable *drawable);
static gint edge_dialog (GimpDrawable *drawable);
static gboolean edge_dialog (GimpDrawable *drawable);
static gint edge_detect (guchar *data);
static gint prewitt (guchar *data);
......@@ -623,10 +623,11 @@ laplace (guchar *data)
/* Dialog */
/*******************************************************/
static gint
static gboolean
edge_dialog (GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *hbox;
......@@ -650,6 +651,11 @@ edge_dialog (GimpDrawable *drawable)
NULL);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox);
gtk_widget_show (vbox);
/* compression */
frame = gimp_int_radio_group_new (TRUE, _("Algorithm"),
G_CALLBACK (gimp_radio_button_update),
......@@ -664,19 +670,16 @@ edge_dialog (GimpDrawable *drawable)
NULL);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
/* parameter settings */
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Label, scale, entry for evals.amount */
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......@@ -726,8 +729,6 @@ edge_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_toggle_button_update),
&use_black);
gtk_widget_show (table);
gtk_widget_show (frame);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......
......@@ -476,7 +476,7 @@ emboss_int_adjustment_callback (GtkAdjustment *adj,
emboss_do_preview (NULL);
}
static gint
static gboolean
pluginCoreIA (piArgs *argp)
{
GtkWidget *dlg;
......@@ -499,13 +499,13 @@ pluginCoreIA (piArgs *argp)
NULL);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox,
TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
hbox = gtk_hbox_new (FALSE, 5);
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......@@ -525,15 +525,10 @@ pluginCoreIA (piArgs *argp)
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
frame = gtk_frame_new (_("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("_Azimuth:"), 100, 6,
......@@ -696,32 +691,26 @@ mw_preview_build (GimpDrawable *drw)
}
static GtkWidget *
mw_preview_new (GtkWidget *parent,
mw_preview_new (GtkWidget *parent,
mwPreview *mwp)
{
GtkWidget *preview;
GtkWidget *frame;
GtkWidget *pframe;
GtkWidget *vbox;
GtkWidget *button;
frame = gtk_frame_new (_("Preview"));
gtk_box_pack_start (GTK_BOX (parent), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_box_pack_start (GTK_BOX (parent), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME(pframe), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), pframe, FALSE, FALSE, 0);
gtk_widget_show (pframe);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview), mwp->width, mwp->height);
gtk_container_add (GTK_CONTAINER (pframe), preview);
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
button = gtk_check_button_new_with_mnemonic (_("Do _Preview"));
......
......@@ -54,7 +54,7 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static gint engrave_dialog (void);
static gboolean engrave_dialog (void);
static void engrave (GimpDrawable *drawable);
static void engrave_large (GimpDrawable *drawable,
......@@ -194,11 +194,11 @@ run (const gchar *name,
gimp_drawable_detach (drawable);
}
static gint
static gboolean
engrave_dialog (void)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *toggle;
GtkObject *adj;
......@@ -215,29 +215,17 @@ engrave_dialog (void)
NULL);
/* parameter settings */
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
toggle = gtk_check_button_new_with_mnemonic (_("_Limit Line Width"));
gtk_table_attach (GTK_TABLE (table), toggle, 0, 3, 0, 1, GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), pvals.limit);
gtk_widget_show (toggle);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&pvals.limit);
table = gtk_table_new (1, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("_Height:"), SCALE_WIDTH, 0,
pvals.height, 2.0, 16.0, 1.0, 4.0, 0,
TRUE, 0, 0,
......@@ -246,6 +234,15 @@ engrave_dialog (void)
G_CALLBACK (gimp_int_adjustment_update),
&pvals.height);
toggle = gtk_check_button_new_with_mnemonic (_("_Limit Line Width"));
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), pvals.limit);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&pvals.limit);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......
......@@ -77,7 +77,7 @@ static void run (const gchar *name,
static void exchange (void);
static void real_exchange (gint, gint, gint, gint, gboolean);
static int exchange_dialog (void);
static gboolean exchange_dialog (void);
static void update_preview (void);
static void color_button_callback (GtkWidget *, gpointer);
static void scale_callback (GtkAdjustment *, gpointer);
......@@ -296,7 +296,7 @@ preview_event_handler (GtkWidget *widget,
}
/* show our dialog */
static gint
static gboolean
exchange_dialog (void)
{
GtkWidget *dialog;
......@@ -308,6 +308,7 @@ exchange_dialog (void)
GtkWidget *threshold;
GtkWidget *colorbutton;
GtkWidget *scale;
GtkSizeGroup *group;
GtkObject *adj;
gint framenumber;
gboolean run;
......@@ -329,16 +330,16 @@ exchange_dialog (void)
NULL);
/* do some boxes here */
mainbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (mainbox), 6);
mainbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (mainbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), mainbox,
TRUE, TRUE, 0);
frame = gtk_frame_new (_("Preview: Click Inside to Pick \"From Color\""));
frame = gimp_frame_new (_("Click inside preview to pick \"From Color\""));
gtk_box_pack_start (GTK_BOX (mainbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (frame), abox);
gtk_widget_show (abox);
......@@ -374,16 +375,19 @@ exchange_dialog (void)
&xargs.threshold);
/* and our scales */
group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
for (framenumber = 0; framenumber < 2; framenumber++)
{
frame = gtk_frame_new (framenumber ? _("To Color") : _("From Color"));
GtkWidget *image;
frame = gimp_frame_new (framenumber ? _("To Color") : _("From Color"));
gtk_box_pack_start (GTK_BOX (mainbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (framenumber ? 3 : 9, 4, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
table = gtk_table_new (framenumber ? 3 : 9, 5, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
......@@ -394,8 +398,8 @@ exchange_dialog (void)
framenumber ? &xargs.to : &xargs.from,
GIMP_COLOR_AREA_FLAT);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
NULL, 0.0, 0.0,
colorbutton, 1, TRUE);
NULL, 0.0, 0.0,
colorbutton, 1, FALSE);
g_signal_connect (colorbutton, "color_changed",
G_CALLBACK (gimp_color_button_get_color),
......@@ -408,7 +412,14 @@ exchange_dialog (void)
from_colorbutton = colorbutton;
/* Red */
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_RED,
GTK_ICON_SIZE_BUTTON);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, framenumber ? 0.5 : 0.1);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 1,
_("_Red:"), SCALE_WIDTH, 0,
framenumber ? xargs.to.r : xargs.from.r,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -427,10 +438,11 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (! framenumber)
{
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 2,
_("R_ed Threshold:"), SCALE_WIDTH, 0,
xargs.threshold.r,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -449,10 +461,18 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
/* Green */
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_GREEN,
GTK_ICON_SIZE_BUTTON);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, framenumber ? 0.5 : 0.1);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 3, 5, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 3,
_("_Green:"), SCALE_WIDTH, 0,
framenumber ? xargs.to.g : xargs.from.g,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -471,10 +491,11 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (!framenumber)
{
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 4,
_("G_reen Threshold:"), SCALE_WIDTH, 0,
xargs.threshold.g,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -493,10 +514,18 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
/* Blue */
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 5,
image = gtk_image_new_from_stock (GIMP_STOCK_CHANNEL_BLUE,
GTK_ICON_SIZE_BUTTON);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, framenumber ? 0.5 : 0.1);
gtk_table_attach (GTK_TABLE (table), image,
0, 1, 5, 7, GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (image);
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 5,
_("_Blue:"), SCALE_WIDTH, 0,
framenumber ? xargs.to.b : xargs.from.b,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -515,10 +544,11 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
if (! framenumber)
{
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 6,
adj = gimp_scale_entry_new (GTK_TABLE (table), 1, 6,
_("B_lue Threshold:"), SCALE_WIDTH, 0,
xargs.threshold.b,
0.0, 1.0, 0.01, 0.1, 3,
......@@ -537,6 +567,7 @@ exchange_dialog (void)
scale = GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj));
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_size_group_add_widget (group, GIMP_SCALE_ENTRY_LABEL (adj));
}
if (!framenumber)
......@@ -544,7 +575,7 @@ exchange_dialog (void)
GtkWidget *button;
button = gtk_check_button_new_with_mnemonic (_("Lock _Thresholds"));
gtk_table_attach (GTK_TABLE (table), button, 1, 3, 7, 8,
gtk_table_attach (GTK_TABLE (table), button, 2, 4, 7, 8,
GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
lock_threshold);
......@@ -556,6 +587,8 @@ exchange_dialog (void)
}
}
g_object_unref (group);
/* show everything */
gtk_widget_show (mainbox);
gtk_widget_show (dialog);
......
......@@ -47,18 +47,17 @@ typedef struct
/* Declare local functions.
*/
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void sel_gauss (GimpDrawable *drawable,
gdouble radius,
gint maxdelta);
static gint sel_gauss_dialog (void);
static void sel_gauss (GimpDrawable *drawable,
gdouble radius,
gint maxdelta);
static gboolean sel_gauss_dialog (void);
GimpPlugInInfo PLUG_IN_INFO =
......@@ -131,7 +130,7 @@ run (const gchar *name,
*nreturn_vals = 1;
*return_vals = values;
INIT_I18N ();
INIT_I18N ();
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
......@@ -208,7 +207,7 @@ run (const gchar *name,
values[0].data.d_status = status;
}
static gint
static gboolean
sel_gauss_dialog (void)
{
GtkWidget *dlg;
......@@ -229,8 +228,8 @@ sel_gauss_dialog (void)
NULL);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table,
TRUE, TRUE, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment