From 884f2235698c670ebe39c9c9e3b986a16418371c Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 6 Jan 2000 16:40:17 +0000 Subject: [PATCH] app/[all files using the dialog or action area constructors] added a 2000-01-06 Michael Natterer * app/[all files using the dialog or action area constructors] * libgimp/gimpdialog.[ch]: added a "slot_object" agrument to the constructors' va_args lists to allow the action area buttons to be connected wich gtk_signal_connect_object(). * libgimp/gimphelp.c: show the correct help page for plugins. * plug-ins/common/CEL.c * plug-ins/common/CML_explorer.c * plug-ins/common/Makefile.am * plug-ins/common/aa.c * plug-ins/common/align_layers.c * plug-ins/common/animationplay.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/blur.c * plug-ins/common/bumpmap.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/compose.c * plug-ins/common/convmatrix.c * plug-ins/common/csource.c * plug-ins/common/cubism.c * plug-ins/common/curve_bend.c * plug-ins/common/decompose.c * plug-ins/common/deinterlace.c * plug-ins/common/depthmerge.c * plug-ins/common/despeckle.c * plug-ins/common/destripe.c * plug-ins/common/diffraction.c * plug-ins/common/displace.c * plug-ins/common/grid.c * plug-ins/helpbrowser/Makefile.am * plug-ins/helpbrowser/helpbrowser.c: use the dialog constructor and enable the "F1" help key. --- ChangeLog | 41 ++- app/actions/qmask-commands.c | 4 +- app/actions/quick-mask-commands.c | 4 +- app/app_procs.c | 4 +- app/base/color-balance.c | 6 +- app/base/curves.c | 6 +- app/base/hue-saturation.c | 6 +- app/base/threshold.c | 6 +- app/brightness_contrast.c | 6 +- app/brush_edit.c | 2 +- app/brush_select.c | 4 +- app/by_color_select.c | 4 +- app/channel_ops.c | 4 +- app/channels_dialog.c | 8 +- app/color_balance.c | 6 +- app/color_notebook.c | 4 +- app/color_picker.c | 2 +- app/colormap_dialog.i.c | 2 +- app/convert.c | 4 +- app/core/gimp-edit.c | 4 +- app/core/gimpdrawable-offset.c | 4 +- app/core/gimpedit.c | 4 +- app/core/gimpimage-convert.c | 4 +- app/core/gimpimage-duplicate.c | 4 +- app/core/gimpimage-qmask.c | 4 +- app/core/gimpimage-quick-mask.c | 4 +- app/crop.c | 6 +- app/curves.c | 6 +- app/devices.c | 4 +- app/dialogs/color-dialog.c | 4 +- app/dialogs/image-new-dialog.c | 10 +- app/dialogs/info-window.c | 2 +- app/dialogs/module-dialog.c | 2 +- app/dialogs/preferences-dialog.c | 6 +- app/dialogs/resize-dialog.c | 4 +- app/dialogs/user-install-dialog.c | 10 +- app/display/gimpdisplay-ops.c | 4 +- app/display/gimpdisplayshell-filter-dialog.c | 4 +- app/display/gimpdisplayshell-qmask.c | 4 +- app/display/gimpnavigationeditor.c | 2 +- app/display/gimpnavigationview.c | 2 +- app/display/gimpprogress.c | 2 +- app/errorconsole.c | 4 +- app/file_new_dialog.c | 10 +- app/fileops.c | 4 +- app/gdisplay_color_ui.c | 4 +- app/gdisplay_ops.c | 4 +- app/gimpdrawable-offset.c | 4 +- app/gimphelp.c | 4 +- app/gimpimage-convert.c | 4 +- app/gimpimage-duplicate.c | 4 +- app/gimpprogress.c | 2 +- app/gimpui.c | 6 +- app/global_edit.c | 4 +- app/gradient.c | 16 +- app/gradient_editor.c | 16 +- app/gradient_select.c | 4 +- app/gui/brush-editor.c | 2 +- app/gui/brush-select.c | 4 +- app/gui/channels-dialog.c | 8 +- app/gui/color-notebook.c | 4 +- app/gui/device-status-dialog.c | 4 +- app/gui/file-new-dialog.c | 10 +- app/gui/gradient-editor.c | 16 +- app/gui/gradient-select.c | 4 +- app/gui/info-window.c | 2 +- app/gui/input-dialog.c | 4 +- app/gui/layers-dialog.c | 22 +- app/gui/module-browser.c | 2 +- app/gui/palette-editor.c | 18 +- app/gui/palette-select.c | 4 +- app/gui/pattern-select.c | 4 +- app/gui/preferences-dialog.c | 6 +- app/gui/qmask-commands.c | 4 +- app/gui/resize-dialog.c | 4 +- app/gui/user-install-dialog.c | 10 +- app/histogram_tool.c | 2 +- app/hue_saturation.c | 6 +- app/info_window.c | 2 +- app/install.c | 10 +- app/layers_dialog.c | 22 +- app/levels.c | 6 +- app/measure.c | 2 +- app/module_db.c | 2 +- app/nav_window.c | 2 +- app/palette.c | 18 +- app/palette_select.c | 4 +- app/pattern_select.c | 4 +- app/posterize.c | 6 +- app/preferences_dialog.c | 6 +- app/qmask.c | 4 +- app/resize.c | 4 +- app/threshold.c | 6 +- app/tools.c | 4 +- app/tools/brightness_contrast.c | 6 +- app/tools/by_color_select.c | 4 +- app/tools/color_balance.c | 6 +- app/tools/color_picker.c | 2 +- app/tools/crop.c | 6 +- app/tools/curves.c | 6 +- app/tools/gimpbrightnesscontrasttool.c | 6 +- app/tools/gimpbycolorselecttool.c | 4 +- app/tools/gimpcolorbalancetool.c | 6 +- app/tools/gimpcroptool.c | 6 +- app/tools/gimpcurvestool.c | 6 +- app/tools/gimphistogramtool.c | 2 +- app/tools/gimphuesaturationtool.c | 6 +- app/tools/gimplevelstool.c | 6 +- app/tools/gimpmeasuretool.c | 2 +- app/tools/gimpposterizetool.c | 6 +- app/tools/gimpthresholdtool.c | 6 +- app/tools/histogram_tool.c | 2 +- app/tools/hue_saturation.c | 6 +- app/tools/levels.c | 6 +- app/tools/measure.c | 2 +- app/tools/posterize.c | 6 +- app/tools/threshold.c | 6 +- app/tools/tools.c | 4 +- app/tools/transform_core.c | 4 +- app/transform_core.c | 4 +- app/undo_history.c | 2 +- app/user_install.c | 10 +- app/widgets/gimpbrusheditor.c | 2 +- app/widgets/gimpcolordialog.c | 4 +- app/widgets/gimpcolordisplayeditor.c | 4 +- app/widgets/gimpdeviceinfo.c | 4 +- app/widgets/gimpdevices.c | 4 +- app/widgets/gimpgradienteditor.c | 16 +- app/widgets/gimphelp.c | 4 +- app/widgets/gimppaletteeditor.c | 18 +- app/widgets/gimpwidgets-utils.c | 6 +- libgimp/gimpdialog.c | 34 ++- libgimp/gimpdialog.h | 2 + libgimp/gimphelp.c | 6 - libgimp/gimphelp_pdb.c | 6 - libgimpwidgets/gimpdialog.c | 34 ++- libgimpwidgets/gimpdialog.h | 2 + plug-ins/common/CEL.c | 23 +- plug-ins/common/CML_explorer.c | 154 ++++------ plug-ins/common/Makefile.am | 18 +- plug-ins/common/aa.c | 45 +-- plug-ins/common/align_layers.c | 94 +++--- plug-ins/common/animationplay.c | 51 ++-- plug-ins/common/apply_lens.c | 184 +++++------ plug-ins/common/blinds.c | 170 +++++------ plug-ins/common/blur.c | 28 +- plug-ins/common/bumpmap.c | 90 +++--- plug-ins/common/checkerboard.c | 56 ++-- plug-ins/common/colorify.c | 55 ++-- plug-ins/common/colortoalpha.c | 50 ++- plug-ins/common/compose.c | 58 ++-- plug-ins/common/convmatrix.c | 63 ++-- plug-ins/common/csource.c | 46 ++- plug-ins/common/cubism.c | 53 ++-- plug-ins/common/curve_bend.c | 154 ++++------ plug-ins/common/decompose.c | 50 ++- plug-ins/common/deinterlace.c | 135 ++++---- plug-ins/common/depthmerge.c | 108 +++---- plug-ins/common/despeckle.c | 174 ++++++----- plug-ins/common/destripe.c | 95 +++--- plug-ins/common/diffraction.c | 306 +++++++++---------- plug-ins/common/displace.c | 57 ++-- plug-ins/common/grid.c | 6 +- plug-ins/helpbrowser/Makefile.am | 1 + plug-ins/helpbrowser/helpbrowser.c | 8 +- 165 files changed, 1495 insertions(+), 1676 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25ac12c612..772bfc9f58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +2000-01-06 Michael Natterer + + * app/[all files using the dialog or action area constructors] + * libgimp/gimpdialog.[ch]: added a "slot_object" agrument to the + constructors' va_args lists to allow the action area buttons to be + connected wich gtk_signal_connect_object(). + + * libgimp/gimphelp.c: show the correct help page for plugins. + + * plug-ins/common/CEL.c + * plug-ins/common/CML_explorer.c + * plug-ins/common/Makefile.am + * plug-ins/common/aa.c + * plug-ins/common/align_layers.c + * plug-ins/common/animationplay.c + * plug-ins/common/apply_lens.c + * plug-ins/common/blinds.c + * plug-ins/common/blur.c + * plug-ins/common/bumpmap.c + * plug-ins/common/checkerboard.c + * plug-ins/common/colorify.c + * plug-ins/common/colortoalpha.c + * plug-ins/common/compose.c + * plug-ins/common/convmatrix.c + * plug-ins/common/csource.c + * plug-ins/common/cubism.c + * plug-ins/common/curve_bend.c + * plug-ins/common/decompose.c + * plug-ins/common/deinterlace.c + * plug-ins/common/depthmerge.c + * plug-ins/common/despeckle.c + * plug-ins/common/destripe.c + * plug-ins/common/diffraction.c + * plug-ins/common/displace.c + * plug-ins/common/grid.c + * plug-ins/helpbrowser/Makefile.am + * plug-ins/helpbrowser/helpbrowser.c: use the dialog constructor + and enable the "F1" help key. + 2000-01-06 Kelly Lynn Martin * PLUGIN_MAINTAINERS (AUTHOR): added myself as maintainer of @@ -30,7 +69,7 @@ Thu Jan 6 00:58:32 CET 2000 Sven Neumann * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/imagemap/imap_main.c: strtok() is dangerous !! - + "Never use this function. This function modifies its first argument." So if you absolutely need to use it, save a pointer to your string or bad things will happen soon. diff --git a/app/actions/qmask-commands.c b/app/actions/qmask-commands.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/actions/qmask-commands.c +++ b/app/actions/qmask-commands.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/app_procs.c b/app/app_procs.c index fe94bbc25e..9712cd7b6d 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -744,9 +744,9 @@ really_quit_dialog (void) FALSE, FALSE, FALSE, _("Quit"), really_quit_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), really_quit_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/base/color-balance.c b/app/base/color-balance.c index a54e4a6ac6..6aa5eebcc7 100644 --- a/app/base/color-balance.c +++ b/app/base/color-balance.c @@ -268,11 +268,11 @@ color_balance_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), color_balance_ok_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Reset"), color_balance_reset_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_balance_cancel_callback, - cbd, NULL, FALSE, TRUE, + cbd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/base/curves.c b/app/base/curves.c index 545697a325..5f38ecefff 100644 --- a/app/base/curves.c +++ b/app/base/curves.c @@ -558,11 +558,11 @@ curves_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), curves_ok_callback, - cd, NULL, TRUE, FALSE, + cd, NULL, NULL, TRUE, FALSE, _("Reset"), curves_reset_callback, - cd, NULL, FALSE, FALSE, + cd, NULL, NULL, FALSE, FALSE, _("Cancel"), curves_cancel_callback, - cd, NULL, FALSE, TRUE, + cd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/base/hue-saturation.c b/app/base/hue-saturation.c index d8dfb7f2ca..2758a8a044 100644 --- a/app/base/hue-saturation.c +++ b/app/base/hue-saturation.c @@ -370,11 +370,11 @@ hue_saturation_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), hue_saturation_ok_callback, - hsd, NULL, TRUE, FALSE, + hsd, NULL, NULL, TRUE, FALSE, _("Reset"), hue_saturation_reset_callback, - hsd, NULL, FALSE, FALSE, + hsd, NULL, NULL, FALSE, FALSE, _("Cancel"), hue_saturation_cancel_callback, - hsd, NULL, FALSE, TRUE, + hsd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/base/threshold.c b/app/base/threshold.c index e61a81f1d8..d92a575e73 100644 --- a/app/base/threshold.c +++ b/app/base/threshold.c @@ -268,11 +268,11 @@ threshold_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), threshold_ok_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Reset"), threshold_reset_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Cancel"), threshold_cancel_callback, - td, NULL, FALSE, TRUE, + td, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/brightness_contrast.c b/app/brightness_contrast.c index bab15c3461..1fad54f4aa 100644 --- a/app/brightness_contrast.c +++ b/app/brightness_contrast.c @@ -211,11 +211,11 @@ brightness_contrast_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), brightness_contrast_ok_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Reset"), brightness_contrast_reset_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Cancel"), brightness_contrast_cancel_callback, - bcd, NULL, FALSE, TRUE, + bcd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/brush_edit.c b/app/brush_edit.c index 092d0784ff..dd27645401 100644 --- a/app/brush_edit.c +++ b/app/brush_edit.c @@ -213,7 +213,7 @@ brush_edit_generated_new (void) FALSE, TRUE, FALSE, _("Close"), brush_edit_close_callback, - begw, NULL, TRUE, TRUE, + begw, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/brush_select.c b/app/brush_select.c index 330502018b..ae3a81dcb8 100644 --- a/app/brush_select.c +++ b/app/brush_select.c @@ -275,9 +275,9 @@ brush_select_new (gchar *title, FALSE, TRUE, FALSE, _("Refresh"), brush_select_refresh_callback, - bsp, NULL, FALSE, FALSE, + bsp, NULL, NULL, FALSE, FALSE, _("Close"), brush_select_close_callback, - bsp, NULL, TRUE, TRUE, + bsp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/by_color_select.c b/app/by_color_select.c index f6412d6ac3..bce051a8cc 100644 --- a/app/by_color_select.c +++ b/app/by_color_select.c @@ -587,9 +587,9 @@ by_color_select_dialog_new (void) FALSE, TRUE, FALSE, _("Reset"), by_color_select_reset_callback, - bcd, NULL, FALSE, FALSE, + bcd, NULL, NULL, FALSE, FALSE, _("Close"), by_color_select_close_callback, - bcd, NULL, TRUE, TRUE, + bcd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/channel_ops.c b/app/channel_ops.c index 9eb67b8823..29d888c276 100644 --- a/app/channel_ops.c +++ b/app/channel_ops.c @@ -90,9 +90,9 @@ channel_ops_offset (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), offset_ok_callback, - off_d, NULL, TRUE, FALSE, + off_d, NULL, NULL, TRUE, FALSE, _("Cancel"), offset_cancel_callback, - off_d, NULL, FALSE, TRUE, + off_d, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/channels_dialog.c b/app/channels_dialog.c index 52040ca03d..95ecd68839 100644 --- a/app/channels_dialog.c +++ b/app/channels_dialog.c @@ -2427,9 +2427,9 @@ channels_dialog_new_channel_query (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), new_channel_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), new_channel_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -2601,9 +2601,9 @@ channels_dialog_edit_channel_query (ChannelWidget *channel_widget) FALSE, TRUE, FALSE, _("OK"), edit_channel_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_channel_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/color_balance.c b/app/color_balance.c index a54e4a6ac6..6aa5eebcc7 100644 --- a/app/color_balance.c +++ b/app/color_balance.c @@ -268,11 +268,11 @@ color_balance_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), color_balance_ok_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Reset"), color_balance_reset_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_balance_cancel_callback, - cbd, NULL, FALSE, TRUE, + cbd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/color_notebook.c b/app/color_notebook.c index b9d3b58194..2cb5f2b2c6 100644 --- a/app/color_notebook.c +++ b/app/color_notebook.c @@ -111,10 +111,10 @@ color_notebook_new (int r, wants_updates ? _("Close") : _("OK"), color_notebook_ok_callback, - cnp, NULL, TRUE, FALSE, + cnp, NULL, NULL, TRUE, FALSE, wants_updates ? _("Revert to Old Color") : _("Cancel"), color_notebook_cancel_callback, - cnp, NULL, FALSE, TRUE, + cnp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/color_picker.c b/app/color_picker.c index b4ea19a259..01e25804a7 100644 --- a/app/color_picker.c +++ b/app/color_picker.c @@ -295,7 +295,7 @@ color_picker_button_press (Tool *tool, (GTK_DIALOG (color_picker_info->shell), _("Close"), color_picker_info_window_close_callback, - color_picker_info, NULL, TRUE, FALSE, + color_picker_info, NULL, NULL, TRUE, FALSE, NULL); } diff --git a/app/colormap_dialog.i.c b/app/colormap_dialog.i.c index 120d17cccc..cdd41f3f55 100644 --- a/app/colormap_dialog.i.c +++ b/app/colormap_dialog.i.c @@ -159,7 +159,7 @@ ipal_create (GimpSet *context) gimp_dialog_create_action_area (GTK_DIALOG (ipal), _("Close"), ipal_close_callback, - ipal, NULL, TRUE, TRUE, + ipal, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/convert.c b/app/convert.c index 2eee82e119..6b345c5db2 100644 --- a/app/convert.c +++ b/app/convert.c @@ -496,9 +496,9 @@ convert_to_indexed (GimpImage *gimage) FALSE, FALSE, TRUE, _("OK"), indexed_ok_callback, - dialog, NULL, TRUE, FALSE, + dialog, NULL, NULL, TRUE, FALSE, _("Cancel"), indexed_cancel_callback, - dialog, NULL, FALSE, TRUE, + dialog, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index ad52e8fd2c..f750afc9b2 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -724,9 +724,9 @@ paste_named_buffer (GDisplay *gdisp) FALSE, TRUE, FALSE, _("Delete"), named_buffer_delete_callback, - pn_dlg, NULL, FALSE, FALSE, + pn_dlg, NULL, NULL, FALSE, FALSE, _("Cancel"), named_buffer_cancel_callback, - pn_dlg, NULL, TRUE, TRUE, + pn_dlg, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/core/gimpdrawable-offset.c b/app/core/gimpdrawable-offset.c index 9eb67b8823..29d888c276 100644 --- a/app/core/gimpdrawable-offset.c +++ b/app/core/gimpdrawable-offset.c @@ -90,9 +90,9 @@ channel_ops_offset (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), offset_ok_callback, - off_d, NULL, TRUE, FALSE, + off_d, NULL, NULL, TRUE, FALSE, _("Cancel"), offset_cancel_callback, - off_d, NULL, FALSE, TRUE, + off_d, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/core/gimpedit.c b/app/core/gimpedit.c index ad52e8fd2c..f750afc9b2 100644 --- a/app/core/gimpedit.c +++ b/app/core/gimpedit.c @@ -724,9 +724,9 @@ paste_named_buffer (GDisplay *gdisp) FALSE, TRUE, FALSE, _("Delete"), named_buffer_delete_callback, - pn_dlg, NULL, FALSE, FALSE, + pn_dlg, NULL, NULL, FALSE, FALSE, _("Cancel"), named_buffer_cancel_callback, - pn_dlg, NULL, TRUE, TRUE, + pn_dlg, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c index 2eee82e119..6b345c5db2 100644 --- a/app/core/gimpimage-convert.c +++ b/app/core/gimpimage-convert.c @@ -496,9 +496,9 @@ convert_to_indexed (GimpImage *gimage) FALSE, FALSE, TRUE, _("OK"), indexed_ok_callback, - dialog, NULL, TRUE, FALSE, + dialog, NULL, NULL, TRUE, FALSE, _("Cancel"), indexed_cancel_callback, - dialog, NULL, FALSE, TRUE, + dialog, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/core/gimpimage-duplicate.c b/app/core/gimpimage-duplicate.c index 9eb67b8823..29d888c276 100644 --- a/app/core/gimpimage-duplicate.c +++ b/app/core/gimpimage-duplicate.c @@ -90,9 +90,9 @@ channel_ops_offset (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), offset_ok_callback, - off_d, NULL, TRUE, FALSE, + off_d, NULL, NULL, TRUE, FALSE, _("Cancel"), offset_cancel_callback, - off_d, NULL, FALSE, TRUE, + off_d, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/core/gimpimage-qmask.c b/app/core/gimpimage-qmask.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/core/gimpimage-qmask.c +++ b/app/core/gimpimage-qmask.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/core/gimpimage-quick-mask.c b/app/core/gimpimage-quick-mask.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/core/gimpimage-quick-mask.c +++ b/app/core/gimpimage-quick-mask.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/crop.c b/app/crop.c index de459a90b1..349e03cb1a 100644 --- a/app/crop.c +++ b/app/crop.c @@ -1035,11 +1035,11 @@ crop_info_create (Tool *tool) gimp_dialog_create_action_area (GTK_DIALOG (crop_info->shell), _("Crop"), crop_crop_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Resize"), crop_resize_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), crop_close_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, NULL); diff --git a/app/curves.c b/app/curves.c index 545697a325..5f38ecefff 100644 --- a/app/curves.c +++ b/app/curves.c @@ -558,11 +558,11 @@ curves_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), curves_ok_callback, - cd, NULL, TRUE, FALSE, + cd, NULL, NULL, TRUE, FALSE, _("Reset"), curves_reset_callback, - cd, NULL, FALSE, FALSE, + cd, NULL, NULL, FALSE, FALSE, _("Cancel"), curves_cancel_callback, - cd, NULL, FALSE, TRUE, + cd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/devices.c b/app/devices.c index 3885d3bbdc..8817873bcb 100644 --- a/app/devices.c +++ b/app/devices.c @@ -751,9 +751,9 @@ device_status_create (void) FALSE, FALSE, TRUE, _("Save"), (GtkSignalFunc) devices_write_rc, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), devices_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/dialogs/color-dialog.c b/app/dialogs/color-dialog.c index b9d3b58194..2cb5f2b2c6 100644 --- a/app/dialogs/color-dialog.c +++ b/app/dialogs/color-dialog.c @@ -111,10 +111,10 @@ color_notebook_new (int r, wants_updates ? _("Close") : _("OK"), color_notebook_ok_callback, - cnp, NULL, TRUE, FALSE, + cnp, NULL, NULL, TRUE, FALSE, wants_updates ? _("Revert to Old Color") : _("Cancel"), color_notebook_cancel_callback, - cnp, NULL, FALSE, TRUE, + cnp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index 5b2ea0de94..ea9ba575dc 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -195,9 +195,9 @@ file_new_confirm_dialog (NewImageInfo *info) FALSE, FALSE, FALSE, _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); @@ -377,11 +377,11 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig) FALSE, FALSE, TRUE, _("OK"), file_new_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Reset"), file_new_reset_callback, - info, NULL, FALSE, FALSE, + info, NULL, NULL, FALSE, FALSE, _("Cancel"), file_new_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/dialogs/info-window.c b/app/dialogs/info-window.c index 49f6b8fc7b..225a4ba309 100644 --- a/app/dialogs/info-window.c +++ b/app/dialogs/info-window.c @@ -306,7 +306,7 @@ info_window_create (GDisplay *gdisp) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), info_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/dialogs/module-dialog.c b/app/dialogs/module-dialog.c index 19ee82bb72..69a71dfad1 100644 --- a/app/dialogs/module-dialog.c +++ b/app/dialogs/module-dialog.c @@ -275,7 +275,7 @@ module_db_browser_new (void) FALSE, TRUE, FALSE, _("OK"), browser_popdown_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index 89d3fb4736..e32e433258 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -1260,11 +1260,11 @@ file_pref_cmd_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("OK"), file_prefs_ok_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Save"), file_prefs_save_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), file_prefs_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/dialogs/resize-dialog.c b/app/dialogs/resize-dialog.c index 8e18f13434..ce65fb638d 100644 --- a/app/dialogs/resize-dialog.c +++ b/app/dialogs/resize-dialog.c @@ -189,9 +189,9 @@ resize_widget_new (ResizeType type, FALSE, FALSE, TRUE, _("OK"), ok_cb, - user_data, NULL, TRUE, FALSE, + user_data, NULL, NULL, TRUE, FALSE, _("Cancel"), cancel_cb, - user_data, NULL, FALSE, TRUE, + user_data, NULL, NULL, FALSE, TRUE, NULL); } diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index ca0f961126..fc173d56f2 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -266,11 +266,11 @@ install_help (InstallCallback callback) FALSE, TRUE, FALSE, _("Install"), help_install_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Ignore"), help_ignore_callback, - callback, NULL, FALSE, FALSE, + callback, NULL, NULL, FALSE, FALSE, _("Quit"), help_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); @@ -414,9 +414,9 @@ install_run (InstallCallback callback) FALSE, TRUE, FALSE, _("Continue"), install_continue_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Quit"), install_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/display/gimpdisplay-ops.c b/app/display/gimpdisplay-ops.c index ef2576d517..699d5881f8 100644 --- a/app/display/gimpdisplay-ops.c +++ b/app/display/gimpdisplay-ops.c @@ -352,9 +352,9 @@ gdisplay_close_warning_dialog (char *image_name, FALSE, FALSE, FALSE, _("Close"), gdisplay_close_warning_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), gdisplay_cancel_warning_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/display/gimpdisplayshell-filter-dialog.c b/app/display/gimpdisplayshell-filter-dialog.c index 210c46b5eb..5c0b3434f5 100644 --- a/app/display/gimpdisplayshell-filter-dialog.c +++ b/app/display/gimpdisplayshell-filter-dialog.c @@ -124,9 +124,9 @@ make_dialog (ColorDisplayDialog *cdd) FALSE, TRUE, FALSE, _("OK"), color_display_ok_callback, - cdd, NULL, TRUE, FALSE, + cdd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_display_cancel_callback, - cdd, NULL, FALSE, TRUE, + cdd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/display/gimpdisplayshell-qmask.c b/app/display/gimpdisplayshell-qmask.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/display/gimpdisplayshell-qmask.c +++ b/app/display/gimpdisplayshell-qmask.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c index ca33e9bf1a..13185c1365 100644 --- a/app/display/gimpnavigationeditor.c +++ b/app/display/gimpnavigationeditor.c @@ -1364,7 +1364,7 @@ nav_window_create (void *gdisp_ptr) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), nav_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/display/gimpnavigationview.c b/app/display/gimpnavigationview.c index ca33e9bf1a..13185c1365 100644 --- a/app/display/gimpnavigationview.c +++ b/app/display/gimpnavigationview.c @@ -1364,7 +1364,7 @@ nav_window_create (void *gdisp_ptr) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), nav_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/display/gimpprogress.c b/app/display/gimpprogress.c index a1832b69c7..f79d65bc1b 100644 --- a/app/display/gimpprogress.c +++ b/app/display/gimpprogress.c @@ -112,7 +112,7 @@ progress_start (GDisplay *gdisp, FALSE, TRUE, FALSE, _("Cancel"), NULL, - NULL, &p->cancelbutton, TRUE, TRUE, + NULL, NULL, &p->cancelbutton, TRUE, TRUE, NULL); diff --git a/app/errorconsole.c b/app/errorconsole.c index 972b48cad6..36fa2675f1 100644 --- a/app/errorconsole.c +++ b/app/errorconsole.c @@ -277,9 +277,9 @@ error_console_create_window (void) TRUE, TRUE, FALSE, _("Clear"), error_console_clear_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), error_console_close_callback, - text, NULL, TRUE, TRUE, + text, NULL, NULL, TRUE, TRUE, NULL); /* register this one only */ diff --git a/app/file_new_dialog.c b/app/file_new_dialog.c index 5b2ea0de94..ea9ba575dc 100644 --- a/app/file_new_dialog.c +++ b/app/file_new_dialog.c @@ -195,9 +195,9 @@ file_new_confirm_dialog (NewImageInfo *info) FALSE, FALSE, FALSE, _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); @@ -377,11 +377,11 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig) FALSE, FALSE, TRUE, _("OK"), file_new_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Reset"), file_new_reset_callback, - info, NULL, FALSE, FALSE, + info, NULL, NULL, FALSE, FALSE, _("Cancel"), file_new_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/fileops.c b/app/fileops.c index 006ec17c83..677fc96248 100644 --- a/app/fileops.c +++ b/app/fileops.c @@ -1687,9 +1687,9 @@ file_overwrite (char *filename, FALSE, TRUE, FALSE, _("Yes"), file_overwrite_yes_callback, - overwrite_box, NULL, TRUE, FALSE, + overwrite_box, NULL, NULL, TRUE, FALSE, _("No"), file_overwrite_no_callback, - overwrite_box, NULL, FALSE, TRUE, + overwrite_box, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gdisplay_color_ui.c b/app/gdisplay_color_ui.c index 210c46b5eb..5c0b3434f5 100644 --- a/app/gdisplay_color_ui.c +++ b/app/gdisplay_color_ui.c @@ -124,9 +124,9 @@ make_dialog (ColorDisplayDialog *cdd) FALSE, TRUE, FALSE, _("OK"), color_display_ok_callback, - cdd, NULL, TRUE, FALSE, + cdd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_display_cancel_callback, - cdd, NULL, FALSE, TRUE, + cdd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gdisplay_ops.c b/app/gdisplay_ops.c index ef2576d517..699d5881f8 100644 --- a/app/gdisplay_ops.c +++ b/app/gdisplay_ops.c @@ -352,9 +352,9 @@ gdisplay_close_warning_dialog (char *image_name, FALSE, FALSE, FALSE, _("Close"), gdisplay_close_warning_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), gdisplay_cancel_warning_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gimpdrawable-offset.c b/app/gimpdrawable-offset.c index 9eb67b8823..29d888c276 100644 --- a/app/gimpdrawable-offset.c +++ b/app/gimpdrawable-offset.c @@ -90,9 +90,9 @@ channel_ops_offset (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), offset_ok_callback, - off_d, NULL, TRUE, FALSE, + off_d, NULL, NULL, TRUE, FALSE, _("Cancel"), offset_cancel_callback, - off_d, NULL, FALSE, TRUE, + off_d, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gimphelp.c b/app/gimphelp.c index 4b732052e5..4891e8993a 100644 --- a/app/gimphelp.c +++ b/app/gimphelp.c @@ -103,7 +103,7 @@ gimp_idle_help (gpointer help_data) return FALSE; } -void +static void gimp_help_internal (gchar *current_locale, gchar *help_data) { @@ -154,7 +154,7 @@ gimp_help_internal (gchar *current_locale, } } -void +static void gimp_help_netscape (gchar *current_locale, gchar *help_data) { diff --git a/app/gimpimage-convert.c b/app/gimpimage-convert.c index 2eee82e119..6b345c5db2 100644 --- a/app/gimpimage-convert.c +++ b/app/gimpimage-convert.c @@ -496,9 +496,9 @@ convert_to_indexed (GimpImage *gimage) FALSE, FALSE, TRUE, _("OK"), indexed_ok_callback, - dialog, NULL, TRUE, FALSE, + dialog, NULL, NULL, TRUE, FALSE, _("Cancel"), indexed_cancel_callback, - dialog, NULL, FALSE, TRUE, + dialog, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gimpimage-duplicate.c b/app/gimpimage-duplicate.c index 9eb67b8823..29d888c276 100644 --- a/app/gimpimage-duplicate.c +++ b/app/gimpimage-duplicate.c @@ -90,9 +90,9 @@ channel_ops_offset (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), offset_ok_callback, - off_d, NULL, TRUE, FALSE, + off_d, NULL, NULL, TRUE, FALSE, _("Cancel"), offset_cancel_callback, - off_d, NULL, FALSE, TRUE, + off_d, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gimpprogress.c b/app/gimpprogress.c index a1832b69c7..f79d65bc1b 100644 --- a/app/gimpprogress.c +++ b/app/gimpprogress.c @@ -112,7 +112,7 @@ progress_start (GDisplay *gdisp, FALSE, TRUE, FALSE, _("Cancel"), NULL, - NULL, &p->cancelbutton, TRUE, TRUE, + NULL, NULL, &p->cancelbutton, TRUE, TRUE, NULL); diff --git a/app/gimpui.c b/app/gimpui.c index 85c020bd35..ccdcdc12b6 100644 --- a/app/gimpui.c +++ b/app/gimpui.c @@ -250,9 +250,9 @@ create_query_box (gchar *title, FALSE, TRUE, FALSE, _("OK"), ok_callback, - query_box, NULL, TRUE, FALSE, + query_box, NULL, NULL, TRUE, FALSE, _("Cancel"), query_box_cancel_callback, - query_box, NULL, FALSE, TRUE, + query_box, NULL, NULL, FALSE, TRUE, NULL); @@ -630,7 +630,7 @@ gimp_message_box (gchar *message, FALSE, FALSE, FALSE, _("OK"), gimp_message_box_close_callback, - msg_box, NULL, TRUE, TRUE, + msg_box, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/global_edit.c b/app/global_edit.c index ad52e8fd2c..f750afc9b2 100644 --- a/app/global_edit.c +++ b/app/global_edit.c @@ -724,9 +724,9 @@ paste_named_buffer (GDisplay *gdisp) FALSE, TRUE, FALSE, _("Delete"), named_buffer_delete_callback, - pn_dlg, NULL, FALSE, FALSE, + pn_dlg, NULL, NULL, FALSE, FALSE, _("Cancel"), named_buffer_cancel_callback, - pn_dlg, NULL, TRUE, TRUE, + pn_dlg, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gradient.c b/app/gradient.c index e352c9444a..a7fb1c8dff 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -796,9 +796,9 @@ gradient_editor_create (void) FALSE, TRUE, FALSE, _("Refresh"), ed_refresh_grads_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), ed_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -1785,9 +1785,9 @@ ed_delete_gradient_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), ed_do_delete_gradient_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), ed_cancel_delete_gradient_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -4867,9 +4867,9 @@ cpopup_split_uniform_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Split"), cpopup_split_uniform_split_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Cancel"), cpopup_split_uniform_cancel_callback, - NULL, NULL, FALSE, TRUE, + NULL, NULL, NULL, FALSE, TRUE, NULL); @@ -5428,9 +5428,9 @@ cpopup_replicate_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Replicate"), cpopup_do_replicate_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), cpopup_replicate_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gradient_editor.c b/app/gradient_editor.c index e352c9444a..a7fb1c8dff 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -796,9 +796,9 @@ gradient_editor_create (void) FALSE, TRUE, FALSE, _("Refresh"), ed_refresh_grads_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), ed_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -1785,9 +1785,9 @@ ed_delete_gradient_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), ed_do_delete_gradient_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), ed_cancel_delete_gradient_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -4867,9 +4867,9 @@ cpopup_split_uniform_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Split"), cpopup_split_uniform_split_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Cancel"), cpopup_split_uniform_cancel_callback, - NULL, NULL, FALSE, TRUE, + NULL, NULL, NULL, FALSE, TRUE, NULL); @@ -5428,9 +5428,9 @@ cpopup_replicate_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Replicate"), cpopup_do_replicate_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), cpopup_replicate_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gradient_select.c b/app/gradient_select.c index f71b1759b2..9ab853a0b2 100644 --- a/app/gradient_select.c +++ b/app/gradient_select.c @@ -148,9 +148,9 @@ gradient_select_new (gchar *title, FALSE, TRUE, FALSE, _("Edit"), gradient_select_edit_callback, - gsp, NULL, FALSE, FALSE, + gsp, NULL, NULL, FALSE, FALSE, _("Close"), gradient_select_close_callback, - gsp, NULL, TRUE, TRUE, + gsp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/brush-editor.c b/app/gui/brush-editor.c index 092d0784ff..dd27645401 100644 --- a/app/gui/brush-editor.c +++ b/app/gui/brush-editor.c @@ -213,7 +213,7 @@ brush_edit_generated_new (void) FALSE, TRUE, FALSE, _("Close"), brush_edit_close_callback, - begw, NULL, TRUE, TRUE, + begw, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/brush-select.c b/app/gui/brush-select.c index 330502018b..ae3a81dcb8 100644 --- a/app/gui/brush-select.c +++ b/app/gui/brush-select.c @@ -275,9 +275,9 @@ brush_select_new (gchar *title, FALSE, TRUE, FALSE, _("Refresh"), brush_select_refresh_callback, - bsp, NULL, FALSE, FALSE, + bsp, NULL, NULL, FALSE, FALSE, _("Close"), brush_select_close_callback, - bsp, NULL, TRUE, TRUE, + bsp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/channels-dialog.c b/app/gui/channels-dialog.c index 52040ca03d..95ecd68839 100644 --- a/app/gui/channels-dialog.c +++ b/app/gui/channels-dialog.c @@ -2427,9 +2427,9 @@ channels_dialog_new_channel_query (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), new_channel_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), new_channel_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -2601,9 +2601,9 @@ channels_dialog_edit_channel_query (ChannelWidget *channel_widget) FALSE, TRUE, FALSE, _("OK"), edit_channel_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_channel_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/color-notebook.c b/app/gui/color-notebook.c index b9d3b58194..2cb5f2b2c6 100644 --- a/app/gui/color-notebook.c +++ b/app/gui/color-notebook.c @@ -111,10 +111,10 @@ color_notebook_new (int r, wants_updates ? _("Close") : _("OK"), color_notebook_ok_callback, - cnp, NULL, TRUE, FALSE, + cnp, NULL, NULL, TRUE, FALSE, wants_updates ? _("Revert to Old Color") : _("Cancel"), color_notebook_cancel_callback, - cnp, NULL, FALSE, TRUE, + cnp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/device-status-dialog.c b/app/gui/device-status-dialog.c index 3885d3bbdc..8817873bcb 100644 --- a/app/gui/device-status-dialog.c +++ b/app/gui/device-status-dialog.c @@ -751,9 +751,9 @@ device_status_create (void) FALSE, FALSE, TRUE, _("Save"), (GtkSignalFunc) devices_write_rc, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), devices_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index 5b2ea0de94..ea9ba575dc 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -195,9 +195,9 @@ file_new_confirm_dialog (NewImageInfo *info) FALSE, FALSE, FALSE, _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); @@ -377,11 +377,11 @@ ui_new_image_window_create (const GimpImageNewValues *values_orig) FALSE, FALSE, TRUE, _("OK"), file_new_ok_callback, - info, NULL, TRUE, FALSE, + info, NULL, NULL, TRUE, FALSE, _("Reset"), file_new_reset_callback, - info, NULL, FALSE, FALSE, + info, NULL, NULL, FALSE, FALSE, _("Cancel"), file_new_cancel_callback, - info, NULL, FALSE, TRUE, + info, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index e352c9444a..a7fb1c8dff 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -796,9 +796,9 @@ gradient_editor_create (void) FALSE, TRUE, FALSE, _("Refresh"), ed_refresh_grads_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), ed_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -1785,9 +1785,9 @@ ed_delete_gradient_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), ed_do_delete_gradient_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), ed_cancel_delete_gradient_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -4867,9 +4867,9 @@ cpopup_split_uniform_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Split"), cpopup_split_uniform_split_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Cancel"), cpopup_split_uniform_cancel_callback, - NULL, NULL, FALSE, TRUE, + NULL, NULL, NULL, FALSE, TRUE, NULL); @@ -5428,9 +5428,9 @@ cpopup_replicate_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Replicate"), cpopup_do_replicate_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), cpopup_replicate_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/gradient-select.c b/app/gui/gradient-select.c index f71b1759b2..9ab853a0b2 100644 --- a/app/gui/gradient-select.c +++ b/app/gui/gradient-select.c @@ -148,9 +148,9 @@ gradient_select_new (gchar *title, FALSE, TRUE, FALSE, _("Edit"), gradient_select_edit_callback, - gsp, NULL, FALSE, FALSE, + gsp, NULL, NULL, FALSE, FALSE, _("Close"), gradient_select_close_callback, - gsp, NULL, TRUE, TRUE, + gsp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/info-window.c b/app/gui/info-window.c index 49f6b8fc7b..225a4ba309 100644 --- a/app/gui/info-window.c +++ b/app/gui/info-window.c @@ -306,7 +306,7 @@ info_window_create (GDisplay *gdisp) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), info_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/gui/input-dialog.c b/app/gui/input-dialog.c index 3885d3bbdc..8817873bcb 100644 --- a/app/gui/input-dialog.c +++ b/app/gui/input-dialog.c @@ -751,9 +751,9 @@ device_status_create (void) FALSE, FALSE, TRUE, _("Save"), (GtkSignalFunc) devices_write_rc, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), devices_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 43bf5270aa..20b6a6a653 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -3347,9 +3347,9 @@ layers_dialog_new_layer_query (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), new_layer_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), new_layer_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3553,9 +3553,9 @@ layers_dialog_edit_layer_query (LayerWidget *layer_widget) FALSE, TRUE, FALSE, _("OK"), edit_layer_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_layer_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3678,9 +3678,9 @@ layers_dialog_add_mask_query (Layer *layer) FALSE, TRUE, FALSE, _("OK"), add_mask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), add_mask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3790,11 +3790,11 @@ layers_dialog_apply_mask_query (Layer *layer) FALSE, TRUE, FALSE, _("Apply"), apply_mask_query_apply_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Discard"), apply_mask_query_discard_callback, - options, NULL, FALSE, FALSE, + options, NULL, NULL, FALSE, FALSE, _("Cancel"), apply_mask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -4079,9 +4079,9 @@ layers_dialog_layer_merge_query (GImage *gimage, FALSE, TRUE, FALSE, _("OK"), layer_merge_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), layer_merge_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/module-browser.c b/app/gui/module-browser.c index 19ee82bb72..69a71dfad1 100644 --- a/app/gui/module-browser.c +++ b/app/gui/module-browser.c @@ -275,7 +275,7 @@ module_db_browser_new (void) FALSE, TRUE, FALSE, _("OK"), browser_popdown_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index 5c049f7057..e24f900b1d 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -1848,9 +1848,9 @@ palette_dialog_delete_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), palette_dialog_do_delete_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Cancel"), palette_dialog_cancel_delete_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); @@ -2111,11 +2111,11 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Save"), palette_dialog_save_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Refresh"), palette_dialog_refresh_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -2129,9 +2129,9 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Edit"), palette_dialog_edit_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -3175,9 +3175,9 @@ palette_import_dialog_new (PaletteDialog *palette) FALSE, TRUE, FALSE, _("Import"), palette_import_import_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_import_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/palette-select.c b/app/gui/palette-select.c index 0643e8d624..a92ef73fe9 100644 --- a/app/gui/palette-select.c +++ b/app/gui/palette-select.c @@ -58,9 +58,9 @@ palette_new_selection (gchar *title, FALSE, TRUE, FALSE, _("Edit"), palette_select_edit_callback, - psp, NULL, TRUE, FALSE, + psp, NULL, NULL, TRUE, FALSE, _("Close"), palette_select_close_callback, - psp, NULL, FALSE, TRUE, + psp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/pattern-select.c b/app/gui/pattern-select.c index d4c87a4725..ba6d1fa37d 100644 --- a/app/gui/pattern-select.c +++ b/app/gui/pattern-select.c @@ -167,9 +167,9 @@ pattern_select_new (gchar *title, FALSE, TRUE, FALSE, _("Refresh"), pattern_select_refresh_callback, - psp, NULL, FALSE, FALSE, + psp, NULL, NULL, FALSE, FALSE, _("Close"), pattern_select_close_callback, - psp, NULL, TRUE, TRUE, + psp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/preferences-dialog.c b/app/gui/preferences-dialog.c index 89d3fb4736..e32e433258 100644 --- a/app/gui/preferences-dialog.c +++ b/app/gui/preferences-dialog.c @@ -1260,11 +1260,11 @@ file_pref_cmd_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("OK"), file_prefs_ok_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Save"), file_prefs_save_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), file_prefs_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/gui/qmask-commands.c b/app/gui/qmask-commands.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/gui/qmask-commands.c +++ b/app/gui/qmask-commands.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/gui/resize-dialog.c b/app/gui/resize-dialog.c index 8e18f13434..ce65fb638d 100644 --- a/app/gui/resize-dialog.c +++ b/app/gui/resize-dialog.c @@ -189,9 +189,9 @@ resize_widget_new (ResizeType type, FALSE, FALSE, TRUE, _("OK"), ok_cb, - user_data, NULL, TRUE, FALSE, + user_data, NULL, NULL, TRUE, FALSE, _("Cancel"), cancel_cb, - user_data, NULL, FALSE, TRUE, + user_data, NULL, NULL, FALSE, TRUE, NULL); } diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index ca0f961126..fc173d56f2 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -266,11 +266,11 @@ install_help (InstallCallback callback) FALSE, TRUE, FALSE, _("Install"), help_install_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Ignore"), help_ignore_callback, - callback, NULL, FALSE, FALSE, + callback, NULL, NULL, FALSE, FALSE, _("Quit"), help_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); @@ -414,9 +414,9 @@ install_run (InstallCallback callback) FALSE, TRUE, FALSE, _("Continue"), install_continue_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Quit"), install_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/histogram_tool.c b/app/histogram_tool.c index 439b5f4775..cf5c8a262c 100644 --- a/app/histogram_tool.c +++ b/app/histogram_tool.c @@ -290,7 +290,7 @@ histogram_tool_dialog_new (void) FALSE, TRUE, FALSE, _("Close"), histogram_tool_close_callback, - htd, NULL, TRUE, TRUE, + htd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/hue_saturation.c b/app/hue_saturation.c index d8dfb7f2ca..2758a8a044 100644 --- a/app/hue_saturation.c +++ b/app/hue_saturation.c @@ -370,11 +370,11 @@ hue_saturation_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), hue_saturation_ok_callback, - hsd, NULL, TRUE, FALSE, + hsd, NULL, NULL, TRUE, FALSE, _("Reset"), hue_saturation_reset_callback, - hsd, NULL, FALSE, FALSE, + hsd, NULL, NULL, FALSE, FALSE, _("Cancel"), hue_saturation_cancel_callback, - hsd, NULL, FALSE, TRUE, + hsd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/info_window.c b/app/info_window.c index 49f6b8fc7b..225a4ba309 100644 --- a/app/info_window.c +++ b/app/info_window.c @@ -306,7 +306,7 @@ info_window_create (GDisplay *gdisp) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), info_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/install.c b/app/install.c index ca0f961126..fc173d56f2 100644 --- a/app/install.c +++ b/app/install.c @@ -266,11 +266,11 @@ install_help (InstallCallback callback) FALSE, TRUE, FALSE, _("Install"), help_install_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Ignore"), help_ignore_callback, - callback, NULL, FALSE, FALSE, + callback, NULL, NULL, FALSE, FALSE, _("Quit"), help_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); @@ -414,9 +414,9 @@ install_run (InstallCallback callback) FALSE, TRUE, FALSE, _("Continue"), install_continue_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Quit"), install_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 43bf5270aa..20b6a6a653 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -3347,9 +3347,9 @@ layers_dialog_new_layer_query (GimpImage* gimage) FALSE, TRUE, FALSE, _("OK"), new_layer_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), new_layer_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3553,9 +3553,9 @@ layers_dialog_edit_layer_query (LayerWidget *layer_widget) FALSE, TRUE, FALSE, _("OK"), edit_layer_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_layer_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3678,9 +3678,9 @@ layers_dialog_add_mask_query (Layer *layer) FALSE, TRUE, FALSE, _("OK"), add_mask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), add_mask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -3790,11 +3790,11 @@ layers_dialog_apply_mask_query (Layer *layer) FALSE, TRUE, FALSE, _("Apply"), apply_mask_query_apply_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Discard"), apply_mask_query_discard_callback, - options, NULL, FALSE, FALSE, + options, NULL, NULL, FALSE, FALSE, _("Cancel"), apply_mask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); @@ -4079,9 +4079,9 @@ layers_dialog_layer_merge_query (GImage *gimage, FALSE, TRUE, FALSE, _("OK"), layer_merge_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), layer_merge_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/levels.c b/app/levels.c index c75dc24ad5..0db3fd2e25 100644 --- a/app/levels.c +++ b/app/levels.c @@ -362,11 +362,11 @@ levels_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), levels_ok_callback, - ld, NULL, TRUE, FALSE, + ld, NULL, NULL, TRUE, FALSE, _("Reset"), levels_reset_callback, - ld, NULL, FALSE, FALSE, + ld, NULL, NULL, FALSE, FALSE, _("Cancel"), levels_cancel_callback, - ld, NULL, FALSE, TRUE, + ld, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/measure.c b/app/measure.c index 3932c6da93..2cee1723e4 100644 --- a/app/measure.c +++ b/app/measure.c @@ -268,7 +268,7 @@ measure_tool_button_press (Tool *tool, (GTK_DIALOG (measure_tool_info->shell), _("Close"), measure_tool_info_window_close_callback, - measure_tool_info, NULL, TRUE, FALSE, + measure_tool_info, NULL, NULL, TRUE, FALSE, NULL); } diff --git a/app/module_db.c b/app/module_db.c index 19ee82bb72..69a71dfad1 100644 --- a/app/module_db.c +++ b/app/module_db.c @@ -275,7 +275,7 @@ module_db_browser_new (void) FALSE, TRUE, FALSE, _("OK"), browser_popdown_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/nav_window.c b/app/nav_window.c index ca33e9bf1a..13185c1365 100644 --- a/app/nav_window.c +++ b/app/nav_window.c @@ -1364,7 +1364,7 @@ nav_window_create (void *gdisp_ptr) gimp_dialog_create_action_area (GTK_DIALOG (info_win->shell), _("Close"), nav_window_close_callback, - info_win, NULL, TRUE, FALSE, + info_win, NULL, NULL, TRUE, FALSE, NULL); diff --git a/app/palette.c b/app/palette.c index 5c049f7057..e24f900b1d 100644 --- a/app/palette.c +++ b/app/palette.c @@ -1848,9 +1848,9 @@ palette_dialog_delete_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), palette_dialog_do_delete_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Cancel"), palette_dialog_cancel_delete_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); @@ -2111,11 +2111,11 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Save"), palette_dialog_save_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Refresh"), palette_dialog_refresh_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -2129,9 +2129,9 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Edit"), palette_dialog_edit_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -3175,9 +3175,9 @@ palette_import_dialog_new (PaletteDialog *palette) FALSE, TRUE, FALSE, _("Import"), palette_import_import_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_import_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/palette_select.c b/app/palette_select.c index 0643e8d624..a92ef73fe9 100644 --- a/app/palette_select.c +++ b/app/palette_select.c @@ -58,9 +58,9 @@ palette_new_selection (gchar *title, FALSE, TRUE, FALSE, _("Edit"), palette_select_edit_callback, - psp, NULL, TRUE, FALSE, + psp, NULL, NULL, TRUE, FALSE, _("Close"), palette_select_close_callback, - psp, NULL, FALSE, TRUE, + psp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/pattern_select.c b/app/pattern_select.c index d4c87a4725..ba6d1fa37d 100644 --- a/app/pattern_select.c +++ b/app/pattern_select.c @@ -167,9 +167,9 @@ pattern_select_new (gchar *title, FALSE, TRUE, FALSE, _("Refresh"), pattern_select_refresh_callback, - psp, NULL, FALSE, FALSE, + psp, NULL, NULL, FALSE, FALSE, _("Close"), pattern_select_close_callback, - psp, NULL, TRUE, TRUE, + psp, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/posterize.c b/app/posterize.c index d851c6d49c..766fb07f44 100644 --- a/app/posterize.c +++ b/app/posterize.c @@ -194,11 +194,11 @@ posterize_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), posterize_ok_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Reset"), posterize_reset_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Cancel"), posterize_cancel_callback, - pd, NULL, FALSE, TRUE, + pd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/preferences_dialog.c b/app/preferences_dialog.c index 89d3fb4736..e32e433258 100644 --- a/app/preferences_dialog.c +++ b/app/preferences_dialog.c @@ -1260,11 +1260,11 @@ file_pref_cmd_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("OK"), file_prefs_ok_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Save"), file_prefs_save_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), file_prefs_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/qmask.c b/app/qmask.c index 9a3aa1b35e..c2d1a6c57e 100644 --- a/app/qmask.c +++ b/app/qmask.c @@ -253,9 +253,9 @@ edit_qmask_channel_query (GDisplay * gdisp) FALSE, TRUE, FALSE, _("OK"), edit_qmask_query_ok_callback, - options, NULL, TRUE, FALSE, + options, NULL, NULL, TRUE, FALSE, _("Cancel"), edit_qmask_query_cancel_callback, - options, NULL, FALSE, TRUE, + options, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/resize.c b/app/resize.c index 8e18f13434..ce65fb638d 100644 --- a/app/resize.c +++ b/app/resize.c @@ -189,9 +189,9 @@ resize_widget_new (ResizeType type, FALSE, FALSE, TRUE, _("OK"), ok_cb, - user_data, NULL, TRUE, FALSE, + user_data, NULL, NULL, TRUE, FALSE, _("Cancel"), cancel_cb, - user_data, NULL, FALSE, TRUE, + user_data, NULL, NULL, FALSE, TRUE, NULL); } diff --git a/app/threshold.c b/app/threshold.c index e61a81f1d8..d92a575e73 100644 --- a/app/threshold.c +++ b/app/threshold.c @@ -268,11 +268,11 @@ threshold_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), threshold_ok_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Reset"), threshold_reset_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Cancel"), threshold_cancel_callback, - td, NULL, FALSE, TRUE, + td, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools.c b/app/tools.c index 8662f20509..6b5b9acb40 100644 --- a/app/tools.c +++ b/app/tools.c @@ -982,9 +982,9 @@ tool_options_dialog_new (void) FALSE, TRUE, TRUE, _("Reset"), tool_options_reset_callback, - NULL, &options_reset_button, FALSE, FALSE, + NULL, NULL, &options_reset_button, FALSE, FALSE, _("Close"), tool_options_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/brightness_contrast.c b/app/tools/brightness_contrast.c index bab15c3461..1fad54f4aa 100644 --- a/app/tools/brightness_contrast.c +++ b/app/tools/brightness_contrast.c @@ -211,11 +211,11 @@ brightness_contrast_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), brightness_contrast_ok_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Reset"), brightness_contrast_reset_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Cancel"), brightness_contrast_cancel_callback, - bcd, NULL, FALSE, TRUE, + bcd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/by_color_select.c b/app/tools/by_color_select.c index f6412d6ac3..bce051a8cc 100644 --- a/app/tools/by_color_select.c +++ b/app/tools/by_color_select.c @@ -587,9 +587,9 @@ by_color_select_dialog_new (void) FALSE, TRUE, FALSE, _("Reset"), by_color_select_reset_callback, - bcd, NULL, FALSE, FALSE, + bcd, NULL, NULL, FALSE, FALSE, _("Close"), by_color_select_close_callback, - bcd, NULL, TRUE, TRUE, + bcd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/color_balance.c b/app/tools/color_balance.c index a54e4a6ac6..6aa5eebcc7 100644 --- a/app/tools/color_balance.c +++ b/app/tools/color_balance.c @@ -268,11 +268,11 @@ color_balance_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), color_balance_ok_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Reset"), color_balance_reset_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_balance_cancel_callback, - cbd, NULL, FALSE, TRUE, + cbd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/color_picker.c b/app/tools/color_picker.c index b4ea19a259..01e25804a7 100644 --- a/app/tools/color_picker.c +++ b/app/tools/color_picker.c @@ -295,7 +295,7 @@ color_picker_button_press (Tool *tool, (GTK_DIALOG (color_picker_info->shell), _("Close"), color_picker_info_window_close_callback, - color_picker_info, NULL, TRUE, FALSE, + color_picker_info, NULL, NULL, TRUE, FALSE, NULL); } diff --git a/app/tools/crop.c b/app/tools/crop.c index de459a90b1..349e03cb1a 100644 --- a/app/tools/crop.c +++ b/app/tools/crop.c @@ -1035,11 +1035,11 @@ crop_info_create (Tool *tool) gimp_dialog_create_action_area (GTK_DIALOG (crop_info->shell), _("Crop"), crop_crop_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Resize"), crop_resize_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), crop_close_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, NULL); diff --git a/app/tools/curves.c b/app/tools/curves.c index 545697a325..5f38ecefff 100644 --- a/app/tools/curves.c +++ b/app/tools/curves.c @@ -558,11 +558,11 @@ curves_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), curves_ok_callback, - cd, NULL, TRUE, FALSE, + cd, NULL, NULL, TRUE, FALSE, _("Reset"), curves_reset_callback, - cd, NULL, FALSE, FALSE, + cd, NULL, NULL, FALSE, FALSE, _("Cancel"), curves_cancel_callback, - cd, NULL, FALSE, TRUE, + cd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c index bab15c3461..1fad54f4aa 100644 --- a/app/tools/gimpbrightnesscontrasttool.c +++ b/app/tools/gimpbrightnesscontrasttool.c @@ -211,11 +211,11 @@ brightness_contrast_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), brightness_contrast_ok_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Reset"), brightness_contrast_reset_callback, - bcd, NULL, TRUE, FALSE, + bcd, NULL, NULL, TRUE, FALSE, _("Cancel"), brightness_contrast_cancel_callback, - bcd, NULL, FALSE, TRUE, + bcd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c index f6412d6ac3..bce051a8cc 100644 --- a/app/tools/gimpbycolorselecttool.c +++ b/app/tools/gimpbycolorselecttool.c @@ -587,9 +587,9 @@ by_color_select_dialog_new (void) FALSE, TRUE, FALSE, _("Reset"), by_color_select_reset_callback, - bcd, NULL, FALSE, FALSE, + bcd, NULL, NULL, FALSE, FALSE, _("Close"), by_color_select_close_callback, - bcd, NULL, TRUE, TRUE, + bcd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c index a54e4a6ac6..6aa5eebcc7 100644 --- a/app/tools/gimpcolorbalancetool.c +++ b/app/tools/gimpcolorbalancetool.c @@ -268,11 +268,11 @@ color_balance_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), color_balance_ok_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Reset"), color_balance_reset_callback, - cbd, NULL, TRUE, FALSE, + cbd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_balance_cancel_callback, - cbd, NULL, FALSE, TRUE, + cbd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c index de459a90b1..349e03cb1a 100644 --- a/app/tools/gimpcroptool.c +++ b/app/tools/gimpcroptool.c @@ -1035,11 +1035,11 @@ crop_info_create (Tool *tool) gimp_dialog_create_action_area (GTK_DIALOG (crop_info->shell), _("Crop"), crop_crop_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Resize"), crop_resize_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), crop_close_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, NULL); diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index 545697a325..5f38ecefff 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -558,11 +558,11 @@ curves_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), curves_ok_callback, - cd, NULL, TRUE, FALSE, + cd, NULL, NULL, TRUE, FALSE, _("Reset"), curves_reset_callback, - cd, NULL, FALSE, FALSE, + cd, NULL, NULL, FALSE, FALSE, _("Cancel"), curves_cancel_callback, - cd, NULL, FALSE, TRUE, + cd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimphistogramtool.c b/app/tools/gimphistogramtool.c index 439b5f4775..cf5c8a262c 100644 --- a/app/tools/gimphistogramtool.c +++ b/app/tools/gimphistogramtool.c @@ -290,7 +290,7 @@ histogram_tool_dialog_new (void) FALSE, TRUE, FALSE, _("Close"), histogram_tool_close_callback, - htd, NULL, TRUE, TRUE, + htd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c index d8dfb7f2ca..2758a8a044 100644 --- a/app/tools/gimphuesaturationtool.c +++ b/app/tools/gimphuesaturationtool.c @@ -370,11 +370,11 @@ hue_saturation_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), hue_saturation_ok_callback, - hsd, NULL, TRUE, FALSE, + hsd, NULL, NULL, TRUE, FALSE, _("Reset"), hue_saturation_reset_callback, - hsd, NULL, FALSE, FALSE, + hsd, NULL, NULL, FALSE, FALSE, _("Cancel"), hue_saturation_cancel_callback, - hsd, NULL, FALSE, TRUE, + hsd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index c75dc24ad5..0db3fd2e25 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -362,11 +362,11 @@ levels_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), levels_ok_callback, - ld, NULL, TRUE, FALSE, + ld, NULL, NULL, TRUE, FALSE, _("Reset"), levels_reset_callback, - ld, NULL, FALSE, FALSE, + ld, NULL, NULL, FALSE, FALSE, _("Cancel"), levels_cancel_callback, - ld, NULL, FALSE, TRUE, + ld, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c index 3932c6da93..2cee1723e4 100644 --- a/app/tools/gimpmeasuretool.c +++ b/app/tools/gimpmeasuretool.c @@ -268,7 +268,7 @@ measure_tool_button_press (Tool *tool, (GTK_DIALOG (measure_tool_info->shell), _("Close"), measure_tool_info_window_close_callback, - measure_tool_info, NULL, TRUE, FALSE, + measure_tool_info, NULL, NULL, TRUE, FALSE, NULL); } diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c index d851c6d49c..766fb07f44 100644 --- a/app/tools/gimpposterizetool.c +++ b/app/tools/gimpposterizetool.c @@ -194,11 +194,11 @@ posterize_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), posterize_ok_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Reset"), posterize_reset_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Cancel"), posterize_cancel_callback, - pd, NULL, FALSE, TRUE, + pd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/gimpthresholdtool.c b/app/tools/gimpthresholdtool.c index e61a81f1d8..d92a575e73 100644 --- a/app/tools/gimpthresholdtool.c +++ b/app/tools/gimpthresholdtool.c @@ -268,11 +268,11 @@ threshold_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), threshold_ok_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Reset"), threshold_reset_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Cancel"), threshold_cancel_callback, - td, NULL, FALSE, TRUE, + td, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/histogram_tool.c b/app/tools/histogram_tool.c index 439b5f4775..cf5c8a262c 100644 --- a/app/tools/histogram_tool.c +++ b/app/tools/histogram_tool.c @@ -290,7 +290,7 @@ histogram_tool_dialog_new (void) FALSE, TRUE, FALSE, _("Close"), histogram_tool_close_callback, - htd, NULL, TRUE, TRUE, + htd, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/hue_saturation.c b/app/tools/hue_saturation.c index d8dfb7f2ca..2758a8a044 100644 --- a/app/tools/hue_saturation.c +++ b/app/tools/hue_saturation.c @@ -370,11 +370,11 @@ hue_saturation_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), hue_saturation_ok_callback, - hsd, NULL, TRUE, FALSE, + hsd, NULL, NULL, TRUE, FALSE, _("Reset"), hue_saturation_reset_callback, - hsd, NULL, FALSE, FALSE, + hsd, NULL, NULL, FALSE, FALSE, _("Cancel"), hue_saturation_cancel_callback, - hsd, NULL, FALSE, TRUE, + hsd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/levels.c b/app/tools/levels.c index c75dc24ad5..0db3fd2e25 100644 --- a/app/tools/levels.c +++ b/app/tools/levels.c @@ -362,11 +362,11 @@ levels_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), levels_ok_callback, - ld, NULL, TRUE, FALSE, + ld, NULL, NULL, TRUE, FALSE, _("Reset"), levels_reset_callback, - ld, NULL, FALSE, FALSE, + ld, NULL, NULL, FALSE, FALSE, _("Cancel"), levels_cancel_callback, - ld, NULL, FALSE, TRUE, + ld, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/measure.c b/app/tools/measure.c index 3932c6da93..2cee1723e4 100644 --- a/app/tools/measure.c +++ b/app/tools/measure.c @@ -268,7 +268,7 @@ measure_tool_button_press (Tool *tool, (GTK_DIALOG (measure_tool_info->shell), _("Close"), measure_tool_info_window_close_callback, - measure_tool_info, NULL, TRUE, FALSE, + measure_tool_info, NULL, NULL, TRUE, FALSE, NULL); } diff --git a/app/tools/posterize.c b/app/tools/posterize.c index d851c6d49c..766fb07f44 100644 --- a/app/tools/posterize.c +++ b/app/tools/posterize.c @@ -194,11 +194,11 @@ posterize_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), posterize_ok_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Reset"), posterize_reset_callback, - pd, NULL, TRUE, FALSE, + pd, NULL, NULL, TRUE, FALSE, _("Cancel"), posterize_cancel_callback, - pd, NULL, FALSE, TRUE, + pd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/threshold.c b/app/tools/threshold.c index e61a81f1d8..d92a575e73 100644 --- a/app/tools/threshold.c +++ b/app/tools/threshold.c @@ -268,11 +268,11 @@ threshold_dialog_new (void) FALSE, TRUE, FALSE, _("OK"), threshold_ok_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Reset"), threshold_reset_callback, - td, NULL, TRUE, FALSE, + td, NULL, NULL, TRUE, FALSE, _("Cancel"), threshold_cancel_callback, - td, NULL, FALSE, TRUE, + td, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/tools/tools.c b/app/tools/tools.c index 8662f20509..6b5b9acb40 100644 --- a/app/tools/tools.c +++ b/app/tools/tools.c @@ -982,9 +982,9 @@ tool_options_dialog_new (void) FALSE, TRUE, TRUE, _("Reset"), tool_options_reset_callback, - NULL, &options_reset_button, FALSE, FALSE, + NULL, NULL, &options_reset_button, FALSE, FALSE, _("Close"), tool_options_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/tools/transform_core.c b/app/tools/transform_core.c index c5a4a664d8..a7302b6a91 100644 --- a/app/tools/transform_core.c +++ b/app/tools/transform_core.c @@ -409,9 +409,9 @@ transform_core_button_press (Tool *tool, gettext (action_labels[tool->type - ROTATE]), transform_ok_callback, - tool, NULL, TRUE, FALSE, + tool, NULL, NULL, TRUE, FALSE, _("Reset"), transform_reset_callback, - tool, NULL, FALSE, FALSE, + tool, NULL, NULL, FALSE, FALSE, NULL); diff --git a/app/transform_core.c b/app/transform_core.c index c5a4a664d8..a7302b6a91 100644 --- a/app/transform_core.c +++ b/app/transform_core.c @@ -409,9 +409,9 @@ transform_core_button_press (Tool *tool, gettext (action_labels[tool->type - ROTATE]), transform_ok_callback, - tool, NULL, TRUE, FALSE, + tool, NULL, NULL, TRUE, FALSE, _("Reset"), transform_reset_callback, - tool, NULL, FALSE, FALSE, + tool, NULL, NULL, FALSE, FALSE, NULL); diff --git a/app/undo_history.c b/app/undo_history.c index d63db48b72..16cfa9d021 100644 --- a/app/undo_history.c +++ b/app/undo_history.c @@ -759,7 +759,7 @@ undo_history_new (GImage *gimage) FALSE, TRUE, FALSE, _("Close"), undo_history_close_callback, - st, NULL, TRUE, TRUE, + st, NULL, NULL, TRUE, TRUE, NULL); dialog_register (st->shell); diff --git a/app/user_install.c b/app/user_install.c index ca0f961126..fc173d56f2 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -266,11 +266,11 @@ install_help (InstallCallback callback) FALSE, TRUE, FALSE, _("Install"), help_install_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Ignore"), help_ignore_callback, - callback, NULL, FALSE, FALSE, + callback, NULL, NULL, FALSE, FALSE, _("Quit"), help_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); @@ -414,9 +414,9 @@ install_run (InstallCallback callback) FALSE, TRUE, FALSE, _("Continue"), install_continue_callback, - callback, NULL, TRUE, FALSE, + callback, NULL, NULL, TRUE, FALSE, _("Quit"), install_quit_callback, - callback, NULL, FALSE, TRUE, + callback, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/widgets/gimpbrusheditor.c b/app/widgets/gimpbrusheditor.c index 092d0784ff..dd27645401 100644 --- a/app/widgets/gimpbrusheditor.c +++ b/app/widgets/gimpbrusheditor.c @@ -213,7 +213,7 @@ brush_edit_generated_new (void) FALSE, TRUE, FALSE, _("Close"), brush_edit_close_callback, - begw, NULL, TRUE, TRUE, + begw, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c index b9d3b58194..2cb5f2b2c6 100644 --- a/app/widgets/gimpcolordialog.c +++ b/app/widgets/gimpcolordialog.c @@ -111,10 +111,10 @@ color_notebook_new (int r, wants_updates ? _("Close") : _("OK"), color_notebook_ok_callback, - cnp, NULL, TRUE, FALSE, + cnp, NULL, NULL, TRUE, FALSE, wants_updates ? _("Revert to Old Color") : _("Cancel"), color_notebook_cancel_callback, - cnp, NULL, FALSE, TRUE, + cnp, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/widgets/gimpcolordisplayeditor.c b/app/widgets/gimpcolordisplayeditor.c index 210c46b5eb..5c0b3434f5 100644 --- a/app/widgets/gimpcolordisplayeditor.c +++ b/app/widgets/gimpcolordisplayeditor.c @@ -124,9 +124,9 @@ make_dialog (ColorDisplayDialog *cdd) FALSE, TRUE, FALSE, _("OK"), color_display_ok_callback, - cdd, NULL, TRUE, FALSE, + cdd, NULL, NULL, TRUE, FALSE, _("Cancel"), color_display_cancel_callback, - cdd, NULL, FALSE, TRUE, + cdd, NULL, NULL, FALSE, TRUE, NULL); diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c index 3885d3bbdc..8817873bcb 100644 --- a/app/widgets/gimpdeviceinfo.c +++ b/app/widgets/gimpdeviceinfo.c @@ -751,9 +751,9 @@ device_status_create (void) FALSE, FALSE, TRUE, _("Save"), (GtkSignalFunc) devices_write_rc, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), devices_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/widgets/gimpdevices.c b/app/widgets/gimpdevices.c index 3885d3bbdc..8817873bcb 100644 --- a/app/widgets/gimpdevices.c +++ b/app/widgets/gimpdevices.c @@ -751,9 +751,9 @@ device_status_create (void) FALSE, FALSE, TRUE, _("Save"), (GtkSignalFunc) devices_write_rc, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), devices_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index e352c9444a..a7fb1c8dff 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -796,9 +796,9 @@ gradient_editor_create (void) FALSE, TRUE, FALSE, _("Refresh"), ed_refresh_grads_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Close"), ed_close_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -1785,9 +1785,9 @@ ed_delete_gradient_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), ed_do_delete_gradient_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), ed_cancel_delete_gradient_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); @@ -4867,9 +4867,9 @@ cpopup_split_uniform_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Split"), cpopup_split_uniform_split_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Cancel"), cpopup_split_uniform_cancel_callback, - NULL, NULL, FALSE, TRUE, + NULL, NULL, NULL, FALSE, TRUE, NULL); @@ -5428,9 +5428,9 @@ cpopup_replicate_callback (GtkWidget *widget, FALSE, TRUE, FALSE, _("Replicate"), cpopup_do_replicate_callback, - NULL, NULL, FALSE, FALSE, + NULL, NULL, NULL, FALSE, FALSE, _("Cancel"), cpopup_replicate_cancel_callback, - NULL, NULL, TRUE, TRUE, + NULL, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/widgets/gimphelp.c b/app/widgets/gimphelp.c index 4b732052e5..4891e8993a 100644 --- a/app/widgets/gimphelp.c +++ b/app/widgets/gimphelp.c @@ -103,7 +103,7 @@ gimp_idle_help (gpointer help_data) return FALSE; } -void +static void gimp_help_internal (gchar *current_locale, gchar *help_data) { @@ -154,7 +154,7 @@ gimp_help_internal (gchar *current_locale, } } -void +static void gimp_help_netscape (gchar *current_locale, gchar *help_data) { diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index 5c049f7057..e24f900b1d 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -1848,9 +1848,9 @@ palette_dialog_delete_callback (GtkWidget *widget, FALSE, FALSE, FALSE, _("Delete"), palette_dialog_do_delete_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Cancel"), palette_dialog_cancel_delete_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); @@ -2111,11 +2111,11 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Save"), palette_dialog_save_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Refresh"), palette_dialog_refresh_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -2129,9 +2129,9 @@ palette_dialog_new (gint vert) FALSE, TRUE, FALSE, _("Edit"), palette_dialog_edit_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_dialog_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); } @@ -3175,9 +3175,9 @@ palette_import_dialog_new (PaletteDialog *palette) FALSE, TRUE, FALSE, _("Import"), palette_import_import_callback, - palette, NULL, FALSE, FALSE, + palette, NULL, NULL, FALSE, FALSE, _("Close"), palette_import_close_callback, - palette, NULL, TRUE, TRUE, + palette, NULL, NULL, TRUE, TRUE, NULL); diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c index 85c020bd35..ccdcdc12b6 100644 --- a/app/widgets/gimpwidgets-utils.c +++ b/app/widgets/gimpwidgets-utils.c @@ -250,9 +250,9 @@ create_query_box (gchar *title, FALSE, TRUE, FALSE, _("OK"), ok_callback, - query_box, NULL, TRUE, FALSE, + query_box, NULL, NULL, TRUE, FALSE, _("Cancel"), query_box_cancel_callback, - query_box, NULL, FALSE, TRUE, + query_box, NULL, NULL, FALSE, TRUE, NULL); @@ -630,7 +630,7 @@ gimp_message_box (gchar *message, FALSE, FALSE, FALSE, _("OK"), gimp_message_box_close_callback, - msg_box, NULL, TRUE, TRUE, + msg_box, NULL, NULL, TRUE, TRUE, NULL); diff --git a/libgimp/gimpdialog.c b/libgimp/gimpdialog.c index 487ba6573d..7060366a35 100644 --- a/libgimp/gimpdialog.c +++ b/libgimp/gimpdialog.c @@ -87,6 +87,7 @@ gimp_dialog_new (const gchar *title, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -170,6 +171,7 @@ gimp_dialog_create_action_area (GtkDialog *dialog, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -197,6 +199,7 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, gchar *label; GtkSignalFunc callback; gpointer data; + GtkObject *slot_object; GtkWidget **widget_ptr; gboolean default_action; gboolean connect_delete; @@ -223,9 +226,10 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, /* the action_area buttons */ while (label) { - callback = va_arg (args, GtkSignalFunc); - data = va_arg (args, gpointer); - widget_ptr = va_arg (args, gpointer); + callback = va_arg (args, GtkSignalFunc); + data = va_arg (args, gpointer); + slot_object = va_arg (args, gpointer); + widget_ptr = va_arg (args, gpointer); default_action = va_arg (args, gboolean); connect_delete = va_arg (args, gboolean); @@ -233,11 +237,23 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - /* pass data as user_data if data != NULL, or the dialog otherwise */ + if (slot_object == (GtkObject *) 1) + slot_object = (GtkObject *) dialog; + + if (data == NULL) + data = dialog; + if (callback) - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (callback), - data ? data : dialog); + { + if (slot_object) + gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (callback), + slot_object); + else + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (callback), + data); + } if (widget_ptr) *widget_ptr = button; @@ -249,12 +265,12 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, callback); gtk_object_set_data (GTK_OBJECT (dialog), "gimp_dialog_cancel_widget", - button); + slot_object ? slot_object : GTK_OBJECT (button)); /* catch the WM delete event */ gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", (GdkEventFunc) gimp_dialog_delete_callback, - data ? data : dialog); + data); delete_connected = TRUE; } diff --git a/libgimp/gimpdialog.h b/libgimp/gimpdialog.h index 643f25d29f..cb368c3cae 100644 --- a/libgimp/gimpdialog.h +++ b/libgimp/gimpdialog.h @@ -41,6 +41,7 @@ GtkWidget * gimp_dialog_new (const gchar *title, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -67,6 +68,7 @@ void gimp_dialog_create_action_area (GtkDialog *dialog, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, diff --git a/libgimp/gimphelp.c b/libgimp/gimphelp.c index 19c4de19d1..9a1ffe77a6 100644 --- a/libgimp/gimphelp.c +++ b/libgimp/gimphelp.c @@ -32,13 +32,7 @@ gimp_standard_help_func (gchar *help_data) void gimp_plugin_help_func (gchar *help_data) { - gchar *help_page; - - help_page = g_strdup_printf ("filters/%s.html", help_data); - gimp_help (help_data); - - g_free (help_page); } void diff --git a/libgimp/gimphelp_pdb.c b/libgimp/gimphelp_pdb.c index 19c4de19d1..9a1ffe77a6 100644 --- a/libgimp/gimphelp_pdb.c +++ b/libgimp/gimphelp_pdb.c @@ -32,13 +32,7 @@ gimp_standard_help_func (gchar *help_data) void gimp_plugin_help_func (gchar *help_data) { - gchar *help_page; - - help_page = g_strdup_printf ("filters/%s.html", help_data); - gimp_help (help_data); - - g_free (help_page); } void diff --git a/libgimpwidgets/gimpdialog.c b/libgimpwidgets/gimpdialog.c index 487ba6573d..7060366a35 100644 --- a/libgimpwidgets/gimpdialog.c +++ b/libgimpwidgets/gimpdialog.c @@ -87,6 +87,7 @@ gimp_dialog_new (const gchar *title, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -170,6 +171,7 @@ gimp_dialog_create_action_area (GtkDialog *dialog, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -197,6 +199,7 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, gchar *label; GtkSignalFunc callback; gpointer data; + GtkObject *slot_object; GtkWidget **widget_ptr; gboolean default_action; gboolean connect_delete; @@ -223,9 +226,10 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, /* the action_area buttons */ while (label) { - callback = va_arg (args, GtkSignalFunc); - data = va_arg (args, gpointer); - widget_ptr = va_arg (args, gpointer); + callback = va_arg (args, GtkSignalFunc); + data = va_arg (args, gpointer); + slot_object = va_arg (args, gpointer); + widget_ptr = va_arg (args, gpointer); default_action = va_arg (args, gboolean); connect_delete = va_arg (args, gboolean); @@ -233,11 +237,23 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - /* pass data as user_data if data != NULL, or the dialog otherwise */ + if (slot_object == (GtkObject *) 1) + slot_object = (GtkObject *) dialog; + + if (data == NULL) + data = dialog; + if (callback) - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (callback), - data ? data : dialog); + { + if (slot_object) + gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (callback), + slot_object); + else + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (callback), + data); + } if (widget_ptr) *widget_ptr = button; @@ -249,12 +265,12 @@ gimp_dialog_create_action_areav (GtkDialog *dialog, callback); gtk_object_set_data (GTK_OBJECT (dialog), "gimp_dialog_cancel_widget", - button); + slot_object ? slot_object : GTK_OBJECT (button)); /* catch the WM delete event */ gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", (GdkEventFunc) gimp_dialog_delete_callback, - data ? data : dialog); + data); delete_connected = TRUE; } diff --git a/libgimpwidgets/gimpdialog.h b/libgimpwidgets/gimpdialog.h index 643f25d29f..cb368c3cae 100644 --- a/libgimpwidgets/gimpdialog.h +++ b/libgimpwidgets/gimpdialog.h @@ -41,6 +41,7 @@ GtkWidget * gimp_dialog_new (const gchar *title, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, @@ -67,6 +68,7 @@ void gimp_dialog_create_action_area (GtkDialog *dialog, * gchar *label, * GtkSignalFunc callback, * gpointer data, + * GtkObject *slot_object, * GtkWidget **widget_ptr, * gboolean default_action, * gboolean connect_delete, diff --git a/plug-ins/common/CEL.c b/plug-ins/common/CEL.c index 1c56a7ed13..f11d7aacb0 100644 --- a/plug-ins/common/CEL.c +++ b/plug-ins/common/CEL.c @@ -22,7 +22,6 @@ * Possible future additions: * + Save (perhaps optionally?) the palette in a KCF */ - #include "config.h" #include @@ -33,7 +32,9 @@ #endif #include + #include +#include #include "libgimp/stdplugins-intl.h" static void query(void); @@ -497,19 +498,22 @@ static void palette_cancel (GtkWidget *widget, GtkWidget **window) { gtk_main_quit (); } -static gint palette_dialog(char *title) { +static gint +palette_dialog (gchar *title) +{ gchar **argv; gint argc = 1; GtkWidget *dialog; - argv= g_malloc(sizeof(gchar *)); - argv[0]= g_strdup("CEL file-filter"); + argv= g_malloc (sizeof (gchar *)); + argv[0]= g_strdup ("CEL file-filter"); + gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dialog= gtk_file_selection_new(title); - gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); - gtk_file_selection_set_filename(GTK_FILE_SELECTION(dialog), palette_file); + dialog = gtk_file_selection_new (title); + gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gtk_file_selection_set_filename (GTK_FILE_SELECTION (dialog), palette_file); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (dialog)->ok_button), "clicked", (GtkSignalFunc) palette_ok, dialog); @@ -517,7 +521,10 @@ static gint palette_dialog(char *title) { "destroy", (GtkSignalFunc) palette_cancel, NULL); gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (dialog)->cancel_button), "clicked", (GtkSignalFunc) palette_cancel, GTK_OBJECT (dialog)); - gtk_widget_show(dialog); + gimp_help_connect_help_accel (dialog, gimp_plugin_help_func, + "filters/cel.html"); + + gtk_widget_show (dialog); gtk_main (); gdk_flush (); diff --git a/plug-ins/common/CML_explorer.c b/plug-ins/common/CML_explorer.c index 1a7c8f62ec..5a4b79e75c 100644 --- a/plug-ins/common/CML_explorer.c +++ b/plug-ins/common/CML_explorer.c @@ -71,9 +71,6 @@ */ #include "config.h" -#include "gtk/gtk.h" - - #include #include #include @@ -82,9 +79,12 @@ #include #include /* for seed of random number */ +#include + #include "libgimp/gimp.h" -#include "libgimp/stdplugins-intl.h" +#include "libgimp/gimpui.h" #include "libgimp/gimpcolorspace.h" +#include "libgimp/stdplugins-intl.h" #ifndef RAND_MAX #define RAND_MAX 2147483647 @@ -1662,36 +1662,26 @@ preview_update () static void function_graph_new (GtkWidget *widget, gpointer data) { - GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; - GtkWidget *frame; - GtkWidget *vbox; - GtkWidget *preview; - gint channel_id = *(int *) data; - CML_PARAM *param = (CML_PARAM *) *((gpointer *)data + 1); + GtkWidget *dlg; + GtkWidget *frame; + GtkWidget *vbox; + GtkWidget *preview; + gint channel_id = *(int *) data; + CML_PARAM *param = (CML_PARAM *) *((gpointer *) data + 1); + + dlg = gimp_dialog_new (_("Graph of the current settings"), "cml_explorer", + gimp_plugin_help_func, "filters/cml_explorer.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), gtk_widget_destroy, + NULL, 1, NULL, TRUE, TRUE, + + NULL); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Graph of the current settings")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) gtkW_close_callback, NULL); - /* Action Area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT(dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); + GTK_SIGNAL_FUNC (gtkW_close_callback), + NULL); frame = gtkW_frame_new (GTK_DIALOG (dlg)->vbox, _("The Graph")); vbox = gtkW_vbox_new (frame); @@ -1864,40 +1854,25 @@ CML_dialog_new (char * name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback) { - GtkWidget *dlg, *button; + GtkWidget *dlg; + + dlg = gimp_dialog_new (name, "cml_explorer", + gimp_plugin_help_func, "filters/cml_explorer.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("Execute"), execute_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Execute and Exit"), ok_callback, + NULL, NULL, NULL, FALSE, FALSE, + _("Exit"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), name); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) close_callback, NULL); - - /* Action Area */ - button = gtk_button_new_with_label (_("Execute")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) execute_callback, dlg); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, - TRUE, TRUE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Execute and Exit")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) ok_callback, dlg); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, - TRUE, TRUE, 0); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Exit")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT(dlg)); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, - TRUE, TRUE, 0); - gtk_widget_show (button); + GTK_SIGNAL_FUNC (close_callback), + NULL); return dlg; } @@ -1923,6 +1898,9 @@ CML_save_to_file_callback (GtkWidget *widget, gpointer client_data) gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), VALS.last_file_name); + gimp_help_connect_help_accel (filesel, gimp_plugin_help_func, + "filters/cml_explorer.html"); + gtk_widget_show (filesel); } @@ -2107,6 +2085,9 @@ CML_load_from_file_callback (GtkWidget *widget, gpointer client_data) gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), VALS.last_file_name); + gimp_help_connect_help_accel (filesel, gimp_plugin_help_func, + "filters/cml_explorer.html"); + gtk_widget_show (filesel); } @@ -2541,39 +2522,22 @@ gtkW_dialog_new (gchar *name, GtkSignalFunc close_callback) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), name); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (name, "cml_explorer", + gimp_plugin_help_func, "filters/cml_explorer.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) close_callback, NULL); - - /* Action Area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); + GTK_SIGNAL_FUNC (close_callback), + NULL); return dlg; } diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am index 65a71aceaf..c29b4fae56 100644 --- a/plug-ins/common/Makefile.am +++ b/plug-ins/common/Makefile.am @@ -160,6 +160,7 @@ CEL_SOURCES = \ CEL.c CEL_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -168,6 +169,7 @@ CML_explorer_SOURCES = \ CML_explorer.c CML_explorer_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -186,6 +188,7 @@ align_layers_SOURCES = \ align_layers.c align_layers_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -194,6 +197,7 @@ animationplay_SOURCES = \ animationplay.c animationplay_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -210,6 +214,7 @@ apply_lens_SOURCES = \ apply_lens.c apply_lens_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -234,6 +239,7 @@ blinds_SOURCES = \ blinds.c blinds_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -243,6 +249,7 @@ blur_SOURCES = \ blur_LDADD = \ $(top_builddir)/plug-ins/gpc/libgpc.a \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -276,6 +283,7 @@ checkerboard_SOURCES = \ checkerboard.c checkerboard_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -284,7 +292,6 @@ color_enhance_SOURCES = \ color_enhance.c color_enhance_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -293,6 +300,7 @@ colorify_SOURCES = \ colorify.c colorify_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -319,6 +327,7 @@ convmatrix_SOURCES = \ convmatrix.c convmatrix_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -336,6 +345,7 @@ cubism_SOURCES = \ cubism.c cubism_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -344,6 +354,7 @@ curve_bend_SOURCES = \ curve_bend.c curve_bend_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -352,6 +363,7 @@ decompose_SOURCES = \ decompose.c decompose_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -361,6 +373,7 @@ deinterlace_SOURCES = \ deinterlace_LDADD = \ $(top_builddir)/plug-ins/megawidget/libmegawidget.a \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -378,6 +391,7 @@ despeckle_SOURCES = \ despeckle.c despeckle_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -386,6 +400,7 @@ destripe_SOURCES = \ destripe.c destripe_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) @@ -394,6 +409,7 @@ diffraction_SOURCES = \ diffraction.c diffraction_LDADD = \ + $(top_builddir)/libgimp/libgimpui.la \ $(top_builddir)/libgimp/libgimp.la \ $(GTK_LIBS) \ $(INTLLIBS) diff --git a/plug-ins/common/aa.c b/plug-ins/common/aa.c index d7e564b908..9fa77b27d8 100644 --- a/plug-ins/common/aa.c +++ b/plug-ins/common/aa.c @@ -344,44 +344,27 @@ static gint type_dialog (int selected) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *frame; GtkWidget *toggle_vbox; GSList *group; /* Create the actual window. */ - dlg = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dlg), _("Save as text")); - gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(dlg), "destroy", - (GtkSignalFunc) type_dialog_close_callback, NULL); - - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label ( _("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) type_dialog_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); + dlg = gimp_dialog_new (_("Save as Text"), "aa", + gimp_plugin_help_func, "filters/aa.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - button = gtk_button_new_with_label ( _("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) type_dialog_cancel_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); + _("OK"), type_dialog_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), type_dialog_cancel_callback, + NULL, NULL, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (type_dialog_close_callback), + NULL); /* file save type */ frame = gtk_frame_new ( _("Data Formatting")); diff --git a/plug-ins/common/align_layers.c b/plug-ins/common/align_layers.c index b8a230d5b3..abb747e098 100644 --- a/plug-ins/common/align_layers.c +++ b/plug-ins/common/align_layers.c @@ -21,14 +21,18 @@ */ #include "config.h" -#include "libgimp/gimp.h" -#include "gtk/gtk.h" -#include "libgimp/stdplugins-intl.h" + #include #include #include #include +#include + +#include "libgimp/gimp.h" +#include "libgimp/gimpui.h" +#include "libgimp/stdplugins-intl.h" + #define PLUG_IN_NAME "plug_in_align_layers" #define SHORT_NAME "align_layers" #define PROGRESS_NAME "align_layers" @@ -708,38 +712,23 @@ gtkW_dialog_new (char * name, GtkSignalFunc ok_callback, GtkSignalFunc close_callback) { - GtkWidget *dlg, *button, *hbbox; - - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), name); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + GtkWidget *dlg; + + dlg = gimp_dialog_new (name, "align_layers", + gimp_plugin_help_func, "filters/align_layers.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) close_callback, NULL); - - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); + GTK_SIGNAL_FUNC (close_callback), + NULL); return dlg; } @@ -782,30 +771,21 @@ gtkW_message_dialog (gint gtk_was_initialized, gchar *message) static GtkWidget * gtkW_message_dialog_new (char * name) { - GtkWidget *dlg, *hbbox, *button; - - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), name); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) gtkW_close_callback, NULL); + GtkWidget *dlg; - /* Action Area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); + dlg = gimp_dialog_new (name, "align_layers", + gimp_plugin_help_func, "filters/align_layers.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), gtk_widget_destroy, + NULL, 1, NULL, TRUE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (gtkW_close_callback), + NULL); return dlg; } diff --git a/plug-ins/common/animationplay.c b/plug-ins/common/animationplay.c index 9c33125417..61342e93a8 100644 --- a/plug-ins/common/animationplay.c +++ b/plug-ins/common/animationplay.c @@ -120,6 +120,7 @@ #endif #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" @@ -648,7 +649,6 @@ build_dialog (GImageType basetype, GtkAdjustment *adj; GtkWidget* dlg; - GtkWidget* hbbox; GtkWidget* button; GtkWidget* frame; GtkWidget* frame2; @@ -687,50 +687,39 @@ build_dialog (GImageType basetype, gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); #endif - - dlg = gtk_dialog_new (); windowname = g_strconcat (_("Animation Playback: "), imagename, NULL); - gtk_window_set_title (GTK_WINDOW (dlg), windowname); - g_free(windowname); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + + dlg = gimp_dialog_new (windowname, "animationplay", + gimp_plugin_help_func, "filters/animationplay.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("Close"), window_close_callback, + NULL, 1, NULL, TRUE, TRUE, + + NULL); + + g_free (windowname); + gtk_signal_connect (GTK_OBJECT (dlg), "delete_event", - (GtkSignalFunc) window_delete_callback, + GTK_SIGNAL_FUNC (window_delete_callback), NULL); - - /* Action area - 'close' button only. */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label ( _("Close")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) window_close_callback, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - { /* The 'playback' half of the dialog */ - windowname = g_malloc(strlen( _("Playback: "))+strlen(imagename)+1); + windowname = g_malloc (strlen (_("Playback: ")) + strlen (imagename) + 1); if (total_frames > 1) { - strcpy(windowname, _("Playback: ")); - strcat(windowname,imagename); + strcpy (windowname, _("Playback: ")); + strcat (windowname, imagename); } else { - strcpy(windowname,imagename); + strcpy (windowname, imagename); } frame = gtk_frame_new (windowname); - g_free(windowname); + g_free (windowname); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); gtk_container_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), diff --git a/plug-ins/common/apply_lens.c b/plug-ins/common/apply_lens.c index a70ff7b402..4f45e6fb49 100644 --- a/plug-ins/common/apply_lens.c +++ b/plug-ins/common/apply_lens.c @@ -56,9 +56,10 @@ #include #include -#include "libgimp/gimp.h" -#include "gtk/gtk.h" +#include +#include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" #define ENTRY_WIDTH 100 @@ -381,13 +382,11 @@ lens_entry_callback(GtkWidget *widget, static gint -lens_dialog(GDrawable *drawable) +lens_dialog (GDrawable *drawable) { GtkWidget *dlg; GtkWidget *label; GtkWidget *entry; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *frame; GtkWidget *vbox; @@ -398,119 +397,104 @@ lens_dialog(GDrawable *drawable) GSList *group = NULL; GDrawableType drawtype; - drawtype = gimp_drawable_type(drawable->id); + drawtype = gimp_drawable_type (drawable->id); argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("apply_lens"); + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("apply_lens"); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dlg), _("Lens effect")); - gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(dlg), "destroy", - (GtkSignalFunc)lens_close_callback, - NULL); + dlg = gimp_dialog_new (_("Lens Effect"), "apply_lens", + gimp_plugin_help_func, "filters/apply_lens.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); + _("OK"), lens_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, - button = gtk_button_new_with_label(_("OK")); - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - (GtkSignalFunc)lens_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default(button); - gtk_widget_show(button); + NULL); - button = gtk_button_new_with_label(_("Cancel")); - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - (GtkSignalFunc)gtk_widget_destroy, - GTK_OBJECT(dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show(button); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (lens_close_callback), + NULL); - frame = gtk_frame_new(_("Parameter Settings")); - gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); - gtk_container_border_width(GTK_CONTAINER(frame), 10); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame, TRUE, TRUE, 0); - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_border_width(GTK_CONTAINER(vbox), 10); - gtk_container_add(GTK_CONTAINER(frame), vbox); + frame = gtk_frame_new (_("Parameter Settings")); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); + gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0); + vbox = gtk_vbox_new (FALSE, 5); + gtk_container_border_width (GTK_CONTAINER (vbox), 10); + gtk_container_add (GTK_CONTAINER (frame), vbox); - toggle = gtk_radio_button_new_with_label(group, - _("Keep original surroundings")); - group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); - gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(toggle), "toggled", - (GtkSignalFunc) lens_toggle_update, - &lvals.keep_surr); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), lvals.keep_surr); - gtk_widget_show(toggle); + toggle = gtk_radio_button_new_with_label (group, + _("Keep original surroundings")); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); + gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (toggle), "toggled", + GTK_SIGNAL_FUNC (lens_toggle_update), + &lvals.keep_surr); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.keep_surr); + gtk_widget_show (toggle); toggle = - gtk_radio_button_new_with_label(group, - drawtype == INDEXEDA_IMAGE || - drawtype == INDEXED_IMAGE ? - _("Set surroundings to index 0") : - _("Set surroundings to background color")); - group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); - gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(toggle), "toggled", - (GtkSignalFunc) lens_toggle_update, - &lvals.use_bkgr); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), lvals.use_bkgr); - gtk_widget_show(toggle); + gtk_radio_button_new_with_label (group, + drawtype == INDEXEDA_IMAGE || + drawtype == INDEXED_IMAGE ? + _("Set surroundings to index 0") : + _("Set surroundings to background color")); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); + gtk_box_pack_start(GTK_BOX (vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (toggle), "toggled", + GTK_SIGNAL_FUNC (lens_toggle_update), + &lvals.use_bkgr); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.use_bkgr); + gtk_widget_show (toggle); - if((drawtype == INDEXEDA_IMAGE) || - (drawtype == GRAYA_IMAGE) || - (drawtype == RGBA_IMAGE)) { - toggle = gtk_radio_button_new_with_label(group, - _("Make surroundings transparent")); - group = gtk_radio_button_group(GTK_RADIO_BUTTON(toggle)); - gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); - gtk_signal_connect(GTK_OBJECT(toggle), "toggled", - (GtkSignalFunc) lens_toggle_update, - &lvals.set_transparent); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), - lvals.set_transparent); - gtk_widget_show(toggle); + if ((drawtype == INDEXEDA_IMAGE) || + (drawtype == GRAYA_IMAGE) || + (drawtype == RGBA_IMAGE)) + { + toggle = + gtk_radio_button_new_with_label (group, + _("Make surroundings transparent")); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (toggle)); + gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (toggle), "toggled", + GTK_SIGNAL_FUNC (lens_toggle_update), + &lvals.set_transparent); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), + lvals.set_transparent); + gtk_widget_show (toggle); } + hbox = gtk_hbox_new (FALSE, 5); + gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); - hbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); + label = gtk_label_new (_("Lens refraction index: ")); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, FALSE, 0); + gtk_widget_show (label); - label = gtk_label_new(_("Lens refraction index: ")); - gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0); - gtk_widget_show(label); + entry = gtk_entry_new (); + gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); + gtk_widget_set_usize (entry, ENTRY_WIDTH, 0); + g_snprintf (buffer, sizeof (buffer), "%.2f", lvals.refraction); + gtk_entry_set_text (GTK_ENTRY (entry), buffer); + gtk_signal_connect (GTK_OBJECT (entry), "changed", + GTK_SIGNAL_FUNC (lens_entry_callback), + NULL); + gtk_widget_show (entry); - entry = gtk_entry_new(); - gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 0); - gtk_widget_set_usize(entry, ENTRY_WIDTH, 0); - sprintf(buffer, "%.2f", lvals.refraction); - gtk_entry_set_text(GTK_ENTRY(entry), buffer); - gtk_signal_connect(GTK_OBJECT(entry), "changed", - (GtkSignalFunc)lens_entry_callback, - NULL); - gtk_widget_show(entry); + gtk_widget_show (hbox); + gtk_widget_show (vbox); + gtk_widget_show (frame); + gtk_widget_show (dlg); - gtk_widget_show(hbox); - gtk_widget_show(vbox); - gtk_widget_show(frame); - gtk_widget_show(dlg); - - gtk_main(); - gdk_flush(); + gtk_main (); + gdk_flush (); return bint.run; } diff --git a/plug-ins/common/blinds.c b/plug-ins/common/blinds.c index 389e4c9512..fda883012a 100644 --- a/plug-ins/common/blinds.c +++ b/plug-ins/common/blinds.c @@ -53,8 +53,10 @@ #include #include -#include "gtk/gtk.h" +#include + #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" /***** Magic numbers *****/ @@ -156,7 +158,7 @@ static gint has_alpha; MAIN () static void -query () +query (void) { static GParamDef args[] = { @@ -188,11 +190,11 @@ query () } static void -run (gchar *name, - gint nparams, - GParam *param, - gint *nreturn_vals, - GParam **return_vals) +run (gchar *name, + gint nparams, + GParam *param, + gint *nreturn_vals, + GParam **return_vals) { static GParam values[1]; GDrawable *drawable; @@ -294,11 +296,9 @@ run (gchar *name, /* Build the dialog up. This was the hard part! */ static gint -blinds_dialog () +blinds_dialog (void) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *frame; GtkWidget *xframe; GtkWidget *table; @@ -309,10 +309,10 @@ blinds_dialog () GtkWidget *toggle_vbox; GtkWidget *toggle; GSList *orientation_group = NULL; - guchar *color_cube; + guchar *color_cube; gchar **argv; - gint argc; - char buf[256]; + gint argc; + gchar buf[256]; argc = 1; argv = g_new (gchar *, 1); @@ -326,48 +326,33 @@ blinds_dialog () gtk_rc_parse (gimp_gtkrc ()); /* Get the stuff for the preview window...*/ - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); cache_preview(); /* Get the preview image and store it also set has_alpha */ - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Blinds")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (_("Blinds"), "blinds", + gimp_plugin_help_func, "filters/blinds.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), blinds_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) blinds_close_callback, + GTK_SIGNAL_FUNC (blinds_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label ( _("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) blinds_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label ( _("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* Start building the frame for the preview area */ frame = gtk_frame_new ( _("Preview")); @@ -475,7 +460,7 @@ blinds_dialog () gtk_object_set_user_data(GTK_OBJECT(entry), size_data); gtk_object_set_user_data(size_data, entry); gtk_widget_set_usize(entry, ENTRY_WIDTH, 0); - sprintf(buf, "%.2d", bvals.angledsp); + g_snprintf (buf, sizeof (buf), "%.2d", bvals.angledsp); gtk_entry_set_text(GTK_ENTRY(entry), buf); gtk_signal_connect(GTK_OBJECT(entry), "changed", (GtkSignalFunc) blinds_entry_update, @@ -505,7 +490,7 @@ blinds_dialog () gtk_object_set_user_data(GTK_OBJECT(entry), size_data); gtk_object_set_user_data(size_data, entry); gtk_widget_set_usize(entry, ENTRY_WIDTH, 0); - sprintf(buf, "%d", bvals.numsegs); + g_snprintf (buf, sizeof (buf), "%d", bvals.numsegs); gtk_entry_set_text(GTK_ENTRY(entry), buf); gtk_signal_connect(GTK_OBJECT(entry), "changed", (GtkSignalFunc) blinds_entry_update, @@ -536,14 +521,14 @@ blinds_dialog () static void blinds_close_callback (GtkWidget *widget, - gpointer data) + gpointer data) { gtk_main_quit (); } static void blinds_ok_callback (GtkWidget *widget, - gpointer data) + gpointer data) { bint.run = TRUE; gtk_widget_destroy (GTK_WIDGET (data)); @@ -551,8 +536,8 @@ blinds_ok_callback (GtkWidget *widget, static void -blinds_toggle_update(GtkWidget *widget, - gpointer data) +blinds_toggle_update (GtkWidget *widget, + gpointer data) { int *toggle_val; @@ -570,8 +555,8 @@ blinds_toggle_update(GtkWidget *widget, } static void -blinds_button_update(GtkWidget *widget, - gpointer data) +blinds_button_update (GtkWidget *widget, + gpointer data) { int *toggle_val; @@ -592,54 +577,58 @@ blinds_button_update(GtkWidget *widget, static void -blinds_scale_update(GtkAdjustment *adjustment, gint *value) +blinds_scale_update (GtkAdjustment *adjustment, + gint *value) { - GtkWidget *entry; - char buf[256]; + GtkWidget *entry; + gchar buf[256]; - if (*value != adjustment->value) { - *value = adjustment->value; + if (*value != adjustment->value) + { + *value = adjustment->value; - entry = gtk_object_get_user_data(GTK_OBJECT(adjustment)); - sprintf(buf,"%d",*value); + entry = gtk_object_get_user_data(GTK_OBJECT(adjustment)); + g_snprintf (buf, sizeof (buf), "%d", *value); - gtk_signal_handler_block_by_data(GTK_OBJECT(entry), value); - gtk_entry_set_text(GTK_ENTRY(entry), buf); - gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), value); - - dialog_update_preview(); - } + gtk_signal_handler_block_by_data (GTK_OBJECT (entry), value); + gtk_entry_set_text (GTK_ENTRY (entry), buf); + gtk_signal_handler_unblock_by_data (GTK_OBJECT (entry), value); + + dialog_update_preview (); + } } static void -blinds_entry_update(GtkWidget *widget, gint *value) +blinds_entry_update (GtkWidget *widget, + gint *value) { - GtkAdjustment *adjustment; - gdouble new_value; + GtkAdjustment *adjustment; + gdouble new_value; - new_value = atoi(gtk_entry_get_text(GTK_ENTRY(widget))); + new_value = atoi (gtk_entry_get_text (GTK_ENTRY (widget))); - if (*value != new_value) { - adjustment = gtk_object_get_user_data(GTK_OBJECT(widget)); + if (*value != new_value) + { + adjustment = gtk_object_get_user_data (GTK_OBJECT (widget)); - if ((new_value >= adjustment->lower) && - (new_value <= adjustment->upper)) { - *value = new_value; - adjustment->value = new_value; + if ((new_value >= adjustment->lower) && + (new_value <= adjustment->upper)) + { + *value = new_value; + adjustment->value = new_value; - gtk_signal_emit_by_name(GTK_OBJECT(adjustment), "value_changed"); + gtk_signal_emit_by_name (GTK_OBJECT (adjustment), "value_changed"); - dialog_update_preview(); - } + dialog_update_preview (); } + } } - /* Cache the preview image - updates are a lot faster. */ /* The preview_cache will contain the small image */ static void -cache_preview() +cache_preview () { GPixelRgn src_rgn; int y,x; @@ -693,7 +682,11 @@ cache_preview() static void -blindsapply(guchar *srow,guchar *drow,gint width,gint bpp,guchar *bg) +blindsapply (guchar *srow, + guchar *drow, + gint width, + gint bpp, + guchar *bg) { guchar *src; guchar *dst; @@ -795,7 +788,7 @@ blindsapply(guchar *srow,guchar *drow,gint width,gint bpp,guchar *bg) } static int -blinds_get_bg(guchar *bg) +blinds_get_bg (guchar *bg) { GParam *return_vals; gint nreturn_vals; @@ -848,7 +841,7 @@ blinds_get_bg(guchar *bg) } static void -dialog_update_preview(void) +dialog_update_preview (void) { int y; @@ -1009,7 +1002,7 @@ dialog_update_preview(void) #define STEP 40 static void -apply_blinds(void) +apply_blinds (void) { GPixelRgn des_rgn; GPixelRgn src_rgn; @@ -1159,4 +1152,3 @@ apply_blinds(void) gimp_drawable_update(blindsdrawable->id, sel_x1, sel_y1, sel_width, sel_height); } - diff --git a/plug-ins/common/blur.c b/plug-ins/common/blur.c index fdc4cd9db5..a3a2ad8ef1 100644 --- a/plug-ins/common/blur.c +++ b/plug-ins/common/blur.c @@ -56,6 +56,7 @@ #include #include #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "gtk/gtk.h" #include @@ -601,11 +602,21 @@ blur_dialog () * Open a new dialog, label it and set up its * destroy callback. */ - dlg = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dlg), BLUR_VERSION); - gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(dlg), "destroy", - (GtkSignalFunc) gpc_close_callback, NULL); + dlg = gimp_dialog_new (BLUR_VERSION, "blur", + gimp_plugin_help_func, "filters/blur.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), blur_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (gpc_close_callback), + NULL); /* * Parameter settings * @@ -620,13 +631,6 @@ blur_dialog () gtk_container_add(GTK_CONTAINER(frame), table); gtk_widget_show(table); gpc_setup_tooltips(table); -/* - * Action area OK & Cancel buttons - */ - gpc_add_action_button(_("OK"), (GtkSignalFunc) blur_ok_callback, dlg, - _("Accept settings and apply filter to image")); - gpc_add_action_button(_("Cancel"), (GtkSignalFunc) gpc_cancel_callback, dlg, - _("Close plug-in without making any changes")); /* * Randomization seed initialization controls */ diff --git a/plug-ins/common/bumpmap.c b/plug-ins/common/bumpmap.c index 1e77ba3220..da9f8002e2 100644 --- a/plug-ins/common/bumpmap.c +++ b/plug-ins/common/bumpmap.c @@ -796,48 +796,57 @@ bumpmap_dialog (void) GtkWidget *label; GtkWidget *option_menu; GtkWidget *menu; - GtkWidget *hbbox; GtkWidget *button; GSList *group; gint argc; gchar **argv; guchar *color_cube; - int i; + gint i; #if 0 - printf("bumpmap: waiting... (pid %d)\n", getpid()); - kill(getpid(), SIGSTOP); + printf ("bumpmap: waiting... (pid %d)\n", getpid ()); + kill (getpid (), SIGSTOP); #endif argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("bumpmap"); + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("bumpmap"); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); - gdk_set_use_xshm(gimp_use_xshm()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc()); + gdk_set_use_xshm (gimp_use_xshm()); - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); - - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); + + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); /* Dialog */ - dialog = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dialog), _("Bump map")); - gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); - gtk_container_border_width(GTK_CONTAINER(dialog), 0); - gtk_signal_connect(GTK_OBJECT(dialog), "destroy", - (GtkSignalFunc) dialog_close_callback, - NULL); + dialog = gimp_dialog_new (_("Bump Map"), "bumpmap", + gimp_plugin_help_func, "filters/bumpmap.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - top_table = gtk_table_new(2, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(top_table), 6); - gtk_table_set_row_spacings(GTK_TABLE(top_table), 4); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), top_table, FALSE, FALSE, 0); - gtk_widget_show(top_table); + _("OK"), dialog_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (dialog_close_callback), + NULL); + + top_table = gtk_table_new (2, 2, FALSE); + gtk_container_border_width (GTK_CONTAINER (top_table), 6); + gtk_table_set_row_spacings (GTK_TABLE (top_table), 4); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), top_table, + FALSE, FALSE, 0); + gtk_widget_show (top_table); /* Preview */ @@ -962,31 +971,6 @@ bumpmap_dialog (void) dialog_create_ivalue(_("Waterlevel"), GTK_TABLE(table), 6, &bmvals.waterlevel, 0, 256, TRUE); dialog_create_ivalue(_("Ambient"), GTK_TABLE(table), 7, &bmvals.ambient, 0, 256, FALSE); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialog_ok_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dialog)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* Done */ gtk_widget_show(dialog); diff --git a/plug-ins/common/checkerboard.c b/plug-ins/common/checkerboard.c index 7a247f4e1a..2030c7034e 100644 --- a/plug-ins/common/checkerboard.c +++ b/plug-ins/common/checkerboard.c @@ -19,12 +19,16 @@ * */ +#include "config.h" + #include #include -#include "gtk/gtk.h" -#include "libgimp/gimp.h" -#include "config.h" +#include + +#include "libgimp/gimp.h" +#include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" /* Variables set in dialog box */ @@ -354,8 +358,6 @@ static gint check_dialog (void) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *frame; GtkWidget *table; GtkWidget *label; @@ -367,43 +369,27 @@ check_dialog (void) argc = 1; argv = g_new (gchar *, 1); - argv[0] = g_strdup ("whirl"); + argv[0] = g_strdup ("checkerboard"); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Checkerboard")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (_("Checkerboard"), "checkerboard", + gimp_plugin_help_func, "filters/checkerboard.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), check_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) check_close_callback, + GTK_SIGNAL_FUNC (check_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) check_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* parameter settings */ frame = gtk_frame_new (_("Parameter Settings")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); diff --git a/plug-ins/common/colorify.c b/plug-ins/common/colorify.c index fd0c79bafa..8c6ed78a2c 100644 --- a/plug-ins/common/colorify.c +++ b/plug-ins/common/colorify.c @@ -28,13 +28,17 @@ 1.0 -First release */ +#include "config.h" + #include #include #include -#include "gtk/gtk.h" -#include "libgimp/gimp.h" -#include "config.h" +#include + +#include "libgimp/gimp.h" +#include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" #define PLUG_IN_NAME "plug_in_colorify" @@ -291,7 +295,6 @@ colorify_dialog (guchar red, GtkWidget *dialog; GtkWidget *label; GtkWidget *button; - GtkWidget *hbbox; GtkWidget *frame; GtkWidget *table; gchar **argv; @@ -306,37 +309,21 @@ colorify_dialog (guchar red, gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc()); - dialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dialog), _("Colorify")); - gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); - gtk_signal_connect (GTK_OBJECT (dialog), "destroy", - (GtkSignalFunc) close_callback, - NULL); + dialog = gimp_dialog_new (_("Colorify"), "colorify", + gimp_plugin_help_func, "filters/colorify.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) colorify_ok_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dialog)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); + _("OK"), colorify_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (close_callback), + NULL); frame = gtk_frame_new (_("Color")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); diff --git a/plug-ins/common/colortoalpha.c b/plug-ins/common/colortoalpha.c index 7334ea59bb..9fe95a0d2b 100644 --- a/plug-ins/common/colortoalpha.c +++ b/plug-ins/common/colortoalpha.c @@ -22,11 +22,15 @@ */ #include "config.h" + #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" #include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" #define PRV_WIDTH 40 @@ -374,7 +378,6 @@ static gint colortoalpha_dialog (GDrawable *drawable) { GtkWidget *dlg; - GtkWidget *hbbox; GtkWidget *button; GtkWidget *table; GtkWidget *label; @@ -400,36 +403,21 @@ colortoalpha_dialog (GDrawable *drawable) gtk_widget_set_default_visual (gtk_preview_get_visual ()); gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Color To Alpha")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) C2A_close_callback, - NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) C2A_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); + dlg = gimp_dialog_new (_("Color to Alpha"), "colortoalpha", + gimp_plugin_help_func, "filters/colortoalpha.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); + _("OK"), C2A_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (C2A_close_callback), + NULL); table = gtk_table_new (1, 3, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 4); diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c index cf6041952b..be8936a2fc 100644 --- a/plug-ins/common/compose.c +++ b/plug-ins/common/compose.c @@ -46,7 +46,9 @@ static char ident[] = "@(#) GIMP Compose plug-in v1.03 17-Mar-99"; #include #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" #include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" @@ -390,7 +392,7 @@ compose (char *compose_type, int i, j; gint num_layers; gint32 layer_ID_dst, image_ID_dst; - unsigned char *src[MAX_COMPOSE_IMAGES], *dst = (unsigned char *)ident; + guchar *src[MAX_COMPOSE_IMAGES], *dst = (guchar *)ident; GDrawableType gdtype_dst; GDrawable *drawable_src[MAX_COMPOSE_IMAGES], *drawable_dst; GPixelRgn pixel_rgn_src[MAX_COMPOSE_IMAGES], pixel_rgn_dst; @@ -466,9 +468,9 @@ compose (char *compose_type, incr_src[j] = drawable_src[j]->bpp; if ((incr_src[j] != 1) && (incr_src[j] != 2)) { - gchar *msg; - g_strdup_printf (_("Compose: Image is not a gray image (bpp=%d)"), - incr_src[j]); + gchar *msg = + g_strdup_printf (_("Compose: Image is not a gray image (bpp=%d)"), + incr_src[j]); show_message (msg); g_free (msg); return (-1); @@ -766,8 +768,6 @@ compose_dialog (char *compose_type, gint32 drawable_ID) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *left_frame, *right_frame; GtkWidget *left_vbox, *right_vbox; @@ -795,43 +795,27 @@ compose_dialog (char *compose_type, argc = 1; argv = g_new (gchar *, 1); - argv[0] = g_strdup ("Compose"); + argv[0] = g_strdup ("compose"); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Compose")); - gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (_("Compose"), "compose", + gimp_plugin_help_func, "filters/compose.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), compose_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) compose_close_callback, + GTK_SIGNAL_FUNC (compose_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) compose_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* parameter settings */ hbox = gtk_hbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox), 0); diff --git a/plug-ins/common/convmatrix.c b/plug-ins/common/convmatrix.c index 6e3d3a6297..17cfeed2ef 100644 --- a/plug-ins/common/convmatrix.c +++ b/plug-ins/common/convmatrix.c @@ -59,8 +59,11 @@ #include #endif +#include + #include "libgimp/gimp.h" -#include "gtk/gtk.h" +#include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" typedef enum { @@ -671,10 +674,9 @@ static void my_bmode_callback(GtkWidget * widget, gpointer data){ -static gint dialog() +static gint dialog (void) { GtkWidget *dlg; - GtkWidget *hbbox; GtkWidget *button; GtkWidget *label; GtkWidget *entry; @@ -697,45 +699,24 @@ static gint dialog() gtk_init(&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dlg), _("Convolution Matrix")); - gtk_window_position(GTK_WINDOW(dlg), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(dlg), "destroy", - (GtkSignalFunc) close_callback, NULL); + dlg = gimp_dialog_new (_("Convolution Matrix"), "convmatrix", + gimp_plugin_help_func, "filters/convmatrix.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label(_("Defaults")); - GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); - gtk_signal_connect_object(GTK_OBJECT(button), "clicked", - (GtkSignalFunc) defaults_callback, - GTK_OBJECT(dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show(button); + _("OK"), ok_callback, + NULL, NULL, &my_widgets.ok, TRUE, FALSE, + _("Reset"), defaults_callback, + NULL, 1, NULL, FALSE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (close_callback), + NULL); - my_widgets.ok = button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* Outbox */ outbox=gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dlg)->vbox), outbox, TRUE, TRUE, 0); @@ -747,7 +728,7 @@ static gint dialog() /* Outbox:YABox:Frame */ frame = gtk_frame_new (_("Matrix")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); - gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); gtk_box_pack_start (GTK_BOX (yetanotherbox), frame, TRUE, TRUE, 0); /* Outbox:YABox:Frame:Inbox */ diff --git a/plug-ins/common/csource.c b/plug-ins/common/csource.c index 80f5dd3faa..d49f1d6429 100644 --- a/plug-ins/common/csource.c +++ b/plug-ins/common/csource.c @@ -591,7 +591,7 @@ cb_set_true (gboolean *bool_p) static gboolean run_save_dialog (Config *config) { - GtkWidget *dialog, *vbox, *hbox; + GtkWidget *dialog, *vbox, *hbox, *button; GtkWidget *prefixed_name, *centry, *alpha, *use_macros, *use_rle, *gtype, *use_comment, *any; GtkObject *opacity; gboolean do_save = FALSE; @@ -600,34 +600,32 @@ run_save_dialog (Config *config) g_set_prgname ("Save"); gtk_rc_parse (gimp_gtkrc ()); - dialog = gtk_widget_new (GTK_TYPE_DIALOG, - "title", "Save as C-Source", - "window_position", GTK_WIN_POS_MOUSE, - "signal::destroy", gtk_main_quit, NULL, - NULL); + dialog = gimp_dialog_new ("Save as C-Source", "csource", + gimp_plugin_help_func, "filters/csource.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + "OK", cb_set_true, + NULL, &do_save, &button, TRUE, FALSE, + "Cancel", gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (gtk_main_quit), + NULL); + + gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (gtk_widget_destroy), + GTK_OBJECT (dialog)); + vbox = GTK_DIALOG (dialog)->vbox; gtk_widget_set (vbox, "border_width", 5, "spacing", 5, NULL); - hbox = GTK_DIALOG (dialog)->action_area; - gtk_widget_new (GTK_TYPE_BUTTON, - "visible", TRUE, - "label", "Ok", - "object_signal::clicked", cb_set_true, &do_save, - "object_signal::clicked", gtk_widget_destroy, dialog, - "parent", hbox, - "can_default", TRUE, - "has_default", TRUE, - NULL); - gtk_widget_new (GTK_TYPE_BUTTON, - "visible", TRUE, - "label", "Cancel", - "object_signal::clicked", gtk_widget_destroy, dialog, - "parent", hbox, - "can_default", TRUE, - NULL); - + /* Prefixed Name */ hbox = gtk_widget_new (GTK_TYPE_HBOX, diff --git a/plug-ins/common/cubism.c b/plug-ins/common/cubism.c index 79e216463c..ae389fd40f 100644 --- a/plug-ins/common/cubism.c +++ b/plug-ins/common/cubism.c @@ -23,8 +23,11 @@ #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" @@ -298,19 +301,17 @@ cubism (GDrawable *drawable) } static gint -cubism_dialog () +cubism_dialog (void) { GtkWidget *dlg; GtkWidget *label; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *scale; GtkWidget *frame; GtkWidget *table; GtkObject *scale_data; gchar **argv; - gint argc; + gint argc; argc = 1; argv = g_new (gchar *, 1); @@ -319,38 +320,22 @@ cubism_dialog () gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Cubism")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (_("Cubism"), "cubism", + gimp_plugin_help_func, "filters/cubism.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), cubism_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) cubism_close_callback, + GTK_SIGNAL_FUNC (cubism_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) cubism_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* parameter settings */ frame = gtk_frame_new (_("Parameter Settings")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); diff --git a/plug-ins/common/curve_bend.c b/plug-ins/common/curve_bend.c index 3a1d40ac50..fa8b22c7c8 100644 --- a/plug-ins/common/curve_bend.c +++ b/plug-ins/common/curve_bend.c @@ -24,18 +24,19 @@ * (1999/04/23) v0.0 hof: coding started, * splines and dialog parts are similar to curves.c */ - + +#include "config.h" #include #include #include #include -#include "config.h" - #include + #include #include + #include "libgimp/stdplugins-intl.h" /* Defines */ @@ -283,7 +284,6 @@ static void bender_copy_inv_callback (GtkWidget *, gpointer); static void bender_swap_callback (GtkWidget *, gpointer); static void bender_ok_callback (GtkWidget *, gpointer); static void bender_cancel_callback (GtkWidget *, gpointer); -static gint bender_delete_callback (GtkWidget *, GdkEvent *, gpointer); static void bender_smoothing_callback (GtkWidget *, gpointer); static void bender_antialias_callback (GtkWidget *, gpointer); static void bender_work_on_copy_callback (GtkWidget *, gpointer); @@ -297,10 +297,6 @@ static void bender_CR_compose (CRMatrix, CRMatrix, CRMat static void bender_init_min_max (BenderDialog *, gint32); static BenderDialog * do_dialog (GDrawable *); GtkWidget * p_buildmenu (MenuItem *); -void build_action_area (GtkDialog * dlg, - ActionAreaItem * actions, - int num_actions, - int default_action); static void p_init_gdrw(t_GDRW *gdrw, GDrawable *drawable, int dirty, int shadow); static void p_end_gdrw(t_GDRW *gdrw); static gint32 p_main_bend(BenderDialog *, GDrawable *, gint); @@ -341,17 +337,6 @@ static CRMatrix CR_basis = { 0.0, 1.0, 0.0, 0.0 }, }; -/* the action area structure */ -static ActionAreaItem action_items[] = -{ - { N_("Reset"), bender_reset_callback, NULL, NULL }, - { N_("Copy"), bender_copy_callback, NULL, NULL }, - { N_("CopyInv"), bender_copy_inv_callback, NULL, NULL }, - { N_("Swap"), bender_swap_callback, NULL, NULL }, - { N_("OK"), bender_ok_callback, NULL, NULL }, - { N_("Cancel"), bender_cancel_callback, NULL, NULL } -}; - static MenuItem outline_items[] = { { N_("Upper"), 0, 0, bender_upper_callback, NULL, NULL, NULL }, @@ -1371,17 +1356,30 @@ bender_new_dialog (GDrawable *drawable) curve_type_items [i].user_data = (gpointer) cd; /* The shell and main vbox */ - cd->shell = gtk_dialog_new (); - gtk_window_set_wmclass (GTK_WINDOW (cd->shell), "curve_bend", "Gimp"); - gtk_window_set_title (GTK_WINDOW (cd->shell), _("Curve Bend")); + cd->shell = gimp_dialog_new (_("Curve Bend"), "curve_bend", + gimp_plugin_help_func, "filters/curve_bend.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("Reset"), bender_reset_callback, + cd, NULL, NULL, FALSE, FALSE, + _("Copy"), bender_copy_callback, + cd, NULL, NULL, FALSE, FALSE, + _("CopyInv"), bender_copy_inv_callback, + cd, NULL, NULL, FALSE, FALSE, + _("Swap"), bender_swap_callback, + cd, NULL, NULL, FALSE, FALSE, + _("OK"), bender_ok_callback, + cd, NULL, NULL, TRUE, FALSE, + _("Cancel"), bender_cancel_callback, + cd, NULL, NULL, FALSE, TRUE, + + NULL); - gtk_signal_connect (GTK_OBJECT (cd->shell), "delete_event", - GTK_SIGNAL_FUNC (bender_delete_callback), - cd); - vbox = gtk_vbox_new (FALSE, 2); gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cd->shell)->vbox), vbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cd->shell)->vbox), vbox, + TRUE, TRUE, 0); /* The option menu for selecting outlines */ outline_hbox = gtk_hbox_new (FALSE, 2+4); @@ -1391,31 +1389,30 @@ bender_new_dialog (GDrawable *drawable) button = gtk_button_new_with_label (_("LoadCurve")); gtk_box_pack_start (GTK_BOX (outline_hbox), button, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) bender_load_callback, - cd); + GTK_SIGNAL_FUNC (bender_load_callback), + cd); gtk_widget_show (button); - /* The Save button */ button = gtk_button_new_with_label (_("SaveCurve")); gtk_box_pack_start (GTK_BOX (outline_hbox), button, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) bender_save_callback, - cd); + GTK_SIGNAL_FUNC (bender_save_callback), + cd); gtk_widget_show (button); label = gtk_label_new (_("Rotate: ")); gtk_box_pack_start (GTK_BOX (outline_hbox), label, FALSE, FALSE, 0); cd->rotate_entry = gtk_entry_new (); - gtk_signal_connect( GTK_OBJECT(cd->rotate_entry), "changed", - (GtkSignalFunc) bender_rotate_entry_callback, - cd); - gtk_widget_set_usize( GTK_WIDGET(cd->rotate_entry), ENTRY_WIDTH,0 ); + gtk_signal_connect (GTK_OBJECT (cd->rotate_entry), "changed", + GTK_SIGNAL_FUNC (bender_rotate_entry_callback), + cd); + gtk_widget_set_usize (GTK_WIDGET (cd->rotate_entry), ENTRY_WIDTH,0 ); gtk_box_pack_start (GTK_BOX (outline_hbox), cd->rotate_entry, FALSE, FALSE, 2); gtk_widget_show (label); - gtk_widget_show(cd->rotate_entry); - p_set_rotate_entry_text(cd); + gtk_widget_show (cd->rotate_entry); + p_set_rotate_entry_text (cd); label = gtk_label_new (_("Curve for Border: ")); gtk_box_pack_start (GTK_BOX (outline_hbox), label, FALSE, FALSE, 0); @@ -1541,15 +1538,6 @@ bender_new_dialog (GDrawable *drawable) gtk_widget_show (hbox); - /* The action area */ - action_items[0].user_data = cd; - action_items[1].user_data = cd; - action_items[2].user_data = cd; - action_items[3].user_data = cd; - action_items[4].user_data = cd; - action_items[5].user_data = cd; - build_action_area (GTK_DIALOG (cd->shell), action_items, 6, 0); - gtk_widget_show (vbox); return cd; @@ -1967,7 +1955,7 @@ bender_reset_callback (GtkWidget *widget, static void bender_copy_callback (GtkWidget *widget, - gpointer client_data) + gpointer client_data) { BenderDialog *cd; int i; @@ -1999,7 +1987,7 @@ bender_copy_callback (GtkWidget *widget, static void bender_copy_inv_callback (GtkWidget *widget, - gpointer client_data) + gpointer client_data) { BenderDialog *cd; int i; @@ -2032,7 +2020,7 @@ bender_copy_inv_callback (GtkWidget *widget, static void bender_swap_callback (GtkWidget *widget, - gpointer client_data) + gpointer client_data) { #define SWAP_VALUE(a, b, h) { h=a; a=b; b=h; } BenderDialog *cd; @@ -2067,11 +2055,11 @@ bender_swap_callback (GtkWidget *widget, static void bender_ok_callback (GtkWidget *widget, - gpointer client_data) + gpointer data) { BenderDialog *cd; - cd = (BenderDialog *) client_data; + cd = (BenderDialog *) data; if (GTK_WIDGET_VISIBLE (cd->shell)) gtk_widget_hide (cd->shell); @@ -2083,33 +2071,23 @@ bender_ok_callback (GtkWidget *widget, static void bender_cancel_callback (GtkWidget *widget, - gpointer client_data) + gpointer data) { BenderDialog *cd; - cd = (BenderDialog *) client_data; + cd = (BenderDialog *) data; gtk_main_quit (); } -static gint -bender_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer data) -{ - bender_cancel_callback (w, data); - - return TRUE; -} - static void -bender_preview_update (GtkWidget *w, +bender_preview_update (GtkWidget *widget, gpointer data) { BenderDialog *cd; cd = (BenderDialog *) data; - if (GTK_TOGGLE_BUTTON (w)->active) + if (GTK_TOGGLE_BUTTON (widget)->active) { cd->preview = TRUE; bender_update (cd, UP_PREVIEW | UP_DRAW); @@ -2121,8 +2099,8 @@ bender_preview_update (GtkWidget *w, } static void -bender_preview_update_once (GtkWidget *w, - gpointer data) +bender_preview_update_once (GtkWidget *widget, + gpointer data) { BenderDialog *cd; @@ -2131,8 +2109,8 @@ bender_preview_update_once (GtkWidget *w, } static void -p_filesel_close_cb(GtkWidget *widget, - gpointer data) +p_filesel_close_cb (GtkWidget *widget, + gpointer data) { BenderDialog *cd; @@ -2519,7 +2497,7 @@ bender_CR_compose (CRMatrix a, */ GtkWidget * -p_buildmenu (MenuItem *items) +p_buildmenu (MenuItem *items) { GtkWidget *menu; GtkWidget *menu_item; @@ -2546,38 +2524,8 @@ p_buildmenu (MenuItem *items) } /* end p_buildmenu */ void -build_action_area (GtkDialog * dlg, - ActionAreaItem * actions, - int num_actions, - int default_action) -{ - GtkWidget *button; - int i; - - gtk_container_border_width (GTK_CONTAINER (dlg->action_area), 2); - - for (i = 0; i < num_actions; i++) - { - button = gtk_button_new_with_label ( gettext(actions[i].label)); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (dlg->action_area), button, TRUE, TRUE, 0); - - if (actions[i].callback) - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) actions[i].callback, - actions[i].user_data); - - if (default_action == i) - gtk_widget_grab_default (button); - gtk_widget_show (button); - - actions[i].widget = button; - } -} - - -void -p_render_preview(BenderDialog *cd, gint32 layer_id) +p_render_preview (BenderDialog *cd, + gint32 layer_id) { guchar l_rowbuf[PREVIEW_BPP * PREVIEW_SIZE_X]; guchar l_pixel[4]; diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c index 417ce7e5a9..03612a0643 100644 --- a/plug-ins/common/decompose.c +++ b/plug-ins/common/decompose.c @@ -38,8 +38,12 @@ static char ident[] = "@(#) GIMP Decompose plug-in v1.01 19-Mar-99"; #include #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" /* Declare local functions @@ -958,8 +962,6 @@ static gint decompose_dialog (void) { GtkWidget *dlg; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *frame; GtkWidget *vbox; @@ -975,38 +977,22 @@ decompose_dialog (void) gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Decompose")); - gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + dlg = gimp_dialog_new (_("Decompose"), "decompose", + gimp_plugin_help_func, "filters/decompose.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), decompose_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) decompose_close_callback, + GTK_SIGNAL_FUNC (decompose_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) decompose_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* parameter settings */ frame = gtk_frame_new (_("Extract channels:")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); diff --git a/plug-ins/common/deinterlace.c b/plug-ins/common/deinterlace.c index 0607ebbdfb..ece23d1096 100644 --- a/plug-ins/common/deinterlace.c +++ b/plug-ins/common/deinterlace.c @@ -24,10 +24,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include "config.h" -#include + +#include + #include + +#include +#include + #include "libgimp/stdplugins-intl.h" #include @@ -41,9 +46,9 @@ static void run (char *name, int *nreturn_vals, GParam **return_vals); -static void deinterlace (GDrawable *drawable); +static void deinterlace (GDrawable *drawable); -static gint deinterlace_dialog(void); +static gint deinterlace_dialog (void); GPlugInInfo PLUG_IN_INFO = { @@ -107,8 +112,8 @@ run (char *name, { case RUN_INTERACTIVE: INIT_I18N_UI(); - gimp_get_data("plug_in_deinterlace", &DeinterlaceValue); - if (! deinterlace_dialog()) + gimp_get_data ("plug_in_deinterlace", &DeinterlaceValue); + if (! deinterlace_dialog ()) status = STATUS_EXECUTION_ERROR; break; @@ -123,7 +128,7 @@ run (char *name, case RUN_WITH_LAST_VALS: INIT_I18N(); - gimp_get_data("plug_in_deinterlace", &DeinterlaceValue); + gimp_get_data ("plug_in_deinterlace", &DeinterlaceValue); break; default: @@ -133,7 +138,8 @@ run (char *name, if (status == STATUS_SUCCESS) { /* Make sure that the drawable is gray or RGB color */ - if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id)) + if (gimp_drawable_is_rgb (drawable->id) || + gimp_drawable_is_gray (drawable->id)) { gimp_progress_init ( _("Deinterlace...")); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); @@ -142,7 +148,8 @@ run (char *name, if (run_mode != RUN_NONINTERACTIVE) gimp_displays_flush (); if (run_mode == RUN_INTERACTIVE) - gimp_set_data("plug_in_deinterlace", &DeinterlaceValue, sizeof(DeinterlaceValue)); + gimp_set_data ("plug_in_deinterlace", + &DeinterlaceValue, sizeof (DeinterlaceValue)); } else { @@ -183,14 +190,14 @@ deinterlace (GDrawable *drawable) /* Get the size of the input image. (This will/must be the same * as the size of the output image. */ - width = drawable->width; + width = drawable->width; height = drawable->height; - bytes = drawable->bpp; + bytes = drawable->bpp; /* allocate row buffers */ - dest = (guchar *) malloc ((x2 - x1) * bytes); - upper = (guchar *) malloc ((x2 - x1) * bytes); - lower = (guchar *) malloc ((x2 - x1) * bytes); + dest = g_new (guchar, (x2 - x1) * bytes); + upper = g_new (guchar, (x2 - x1) * bytes); + lower = g_new (guchar, (x2 - x1) * bytes); /* initialize the pixel regions */ gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE); @@ -199,40 +206,54 @@ deinterlace (GDrawable *drawable) /* loop through the rows, performing our magic*/ for (row = y1; row < y2; row++) { + gimp_pixel_rgn_get_row (&srcPR, dest, x1, row, (x2-x1)); - gimp_pixel_rgn_get_row (&srcPR, dest, x1, row, (x2-x1)); + /* Only do interpolation if the row: + (1) Isn't one we want to keep + (2) Has both an upper and a lower row + Otherwise, just duplicate the source row + */ + if (!((row % 2 == DeinterlaceValue) || + (row - 1 < 0) || + (row + 1 >= height))) + { + gimp_pixel_rgn_get_row (&srcPR, upper, x1, row-1, (x2-x1)); + gimp_pixel_rgn_get_row (&srcPR, lower, x1, row+1, (x2-x1)); + for (col=0; col < ((x2-x1)*bytes); col++) + dest[col]=(upper[col]+lower[col])>>1; + } + gimp_pixel_rgn_set_row (&destPR, dest, x1, row, (x2-x1)); -/* Only do interpolation if the row: - (1) Isn't one we want to keep - (2) Has both an upper and a lower row - Otherwise, just duplicate the source row - */ - if (!((row % 2 == DeinterlaceValue) || (row - 1 < 0) || (row + 1 >= height))) { - gimp_pixel_rgn_get_row (&srcPR, upper, x1, row-1, (x2-x1)); - gimp_pixel_rgn_get_row (&srcPR, lower, x1, row+1, (x2-x1)); - for (col=0; col < ((x2-x1)*bytes); col++) - dest[col]=(upper[col]+lower[col])>>1; - } - gimp_pixel_rgn_set_row (&destPR, dest, x1, row, (x2-x1)); - - if ((row % 5) == 0) + if ((row % 5) == 0) gimp_progress_update ((double) row / (double) (y2 - y1)); } /* update the deinterlaced region */ - gimp_drawable_flush (drawable); gimp_drawable_merge_shadow (drawable->id, TRUE); gimp_drawable_update (drawable->id, x1, y1, (x2 - x1), (y2 - y1)); - free (dest); + g_free (lower); + g_free (upper); + g_free (dest); } -static gint deinterlace_dialog() +gboolean run_flag = FALSE; + +static void +deinterlace_ok_callback (GtkWidget *widget, + gpointer data) +{ + run_flag = TRUE; + + gtk_widget_destroy (GTK_WIDGET (data)); +} + +static gint +deinterlace_dialog (void) { GtkWidget *dlg; GtkWidget *vbox; - gint runp; struct mwRadioGroup modes[] = { { N_("Keep Odd Fields"), 0}, { N_("Keep Even Fields"), 0}, @@ -245,29 +266,41 @@ static gint deinterlace_dialog() /* Set args */ argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("deinterlace"); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("deinterlace"); + + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc()); modes[DeinterlaceValue].var = 1; - dlg = mw_app_new("plug_in_deinterlace", _("Deinterlace"), &runp); + dlg = gimp_dialog_new (_("Deinterlace"), "deinterlace", + gimp_plugin_help_func, "filters/deinterlace.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 5); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), vbox, TRUE, TRUE, 0); - gtk_widget_show(vbox); + _("OK"), deinterlace_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, - mw_radio_group_new(vbox, _("Mode"), modes); + NULL); - gtk_widget_show(dlg); - gtk_main(); - gdk_flush(); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", + GTK_SIGNAL_FUNC (gtk_main_quit), + NULL); - DeinterlaceValue = mw_radio_result(modes); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (vbox), 5); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0); + gtk_widget_show (vbox); - if (runp) - return 1; - else - return 0; + mw_radio_group_new (vbox, _("Mode"), modes); + + gtk_widget_show (dlg); + gtk_main (); + gdk_flush (); + + DeinterlaceValue = mw_radio_result (modes); + + return run_flag; } diff --git a/plug-ins/common/depthmerge.c b/plug-ins/common/depthmerge.c index ae910eaffe..ead6d675df 100644 --- a/plug-ins/common/depthmerge.c +++ b/plug-ins/common/depthmerge.c @@ -22,14 +22,17 @@ * Initial Release */ +#include "config.h" + #include #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" #include "libgimp/gimpui.h" -#include "config.h" #include "libgimp/stdplugins-intl.h" #define DEBUG @@ -568,50 +571,58 @@ void DepthMerge_executeRegion(DepthMerge *dm, } } -gint32 DepthMerge_dialog(DepthMerge *dm) { - GtkWidget *topTable; - GtkWidget *previewFrame; - GtkWidget *sourceTable; - GtkWidget *tempLabel; - GtkWidget *tempOptionMenu; - GtkWidget *tempMenu; - GtkWidget *numericParameterTable; - GtkWidget *hbbox; - GtkWidget *button; - gint argc; +gint32 +DepthMerge_dialog (DepthMerge *dm) +{ + GtkWidget *topTable; + GtkWidget *previewFrame; + GtkWidget *sourceTable; + GtkWidget *tempLabel; + GtkWidget *tempOptionMenu; + GtkWidget *tempMenu; + GtkWidget *numericParameterTable; + gint argc; gchar **argv; - guchar *color_cube; + guchar *color_cube; - dm->interface = (DepthMergeInterface *)g_malloc(sizeof(DepthMergeInterface)); + dm->interface = g_new (DepthMergeInterface, 1); dm->interface->active = FALSE; - dm->interface->run = FALSE; + dm->interface->run = FALSE; argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup(PLUG_IN_NAME); + argv = g_new (gchar *, 1); + argv[0] = g_strdup (PLUG_IN_NAME); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc ()); - gdk_set_use_xshm(gimp_use_xshm()); + gdk_set_use_xshm (gimp_use_xshm ()); - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], - color_cube[1], - color_cube[2], - color_cube[3]); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); - dm->interface->dialog = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dm->interface->dialog), _("Depth Merge")); - gtk_window_position(GTK_WINDOW(dm->interface->dialog), GTK_WIN_POS_MOUSE); - gtk_container_border_width(GTK_CONTAINER(dm->interface->dialog), 0); - gtk_signal_connect(GTK_OBJECT(dm->interface->dialog), "destroy", - (GtkSignalFunc)dialogCloseCallback, NULL); + dm->interface->dialog = + gimp_dialog_new (_("Depth Merge"), "depthmerge", + gimp_plugin_help_func, "filters/depthmerge.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), dialogOkCallback, + dm, NULL, NULL, TRUE, FALSE, + _("Cancel"), dialogCancelCallback, + dm, NULL, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dm->interface->dialog), "destroy", + GTK_SIGNAL_FUNC (dialogCloseCallback), + NULL); /* topTable */ topTable = gtk_table_new(3, 3, FALSE); @@ -741,31 +752,6 @@ gint32 DepthMerge_dialog(DepthMerge *dm) { &(dm->params.scale2), -1, 1, 0.001); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dm->interface->dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dm->interface->dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dm->interface->dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialogOkCallback, - dm); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc)dialogCancelCallback, - dm); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* Done */ dm->interface->active = TRUE; diff --git a/plug-ins/common/despeckle.c b/plug-ins/common/despeckle.c index 203d8291ad..02a346ba67 100644 --- a/plug-ins/common/despeckle.c +++ b/plug-ins/common/despeckle.c @@ -43,6 +43,46 @@ * Revision History: * * $Log$ + * Revision 1.22 2000/01/06 16:40:17 mitch + * 2000-01-06 Michael Natterer + * + * * app/[all files using the dialog or action area constructors] + * * libgimp/gimpdialog.[ch]: added a "slot_object" agrument to the + * constructors' va_args lists to allow the action area buttons to be + * connected wich gtk_signal_connect_object(). + * + * * libgimp/gimphelp.c: show the correct help page for plugins. + * + * * plug-ins/common/CEL.c + * * plug-ins/common/CML_explorer.c + * * plug-ins/common/Makefile.am + * * plug-ins/common/aa.c + * * plug-ins/common/align_layers.c + * * plug-ins/common/animationplay.c + * * plug-ins/common/apply_lens.c + * * plug-ins/common/blinds.c + * * plug-ins/common/blur.c + * * plug-ins/common/bumpmap.c + * * plug-ins/common/checkerboard.c + * * plug-ins/common/colorify.c + * * plug-ins/common/colortoalpha.c + * * plug-ins/common/compose.c + * * plug-ins/common/convmatrix.c + * * plug-ins/common/csource.c + * * plug-ins/common/cubism.c + * * plug-ins/common/curve_bend.c + * * plug-ins/common/decompose.c + * * plug-ins/common/deinterlace.c + * * plug-ins/common/depthmerge.c + * * plug-ins/common/despeckle.c + * * plug-ins/common/destripe.c + * * plug-ins/common/diffraction.c + * * plug-ins/common/displace.c + * * plug-ins/common/grid.c + * * plug-ins/helpbrowser/Makefile.am + * * plug-ins/helpbrowser/helpbrowser.c: use the dialog constructor + * and enable the "F1" help key. + * * Revision 1.21 1999/12/29 18:07:43 neo * NEVER EVER use sprintf together with _(...) ! * @@ -184,9 +224,12 @@ #include #include #include + #include + #include #include + #include "libgimp/stdplugins-intl.h" /* @@ -719,70 +762,80 @@ despeckle(void) */ static gint -despeckle_dialog(void) +despeckle_dialog (void) { - GtkWidget *dialog, /* Dialog window */ - *table, /* Table "container" for controls */ - *ptable, /* Preview table */ - *ftable, /* Filter table */ - *frame, /* Frame for preview */ - *scrollbar, /* Horizontal + vertical scroller */ - *hbbox, /* Buttonbox for the OK/Cancel buttons */ - *button; /* OK/Cancel buttons */ + GtkWidget *dialog, /* Dialog window */ + *table, /* Table "container" for controls */ + *ptable, /* Preview table */ + *ftable, /* Filter table */ + *frame, /* Frame for preview */ + *scrollbar, /* Horizontal + vertical scroller */ + *button; /* Check Button */ gint argc; /* Fake argc for GUI */ - gchar **argv; /* Fake argv for GUI */ + gchar **argv; /* Fake argv for GUI */ guchar *color_cube; /* Preview color cube... */ - gchar *plugin_name; + gchar *plugin_name; - /* - * Initialize the program's display... - */ + /* + * Initialize the program's display... + */ argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("despeckle"); + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("despeckle"); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); - gdk_set_use_xshm(gimp_use_xshm()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc ()); + gdk_set_use_xshm (gimp_use_xshm ()); - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); - /* - * Dialog window... - */ + /* + * Dialog window... + */ - dialog = gtk_dialog_new(); plugin_name = g_strdup_printf ("%s%s", _("Despeckle "), PLUG_IN_VERSION); - gtk_window_set_title(GTK_WINDOW(dialog), plugin_name); - g_free(plugin_name); - gtk_window_set_wmclass(GTK_WINDOW(dialog), "despeckle", "Gimp"); - gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); - gtk_container_border_width(GTK_CONTAINER(dialog), 0); - gtk_signal_connect(GTK_OBJECT(dialog), "destroy", - (GtkSignalFunc) dialog_close_callback, - NULL); - /* - * Top-level table for dialog... - */ + dialog = gimp_dialog_new (plugin_name, "despeckle", + gimp_plugin_help_func, "filters/despeckle.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - table = gtk_table_new(5, 3, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), 6); - gtk_table_set_row_spacings(GTK_TABLE(table), 4); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), table, FALSE, FALSE, 0); - gtk_widget_show(table); + _("OK"), dialog_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), dialog_cancel_callback, + NULL, NULL, NULL, FALSE, TRUE, - /* - * Preview window... - */ + NULL); + + g_free (plugin_name); + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (dialog_close_callback), + NULL); + + /* + * Top-level table for dialog... + */ + + table = gtk_table_new (5, 3, FALSE); + gtk_container_border_width (GTK_CONTAINER (table), 6); + gtk_table_set_row_spacings (GTK_TABLE (table), 4); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, + FALSE, FALSE, 0); + gtk_widget_show (table); + + /* + * Preview window... + */ ptable = gtk_table_new(2, 2, FALSE); gtk_container_border_width(GTK_CONTAINER(ptable), 0); @@ -880,31 +933,6 @@ despeckle_dialog(void) dialog_create_ivalue( _("White Level"), GTK_TABLE(table), 4, &white_level, 0, 256); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialog_ok_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - (GtkSignalFunc) dialog_cancel_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* * Show it and wait for the user to do something... */ diff --git a/plug-ins/common/destripe.c b/plug-ins/common/destripe.c index fab0c32680..bb8911a948 100644 --- a/plug-ins/common/destripe.c +++ b/plug-ins/common/destripe.c @@ -41,17 +41,20 @@ * 1998/02/06 * Minor changes. */ -#include -#include -#include -#include -#include -#include -#include - #ifdef HAVE_CONFIG_H #include "config.h" #endif + +#include +#include +#include +#include + +#include + +#include +#include + #include "libgimp/stdplugins-intl.h" /* @@ -549,7 +552,6 @@ destripe_dialog(void) *ftable, /* Filter table */ *frame, /* Frame for preview */ *scrollbar, /* Horizontal + vertical scroller */ - *hbbox, *button; gint argc; /* Fake argc for GUI */ gchar **argv; /* Fake argv for GUI */ @@ -561,36 +563,45 @@ destripe_dialog(void) */ argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("destripe"); + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("destripe"); - gtk_init(&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); - gdk_set_use_xshm(gimp_use_xshm()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc ()); + gdk_set_use_xshm (gimp_use_xshm ()); #ifdef SIGBUS - signal(SIGBUS, SIG_DFL); + signal (SIGBUS, SIG_DFL); #endif - signal(SIGSEGV, SIG_DFL); - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); + signal (SIGSEGV, SIG_DFL); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); /* * Dialog window... */ - dialog = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dialog), _("Destripe")); - gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); - gtk_container_border_width(GTK_CONTAINER(dialog), 0); - gtk_signal_connect(GTK_OBJECT(dialog), "destroy", - (GtkSignalFunc) dialog_close_callback, - NULL); + dialog = gimp_dialog_new (_("Destripe"), "destripe", + gimp_plugin_help_func, "filters/destripe.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), dialog_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (dialog_close_callback), + NULL); /* * Top-level table for dialog... @@ -685,32 +696,6 @@ destripe_dialog(void) dialog_create_ivalue(_("Width"), GTK_TABLE(table), 2, &avg_width, 2, MAX_AVG); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialog_ok_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dialog)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - /* * Show it and wait for the user to do something... */ diff --git a/plug-ins/common/diffraction.c b/plug-ins/common/diffraction.c index 80bde5ea85..d1b556000b 100644 --- a/plug-ins/common/diffraction.c +++ b/plug-ins/common/diffraction.c @@ -31,8 +31,11 @@ #endif #include -#include "gtk/gtk.h" +#include + #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" /***** Magic numbers *****/ @@ -511,213 +514,198 @@ diff_intensity(double x, double y, double lam) /*****/ static gint -diffraction_dialog(void) +diffraction_dialog (void) { - GtkWidget *dialog; - GtkWidget *top_table; - GtkWidget *notebook; - GtkWidget *frame; - GtkWidget *vbox; - GtkWidget *table; - GtkWidget *label; - GtkWidget *hbbox; - GtkWidget *button; - gint argc; - gchar **argv; - guchar *color_cube; + GtkWidget *dialog; + GtkWidget *top_table; + GtkWidget *notebook; + GtkWidget *frame; + GtkWidget *vbox; + GtkWidget *table; + GtkWidget *label; + GtkWidget *button; + gint argc; + gchar **argv; + guchar *color_cube; #if 0 - printf("Waiting... (pid %d)\n", getpid()); - kill(getpid(), SIGSTOP); + g_print ("Waiting... (pid %d)\n", getpid ()); + kill (getpid (), SIGSTOP); #endif - argc = 1; - argv = g_new(gchar *, 1); - argv[0] = g_strdup("diffraction"); + argc = 1; + argv = g_new (gchar *, 1); + argv[0] = g_strdup ("diffraction"); - gtk_init(&argc, &argv); - gtk_rc_parse (gimp_gtkrc ()); + gtk_init (&argc, &argv); + gtk_rc_parse (gimp_gtkrc ()); - gdk_set_use_xshm (gimp_use_xshm ()); + gdk_set_use_xshm (gimp_use_xshm ()); - gtk_preview_set_gamma(gimp_gamma()); - gtk_preview_set_install_cmap(gimp_install_cmap()); - color_cube = gimp_color_cube(); - gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]); + gtk_preview_set_gamma (gimp_gamma ()); + gtk_preview_set_install_cmap (gimp_install_cmap ()); + color_cube = gimp_color_cube (); + gtk_preview_set_color_cube (color_cube[0], color_cube[1], + color_cube[2], color_cube[3]); - gtk_widget_set_default_visual(gtk_preview_get_visual()); - gtk_widget_set_default_colormap(gtk_preview_get_cmap()); + gtk_widget_set_default_visual (gtk_preview_get_visual ()); + gtk_widget_set_default_colormap (gtk_preview_get_cmap ()); - dialog = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dialog), _("Diffraction patterns")); - gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); - gtk_container_border_width(GTK_CONTAINER(dialog), 0); - gtk_signal_connect(GTK_OBJECT(dialog), "destroy", - (GtkSignalFunc) dialog_close_callback, - NULL); + dialog = gimp_dialog_new (_("Diffraction Patterns"), "diffraction", + gimp_plugin_help_func, "filters/diffraction.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, - top_table = gtk_table_new(2, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(top_table), 6); - gtk_table_set_row_spacings(GTK_TABLE(top_table), 4); - gtk_table_set_col_spacings(GTK_TABLE(top_table), 4); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), top_table, FALSE, FALSE, 0); - gtk_widget_show(top_table); + _("OK"), dialog_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), dialog_cancel_callback, + NULL, NULL, NULL, FALSE, TRUE, - /* Preview */ + NULL); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 0); - gtk_table_attach(GTK_TABLE(top_table), vbox, 0, 1, 0, 1, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show(vbox); + gtk_signal_connect (GTK_OBJECT (dialog), "destroy", + GTK_SIGNAL_FUNC (dialog_close_callback), + NULL); - frame = gtk_frame_new(NULL); - gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); - gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); - gtk_widget_show(frame); + top_table = gtk_table_new(2, 2, FALSE); + gtk_container_border_width(GTK_CONTAINER(top_table), 6); + gtk_table_set_row_spacings(GTK_TABLE(top_table), 4); + gtk_table_set_col_spacings(GTK_TABLE(top_table), 4); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), top_table, + FALSE, FALSE, 0); + gtk_widget_show(top_table); - dint.preview = gtk_preview_new(GTK_PREVIEW_COLOR); - gtk_preview_size(GTK_PREVIEW(dint.preview), PREVIEW_WIDTH, PREVIEW_HEIGHT); - gtk_container_add(GTK_CONTAINER(frame), dint.preview); - gtk_widget_show(dint.preview); + /* Preview */ - dint.progress = gtk_progress_bar_new(); - gtk_widget_set_usize(dint.progress, PROGRESS_WIDTH, PROGRESS_HEIGHT); - gtk_box_pack_start(GTK_BOX(vbox), dint.progress, TRUE, FALSE, 0); - gtk_widget_show(dint.progress); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox), 0); + gtk_table_attach(GTK_TABLE(top_table), vbox, 0, 1, 0, 1, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show(vbox); - button = gtk_button_new_with_label( _("Preview!")); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - (GtkSignalFunc) dialog_update_callback, - NULL); - gtk_table_attach(GTK_TABLE(top_table), button, 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show(button); + frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); + gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); + gtk_widget_show(frame); - /* Notebook */ + dint.preview = gtk_preview_new(GTK_PREVIEW_COLOR); + gtk_preview_size(GTK_PREVIEW(dint.preview), PREVIEW_WIDTH, PREVIEW_HEIGHT); + gtk_container_add(GTK_CONTAINER(frame), dint.preview); + gtk_widget_show(dint.preview); - notebook = gtk_notebook_new(); - gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); - gtk_table_attach(GTK_TABLE(top_table), notebook, 1, 2, 0, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); - gtk_widget_show(notebook); + dint.progress = gtk_progress_bar_new(); + gtk_widget_set_usize(dint.progress, PROGRESS_WIDTH, PROGRESS_HEIGHT); + gtk_box_pack_start(GTK_BOX(vbox), dint.progress, TRUE, FALSE, 0); + gtk_widget_show(dint.progress); - /* Frequencies tab */ + button = gtk_button_new_with_label( _("Preview!")); + gtk_signal_connect(GTK_OBJECT(button), "clicked", + (GtkSignalFunc) dialog_update_callback, + NULL); + gtk_table_attach(GTK_TABLE(top_table), button, 0, 1, 1, 2, + GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_widget_show(button); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 4); + /* Notebook */ - table = gtk_table_new(3, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), 0); - gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); - gtk_widget_show(table); + notebook = gtk_notebook_new(); + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); + gtk_table_attach(GTK_TABLE(top_table), notebook, 1, 2, 0, 2, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + gtk_widget_show(notebook); - dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.lam_r, 0.0, 20.0); - dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.lam_g, 0.0, 20.0); - dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.lam_b, 0.0, 20.0); + /* Frequencies tab */ - label = gtk_label_new( _("Frequencies")); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); - gtk_widget_show(vbox); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox), 4); - /* Contours tab */ + table = gtk_table_new(3, 2, FALSE); + gtk_container_border_width(GTK_CONTAINER(table), 0); + gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); + gtk_widget_show(table); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 4); + dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.lam_r, 0.0, 20.0); + dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.lam_g, 0.0, 20.0); + dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.lam_b, 0.0, 20.0); - table = gtk_table_new(3, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), 0); - gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); - gtk_widget_show(table); + label = gtk_label_new( _("Frequencies")); + gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); + gtk_widget_show(vbox); - dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.contour_r, 0.0, 10.0); - dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.contour_g, 0.0, 10.0); - dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.contour_b, 0.0, 10.0); + /* Contours tab */ - label = gtk_label_new( _("Contours")); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); - gtk_widget_show(vbox); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox), 4); - /* Sharp edges tab */ + table = gtk_table_new(3, 2, FALSE); + gtk_container_border_width(GTK_CONTAINER(table), 0); + gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); + gtk_widget_show(table); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 4); + dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.contour_r, 0.0, 10.0); + dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.contour_g, 0.0, 10.0); + dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.contour_b, 0.0, 10.0); - table = gtk_table_new(3, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), 0); - gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); - gtk_widget_show(table); + label = gtk_label_new( _("Contours")); + gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); + gtk_widget_show(vbox); - dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.edges_r, 0.0, 1.0); - dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.edges_g, 0.0, 1.0); - dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.edges_b, 0.0, 1.0); + /* Sharp edges tab */ - label = gtk_label_new( _("Sharp edges")); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); - gtk_widget_show(vbox); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox), 4); - /* Other options tab */ + table = gtk_table_new(3, 2, FALSE); + gtk_container_border_width(GTK_CONTAINER(table), 0); + gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); + gtk_widget_show(table); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_border_width(GTK_CONTAINER(vbox), 4); + dialog_create_value( _("Red"), GTK_TABLE(table), 0, &dvals.edges_r, 0.0, 1.0); + dialog_create_value( _("Green"), GTK_TABLE(table), 1, &dvals.edges_g, 0.0, 1.0); + dialog_create_value( _("Blue"), GTK_TABLE(table), 2, &dvals.edges_b, 0.0, 1.0); - table = gtk_table_new(3, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), 0); - gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); - gtk_widget_show(table); + label = gtk_label_new( _("Sharp edges")); + gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); + gtk_widget_show(vbox); - dialog_create_value( _("Brightness"), GTK_TABLE(table), 0, &dvals.brightness, 0.0, 1.0); - dialog_create_value( _("Scattering"), GTK_TABLE(table), 1, &dvals.scattering, 0.0, 100.0); - dialog_create_value( _("Polarization"), GTK_TABLE(table), 2, &dvals.polarization, -1.0, 1.0); + /* Other options tab */ - label = gtk_label_new( _("Other options")); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); - gtk_widget_show(vbox); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox), 4); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label ( _("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialog_ok_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label ( _("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) dialog_cancel_callback, - dialog); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - /* Done */ + table = gtk_table_new(3, 2, FALSE); + gtk_container_border_width(GTK_CONTAINER(table), 0); + gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); + gtk_widget_show(table); - gtk_widget_show(dialog); - dialog_update_preview(); + dialog_create_value( _("Brightness"), GTK_TABLE(table), 0, &dvals.brightness, 0.0, 1.0); + dialog_create_value( _("Scattering"), GTK_TABLE(table), 1, &dvals.scattering, 0.0, 100.0); + dialog_create_value( _("Polarization"), GTK_TABLE(table), 2, &dvals.polarization, -1.0, 1.0); - gtk_main(); - gdk_flush(); + label = gtk_label_new( _("Other options")); + gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, label); + gtk_widget_show(vbox); - return dint.run; + /* Done */ + + gtk_widget_show(dialog); + dialog_update_preview(); + + gtk_main(); + gdk_flush(); + + return dint.run; } /* diffraction_dialog */ /*****/ static void -dialog_update_preview(void) +dialog_update_preview (void) { double left, right, bottom, top; double px, py; diff --git a/plug-ins/common/displace.c b/plug-ins/common/displace.c index 390b6d1ae9..320d8f94e1 100644 --- a/plug-ins/common/displace.c +++ b/plug-ins/common/displace.c @@ -34,7 +34,6 @@ * */ - /* Version 1.12. */ #include "config.h" @@ -46,9 +45,12 @@ #include #endif #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" #include "libgimp/gimpui.h" + #include "libgimp/stdplugins-intl.h" /* Some useful macros */ @@ -288,8 +290,6 @@ displace_dialog (GDrawable *drawable) { GtkWidget *dlg; GtkWidget *label; - GtkWidget *hbbox; - GtkWidget *button; GtkWidget *toggle; GtkWidget *toggle_hbox; GtkWidget *frame; @@ -310,44 +310,29 @@ displace_dialog (GDrawable *drawable) argv[0] = g_strdup ("displace"); #if 0 - printf("displace: pid = %d\n", (int)getpid()); - kill(getpid(), SIGSTOP); + g_print ("displace: pid = %d\n", (int) getpid ()); + kill (getpid (), SIGSTOP); #endif gtk_init (&argc, &argv); - gtk_rc_parse(gimp_gtkrc()); - dlg = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dlg), _("Displace")); - gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); + gtk_rc_parse (gimp_gtkrc ()); + + dlg = gimp_dialog_new (_("Displace"), "displace", + gimp_plugin_help_func, "filters/displace.html", + GTK_WIN_POS_MOUSE, + FALSE, TRUE, FALSE, + + _("OK"), displace_ok_callback, + NULL, NULL, NULL, TRUE, FALSE, + _("Cancel"), gtk_widget_destroy, + NULL, 1, NULL, FALSE, TRUE, + + NULL); + gtk_signal_connect (GTK_OBJECT (dlg), "destroy", - (GtkSignalFunc) displace_close_callback, + GTK_SIGNAL_FUNC (displace_close_callback), NULL); - /* Action area */ - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE); - hbbox = gtk_hbutton_box_new (); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - - button = gtk_button_new_with_label ( _("OK")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) displace_ok_callback, - dlg); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_grab_default (button); - gtk_widget_show (button); - - button = gtk_button_new_with_label ( _("Cancel")); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (dlg)); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - /* The main table */ frame = gtk_frame_new ( _("Displace Options")); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN); diff --git a/plug-ins/common/grid.c b/plug-ins/common/grid.c index 76e2f026f0..98625ec744 100644 --- a/plug-ins/common/grid.c +++ b/plug-ins/common/grid.c @@ -474,14 +474,14 @@ dialog (gint32 image_ID, gtk_rc_parse (gimp_gtkrc ()); dlg = gimp_dialog_new (_("Grid"), "grid", - gimp_plugin_help_func, argv[0], + gimp_plugin_help_func, "filters/grid.html", GTK_WIN_POS_MOUSE, FALSE, TRUE, FALSE, _("OK"), ok_callback, - NULL, NULL, TRUE, FALSE, + NULL, NULL, NULL, TRUE, FALSE, _("Cancel"), close_callback, - NULL, NULL, FALSE, TRUE, + NULL, NULL, NULL, FALSE, TRUE, NULL); diff --git a/plug-ins/helpbrowser/Makefile.am b/plug-ins/helpbrowser/Makefile.am index bf134b6da5..d9bf57e031 100644 --- a/plug-ins/helpbrowser/Makefile.am +++ b/plug-ins/helpbrowser/Makefile.am @@ -18,6 +18,7 @@ INCLUDES = \ LDADD = \ $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimp/libgimpui.la \ $(GTKXMHTML_LIBS) \ $(INTLLIBS) diff --git a/plug-ins/helpbrowser/helpbrowser.c b/plug-ins/helpbrowser/helpbrowser.c index 733b058b35..720f0cc77d 100644 --- a/plug-ins/helpbrowser/helpbrowser.c +++ b/plug-ins/helpbrowser/helpbrowser.c @@ -30,6 +30,7 @@ #include #include #include "libgimp/gimp.h" +#include "libgimp/gimpui.h" #include "libgimp/stdplugins-intl.h" #include "queue.h" @@ -786,9 +787,12 @@ open_browser_dialog (gchar *locale, gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (close_callback), NULL); - gtk_window_set_wmclass (GTK_WINDOW (window), "gimp_help_browser", "Gimp"); + gtk_window_set_wmclass (GTK_WINDOW (window), "helpbrowser", "Gimp"); gtk_window_set_title (GTK_WINDOW (window), _("GIMP Help Browser")); + gimp_help_connect_help_accel (window, gimp_plugin_help_func, + "filters/helpbrowser.html"); + vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); @@ -946,7 +950,7 @@ open_browser_dialog (gchar *locale, GTK_SIGNAL_FUNC (page_up_callback), pages[i].html); gtk_signal_connect (GTK_OBJECT (GTK_XMHTML (pages[i].html)->html.vsb), - "page_down", + "page_down", GTK_SIGNAL_FUNC (page_down_callback), pages[i].html);