mirror of https://github.com/GNOME/gimp.git
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:
parent
ea27590213
commit
38c66a651c
14
ChangeLog
14
ChangeLog
|
@ -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>
|
Thu Jan 27 23:54:05 CET 2000 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/newsprint.c
|
* plug-ins/common/newsprint.c
|
||||||
|
|
|
@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&default_type, (gpointer) default_type,
|
&default_type, (gpointer) default_type,
|
||||||
|
|
||||||
_("RGB"), (gpointer) RGB, NULL,
|
_("RGB"), (gpointer) RGB, NULL,
|
||||||
_("Grayscale"), (gpointer) GRAY, NULL,
|
_("Grayscale"), (gpointer) GRAY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Default Image Type:"), 1.0, 0.5,
|
_("Default Image Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_type, (gpointer) transparency_type,
|
&transparency_type, (gpointer) transparency_type,
|
||||||
|
|
||||||
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
||||||
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
||||||
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
||||||
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
||||||
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
||||||
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Transparency Type:"), 1.0, 0.5,
|
_("Transparency Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_size, (gpointer) transparency_size,
|
&transparency_size, (gpointer) transparency_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
||||||
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
||||||
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
|
||||||
&preview_size, (gpointer) preview_size,
|
&preview_size, (gpointer) preview_size,
|
||||||
|
|
||||||
_("None"), (gpointer) 0, NULL,
|
_("None"), (gpointer) 0, NULL,
|
||||||
_("Tiny"), (gpointer) 24, NULL,
|
_("Tiny"), (gpointer) 24, NULL,
|
||||||
_("Small"), (gpointer) 32, NULL,
|
_("Small"), (gpointer) 32, NULL,
|
||||||
_("Medium"), (gpointer) 48, NULL,
|
_("Medium"), (gpointer) 48, NULL,
|
||||||
_("Large"), (gpointer) 64, NULL,
|
_("Large"), (gpointer) 64, NULL,
|
||||||
_("Huge"), (gpointer) 128, NULL,
|
_("Huge"), (gpointer) 128, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_nav_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
|
||||||
&nav_preview_size, (gpointer) nav_preview_size,
|
&nav_preview_size, (gpointer) nav_preview_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) 48, NULL,
|
_("Small"), (gpointer) 48, NULL,
|
||||||
_("Medium"), (gpointer) 80, NULL,
|
_("Medium"), (gpointer) 80, NULL,
|
||||||
_("Large"), (gpointer) 112, NULL,
|
_("Large"), (gpointer) 112, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&help_browser, (gpointer) help_browser,
|
&help_browser, (gpointer) help_browser,
|
||||||
|
|
||||||
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
||||||
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Help Browser to Use:"), 1.0, 0.5,
|
_("Help Browser to Use:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&interpolation_type, (gpointer) interpolation_type,
|
&interpolation_type, (gpointer) interpolation_type,
|
||||||
|
|
||||||
_("Nearest Neighbor (Fast)"),
|
_("Nearest Neighbor (Fast)"),
|
||||||
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
(gpointer) LINEAR_INTERPOLATION, NULL,
|
(gpointer) LINEAR_INTERPOLATION, NULL,
|
||||||
_("Cubic (Slow)"),
|
_("Cubic (Slow)"),
|
||||||
(gpointer) CUBIC_INTERPOLATION, NULL,
|
(gpointer) CUBIC_INTERPOLATION, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Interpolation Type:"), 1.0, 0.5,
|
_("Interpolation Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&thumbnail_mode, (gpointer) thumbnail_mode,
|
&thumbnail_mode, (gpointer) thumbnail_mode,
|
||||||
|
|
||||||
_("Always"), (gpointer) 1, NULL,
|
_("Always"), (gpointer) 1, NULL,
|
||||||
_("Never"), (gpointer) 0, NULL,
|
_("Never"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
||||||
|
|
||||||
_("Only when Modified"), (gpointer) 1, NULL,
|
_("Only when Modified"), (gpointer) 1, NULL,
|
||||||
_("Always"), (gpointer) 0, NULL,
|
_("Always"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
|
@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&default_type, (gpointer) default_type,
|
&default_type, (gpointer) default_type,
|
||||||
|
|
||||||
_("RGB"), (gpointer) RGB, NULL,
|
_("RGB"), (gpointer) RGB, NULL,
|
||||||
_("Grayscale"), (gpointer) GRAY, NULL,
|
_("Grayscale"), (gpointer) GRAY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Default Image Type:"), 1.0, 0.5,
|
_("Default Image Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_type, (gpointer) transparency_type,
|
&transparency_type, (gpointer) transparency_type,
|
||||||
|
|
||||||
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
||||||
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
||||||
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
||||||
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
||||||
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
||||||
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Transparency Type:"), 1.0, 0.5,
|
_("Transparency Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_size, (gpointer) transparency_size,
|
&transparency_size, (gpointer) transparency_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
||||||
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
||||||
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
|
||||||
&preview_size, (gpointer) preview_size,
|
&preview_size, (gpointer) preview_size,
|
||||||
|
|
||||||
_("None"), (gpointer) 0, NULL,
|
_("None"), (gpointer) 0, NULL,
|
||||||
_("Tiny"), (gpointer) 24, NULL,
|
_("Tiny"), (gpointer) 24, NULL,
|
||||||
_("Small"), (gpointer) 32, NULL,
|
_("Small"), (gpointer) 32, NULL,
|
||||||
_("Medium"), (gpointer) 48, NULL,
|
_("Medium"), (gpointer) 48, NULL,
|
||||||
_("Large"), (gpointer) 64, NULL,
|
_("Large"), (gpointer) 64, NULL,
|
||||||
_("Huge"), (gpointer) 128, NULL,
|
_("Huge"), (gpointer) 128, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_nav_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
|
||||||
&nav_preview_size, (gpointer) nav_preview_size,
|
&nav_preview_size, (gpointer) nav_preview_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) 48, NULL,
|
_("Small"), (gpointer) 48, NULL,
|
||||||
_("Medium"), (gpointer) 80, NULL,
|
_("Medium"), (gpointer) 80, NULL,
|
||||||
_("Large"), (gpointer) 112, NULL,
|
_("Large"), (gpointer) 112, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&help_browser, (gpointer) help_browser,
|
&help_browser, (gpointer) help_browser,
|
||||||
|
|
||||||
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
||||||
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Help Browser to Use:"), 1.0, 0.5,
|
_("Help Browser to Use:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&interpolation_type, (gpointer) interpolation_type,
|
&interpolation_type, (gpointer) interpolation_type,
|
||||||
|
|
||||||
_("Nearest Neighbor (Fast)"),
|
_("Nearest Neighbor (Fast)"),
|
||||||
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
(gpointer) LINEAR_INTERPOLATION, NULL,
|
(gpointer) LINEAR_INTERPOLATION, NULL,
|
||||||
_("Cubic (Slow)"),
|
_("Cubic (Slow)"),
|
||||||
(gpointer) CUBIC_INTERPOLATION, NULL,
|
(gpointer) CUBIC_INTERPOLATION, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Interpolation Type:"), 1.0, 0.5,
|
_("Interpolation Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&thumbnail_mode, (gpointer) thumbnail_mode,
|
&thumbnail_mode, (gpointer) thumbnail_mode,
|
||||||
|
|
||||||
_("Always"), (gpointer) 1, NULL,
|
_("Always"), (gpointer) 1, NULL,
|
||||||
_("Never"), (gpointer) 0, NULL,
|
_("Never"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
||||||
|
|
||||||
_("Only when Modified"), (gpointer) 1, NULL,
|
_("Only when Modified"), (gpointer) 1, NULL,
|
||||||
_("Always"), (gpointer) 0, NULL,
|
_("Always"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
|
@ -1628,13 +1628,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&default_type, (gpointer) default_type,
|
&default_type, (gpointer) default_type,
|
||||||
|
|
||||||
_("RGB"), (gpointer) RGB, NULL,
|
_("RGB"), (gpointer) RGB, NULL,
|
||||||
_("Grayscale"), (gpointer) GRAY, NULL,
|
_("Grayscale"), (gpointer) GRAY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Default Image Type:"), 1.0, 0.5,
|
_("Default Image Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -1669,14 +1669,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -1711,30 +1711,30 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_type, (gpointer) transparency_type,
|
&transparency_type, (gpointer) transparency_type,
|
||||||
|
|
||||||
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
|
||||||
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
|
||||||
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
|
||||||
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
_("White Only"), (gpointer) WHITE_ONLY, NULL,
|
||||||
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
|
||||||
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Transparency Type:"), 1.0, 0.5,
|
_("Transparency Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&transparency_size, (gpointer) transparency_size,
|
&transparency_size, (gpointer) transparency_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
_("Small"), (gpointer) SMALL_CHECKS, NULL,
|
||||||
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
|
||||||
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
_("Large"), (gpointer) LARGE_CHECKS, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Check Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1797,29 +1797,29 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_preview_size_callback,
|
||||||
&preview_size, (gpointer) preview_size,
|
&preview_size, (gpointer) preview_size,
|
||||||
|
|
||||||
_("None"), (gpointer) 0, NULL,
|
_("None"), (gpointer) 0, NULL,
|
||||||
_("Tiny"), (gpointer) 24, NULL,
|
_("Tiny"), (gpointer) 24, NULL,
|
||||||
_("Small"), (gpointer) 32, NULL,
|
_("Small"), (gpointer) 32, NULL,
|
||||||
_("Medium"), (gpointer) 48, NULL,
|
_("Medium"), (gpointer) 48, NULL,
|
||||||
_("Large"), (gpointer) 64, NULL,
|
_("Large"), (gpointer) 64, NULL,
|
||||||
_("Huge"), (gpointer) 128, NULL,
|
_("Huge"), (gpointer) 128, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_nav_preview_size_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_nav_preview_size_callback,
|
||||||
&nav_preview_size, (gpointer) nav_preview_size,
|
&nav_preview_size, (gpointer) nav_preview_size,
|
||||||
|
|
||||||
_("Small"), (gpointer) 48, NULL,
|
_("Small"), (gpointer) 48, NULL,
|
||||||
_("Medium"), (gpointer) 80, NULL,
|
_("Medium"), (gpointer) 80, NULL,
|
||||||
_("Large"), (gpointer) 112, NULL,
|
_("Large"), (gpointer) 112, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
_("Nav Preview Size:"), 1.0, 0.5, optionmenu, TRUE);
|
||||||
|
|
||||||
|
@ -1908,13 +1908,13 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&help_browser, (gpointer) help_browser,
|
&help_browser, (gpointer) help_browser,
|
||||||
|
|
||||||
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
|
||||||
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Help Browser to Use:"), 1.0, 0.5,
|
_("Help Browser to Use:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2151,14 +2151,14 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
(gpointer) mem_size_unit);
|
(gpointer) mem_size_unit);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_mem_size_unit_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_mem_size_unit_callback,
|
||||||
adjustment, (gpointer) mem_size_unit,
|
adjustment, (gpointer) mem_size_unit,
|
||||||
|
|
||||||
_("Bytes"), (gpointer) 1, NULL,
|
_("Bytes"), (gpointer) 1, NULL,
|
||||||
_("KiloBytes"), (gpointer) 1024, NULL,
|
_("KiloBytes"), (gpointer) 1024, NULL,
|
||||||
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
_("MegaBytes"), (gpointer) (1024 * 1024), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (optionmenu);
|
gtk_widget_show (optionmenu);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
|
@ -2191,17 +2191,17 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&interpolation_type, (gpointer) interpolation_type,
|
&interpolation_type, (gpointer) interpolation_type,
|
||||||
|
|
||||||
_("Nearest Neighbor (Fast)"),
|
_("Nearest Neighbor (Fast)"),
|
||||||
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
(gpointer) LINEAR_INTERPOLATION, NULL,
|
(gpointer) LINEAR_INTERPOLATION, NULL,
|
||||||
_("Cubic (Slow)"),
|
_("Cubic (Slow)"),
|
||||||
(gpointer) CUBIC_INTERPOLATION, NULL,
|
(gpointer) CUBIC_INTERPOLATION, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Interpolation Type:"), 1.0, 0.5,
|
_("Interpolation Type:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
@ -2220,25 +2220,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
||||||
gtk_widget_show (table);
|
gtk_widget_show (table);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&thumbnail_mode, (gpointer) thumbnail_mode,
|
&thumbnail_mode, (gpointer) thumbnail_mode,
|
||||||
|
|
||||||
_("Always"), (gpointer) 1, NULL,
|
_("Always"), (gpointer) 1, NULL,
|
||||||
_("Never"), (gpointer) 0, NULL,
|
_("Never"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
gimp_table_attach_aligned (GTK_TABLE (table), 0,
|
||||||
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
||||||
optionmenu =
|
optionmenu =
|
||||||
gimp_option_menu_new (file_prefs_toggle_callback,
|
gimp_option_menu_new2 (FALSE, file_prefs_toggle_callback,
|
||||||
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
&trust_dirty_flag, (gpointer) trust_dirty_flag,
|
||||||
|
|
||||||
_("Only when Modified"), (gpointer) 1, NULL,
|
_("Only when Modified"), (gpointer) 1, NULL,
|
||||||
_("Always"), (gpointer) 0, NULL,
|
_("Always"), (gpointer) 0, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
gimp_table_attach_aligned (GTK_TABLE (table), 1,
|
||||||
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
|
||||||
optionmenu, TRUE);
|
optionmenu, TRUE);
|
||||||
|
|
|
@ -226,8 +226,8 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
|
||||||
{
|
{
|
||||||
callback = va_arg (args, GtkSignalFunc);
|
callback = va_arg (args, GtkSignalFunc);
|
||||||
data = va_arg (args, gpointer);
|
data = va_arg (args, gpointer);
|
||||||
slot_object = va_arg (args, gpointer);
|
slot_object = va_arg (args, GtkObject *);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
default_action = va_arg (args, gboolean);
|
default_action = va_arg (args, gboolean);
|
||||||
connect_delete = va_arg (args, gboolean);
|
connect_delete = va_arg (args, gboolean);
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
#include "gimpintl.h"
|
#include "gimpintl.h"
|
||||||
|
|
||||||
/* private functions */
|
/* private functions */
|
||||||
static const gchar * gimp_unit_menu_build_string (gchar *format,
|
static const gchar * gimp_unit_menu_build_string (gchar *format,
|
||||||
GUnit unit);
|
GUnit unit);
|
||||||
static void gimp_unit_menu_callback (GtkWidget *widget,
|
static void gimp_unit_menu_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,25 +35,110 @@ static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Widget Constructors...
|
* Widget Constructors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
gimp_option_menu_new (gboolean menu_only,
|
||||||
gpointer data,
|
|
||||||
gpointer initial, /* user_data */
|
|
||||||
|
|
||||||
/* specify menu items as va_list:
|
/* specify menu items as va_list:
|
||||||
* gchar *label,
|
* gchar *label,
|
||||||
* gpointer user_data,
|
* GtkSignalFunc callback,
|
||||||
* GtkWidget **widget_ptr,
|
* 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 *menu;
|
||||||
GtkWidget *menuitem;
|
GtkWidget *menuitem;
|
||||||
GtkWidget *optionmenu;
|
|
||||||
|
|
||||||
/* menu item variables */
|
/* menu item variables */
|
||||||
gchar *label;
|
gchar *label;
|
||||||
|
@ -73,7 +158,7 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
||||||
for (i = 0; label; i++)
|
for (i = 0; label; i++)
|
||||||
{
|
{
|
||||||
user_data = va_arg (args, gpointer);
|
user_data = va_arg (args, gpointer);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
if (label != (gpointer) 1)
|
||||||
menuitem = gtk_menu_item_new_with_label (label);
|
menuitem = gtk_menu_item_new_with_label (label);
|
||||||
|
@ -101,13 +186,20 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
||||||
}
|
}
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
optionmenu = gtk_option_menu_new ();
|
if (! menu_only)
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
{
|
||||||
|
GtkWidget *optionmenu;
|
||||||
|
|
||||||
/* select the initial menu item */
|
optionmenu = gtk_option_menu_new ();
|
||||||
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
|
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 *
|
GtkWidget *
|
||||||
|
@ -160,7 +252,7 @@ gimp_radio_group_new (gboolean in_frame,
|
||||||
callback = va_arg (args, GtkSignalFunc);
|
callback = va_arg (args, GtkSignalFunc);
|
||||||
data = va_arg (args, gpointer);
|
data = va_arg (args, gpointer);
|
||||||
user_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);
|
active = va_arg (args, gboolean);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
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_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (callback),
|
callback,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@ -199,7 +291,7 @@ gimp_radio_group_new (gboolean in_frame,
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_radio_group_new2 (gboolean in_frame,
|
gimp_radio_group_new2 (gboolean in_frame,
|
||||||
gchar *frame_title,
|
gchar *frame_title,
|
||||||
GtkSignalFunc callback,
|
GtkSignalFunc radio_button_callback,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
gpointer initial, /* user_data */
|
gpointer initial, /* user_data */
|
||||||
|
|
||||||
|
@ -241,7 +333,7 @@ gimp_radio_group_new2 (gboolean in_frame,
|
||||||
while (label)
|
while (label)
|
||||||
{
|
{
|
||||||
user_data = va_arg (args, gpointer);
|
user_data = va_arg (args, gpointer);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
if (label != (gpointer) 1)
|
||||||
button = gtk_radio_button_new_with_label (group, label);
|
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_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (callback),
|
radio_button_callback,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@ -433,7 +525,7 @@ gimp_random_seed_new (gint *seed,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Standard Callbacks...
|
* Standard Callbacks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
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 */
|
/* add aligned label & widget to a two-column table */
|
||||||
void
|
void
|
||||||
gimp_table_attach_aligned (GtkTable *table,
|
gimp_table_attach_aligned (GtkTable *table,
|
||||||
gint row,
|
gint row,
|
||||||
gchar *text,
|
gchar *label_text,
|
||||||
gfloat xalign,
|
gfloat xalign,
|
||||||
gfloat yalign,
|
gfloat yalign,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
gboolean left_adjust)
|
gboolean left_adjust)
|
||||||
{
|
{
|
||||||
if (text)
|
if (label_text)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
label = gtk_label_new (text);
|
label = gtk_label_new (label_text);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
||||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
||||||
gtk_table_attach (table, GTK_WIDGET (label), 0, 1, row, row + 1,
|
gtk_table_attach (table, GTK_WIDGET (label), 0, 1, row, row + 1,
|
||||||
|
|
|
@ -32,7 +32,21 @@ extern "C" {
|
||||||
* Widget Constructors
|
* 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 data,
|
||||||
gpointer initial, /* user_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,
|
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
|
||||||
gchar *frame_title,
|
gchar *frame_title,
|
||||||
GtkSignalFunc callback,
|
GtkSignalFunc radio_button_callback,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
gpointer initial, /* user_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 */
|
/* add aligned label & widget to a two-column table */
|
||||||
void gimp_table_attach_aligned (GtkTable *table,
|
void gimp_table_attach_aligned (GtkTable *table,
|
||||||
gint row,
|
gint row,
|
||||||
gchar *text,
|
gchar *label_text,
|
||||||
gfloat xalign,
|
gfloat xalign,
|
||||||
gfloat yalign,
|
gfloat yalign,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
|
|
|
@ -226,8 +226,8 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
|
||||||
{
|
{
|
||||||
callback = va_arg (args, GtkSignalFunc);
|
callback = va_arg (args, GtkSignalFunc);
|
||||||
data = va_arg (args, gpointer);
|
data = va_arg (args, gpointer);
|
||||||
slot_object = va_arg (args, gpointer);
|
slot_object = va_arg (args, GtkObject *);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
default_action = va_arg (args, gboolean);
|
default_action = va_arg (args, gboolean);
|
||||||
connect_delete = va_arg (args, gboolean);
|
connect_delete = va_arg (args, gboolean);
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
#include "gimpintl.h"
|
#include "gimpintl.h"
|
||||||
|
|
||||||
/* private functions */
|
/* private functions */
|
||||||
static const gchar * gimp_unit_menu_build_string (gchar *format,
|
static const gchar * gimp_unit_menu_build_string (gchar *format,
|
||||||
GUnit unit);
|
GUnit unit);
|
||||||
static void gimp_unit_menu_callback (GtkWidget *widget,
|
static void gimp_unit_menu_callback (GtkWidget *widget,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,25 +35,110 @@ static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Widget Constructors...
|
* Widget Constructors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
gimp_option_menu_new (gboolean menu_only,
|
||||||
gpointer data,
|
|
||||||
gpointer initial, /* user_data */
|
|
||||||
|
|
||||||
/* specify menu items as va_list:
|
/* specify menu items as va_list:
|
||||||
* gchar *label,
|
* gchar *label,
|
||||||
* gpointer user_data,
|
* GtkSignalFunc callback,
|
||||||
* GtkWidget **widget_ptr,
|
* 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 *menu;
|
||||||
GtkWidget *menuitem;
|
GtkWidget *menuitem;
|
||||||
GtkWidget *optionmenu;
|
|
||||||
|
|
||||||
/* menu item variables */
|
/* menu item variables */
|
||||||
gchar *label;
|
gchar *label;
|
||||||
|
@ -73,7 +158,7 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
||||||
for (i = 0; label; i++)
|
for (i = 0; label; i++)
|
||||||
{
|
{
|
||||||
user_data = va_arg (args, gpointer);
|
user_data = va_arg (args, gpointer);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
if (label != (gpointer) 1)
|
||||||
menuitem = gtk_menu_item_new_with_label (label);
|
menuitem = gtk_menu_item_new_with_label (label);
|
||||||
|
@ -101,13 +186,20 @@ gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
||||||
}
|
}
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
optionmenu = gtk_option_menu_new ();
|
if (! menu_only)
|
||||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
{
|
||||||
|
GtkWidget *optionmenu;
|
||||||
|
|
||||||
/* select the initial menu item */
|
optionmenu = gtk_option_menu_new ();
|
||||||
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index);
|
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 *
|
GtkWidget *
|
||||||
|
@ -160,7 +252,7 @@ gimp_radio_group_new (gboolean in_frame,
|
||||||
callback = va_arg (args, GtkSignalFunc);
|
callback = va_arg (args, GtkSignalFunc);
|
||||||
data = va_arg (args, gpointer);
|
data = va_arg (args, gpointer);
|
||||||
user_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);
|
active = va_arg (args, gboolean);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
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_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (callback),
|
callback,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@ -199,7 +291,7 @@ gimp_radio_group_new (gboolean in_frame,
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_radio_group_new2 (gboolean in_frame,
|
gimp_radio_group_new2 (gboolean in_frame,
|
||||||
gchar *frame_title,
|
gchar *frame_title,
|
||||||
GtkSignalFunc callback,
|
GtkSignalFunc radio_button_callback,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
gpointer initial, /* user_data */
|
gpointer initial, /* user_data */
|
||||||
|
|
||||||
|
@ -241,7 +333,7 @@ gimp_radio_group_new2 (gboolean in_frame,
|
||||||
while (label)
|
while (label)
|
||||||
{
|
{
|
||||||
user_data = va_arg (args, gpointer);
|
user_data = va_arg (args, gpointer);
|
||||||
widget_ptr = va_arg (args, gpointer);
|
widget_ptr = va_arg (args, GtkWidget **);
|
||||||
|
|
||||||
if (label != (gpointer) 1)
|
if (label != (gpointer) 1)
|
||||||
button = gtk_radio_button_new_with_label (group, label);
|
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_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
gtk_signal_connect (GTK_OBJECT (button), "toggled",
|
||||||
GTK_SIGNAL_FUNC (callback),
|
radio_button_callback,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@ -433,7 +525,7 @@ gimp_random_seed_new (gint *seed,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Standard Callbacks...
|
* Standard Callbacks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
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 */
|
/* add aligned label & widget to a two-column table */
|
||||||
void
|
void
|
||||||
gimp_table_attach_aligned (GtkTable *table,
|
gimp_table_attach_aligned (GtkTable *table,
|
||||||
gint row,
|
gint row,
|
||||||
gchar *text,
|
gchar *label_text,
|
||||||
gfloat xalign,
|
gfloat xalign,
|
||||||
gfloat yalign,
|
gfloat yalign,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
gboolean left_adjust)
|
gboolean left_adjust)
|
||||||
{
|
{
|
||||||
if (text)
|
if (label_text)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
label = gtk_label_new (text);
|
label = gtk_label_new (label_text);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign);
|
||||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
|
||||||
gtk_table_attach (table, GTK_WIDGET (label), 0, 1, row, row + 1,
|
gtk_table_attach (table, GTK_WIDGET (label), 0, 1, row, row + 1,
|
||||||
|
|
|
@ -32,7 +32,21 @@ extern "C" {
|
||||||
* Widget Constructors
|
* 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 data,
|
||||||
gpointer initial, /* user_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,
|
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
|
||||||
gchar *frame_title,
|
gchar *frame_title,
|
||||||
GtkSignalFunc callback,
|
GtkSignalFunc radio_button_callback,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
gpointer initial, /* user_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 */
|
/* add aligned label & widget to a two-column table */
|
||||||
void gimp_table_attach_aligned (GtkTable *table,
|
void gimp_table_attach_aligned (GtkTable *table,
|
||||||
gint row,
|
gint row,
|
||||||
gchar *text,
|
gchar *label_text,
|
||||||
gfloat xalign,
|
gfloat xalign,
|
||||||
gfloat yalign,
|
gfloat yalign,
|
||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
|
|
|
@ -66,7 +66,12 @@ struct borderaverage_data
|
||||||
{
|
{
|
||||||
gint thickness;
|
gint thickness;
|
||||||
gint bucket_exponent;
|
gint bucket_exponent;
|
||||||
} borderaverage_data = { 3, 4 };
|
}
|
||||||
|
borderaverage_data =
|
||||||
|
{
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
MAIN ()
|
MAIN ()
|
||||||
|
@ -444,23 +449,21 @@ borderaverage_dialog (void)
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
menu = gimp_option_menu_new (gimp_menu_item_update,
|
menu = gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
|
||||||
&borderaverage_bucket_exponent,
|
&borderaverage_bucket_exponent,
|
||||||
(gpointer) borderaverage_bucket_exponent,
|
(gpointer) borderaverage_bucket_exponent,
|
||||||
|
|
||||||
_("1 (nonsense?)"), (gpointer) 0, NULL,
|
_("1 (nonsense?)"), (gpointer) 0, NULL,
|
||||||
"2", (gpointer) 1, NULL,
|
"2", (gpointer) 1, NULL,
|
||||||
"4", (gpointer) 2, NULL,
|
"4", (gpointer) 2, NULL,
|
||||||
"8", (gpointer) 3, NULL,
|
"8", (gpointer) 3, NULL,
|
||||||
"16", (gpointer) 4, NULL,
|
"16", (gpointer) 4, NULL,
|
||||||
"32", (gpointer) 5, NULL,
|
"32", (gpointer) 5, NULL,
|
||||||
"64", (gpointer) 6, NULL,
|
"64", (gpointer) 6, NULL,
|
||||||
"128", (gpointer) 7, NULL,
|
"128", (gpointer) 7, NULL,
|
||||||
_("256 (nonsense?)"), (gpointer) 8, NULL,
|
_("256 (nonsense?)"), (gpointer) 8, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (menu);
|
gtk_widget_show (menu);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,12 @@ struct borderaverage_data
|
||||||
{
|
{
|
||||||
gint thickness;
|
gint thickness;
|
||||||
gint bucket_exponent;
|
gint bucket_exponent;
|
||||||
} borderaverage_data = { 3, 4 };
|
}
|
||||||
|
borderaverage_data =
|
||||||
|
{
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
MAIN ()
|
MAIN ()
|
||||||
|
@ -444,23 +449,21 @@ borderaverage_dialog (void)
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
menu = gimp_option_menu_new (gimp_menu_item_update,
|
menu = gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
|
||||||
&borderaverage_bucket_exponent,
|
&borderaverage_bucket_exponent,
|
||||||
(gpointer) borderaverage_bucket_exponent,
|
(gpointer) borderaverage_bucket_exponent,
|
||||||
|
|
||||||
_("1 (nonsense?)"), (gpointer) 0, NULL,
|
_("1 (nonsense?)"), (gpointer) 0, NULL,
|
||||||
"2", (gpointer) 1, NULL,
|
"2", (gpointer) 1, NULL,
|
||||||
"4", (gpointer) 2, NULL,
|
"4", (gpointer) 2, NULL,
|
||||||
"8", (gpointer) 3, NULL,
|
"8", (gpointer) 3, NULL,
|
||||||
"16", (gpointer) 4, NULL,
|
"16", (gpointer) 4, NULL,
|
||||||
"32", (gpointer) 5, NULL,
|
"32", (gpointer) 5, NULL,
|
||||||
"64", (gpointer) 6, NULL,
|
"64", (gpointer) 6, NULL,
|
||||||
"128", (gpointer) 7, NULL,
|
"128", (gpointer) 7, NULL,
|
||||||
_("256 (nonsense?)"), (gpointer) 8, NULL,
|
_("256 (nonsense?)"), (gpointer) 8, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (menu);
|
gtk_widget_show (menu);
|
||||||
|
|
||||||
|
|
|
@ -1365,18 +1365,18 @@ save_dialog (gint32 image_ID)
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|
||||||
disposal_option_menu =
|
disposal_option_menu =
|
||||||
gimp_option_menu_new (gimp_menu_item_update,
|
gimp_option_menu_new2 (FALSE, gimp_menu_item_update,
|
||||||
&gsvals.default_dispose,
|
&gsvals.default_dispose,
|
||||||
(gpointer) gsvals.default_dispose,
|
(gpointer) gsvals.default_dispose,
|
||||||
|
|
||||||
_("I don't Care"),
|
_("I don't Care"),
|
||||||
(gpointer) DISPOSE_UNSPECIFIED, NULL,
|
(gpointer) DISPOSE_UNSPECIFIED, NULL,
|
||||||
_("Cumulative Layers (Combine)"),
|
_("Cumulative Layers (Combine)"),
|
||||||
(gpointer) DISPOSE_COMBINE, NULL,
|
(gpointer) DISPOSE_COMBINE, NULL,
|
||||||
_("One Frame per Layer (Replace)"),
|
_("One Frame per Layer (Replace)"),
|
||||||
(gpointer) DISPOSE_REPLACE, NULL,
|
(gpointer) DISPOSE_REPLACE, NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), disposal_option_menu, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), disposal_option_menu, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (disposal_option_menu);
|
gtk_widget_show (disposal_option_menu);
|
||||||
|
|
||||||
|
|
|
@ -697,7 +697,6 @@ randomize_dialog (void)
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *seed_hbox;
|
GtkWidget *seed_hbox;
|
||||||
GtkWidget *spinbutton;
|
|
||||||
GtkObject *adj;
|
GtkObject *adj;
|
||||||
gchar **argv;
|
gchar **argv;
|
||||||
gint argc;
|
gint argc;
|
||||||
|
|
Loading…
Reference in New Issue