added one more option menu constructor and made the namespace more

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

	* libgimp/gimpwidgets.[ch]: added one more option menu constructor
	and made the namespace more consistent, minor fixes.

	* libgimp/gimpdialog.c
	* libgimp/gimpunitmenu.c: minor fixes.

	* app/preferences_dialog.c
	* plug-ins/borderaverage/borderaverage.c
	* plug-ins/common/gif.c
	* plug-ins/common/randomize.c: changed according to the above
	namespace cleanups.
This commit is contained in:
Michael Natterer 2000-01-27 01:22:27 +00:00 committed by Michael Natterer
parent ea27590213
commit 38c66a651c
16 changed files with 553 additions and 322 deletions

View File

@ -1,3 +1,17 @@
2000-01-28 Michael Natterer <mitch@gimp.org>
* libgimp/gimpwidgets.[ch]: added one more option menu constructor
and made the namespace more consistent, minor fixes.
* libgimp/gimpdialog.c
* libgimp/gimpunitmenu.c: minor fixes.
* app/preferences_dialog.c
* plug-ins/borderaverage/borderaverage.c
* plug-ins/common/gif.c
* plug-ins/common/randomize.c: changed according to the above
namespace cleanups.
Thu Jan 27 23:54:05 CET 2000 Sven Neumann <sven@gimp.org>
* plug-ins/common/newsprint.c

View File

@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Default Image Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_type, (gpointer) transparency_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&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,
_("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);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Transparency Type:"), 1.0, 0.5,
optionmenu, TRUE);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
*/
optionmenu =
gimp_option_menu_new (file_prefs_preview_size_callback,
&preview_size, (gpointer) preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
&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,
_("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);
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,
&nav_preview_size, (gpointer) nav_preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
&nav_preview_size, (gpointer) nav_preview_size,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Help Browser to Use:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Interpolation Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
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,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
optionmenu, TRUE);

View File

@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Default Image Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_type, (gpointer) transparency_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&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,
_("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);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Transparency Type:"), 1.0, 0.5,
optionmenu, TRUE);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
*/
optionmenu =
gimp_option_menu_new (file_prefs_preview_size_callback,
&preview_size, (gpointer) preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
&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,
_("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);
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,
&nav_preview_size, (gpointer) nav_preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
&nav_preview_size, (gpointer) nav_preview_size,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Help Browser to Use:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Interpolation Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
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,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
optionmenu, TRUE);

View File

@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&default_type, (gpointer) default_type,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Default Image Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_type, (gpointer) transparency_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&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,
_("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);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Transparency Type:"), 1.0, 0.5,
optionmenu, TRUE);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&transparency_size, (gpointer) transparency_size,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
*/
optionmenu =
gimp_option_menu_new (file_prefs_preview_size_callback,
&preview_size, (gpointer) preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
&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,
_("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);
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,
&nav_preview_size, (gpointer) nav_preview_size,
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
&nav_preview_size, (gpointer) nav_preview_size,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&help_browser, (gpointer) help_browser,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Help Browser to Use:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
(gpointer) mem_size_unit);
optionmenu =
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
adjustment, (gpointer) mem_size_unit,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
_("Bytes"), (gpointer) 1, NULL,
_("KiloBytes"), (gpointer) 1024, NULL,
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
gtk_widget_show (optionmenu);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&interpolation_type, (gpointer) interpolation_type,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0,
_("Interpolation Type:"), 1.0, 0.5,
optionmenu, TRUE);
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new (file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&thumbnail_mode, (gpointer) thumbnail_mode,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
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,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
&trust_dirty_flag, (gpointer) trust_dirty_flag,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 1,
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
optionmenu, TRUE);

View File

@ -226,8 +226,8 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
slot_object = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
slot_object = va_arg (args, GtkObject *);
widget_ptr = va_arg (args, GtkWidget **);
default_action = va_arg (args, gboolean);
connect_delete = va_arg (args, gboolean);

View File

@ -27,10 +27,10 @@
#include "gimpintl.h"
/* private functions */
static const gchar * gimp_unit_menu_build_string (gchar *format,
GUnit unit);
static const gchar * gimp_unit_menu_build_string (gchar *format,
GUnit unit);
static void gimp_unit_menu_callback (GtkWidget *widget,
gpointer data);
gpointer data);
enum
{

View File

@ -35,25 +35,110 @@ static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
/*
* Widget Constructors...
* Widget Constructors
*/
GtkWidget *
gimp_option_menu_new (GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
gimp_option_menu_new (gboolean menu_only,
/* specify menu items as va_list:
* gchar *label,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
...)
...)
{
GtkWidget *menu;
GtkWidget *menuitem;
/* menu item variables */
gchar *label;
GtkSignalFunc callback;
gpointer data;
gpointer user_data;
GtkWidget **widget_ptr;
gboolean active;
va_list args;
gint i;
gint initial_index;
menu = gtk_menu_new ();
/* create the menu items */
initial_index = 0;
va_start (args, menu_only);
label = va_arg (args, gchar*);
for (i = 0; label; i++)
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
active = va_arg (args, gboolean);
if (label != (gpointer) 1)
menuitem = gtk_menu_item_new_with_label (label);
else
menuitem = gtk_menu_item_new ();
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
callback,
data);
if (user_data)
gtk_object_set_user_data (GTK_OBJECT (menuitem), user_data);
if (widget_ptr)
*widget_ptr = menuitem;
gtk_widget_show (menuitem);
/* remember the initial menu item */
if (active)
initial_index = i;
label = va_arg (args, gchar*);
}
va_end (args);
if (! menu_only)
{
GtkWidget *optionmenu;
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;
}
return menu;
}
GtkWidget *
gimp_option_menu_new2 (gboolean menu_only,
GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
/* specify menu items as va_list:
* gchar *label,
* gpointer user_data,
* GtkWidget **widget_ptr,
*/
...)
{
GtkWidget *menu;
GtkWidget *menuitem;
GtkWidget *optionmenu;
/* menu item variables */
gchar *label;
@ -73,7 +158,7 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
for (i = 0; label; i++)
{
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
if (label != (gpointer) 1)
menuitem = gtk_menu_item_new_with_label (label);
@ -101,13 +186,20 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
}
va_end (args);
optionmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
if (! menu_only)
{
GtkWidget *optionmenu;
/* select the initial menu item */
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
optionmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
return optionmenu;
/* select the initial menu item */
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
return optionmenu;
}
return menu;
}
GtkWidget *
@ -160,7 +252,7 @@ gimp_radio_group_new (gboolean in_frame,
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
active = va_arg (args, gboolean);
if (label != (gpointer) 1)
@ -181,7 +273,7 @@ gimp_radio_group_new (gboolean in_frame,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (callback),
callback,
data);
gtk_widget_show (button);
@ -199,7 +291,7 @@ gimp_radio_group_new (gboolean in_frame,
GtkWidget *
gimp_radio_group_new2 (gboolean in_frame,
gchar *frame_title,
GtkSignalFunc callback,
GtkSignalFunc radio_button_callback,
gpointer data,
gpointer initial, /* user_data */
@ -241,7 +333,7 @@ gimp_radio_group_new2 (gboolean in_frame,
while (label)
{
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
if (label != (gpointer) 1)
button = gtk_radio_button_new_with_label (group, label);
@ -261,7 +353,7 @@ gimp_radio_group_new2 (gboolean in_frame,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (callback),
radio_button_callback,
data);
gtk_widget_show (button);
@ -433,7 +525,7 @@ gimp_random_seed_new (gint *seed,
}
/*
* Standard Callbacks...
* Standard Callbacks
*/
static void
@ -561,24 +653,24 @@ gimp_unit_menu_update (GtkWidget *widget,
}
/*
* Helper Functions...
* Helper Functions
*/
/* add aligned label & widget to a two-column table */
void
gimp_table_attach_aligned (GtkTable *table,
gint row,
gchar *text,
gchar *label_text,
gfloat xalign,
gfloat yalign,
GtkWidget *widget,
gboolean left_adjust)
{
if (text)
if (label_text)
{
GtkWidget *label;
label = gtk_label_new (text);
label = gtk_label_new (label_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,

View File

@ -32,7 +32,21 @@ extern "C" {
* Widget Constructors
*/
GtkWidget * gimp_option_menu_new (GtkSignalFunc menu_item_callback,
GtkWidget * gimp_option_menu_new (gboolean menu_only,
/* specify menu items as va_list:
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
...);
GtkWidget * gimp_option_menu_new2 (gboolean menu_only,
GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
@ -60,7 +74,7 @@ GtkWidget * gimp_radio_group_new (gboolean in_frame,
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
gchar *frame_title,
GtkSignalFunc callback,
GtkSignalFunc radio_button_callback,
gpointer data,
gpointer initial, /* user_data */
@ -136,7 +150,7 @@ void gimp_unit_menu_update (GtkWidget *widget,
/* add aligned label & widget to a two-column table */
void gimp_table_attach_aligned (GtkTable *table,
gint row,
gchar *text,
gchar *label_text,
gfloat xalign,
gfloat yalign,
GtkWidget *widget,

View File

@ -226,8 +226,8 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
slot_object = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
slot_object = va_arg (args, GtkObject *);
widget_ptr = va_arg (args, GtkWidget **);
default_action = va_arg (args, gboolean);
connect_delete = va_arg (args, gboolean);

View File

@ -27,10 +27,10 @@
#include "gimpintl.h"
/* private functions */
static const gchar * gimp_unit_menu_build_string (gchar *format,
GUnit unit);
static const gchar * gimp_unit_menu_build_string (gchar *format,
GUnit unit);
static void gimp_unit_menu_callback (GtkWidget *widget,
gpointer data);
gpointer data);
enum
{

View File

@ -35,25 +35,110 @@ static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
/*
* Widget Constructors...
* Widget Constructors
*/
GtkWidget *
gimp_option_menu_new (GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
gimp_option_menu_new (gboolean menu_only,
/* specify menu items as va_list:
* gchar *label,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
...)
...)
{
GtkWidget *menu;
GtkWidget *menuitem;
/* menu item variables */
gchar *label;
GtkSignalFunc callback;
gpointer data;
gpointer user_data;
GtkWidget **widget_ptr;
gboolean active;
va_list args;
gint i;
gint initial_index;
menu = gtk_menu_new ();
/* create the menu items */
initial_index = 0;
va_start (args, menu_only);
label = va_arg (args, gchar*);
for (i = 0; label; i++)
{
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
active = va_arg (args, gboolean);
if (label != (gpointer) 1)
menuitem = gtk_menu_item_new_with_label (label);
else
menuitem = gtk_menu_item_new ();
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
callback,
data);
if (user_data)
gtk_object_set_user_data (GTK_OBJECT (menuitem), user_data);
if (widget_ptr)
*widget_ptr = menuitem;
gtk_widget_show (menuitem);
/* remember the initial menu item */
if (active)
initial_index = i;
label = va_arg (args, gchar*);
}
va_end (args);
if (! menu_only)
{
GtkWidget *optionmenu;
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;
}
return menu;
}
GtkWidget *
gimp_option_menu_new2 (gboolean menu_only,
GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
/* specify menu items as va_list:
* gchar *label,
* gpointer user_data,
* GtkWidget **widget_ptr,
*/
...)
{
GtkWidget *menu;
GtkWidget *menuitem;
GtkWidget *optionmenu;
/* menu item variables */
gchar *label;
@ -73,7 +158,7 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
for (i = 0; label; i++)
{
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
if (label != (gpointer) 1)
menuitem = gtk_menu_item_new_with_label (label);
@ -101,13 +186,20 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
}
va_end (args);
optionmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
if (! menu_only)
{
GtkWidget *optionmenu;
/* select the initial menu item */
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
optionmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
return optionmenu;
/* select the initial menu item */
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
return optionmenu;
}
return menu;
}
GtkWidget *
@ -160,7 +252,7 @@ gimp_radio_group_new (gboolean in_frame,
callback = va_arg (args, GtkSignalFunc);
data = va_arg (args, gpointer);
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
active = va_arg (args, gboolean);
if (label != (gpointer) 1)
@ -181,7 +273,7 @@ gimp_radio_group_new (gboolean in_frame,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (callback),
callback,
data);
gtk_widget_show (button);
@ -199,7 +291,7 @@ gimp_radio_group_new (gboolean in_frame,
GtkWidget *
gimp_radio_group_new2 (gboolean in_frame,
gchar *frame_title,
GtkSignalFunc callback,
GtkSignalFunc radio_button_callback,
gpointer data,
gpointer initial, /* user_data */
@ -241,7 +333,7 @@ gimp_radio_group_new2 (gboolean in_frame,
while (label)
{
user_data = va_arg (args, gpointer);
widget_ptr = va_arg (args, gpointer);
widget_ptr = va_arg (args, GtkWidget **);
if (label != (gpointer) 1)
button = gtk_radio_button_new_with_label (group, label);
@ -261,7 +353,7 @@ gimp_radio_group_new2 (gboolean in_frame,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (callback),
radio_button_callback,
data);
gtk_widget_show (button);
@ -433,7 +525,7 @@ gimp_random_seed_new (gint *seed,
}
/*
* Standard Callbacks...
* Standard Callbacks
*/
static void
@ -561,24 +653,24 @@ gimp_unit_menu_update (GtkWidget *widget,
}
/*
* Helper Functions...
* Helper Functions
*/
/* add aligned label & widget to a two-column table */
void
gimp_table_attach_aligned (GtkTable *table,
gint row,
gchar *text,
gchar *label_text,
gfloat xalign,
gfloat yalign,
GtkWidget *widget,
gboolean left_adjust)
{
if (text)
if (label_text)
{
GtkWidget *label;
label = gtk_label_new (text);
label = gtk_label_new (label_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,

View File

@ -32,7 +32,21 @@ extern "C" {
* Widget Constructors
*/
GtkWidget * gimp_option_menu_new (GtkSignalFunc menu_item_callback,
GtkWidget * gimp_option_menu_new (gboolean menu_only,
/* specify menu items as va_list:
* gchar *label,
* GtkSignalFunc callback,
* gpointer data,
* gpointer user_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
...);
GtkWidget * gimp_option_menu_new2 (gboolean menu_only,
GtkSignalFunc menu_item_callback,
gpointer data,
gpointer initial, /* user_data */
@ -60,7 +74,7 @@ GtkWidget * gimp_radio_group_new (gboolean in_frame,
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
gchar *frame_title,
GtkSignalFunc callback,
GtkSignalFunc radio_button_callback,
gpointer data,
gpointer initial, /* user_data */
@ -136,7 +150,7 @@ void gimp_unit_menu_update (GtkWidget *widget,
/* add aligned label & widget to a two-column table */
void gimp_table_attach_aligned (GtkTable *table,
gint row,
gchar *text,
gchar *label_text,
gfloat xalign,
gfloat yalign,
GtkWidget *widget,

View File

@ -66,7 +66,12 @@ struct borderaverage_data
{
gint thickness;
gint bucket_exponent;
} borderaverage_data = { 3, 4 };
}
borderaverage_data =
{
3,
4
};
MAIN ()
@ -444,23 +449,21 @@ borderaverage_dialog (void)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
menu = gimp_option_menu_new (gimp_menu_item_update,
&borderaverage_bucket_exponent,
(gpointer) borderaverage_bucket_exponent,
menu = gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
&borderaverage_bucket_exponent,
(gpointer) borderaverage_bucket_exponent,
_("1 (nonsense?)"), (gpointer) 0, NULL,
"2", (gpointer) 1, NULL,
"4", (gpointer) 2, NULL,
"8", (gpointer) 3, NULL,
"16", (gpointer) 4, NULL,
"32", (gpointer) 5, NULL,
"64", (gpointer) 6, NULL,
"128", (gpointer) 7, NULL,
_("256 (nonsense?)"), (gpointer) 8, NULL,
_("1 (nonsense?)"), (gpointer) 0, NULL,
"2", (gpointer) 1, NULL,
"4", (gpointer) 2, NULL,
"8", (gpointer) 3, NULL,
"16", (gpointer) 4, NULL,
"32", (gpointer) 5, NULL,
"64", (gpointer) 6, NULL,
"128", (gpointer) 7, NULL,
_("256 (nonsense?)"), (gpointer) 8, NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
gtk_widget_show (menu);

View File

@ -66,7 +66,12 @@ struct borderaverage_data
{
gint thickness;
gint bucket_exponent;
} borderaverage_data = { 3, 4 };
}
borderaverage_data =
{
3,
4
};
MAIN ()
@ -444,23 +449,21 @@ borderaverage_dialog (void)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
menu = gimp_option_menu_new (gimp_menu_item_update,
&borderaverage_bucket_exponent,
(gpointer) borderaverage_bucket_exponent,
menu = gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
&borderaverage_bucket_exponent,
(gpointer) borderaverage_bucket_exponent,
_("1 (nonsense?)"), (gpointer) 0, NULL,
"2", (gpointer) 1, NULL,
"4", (gpointer) 2, NULL,
"8", (gpointer) 3, NULL,
"16", (gpointer) 4, NULL,
"32", (gpointer) 5, NULL,
"64", (gpointer) 6, NULL,
"128", (gpointer) 7, NULL,
_("256 (nonsense?)"), (gpointer) 8, NULL,
_("1 (nonsense?)"), (gpointer) 0, NULL,
"2", (gpointer) 1, NULL,
"4", (gpointer) 2, NULL,
"8", (gpointer) 3, NULL,
"16", (gpointer) 4, NULL,
"32", (gpointer) 5, NULL,
"64", (gpointer) 6, NULL,
"128", (gpointer) 7, NULL,
_("256 (nonsense?)"), (gpointer) 8, NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
gtk_widget_show (menu);

View File

@ -1365,18 +1365,18 @@ save_dialog (gint32 image_ID)
gtk_widget_show (label);
disposal_option_menu =
gimp_option_menu_new (gimp_menu_item_update,
&gsvals.default_dispose,
(gpointer) gsvals.default_dispose,
gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
&gsvals.default_dispose,
(gpointer) gsvals.default_dispose,
_("I don't Care"),
(gpointer) DISPOSE_UNSPECIFIED, NULL,
_("Cumulative Layers (Combine)"),
(gpointer) DISPOSE_COMBINE, NULL,
_("One Frame per Layer (Replace)"),
(gpointer) DISPOSE_REPLACE, NULL,
_("I don't Care"),
(gpointer) DISPOSE_UNSPECIFIED, NULL,
_("Cumulative Layers (Combine)"),
(gpointer) DISPOSE_COMBINE, NULL,
_("One Frame per Layer (Replace)"),
(gpointer) DISPOSE_REPLACE, NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (hbox), disposal_option_menu, FALSE, FALSE, 0);
gtk_widget_show (disposal_option_menu);

View File

@ -697,7 +697,6 @@ randomize_dialog (void)
GtkWidget *frame;
GtkWidget *table;
GtkWidget *seed_hbox;
GtkWidget *spinbutton;
GtkObject *adj;
gchar **argv;
gint argc;