Commit 8885e76c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/common/warp.c plug-ins/common/whirlpinch.c plug-ins/common/wmf.c

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

	* plug-ins/common/warp.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/common/wmf.c
	* plug-ins/common/xbm.c
	* plug-ins/common/xpm.c: HIG-ified.
parent f5fd7288
2004-05-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/warp.c
* plug-ins/common/whirlpinch.c
* plug-ins/common/wmf.c
* plug-ins/common/xbm.c
* plug-ins/common/xpm.c: HIG-ified.
2004-05-19 Manish Singh <yosh@gimp.org>
* app/actions/file-actions.c: remove unnecessary G_OBJECT() casts.
......
......@@ -378,7 +378,6 @@ warp_dialog (GimpDrawable *drawable)
GtkWidget *toggle_hbox;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *otable;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *combo;
......@@ -396,27 +395,29 @@ warp_dialog (GimpDrawable *drawable)
NULL);
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
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);
frame = gtk_frame_new (_("Main Options"));
frame = gimp_frame_new (_("Basic Options"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 1, 12);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
/* amount, iter */
spinbutton = gimp_spin_button_new (&adj, dvals.amount,
-1000, 1000, /* ??? */
1, 10, 0, 1, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Step Size:"), 1.0, 0.5,
spinbutton, 1, TRUE);
_("Step Size:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.amount);
......@@ -424,14 +425,15 @@ warp_dialog (GimpDrawable *drawable)
spinbutton = gimp_spin_button_new (&adj, dvals.iter,
1, 100, 1, 5, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Iterations:"), 1.0, 0.5,
spinbutton, 1, TRUE);
_("Iterations:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&dvals.iter);
/* Displacement map menu */
label = gtk_label_new (_("Displacement Map:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
......@@ -449,7 +451,7 @@ warp_dialog (GimpDrawable *drawable)
/* Displacement Type */
label = gtk_label_new (_("On Edges:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
......@@ -457,6 +459,7 @@ warp_dialog (GimpDrawable *drawable)
toggle_hbox = gtk_hbox_new (FALSE, 4);
gtk_table_attach (GTK_TABLE (table), toggle_hbox, 1, 3, 2, 3,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (toggle_hbox);
toggle = gtk_radio_button_new_with_label (group, _("Wrap"));
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
......@@ -518,28 +521,27 @@ warp_dialog (GimpDrawable *drawable)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
dvals.wrap_type == COLOR);
gtk_widget_show (toggle_hbox);
gtk_widget_show (table);
gtk_widget_show (frame);
/* -------------------------------------------------------------------- */
/* --------- The secondary table -------------------------- */
frame = gtk_frame_new (_("Secondary Options"));
frame = gimp_frame_new (_("Advanced Options"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 1, 12);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
spinbutton = gimp_spin_button_new (&adj, dvals.dither,
0, 100, 1, 10, 0, 1, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Dither Size:"), 1.0, 0.5,
spinbutton, 1, TRUE);
_("Dither Size:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.dither);
......@@ -547,8 +549,8 @@ warp_dialog (GimpDrawable *drawable)
spinbutton = gimp_spin_button_new (&adj, dvals.angle,
0, 360, 1, 15, 0, 1, 1);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Rotation Angle:"), 1.0, 0.5,
spinbutton, 1, TRUE);
_("Rotation Angle:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.angle);
......@@ -556,14 +558,15 @@ warp_dialog (GimpDrawable *drawable)
spinbutton = gimp_spin_button_new (&adj, dvals.substeps,
1, 100, 1, 5, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Substeps:"), 1.0, 0.5,
spinbutton, 1, TRUE);
_("Substeps:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&dvals.substeps);
/* Magnitude map menu */
label = gtk_label_new (_("Magnitude Map:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
......@@ -582,8 +585,9 @@ warp_dialog (GimpDrawable *drawable)
gtk_container_set_border_width (GTK_CONTAINER (toggle_hbox), 1);
gtk_table_attach (GTK_TABLE (table), toggle_hbox, 2, 3, 2, 3,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (toggle_hbox);
toggle = gtk_check_button_new_with_label (_("Use Mag Map"));
toggle = gtk_check_button_new_with_label (_("Use Magnitude Map"));
gtk_box_pack_start (GTK_BOX (toggle_hbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), dvals.mag_use);
gtk_widget_show (toggle);
......@@ -592,29 +596,27 @@ warp_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_toggle_button_update),
&dvals.mag_use);
gtk_widget_show (toggle_hbox);
gtk_widget_show (table);
gtk_widget_show (frame);
/* -------------------------------------------------------------------- */
/* --------- The "other" table -------------------------- */
frame = gtk_frame_new (_("Other Options"));
frame = gimp_frame_new (_("More Advanced Options"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
otable = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (otable), 2);
gtk_table_set_col_spacings (GTK_TABLE (otable), 4);
gtk_container_set_border_width (GTK_CONTAINER (otable), 4);
gtk_container_add (GTK_CONTAINER (frame), otable);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacing (GTK_TABLE (table), 1, 12);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
spinbutton = gimp_spin_button_new (&adj, dvals.grad_scale,
-1000, 1000, /* ??? */
0.01, 0.1, 0, 1, 3);
gimp_table_attach_aligned (GTK_TABLE (otable), 0, 0,
_("Gradient Scale:"), 1.0, 0.5,
spinbutton, 1, TRUE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Gradient Scale:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.grad_scale);
......@@ -626,7 +628,7 @@ warp_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_int_combo_box_get_active),
&dvals.grad_map);
gtk_table_attach (GTK_TABLE (otable), combo, 2, 3, 0, 1,
gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (combo);
......@@ -637,9 +639,9 @@ warp_dialog (GimpDrawable *drawable)
spinbutton = gimp_spin_button_new (&adj, dvals.vector_scale,
-1000, 1000, /* ??? */
0.01, 0.1, 0, 1, 3);
gimp_table_attach_aligned (GTK_TABLE (otable), 0, 1,
_("Vector Mag:"), 1.0, 0.5,
spinbutton, 1, TRUE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Vector Mag:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.vector_scale);
......@@ -648,9 +650,9 @@ warp_dialog (GimpDrawable *drawable)
spinbutton = gimp_spin_button_new (&adj, dvals.vector_angle,
0, 360, 1, 15, 0, 1, 1);
gimp_table_attach_aligned (GTK_TABLE (otable), 0, 2,
_("Angle:"), 1.0, 0.5,
spinbutton, 1, TRUE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Angle:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&dvals.vector_angle);
......@@ -661,7 +663,7 @@ warp_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_int_combo_box_get_active),
&dvals.vector_map);
gtk_table_attach (GTK_TABLE (otable), combo, 2, 3, 1, 2,
gtk_table_attach (GTK_TABLE (table), combo, 2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (combo);
......@@ -669,9 +671,6 @@ warp_dialog (GimpDrawable *drawable)
_("Fixed-direction-vector map selection menu"),
NULL);
gtk_widget_show (otable);
gtk_widget_show (frame);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......
......@@ -103,15 +103,16 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static void whirl_pinch (void);
static int calc_undistorted_coords (double wx, double wy,
double whirl, double pinch,
double *x, double *y);
static void build_preview_source_image (void);
static void whirl_pinch (void);
static int calc_undistorted_coords (double wx, double wy,
double whirl, double pinch,
double *x, double *y);
static void build_preview_source_image (void);
static gint whirl_pinch_dialog (void);
static void dialog_update_preview (void);
static void dialog_scale_update (GtkAdjustment *adjustment, gdouble *value);
static gboolean whirl_pinch_dialog (void);
static void dialog_update_preview (void);
static void dialog_scale_update (GtkAdjustment *adjustment,
gdouble *value);
/***** Variables *****/
......@@ -644,14 +645,13 @@ build_preview_source_image (void)
gimp_pixel_fetcher_destroy (pf);
}
static gint
static gboolean
whirl_pinch_dialog (void)
{
GtkWidget *dialog;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *abox;
GtkWidget *pframe;
GtkWidget *table;
GtkObject *adj;
gboolean run;
......@@ -669,44 +669,34 @@ whirl_pinch_dialog (void)
NULL);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), main_vbox,
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), vbox,
FALSE, FALSE, 0);
gtk_widget_show (main_vbox);
gtk_widget_show (vbox);
/* Preview */
frame = gtk_frame_new (_("Preview"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (frame), abox);
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
gtk_widget_show (abox);
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
gtk_container_set_border_width (GTK_CONTAINER (pframe), 4);
gtk_container_add (GTK_CONTAINER (abox), pframe);
gtk_widget_show (pframe);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_widget_show (frame);
/* Preview */
wpint.preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (wpint.preview),
preview_width, preview_height);
gtk_container_add (GTK_CONTAINER (pframe), wpint.preview);
gtk_container_add (GTK_CONTAINER (frame), wpint.preview);
gtk_widget_show (wpint.preview);
/* Controls */
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 (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......
......@@ -211,26 +211,23 @@ load_dialog (const gchar *filename)
NULL);
/* Rendering */
frame = gtk_frame_new (g_strdup_printf (_("Rendering %s"), filename));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
frame = gimp_frame_new (g_strdup_printf (_("Rendering %s"), filename));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
TRUE, TRUE, 0);
gtk_widget_show (frame);
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
/* Scale label */
table = gtk_table_new (1, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Scale slider */
value = CLAMP (load_vals.scale, 1.0 / 64.0, 64.0);
value = log (value) / log (2.0);
......
......@@ -97,23 +97,23 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static gint32 load_image (const gchar *filename);
static gint save_image (const gchar *filename,
const gchar *prefix,
const gchar *comment,
gboolean save_mask,
gint32 image_ID,
gint32 drawable_ID);
static gint save_dialog (gint32 drawable_ID);
static gint32 load_image (const gchar *filename);
static gint save_image (const gchar *filename,
const gchar *prefix,
const gchar *comment,
gboolean save_mask,
gint32 image_ID,
gint32 drawable_ID);
static gboolean save_dialog (gint32 drawable_ID);
#if 0
/* DISABLED - see http://bugzilla.gnome.org/show_bug.cgi?id=82763 */
static void comment_entry_callback (GtkWidget *widget,
gpointer data);
static void comment_entry_callback (GtkWidget *widget,
gpointer data);
#endif
static void prefix_entry_callback (GtkWidget *widget,
gpointer data);
static void mask_ext_entry_callback (GtkWidget *widget,
gpointer data);
static void prefix_entry_callback (GtkWidget *widget,
gpointer data);
static void mask_ext_entry_callback (GtkWidget *widget,
gpointer data);
GimpPlugInInfo PLUG_IN_INFO =
{
......@@ -1136,7 +1136,7 @@ save_image (const gchar *filename,
return TRUE;
}
static gint
static gboolean
save_dialog (gint32 drawable_ID)
{
GtkWidget *dlg;
......@@ -1159,13 +1159,12 @@ save_dialog (gint32 drawable_ID)
NULL);
/* parameter settings */
frame = gtk_frame_new (_("XBM Options"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
frame = gimp_frame_new (_("XBM Options"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (frame), vbox);
/* X10 format */
......@@ -1179,8 +1178,8 @@ save_dialog (gint32 drawable_ID)
&xsvals.x10_format);
table = gtk_table_new (2, 2, 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_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
......@@ -1189,7 +1188,7 @@ save_dialog (gint32 drawable_ID)
gtk_entry_set_max_length (GTK_ENTRY (entry), MAX_PREFIX);
gtk_entry_set_text (GTK_ENTRY (entry), xsvals.prefix);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Identifier Prefix:"), 1.0, 0.5,
_("_Identifier Prefix:"), 0.0, 0.5,
entry, 1, TRUE);
g_signal_connect (entry, "changed",
G_CALLBACK (prefix_entry_callback),
......@@ -1203,7 +1202,7 @@ save_dialog (gint32 drawable_ID)
gtk_widget_set_size_request (entry, 240, -1);
gtk_entry_set_text (GTK_ENTRY (entry), xsvals.comment);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Comment:"), 1.0, 0.5,
_("Comment:"), 0.0, 0.5,
entry, 1, TRUE);
g_signal_connect (entry, "changed",
G_CALLBACK (comment_entry_callback),
......@@ -1221,8 +1220,8 @@ save_dialog (gint32 drawable_ID)
&xsvals.use_hot);
table = gtk_table_new (2, 2, 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_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
......@@ -1233,7 +1232,7 @@ save_dialog (gint32 drawable_ID)
gimp_drawable_width (drawable_ID) - 1,
1, 1, 1, 0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Hot Spot _X:"), 1.0, 0.5,
_("Hot Spot _X:"), 0.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
......@@ -1243,21 +1242,20 @@ save_dialog (gint32 drawable_ID)
gimp_drawable_height (drawable_ID) - 1,
1, 1, 1, 0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Y:"), 1.0, 0.5,
_("Hot Spot _Y:"), 0.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&xsvals.y_hot);
/* mask file */
frame = gtk_frame_new (_("Mask File"));
frame = gimp_frame_new (_("Mask File"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
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_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
......@@ -1274,7 +1272,7 @@ save_dialog (gint32 drawable_ID)
gtk_entry_set_max_length (GTK_ENTRY (entry), MAX_MASK_EXT);
gtk_entry_set_text (GTK_ENTRY (entry), xsvals.mask_ext);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Mask File Extension:"), 1.0, 0.5,
_("_Mask File Extension:"), 0.0, 0.5,
entry, 1, TRUE);
g_signal_connect (entry, "changed",
G_CALLBACK (mask_ext_entry_callback),
......
......@@ -95,23 +95,23 @@ static gboolean color;
static gint cpp;
/* 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 gint32 load_image (const gchar *filename);
static guchar *parse_colors (XpmImage *xpm_image);
static void parse_image (gint32 image_ID,
XpmImage *xpm_image,
guchar *cmap);
static gboolean save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID);
static gint32 load_image (const gchar *filename);
static guchar * parse_colors (XpmImage *xpm_image);
static void parse_image (gint32 image_ID,
XpmImage *xpm_image,
guchar *cmap);
static gboolean save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID);
static gint save_dialog (void);
static gboolean save_dialog (void);
GimpPlugInInfo PLUG_IN_INFO =
......@@ -766,11 +766,10 @@ save_image (const gchar *filename,
return rc;
}
static gint
static gboolean
save_dialog (void)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *table;
GtkObject *scale_data;
gboolean run;
......@@ -784,16 +783,10 @@ save_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 (1, 3, FALSE);
gtk_table_set_col_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_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table, TRUE, TRUE, 0);
gtk_widget_show (table);
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 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