Commit aaf38056 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/common/tga.c plug-ins/common/threshold_alpha.c

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

	* plug-ins/common/tga.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/tiff.c
	* plug-ins/common/tile.c
	* plug-ins/common/tileit.c
	* plug-ins/common/uniteditor.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/video.c
	* plug-ins/common/vpropagate.c: HIG-ified.
parent 0c19a57f
2004-05-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/tga.c
* plug-ins/common/threshold_alpha.c
* plug-ins/common/tiff.c
* plug-ins/common/tile.c
* plug-ins/common/tileit.c
* plug-ins/common/uniteditor.c
* plug-ins/common/unsharp.c
* plug-ins/common/video.c
* plug-ins/common/vpropagate.c: HIG-ified.
2004-05-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/randomize.c
......
......@@ -167,23 +167,23 @@ typedef struct tga_info_struct
/* Declare some 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 gint save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID);
static gint32 load_image (const gchar *filename);
static gint save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID);
static gint save_dialog (void);
static gboolean save_dialog (void);
static gint32 ReadImage (FILE *fp,
tga_info *info,
const gchar *filename);
static gint32 ReadImage (FILE *fp,
tga_info *info,
const gchar *filename);
GimpPlugInInfo PLUG_IN_INFO =
......@@ -1184,13 +1184,12 @@ save_image (const gchar *filename,
return status;
}
static gint
static gboolean
save_dialog (void)
{
GtkWidget *dlg;
GtkWidget *toggle;
GtkWidget *origin;
GtkWidget *frame;
GtkWidget *vbox;
gboolean run;
......@@ -1203,14 +1202,10 @@ save_dialog (void)
NULL);
/* regular tga parameter settings */
frame = gtk_frame_new (_("Targa Options"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
gtk_container_add (GTK_CONTAINER (frame), vbox);
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);
/* rle */
toggle = gtk_check_button_new_with_mnemonic (_("_RLE compression"));
......@@ -1232,9 +1227,6 @@ save_dialog (void)
G_CALLBACK (gimp_toggle_button_update),
&tsvals.origin);
gtk_widget_show (vbox);
gtk_widget_show (frame);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......
......@@ -51,7 +51,7 @@ static void run (const gchar *name,
static GimpPDBStatusType threshold_alpha (gint32 drawable_id);
static gint threshold_alpha_dialog (void);
static gboolean threshold_alpha_dialog (void);
static GimpRunMode run_mode;
......@@ -212,11 +212,10 @@ threshold_alpha (gint32 drawable_id)
return GIMP_PDB_SUCCESS;
}
static gint
static gboolean
threshold_alpha_dialog (void)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *table;
GtkObject *adj;
gboolean run;
......@@ -232,16 +231,10 @@ threshold_alpha_dialog (void)
NULL);
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, FALSE, FALSE, 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_widget_show (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, FALSE, FALSE, 0); gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Threshold:"), SCALE_WIDTH, 0,
......
......@@ -2090,8 +2090,8 @@ save_dialog (void)
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, FALSE, TRUE, 0);
/* compression */
......@@ -2123,7 +2123,7 @@ save_dialog (void)
&tsvals.save_transp_pixels);
/* comment entry */
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......
......@@ -44,19 +44,19 @@ 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 gint32 tile (gint32 image_id,
gint32 drawable_id,
gint32 *layer_id);
static gint32 tile (gint32 image_id,
gint32 drawable_id,
gint32 *layer_id);
static gint tile_dialog (gint32 image_ID,
gint32 drawable_ID);
static gboolean tile_dialog (gint32 image_ID,
gint32 drawable_ID);
GimpPlugInInfo PLUG_IN_INFO =
......@@ -365,11 +365,12 @@ tile (gint32 image_id,
return new_image_id;
}
static gint
static gboolean
tile_dialog (gint32 image_ID,
gint32 drawable_ID)
{
GtkWidget *dlg;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *sizeentry;
GtkWidget *chainbutton;
......@@ -400,10 +401,13 @@ tile_dialog (gint32 image_ID,
NULL);
/* parameter settings */
frame = gtk_frame_new (_("Tile to New Size"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
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 = gimp_frame_new (_("Tile to New Size"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
sizeentry = gimp_coordinates_new (unit, "%a", TRUE, TRUE, 8,
......@@ -418,17 +422,15 @@ tile_dialog (gint32 image_ID,
_("_Height:"), height, yres,
1, GIMP_MAX_IMAGE_SIZE,
0, height);
gtk_container_set_border_width (GTK_CONTAINER (sizeentry), 4);
gtk_container_add (GTK_CONTAINER (frame), sizeentry);
gtk_table_set_row_spacing (GTK_TABLE (sizeentry), 1, 4);
gtk_table_set_row_spacing (GTK_TABLE (sizeentry), 1, 6);
gtk_widget_show (sizeentry);
chainbutton = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (sizeentry));
toggle = gtk_check_button_new_with_mnemonic (_("C_reate New Image"));
gtk_table_attach (GTK_TABLE (sizeentry), toggle, 0, 4, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), tvals.new_image);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
......
......@@ -101,7 +101,7 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static gint tileit_dialog (void);
static gboolean tileit_dialog (void);
static void tileit_scale_update (GtkAdjustment *adjustment,
gpointer data);
......@@ -343,26 +343,21 @@ run (const gchar *name,
gimp_drawable_detach (drawable);
}
/* Build the dialog up. This was the hard part! */
static gint
static gboolean
tileit_dialog (void)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *frame;
GtkWidget *xframe;
GtkWidget *table;
GtkWidget *sep;
GtkWidget *table2;
GtkWidget *button;
GtkWidget *label;
GtkWidget *spinbutton;
GtkObject *adj;
GtkObject *size_data;
GtkObject *op_data;
GtkObject *scale;
GtkWidget *toggle;
GSList *orientation_group = NULL;
gboolean run;
......@@ -380,34 +375,30 @@ tileit_dialog (void)
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, 6);
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
frame = gtk_frame_new ( _("Preview"));
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
vbox2 = gtk_vbox_new (TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 4);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
gtk_widget_show (vbox2);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
xframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (xframe), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox2), xframe, TRUE, FALSE, 0);
gtk_widget_show (xframe);
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);
tint.preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (tint.preview), preview_width, preview_height);
gtk_widget_set_events (GTK_WIDGET (tint.preview), PREVIEW_MASK);
gtk_container_add (GTK_CONTAINER (xframe), tint.preview);
gtk_container_add (GTK_CONTAINER (frame), tint.preview);
gtk_widget_show (tint.preview);
g_signal_connect_after (tint.preview, "expose_event",
G_CALLBACK (tileit_preview_expose),
......@@ -418,16 +409,15 @@ tileit_dialog (void)
/* Area for buttons etc */
frame = gtk_frame_new (_("Flipping"));
frame = gimp_frame_new (_("Flip"));
gtk_box_pack_start (GTK_BOX (hbox), 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);
hbox = gtk_hbox_new (TRUE, 4);
hbox = gtk_hbox_new (TRUE, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
......@@ -459,16 +449,11 @@ tileit_dialog (void)
G_CALLBACK (tileit_reset),
&res_call);
xframe = gtk_frame_new (_("Applied to Tile"));
gtk_box_pack_start (GTK_BOX (vbox), xframe, FALSE, FALSE, 0);
gtk_widget_show (xframe);
/* Table for the inner widgets..*/
table = gtk_table_new (6, 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);
gtk_container_add (GTK_CONTAINER (xframe), table);
table = gtk_table_new (4, 4, FALSE);
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);
toggle = gtk_radio_button_new_with_mnemonic (orientation_group,
......@@ -575,51 +560,42 @@ tileit_dialog (void)
g_object_set_data (G_OBJECT (spinbutton), "set_sensitive", button);
/* Widget for selecting the Opacity */
sep = gtk_hseparator_new ();
gtk_table_attach (GTK_TABLE (table), sep, 0, 4, 4, 5,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 1);
gtk_widget_show (sep);
table2 = gtk_table_new (1, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table2), 4);
gtk_table_attach_defaults (GTK_TABLE (table), table2, 0, 4, 5, 6);
gtk_table_set_col_spacings (GTK_TABLE (table2), 6);
gtk_box_pack_start (GTK_BOX (vbox), table2, FALSE, FALSE, 0);
gtk_widget_show (table2);
op_data = gimp_scale_entry_new (GTK_TABLE (table2), 0, 0,
_("O_pacity:"), SCALE_WIDTH, -1,
opacity, 0, 100, 1, 10, 0,
TRUE, 0, 0,
NULL, NULL);
g_signal_connect (op_data, "value_changed",
scale = gimp_scale_entry_new (GTK_TABLE (table2), 0, 0,
_("O_pacity:"), SCALE_WIDTH, -1,
opacity, 0, 100, 1, 10, 0,
TRUE, 0, 0,
NULL, NULL);
g_signal_connect (scale, "value_changed",
G_CALLBACK (tileit_scale_update),
&opacity);
gtk_widget_show (frame);
/* Lower frame saying howmany segments */
frame = gtk_frame_new (_("Segment Setting"));
frame = gimp_frame_new (_("Numer of Segments"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 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_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
gtk_widget_set_sensitive (table2, has_alpha);
size_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
"1 / (2 ** _n)", SCALE_WIDTH, -1,
itvals.numtiles, 2, MAX_SEGS, 1, 1, 0,
TRUE, 0, 0,
NULL, NULL);
g_signal_connect (size_data, "value_changed",
scale = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
"1 / (2 ** _n)", SCALE_WIDTH, -1,
itvals.numtiles, 2, MAX_SEGS, 1, 1, 0,
TRUE, 0, 0,
NULL, NULL);
g_signal_connect (scale, "value_changed",
G_CALLBACK (tileit_scale_update),
&itvals.numtiles);
gtk_widget_show (tint.preview);
gtk_widget_show (dlg);
dialog_update_preview ();
......
......@@ -183,9 +183,9 @@ new_unit (GtkWidget *main_dialog,
NULL);
table = gtk_table_new (7, 2, 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), 6);
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 (dialog)->vbox), table,
FALSE, FALSE, 0);
gtk_widget_show (table);
......@@ -197,7 +197,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_identifier (template));
}
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_ID:"), 1.0, 0.5,
_("_ID:"), 0.0, 0.5,
entry, 1, FALSE);
gimp_help_set_help_data (entry, gettext (columns[IDENTIFIER].help), NULL);
......@@ -208,7 +208,7 @@ new_unit (GtkWidget *main_dialog,
GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION,
0.01, 0.1, 0.0, 0.01, 5);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Factor:"), 1.0, 0.5,
_("_Factor:"), 0.0, 0.5,
spinbutton, 1, TRUE);
gimp_help_set_help_data (spinbutton, gettext (columns[FACTOR].help), NULL);
......@@ -218,7 +218,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_digits (template) : 2.0,
0, 5, 1, 1, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("_Digits:"), 1.0, 0.5,
_("_Digits:"), 0.0, 0.5,
spinbutton, 1, TRUE);
gimp_help_set_help_data (spinbutton, gettext (columns[DIGITS].help), NULL);
......@@ -230,7 +230,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_symbol (template));
}
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("_Symbol:"), 1.0, 0.5,
_("_Symbol:"), 0.0, 0.5,
entry, 1, FALSE);
gimp_help_set_help_data (entry, gettext (columns[SYMBOL].help), NULL);
......@@ -242,7 +242,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_abbreviation (template));
}
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
_("_Abbreviation:"), 1.0, 0.5,
_("_Abbreviation:"), 0.0, 0.5,
entry, 1, FALSE);
gimp_help_set_help_data (entry, gettext (columns[ABBREVIATION].help), NULL);
......@@ -254,7 +254,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_singular (template));
}
gimp_table_attach_aligned (GTK_TABLE (table), 0, 5,
_("Si_ngular:"), 1.0, 0.5,
_("Si_ngular:"), 0.0, 0.5,
entry, 1, FALSE);
gimp_help_set_help_data (entry, gettext (columns[SINGULAR].help), NULL);
......@@ -266,7 +266,7 @@ new_unit (GtkWidget *main_dialog,
gimp_unit_get_plural (template));
}
gimp_table_attach_aligned (GTK_TABLE (table), 0, 6,
_("_Plural:"), 1.0, 0.5,
_("_Plural:"), 0.0, 0.5,
entry, 1, FALSE);
gimp_help_set_help_data (entry, gettext (columns[PLURAL].help), NULL);
......@@ -508,7 +508,6 @@ static void
unit_editor_dialog (void)
{
GtkWidget *main_dialog;
GtkWidget *main_vbox;
GtkWidget *scrolled_win;
GtkWidget *toolbar;
GtkListStore *list_store;
......@@ -570,19 +569,15 @@ unit_editor_dialog (void)
G_CALLBACK (duplicate_callback), tv,
1);
/* the main vbox */
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (main_dialog)->vbox), main_vbox);
gtk_widget_show (main_vbox);
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_NEVER,
GTK_POLICY_ALWAYS);
gtk_container_add (GTK_CONTAINER (main_vbox), scrolled_win);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (main_dialog)->vbox),
scrolled_win);
gtk_widget_show (scrolled_win);
gtk_widget_set_size_request (tv, -1, 220);
......
......@@ -65,41 +65,41 @@ typedef struct
} UnsharpMaskInterface;
/* local function prototypes */
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static inline void blur_line (gdouble *ctable,
gdouble *cmatrix,
gint cmatrix_length,
guchar *cur_col,
guchar *dest_col,
gint y,
glong bytes);
static int gen_convolve_matrix (gdouble std_dev,
gdouble **cmatrix);
static gdouble* gen_lookup_table (gdouble *cmatrix,
gint cmatrix_length);
static void unsharp_region (GimpPixelRgn srcPTR,
GimpPixelRgn dstPTR,
gint width,
gint height,
gint bytes,
gdouble radius,
gdouble amount,
gint x1,
gint x2,
gint y1,
gint y2);
static void unsharp_mask (GimpDrawable *drawable,
gdouble radius,
gdouble amount);
static gint unsharp_mask_dialog (void);
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static inline void blur_line (gdouble *ctable,
gdouble *cmatrix,
gint cmatrix_length,
guchar *cur_col,
guchar *dest_col,
gint y,
glong bytes);
static gint gen_convolve_matrix (gdouble std_dev,
gdouble **cmatrix);
static gdouble * gen_lookup_table (gdouble *cmatrix,
gint cmatrix_length);
static void unsharp_region (GimpPixelRgn srcPTR,
GimpPixelRgn dstPTR,
gint width,
gint height,
gint bytes,
gdouble radius,
gdouble amount,
gint x1,
gint x2,
gint y1,
gint y2);
static void unsharp_mask (GimpDrawable *drawable,
gdouble radius,
gdouble amount);
static gboolean unsharp_mask_dialog (void);
/* create a few globals, set default values */
......@@ -629,11 +629,10 @@ gen_lookup_table (gdouble *cmatrix,
return lookup_table;
}
static gint
static gboolean
unsharp_mask_dialog (void)
{
GtkWidget *window;
GtkWidget *frame;
GtkWidget *table;
GtkObject *adj;
gboolean run;
......@@ -649,17 +648,12 @@ unsharp_mask_dialog (void)
NULL);
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->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_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), table,
FALSE, FALSE, 0);
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......
......@@ -1779,7 +1779,7 @@ static void run (const gchar *name,
static void video (GimpDrawable *drawable);
static gint video_dialog (void);
static gboolean video_dialog (void);
static void video_toggle_update (GtkWidget *widget,
gpointer data);
static void video_radio_update (GtkWidget *widget,
......@@ -2128,15 +2128,13 @@ video_render_preview (gint raw)
gtk_widget_queue_draw (preview);
}
static gint
static gboolean
video_dialog (void)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *radioframe;
GtkWidget *previewframe;
GtkWidget *vbox;
GtkWidget *box;
GtkWidget *hbox;
GtkWidget *toggle;
GSList *group = NULL;