Commit c55bbde0 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/gimpui.[ch] removed & renamed some functions from gimpui.[ch] (see

2000-01-13  Michael Natterer  <mitch@gimp.org>

	* app/gimpui.[ch]
	* app/preferences_dialog.c: removed & renamed some functions from
	gimpui.[ch] (see below).

	* libgimp/Makefile.am
	* libgimp/gimpwidgets.[ch]; new files. Functions moved from
	app/gimpui.[ch]. Added a constructor for the label + hscale +
	entry combination used in many plugins (now hscale + spinbutton).

	* libgimp/gimpui.h: include gimpwidgets.h

	* plug-ins/megawidget/megawidget.[ch]: removed all functions
	except the preview stuff (I'm not yet sure how to implement this
	in libgimp because the libgimp preview should be general enough to
	replace all the other plugin previews, too).

	* plug-ins/borderaverage/Makefile.am
	* plug-ins/borderaverage/borderaverage.c
	* plug-ins/common/plugin-defs.pl
	* plug-ins/common/Makefile.am
	* plug-ins/common/aa.c
	* plug-ins/common/align_layers.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/blinds.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/colorify.c
	* plug-ins/common/convmatrix.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/destripe.c
	* plug-ins/common/displace.c
	* plug-ins/common/edge.c
	* plug-ins/common/emboss.c
	* plug-ins/common/hot.c
	* plug-ins/common/nlfilt.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/waves.c
	* plug-ins/sgi/sgi.c
	* plug-ins/sinus/sinus.c: ui updates like removing megawidget,
	using the dialog constructor, I18N fixes, indentation, ...
parent a46e4563
2000-01-13 Michael Natterer <mitch@gimp.org>
* app/gimpui.[ch]
* app/preferences_dialog.c: removed & renamed some functions from
gimpui.[ch] (see below).
* libgimp/Makefile.am
* libgimp/gimpwidgets.[ch]; new files. Functions moved from
app/gimpui.[ch]. Added a constructor for the label + hscale +
entry combination used in many plugins (now hscale + spinbutton).
* libgimp/gimpui.h: include gimpwidgets.h
* plug-ins/megawidget/megawidget.[ch]: removed all functions
except the preview stuff (I'm not yet sure how to implement this
in libgimp because the libgimp preview should be general enough to
replace all the other plugin previews, too).
* plug-ins/borderaverage/Makefile.am
* plug-ins/borderaverage/borderaverage.c
* plug-ins/common/plugin-defs.pl
* plug-ins/common/Makefile.am
* plug-ins/common/aa.c
* plug-ins/common/align_layers.c
* plug-ins/common/animationplay.c
* plug-ins/common/apply_lens.c
* plug-ins/common/blinds.c
* plug-ins/common/bumpmap.c
* plug-ins/common/checkerboard.c
* plug-ins/common/colorify.c
* plug-ins/common/convmatrix.c
* plug-ins/common/cubism.c
* plug-ins/common/curve_bend.c
* plug-ins/common/deinterlace.c
* plug-ins/common/despeckle.c
* plug-ins/common/destripe.c
* plug-ins/common/displace.c
* plug-ins/common/edge.c
* plug-ins/common/emboss.c
* plug-ins/common/hot.c
* plug-ins/common/nlfilt.c
* plug-ins/common/pixelize.c
* plug-ins/common/waves.c
* plug-ins/sgi/sgi.c
* plug-ins/sinus/sinus.c: ui updates like removing megawidget,
using the dialog constructor, I18N fixes, indentation, ...
Thu Jan 13 00:46:16 CET 2000 Daniel Egger <Daniel.Egger@suse.de>
* app/plug_in.c: replace spaces to be inserted in pluginrc
......
......@@ -854,7 +854,7 @@ static void
file_prefs_preview_size_callback (GtkWidget *widget,
gpointer data)
{
lc_dialog_rebuild ((long) data);
lc_dialog_rebuild ((long) gtk_object_get_user_data (GTK_OBJECT (widget)));
layer_select_update_preview_size ();
}
......@@ -862,7 +862,7 @@ static void
file_prefs_nav_preview_size_callback (GtkWidget *widget,
gpointer data)
{
nav_preview_size = (gint) data;
nav_preview_size = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));;
gdisplays_nav_preview_resized ();
}
......@@ -1518,9 +1518,11 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) default_type,
_("RGB"), &default_type, (gpointer) RGB,
_("Grayscale"), &default_type, (gpointer) GRAY,
&default_type, (gpointer) default_type,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Default Image Type:"), 1.0, 0.5,
......@@ -1555,19 +1557,15 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) transparency_type,
_("Light Checks"),
&transparency_type, (gpointer) LIGHT_CHECKS,
_("Mid-Tone Checks"),
&transparency_type, (gpointer) GRAY_CHECKS,
_("Dark Checks"),
&transparency_type, (gpointer) DARK_CHECKS,
_("White Only"),
&transparency_type, (gpointer) WHITE_ONLY,
_("Gray Only"),
&transparency_type, (gpointer) GRAY_ONLY,
_("Black Only"),
&transparency_type, (gpointer) BLACK_ONLY,
&transparency_type, (gpointer) transparency_type,
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
_("White Only"), (gpointer) WHITE_ONLY, NULL,
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Transparency Type:"), 1.0, 0.5,
......@@ -1575,13 +1573,12 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) transparency_size,
_("Small"),
&transparency_size, (gpointer) SMALL_CHECKS,
_("Medium"),
&transparency_size, (gpointer) MEDIUM_CHECKS,
_("Large"),
&transparency_size, (gpointer) LARGE_CHECKS,
&transparency_type, (gpointer) transparency_size,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
......@@ -1602,13 +1599,15 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"), &interpolation_type,
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION,
_("Linear"), &interpolation_type,
(gpointer) LINEAR_INTERPOLATION,
_("Cubic (Slow)"), &interpolation_type,
(gpointer) CUBIC_INTERPOLATION,
&interpolation_type, (gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Interpolation Type:"), 1.0, 0.5,
......@@ -1650,23 +1649,27 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_preview_size_callback,
(gpointer) preview_size,
_("None"), (gpointer) 0, (gpointer) 0,
_("Tiny"), (gpointer) 24, (gpointer) 24,
_("Small"), (gpointer) 32, (gpointer) 32,
_("Medium"), (gpointer) 48, (gpointer) 48,
_("Large"), (gpointer) 64, (gpointer) 64,
_("Huge"), (gpointer) 128, (gpointer) 128,
&preview_size, (gpointer) preview_size,
_("None"), (gpointer) 0, NULL,
_("Tiny"), (gpointer) 24, NULL,
_("Small"), (gpointer) 32, NULL,
_("Medium"), (gpointer) 48, NULL,
_("Large"), (gpointer) 64, NULL,
_("Huge"), (gpointer) 128, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
optionmenu =
gimp_option_menu_new (file_prefs_nav_preview_size_callback,
(gpointer) nav_preview_size,
_("Small"), (gpointer) 48, (gpointer) 48,
_("Medium"), (gpointer) 80, (gpointer) 80,
_("Large"), (gpointer) 112, (gpointer) 112,
&nav_preview_size, (gpointer) nav_preview_size,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
......@@ -1753,11 +1756,11 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) help_browser,
_("Internal"), &help_browser,
(gpointer) HELP_BROWSER_GIMP,
_("Netscape"), &help_browser,
(gpointer) HELP_BROWSER_NETSCAPE,
&help_browser, (gpointer) help_browser,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Help Browser to Use:"), 1.0, 0.5,
......@@ -2005,10 +2008,12 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
(gpointer) mem_size_unit,
_("Bytes"), adjustment, (gpointer) 1,
_("KiloBytes"), adjustment, (gpointer) 1024,
_("MegaBytes"), adjustment, (gpointer) (1024*1024),
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
......@@ -2046,10 +2051,12 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
(gpointer) mem_size_unit,
_("Bytes"), adjustment, (gpointer) 1,
_("KiloBytes"), adjustment, (gpointer) 1024,
_("MegaBytes"), adjustment, (gpointer) (1024*1024),
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
......@@ -2106,19 +2113,24 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) thumbnail_mode,
_("Always"), &thumbnail_mode, (gpointer) 1,
_("Never"), &thumbnail_mode, (gpointer) 0,
&thumbnail_mode, (gpointer) thumbnail_mode,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
optionmenu, TRUE);
optionmenu = gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) trust_dirty_flag,
_("Only when modified"), &trust_dirty_flag, (gpointer) 1,
_("Always"), &trust_dirty_flag, (gpointer) 0,
NULL);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
& trust_dirty_flag, (gpointer) trust_dirty_flag,
_("Only when modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("'File > Save' saves the image:"), 1.0, 0.5,
optionmenu, TRUE);
......
......@@ -24,181 +24,6 @@
#include "libgimp/gimpsizeentry.h"
#include "libgimp/gimpintl.h"
/* #include "pixmaps/wilber.xpm" */
/*
* Widget Constructors...
*/
GtkWidget *
gimp_option_menu_new (GtkSignalFunc menu_item_callback,
gpointer initial, /* user_data */
/* specify menu items as va_list:
* gchar *label,
* gpointer data,
* gpointer user_data,
*/
...)
{
GtkWidget *menu;
GtkWidget *menuitem;
GtkWidget *optionmenu;
/* menu item variables */
gchar *label;
gpointer data;
gpointer user_data;
va_list args;
gint i;
gint initial_index;
menu = gtk_menu_new ();
/* create the menu items */
initial_index = 0;
va_start (args, initial);
label = va_arg (args, gchar*);
for (i = 0; label; i++)
{
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
menuitem = gtk_menu_item_new_with_label (label);
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
menu_item_callback, data);
gtk_object_set_user_data (GTK_OBJECT (menuitem), user_data);
gtk_widget_show (menuitem);
/* remember the initial menu item */
if (user_data == initial)
initial_index = i;
label = va_arg (args, gchar*);
}
va_end (args);
optionmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
/* select the initial menu item */
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
return optionmenu;
}
GtkWidget *
gimp_radio_group_new (gboolean in_frame,
gchar *frame_title,
/* specify radio buttons as va_list:
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active,
*/
...)
{
GtkWidget *vbox;
GtkWidget *frame = NULL;
GtkWidget *button;
GSList *group;
/* radio button variables */
gchar *label;
GtkSignalFunc callback;
gpointer data;
gpointer user_data;
GtkWidget **widget_ptr;
gboolean active;
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
if (in_frame)
{
frame = gtk_frame_new (frame_title);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
}
group = NULL;
/* create the radio buttons */
va_start (args, frame_title);
label = va_arg (args, gchar*);
while (label)
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
active = va_arg (args, gboolean);
button = gtk_radio_button_new_with_label (group, label);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (callback),
data);
if (user_data)
gtk_object_set_user_data (GTK_OBJECT (button), user_data);
if (widget_ptr)
*widget_ptr = button;
/* press the initially active radio button */
if (active)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_widget_show (button);
label = va_arg (args, gchar*);
}
va_end (args);
if (in_frame)
return frame;
return vbox;
}
GtkWidget *
gimp_spin_button_new (GtkObject **adjustment, /* return value */
gfloat value,
gfloat lower,
gfloat upper,
gfloat step_increment,
gfloat page_increment,
gfloat page_size,
gfloat climb_rate,
guint digits)
{
GtkWidget *spinbutton;
*adjustment = gtk_adjustment_new (value, lower, upper,
step_increment, page_increment, page_size);
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (*adjustment),
climb_rate, digits);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton),
GTK_SHADOW_NONE);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, -1);
return spinbutton;
}
/*
* String, integer, double and size query boxes
*/
......@@ -215,15 +40,15 @@ struct _QueryBox
gpointer data;
};
static QueryBox * create_query_box (gchar *, GimpHelpFunc, gchar *,
GtkSignalFunc,
gchar *, GtkObject *, gchar *,
GimpQueryFunc, gpointer);
static void query_box_cancel_callback (GtkWidget *, gpointer);
static void string_query_box_ok_callback (GtkWidget *, gpointer);
static void int_query_box_ok_callback (GtkWidget *, gpointer);
static void double_query_box_ok_callback (GtkWidget *, gpointer);
static void size_query_box_ok_callback (GtkWidget *, gpointer);
static QueryBox * create_query_box (gchar *, GimpHelpFunc, gchar *,
GtkSignalFunc,
gchar *, GtkObject *, gchar *,
GimpQueryFunc, gpointer);
static void query_box_cancel_callback (GtkWidget *, gpointer);
static void string_query_box_ok_callback (GtkWidget *, gpointer);
static void int_query_box_ok_callback (GtkWidget *, gpointer);
static void double_query_box_ok_callback (GtkWidget *, gpointer);
static void size_query_box_ok_callback (GtkWidget *, gpointer);
/* create a generic query box without any entry widget */
static QueryBox *
......@@ -676,44 +501,3 @@ gimp_message_box_close_callback (GtkWidget *widget,
g_free (msg_box);
}
/*
* Helper Functions...
*/
/* add aligned label & widget to a two-column table */
void
gimp_table_attach_aligned (GtkTable *table,
gint row,
gchar *text,
gfloat xalign,
gfloat yalign,
GtkWidget *widget,
gboolean left_adjust)
{
GtkWidget *label;
label = gtk_label_new (text);
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
gtk_table_attach (table, GTK_WIDGET (label), 0, 1, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
if (left_adjust)
{
GtkWidget *alignment;
alignment = gtk_alignment_new (0.0, 1.0, 0.0, 0.0);
gtk_table_attach_defaults (table, alignment, 1, 2, row, row + 1);
gtk_widget_show (alignment);
gtk_container_add (GTK_CONTAINER (alignment), widget);
}
else
{
gtk_table_attach_defaults (table, widget, 1, 2, row, row + 1);
}
gtk_widget_show (widget);
}
......@@ -27,50 +27,11 @@
#include "libgimp/gimpdialog.h"
#include "libgimp/gimpunit.h"
#include "libgimp/gimpwidgets.h"
/* typedefs */
typedef void (* GimpQueryFunc) (GtkWidget *, gpointer, gpointer);
/* widget constructors */
GtkWidget * gimp_option_menu_new (GtkSignalFunc menu_item_callback,
gpointer initial, /* user_data */
/* specify menu items as va_list:
* gchar *label,
* gpointer data,
* gpointer user_data,
*/
...);
GtkWidget * gimp_radio_group_new (gboolean in_frame,
gchar *frame_title,
/* specify radio buttons as va_list:
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active,
*/
...);
GtkWidget * gimp_spin_button_new (/* return value: */
GtkObject **adjustment,
gfloat value,
gfloat lower,
gfloat upper,
gfloat step_increment,
gfloat page_increment,
gfloat page_size,
gfloat climb_rate,
guint digits);
/* some simple query dialogs
* if object != NULL then the query boxes will connect their cancel callback
* to the provided signal of this object
......
......@@ -854,7 +854,7 @@ static void
file_prefs_preview_size_callback (GtkWidget *widget,
gpointer data)
{
lc_dialog_rebuild ((long) data);
lc_dialog_rebuild ((long) gtk_object_get_user_data (GTK_OBJECT (widget)));
layer_select_update_preview_size ();
}
......@@ -862,7 +862,7 @@ static void
file_prefs_nav_preview_size_callback (GtkWidget *widget,
gpointer data)
{
nav_preview_size = (gint) data;
nav_preview_size = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));;
gdisplays_nav_preview_resized ();
}
......@@ -1518,9 +1518,11 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) default_type,
_("RGB"), &default_type, (gpointer) RGB,
_("Grayscale"), &default_type, (gpointer) GRAY,
&default_type, (gpointer) default_type,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Default Image Type:"), 1.0, 0.5,
......@@ -1555,19 +1557,15 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) transparency_type,
_("Light Checks"),
&transparency_type, (gpointer) LIGHT_CHECKS,
_("Mid-Tone Checks"),
&transparency_type, (gpointer) GRAY_CHECKS,
_("Dark Checks"),
&transparency_type, (gpointer) DARK_CHECKS,
_("White Only"),
&transparency_type, (gpointer) WHITE_ONLY,
_("Gray Only"),
&transparency_type, (gpointer) GRAY_ONLY,
_("Black Only"),
&transparency_type, (gpointer) BLACK_ONLY,
&transparency_type, (gpointer) transparency_type,
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
_("White Only"), (gpointer) WHITE_ONLY, NULL,
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Transparency Type:"), 1.0, 0.5,
......@@ -1575,13 +1573,12 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) transparency_size,
_("Small"),
&transparency_size, (gpointer) SMALL_CHECKS,
_("Medium"),
&transparency_size, (gpointer) MEDIUM_CHECKS,
_("Large"),
&transparency_size, (gpointer) LARGE_CHECKS,
&transparency_type, (gpointer) transparency_size,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
......@@ -1602,13 +1599,15 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
(gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"), &interpolation_type,
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION,
_("Linear"), &interpolation_type,
(gpointer) LINEAR_INTERPOLATION,
_("Cubic (Slow)"), &interpolation_type,
(gpointer) CUBIC_INTERPOLATION,
&interpolation_type, (gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Interpolation Type:"), 1.0, 0.5,
......@@ -1650,23 +1649,27 @@ file_pref_cmd_callback (GtkWidget *widget,
optionmenu =
gimp_option_menu_new (file_prefs_preview_size_callback,
(gpointer) preview_size,
_("None"), (gpointer) 0, (gpointer) 0,
_("Tiny"), (gpointer) 24, (gpointer) 24,
_("Small"), (gpointer) 32, (gpointer) 32,
_("Medium"), (gpointer) 48, (gpointer) 48,
_("Large"), (gpointer) 64, (gpointer) 64,
_("Huge"), (gpointer) 128, (gpointer) 128,
&preview_size, (gpointer) preview_size,
_("None"), (gpointer) 0, NULL,
_("Tiny"), (gpointer) 24, NULL,
_("Small"), (gpointer) 32, NULL,
_("Medium"), (gpointer) 48, NULL,
_("Large"), (gpointer) 64, NULL,
_("Huge"), (gpointer) 128, NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
optionmenu =
gimp_option_menu_new (file_prefs_nav_preview_size_callback,
(gpointer) nav_preview_size,
_("Small"), (gpointer) 48, (gpointer) 48,
_("Medium"), (gpointer) 80, (gpointer) 80,
_("Large"), (gpointer) 112, (gpointer) 112,
&nav_preview_size, (gpointer) nav_preview_size,
_("Small"), (gpointer) 48, NULL