minor cleanups.

2000-03-31  Michael Natterer  <mitch@gimp.org>

	* app/gimpdnd.[ch]: minor cleanups.

	* libgimp/gimpwidgets.c: don't set a border width for the
	radio_group's vbox if no frame around it was requested.

	* plug-ins/common/sample_colorize.c: add a separator between
	image and sample.

	* plug-ins/common/iwarp.c: use the libgimp ui functions, removed
	callbacks, a global s/gfloat/gdouble/, replaced the booleans
	toggling the transform mode with a single variable containing an
	enum value, indentation.
This commit is contained in:
Michael Natterer 2000-03-31 18:10:25 +00:00 committed by Michael Natterer
parent 753bc86ef0
commit e44df51a6d
9 changed files with 1467 additions and 1258 deletions

View File

@ -1,3 +1,18 @@
2000-03-31 Michael Natterer <mitch@gimp.org>
* app/gimpdnd.[ch]: minor cleanups.
* libgimp/gimpwidgets.c: don't set a border width for the
radio_group's vbox if no frame around it was requested.
* plug-ins/common/sample_colorize.c: add a separator between
image and sample.
* plug-ins/common/iwarp.c: use the libgimp ui functions, removed
callbacks, a global s/gfloat/gdouble/, replaced the booleans
toggling the transform mode with a single variable containing an
enum value, indentation.
2000-03-31 Sven Neumann <neo@wintermute.ochsenblut.de>
* plug-ins/script-fu/scripts/beveled-pattern-heading.scm

View File

@ -167,6 +167,7 @@ static GimpDndDataDef dnd_data_defs[] =
NULL,
NULL,
NULL
},
{

View File

@ -100,49 +100,61 @@ typedef enum
/* color dnd functions */
typedef void (* GimpDndDropColorFunc) (GtkWidget *, guchar, guchar, guchar,
gpointer);
typedef void (* GimpDndDragColorFunc) (GtkWidget *, guchar *, guchar *, guchar *,
gpointer);
typedef void (* GimpDndDropColorFunc) (GtkWidget *widget,
guchar r,
guchar g,
guchar b,
gpointer data);
typedef void (* GimpDndDragColorFunc) (GtkWidget *widget,
guchar *r,
guchar *g,
guchar *b,
gpointer data);
void gimp_dnd_color_source_set (GtkWidget *widget,
GimpDndDragColorFunc get_color_func,
gpointer data);
void gimp_dnd_color_dest_set (GtkWidget *widget,
GimpDndDropColorFunc set_color_func,
gpointer data);
void gimp_dnd_color_source_set (GtkWidget *widget,
GimpDndDragColorFunc get_color_func,
gpointer data);
void gimp_dnd_color_dest_set (GtkWidget *widget,
GimpDndDropColorFunc set_color_func,
gpointer data);
/* brush dnd functions */
typedef void (* GimpDndDropBrushFunc) (GtkWidget *, GimpBrush *,
gpointer);
typedef GimpBrush * (* GimpDndDragBrushFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropBrushFunc) (GtkWidget *widget,
GimpBrush *brush,
gpointer data);
typedef GimpBrush * (* GimpDndDragBrushFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_brush_source_set (GtkWidget *widget,
GimpDndDragBrushFunc get_brush_func,
gpointer data);
void gimp_dnd_brush_dest_set (GtkWidget *widget,
GimpDndDropBrushFunc set_brush_func,
gpointer data);
void gimp_dnd_brush_source_set (GtkWidget *widget,
GimpDndDragBrushFunc get_brush_func,
gpointer data);
void gimp_dnd_brush_dest_set (GtkWidget *widget,
GimpDndDropBrushFunc set_brush_func,
gpointer data);
/* pattern dnd functions */
typedef void (* GimpDndDropPatternFunc) (GtkWidget *, GPattern *,
gpointer);
typedef GPattern * (* GimpDndDragPatternFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropPatternFunc) (GtkWidget *widget,
GPattern *pattern,
gpointer data);
typedef GPattern * (* GimpDndDragPatternFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_pattern_source_set (GtkWidget *widget,
GimpDndDragPatternFunc get_pattern_func,
gpointer data);
void gimp_dnd_pattern_dest_set (GtkWidget *widget,
GimpDndDropPatternFunc set_pattern_func,
gpointer data);
void gimp_dnd_pattern_source_set (GtkWidget *widget,
GimpDndDragPatternFunc get_pattern_func,
gpointer data);
void gimp_dnd_pattern_dest_set (GtkWidget *widget,
GimpDndDropPatternFunc set_pattern_func,
gpointer data);
/* gradient dnd functions */
typedef void (* GimpDndDropGradientFunc) (GtkWidget *, gradient_t *,
gpointer);
typedef gradient_t * (* GimpDndDragGradientFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropGradientFunc) (GtkWidget *widget,
gradient_t *gradient,
gpointer data);
typedef gradient_t * (* GimpDndDragGradientFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_gradient_source_set (GtkWidget *widget,
GimpDndDragGradientFunc get_gradient_func,
@ -153,29 +165,33 @@ void gimp_dnd_gradient_dest_set (GtkWidget *widget,
/* palette dnd functions */
typedef void (* GimpDndDropPaletteFunc) (GtkWidget *,
PaletteEntries *,
gpointer);
typedef PaletteEntries * (* GimpDndDragPaletteFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropPaletteFunc) (GtkWidget *widget,
PaletteEntries *palette,
gpointer data);
typedef PaletteEntries * (* GimpDndDragPaletteFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_palette_source_set (GtkWidget *widget,
GimpDndDragPaletteFunc get_palette_func,
gpointer data);
void gimp_dnd_palette_dest_set (GtkWidget *widget,
GimpDndDropPaletteFunc set_palette_func,
gpointer data);
void gimp_dnd_palette_source_set (GtkWidget *widget,
GimpDndDragPaletteFunc get_palette_func,
gpointer data);
void gimp_dnd_palette_dest_set (GtkWidget *widget,
GimpDndDropPaletteFunc set_palette_func,
gpointer data);
/* tool dnd functions */
typedef void (* GimpDndDropToolFunc) (GtkWidget *, ToolType, gpointer);
typedef ToolType (* GimpDndDragToolFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropToolFunc) (GtkWidget *widget,
ToolType tool,
gpointer data);
typedef ToolType (* GimpDndDragToolFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_tool_source_set (GtkWidget *widget,
GimpDndDragToolFunc get_tool_func,
gpointer data);
void gimp_dnd_tool_dest_set (GtkWidget *widget,
GimpDndDropToolFunc set_tool_func,
gpointer data);
void gimp_dnd_tool_source_set (GtkWidget *widget,
GimpDndDragToolFunc get_tool_func,
gpointer data);
void gimp_dnd_tool_dest_set (GtkWidget *widget,
GimpDndDropToolFunc set_tool_func,
gpointer data);
/* drawable dnd functions */

View File

@ -167,6 +167,7 @@ static GimpDndDataDef dnd_data_defs[] =
NULL,
NULL,
NULL
},
{

View File

@ -100,49 +100,61 @@ typedef enum
/* color dnd functions */
typedef void (* GimpDndDropColorFunc) (GtkWidget *, guchar, guchar, guchar,
gpointer);
typedef void (* GimpDndDragColorFunc) (GtkWidget *, guchar *, guchar *, guchar *,
gpointer);
typedef void (* GimpDndDropColorFunc) (GtkWidget *widget,
guchar r,
guchar g,
guchar b,
gpointer data);
typedef void (* GimpDndDragColorFunc) (GtkWidget *widget,
guchar *r,
guchar *g,
guchar *b,
gpointer data);
void gimp_dnd_color_source_set (GtkWidget *widget,
GimpDndDragColorFunc get_color_func,
gpointer data);
void gimp_dnd_color_dest_set (GtkWidget *widget,
GimpDndDropColorFunc set_color_func,
gpointer data);
void gimp_dnd_color_source_set (GtkWidget *widget,
GimpDndDragColorFunc get_color_func,
gpointer data);
void gimp_dnd_color_dest_set (GtkWidget *widget,
GimpDndDropColorFunc set_color_func,
gpointer data);
/* brush dnd functions */
typedef void (* GimpDndDropBrushFunc) (GtkWidget *, GimpBrush *,
gpointer);
typedef GimpBrush * (* GimpDndDragBrushFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropBrushFunc) (GtkWidget *widget,
GimpBrush *brush,
gpointer data);
typedef GimpBrush * (* GimpDndDragBrushFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_brush_source_set (GtkWidget *widget,
GimpDndDragBrushFunc get_brush_func,
gpointer data);
void gimp_dnd_brush_dest_set (GtkWidget *widget,
GimpDndDropBrushFunc set_brush_func,
gpointer data);
void gimp_dnd_brush_source_set (GtkWidget *widget,
GimpDndDragBrushFunc get_brush_func,
gpointer data);
void gimp_dnd_brush_dest_set (GtkWidget *widget,
GimpDndDropBrushFunc set_brush_func,
gpointer data);
/* pattern dnd functions */
typedef void (* GimpDndDropPatternFunc) (GtkWidget *, GPattern *,
gpointer);
typedef GPattern * (* GimpDndDragPatternFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropPatternFunc) (GtkWidget *widget,
GPattern *pattern,
gpointer data);
typedef GPattern * (* GimpDndDragPatternFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_pattern_source_set (GtkWidget *widget,
GimpDndDragPatternFunc get_pattern_func,
gpointer data);
void gimp_dnd_pattern_dest_set (GtkWidget *widget,
GimpDndDropPatternFunc set_pattern_func,
gpointer data);
void gimp_dnd_pattern_source_set (GtkWidget *widget,
GimpDndDragPatternFunc get_pattern_func,
gpointer data);
void gimp_dnd_pattern_dest_set (GtkWidget *widget,
GimpDndDropPatternFunc set_pattern_func,
gpointer data);
/* gradient dnd functions */
typedef void (* GimpDndDropGradientFunc) (GtkWidget *, gradient_t *,
gpointer);
typedef gradient_t * (* GimpDndDragGradientFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropGradientFunc) (GtkWidget *widget,
gradient_t *gradient,
gpointer data);
typedef gradient_t * (* GimpDndDragGradientFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_gradient_source_set (GtkWidget *widget,
GimpDndDragGradientFunc get_gradient_func,
@ -153,29 +165,33 @@ void gimp_dnd_gradient_dest_set (GtkWidget *widget,
/* palette dnd functions */
typedef void (* GimpDndDropPaletteFunc) (GtkWidget *,
PaletteEntries *,
gpointer);
typedef PaletteEntries * (* GimpDndDragPaletteFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropPaletteFunc) (GtkWidget *widget,
PaletteEntries *palette,
gpointer data);
typedef PaletteEntries * (* GimpDndDragPaletteFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_palette_source_set (GtkWidget *widget,
GimpDndDragPaletteFunc get_palette_func,
gpointer data);
void gimp_dnd_palette_dest_set (GtkWidget *widget,
GimpDndDropPaletteFunc set_palette_func,
gpointer data);
void gimp_dnd_palette_source_set (GtkWidget *widget,
GimpDndDragPaletteFunc get_palette_func,
gpointer data);
void gimp_dnd_palette_dest_set (GtkWidget *widget,
GimpDndDropPaletteFunc set_palette_func,
gpointer data);
/* tool dnd functions */
typedef void (* GimpDndDropToolFunc) (GtkWidget *, ToolType, gpointer);
typedef ToolType (* GimpDndDragToolFunc) (GtkWidget *, gpointer);
typedef void (* GimpDndDropToolFunc) (GtkWidget *widget,
ToolType tool,
gpointer data);
typedef ToolType (* GimpDndDragToolFunc) (GtkWidget *widget,
gpointer data);
void gimp_dnd_tool_source_set (GtkWidget *widget,
GimpDndDragToolFunc get_tool_func,
gpointer data);
void gimp_dnd_tool_dest_set (GtkWidget *widget,
GimpDndDropToolFunc set_tool_func,
gpointer data);
void gimp_dnd_tool_source_set (GtkWidget *widget,
GimpDndDragToolFunc get_tool_func,
gpointer data);
void gimp_dnd_tool_dest_set (GtkWidget *widget,
GimpDndDropToolFunc set_tool_func,
gpointer data);
/* drawable dnd functions */

View File

@ -305,7 +305,6 @@ gimp_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
group = NULL;
@ -351,6 +350,8 @@ gimp_radio_group_new (gboolean in_frame,
{
GtkWidget *frame;
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
frame = gtk_frame_new (frame_title);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
@ -401,7 +402,6 @@ gimp_radio_group_new2 (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
group = NULL;
@ -444,6 +444,8 @@ gimp_radio_group_new2 (gboolean in_frame,
{
GtkWidget *frame;
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
frame = gtk_frame_new (frame_title);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);

View File

@ -305,7 +305,6 @@ gimp_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
group = NULL;
@ -351,6 +350,8 @@ gimp_radio_group_new (gboolean in_frame,
{
GtkWidget *frame;
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
frame = gtk_frame_new (frame_title);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
@ -401,7 +402,6 @@ gimp_radio_group_new2 (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
group = NULL;
@ -444,6 +444,8 @@ gimp_radio_group_new2 (gboolean in_frame,
{
GtkWidget *frame;
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
frame = gtk_frame_new (frame_title);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);

File diff suppressed because it is too large Load Diff

View File

@ -1340,6 +1340,7 @@ p_smp_dialog (void)
GtkWidget *menu;
GtkWidget *menu_item;
GtkWidget *spinbutton;
GtkWidget *sep;
GtkObject *data;
guchar *color_cube;
gint l_ty;
@ -1403,12 +1404,17 @@ p_smp_dialog (void)
frame, TRUE, TRUE, 0);
/* table for values */
table = gtk_table_new (7, 4, FALSE);
table = gtk_table_new (7, 5, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
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);
/* separator */
sep = gtk_vseparator_new ();
gtk_table_attach_defaults (GTK_TABLE (table), sep, 2, 3, 0, 7);
gtk_widget_show (sep);
l_ty = 0;
/* layer optionmenu (Dst) */
label = gtk_label_new (_("Destination:"));
@ -1432,12 +1438,12 @@ p_smp_dialog (void)
/* layer optionmenu (Sample) */
label = gtk_label_new (_("Sample:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, l_ty, l_ty+1,
gtk_table_attach (GTK_TABLE (table), label, 3, 4, l_ty, l_ty+1,
GTK_FILL, GTK_FILL, 4, 0);
gtk_widget_show (label);
option_menu = gtk_option_menu_new ();
gtk_table_attach (GTK_TABLE (table), option_menu, 3, 4, l_ty, l_ty+1,
gtk_table_attach (GTK_TABLE (table), option_menu, 4, 5, l_ty, l_ty+1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (option_menu);
@ -1492,7 +1498,7 @@ p_smp_dialog (void)
gtk_widget_show (check_button);
hbox = gtk_hbox_new (FALSE, 4);
gtk_table_attach (GTK_TABLE (table), hbox, 2, 4, l_ty, l_ty+1,
gtk_table_attach (GTK_TABLE (table), hbox, 3, 5, l_ty, l_ty+1,
GTK_FILL, 0, 0, 0);
gtk_widget_show (hbox);
@ -1535,7 +1541,7 @@ p_smp_dialog (void)
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
gtk_table_attach (GTK_TABLE (table), pframe, 2, 4, l_ty, l_ty+1, 0, 0, 0, 0);
gtk_table_attach (GTK_TABLE (table), pframe, 3, 5, l_ty, l_ty+1, 0, 0, 0, 0);
gtk_widget_show (pframe);
g_di.sample_preview = gtk_preview_new (GTK_PREVIEW_COLOR);
@ -1584,7 +1590,7 @@ p_smp_dialog (void)
vbox2 = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (pframe), vbox2);
gtk_table_attach (GTK_TABLE (table), pframe, 2, 4, l_ty, l_ty+1, 0, 0, 0, 0);
gtk_table_attach (GTK_TABLE (table), pframe, 3, 5, l_ty, l_ty+1, 0, 0, 0, 0);
g_di.sample_colortab_preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (g_di.sample_colortab_preview),
@ -1663,7 +1669,7 @@ p_smp_dialog (void)
/* Horizontal box for OUTPUT levels text widget */
hbox = gtk_hbox_new (TRUE, 4);
gtk_table_attach (GTK_TABLE (table), hbox, 2, 4, l_ty, l_ty+1,
gtk_table_attach (GTK_TABLE (table), hbox, 3, 5, l_ty, l_ty+1,
GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Out Level:"));
@ -1729,7 +1735,7 @@ p_smp_dialog (void)
gtk_widget_show (check_button);
hbox = gtk_hbox_new (FALSE, 4);
gtk_table_attach (GTK_TABLE (table), hbox, 2, 4, l_ty, l_ty+1,
gtk_table_attach (GTK_TABLE (table), hbox, 3, 5, l_ty, l_ty+1,
GTK_FILL, 0, 0, 0);
gtk_widget_show (hbox);