From 7a4260da704f267ebbdeca69fab130063194c21e Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 24 Jan 2001 22:36:18 +0000 Subject: [PATCH] Makefile.am configure.in added the new library below. 2001-01-24 Michael Natterer * Makefile.am * configure.in * gimptool.in: added the new library below. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpchainbutton.[ch] * libgimpwidgets/gimpcolorarea.[ch] * libgimpwidgets/gimpcolorbutton.[ch] * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimphelpui.[ch] * libgimpwidgets/gimppatheditor.[ch] * libgimpwidgets/gimppixmap.[ch] * libgimpwidgets/gimpquerybox.[ch] * libgimpwidgets/gimpsizeentry.[ch] * libgimpwidgets/gimpunitmenu.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimpwidgets/gimpwidgets.def * libgimpwidgets/gimpwidgetstypes.h: new shared library. Currently there are some ugly dependencies into libgimp. These will be removed and go to a "libgimpglue" library which will be a library for functions which share a common interface between plug-ins and the app but have different implementations. Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h" to simulate this upcoming separation. * libgimp/Makefile.am * libgimp/gimpchainbutton.[ch] * libgimp/gimpcolorarea.[ch] * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimpfileselection.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimppixmap.[ch] * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: removed from here. * libgimp/gimpui.h * libgimp/gimpuitypes.h * libgimp/makefile.mingw.in * libgimp/makefile.msc: changed accordingly. * app/[all ui files] * app/pdb/palette_cmds.c * app/pdb/tools_cmds.c * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h" and removed useless includes. * app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h" * app/Makefile.am * plug-ins/[all makefiles which link against libgimpui]: link against libgimpwidgets.la * po-libgimp/POTFILES.in: changed file locations. --- ChangeLog | 64 + Makefile.am | 1 + app/Makefile.am | 17 +- app/about_dialog.c | 4 +- app/actions/help-commands.c | 3 +- app/actions/qmask-commands.c | 3 +- app/actions/quick-mask-commands.c | 3 +- app/app_procs.c | 4 +- app/apptypes.h | 6 +- app/base/color-balance.c | 6 +- app/base/curves.c | 7 +- app/base/gimphistogram.c | 3 +- app/base/hue-saturation.c | 5 +- app/base/threshold.c | 6 +- app/brush_edit.c | 5 +- app/brush_select.c | 5 +- app/channel_ops.c | 5 +- app/channels_dialog.c | 3 +- app/color_area.c | 1 - app/color_notebook.c | 4 +- app/color_panel.h | 2 +- app/color_select.c | 4 +- app/colormap_dialog.c | 8 +- app/commands.c | 3 +- app/convert.c | 5 +- app/core/gimp-edit.c | 3 +- app/core/gimpdrawable-blend.c | 2 +- app/core/gimpdrawable-offset.c | 5 +- app/core/gimpedit.c | 3 +- app/core/gimpimage-convert.c | 5 +- app/core/gimpimage-duplicate.c | 5 +- app/core/gimpimage-qmask.c | 3 +- app/core/gimpimage-quick-mask.c | 3 +- app/devices.c | 4 +- app/dialogs/about-dialog.c | 4 +- app/dialogs/color-dialog.c | 4 +- app/dialogs/image-new-dialog.c | 5 +- app/dialogs/info-dialog.c | 22 +- app/dialogs/info-window.c | 5 +- app/dialogs/module-dialog.c | 3 +- app/dialogs/palette-import-dialog.c | 2 +- app/dialogs/preferences-dialog.c | 3 +- app/dialogs/resize-dialog.c | 9 +- app/dialogs/resolution-calibrate-dialog.c | 3 +- app/dialogs/tips-dialog.c | 34 +- app/dialogs/user-install-dialog.c | 2 +- app/display/gimpdisplay-ops.c | 6 +- app/display/gimpdisplayshell-draw.c | 3 +- app/display/gimpdisplayshell-qmask.c | 3 +- app/display/gimpdisplayshell.c | 3 +- app/display/gimpnavigationeditor.c | 5 +- app/display/gimpnavigationview.c | 5 +- app/display/gimpprogress.c | 4 +- app/docindex.c | 4 +- app/errorconsole.c | 5 +- app/file_new_dialog.c | 5 +- app/fileops.c | 4 +- app/gdisplay_ops.c | 6 +- app/gimpcontextpreview.c | 4 +- app/gimpdnd.c | 2 +- app/gimpdrawable-offset.c | 5 +- app/gimphelp.c | 3 +- app/gimphistogram.c | 3 +- app/gimpimage-convert.c | 5 +- app/gimpimage-duplicate.c | 5 +- app/gimpprogress.c | 4 +- app/gimpui.c | 4 +- app/gimpui.h | 11 - app/global_edit.c | 3 +- app/gradient.c | 3 +- app/gradient_editor.c | 3 +- app/gradient_select.c | 3 +- app/gui/about-dialog.c | 4 +- app/gui/brush-editor.c | 5 +- app/gui/brush-select.c | 5 +- app/gui/channels-dialog.c | 3 +- app/gui/color-area.c | 1 - app/gui/color-notebook.c | 4 +- app/gui/color-select.c | 4 +- app/gui/colormap-dialog.c | 8 +- app/gui/commands.c | 3 +- app/gui/device-status-dialog.c | 4 +- app/gui/file-new-dialog.c | 5 +- app/gui/gradient-editor.c | 3 +- app/gui/gradient-select.c | 3 +- app/gui/help-commands.c | 3 +- app/gui/indicator-area.c | 4 +- app/gui/info-dialog.c | 22 +- app/gui/info-window.c | 5 +- app/gui/input-dialog.c | 4 +- app/gui/layers-dialog.c | 3 +- app/gui/menus.c | 4 +- app/gui/module-browser.c | 3 +- app/gui/palette-editor.c | 3 +- app/gui/palette-import-dialog.c | 2 +- app/gui/palette-select.c | 3 +- app/gui/paths-dialog.c | 3 +- app/gui/pattern-select.c | 3 +- app/gui/preferences-dialog.c | 3 +- app/gui/qmask-commands.c | 3 +- app/gui/resize-dialog.c | 9 +- app/gui/resolution-calibrate-dialog.c | 3 +- app/gui/tips-dialog.c | 34 +- app/gui/tool-options-dialog.c | 10 +- app/gui/toolbox.c | 3 +- app/gui/user-install-dialog.c | 2 +- app/indicator_area.c | 4 +- app/info_dialog.c | 22 +- app/info_window.c | 5 +- app/interface.c | 3 +- app/layers_dialog.c | 3 +- app/lc_dialog.c | 2 +- app/menus.c | 4 +- app/menus/menus.c | 4 +- app/module_db.c | 3 +- app/nav_window.c | 5 +- app/ops_buttons.c | 4 +- app/paint/gimpairbrush.c | 7 +- app/paint/gimpclone.c | 12 +- app/paint/gimpconvolve.c | 12 +- app/paint/gimpdodgeburn.c | 12 +- app/paint/gimperaser.c | 9 +- app/paint/gimpink.c | 12 +- app/paint/gimppencil.c | 8 +- app/paint/gimpsmudge.c | 11 +- app/paint/gimpsourcecore.c | 12 +- app/palette.c | 3 +- app/palette_import.c | 2 +- app/palette_select.c | 3 +- app/paths_dialog.c | 3 +- app/pattern_select.c | 3 +- app/pdb/palette_cmds.c | 2 + app/pdb/tools_cmds.c | 2 + app/preferences_dialog.c | 3 +- app/qmask.c | 3 +- app/resize.c | 9 +- app/resolution_calibrate.c | 3 +- app/tips_dialog.c | 34 +- app/toolbox.c | 3 +- app/tools/airbrush.c | 7 +- app/tools/blend.c | 2 +- app/tools/brightness_contrast.c | 6 +- app/tools/bucket_fill.c | 12 +- app/tools/by_color_select.c | 8 +- app/tools/clone.c | 12 +- app/tools/color_balance.c | 6 +- app/tools/color_picker.c | 10 +- app/tools/convolve.c | 12 +- app/tools/crop.c | 10 +- app/tools/curves.c | 7 +- app/tools/dodgeburn.c | 12 +- app/tools/edit_selection.c | 7 +- app/tools/ellipse_select.c | 6 +- app/tools/eraser.c | 9 +- app/tools/flip_tool.c | 6 +- app/tools/free_select.c | 10 +- app/tools/fuzzy_select.c | 11 +- app/tools/gimpairbrushtool.c | 7 +- app/tools/gimpblendtool.c | 2 +- app/tools/gimpbrightnesscontrasttool.c | 6 +- app/tools/gimpbucketfilltool.c | 12 +- app/tools/gimpbycolorselecttool.c | 8 +- app/tools/gimpclonetool.c | 12 +- app/tools/gimpcolorbalancetool.c | 6 +- app/tools/gimpconvolvetool.c | 12 +- app/tools/gimpcroptool.c | 10 +- app/tools/gimpcurvestool.c | 7 +- app/tools/gimpdodgeburntool.c | 12 +- app/tools/gimpeditselectiontool.c | 7 +- app/tools/gimpellipseselecttool.c | 6 +- app/tools/gimperasertool.c | 9 +- app/tools/gimpfliptool.c | 6 +- app/tools/gimpfreeselecttool.c | 10 +- app/tools/gimpfuzzyselecttool.c | 11 +- app/tools/gimphistogramtool.c | 5 +- app/tools/gimphuesaturationtool.c | 5 +- app/tools/gimpinktool.c | 12 +- app/tools/gimpiscissorstool.c | 12 +- app/tools/gimplevelstool.c | 7 +- app/tools/gimpmagnifytool.c | 9 +- app/tools/gimpmeasuretool.c | 8 +- app/tools/gimpmovetool.c | 12 +- app/tools/gimppaintoptions-gui.c | 9 +- app/tools/gimppenciltool.c | 8 +- app/tools/gimpperspectivetool.c | 3 +- app/tools/gimpposterizetool.c | 6 +- app/tools/gimprectselecttool.c | 10 +- app/tools/gimpregionselecttool.c | 11 +- app/tools/gimprotatetool.c | 7 +- app/tools/gimpscaletool.c | 5 +- app/tools/gimpselectionoptions.c | 9 +- app/tools/gimpsheartool.c | 3 +- app/tools/gimpsmudgetool.c | 11 +- app/tools/gimpsourcetool.c | 12 +- app/tools/gimptexttool.c | 3 +- app/tools/gimpthresholdtool.c | 6 +- app/tools/histogram_tool.c | 5 +- app/tools/hue_saturation.c | 5 +- app/tools/ink.c | 12 +- app/tools/iscissors.c | 12 +- app/tools/levels.c | 7 +- app/tools/magnify.c | 9 +- app/tools/measure.c | 8 +- app/tools/move.c | 12 +- app/tools/paint_options.c | 9 +- app/tools/paintbrush.c | 12 +- app/tools/pencil.c | 8 +- app/tools/perspective_tool.c | 3 +- app/tools/posterize.c | 6 +- app/tools/rect_select.c | 10 +- app/tools/rotate_tool.c | 7 +- app/tools/scale_tool.c | 5 +- app/tools/selection_options.c | 9 +- app/tools/shear_tool.c | 3 +- app/tools/smudge.c | 11 +- app/tools/text_tool.c | 3 +- app/tools/threshold.c | 6 +- app/tools/tool_options_dialog.c | 10 +- app/tools/tools.c | 20 +- app/tools/transform_core.c | 1 + app/tools/transform_tool.c | 4 +- app/undo_history.c | 4 +- app/user_install.c | 2 +- app/widgets/gimpbrusheditor.c | 5 +- app/widgets/gimpcolordialog.c | 4 +- app/widgets/gimpcolormapeditor.c | 8 +- app/widgets/gimpcolorpanel.h | 2 +- app/widgets/gimpdeviceinfo.c | 4 +- app/widgets/gimpdevices.c | 4 +- app/widgets/gimpdnd.c | 2 +- app/widgets/gimpgradienteditor.c | 3 +- app/widgets/gimphelp.c | 3 +- app/widgets/gimpitemfactory.c | 4 +- app/widgets/gimppaletteeditor.c | 3 +- app/widgets/gimptoolbox-color-area.c | 1 - app/widgets/gimptoolbox-indicator-area.c | 4 +- app/widgets/gimptoolbox.c | 3 +- app/widgets/gimptooloptionseditor.c | 10 +- app/widgets/gimpwidgets-utils.c | 4 +- app/widgets/gimpwidgets-utils.h | 11 - configure.in | 2 + gimptool-1.2.in | 4 +- gimptool.in | 4 +- libgimp/Makefile.am | 91 +- libgimp/gimpchainbutton.c | 414 ------ libgimp/gimpchainbutton.h | 92 -- libgimp/gimpcolorarea.c | 523 -------- libgimp/gimpcolorarea.h | 81 -- libgimp/gimpcolorbutton.c | 477 ------- libgimp/gimpcolorbutton.h | 87 -- libgimp/gimpdialog.c | 365 ------ libgimp/gimpdialog.h | 90 -- libgimp/gimpfileselection.c | 459 ------- libgimp/gimpfileselection.h | 87 -- libgimp/gimphelpui.c | 409 ------ libgimp/gimphelpui.h | 62 - libgimp/gimppatheditor.c | 482 ------- libgimp/gimppatheditor.h | 81 -- libgimp/gimppixmap.c | 197 --- libgimp/gimppixmap.h | 65 - libgimp/gimpquerybox.c | 647 ---------- libgimp/gimpquerybox.h | 125 -- libgimp/gimpsizeentry.c | 1186 ----------------- libgimp/gimpsizeentry.h | 138 -- libgimp/gimpui.h | 14 +- libgimp/gimpuitypes.h | 20 +- libgimp/gimpunitmenu.c | 630 --------- libgimp/gimpunitmenu.h | 83 -- libgimp/gimpwidgets.c | 1404 --------------------- libgimp/gimpwidgets.h | 250 ---- libgimp/makefile.mingw.in | 26 +- libgimp/makefile.msc | 28 +- libgimpwidgets/gimpcolorarea.c | 7 +- libgimpwidgets/gimpcolorbutton.c | 9 +- libgimpwidgets/gimpcolorbutton.h | 3 +- libgimpwidgets/gimpcolorselect.c | 4 +- libgimpwidgets/gimpdialog.c | 3 +- libgimpwidgets/gimpfileentry.c | 3 +- libgimpwidgets/gimpfileselection.c | 3 +- libgimpwidgets/gimphelpui.c | 2 +- libgimpwidgets/gimppatheditor.c | 5 +- libgimpwidgets/gimpquerybox.c | 7 +- libgimpwidgets/gimpsizeentry.c | 29 +- libgimpwidgets/gimpunitmenu.c | 7 +- libgimpwidgets/gimpwidgets.c | 6 +- libgimpwidgets/gimpwidgets.def | 10 + libgimpwidgets/gimpwidgets.h | 16 + libgimpwidgets/gimpwidgetstypes.h | 61 + modules/colorsel_water.c | 2 +- plug-ins/FractalExplorer/Makefile.am | 9 +- plug-ins/Lighting/Makefile.am | 13 +- plug-ins/MapObject/Makefile.am | 13 +- plug-ins/bmp/Makefile.am | 9 +- plug-ins/common/Makefile.am | 1115 ++++++++-------- plug-ins/common/mkgen.pl | 17 +- plug-ins/dbbrowser/Makefile.am | 9 +- plug-ins/fits/Makefile.am | 9 +- plug-ins/flame/Makefile.am | 11 +- plug-ins/fp/Makefile.am | 9 +- plug-ins/gap/Makefile.am | 20 +- plug-ins/gdyntext/Makefile.am | 9 +- plug-ins/gfig/Makefile.am | 9 +- plug-ins/gflare/Makefile.am | 9 +- plug-ins/gfli/Makefile.am | 9 +- plug-ins/gimpressionist/Makefile.am | 9 +- plug-ins/helpbrowser/Makefile.am | 11 +- plug-ins/ifscompose/Makefile.am | 9 +- plug-ins/imagemap/Makefile.am | 9 +- plug-ins/maze/Makefile.am | 9 +- plug-ins/mosaic/Makefile.am | 9 +- plug-ins/pagecurl/Makefile.am | 11 +- plug-ins/print/Makefile.am | 9 +- plug-ins/rcm/Makefile.am | 9 +- plug-ins/script-fu/Makefile.am | 1 + plug-ins/sel2path/Makefile.am | 9 +- plug-ins/sgi/Makefile.am | 9 +- plug-ins/webbrowser/Makefile.am | 11 +- plug-ins/xjt/Makefile.am | 11 +- po-libgimp/POTFILES.in | 11 +- tools/pdbgen/pdb/misc_tools.pdb | 2 +- tools/pdbgen/pdb/paint_tools.pdb | 2 +- tools/pdbgen/pdb/palette.pdb | 2 +- tools/pdbgen/pdb/tools.pdb | 2 +- tools/pdbgen/pdb/transform_tools.pdb | 2 +- 324 files changed, 1768 insertions(+), 10021 deletions(-) delete mode 100644 libgimp/gimpchainbutton.c delete mode 100644 libgimp/gimpchainbutton.h delete mode 100644 libgimp/gimpcolorarea.c delete mode 100644 libgimp/gimpcolorarea.h delete mode 100644 libgimp/gimpcolorbutton.c delete mode 100644 libgimp/gimpcolorbutton.h delete mode 100644 libgimp/gimpdialog.c delete mode 100644 libgimp/gimpdialog.h delete mode 100644 libgimp/gimpfileselection.c delete mode 100644 libgimp/gimpfileselection.h delete mode 100644 libgimp/gimphelpui.c delete mode 100644 libgimp/gimphelpui.h delete mode 100644 libgimp/gimppatheditor.c delete mode 100644 libgimp/gimppatheditor.h delete mode 100644 libgimp/gimppixmap.c delete mode 100644 libgimp/gimppixmap.h delete mode 100644 libgimp/gimpquerybox.c delete mode 100644 libgimp/gimpquerybox.h delete mode 100644 libgimp/gimpsizeentry.c delete mode 100644 libgimp/gimpsizeentry.h delete mode 100644 libgimp/gimpunitmenu.c delete mode 100644 libgimp/gimpunitmenu.h delete mode 100644 libgimp/gimpwidgets.c delete mode 100644 libgimp/gimpwidgets.h create mode 100644 libgimpwidgets/gimpwidgets.def create mode 100644 libgimpwidgets/gimpwidgetstypes.h diff --git a/ChangeLog b/ChangeLog index 4ace0f35e4..3f278f2000 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,67 @@ +2001-01-24 Michael Natterer + + * Makefile.am + * configure.in + * gimptool.in: added the new library below. + + * libgimpwidgets/Makefile.am + * libgimpwidgets/gimpchainbutton.[ch] + * libgimpwidgets/gimpcolorarea.[ch] + * libgimpwidgets/gimpcolorbutton.[ch] + * libgimpwidgets/gimpdialog.[ch] + * libgimpwidgets/gimpfileselection.[ch] + * libgimpwidgets/gimphelpui.[ch] + * libgimpwidgets/gimppatheditor.[ch] + * libgimpwidgets/gimppixmap.[ch] + * libgimpwidgets/gimpquerybox.[ch] + * libgimpwidgets/gimpsizeentry.[ch] + * libgimpwidgets/gimpunitmenu.[ch] + * libgimpwidgets/gimpwidgets.[ch] + * libgimpwidgets/gimpwidgets.def + * libgimpwidgets/gimpwidgetstypes.h: new shared library. + + Currently there are some ugly dependencies into libgimp. These + will be removed and go to a "libgimpglue" library which will be + a library for functions which share a common interface between + plug-ins and the app but have different implementations. + + Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h" + to simulate this upcoming separation. + + * libgimp/Makefile.am + * libgimp/gimpchainbutton.[ch] + * libgimp/gimpcolorarea.[ch] + * libgimp/gimpcolorbutton.[ch] + * libgimp/gimpdialog.[ch] + * libgimp/gimpfileselection.[ch] + * libgimp/gimphelpui.[ch] + * libgimp/gimppatheditor.[ch] + * libgimp/gimppixmap.[ch] + * libgimp/gimpquerybox.[ch] + * libgimp/gimpsizeentry.[ch] + * libgimp/gimpunitmenu.[ch] + * libgimp/gimpwidgets.[ch]: removed from here. + + * libgimp/gimpui.h + * libgimp/gimpuitypes.h + * libgimp/makefile.mingw.in + * libgimp/makefile.msc: changed accordingly. + + * app/[all ui files] + * app/pdb/palette_cmds.c + * app/pdb/tools_cmds.c + * tools/pdbgen/pdb/palette.pdb + * tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h" + and removed useless includes. + + * app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h" + + * app/Makefile.am + * plug-ins/[all makefiles which link against libgimpui]: + link against libgimpwidgets.la + + * po-libgimp/POTFILES.in: changed file locations. + 2001-01-24 Simon Budig * plug-ins/common/colortoalpha.c: wrapped some actions in a diff --git a/Makefile.am b/Makefile.am index 42190caa9c..b7acdc09e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ SUBDIRS = \ intl \ libgimpmath \ libgimpcolor \ + libgimpwidgets \ libgimp \ app \ $(GIMP_PLUGINS) \ diff --git a/app/Makefile.am b/app/Makefile.am index 75af55585f..278be317f0 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -309,14 +309,15 @@ INCLUDES = \ -I$(includedir) gimp_LDADD = \ - pdb/libapppdb.la \ - tools/libapptools.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(top_builddir)/libgimpmath/libgimpmath.la \ - $(top_builddir)/libgimp/libgimpi.a \ - $(GTK_LIBS) \ - $(GIMP_THREAD_LIBS) \ - $(GIMP_MP_LIBS) \ + pdb/libapppdb.la \ + tools/libapptools.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(top_builddir)/libgimpmath/libgimpmath.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimpi.a \ + $(GTK_LIBS) \ + $(GIMP_THREAD_LIBS) \ + $(GIMP_MP_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/app/about_dialog.c b/app/about_dialog.c index 82f23178e7..f3f3287e23 100644 --- a/app/about_dialog.c +++ b/app/about_dialog.c @@ -27,11 +27,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "about_dialog.h" #include "appenv.h" +#include "about_dialog.h" #include "authors.h" #include "gimpdnd.h" #include "gimphelp.h" @@ -39,7 +40,6 @@ #include "libgimp/gimpfeatures.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/actions/help-commands.c b/app/actions/help-commands.c index 459c124c23..6889cef425 100644 --- a/app/actions/help-commands.c +++ b/app/actions/help-commands.c @@ -25,6 +25,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -80,8 +81,6 @@ #include "tools/tool_options_dialog.h" #include "tools/tools.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/actions/qmask-commands.c b/app/actions/qmask-commands.c index 84ea51d51e..a7c594e558 100644 --- a/app/actions/qmask-commands.c +++ b/app/actions/qmask-commands.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index 84ea51d51e..a7c594e558 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/app_procs.c b/app/app_procs.c index 47fa3c9092..1abf06b280 100644 --- a/app/app_procs.c +++ b/app/app_procs.c @@ -39,6 +39,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -59,7 +61,6 @@ #include "gimprc.h" #include "gimpparasite.h" #include "gimpset.h" -#include "gimpui.h" #include "global_edit.h" #include "gradient_select.h" #include "gradient.h" @@ -103,7 +104,6 @@ #include "libgimp/gimplimits.h" #include "libgimp/gimpfeatures.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/apptypes.h b/app/apptypes.h index fd936be847..2ad03dd6f4 100644 --- a/app/apptypes.h +++ b/app/apptypes.h @@ -22,11 +22,7 @@ #include "libgimpcolor/gimpcolortypes.h" #include "libgimpmath/gimpmathtypes.h" -#include "libgimp/gimpuitypes.h" - - -/* stuff that will go to general-purpose libraries */ -#include "libgimp/gimpunit.h" +#include "libgimpwidgets/gimpwidgetstypes.h" #include "undo_types.h" diff --git a/app/base/color-balance.c b/app/base/color-balance.c index 1a7786a3a7..3d4c72950a 100644 --- a/app/base/color-balance.c +++ b/app/base/color-balance.c @@ -22,11 +22,11 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "color_balance.h" #include "color_transfer.h" #include "drawable.h" #include "gdisplay.h" @@ -34,8 +34,10 @@ #include "gimpui.h" #include "image_map.h" #include "pixel_region.h" -#include "tools.h" + +#include "color_balance.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/base/curves.c b/app/base/curves.c index 512df1306f..61e1603c44 100644 --- a/app/base/curves.c +++ b/app/base/curves.c @@ -23,12 +23,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "cursorutil.h" -#include "curves.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -36,11 +36,12 @@ #include "gimpui.h" #include "gimplut.h" #include "image_map.h" -#include "tools.h" + +#include "curves.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/base/gimphistogram.c b/app/base/gimphistogram.c index 066976ce3a..539357a44f 100644 --- a/app/base/gimphistogram.c +++ b/app/base/gimphistogram.c @@ -27,6 +27,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -39,8 +40,6 @@ #include "gimprc.h" #include "pixel_processor.h" -#include - struct _GimpHistogram { diff --git a/app/base/hue-saturation.c b/app/base/hue-saturation.c index 17c0a3d8e9..6272735f3d 100644 --- a/app/base/hue-saturation.c +++ b/app/base/hue-saturation.c @@ -22,18 +22,19 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gimage_mask.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimpui.h" -#include "hue_saturation.h" #include "image_map.h" #include "pixel_region.h" + +#include "hue_saturation.h" #include "tools.h" #include "tool_options.h" diff --git a/app/base/threshold.c b/app/base/threshold.c index d0dcc39222..d25e235295 100644 --- a/app/base/threshold.c +++ b/app/base/threshold.c @@ -20,9 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -32,9 +33,10 @@ #include "image_map.h" #include "paint_funcs.h" #include "pixel_region.h" + #include "threshold.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/brush_edit.c b/app/brush_edit.c index 429fff6580..007a038fb9 100644 --- a/app/brush_edit.c +++ b/app/brush_edit.c @@ -25,17 +25,14 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gimpbrushgenerated.h" #include "brush_edit.h" -#include "gimpui.h" #include "temp_buf.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/brush_select.c b/app/brush_select.c index ff62d1345a..aea369cbe5 100644 --- a/app/brush_select.c +++ b/app/brush_select.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -36,7 +38,6 @@ #include "gimpdnd.h" #include "gimplist.h" #include "gimprc.h" -#include "gimpui.h" #include "session.h" #include "temp_buf.h" @@ -44,8 +45,6 @@ #include "pdb/procedural_db.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/channel_ops.c b/app/channel_ops.c index f4c0455e56..604dde2503 100644 --- a/app/channel_ops.c +++ b/app/channel_ops.c @@ -24,10 +24,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "apptypes.h" #include "channel_ops.h" #include "cursorutil.h" @@ -36,7 +36,6 @@ #include "gdisplay.h" #include "gimpcontext.h" #include "gimage.h" -#include "gimpui.h" #include "layer.h" #include "paint_funcs.h" #include "parasitelist.h" @@ -44,8 +43,6 @@ #include "pixel_region.h" #include "tile_manager.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/channels_dialog.c b/app/channels_dialog.c index 8a77afef93..e6c5540b80 100644 --- a/app/channels_dialog.c +++ b/app/channels_dialog.c @@ -23,6 +23,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -45,8 +46,6 @@ #include "paint_funcs.h" #include "undo.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" #include "pixmaps/eye.xbm" diff --git a/app/color_area.c b/app/color_area.c index 639c86b8e7..619b7fb943 100644 --- a/app/color_area.c +++ b/app/color_area.c @@ -30,7 +30,6 @@ #include "apptypes.h" -#include "appenv.h" #include "color_area.h" #include "color_notebook.h" #include "gdisplay.h" diff --git a/app/color_notebook.c b/app/color_notebook.c index 8a40806322..eee4c2e414 100644 --- a/app/color_notebook.c +++ b/app/color_notebook.c @@ -29,16 +29,14 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "color_area.h" #include "color_notebook.h" #include "colormaps.h" -#include "gimpui.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimpcolorarea.h" #include "libgimp/gimpcolorselector.h" #include "libgimp/gimpintl.h" diff --git a/app/color_panel.h b/app/color_panel.h index 20ea0259ae..7d7fa5fb68 100644 --- a/app/color_panel.h +++ b/app/color_panel.h @@ -20,7 +20,7 @@ #define __COLOR_PANEL_H__ -#include "libgimp/gimpcolorbutton.h" +#include "libgimpwidgets/gimpcolorbutton.h" #define GIMP_TYPE_COLOR_PANEL (gimp_color_panel_get_type ()) diff --git a/app/color_select.c b/app/color_select.c index 815bed9da8..ede552b439 100644 --- a/app/color_select.c +++ b/app/color_select.c @@ -26,20 +26,18 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_select.h" #include "colormaps.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "session.h" #include "color_area.h" #include "libgimp/gimpcolorselector.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/colormap_dialog.c b/app/colormap_dialog.c index 60fa9f18a8..a2acba078e 100644 --- a/app/colormap_dialog.c +++ b/app/colormap_dialog.c @@ -27,6 +27,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -40,12 +41,9 @@ #include "gimpdnd.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "pdb/procedural_db.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" @@ -65,8 +63,8 @@ enum }; -static void gimp_colormap_dialog_class_init (GimpColormapDialogClass* klass); -static void gimp_colormap_dialog_init (GimpColormapDialog* colormap_dialog); +static void gimp_colormap_dialog_class_init (GimpColormapDialogClass *klass); +static void gimp_colormap_dialog_init (GimpColormapDialog *colormap_dialog); static void ipal_create_popup_menu (GimpColormapDialog *ipal); diff --git a/app/commands.c b/app/commands.c index 459c124c23..6889cef425 100644 --- a/app/commands.c +++ b/app/commands.c @@ -25,6 +25,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -80,8 +81,6 @@ #include "tools/tool_options_dialog.h" #include "tools/tools.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/convert.c b/app/convert.c index a625bf20d3..144cf3c764 100644 --- a/app/convert.c +++ b/app/convert.c @@ -93,10 +93,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "convert.h" #include "cursorutil.h" #include "drawable.h" @@ -104,7 +104,6 @@ #include "fsdither.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "layer.h" #include "undo.h" #include "palette.h" @@ -121,8 +120,6 @@ #include "tools/posterize.h" #include "tools/threshold.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index 19f9a6dd1a..f5ccc65043 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -32,7 +34,6 @@ #include "gimage.h" #include "gimage_mask.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "layer.h" #include "paint_funcs.h" diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c index 768b9e808e..8ddd08f91f 100644 --- a/app/core/gimpdrawable-blend.c +++ b/app/core/gimpdrawable-blend.c @@ -24,6 +24,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -41,7 +42,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimpprogress.h" -#include "gimpui.h" #include "gradient.h" #include "paint_funcs.h" #include "paint_options.h" diff --git a/app/core/gimpdrawable-offset.c b/app/core/gimpdrawable-offset.c index f4c0455e56..604dde2503 100644 --- a/app/core/gimpdrawable-offset.c +++ b/app/core/gimpdrawable-offset.c @@ -24,10 +24,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "apptypes.h" #include "channel_ops.h" #include "cursorutil.h" @@ -36,7 +36,6 @@ #include "gdisplay.h" #include "gimpcontext.h" #include "gimage.h" -#include "gimpui.h" #include "layer.h" #include "paint_funcs.h" #include "parasitelist.h" @@ -44,8 +43,6 @@ #include "pixel_region.h" #include "tile_manager.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/core/gimpedit.c b/app/core/gimpedit.c index 19f9a6dd1a..f5ccc65043 100644 --- a/app/core/gimpedit.c +++ b/app/core/gimpedit.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -32,7 +34,6 @@ #include "gimage.h" #include "gimage_mask.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "layer.h" #include "paint_funcs.h" diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c index a625bf20d3..144cf3c764 100644 --- a/app/core/gimpimage-convert.c +++ b/app/core/gimpimage-convert.c @@ -93,10 +93,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "convert.h" #include "cursorutil.h" #include "drawable.h" @@ -104,7 +104,6 @@ #include "fsdither.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "layer.h" #include "undo.h" #include "palette.h" @@ -121,8 +120,6 @@ #include "tools/posterize.h" #include "tools/threshold.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/core/gimpimage-duplicate.c b/app/core/gimpimage-duplicate.c index f4c0455e56..604dde2503 100644 --- a/app/core/gimpimage-duplicate.c +++ b/app/core/gimpimage-duplicate.c @@ -24,10 +24,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "apptypes.h" #include "channel_ops.h" #include "cursorutil.h" @@ -36,7 +36,6 @@ #include "gdisplay.h" #include "gimpcontext.h" #include "gimage.h" -#include "gimpui.h" #include "layer.h" #include "paint_funcs.h" #include "parasitelist.h" @@ -44,8 +43,6 @@ #include "pixel_region.h" #include "tile_manager.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/core/gimpimage-qmask.c b/app/core/gimpimage-qmask.c index 84ea51d51e..a7c594e558 100644 --- a/app/core/gimpimage-qmask.c +++ b/app/core/gimpimage-qmask.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/core/gimpimage-quick-mask.c b/app/core/gimpimage-quick-mask.c index 84ea51d51e..a7c594e558 100644 --- a/app/core/gimpimage-quick-mask.c +++ b/app/core/gimpimage-quick-mask.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/devices.c b/app/devices.c index 58cc442536..6f6e910fe9 100644 --- a/app/devices.c +++ b/app/devices.c @@ -24,6 +24,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -36,7 +37,6 @@ #include "gimpbrushlist.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "patterns.h" @@ -45,8 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimpcolorarea.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c index 82f23178e7..f3f3287e23 100644 --- a/app/dialogs/about-dialog.c +++ b/app/dialogs/about-dialog.c @@ -27,11 +27,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "about_dialog.h" #include "appenv.h" +#include "about_dialog.h" #include "authors.h" #include "gimpdnd.h" #include "gimphelp.h" @@ -39,7 +40,6 @@ #include "libgimp/gimpfeatures.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/dialogs/color-dialog.c b/app/dialogs/color-dialog.c index 8a40806322..eee4c2e414 100644 --- a/app/dialogs/color-dialog.c +++ b/app/dialogs/color-dialog.c @@ -29,16 +29,14 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "color_area.h" #include "color_notebook.h" #include "colormaps.h" -#include "gimpui.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimpcolorarea.h" #include "libgimp/gimpcolorselector.h" #include "libgimp/gimpintl.h" diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index cb3115751e..6a926f410c 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -21,19 +21,16 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "image_new.h" #include "file_new_dialog.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" -#include "libgimp/gimpchainbutton.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/dialogs/info-dialog.c b/app/dialogs/info-dialog.c index 9eb0a86007..16fdf48bde 100644 --- a/app/dialogs/info-dialog.c +++ b/app/dialogs/info-dialog.c @@ -15,18 +15,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "config.h" #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "dialog_handler.h" #include "gimprc.h" -#include "gimpui.h" #include "info_dialog.h" #include "session.h" @@ -34,10 +35,19 @@ /* static functions */ -static void info_field_new (InfoDialog *, InfoFieldType, char *, GtkWidget *, - GtkObject *, void *, GtkSignalFunc, gpointer); -static void update_field (InfoField *); -static gint info_dialog_delete_callback (GtkWidget *, GdkEvent *, gpointer); +static void info_field_new (InfoDialog *idialog, + InfoFieldType field_type, + gchar *title, + GtkWidget *widget, + GtkObject *object, + gpointer value_ptr, + GtkSignalFunc callback, + gpointer client_data); +static void update_field (InfoField *info_field); +static gint info_dialog_delete_callback (GtkWidget *widget, + GdkEvent *event, + gpointer data); + static void info_field_new (InfoDialog *idialog, diff --git a/app/dialogs/info-window.c b/app/dialogs/info-window.c index e9b7eca285..c0bd7039b2 100644 --- a/app/dialogs/info-window.c +++ b/app/dialogs/info-window.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -28,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "info_dialog.h" #include "info_window.h" @@ -36,8 +37,6 @@ #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" diff --git a/app/dialogs/module-dialog.c b/app/dialogs/module-dialog.c index b4332f2b1b..bc93b7a5a7 100644 --- a/app/dialogs/module-dialog.c +++ b/app/dialogs/module-dialog.c @@ -33,6 +33,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -40,7 +42,6 @@ #include "gimprc.h" #include "datafiles.h" #include "gimpset.h" -#include "gimpui.h" #include "libgimp/gimpenv.h" #include "libgimp/gimpmodule.h" diff --git a/app/dialogs/palette-import-dialog.c b/app/dialogs/palette-import-dialog.c index 730de5a771..9f10138c92 100644 --- a/app/dialogs/palette-import-dialog.c +++ b/app/dialogs/palette-import-dialog.c @@ -21,6 +21,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -29,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimppalette.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "gradient_select.h" diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index 333b76d30a..4ade89ad38 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -23,10 +23,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "colormaps.h" #include "context_manager.h" #include "cursorutil.h" @@ -35,7 +35,6 @@ #include "gimage.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "image_render.h" #include "layer.h" #include "lc_dialog.h" diff --git a/app/dialogs/resize-dialog.c b/app/dialogs/resize-dialog.c index e55c162f4d..84eaf99fa8 100644 --- a/app/dialogs/resize-dialog.c +++ b/app/dialogs/resize-dialog.c @@ -21,21 +21,18 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" -#include "layer.h" #include "gdisplay.h" #include "gimpimage.h" +#include "gimprc.h" +#include "layer.h" #include "resize.h" #include "undo.h" -#include "gimprc.h" -#include "gimpui.h" -#include "libgimp/gimpchainbutton.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/dialogs/resolution-calibrate-dialog.c b/app/dialogs/resolution-calibrate-dialog.c index e83ddb76db..31b2856f3c 100644 --- a/app/dialogs/resolution-calibrate-dialog.c +++ b/app/dialogs/resolution-calibrate-dialog.c @@ -21,13 +21,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" diff --git a/app/dialogs/tips-dialog.c b/app/dialogs/tips-dialog.c index ed538bc748..8f66117b53 100644 --- a/app/dialogs/tips-dialog.c +++ b/app/dialogs/tips-dialog.c @@ -25,11 +25,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "tips_dialog.h" #include "gimprc.h" -#include "gimpui.h" +#include "tips_dialog.h" #include "libgimp/gimpenv.h" @@ -38,19 +39,26 @@ #include "wilber.h" -#define TIPS_DIR_NAME "tips" +#define TIPS_DIR_NAME "tips" -static void tips_dialog_destroy (GtkWidget *widget, gpointer data); -static void tips_show_previous (GtkWidget *widget, gpointer data); -static void tips_show_next (GtkWidget *widget, gpointer data); -static void tips_toggle_update (GtkWidget *widget, gpointer data); -static void read_tips_file (gchar *filename); -static GtkWidget *tips_dialog = NULL; -static GtkWidget *tips_label; -static gchar **tips_text = NULL; -static gint tips_count = 0; -static gint old_show_tips; +static void tips_dialog_destroy (GtkWidget *widget, + gpointer data); +static void tips_show_previous (GtkWidget *widget, + gpointer data); +static void tips_show_next (GtkWidget *widget, + gpointer data); +static void tips_toggle_update (GtkWidget *widget, + gpointer data); +static void read_tips_file (gchar *filename); + + +static GtkWidget *tips_dialog = NULL; +static GtkWidget *tips_label = NULL; +static gchar **tips_text = NULL; +static gint tips_count = 0; +static gint old_show_tips = 0; + void tips_dialog_create (void) diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index bd629a37a1..aeb24deef0 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -30,13 +30,13 @@ #endif #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" #include "user_install.h" diff --git a/app/display/gimpdisplay-ops.c b/app/display/gimpdisplay-ops.c index 17481c5eda..ef18705127 100644 --- a/app/display/gimpdisplay-ops.c +++ b/app/display/gimpdisplay-ops.c @@ -20,18 +20,16 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "colormaps.h" #include "cursorutil.h" #include "gdisplay_ops.h" #include "gimpimage.h" -#include "gimpui.h" #include "gimprc.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c index 20e6c2c81c..cfa793ef6b 100644 --- a/app/display/gimpdisplayshell-draw.c +++ b/app/display/gimpdisplayshell-draw.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "disp_callbacks.h" @@ -28,7 +30,6 @@ #include "gimphelp.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "interface.h" #include "menus.h" #include "nav_window.h" diff --git a/app/display/gimpdisplayshell-qmask.c b/app/display/gimpdisplayshell-qmask.c index 84ea51d51e..a7c594e558 100644 --- a/app/display/gimpdisplayshell-qmask.c +++ b/app/display/gimpdisplayshell-qmask.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index 20e6c2c81c..cfa793ef6b 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "disp_callbacks.h" @@ -28,7 +30,6 @@ #include "gimphelp.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "interface.h" #include "menus.h" #include "nav_window.h" diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c index 7f59307e6b..a7efaf49e2 100644 --- a/app/display/gimpnavigationeditor.c +++ b/app/display/gimpnavigationeditor.c @@ -23,6 +23,8 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -36,15 +38,12 @@ #include "gimppreviewcache.h" #include "gimpset.h" #include "gimprc.h" -#include "gimpui.h" #include "nav_window.h" #include "scroll.h" #include "scale.h" #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" #include "pixmaps/zoom_in.xpm" diff --git a/app/display/gimpnavigationview.c b/app/display/gimpnavigationview.c index 7f59307e6b..a7efaf49e2 100644 --- a/app/display/gimpnavigationview.c +++ b/app/display/gimpnavigationview.c @@ -23,6 +23,8 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -36,15 +38,12 @@ #include "gimppreviewcache.h" #include "gimpset.h" #include "gimprc.h" -#include "gimpui.h" #include "nav_window.h" #include "scroll.h" #include "scale.h" #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" #include "pixmaps/zoom_in.xpm" diff --git a/app/display/gimpprogress.c b/app/display/gimpprogress.c index 5bc20dadbd..1a4f7c8c86 100644 --- a/app/display/gimpprogress.c +++ b/app/display/gimpprogress.c @@ -20,12 +20,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "gdisplay.h" #include "gimpprogress.h" -#include "gimpui.h" #include "libgimp/gimpintl.h" diff --git a/app/docindex.c b/app/docindex.c index bed7778c3e..c67218e9a4 100644 --- a/app/docindex.c +++ b/app/docindex.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "dialog_handler.h" @@ -29,13 +31,11 @@ #include "fileops.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "gimpdnd.h" #include "ops_buttons.h" #include "session.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/errorconsole.c b/app/errorconsole.c index cb8451d2e5..6f70819cb8 100644 --- a/app/errorconsole.c +++ b/app/errorconsole.c @@ -49,16 +49,15 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "commands.h" -#include "gimpui.h" #include "session.h" #include "dialog_handler.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/file_new_dialog.c b/app/file_new_dialog.c index cb3115751e..6a926f410c 100644 --- a/app/file_new_dialog.c +++ b/app/file_new_dialog.c @@ -21,19 +21,16 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "image_new.h" #include "file_new_dialog.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" -#include "libgimp/gimpchainbutton.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/fileops.c b/app/fileops.c index 286994fc92..264c5fe77e 100644 --- a/app/fileops.c +++ b/app/fileops.c @@ -62,10 +62,10 @@ #endif #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "cursorutil.h" #include "dialog_handler.h" @@ -85,8 +85,6 @@ #include "temp_buf.h" #include "undo.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gdisplay_ops.c b/app/gdisplay_ops.c index 17481c5eda..ef18705127 100644 --- a/app/gdisplay_ops.c +++ b/app/gdisplay_ops.c @@ -20,18 +20,16 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "colormaps.h" #include "cursorutil.h" #include "gdisplay_ops.h" #include "gimpimage.h" -#include "gimpui.h" #include "gimprc.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gimpcontextpreview.c b/app/gimpcontextpreview.c index c8f96c9fa6..34eac50545 100644 --- a/app/gimpcontextpreview.c +++ b/app/gimpcontextpreview.c @@ -25,9 +25,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "brush_scale.h" #include "gimpbrush.h" #include "gimpbrushpipe.h" @@ -38,7 +39,6 @@ #include "patterns.h" #include "temp_buf.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimplimits.h" diff --git a/app/gimpdnd.c b/app/gimpdnd.c index fa6e23c76f..52e5e18f95 100644 --- a/app/gimpdnd.c +++ b/app/gimpdnd.c @@ -23,6 +23,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -44,7 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpcolorarea.h" #define DRAG_PREVIEW_SIZE 32 diff --git a/app/gimpdrawable-offset.c b/app/gimpdrawable-offset.c index f4c0455e56..604dde2503 100644 --- a/app/gimpdrawable-offset.c +++ b/app/gimpdrawable-offset.c @@ -24,10 +24,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "apptypes.h" #include "channel_ops.h" #include "cursorutil.h" @@ -36,7 +36,6 @@ #include "gdisplay.h" #include "gimpcontext.h" #include "gimage.h" -#include "gimpui.h" #include "layer.h" #include "paint_funcs.h" #include "parasitelist.h" @@ -44,8 +43,6 @@ #include "pixel_region.h" #include "tile_manager.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gimphelp.c b/app/gimphelp.c index c17a75b620..92f6094de5 100644 --- a/app/gimphelp.c +++ b/app/gimphelp.c @@ -31,6 +31,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimphelp.h" @@ -39,7 +41,6 @@ #include "plug_in.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gimphistogram.c b/app/gimphistogram.c index 066976ce3a..539357a44f 100644 --- a/app/gimphistogram.c +++ b/app/gimphistogram.c @@ -27,6 +27,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -39,8 +40,6 @@ #include "gimprc.h" #include "pixel_processor.h" -#include - struct _GimpHistogram { diff --git a/app/gimpimage-convert.c b/app/gimpimage-convert.c index a625bf20d3..144cf3c764 100644 --- a/app/gimpimage-convert.c +++ b/app/gimpimage-convert.c @@ -93,10 +93,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "convert.h" #include "cursorutil.h" #include "drawable.h" @@ -104,7 +104,6 @@ #include "fsdither.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "layer.h" #include "undo.h" #include "palette.h" @@ -121,8 +120,6 @@ #include "tools/posterize.h" #include "tools/threshold.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gimpimage-duplicate.c b/app/gimpimage-duplicate.c index f4c0455e56..604dde2503 100644 --- a/app/gimpimage-duplicate.c +++ b/app/gimpimage-duplicate.c @@ -24,10 +24,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "apptypes.h" #include "channel_ops.h" #include "cursorutil.h" @@ -36,7 +36,6 @@ #include "gdisplay.h" #include "gimpcontext.h" #include "gimage.h" -#include "gimpui.h" #include "layer.h" #include "paint_funcs.h" #include "parasitelist.h" @@ -44,8 +43,6 @@ #include "pixel_region.h" #include "tile_manager.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gimpprogress.c b/app/gimpprogress.c index 5bc20dadbd..1a4f7c8c86 100644 --- a/app/gimpprogress.c +++ b/app/gimpprogress.c @@ -20,12 +20,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "gdisplay.h" #include "gimpprogress.h" -#include "gimpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gimpui.c b/app/gimpui.c index 10428166a4..f3e57eeb74 100644 --- a/app/gimpui.c +++ b/app/gimpui.c @@ -25,12 +25,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimpui.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gimpui.h b/app/gimpui.h index dcad168d00..95eea73e6c 100644 --- a/app/gimpui.h +++ b/app/gimpui.h @@ -23,17 +23,6 @@ #define __GIMP_UI_H__ -#include "libgimp/gimpchainbutton.h" -#include "libgimp/gimpdialog.h" -#include "libgimp/gimpfileselection.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimppixmap.h" -#include "libgimp/gimppatheditor.h" -#include "libgimp/gimpquerybox.h" -#include "libgimp/gimpsizeentry.h" -#include "libgimp/gimpwidgets.h" - - /* a simple message box */ void gimp_message_box (gchar *message, diff --git a/app/global_edit.c b/app/global_edit.c index 19f9a6dd1a..f5ccc65043 100644 --- a/app/global_edit.c +++ b/app/global_edit.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -32,7 +34,6 @@ #include "gimage.h" #include "gimage_mask.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "layer.h" #include "paint_funcs.h" diff --git a/app/gradient.c b/app/gradient.c index 51b8067d9a..f26105a67b 100644 --- a/app/gradient.c +++ b/app/gradient.c @@ -59,10 +59,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_notebook.h" #include "cursorutil.h" #include "datafiles.h" @@ -70,7 +70,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradientP.h" #include "gradient_header.h" diff --git a/app/gradient_editor.c b/app/gradient_editor.c index 51b8067d9a..f26105a67b 100644 --- a/app/gradient_editor.c +++ b/app/gradient_editor.c @@ -59,10 +59,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_notebook.h" #include "cursorutil.h" #include "datafiles.h" @@ -70,7 +70,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradientP.h" #include "gradient_header.h" diff --git a/app/gradient_select.c b/app/gradient_select.c index 415ae844fb..ad2129f5cc 100644 --- a/app/gradient_select.c +++ b/app/gradient_select.c @@ -38,13 +38,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "dialog_handler.h" #include "gimpcontext.h" #include "gimpdnd.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "gradientP.h" diff --git a/app/gui/about-dialog.c b/app/gui/about-dialog.c index 82f23178e7..f3f3287e23 100644 --- a/app/gui/about-dialog.c +++ b/app/gui/about-dialog.c @@ -27,11 +27,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "about_dialog.h" #include "appenv.h" +#include "about_dialog.h" #include "authors.h" #include "gimpdnd.h" #include "gimphelp.h" @@ -39,7 +40,6 @@ #include "libgimp/gimpfeatures.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/brush-editor.c b/app/gui/brush-editor.c index 429fff6580..007a038fb9 100644 --- a/app/gui/brush-editor.c +++ b/app/gui/brush-editor.c @@ -25,17 +25,14 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gimpbrushgenerated.h" #include "brush_edit.h" -#include "gimpui.h" #include "temp_buf.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gui/brush-select.c b/app/gui/brush-select.c index ff62d1345a..aea369cbe5 100644 --- a/app/gui/brush-select.c +++ b/app/gui/brush-select.c @@ -22,6 +22,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -36,7 +38,6 @@ #include "gimpdnd.h" #include "gimplist.h" #include "gimprc.h" -#include "gimpui.h" #include "session.h" #include "temp_buf.h" @@ -44,8 +45,6 @@ #include "pdb/procedural_db.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gui/channels-dialog.c b/app/gui/channels-dialog.c index 8a77afef93..e6c5540b80 100644 --- a/app/gui/channels-dialog.c +++ b/app/gui/channels-dialog.c @@ -23,6 +23,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -45,8 +46,6 @@ #include "paint_funcs.h" #include "undo.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" #include "pixmaps/eye.xbm" diff --git a/app/gui/color-area.c b/app/gui/color-area.c index 639c86b8e7..619b7fb943 100644 --- a/app/gui/color-area.c +++ b/app/gui/color-area.c @@ -30,7 +30,6 @@ #include "apptypes.h" -#include "appenv.h" #include "color_area.h" #include "color_notebook.h" #include "gdisplay.h" diff --git a/app/gui/color-notebook.c b/app/gui/color-notebook.c index 8a40806322..eee4c2e414 100644 --- a/app/gui/color-notebook.c +++ b/app/gui/color-notebook.c @@ -29,16 +29,14 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "color_area.h" #include "color_notebook.h" #include "colormaps.h" -#include "gimpui.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimpcolorarea.h" #include "libgimp/gimpcolorselector.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/color-select.c b/app/gui/color-select.c index 815bed9da8..ede552b439 100644 --- a/app/gui/color-select.c +++ b/app/gui/color-select.c @@ -26,20 +26,18 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_select.h" #include "colormaps.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "session.h" #include "color_area.h" #include "libgimp/gimpcolorselector.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/colormap-dialog.c b/app/gui/colormap-dialog.c index 60fa9f18a8..a2acba078e 100644 --- a/app/gui/colormap-dialog.c +++ b/app/gui/colormap-dialog.c @@ -27,6 +27,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -40,12 +41,9 @@ #include "gimpdnd.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "pdb/procedural_db.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" @@ -65,8 +63,8 @@ enum }; -static void gimp_colormap_dialog_class_init (GimpColormapDialogClass* klass); -static void gimp_colormap_dialog_init (GimpColormapDialog* colormap_dialog); +static void gimp_colormap_dialog_class_init (GimpColormapDialogClass *klass); +static void gimp_colormap_dialog_init (GimpColormapDialog *colormap_dialog); static void ipal_create_popup_menu (GimpColormapDialog *ipal); diff --git a/app/gui/commands.c b/app/gui/commands.c index 459c124c23..6889cef425 100644 --- a/app/gui/commands.c +++ b/app/gui/commands.c @@ -25,6 +25,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -80,8 +81,6 @@ #include "tools/tool_options_dialog.h" #include "tools/tools.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gui/device-status-dialog.c b/app/gui/device-status-dialog.c index 58cc442536..6f6e910fe9 100644 --- a/app/gui/device-status-dialog.c +++ b/app/gui/device-status-dialog.c @@ -24,6 +24,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -36,7 +37,6 @@ #include "gimpbrushlist.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "patterns.h" @@ -45,8 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimpcolorarea.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index cb3115751e..6a926f410c 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -21,19 +21,16 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "image_new.h" #include "file_new_dialog.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" -#include "libgimp/gimpchainbutton.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/gradient-editor.c b/app/gui/gradient-editor.c index 51b8067d9a..f26105a67b 100644 --- a/app/gui/gradient-editor.c +++ b/app/gui/gradient-editor.c @@ -59,10 +59,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_notebook.h" #include "cursorutil.h" #include "datafiles.h" @@ -70,7 +70,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradientP.h" #include "gradient_header.h" diff --git a/app/gui/gradient-select.c b/app/gui/gradient-select.c index 415ae844fb..ad2129f5cc 100644 --- a/app/gui/gradient-select.c +++ b/app/gui/gradient-select.c @@ -38,13 +38,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "dialog_handler.h" #include "gimpcontext.h" #include "gimpdnd.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "gradientP.h" diff --git a/app/gui/help-commands.c b/app/gui/help-commands.c index 459c124c23..6889cef425 100644 --- a/app/gui/help-commands.c +++ b/app/gui/help-commands.c @@ -25,6 +25,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -80,8 +81,6 @@ #include "tools/tool_options_dialog.h" #include "tools/tools.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/gui/indicator-area.c b/app/gui/indicator-area.c index d7ea146a42..d4c8d89fcb 100644 --- a/app/gui/indicator-area.c +++ b/app/gui/indicator-area.c @@ -23,14 +23,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "brush_select.h" #include "gimpcontext.h" #include "gimpcontextpreview.h" #include "gimpdnd.h" -#include "gimpui.h" #include "gradient_select.h" #include "indicator_area.h" #include "pattern_select.h" diff --git a/app/gui/info-dialog.c b/app/gui/info-dialog.c index 9eb0a86007..16fdf48bde 100644 --- a/app/gui/info-dialog.c +++ b/app/gui/info-dialog.c @@ -15,18 +15,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "config.h" #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "dialog_handler.h" #include "gimprc.h" -#include "gimpui.h" #include "info_dialog.h" #include "session.h" @@ -34,10 +35,19 @@ /* static functions */ -static void info_field_new (InfoDialog *, InfoFieldType, char *, GtkWidget *, - GtkObject *, void *, GtkSignalFunc, gpointer); -static void update_field (InfoField *); -static gint info_dialog_delete_callback (GtkWidget *, GdkEvent *, gpointer); +static void info_field_new (InfoDialog *idialog, + InfoFieldType field_type, + gchar *title, + GtkWidget *widget, + GtkObject *object, + gpointer value_ptr, + GtkSignalFunc callback, + gpointer client_data); +static void update_field (InfoField *info_field); +static gint info_dialog_delete_callback (GtkWidget *widget, + GdkEvent *event, + gpointer data); + static void info_field_new (InfoDialog *idialog, diff --git a/app/gui/info-window.c b/app/gui/info-window.c index e9b7eca285..c0bd7039b2 100644 --- a/app/gui/info-window.c +++ b/app/gui/info-window.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -28,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "info_dialog.h" #include "info_window.h" @@ -36,8 +37,6 @@ #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" diff --git a/app/gui/input-dialog.c b/app/gui/input-dialog.c index 58cc442536..6f6e910fe9 100644 --- a/app/gui/input-dialog.c +++ b/app/gui/input-dialog.c @@ -24,6 +24,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -36,7 +37,6 @@ #include "gimpbrushlist.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "patterns.h" @@ -45,8 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimpcolorarea.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 0a879159ff..67b875840f 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -22,6 +22,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -34,7 +35,6 @@ #include "gimage_mask.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "image_render.h" #include "layer.h" #include "layers_dialog.h" @@ -48,7 +48,6 @@ #include "undo.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/menus.c b/app/gui/menus.c index fe52ec7396..766ef97c03 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -24,9 +24,10 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channels_dialog.h" #include "commands.h" #include "dialog_handler.h" @@ -34,7 +35,6 @@ #include "gdisplay.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "layers_dialog.h" #include "menus.h" #include "paths_dialog.h" diff --git a/app/gui/module-browser.c b/app/gui/module-browser.c index b4332f2b1b..bc93b7a5a7 100644 --- a/app/gui/module-browser.c +++ b/app/gui/module-browser.c @@ -33,6 +33,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -40,7 +42,6 @@ #include "gimprc.h" #include "datafiles.h" #include "gimpset.h" -#include "gimpui.h" #include "libgimp/gimpenv.h" #include "libgimp/gimpmodule.h" diff --git a/app/gui/palette-editor.c b/app/gui/palette-editor.c index a65c04dd1e..cd7aa8922c 100644 --- a/app/gui/palette-editor.c +++ b/app/gui/palette-editor.c @@ -25,6 +25,8 @@ #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "color_area.h" @@ -36,7 +38,6 @@ #include "gimpdnd.h" #include "gimppalette.h" #include "gimprc.h" -#include "gimpui.h" #include "palette.h" #include "paletteP.h" #include "palette_import.h" diff --git a/app/gui/palette-import-dialog.c b/app/gui/palette-import-dialog.c index 730de5a771..9f10138c92 100644 --- a/app/gui/palette-import-dialog.c +++ b/app/gui/palette-import-dialog.c @@ -21,6 +21,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -29,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimppalette.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "gradient_select.h" diff --git a/app/gui/palette-select.c b/app/gui/palette-select.c index 3b69c69630..006e2ae363 100644 --- a/app/gui/palette-select.c +++ b/app/gui/palette-select.c @@ -21,10 +21,11 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimppalette.h" -#include "gimpui.h" #include "palette_select.h" #include "palette.h" #include "paletteP.h" diff --git a/app/gui/paths-dialog.c b/app/gui/paths-dialog.c index cecdd1b78b..fc95eef551 100644 --- a/app/gui/paths-dialog.c +++ b/app/gui/paths-dialog.c @@ -28,10 +28,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "floating_sel.h" @@ -42,7 +42,6 @@ #include "gdisplay.h" #include "gimprc.h" #include "gimpset.h" -#include "gimpui.h" #include "image_render.h" #include "lc_dialogP.h" #include "menus.h" diff --git a/app/gui/pattern-select.c b/app/gui/pattern-select.c index 8f56b83d2f..f9f7d3ac08 100644 --- a/app/gui/pattern-select.c +++ b/app/gui/pattern-select.c @@ -22,13 +22,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "dialog_handler.h" #include "gimpcontext.h" #include "gimpdnd.h" -#include "gimpui.h" #include "patterns.h" #include "pattern_select.h" #include "session.h" diff --git a/app/gui/preferences-dialog.c b/app/gui/preferences-dialog.c index 333b76d30a..4ade89ad38 100644 --- a/app/gui/preferences-dialog.c +++ b/app/gui/preferences-dialog.c @@ -23,10 +23,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "colormaps.h" #include "context_manager.h" #include "cursorutil.h" @@ -35,7 +35,6 @@ #include "gimage.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "image_render.h" #include "layer.h" #include "lc_dialog.h" diff --git a/app/gui/qmask-commands.c b/app/gui/qmask-commands.c index 84ea51d51e..a7c594e558 100644 --- a/app/gui/qmask-commands.c +++ b/app/gui/qmask-commands.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/gui/resize-dialog.c b/app/gui/resize-dialog.c index e55c162f4d..84eaf99fa8 100644 --- a/app/gui/resize-dialog.c +++ b/app/gui/resize-dialog.c @@ -21,21 +21,18 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" -#include "layer.h" #include "gdisplay.h" #include "gimpimage.h" +#include "gimprc.h" +#include "layer.h" #include "resize.h" #include "undo.h" -#include "gimprc.h" -#include "gimpui.h" -#include "libgimp/gimpchainbutton.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/gui/resolution-calibrate-dialog.c b/app/gui/resolution-calibrate-dialog.c index e83ddb76db..31b2856f3c 100644 --- a/app/gui/resolution-calibrate-dialog.c +++ b/app/gui/resolution-calibrate-dialog.c @@ -21,13 +21,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" diff --git a/app/gui/tips-dialog.c b/app/gui/tips-dialog.c index ed538bc748..8f66117b53 100644 --- a/app/gui/tips-dialog.c +++ b/app/gui/tips-dialog.c @@ -25,11 +25,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "tips_dialog.h" #include "gimprc.h" -#include "gimpui.h" +#include "tips_dialog.h" #include "libgimp/gimpenv.h" @@ -38,19 +39,26 @@ #include "wilber.h" -#define TIPS_DIR_NAME "tips" +#define TIPS_DIR_NAME "tips" -static void tips_dialog_destroy (GtkWidget *widget, gpointer data); -static void tips_show_previous (GtkWidget *widget, gpointer data); -static void tips_show_next (GtkWidget *widget, gpointer data); -static void tips_toggle_update (GtkWidget *widget, gpointer data); -static void read_tips_file (gchar *filename); -static GtkWidget *tips_dialog = NULL; -static GtkWidget *tips_label; -static gchar **tips_text = NULL; -static gint tips_count = 0; -static gint old_show_tips; +static void tips_dialog_destroy (GtkWidget *widget, + gpointer data); +static void tips_show_previous (GtkWidget *widget, + gpointer data); +static void tips_show_next (GtkWidget *widget, + gpointer data); +static void tips_toggle_update (GtkWidget *widget, + gpointer data); +static void read_tips_file (gchar *filename); + + +static GtkWidget *tips_dialog = NULL; +static GtkWidget *tips_label = NULL; +static gchar **tips_text = NULL; +static gint tips_count = 0; +static gint old_show_tips = 0; + void tips_dialog_create (void) diff --git a/app/gui/tool-options-dialog.c b/app/gui/tool-options-dialog.c index 18788fa1dd..cc72d9dd35 100644 --- a/app/gui/tool-options-dialog.c +++ b/app/gui/tool-options-dialog.c @@ -20,11 +20,9 @@ #include -#include "apptypes.h" +#include "libgimpwidgets/gimpwidgets.h" -#include "tool_options.h" -#include "tool_options_dialog.h" -#include "tools.h" +#include "apptypes.h" #include "dialog_handler.h" #include "gimpcontext.h" @@ -32,6 +30,10 @@ #include "gimpui.h" #include "session.h" +#include "tool_options.h" +#include "tool_options_dialog.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/gui/toolbox.c b/app/gui/toolbox.c index 2600e1a07f..066a6d868c 100644 --- a/app/gui/toolbox.c +++ b/app/gui/toolbox.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "app_procs.h" @@ -31,7 +33,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gtkhwrapbox.h" #include "indicator_area.h" #include "layer.h" diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index bd629a37a1..aeb24deef0 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -30,13 +30,13 @@ #endif #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" #include "user_install.h" diff --git a/app/indicator_area.c b/app/indicator_area.c index d7ea146a42..d4c8d89fcb 100644 --- a/app/indicator_area.c +++ b/app/indicator_area.c @@ -23,14 +23,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "brush_select.h" #include "gimpcontext.h" #include "gimpcontextpreview.h" #include "gimpdnd.h" -#include "gimpui.h" #include "gradient_select.h" #include "indicator_area.h" #include "pattern_select.h" diff --git a/app/info_dialog.c b/app/info_dialog.c index 9eb0a86007..16fdf48bde 100644 --- a/app/info_dialog.c +++ b/app/info_dialog.c @@ -15,18 +15,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "config.h" #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "dialog_handler.h" #include "gimprc.h" -#include "gimpui.h" #include "info_dialog.h" #include "session.h" @@ -34,10 +35,19 @@ /* static functions */ -static void info_field_new (InfoDialog *, InfoFieldType, char *, GtkWidget *, - GtkObject *, void *, GtkSignalFunc, gpointer); -static void update_field (InfoField *); -static gint info_dialog_delete_callback (GtkWidget *, GdkEvent *, gpointer); +static void info_field_new (InfoDialog *idialog, + InfoFieldType field_type, + gchar *title, + GtkWidget *widget, + GtkObject *object, + gpointer value_ptr, + GtkSignalFunc callback, + gpointer client_data); +static void update_field (InfoField *info_field); +static gint info_dialog_delete_callback (GtkWidget *widget, + GdkEvent *event, + gpointer data); + static void info_field_new (InfoDialog *idialog, diff --git a/app/info_window.c b/app/info_window.c index e9b7eca285..c0bd7039b2 100644 --- a/app/info_window.c +++ b/app/info_window.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -28,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "info_dialog.h" #include "info_window.h" @@ -36,8 +37,6 @@ #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" diff --git a/app/interface.c b/app/interface.c index 20e6c2c81c..cfa793ef6b 100644 --- a/app/interface.c +++ b/app/interface.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "disp_callbacks.h" @@ -28,7 +30,6 @@ #include "gimphelp.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "interface.h" #include "menus.h" #include "nav_window.h" diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 0a879159ff..67b875840f 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -22,6 +22,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -34,7 +35,6 @@ #include "gimage_mask.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "image_render.h" #include "layer.h" #include "layers_dialog.h" @@ -48,7 +48,6 @@ #include "undo.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/lc_dialog.c b/app/lc_dialog.c index 5ccc431fdd..6131770be7 100644 --- a/app/lc_dialog.c +++ b/app/lc_dialog.c @@ -21,6 +21,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -32,7 +33,6 @@ #include "gimppreviewcache.h" #include "gimprc.h" #include "gimpset.h" -#include "gimpui.h" #include "image_render.h" #include "lc_dialog.h" #include "lc_dialogP.h" diff --git a/app/menus.c b/app/menus.c index fe52ec7396..766ef97c03 100644 --- a/app/menus.c +++ b/app/menus.c @@ -24,9 +24,10 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channels_dialog.h" #include "commands.h" #include "dialog_handler.h" @@ -34,7 +35,6 @@ #include "gdisplay.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "layers_dialog.h" #include "menus.h" #include "paths_dialog.h" diff --git a/app/menus/menus.c b/app/menus/menus.c index fe52ec7396..766ef97c03 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -24,9 +24,10 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channels_dialog.h" #include "commands.h" #include "dialog_handler.h" @@ -34,7 +35,6 @@ #include "gdisplay.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "layers_dialog.h" #include "menus.h" #include "paths_dialog.h" diff --git a/app/module_db.c b/app/module_db.c index b4332f2b1b..bc93b7a5a7 100644 --- a/app/module_db.c +++ b/app/module_db.c @@ -33,6 +33,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -40,7 +42,6 @@ #include "gimprc.h" #include "datafiles.h" #include "gimpset.h" -#include "gimpui.h" #include "libgimp/gimpenv.h" #include "libgimp/gimpmodule.h" diff --git a/app/nav_window.c b/app/nav_window.c index 7f59307e6b..a7efaf49e2 100644 --- a/app/nav_window.c +++ b/app/nav_window.c @@ -23,6 +23,8 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" @@ -36,15 +38,12 @@ #include "gimppreviewcache.h" #include "gimpset.h" #include "gimprc.h" -#include "gimpui.h" #include "nav_window.h" #include "scroll.h" #include "scale.h" #include "pdb/procedural_db.h" -#include "libgimp/gimpunit.h" - #include "libgimp/gimpintl.h" #include "pixmaps/zoom_in.xpm" diff --git a/app/ops_buttons.c b/app/ops_buttons.c index 95e839c6c0..2b50a4d8a1 100644 --- a/app/ops_buttons.c +++ b/app/ops_buttons.c @@ -20,10 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "gimphelp.h" -#include "gimpui.h" #include "ops_buttons.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c index a1f0d8a5ee..8ca0a6fa9e 100644 --- a/app/paint/gimpairbrush.c +++ b/app/paint/gimpairbrush.c @@ -21,23 +21,24 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "airbrush.h" #include "drawable.h" #include "gdisplay.h" #include "gradient.h" #include "gimpimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" + +#include "airbrush.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c index 3c7ba8f8c9..09a52a59ce 100644 --- a/app/paint/gimpclone.c +++ b/app/paint/gimpclone.c @@ -23,26 +23,28 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" -#include "clone.h" #include "selection.h" #include "temp_buf.h" + +#include "clone.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "cursorutil.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c index d5d5d04375..638bce176b 100644 --- a/app/paint/gimpconvolve.c +++ b/app/paint/gimpconvolve.c @@ -21,23 +21,25 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "drawable.h" -#include "convolve.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "convolve.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpdodgeburn.c b/app/paint/gimpdodgeburn.c index 37cf0afb74..f52b1e4ef6 100644 --- a/app/paint/gimpdodgeburn.c +++ b/app/paint/gimpdodgeburn.c @@ -22,24 +22,24 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "dodgeburn.h" #include "gdisplay.h" +#include "gimage.h" #include "gimplut.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "dodgeburn.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimperaser.c b/app/paint/gimperaser.c index cf4b2477ec..7f122fb3c7 100644 --- a/app/paint/gimperaser.c +++ b/app/paint/gimperaser.c @@ -21,22 +21,23 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" -#include "eraser.h" #include "selection.h" #include "temp_buf.h" + +#include "eraser.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpink.c b/app/paint/gimpink.c index 4ead434b1a..16393327b4 100644 --- a/app/paint/gimpink.c +++ b/app/paint/gimpink.c @@ -24,22 +24,17 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "draw_core.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" -#include "ink.h" -#include "paint_options.h" -#include "tools.h" #include "undo.h" -#include "blob.h" #include "gdisplay.h" #include "paint_funcs.h" #include "pixel_region.h" @@ -47,6 +42,11 @@ #include "tile.h" #include "tile_manager.h" +#include "blob.h" +#include "ink.h" +#include "paint_options.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/paint/gimppencil.c b/app/paint/gimppencil.c index 213b375793..4cf8310aac 100644 --- a/app/paint/gimppencil.c +++ b/app/paint/gimppencil.c @@ -24,7 +24,6 @@ #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpbrush.h" @@ -32,14 +31,15 @@ #include "gimpimage.h" #include "gradient.h" #include "paint_funcs.h" +#include "selection.h" +#include "temp_buf.h" + #include "paint_core.h" #include "paint_options.h" #include "paintbrush.h" #include "pencil.h" -#include "selection.h" -#include "temp_buf.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #define PENCIL_INCREMENTAL_DEFAULT FALSE diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c index c544c8708a..a6aea8d5d5 100644 --- a/app/paint/gimpsmudge.c +++ b/app/paint/gimpsmudge.c @@ -22,13 +22,13 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "smudge.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpcontext.h" #include "gimpbrush.h" #include "gimplut.h" @@ -36,12 +36,13 @@ #include "paint_funcs.h" #include "paint_core.h" #include "pixel_region.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" -#include "tools.h" + +#include "paint_options.h" +#include "smudge.h" #include "tool_options.h" -#include "gimage.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/paint/gimpsourcecore.c b/app/paint/gimpsourcecore.c index 3c7ba8f8c9..09a52a59ce 100644 --- a/app/paint/gimpsourcecore.c +++ b/app/paint/gimpsourcecore.c @@ -23,26 +23,28 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" -#include "clone.h" #include "selection.h" #include "temp_buf.h" + +#include "clone.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "cursorutil.h" #include "libgimp/gimpintl.h" diff --git a/app/palette.c b/app/palette.c index a65c04dd1e..cd7aa8922c 100644 --- a/app/palette.c +++ b/app/palette.c @@ -25,6 +25,8 @@ #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "color_area.h" @@ -36,7 +38,6 @@ #include "gimpdnd.h" #include "gimppalette.h" #include "gimprc.h" -#include "gimpui.h" #include "palette.h" #include "paletteP.h" #include "palette_import.h" diff --git a/app/palette_import.c b/app/palette_import.c index 730de5a771..9f10138c92 100644 --- a/app/palette_import.c +++ b/app/palette_import.c @@ -21,6 +21,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -29,7 +30,6 @@ #include "gimpcontext.h" #include "gimpimage.h" #include "gimppalette.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "gradient_select.h" diff --git a/app/palette_select.c b/app/palette_select.c index 3b69c69630..006e2ae363 100644 --- a/app/palette_select.c +++ b/app/palette_select.c @@ -21,10 +21,11 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimppalette.h" -#include "gimpui.h" #include "palette_select.h" #include "palette.h" #include "paletteP.h" diff --git a/app/paths_dialog.c b/app/paths_dialog.c index cecdd1b78b..fc95eef551 100644 --- a/app/paths_dialog.c +++ b/app/paths_dialog.c @@ -28,10 +28,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "floating_sel.h" @@ -42,7 +42,6 @@ #include "gdisplay.h" #include "gimprc.h" #include "gimpset.h" -#include "gimpui.h" #include "image_render.h" #include "lc_dialogP.h" #include "menus.h" diff --git a/app/pattern_select.c b/app/pattern_select.c index 8f56b83d2f..f9f7d3ac08 100644 --- a/app/pattern_select.c +++ b/app/pattern_select.c @@ -22,13 +22,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "dialog_handler.h" #include "gimpcontext.h" #include "gimpdnd.h" -#include "gimpui.h" #include "patterns.h" #include "pattern_select.h" #include "session.h" diff --git a/app/pdb/palette_cmds.c b/app/pdb/palette_cmds.c index 48845b05e6..15a9ed7897 100644 --- a/app/pdb/palette_cmds.c +++ b/app/pdb/palette_cmds.c @@ -30,6 +30,8 @@ #include "gimpimage.h" #include "palette.h" +#include "libgimpcolor/gimpcolor.h" + static ProcRecord palette_get_foreground_proc; static ProcRecord palette_get_background_proc; static ProcRecord palette_set_foreground_proc; diff --git a/app/pdb/tools_cmds.c b/app/pdb/tools_cmds.c index 0572c8c09e..be3d6531e3 100644 --- a/app/pdb/tools_cmds.c +++ b/app/pdb/tools_cmds.c @@ -54,6 +54,8 @@ #include "tools/transform_core.h" #include "undo.h" +#include "libgimpmath/gimpmath.h" + static ProcRecord airbrush_proc; static ProcRecord airbrush_default_proc; static ProcRecord blend_proc; diff --git a/app/preferences_dialog.c b/app/preferences_dialog.c index 333b76d30a..4ade89ad38 100644 --- a/app/preferences_dialog.c +++ b/app/preferences_dialog.c @@ -23,10 +23,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "colormaps.h" #include "context_manager.h" #include "cursorutil.h" @@ -35,7 +35,6 @@ #include "gimage.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "image_render.h" #include "layer.h" #include "lc_dialog.h" diff --git a/app/qmask.c b/app/qmask.c index 84ea51d51e..a7c594e558 100644 --- a/app/qmask.c +++ b/app/qmask.c @@ -25,10 +25,10 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "color_panel.h" #include "drawable.h" @@ -37,7 +37,6 @@ #include "gimage_mask.h" #include "gimpimage.h" #include "gimpcontext.h" -#include "gimpui.h" #include "global_edit.h" #include "qmask.h" #include "undo.h" diff --git a/app/resize.c b/app/resize.c index e55c162f4d..84eaf99fa8 100644 --- a/app/resize.c +++ b/app/resize.c @@ -21,21 +21,18 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" -#include "layer.h" #include "gdisplay.h" #include "gimpimage.h" +#include "gimprc.h" +#include "layer.h" #include "resize.h" #include "undo.h" -#include "gimprc.h" -#include "gimpui.h" -#include "libgimp/gimpchainbutton.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpsizeentry.h" #include "libgimp/gimpintl.h" diff --git a/app/resolution_calibrate.c b/app/resolution_calibrate.c index e83ddb76db..31b2856f3c 100644 --- a/app/resolution_calibrate.c +++ b/app/resolution_calibrate.c @@ -21,13 +21,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" diff --git a/app/tips_dialog.c b/app/tips_dialog.c index ed538bc748..8f66117b53 100644 --- a/app/tips_dialog.c +++ b/app/tips_dialog.c @@ -25,11 +25,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "tips_dialog.h" #include "gimprc.h" -#include "gimpui.h" +#include "tips_dialog.h" #include "libgimp/gimpenv.h" @@ -38,19 +39,26 @@ #include "wilber.h" -#define TIPS_DIR_NAME "tips" +#define TIPS_DIR_NAME "tips" -static void tips_dialog_destroy (GtkWidget *widget, gpointer data); -static void tips_show_previous (GtkWidget *widget, gpointer data); -static void tips_show_next (GtkWidget *widget, gpointer data); -static void tips_toggle_update (GtkWidget *widget, gpointer data); -static void read_tips_file (gchar *filename); -static GtkWidget *tips_dialog = NULL; -static GtkWidget *tips_label; -static gchar **tips_text = NULL; -static gint tips_count = 0; -static gint old_show_tips; +static void tips_dialog_destroy (GtkWidget *widget, + gpointer data); +static void tips_show_previous (GtkWidget *widget, + gpointer data); +static void tips_show_next (GtkWidget *widget, + gpointer data); +static void tips_toggle_update (GtkWidget *widget, + gpointer data); +static void read_tips_file (gchar *filename); + + +static GtkWidget *tips_dialog = NULL; +static GtkWidget *tips_label = NULL; +static gchar **tips_text = NULL; +static gint tips_count = 0; +static gint old_show_tips = 0; + void tips_dialog_create (void) diff --git a/app/toolbox.c b/app/toolbox.c index 2600e1a07f..066a6d868c 100644 --- a/app/toolbox.c +++ b/app/toolbox.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "app_procs.h" @@ -31,7 +33,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gtkhwrapbox.h" #include "indicator_area.h" #include "layer.h" diff --git a/app/tools/airbrush.c b/app/tools/airbrush.c index a1f0d8a5ee..8ca0a6fa9e 100644 --- a/app/tools/airbrush.c +++ b/app/tools/airbrush.c @@ -21,23 +21,24 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "airbrush.h" #include "drawable.h" #include "gdisplay.h" #include "gradient.h" #include "gimpimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" + +#include "airbrush.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/blend.c b/app/tools/blend.c index 768b9e808e..8ddd08f91f 100644 --- a/app/tools/blend.c +++ b/app/tools/blend.c @@ -24,6 +24,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -41,7 +42,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimpprogress.h" -#include "gimpui.h" #include "gradient.h" #include "paint_funcs.h" #include "paint_options.h" diff --git a/app/tools/brightness_contrast.c b/app/tools/brightness_contrast.c index 1fc828e8c2..f1915ad688 100644 --- a/app/tools/brightness_contrast.c +++ b/app/tools/brightness_contrast.c @@ -20,10 +20,11 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" -#include "brightness_contrast.h" #include "drawable.h" #include "gimpcontext.h" #include "gimplut.h" @@ -32,11 +33,14 @@ #include "gimpimage.h" #include "image_map.h" #include "lut_funcs.h" + +#include "brightness_contrast.h" #include "tool_options.h" #include "tools.h" #include "libgimp/gimpintl.h" + #define SLIDER_WIDTH 200 #define BRIGHTNESS 0x1 diff --git a/app/tools/bucket_fill.c b/app/tools/bucket_fill.c index b9a77539c9..0b68e9bc49 100644 --- a/app/tools/bucket_fill.c +++ b/app/tools/bucket_fill.c @@ -21,30 +21,32 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" -#include "bucket_fill.h" #include "channel.h" #include "cursorutil.h" #include "drawable.h" -#include "fuzzy_select.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" #include "tile_manager.h" -#include "tools.h" #include "undo.h" +#include "bucket_fill.h" +#include "fuzzy_select.h" +#include "paint_options.h" +#include "tools.h" + #include "pdb/procedural_db.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/by_color_select.c b/app/tools/by_color_select.c index 6b4dd45020..5cee91a098 100644 --- a/app/tools/by_color_select.c +++ b/app/tools/by_color_select.c @@ -22,12 +22,12 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "boundary.h" -#include "by_color_select.h" #include "channel.h" #include "cursorutil.h" #include "drawable.h" @@ -41,12 +41,14 @@ #include "gdisplay.h" #include "paint_funcs.h" #include "pixel_region.h" -#include "selection_options.h" #include "temp_buf.h" #include "tile.h" #include "tile_manager.h" -#include "tools.h" + +#include "by_color_select.h" +#include "selection_options.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/clone.c b/app/tools/clone.c index 3c7ba8f8c9..09a52a59ce 100644 --- a/app/tools/clone.c +++ b/app/tools/clone.c @@ -23,26 +23,28 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" -#include "clone.h" #include "selection.h" #include "temp_buf.h" + +#include "clone.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "cursorutil.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/color_balance.c b/app/tools/color_balance.c index 1a7786a3a7..3d4c72950a 100644 --- a/app/tools/color_balance.c +++ b/app/tools/color_balance.c @@ -22,11 +22,11 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "color_balance.h" #include "color_transfer.h" #include "drawable.h" #include "gdisplay.h" @@ -34,8 +34,10 @@ #include "gimpui.h" #include "image_map.h" #include "pixel_region.h" -#include "tools.h" + +#include "color_balance.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/color_picker.c b/app/tools/color_picker.c index dc39ea4a9f..2b39d9d726 100644 --- a/app/tools/color_picker.c +++ b/app/tools/color_picker.c @@ -21,24 +21,24 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "color_picker.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimpui.h" #include "gimprc.h" -#include "cursorutil.h" #include "info_dialog.h" #include "palette.h" -#include "tools.h" -#include "tool_options.h" -#include "libgimp/gimpcolorarea.h" +#include "color_picker.h" +#include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/convolve.c b/app/tools/convolve.c index d5d5d04375..638bce176b 100644 --- a/app/tools/convolve.c +++ b/app/tools/convolve.c @@ -21,23 +21,25 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "drawable.h" -#include "convolve.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "convolve.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/crop.c b/app/tools/crop.c index 4472198b58..f9e5f8f744 100644 --- a/app/tools/crop.c +++ b/app/tools/crop.c @@ -24,12 +24,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "channel.h" -#include "crop.h" #include "cursorutil.h" #include "draw_core.h" #include "drawable.h" @@ -37,16 +37,14 @@ #include "gdisplay.h" #include "gimpimage.h" #include "gimage_mask.h" -#include "gimphelp.h" -#include "gimpui.h" #include "info_dialog.h" #include "layer.h" #include "pixel_region.h" -#include "tools.h" -#include "tool_options.h" #include "undo.h" -#include "libgimp/gimpsizeentry.h" +#include "crop.h" +#include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/curves.c b/app/tools/curves.c index 512df1306f..61e1603c44 100644 --- a/app/tools/curves.c +++ b/app/tools/curves.c @@ -23,12 +23,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "cursorutil.h" -#include "curves.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -36,11 +36,12 @@ #include "gimpui.h" #include "gimplut.h" #include "image_map.h" -#include "tools.h" + +#include "curves.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/dodgeburn.c b/app/tools/dodgeburn.c index 37cf0afb74..f52b1e4ef6 100644 --- a/app/tools/dodgeburn.c +++ b/app/tools/dodgeburn.c @@ -22,24 +22,24 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "dodgeburn.h" #include "gdisplay.h" +#include "gimage.h" #include "gimplut.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "dodgeburn.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/edit_selection.c b/app/tools/edit_selection.c index 3a494f2d1f..ffb1770103 100644 --- a/app/tools/edit_selection.c +++ b/app/tools/edit_selection.c @@ -28,10 +28,6 @@ #include "apptypes.h" -#include "edit_selection.h" -#include "tools.h" - -#include "appenv.h" #include "boundary.h" #include "cursorutil.h" #include "draw_core.h" @@ -46,6 +42,9 @@ #include "selection.h" #include "undo.h" +#include "edit_selection.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/tools/ellipse_select.c b/app/tools/ellipse_select.c index a4235d237a..227e9b670e 100644 --- a/app/tools/ellipse_select.c +++ b/app/tools/ellipse_select.c @@ -24,19 +24,19 @@ #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "draw_core.h" #include "edit_selection.h" -#include "ellipse_select.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "rect_select.h" #include "rect_selectP.h" + +#include "ellipse_select.h" #include "selection_options.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" /* the ellipse selection tool options */ diff --git a/app/tools/eraser.c b/app/tools/eraser.c index cf4b2477ec..7f122fb3c7 100644 --- a/app/tools/eraser.c +++ b/app/tools/eraser.c @@ -21,22 +21,23 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" -#include "eraser.h" #include "selection.h" #include "temp_buf.h" + +#include "eraser.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/flip_tool.c b/app/tools/flip_tool.c index ab0c586d5f..38094a8b23 100644 --- a/app/tools/flip_tool.c +++ b/app/tools/flip_tool.c @@ -23,15 +23,15 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" #include "path_transform.h" #include "pixel_region.h" @@ -39,8 +39,8 @@ #include "tile_manager.h" #include "flip_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/free_select.c b/app/tools/free_select.c index a7e0b60583..39173a724d 100644 --- a/app/tools/free_select.c +++ b/app/tools/free_select.c @@ -27,21 +27,21 @@ #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "draw_core.h" -#include "edit_selection.h" #include "errors.h" #include "floating_sel.h" -#include "free_select.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gdisplay.h" +#include "scan_convert.h" + +#include "edit_selection.h" +#include "free_select.h" #include "rect_select.h" #include "selection_options.h" -#include "scan_convert.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #define DEFAULT_MAX_INC 1024 diff --git a/app/tools/fuzzy_select.c b/app/tools/fuzzy_select.c index c92a733050..b77d4e1e03 100644 --- a/app/tools/fuzzy_select.c +++ b/app/tools/fuzzy_select.c @@ -26,26 +26,25 @@ #include "apptypes.h" -#include "appenv.h" #include "boundary.h" #include "channel.h" #include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "edit_selection.h" -#include "fuzzy_select.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" #include "pixel_region.h" -#include "rect_select.h" -#include "selection_options.h" #include "tile_manager.h" #include "tile.h" -#include "tools.h" + +#include "fuzzy_select.h" +#include "rect_select.h" +#include "selection_options.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpairbrushtool.c b/app/tools/gimpairbrushtool.c index a1f0d8a5ee..8ca0a6fa9e 100644 --- a/app/tools/gimpairbrushtool.c +++ b/app/tools/gimpairbrushtool.c @@ -21,23 +21,24 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "airbrush.h" #include "drawable.h" #include "gdisplay.h" #include "gradient.h" #include "gimpimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" + +#include "airbrush.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpblendtool.c b/app/tools/gimpblendtool.c index 768b9e808e..8ddd08f91f 100644 --- a/app/tools/gimpblendtool.c +++ b/app/tools/gimpblendtool.c @@ -24,6 +24,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -41,7 +42,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimpprogress.h" -#include "gimpui.h" #include "gradient.h" #include "paint_funcs.h" #include "paint_options.h" diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c index 1fc828e8c2..f1915ad688 100644 --- a/app/tools/gimpbrightnesscontrasttool.c +++ b/app/tools/gimpbrightnesscontrasttool.c @@ -20,10 +20,11 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" -#include "brightness_contrast.h" #include "drawable.h" #include "gimpcontext.h" #include "gimplut.h" @@ -32,11 +33,14 @@ #include "gimpimage.h" #include "image_map.h" #include "lut_funcs.h" + +#include "brightness_contrast.h" #include "tool_options.h" #include "tools.h" #include "libgimp/gimpintl.h" + #define SLIDER_WIDTH 200 #define BRIGHTNESS 0x1 diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c index b9a77539c9..0b68e9bc49 100644 --- a/app/tools/gimpbucketfilltool.c +++ b/app/tools/gimpbucketfilltool.c @@ -21,30 +21,32 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" -#include "bucket_fill.h" #include "channel.h" #include "cursorutil.h" #include "drawable.h" -#include "fuzzy_select.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" #include "tile_manager.h" -#include "tools.h" #include "undo.h" +#include "bucket_fill.h" +#include "fuzzy_select.h" +#include "paint_options.h" +#include "tools.h" + #include "pdb/procedural_db.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpbycolorselecttool.c b/app/tools/gimpbycolorselecttool.c index 6b4dd45020..5cee91a098 100644 --- a/app/tools/gimpbycolorselecttool.c +++ b/app/tools/gimpbycolorselecttool.c @@ -22,12 +22,12 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "boundary.h" -#include "by_color_select.h" #include "channel.h" #include "cursorutil.h" #include "drawable.h" @@ -41,12 +41,14 @@ #include "gdisplay.h" #include "paint_funcs.h" #include "pixel_region.h" -#include "selection_options.h" #include "temp_buf.h" #include "tile.h" #include "tile_manager.h" -#include "tools.h" + +#include "by_color_select.h" +#include "selection_options.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpclonetool.c b/app/tools/gimpclonetool.c index 3c7ba8f8c9..09a52a59ce 100644 --- a/app/tools/gimpclonetool.c +++ b/app/tools/gimpclonetool.c @@ -23,26 +23,28 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" -#include "clone.h" #include "selection.h" #include "temp_buf.h" + +#include "clone.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "cursorutil.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c index 1a7786a3a7..3d4c72950a 100644 --- a/app/tools/gimpcolorbalancetool.c +++ b/app/tools/gimpcolorbalancetool.c @@ -22,11 +22,11 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" -#include "color_balance.h" #include "color_transfer.h" #include "drawable.h" #include "gdisplay.h" @@ -34,8 +34,10 @@ #include "gimpui.h" #include "image_map.h" #include "pixel_region.h" -#include "tools.h" + +#include "color_balance.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpconvolvetool.c b/app/tools/gimpconvolvetool.c index d5d5d04375..638bce176b 100644 --- a/app/tools/gimpconvolvetool.c +++ b/app/tools/gimpconvolvetool.c @@ -21,23 +21,25 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" #include "drawable.h" -#include "convolve.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpbrush.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "convolve.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c index 4472198b58..f9e5f8f744 100644 --- a/app/tools/gimpcroptool.c +++ b/app/tools/gimpcroptool.c @@ -24,12 +24,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "channel.h" -#include "crop.h" #include "cursorutil.h" #include "draw_core.h" #include "drawable.h" @@ -37,16 +37,14 @@ #include "gdisplay.h" #include "gimpimage.h" #include "gimage_mask.h" -#include "gimphelp.h" -#include "gimpui.h" #include "info_dialog.h" #include "layer.h" #include "pixel_region.h" -#include "tools.h" -#include "tool_options.h" #include "undo.h" -#include "libgimp/gimpsizeentry.h" +#include "crop.h" +#include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index 512df1306f..61e1603c44 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -23,12 +23,12 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "cursorutil.h" -#include "curves.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -36,11 +36,12 @@ #include "gimpui.h" #include "gimplut.h" #include "image_map.h" -#include "tools.h" + +#include "curves.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpdodgeburntool.c b/app/tools/gimpdodgeburntool.c index 37cf0afb74..f52b1e4ef6 100644 --- a/app/tools/gimpdodgeburntool.c +++ b/app/tools/gimpdodgeburntool.c @@ -22,24 +22,24 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "dodgeburn.h" #include "gdisplay.h" +#include "gimage.h" #include "gimplut.h" #include "gimpcontext.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "pixel_region.h" #include "selection.h" #include "temp_buf.h" + +#include "dodgeburn.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "gimage.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c index 3a494f2d1f..ffb1770103 100644 --- a/app/tools/gimpeditselectiontool.c +++ b/app/tools/gimpeditselectiontool.c @@ -28,10 +28,6 @@ #include "apptypes.h" -#include "edit_selection.h" -#include "tools.h" - -#include "appenv.h" #include "boundary.h" #include "cursorutil.h" #include "draw_core.h" @@ -46,6 +42,9 @@ #include "selection.h" #include "undo.h" +#include "edit_selection.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpellipseselecttool.c b/app/tools/gimpellipseselecttool.c index a4235d237a..227e9b670e 100644 --- a/app/tools/gimpellipseselecttool.c +++ b/app/tools/gimpellipseselecttool.c @@ -24,19 +24,19 @@ #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "draw_core.h" #include "edit_selection.h" -#include "ellipse_select.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "rect_select.h" #include "rect_selectP.h" + +#include "ellipse_select.h" #include "selection_options.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" /* the ellipse selection tool options */ diff --git a/app/tools/gimperasertool.c b/app/tools/gimperasertool.c index cf4b2477ec..7f122fb3c7 100644 --- a/app/tools/gimperasertool.c +++ b/app/tools/gimperasertool.c @@ -21,22 +21,23 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" #include "paint_core.h" -#include "paint_options.h" -#include "eraser.h" #include "selection.h" #include "temp_buf.h" + +#include "eraser.h" +#include "paint_options.h" #include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpfliptool.c b/app/tools/gimpfliptool.c index ab0c586d5f..38094a8b23 100644 --- a/app/tools/gimpfliptool.c +++ b/app/tools/gimpfliptool.c @@ -23,15 +23,15 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" #include "path_transform.h" #include "pixel_region.h" @@ -39,8 +39,8 @@ #include "tile_manager.h" #include "flip_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c index a7e0b60583..39173a724d 100644 --- a/app/tools/gimpfreeselecttool.c +++ b/app/tools/gimpfreeselecttool.c @@ -27,21 +27,21 @@ #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "draw_core.h" -#include "edit_selection.h" #include "errors.h" #include "floating_sel.h" -#include "free_select.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gdisplay.h" +#include "scan_convert.h" + +#include "edit_selection.h" +#include "free_select.h" #include "rect_select.h" #include "selection_options.h" -#include "scan_convert.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #define DEFAULT_MAX_INC 1024 diff --git a/app/tools/gimpfuzzyselecttool.c b/app/tools/gimpfuzzyselecttool.c index c92a733050..b77d4e1e03 100644 --- a/app/tools/gimpfuzzyselecttool.c +++ b/app/tools/gimpfuzzyselecttool.c @@ -26,26 +26,25 @@ #include "apptypes.h" -#include "appenv.h" #include "boundary.h" #include "channel.h" #include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "edit_selection.h" -#include "fuzzy_select.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" #include "pixel_region.h" -#include "rect_select.h" -#include "selection_options.h" #include "tile_manager.h" #include "tile.h" -#include "tools.h" + +#include "fuzzy_select.h" +#include "rect_select.h" +#include "selection_options.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimphistogramtool.c b/app/tools/gimphistogramtool.c index 616e5d5000..f32a35e312 100644 --- a/app/tools/gimphistogramtool.c +++ b/app/tools/gimphistogramtool.c @@ -21,18 +21,19 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimphistogram.h" #include "gimpui.h" -#include "histogram_tool.h" #include "histogramwidget.h" #include "pixel_region.h" + +#include "histogram_tool.h" #include "tool_options.h" #include "tools.h" diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c index 17c0a3d8e9..6272735f3d 100644 --- a/app/tools/gimphuesaturationtool.c +++ b/app/tools/gimphuesaturationtool.c @@ -22,18 +22,19 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gimage_mask.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimpui.h" -#include "hue_saturation.h" #include "image_map.h" #include "pixel_region.h" + +#include "hue_saturation.h" #include "tools.h" #include "tool_options.h" diff --git a/app/tools/gimpinktool.c b/app/tools/gimpinktool.c index 4ead434b1a..16393327b4 100644 --- a/app/tools/gimpinktool.c +++ b/app/tools/gimpinktool.c @@ -24,22 +24,17 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "draw_core.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" -#include "ink.h" -#include "paint_options.h" -#include "tools.h" #include "undo.h" -#include "blob.h" #include "gdisplay.h" #include "paint_funcs.h" #include "pixel_region.h" @@ -47,6 +42,11 @@ #include "tile.h" #include "tile_manager.h" +#include "blob.h" +#include "ink.h" +#include "paint_options.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c index 63cd6f1ab6..54a0eeddff 100644 --- a/app/tools/gimpiscissorstool.c +++ b/app/tools/gimpiscissorstool.c @@ -45,7 +45,6 @@ #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "channel.h" #include "cursorutil.h" @@ -53,18 +52,19 @@ #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "iscissors.h" -#include "edit_selection.h" #include "paint_funcs.h" #include "pixel_region.h" -#include "selection_options.h" #include "temp_buf.h" -#include "tools.h" -#include "bezier_selectP.h" #include "scan_convert.h" #include "tile.h" #include "tile_manager.h" +#include "bezier_selectP.h" +#include "iscissors.h" +#include "edit_selection.h" +#include "selection_options.h" +#include "tools.h" + /* local structures */ diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index 0b2be967f5..c819aa3db8 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -26,10 +26,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -37,11 +37,12 @@ #include "gimpui.h" #include "histogramwidget.h" #include "image_map.h" -#include "levels.h" #include "gimplut.h" #include "lut_funcs.h" -#include "tools.h" + +#include "levels.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpenv.h" diff --git a/app/tools/gimpmagnifytool.c b/app/tools/gimpmagnifytool.c index 1d60a74324..9235c1a4cc 100644 --- a/app/tools/gimpmagnifytool.c +++ b/app/tools/gimpmagnifytool.c @@ -23,19 +23,20 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "draw_core.h" #include "gdisplay.h" #include "gimprc.h" -#include "gimpui.h" #include "info_window.h" -#include "magnify.h" #include "scale.h" -#include "tools.h" + +#include "magnify.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c index bdae13ef3c..75d6587750 100644 --- a/app/tools/gimpmeasuretool.c +++ b/app/tools/gimpmeasuretool.c @@ -24,19 +24,19 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "info_dialog.h" -#include "measure.h" #include "undo.h" -#include "tools.h" + +#include "measure.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c index 1818da444b..9aa2701f9e 100644 --- a/app/tools/gimpmovetool.c +++ b/app/tools/gimpmovetool.c @@ -23,23 +23,23 @@ #include #include "apptypes.h" -#include "appenv.h" + #include "cursorutil.h" #include "draw_core.h" -#include "edit_selection.h" #include "floating_sel.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gdisplay_ops.h" #include "gdisplay.h" #include "layer.h" -#include "move.h" #include "selection.h" -#include "tools.h" -#include "tool_options.h" #include "undo.h" -#include "config.h" +#include "edit_selection.h" +#include "move.h" +#include "tools.h" +#include "tool_options.h" + #include "libgimp/gimpintl.h" /* the move structures */ diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c index 8474932494..623ba88d53 100644 --- a/app/tools/gimppaintoptions-gui.c +++ b/app/tools/gimppaintoptions-gui.c @@ -20,18 +20,17 @@ #include -#include "apptypes.h" +#include "libgimpwidgets/gimpwidgets.h" -#include "paint_options.h" -#include "tools.h" +#include "apptypes.h" #include "brush_select.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gtkhwrapbox.h" -#include "libgimp/gimpunitmenu.h" +#include "paint_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimppenciltool.c b/app/tools/gimppenciltool.c index 213b375793..4cf8310aac 100644 --- a/app/tools/gimppenciltool.c +++ b/app/tools/gimppenciltool.c @@ -24,7 +24,6 @@ #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpbrush.h" @@ -32,14 +31,15 @@ #include "gimpimage.h" #include "gradient.h" #include "paint_funcs.h" +#include "selection.h" +#include "temp_buf.h" + #include "paint_core.h" #include "paint_options.h" #include "paintbrush.h" #include "pencil.h" -#include "selection.h" -#include "temp_buf.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #define PENCIL_INCREMENTAL_DEFAULT FALSE diff --git a/app/tools/gimpperspectivetool.c b/app/tools/gimpperspectivetool.c index 7adbf452a8..0e118e0fa9 100644 --- a/app/tools/gimpperspectivetool.c +++ b/app/tools/gimpperspectivetool.c @@ -21,16 +21,15 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" diff --git a/app/tools/gimpposterizetool.c b/app/tools/gimpposterizetool.c index 14d0b9b1db..ef1f5c43bd 100644 --- a/app/tools/gimpposterizetool.c +++ b/app/tools/gimpposterizetool.c @@ -20,9 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpimage.h" @@ -30,9 +31,10 @@ #include "gimpui.h" #include "image_map.h" #include "lut_funcs.h" + #include "posterize.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimprectselecttool.c b/app/tools/gimprectselecttool.c index f7e6e21845..184571ebe9 100644 --- a/app/tools/gimprectselecttool.c +++ b/app/tools/gimprectselecttool.c @@ -23,24 +23,24 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "cursorutil.h" #include "draw_core.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "edit_selection.h" #include "floating_sel.h" + +#include "edit_selection.h" #include "rect_select.h" #include "rect_selectP.h" #include "selection_options.h" -#include "tools.h" #include "tool_options.h" - -#include "libgimp/gimpunitmenu.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c index c92a733050..b77d4e1e03 100644 --- a/app/tools/gimpregionselecttool.c +++ b/app/tools/gimpregionselecttool.c @@ -26,26 +26,25 @@ #include "apptypes.h" -#include "appenv.h" #include "boundary.h" #include "channel.h" #include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "edit_selection.h" -#include "fuzzy_select.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" #include "gdisplay.h" #include "pixel_region.h" -#include "rect_select.h" -#include "selection_options.h" #include "tile_manager.h" #include "tile.h" -#include "tools.h" + +#include "fuzzy_select.h" +#include "rect_select.h" +#include "selection_options.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c index 8ca6753b41..c24981ba9d 100644 --- a/app/tools/gimprotatetool.c +++ b/app/tools/gimprotatetool.c @@ -21,30 +21,27 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" #include "undo.h" #include "rotate_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "transform_tool.h" -#include "libgimp/gimpsizeentry.h" - #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpscaletool.c b/app/tools/gimpscaletool.c index 9dd0f7dc3f..69e26b5935 100644 --- a/app/tools/gimpscaletool.c +++ b/app/tools/gimpscaletool.c @@ -21,25 +21,24 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" #include "undo.h" #include "scale_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "transform_tool.h" diff --git a/app/tools/gimpselectionoptions.c b/app/tools/gimpselectionoptions.c index 11b90edbbc..75e2044146 100644 --- a/app/tools/gimpselectionoptions.c +++ b/app/tools/gimpselectionoptions.c @@ -20,16 +20,15 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" +#include "gimprc.h" + #include "selection_options.h" #include "tools.h" -#include "gimprc.h" -#include "gimpui.h" - -#include "libgimp/gimpunitmenu.h" - #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpsheartool.c b/app/tools/gimpsheartool.c index ce15eb595c..c4bde238e6 100644 --- a/app/tools/gimpsheartool.c +++ b/app/tools/gimpsheartool.c @@ -21,16 +21,15 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "gimpui.h" #include "gimpprogress.h" #include "info_dialog.h" #include "shear_tool.h" diff --git a/app/tools/gimpsmudgetool.c b/app/tools/gimpsmudgetool.c index c544c8708a..a6aea8d5d5 100644 --- a/app/tools/gimpsmudgetool.c +++ b/app/tools/gimpsmudgetool.c @@ -22,13 +22,13 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "smudge.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpcontext.h" #include "gimpbrush.h" #include "gimplut.h" @@ -36,12 +36,13 @@ #include "paint_funcs.h" #include "paint_core.h" #include "pixel_region.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" -#include "tools.h" + +#include "paint_options.h" +#include "smudge.h" #include "tool_options.h" -#include "gimage.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimpsourcetool.c b/app/tools/gimpsourcetool.c index 3c7ba8f8c9..09a52a59ce 100644 --- a/app/tools/gimpsourcetool.c +++ b/app/tools/gimpsourcetool.c @@ -23,26 +23,28 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "appenv.h" +#include "cursorutil.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "paint_funcs.h" -#include "paint_core.h" -#include "paint_options.h" #include "patterns.h" #include "pixel_region.h" -#include "clone.h" #include "selection.h" #include "temp_buf.h" + +#include "clone.h" +#include "paint_core.h" +#include "paint_options.h" #include "tools.h" -#include "cursorutil.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index cc882f2c1c..a0d5e10003 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -31,9 +31,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "errors.h" #include "floating_sel.h" diff --git a/app/tools/gimpthresholdtool.c b/app/tools/gimpthresholdtool.c index d0dcc39222..d25e235295 100644 --- a/app/tools/gimpthresholdtool.c +++ b/app/tools/gimpthresholdtool.c @@ -20,9 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -32,9 +33,10 @@ #include "image_map.h" #include "paint_funcs.h" #include "pixel_region.h" + #include "threshold.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/histogram_tool.c b/app/tools/histogram_tool.c index 616e5d5000..f32a35e312 100644 --- a/app/tools/histogram_tool.c +++ b/app/tools/histogram_tool.c @@ -21,18 +21,19 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimphistogram.h" #include "gimpui.h" -#include "histogram_tool.h" #include "histogramwidget.h" #include "pixel_region.h" + +#include "histogram_tool.h" #include "tool_options.h" #include "tools.h" diff --git a/app/tools/hue_saturation.c b/app/tools/hue_saturation.c index 17c0a3d8e9..6272735f3d 100644 --- a/app/tools/hue_saturation.c +++ b/app/tools/hue_saturation.c @@ -22,18 +22,19 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gimage_mask.h" #include "gdisplay.h" #include "gimpimage.h" #include "gimpui.h" -#include "hue_saturation.h" #include "image_map.h" #include "pixel_region.h" + +#include "hue_saturation.h" #include "tools.h" #include "tool_options.h" diff --git a/app/tools/ink.c b/app/tools/ink.c index 4ead434b1a..16393327b4 100644 --- a/app/tools/ink.c +++ b/app/tools/ink.c @@ -24,22 +24,17 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "draw_core.h" #include "gimage_mask.h" #include "gimpcontext.h" #include "gimpimage.h" #include "gimprc.h" -#include "gimpui.h" -#include "ink.h" -#include "paint_options.h" -#include "tools.h" #include "undo.h" -#include "blob.h" #include "gdisplay.h" #include "paint_funcs.h" #include "pixel_region.h" @@ -47,6 +42,11 @@ #include "tile.h" #include "tile_manager.h" +#include "blob.h" +#include "ink.h" +#include "paint_options.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/tools/iscissors.c b/app/tools/iscissors.c index 63cd6f1ab6..54a0eeddff 100644 --- a/app/tools/iscissors.c +++ b/app/tools/iscissors.c @@ -45,7 +45,6 @@ #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "channel.h" #include "cursorutil.h" @@ -53,18 +52,19 @@ #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "iscissors.h" -#include "edit_selection.h" #include "paint_funcs.h" #include "pixel_region.h" -#include "selection_options.h" #include "temp_buf.h" -#include "tools.h" -#include "bezier_selectP.h" #include "scan_convert.h" #include "tile.h" #include "tile_manager.h" +#include "bezier_selectP.h" +#include "iscissors.h" +#include "edit_selection.h" +#include "selection_options.h" +#include "tools.h" + /* local structures */ diff --git a/app/tools/levels.c b/app/tools/levels.c index 0b2be967f5..c819aa3db8 100644 --- a/app/tools/levels.c +++ b/app/tools/levels.c @@ -26,10 +26,10 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -37,11 +37,12 @@ #include "gimpui.h" #include "histogramwidget.h" #include "image_map.h" -#include "levels.h" #include "gimplut.h" #include "lut_funcs.h" -#include "tools.h" + +#include "levels.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpenv.h" diff --git a/app/tools/magnify.c b/app/tools/magnify.c index 1d60a74324..9235c1a4cc 100644 --- a/app/tools/magnify.c +++ b/app/tools/magnify.c @@ -23,19 +23,20 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "cursorutil.h" #include "draw_core.h" #include "gdisplay.h" #include "gimprc.h" -#include "gimpui.h" #include "info_window.h" -#include "magnify.h" #include "scale.h" -#include "tools.h" + +#include "magnify.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/measure.c b/app/tools/measure.c index bdae13ef3c..75d6587750 100644 --- a/app/tools/measure.c +++ b/app/tools/measure.c @@ -24,19 +24,19 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "gdisplay.h" #include "gimpimage.h" -#include "gimpui.h" #include "info_dialog.h" -#include "measure.h" #include "undo.h" -#include "tools.h" + +#include "measure.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/move.c b/app/tools/move.c index 1818da444b..9aa2701f9e 100644 --- a/app/tools/move.c +++ b/app/tools/move.c @@ -23,23 +23,23 @@ #include #include "apptypes.h" -#include "appenv.h" + #include "cursorutil.h" #include "draw_core.h" -#include "edit_selection.h" #include "floating_sel.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gdisplay_ops.h" #include "gdisplay.h" #include "layer.h" -#include "move.h" #include "selection.h" -#include "tools.h" -#include "tool_options.h" #include "undo.h" -#include "config.h" +#include "edit_selection.h" +#include "move.h" +#include "tools.h" +#include "tool_options.h" + #include "libgimp/gimpintl.h" /* the move structures */ diff --git a/app/tools/paint_options.c b/app/tools/paint_options.c index 8474932494..623ba88d53 100644 --- a/app/tools/paint_options.c +++ b/app/tools/paint_options.c @@ -20,18 +20,17 @@ #include -#include "apptypes.h" +#include "libgimpwidgets/gimpwidgets.h" -#include "paint_options.h" -#include "tools.h" +#include "apptypes.h" #include "brush_select.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gtkhwrapbox.h" -#include "libgimp/gimpunitmenu.h" +#include "paint_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/paintbrush.c b/app/tools/paintbrush.c index 7b18bc26f3..978d6d0e55 100644 --- a/app/tools/paintbrush.c +++ b/app/tools/paintbrush.c @@ -22,28 +22,26 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpbrushlist.h" #include "gimpbrush.h" #include "gimpcontext.h" #include "gimpimage.h" -#include "gimpui.h" #include "gradient.h" #include "paint_funcs.h" +#include "selection.h" +#include "temp_buf.h" + #include "paint_core.h" #include "paint_options.h" #include "paintbrush.h" -#include "selection.h" -#include "temp_buf.h" -#include "tools.h" #include "tool_options.h" - -#include "libgimp/gimpunitmenu.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/pencil.c b/app/tools/pencil.c index 213b375793..4cf8310aac 100644 --- a/app/tools/pencil.c +++ b/app/tools/pencil.c @@ -24,7 +24,6 @@ #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpbrush.h" @@ -32,14 +31,15 @@ #include "gimpimage.h" #include "gradient.h" #include "paint_funcs.h" +#include "selection.h" +#include "temp_buf.h" + #include "paint_core.h" #include "paint_options.h" #include "paintbrush.h" #include "pencil.h" -#include "selection.h" -#include "temp_buf.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #define PENCIL_INCREMENTAL_DEFAULT FALSE diff --git a/app/tools/perspective_tool.c b/app/tools/perspective_tool.c index 7adbf452a8..0e118e0fa9 100644 --- a/app/tools/perspective_tool.c +++ b/app/tools/perspective_tool.c @@ -21,16 +21,15 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" diff --git a/app/tools/posterize.c b/app/tools/posterize.c index 14d0b9b1db..ef1f5c43bd 100644 --- a/app/tools/posterize.c +++ b/app/tools/posterize.c @@ -20,9 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimpimage.h" @@ -30,9 +31,10 @@ #include "gimpui.h" #include "image_map.h" #include "lut_funcs.h" + #include "posterize.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/rect_select.c b/app/tools/rect_select.c index f7e6e21845..184571ebe9 100644 --- a/app/tools/rect_select.c +++ b/app/tools/rect_select.c @@ -23,24 +23,24 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channel.h" #include "cursorutil.h" #include "draw_core.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "edit_selection.h" #include "floating_sel.h" + +#include "edit_selection.h" #include "rect_select.h" #include "rect_selectP.h" #include "selection_options.h" -#include "tools.h" #include "tool_options.h" - -#include "libgimp/gimpunitmenu.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/rotate_tool.c b/app/tools/rotate_tool.c index 8ca6753b41..c24981ba9d 100644 --- a/app/tools/rotate_tool.c +++ b/app/tools/rotate_tool.c @@ -21,30 +21,27 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" #include "undo.h" #include "rotate_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "transform_tool.h" -#include "libgimp/gimpsizeentry.h" - #include "libgimp/gimpintl.h" diff --git a/app/tools/scale_tool.c b/app/tools/scale_tool.c index 9dd0f7dc3f..69e26b5935 100644 --- a/app/tools/scale_tool.c +++ b/app/tools/scale_tool.c @@ -21,25 +21,24 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" #include "gimpprogress.h" -#include "gimpui.h" #include "info_dialog.h" #include "selection.h" #include "tile_manager.h" #include "undo.h" #include "scale_tool.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "transform_core.h" #include "transform_tool.h" diff --git a/app/tools/selection_options.c b/app/tools/selection_options.c index 11b90edbbc..75e2044146 100644 --- a/app/tools/selection_options.c +++ b/app/tools/selection_options.c @@ -20,16 +20,15 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" +#include "gimprc.h" + #include "selection_options.h" #include "tools.h" -#include "gimprc.h" -#include "gimpui.h" - -#include "libgimp/gimpunitmenu.h" - #include "libgimp/gimpintl.h" diff --git a/app/tools/shear_tool.c b/app/tools/shear_tool.c index ce15eb595c..c4bde238e6 100644 --- a/app/tools/shear_tool.c +++ b/app/tools/shear_tool.c @@ -21,16 +21,15 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "draw_core.h" #include "drawable.h" #include "gdisplay.h" #include "gimage_mask.h" #include "gimpimage.h" -#include "gimpui.h" #include "gimpprogress.h" #include "info_dialog.h" #include "shear_tool.h" diff --git a/app/tools/smudge.c b/app/tools/smudge.c index c544c8708a..a6aea8d5d5 100644 --- a/app/tools/smudge.c +++ b/app/tools/smudge.c @@ -22,13 +22,13 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "drawable.h" -#include "smudge.h" #include "gdisplay.h" +#include "gimage.h" #include "gimpcontext.h" #include "gimpbrush.h" #include "gimplut.h" @@ -36,12 +36,13 @@ #include "paint_funcs.h" #include "paint_core.h" #include "pixel_region.h" -#include "paint_options.h" #include "selection.h" #include "temp_buf.h" -#include "tools.h" + +#include "paint_options.h" +#include "smudge.h" #include "tool_options.h" -#include "gimage.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/text_tool.c b/app/tools/text_tool.c index cc882f2c1c..a0d5e10003 100644 --- a/app/tools/text_tool.c +++ b/app/tools/text_tool.c @@ -31,9 +31,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "errors.h" #include "floating_sel.h" diff --git a/app/tools/threshold.c b/app/tools/threshold.c index d0dcc39222..d25e235295 100644 --- a/app/tools/threshold.c +++ b/app/tools/threshold.c @@ -20,9 +20,10 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "drawable.h" #include "gdisplay.h" #include "gimphistogram.h" @@ -32,9 +33,10 @@ #include "image_map.h" #include "paint_funcs.h" #include "pixel_region.h" + #include "threshold.h" -#include "tools.h" #include "tool_options.h" +#include "tools.h" #include "libgimp/gimpintl.h" diff --git a/app/tools/tool_options_dialog.c b/app/tools/tool_options_dialog.c index 18788fa1dd..cc72d9dd35 100644 --- a/app/tools/tool_options_dialog.c +++ b/app/tools/tool_options_dialog.c @@ -20,11 +20,9 @@ #include -#include "apptypes.h" +#include "libgimpwidgets/gimpwidgets.h" -#include "tool_options.h" -#include "tool_options_dialog.h" -#include "tools.h" +#include "apptypes.h" #include "dialog_handler.h" #include "gimpcontext.h" @@ -32,6 +30,10 @@ #include "gimpui.h" #include "session.h" +#include "tool_options.h" +#include "tool_options_dialog.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/tools/tools.c b/app/tools/tools.c index 80078426f8..ec8ddd097a 100644 --- a/app/tools/tools.c +++ b/app/tools/tools.c @@ -20,8 +20,18 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" +#include "context_manager.h" +#include "gdisplay.h" +#include "gimpcontext.h" +#include "gimpdnd.h" +#include "gimpimage.h" +#include "session.h" +#include "dialog_handler.h" + #include "airbrush.h" #include "bezier_select.h" #include "blend.h" @@ -62,16 +72,6 @@ #include "tool_options_dialog.h" #include "transform_tool.h" -#include "appenv.h" -#include "context_manager.h" -#include "gdisplay.h" -#include "gimpcontext.h" -#include "gimpdnd.h" -#include "gimpimage.h" -#include "gimpui.h" -#include "session.h" -#include "dialog_handler.h" - #include "libgimp/gimpintl.h" #include "pixmaps2.h" diff --git a/app/tools/transform_core.c b/app/tools/transform_core.c index 7031d66fe8..8997a675df 100644 --- a/app/tools/transform_core.c +++ b/app/tools/transform_core.c @@ -23,6 +23,7 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" diff --git a/app/tools/transform_tool.c b/app/tools/transform_tool.c index 0593a66d28..a1e34cdf54 100644 --- a/app/tools/transform_tool.c +++ b/app/tools/transform_tool.c @@ -21,13 +21,13 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gdisplay.h" #include "gimpcontext.h" -#include "gimpui.h" + #include "perspective_tool.h" #include "rotate_tool.h" #include "scale_tool.h" diff --git a/app/undo_history.c b/app/undo_history.c index 364ad33e6a..65611288ce 100644 --- a/app/undo_history.c +++ b/app/undo_history.c @@ -45,12 +45,13 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "dialog_handler.h" #include "drawable.h" #include "gimprc.h" -#include "gimpui.h" #include "gimage_mask.h" #include "gimpimage.h" #include "paint_funcs.h" @@ -67,6 +68,7 @@ #include "pixmaps/yes.xpm" #include "pixmaps/question.xpm" + typedef struct { GImage *gimage; /* image we're tracking undo info for */ diff --git a/app/user_install.c b/app/user_install.c index bd629a37a1..aeb24deef0 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -30,13 +30,13 @@ #endif #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "appenv.h" #include "gdisplay_ops.h" #include "gimprc.h" -#include "gimpui.h" #include "resolution_calibrate.h" #include "unitrc.h" #include "user_install.h" diff --git a/app/widgets/gimpbrusheditor.c b/app/widgets/gimpbrusheditor.c index 429fff6580..007a038fb9 100644 --- a/app/widgets/gimpbrusheditor.c +++ b/app/widgets/gimpbrusheditor.c @@ -25,17 +25,14 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "gimpbrushgenerated.h" #include "brush_edit.h" -#include "gimpui.h" #include "temp_buf.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c index 8a40806322..eee4c2e414 100644 --- a/app/widgets/gimpcolordialog.c +++ b/app/widgets/gimpcolordialog.c @@ -29,16 +29,14 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" #include "color_area.h" #include "color_notebook.h" #include "colormaps.h" -#include "gimpui.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimpcolorarea.h" #include "libgimp/gimpcolorselector.h" #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c index 60fa9f18a8..a2acba078e 100644 --- a/app/widgets/gimpcolormapeditor.c +++ b/app/widgets/gimpcolormapeditor.c @@ -27,6 +27,7 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -40,12 +41,9 @@ #include "gimpdnd.h" #include "gimpimage.h" #include "gimpset.h" -#include "gimpui.h" #include "pdb/procedural_db.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" @@ -65,8 +63,8 @@ enum }; -static void gimp_colormap_dialog_class_init (GimpColormapDialogClass* klass); -static void gimp_colormap_dialog_init (GimpColormapDialog* colormap_dialog); +static void gimp_colormap_dialog_class_init (GimpColormapDialogClass *klass); +static void gimp_colormap_dialog_init (GimpColormapDialog *colormap_dialog); static void ipal_create_popup_menu (GimpColormapDialog *ipal); diff --git a/app/widgets/gimpcolorpanel.h b/app/widgets/gimpcolorpanel.h index 20ea0259ae..7d7fa5fb68 100644 --- a/app/widgets/gimpcolorpanel.h +++ b/app/widgets/gimpcolorpanel.h @@ -20,7 +20,7 @@ #define __COLOR_PANEL_H__ -#include "libgimp/gimpcolorbutton.h" +#include "libgimpwidgets/gimpcolorbutton.h" #define GIMP_TYPE_COLOR_PANEL (gimp_color_panel_get_type ()) diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c index 58cc442536..6f6e910fe9 100644 --- a/app/widgets/gimpdeviceinfo.c +++ b/app/widgets/gimpdeviceinfo.c @@ -24,6 +24,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -36,7 +37,6 @@ #include "gimpbrushlist.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "patterns.h" @@ -45,8 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimpcolorarea.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpdevices.c b/app/widgets/gimpdevices.c index 58cc442536..6f6e910fe9 100644 --- a/app/widgets/gimpdevices.c +++ b/app/widgets/gimpdevices.c @@ -24,6 +24,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -36,7 +37,6 @@ #include "gimpbrushlist.h" #include "gimpcontext.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradient_header.h" #include "patterns.h" @@ -45,8 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimpcolorarea.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpdnd.c b/app/widgets/gimpdnd.c index fa6e23c76f..52e5e18f95 100644 --- a/app/widgets/gimpdnd.c +++ b/app/widgets/gimpdnd.c @@ -23,6 +23,7 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" @@ -44,7 +45,6 @@ #include "tools/tools.h" #include "libgimp/gimplimits.h" -#include "libgimp/gimpcolorarea.h" #define DRAG_PREVIEW_SIZE 32 diff --git a/app/widgets/gimpgradienteditor.c b/app/widgets/gimpgradienteditor.c index 51b8067d9a..f26105a67b 100644 --- a/app/widgets/gimpgradienteditor.c +++ b/app/widgets/gimpgradienteditor.c @@ -59,10 +59,10 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_notebook.h" #include "cursorutil.h" #include "datafiles.h" @@ -70,7 +70,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gradient.h" #include "gradientP.h" #include "gradient_header.h" diff --git a/app/widgets/gimphelp.c b/app/widgets/gimphelp.c index c17a75b620..92f6094de5 100644 --- a/app/widgets/gimphelp.c +++ b/app/widgets/gimphelp.c @@ -31,6 +31,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimphelp.h" @@ -39,7 +41,6 @@ #include "plug_in.h" #include "libgimp/gimpenv.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index fe52ec7396..766ef97c03 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -24,9 +24,10 @@ #include #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "channels_dialog.h" #include "commands.h" #include "dialog_handler.h" @@ -34,7 +35,6 @@ #include "gdisplay.h" #include "gimphelp.h" #include "gimprc.h" -#include "gimpui.h" #include "layers_dialog.h" #include "menus.h" #include "paths_dialog.h" diff --git a/app/widgets/gimppaletteeditor.c b/app/widgets/gimppaletteeditor.c index a65c04dd1e..cd7aa8922c 100644 --- a/app/widgets/gimppaletteeditor.c +++ b/app/widgets/gimppaletteeditor.c @@ -25,6 +25,8 @@ #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "color_area.h" @@ -36,7 +38,6 @@ #include "gimpdnd.h" #include "gimppalette.h" #include "gimprc.h" -#include "gimpui.h" #include "palette.h" #include "paletteP.h" #include "palette_import.h" diff --git a/app/widgets/gimptoolbox-color-area.c b/app/widgets/gimptoolbox-color-area.c index 639c86b8e7..619b7fb943 100644 --- a/app/widgets/gimptoolbox-color-area.c +++ b/app/widgets/gimptoolbox-color-area.c @@ -30,7 +30,6 @@ #include "apptypes.h" -#include "appenv.h" #include "color_area.h" #include "color_notebook.h" #include "gdisplay.h" diff --git a/app/widgets/gimptoolbox-indicator-area.c b/app/widgets/gimptoolbox-indicator-area.c index d7ea146a42..d4c8d89fcb 100644 --- a/app/widgets/gimptoolbox-indicator-area.c +++ b/app/widgets/gimptoolbox-indicator-area.c @@ -23,14 +23,14 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" -#include "appenv.h" #include "brush_select.h" #include "gimpcontext.h" #include "gimpcontextpreview.h" #include "gimpdnd.h" -#include "gimpui.h" #include "gradient_select.h" #include "indicator_area.h" #include "pattern_select.h" diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c index 2600e1a07f..066a6d868c 100644 --- a/app/widgets/gimptoolbox.c +++ b/app/widgets/gimptoolbox.c @@ -20,6 +20,8 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "app_procs.h" @@ -31,7 +33,6 @@ #include "gimpcontext.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "gtkhwrapbox.h" #include "indicator_area.h" #include "layer.h" diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c index 18788fa1dd..cc72d9dd35 100644 --- a/app/widgets/gimptooloptionseditor.c +++ b/app/widgets/gimptooloptionseditor.c @@ -20,11 +20,9 @@ #include -#include "apptypes.h" +#include "libgimpwidgets/gimpwidgets.h" -#include "tool_options.h" -#include "tool_options_dialog.h" -#include "tools.h" +#include "apptypes.h" #include "dialog_handler.h" #include "gimpcontext.h" @@ -32,6 +30,10 @@ #include "gimpui.h" #include "session.h" +#include "tool_options.h" +#include "tool_options_dialog.h" +#include "tools.h" + #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c index 10428166a4..f3e57eeb74 100644 --- a/app/widgets/gimpwidgets-utils.c +++ b/app/widgets/gimpwidgets-utils.c @@ -25,12 +25,12 @@ #include +#include "libgimpwidgets/gimpwidgets.h" + #include "apptypes.h" #include "gimpui.h" -#include "libgimp/gimphelpui.h" - #include "libgimp/gimpintl.h" diff --git a/app/widgets/gimpwidgets-utils.h b/app/widgets/gimpwidgets-utils.h index dcad168d00..95eea73e6c 100644 --- a/app/widgets/gimpwidgets-utils.h +++ b/app/widgets/gimpwidgets-utils.h @@ -23,17 +23,6 @@ #define __GIMP_UI_H__ -#include "libgimp/gimpchainbutton.h" -#include "libgimp/gimpdialog.h" -#include "libgimp/gimpfileselection.h" -#include "libgimp/gimphelpui.h" -#include "libgimp/gimppixmap.h" -#include "libgimp/gimppatheditor.h" -#include "libgimp/gimpquerybox.h" -#include "libgimp/gimpsizeentry.h" -#include "libgimp/gimpwidgets.h" - - /* a simple message box */ void gimp_message_box (gchar *message, diff --git a/configure.in b/configure.in index 1e165734b2..9537d35b45 100644 --- a/configure.in +++ b/configure.in @@ -736,6 +736,8 @@ libgimpcolor/Makefile libgimpcolor/makefile.mingw libgimpmath/Makefile libgimpmath/makefile.mingw +libgimpwidgets/Makefile +libgimpwidgets/makefile.mingw app/Makefile app/makefile.mingw app/pdb/Makefile diff --git a/gimptool-1.2.in b/gimptool-1.2.in index a9fa4e7e04..772f565efa 100644 --- a/gimptool-1.2.in +++ b/gimptool-1.2.in @@ -203,7 +203,7 @@ while test $# -gt 0; do done case $1 in --libs) - echo $libdirs -lgimpui -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; + echo $libdirs -lgimpui -lgimpwidgets -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; --libs-nogimpui) echo $libdirs -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; esac @@ -225,7 +225,7 @@ while test $# -gt 0; do fi fi done - echo -L@libdir@ -lgimp $my_glib_libs + echo -L@libdir@ -lgimp -lgimpcolor -lgimpmath $my_glib_libs ;; --install-bin | --install-admin-bin \ | --install-bin-strip | --install-admin-bin-strip \ diff --git a/gimptool.in b/gimptool.in index a9fa4e7e04..772f565efa 100644 --- a/gimptool.in +++ b/gimptool.in @@ -203,7 +203,7 @@ while test $# -gt 0; do done case $1 in --libs) - echo $libdirs -lgimpui -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; + echo $libdirs -lgimpui -lgimpwidgets -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; --libs-nogimpui) echo $libdirs -lgimp -lgimpcolor -lgimpmath $my_gtk_libs ;; esac @@ -225,7 +225,7 @@ while test $# -gt 0; do fi fi done - echo -L@libdir@ -lgimp $my_glib_libs + echo -L@libdir@ -lgimp -lgimpcolor -lgimpmath $my_glib_libs ;; --install-bin | --install-admin-bin \ | --install-bin-strip | --install-admin-bin-strip \ diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am index 215f523276..6f5ff5e7af 100644 --- a/libgimp/Makefile.am +++ b/libgimp/Makefile.am @@ -97,38 +97,14 @@ PDB_WRAPPERS_H = \ gimpunit_pdb.h libgimpi_a_SOURCES = \ - gimpchainbutton.c \ - gimpchainbutton.h \ - gimpcolorarea.c \ - gimpcolorarea.h \ - gimpcolorbutton.c \ - gimpcolorbutton.h \ - gimpdialog.c \ - gimpdialog.h \ gimpenv.c \ gimpenv.h \ - gimpfileselection.c \ - gimpfileselection.h \ - gimphelpui.c \ - gimphelpui.h \ - gimppatheditor.c \ - gimppatheditor.h \ - gimppixmap.c \ - gimppixmap.h \ gimpprotocol.c \ gimpprotocol.h \ - gimpquerybox.c \ - gimpquerybox.h \ gimpsignal.c \ gimpsignal.h \ - gimpsizeentry.c \ - gimpsizeentry.h \ - gimpunitmenu.c \ - gimpunitmenu.h \ gimputils.c \ gimputils.h \ - gimpwidgets.c \ - gimpwidgets.h \ gimpwire.c \ gimpwire.h \ gimpparasite.c \ @@ -149,6 +125,7 @@ endif libgimp_la_SOURCES = \ gimp.c \ gimp.h \ + gimptypes.h \ ${PDB_WRAPPERS_C} \ ${PDB_WRAPPERS_H} \ gimpadaptivesupersample.c \ @@ -193,77 +170,67 @@ libgimp_la_SOURCES = \ gimputils.h \ gimpwire.c \ gimpwire.h \ + \ + gimpintl.h \ stdplugins-intl.h \ libgimp-intl.h libgimpui_la_SOURCES = \ - gimpmenu.c \ - gimpbrushmenu.c \ - gimpgradientmenu.c \ - gimppatternmenu.c \ - gimpchainbutton.c \ - gimpcolorarea.c \ - gimpcolorbutton.c \ - gimpdialog.c \ - gimpexport.c \ - gimpfileselection.c \ - gimphelpui.c \ - gimppatheditor.c \ - gimppixmap.c \ - gimpquerybox.c \ - gimpsizeentry.c \ gimpui.c \ + gimpui.h \ gimpuitypes.h \ - gimpunitmenu.c \ - gimpwidgets.c + \ + gimpmenu.c \ + gimpmenu.h \ + gimpbrushmenu.c \ + gimpbrushmenu.h \ + gimpgradientmenu.c \ + gimpgradientmenu.h \ + gimppatternmenu.c \ + gimppatternmenu.h \ + \ + gimpexport.c \ + gimpexport.h gimpinclude_HEADERS = \ + gimpcolordisplay.h \ + gimpcolorselector.h \ + \ gimp.h \ + gimptypes.h \ ${PDB_WRAPPERS_H} \ gimpadaptivesupersample.h \ gimpbilinear.h \ - gimpchainbutton.h \ gimpchannel.h \ - gimpcolorarea.h \ - gimpcolorbutton.h \ - gimpcolordisplay.h \ - gimpcolorselector.h \ gimpcompat.h \ gimpdrawable.h \ - gimpdialog.h \ gimpenums.h \ gimpenv.h \ - gimpexport.h \ gimpfeatures.h \ - gimpfileselection.h \ gimpgradientselect.h \ - gimphelpui.h \ gimpimage.h \ gimplayer.h \ gimplimits.h \ - gimpmenu.h \ gimpmodule.h \ gimppalette.h \ gimpparasite.h \ gimpparasiteio.h \ - gimppatheditor.h \ gimppixelrgn.h \ - gimppixmap.h \ gimpproceduraldb.h \ - gimpquerybox.h \ gimpselection.h \ gimpsignal.h \ - gimpsizeentry.h \ gimptile.h \ - gimptypes.h \ + gimpunit.h \ + gimputils.h \ + \ + gimpexport.h \ + \ + gimpintl.h \ + \ gimpui.h \ gimpuitypes.h \ - gimpunit.h \ - gimpunitmenu.h \ - gimputils.h \ - gimpwidgets.h \ - gimpintl.h - + \ + gimpmenu.h libgimp_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ diff --git a/libgimp/gimpchainbutton.c b/libgimp/gimpchainbutton.c deleted file mode 100644 index 56d1ceab43..0000000000 --- a/libgimp/gimpchainbutton.c +++ /dev/null @@ -1,414 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpchainbutton.c - * Copyright (C) 1999-2000 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include "gimpchainbutton.h" - -#include "pixmaps/chain.xpm" - -static gchar **gimp_chain_xpm[] = -{ - chain_hor_xpm, - chain_ver_xpm -}; - -static gchar **gimp_chain_broken_xpm[] = -{ - chain_broken_hor_xpm, - chain_broken_ver_xpm -}; - -static guint gimp_chain_width[] = -{ - 24, - 9 -}; - -static guint gimp_chain_height[] = -{ - 9, - 24 -}; - -static void gimp_chain_button_destroy (GtkObject *object); -static void gimp_chain_button_realize (GtkWidget *widget); - -static void gimp_chain_button_clicked_callback (GtkWidget *widget, - GimpChainButton *gcb); -static gint gimp_chain_button_draw_lines (GtkWidget *widget, - GdkEventExpose *eevent, - GimpChainButton *gcb); - -enum -{ - TOGGLED, - LAST_SIGNAL -}; - -static guint gimp_chain_button_signals[LAST_SIGNAL] = { 0 }; - -static GtkTableClass *parent_class = NULL; - - -static void -gimp_chain_button_destroy (GtkObject *object) -{ - GimpChainButton *gcb; - - g_return_if_fail (gcb = GIMP_CHAIN_BUTTON (object)); - - if (gcb->broken) - gdk_pixmap_unref (gcb->broken); - if (gcb->broken_mask) - gdk_bitmap_unref (gcb->broken_mask); - - if (gcb->chain) - gdk_pixmap_unref (gcb->chain); - if (gcb->chain_mask) - gdk_bitmap_unref (gcb->chain_mask); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gimp_chain_button_class_init (GimpChainButtonClass *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass*) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_table_get_type ()); - - object_class->destroy = gimp_chain_button_destroy; - - gimp_chain_button_signals[TOGGLED] = - gtk_signal_new ("toggled", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpChainButtonClass, - toggled), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, gimp_chain_button_signals, - LAST_SIGNAL); - - class->toggled = NULL; - - widget_class->realize = gimp_chain_button_realize; -} - -static void -gimp_chain_button_init (GimpChainButton *gcb) -{ - gcb->position = GIMP_CHAIN_TOP; - gcb->line1 = gtk_drawing_area_new (); - gcb->line2 = gtk_drawing_area_new (); - gcb->pixmap = NULL; - gcb->broken = NULL; - gcb->broken_mask = NULL; - gcb->chain = NULL; - gcb->chain_mask = NULL; - gcb->active = FALSE; - - gcb->button = gtk_button_new (); - gtk_button_set_relief (GTK_BUTTON (gcb->button), GTK_RELIEF_NONE); - - gcb->pixmap = gtk_type_new (gtk_pixmap_get_type ()); - gtk_pixmap_set_build_insensitive (GTK_PIXMAP (gcb->pixmap), TRUE); - - gtk_signal_connect (GTK_OBJECT(gcb->button), "clicked", - GTK_SIGNAL_FUNC (gimp_chain_button_clicked_callback), gcb); - gtk_signal_connect (GTK_OBJECT (gcb->line1), "expose_event", - GTK_SIGNAL_FUNC (gimp_chain_button_draw_lines), - gcb); - gtk_signal_connect (GTK_OBJECT (gcb->line2), "expose_event", - GTK_SIGNAL_FUNC (gimp_chain_button_draw_lines), - gcb); -} - -GtkType -gimp_chain_button_get_type (void) -{ - static guint gcb_type = 0; - - if (!gcb_type) - { - GtkTypeInfo gcb_info = - { - "GimpChainButton", - sizeof (GimpChainButton), - sizeof (GimpChainButtonClass), - (GtkClassInitFunc) gimp_chain_button_class_init, - (GtkObjectInitFunc) gimp_chain_button_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gcb_type = gtk_type_unique (gtk_table_get_type (), &gcb_info); - } - - return gcb_type; -} - -/** - * gimp_chain_button_new: - * @position: The position you are going to use for the button - * with respect to the widgets you want to chain. - * - * Creates a new #GimpChainButton widget. - * - * This returns a button showing either a broken or a linked chain and - * small clamps attached to both sides that visually group the two widgets - * you want to connect. This widget looks best when attached - * to a table taking up two columns (or rows respectively) next - * to the widgets that it is supposed to connect. It may work - * for more than two widgets, but the look is optimized for two. - * - * Returns: Pointer to the new #GimpChainButton, which is inactive - * by default. Use gimp_chain_button_set_active() to - * change its state. - */ -GtkWidget * -gimp_chain_button_new (GimpChainPosition position) -{ - GimpChainButton *gcb; - - gcb = gtk_type_new (gimp_chain_button_get_type ()); - - gcb->position = position; - - gcb->pixmap->requisition.width = - gimp_chain_width[position % 2] + GTK_MISC (gcb->pixmap)->xpad * 2; - gcb->pixmap->requisition.height = - gimp_chain_height[position % 2] + GTK_MISC (gcb->pixmap)->ypad * 2; - - gtk_container_add (GTK_CONTAINER (gcb->button), gcb->pixmap); - gtk_widget_show (gcb->pixmap); - gtk_widget_show (gcb->button); - - if (position & GIMP_CHAIN_LEFT) /* are we a vertical chainbutton? */ - { - gtk_table_resize (GTK_TABLE (gcb), 3, 1); - gtk_table_attach (GTK_TABLE (gcb), gcb->button, 0, 1, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_table_attach_defaults (GTK_TABLE (gcb), gcb->line1, 0, 1, 0, 1); - gtk_table_attach_defaults (GTK_TABLE (gcb), gcb->line2, 0, 1, 2, 3); - } - else - { - gtk_table_resize (GTK_TABLE (gcb), 1, 3); - gtk_table_attach (GTK_TABLE (gcb), gcb->button, 1, 2, 0, 1, - GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_table_attach_defaults (GTK_TABLE (gcb), gcb->line1, 0, 1, 0, 1); - gtk_table_attach_defaults (GTK_TABLE (gcb), gcb->line2, 2, 3, 0, 1); - } - - gtk_widget_show (gcb->line1); - gtk_widget_show (gcb->line2); - - return GTK_WIDGET (gcb); -} - -/** - * gimp_chain_button_set_active: - * @gcb: Pointer to a #GimpChainButton. - * @is_active: The new state. - * - * Sets the state of the #GimpChainButton to be either locked (TRUE) or - * unlocked (FALSE) and changes the showed pixmap to reflect the new state. - */ -void -gimp_chain_button_set_active (GimpChainButton *gcb, - gboolean is_active) -{ - g_return_if_fail (GIMP_IS_CHAIN_BUTTON (gcb)); - - if (gcb->active != is_active) - { - gcb->active = is_active; - - if (!GTK_WIDGET_REALIZED (GTK_WIDGET (gcb))) - return; - - if (gcb->active) - gtk_pixmap_set (GTK_PIXMAP(gcb->pixmap), gcb->chain, gcb->chain_mask); - else - gtk_pixmap_set (GTK_PIXMAP(gcb->pixmap), gcb->broken, gcb->broken_mask); - } -} - -/** - * gimp_chain_button_get_active - * @gcb: Pointer to a #GimpChainButton. - * - * Checks the state of the #GimpChainButton. - * - * Returns: TRUE if the #GimpChainButton is active (locked). - */ -gboolean -gimp_chain_button_get_active (GimpChainButton *gcb) -{ - g_return_val_if_fail (GIMP_IS_CHAIN_BUTTON (gcb), FALSE); - - return gcb->active; -} - - -static void -gimp_chain_button_realize (GtkWidget *widget) -{ - GimpChainButton *gcb; - GtkStyle *style; - - gcb = GIMP_CHAIN_BUTTON (widget); - - if (GTK_WIDGET_CLASS (parent_class)->realize) - (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - - style = gtk_widget_get_style (widget); - gcb->chain = gdk_pixmap_create_from_xpm_d (widget->window, - &gcb->chain_mask, - &style->bg[GTK_STATE_NORMAL], - gimp_chain_xpm[gcb->position % 2]); - gcb->broken = gdk_pixmap_create_from_xpm_d (widget->window, - &gcb->broken_mask, - &style->bg[GTK_STATE_NORMAL], - gimp_chain_broken_xpm[gcb->position % 2]); - - if (gcb->active) - gtk_pixmap_set (GTK_PIXMAP (gcb->pixmap), gcb->chain, gcb->chain_mask); - else - gtk_pixmap_set (GTK_PIXMAP (gcb->pixmap), gcb->broken, gcb->broken_mask); - - gtk_widget_realize (gcb->line1); - gtk_style_set_background (widget->style, gcb->line1->window, GTK_STATE_NORMAL); - gdk_window_set_back_pixmap (gcb->line1->window, NULL, TRUE); - - gtk_widget_realize (gcb->line2); - gtk_style_set_background (widget->style, gcb->line2->window, GTK_STATE_NORMAL); - gdk_window_set_back_pixmap (gcb->line2->window, NULL, TRUE); -} - -static void -gimp_chain_button_clicked_callback (GtkWidget *widget, - GimpChainButton *gcb) -{ - g_return_if_fail (GIMP_IS_CHAIN_BUTTON (gcb)); - - gcb->active = !(gcb->active); - - if (!GTK_WIDGET_REALIZED (GTK_WIDGET (gcb))) - return; - - if (gcb->active) - gtk_pixmap_set (GTK_PIXMAP(gcb->pixmap), gcb->chain, gcb->chain_mask); - else - gtk_pixmap_set (GTK_PIXMAP(gcb->pixmap), gcb->broken, gcb->broken_mask); - - gtk_signal_emit (GTK_OBJECT (gcb), gimp_chain_button_signals[TOGGLED]); -} - -static gint -gimp_chain_button_draw_lines (GtkWidget *widget, - GdkEventExpose *eevent, - GimpChainButton *gcb) -{ - GdkPoint points[3]; - GdkPoint buf; - GtkShadowType shadow; - gint which_line; - -#define SHORT_LINE 4 - /* don't set this too high, there's no check against drawing outside - the widgets bounds yet (and probably never will be) */ - - g_return_val_if_fail (GIMP_IS_CHAIN_BUTTON (gcb), FALSE); - - points[0].x = widget->allocation.width / 2; - points[0].y = widget->allocation.height / 2; - - which_line = (widget == gcb->line1) ? 1 : -1; - - switch (gcb->position) - { - case GIMP_CHAIN_LEFT: - points[0].x += SHORT_LINE; - points[1].x = points[0].x - SHORT_LINE; - points[1].y = points[0].y; - points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; - shadow = GTK_SHADOW_ETCHED_IN; - break; - case GIMP_CHAIN_RIGHT: - points[0].x -= SHORT_LINE; - points[1].x = points[0].x + SHORT_LINE; - points[1].y = points[0].y; - points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; - shadow = GTK_SHADOW_ETCHED_OUT; - break; - case GIMP_CHAIN_TOP: - points[0].y += SHORT_LINE; - points[1].x = points[0].x; - points[1].y = points[0].y - SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; - points[2].y = points[1].y; - shadow = GTK_SHADOW_ETCHED_OUT; - break; - case GIMP_CHAIN_BOTTOM: - points[0].y -= SHORT_LINE; - points[1].x = points[0].x; - points[1].y = points[0].y + SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; - points[2].y = points[1].y; - shadow = GTK_SHADOW_ETCHED_IN; - break; - default: - return FALSE; - } - - if ( ((shadow == GTK_SHADOW_ETCHED_OUT) && (which_line == -1)) || - ((shadow == GTK_SHADOW_ETCHED_IN) && (which_line == 1)) ) - { - buf = points[0]; - points[0] = points[2]; - points[2] = buf; - } - - gtk_paint_polygon (widget->style, - widget->window, - GTK_STATE_NORMAL, - shadow, - &eevent->area, - widget, - "chainbutton", - points, - 3, - FALSE); - - return TRUE; -} diff --git a/libgimp/gimpchainbutton.h b/libgimp/gimpchainbutton.h deleted file mode 100644 index d7d749c290..0000000000 --- a/libgimp/gimpchainbutton.h +++ /dev/null @@ -1,92 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpchainbutton.h - * Copyright (C) 1999-2000 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * This implements a widget derived from GtkTable that visualizes - * it's state with two different pixmaps showing a closed and a - * broken chain. It's intented to be used with the GimpSizeEntry - * widget. The usage is quite similar to the one the GtkToggleButton - * provides. - */ - -#ifndef __GIMP_CHAIN_BUTTON_H__ -#define __GIMP_CHAIN_BUTTON_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GIMP_TYPE_CHAIN_BUTTON (gimp_chain_button_get_type ()) -#define GIMP_CHAIN_BUTTON(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHAIN_BUTTON, GimpChainButton)) -#define GIMP_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHAIN_BUTTON, GimpChainButtonClass)) -#define GIMP_IS_CHAIN_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHAIN_BUTTON)) -#define GIMP_IS_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHAIN_BUTTON)) - -typedef struct _GimpChainButton GimpChainButton; -typedef struct _GimpChainButtonClass GimpChainButtonClass; - -typedef enum -{ - GIMP_CHAIN_TOP, - GIMP_CHAIN_LEFT, - GIMP_CHAIN_BOTTOM, - GIMP_CHAIN_RIGHT -} GimpChainPosition; - - -struct _GimpChainButton -{ - GtkTable table; - - GimpChainPosition position; - GtkWidget *button; - GtkWidget *line1; - GtkWidget *line2; - GtkWidget *pixmap; - GdkPixmap *broken; - GdkBitmap *broken_mask; - GdkPixmap *chain; - GdkBitmap *chain_mask; - gboolean active; -}; - -struct _GimpChainButtonClass -{ - GtkTableClass parent_class; - - void (* toggled) (GimpChainButton *gcb); -}; - - -GtkType gimp_chain_button_get_type (void); -GtkWidget * gimp_chain_button_new (GimpChainPosition position); -void gimp_chain_button_set_active (GimpChainButton *gcb, - gboolean is_active); -gboolean gimp_chain_button_get_active (GimpChainButton *gcb); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __CHAIN_BUTTON_H__ */ diff --git a/libgimp/gimpcolorarea.c b/libgimp/gimpcolorarea.c deleted file mode 100644 index f3fdae340d..0000000000 --- a/libgimp/gimpcolorarea.c +++ /dev/null @@ -1,523 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpcolorarea.c - * Copyright (C) 2001 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimp.h" - -#include "gimpuitypes.h" - -#include "gimpcolorarea.h" -#include "gimplimits.h" - - -#define DRAG_PREVIEW_SIZE 32 -#define DRAG_ICON_OFFSET -8 - - -static const GtkTargetEntry targets[] = { { "application/x-color", 0 } }; - - -struct _GimpColorArea -{ - GtkPreview preview; - - GimpColorAreaType type; - GimpRGB color; -}; - -enum -{ - COLOR_CHANGED, - LAST_SIGNAL -}; - -static guint gimp_color_area_signals[LAST_SIGNAL] = { 0 }; -static GtkWidgetClass *parent_class = NULL; - - -static void gimp_color_area_class_init (GimpColorAreaClass *klass); -static void gimp_color_area_init (GimpColorArea *gca); -static void gimp_color_area_destroy (GtkObject *object); -static void gimp_color_area_update (GimpColorArea *gca); - -static void gimp_color_area_drag_begin (GtkWidget *widget, - GdkDragContext *context); -static void gimp_color_area_drag_end (GtkWidget *widget, - GdkDragContext *context); -static void gimp_color_area_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *selection_data, - guint info, - guint time); -static void gimp_color_area_drag_data_get (GtkWidget *widget, - GdkDragContext *context, - GtkSelectionData *selection_data, - guint info, - guint time); - -GtkType -gimp_color_area_get_type (void) -{ - static guint gca_type = 0; - - if (!gca_type) - { - GtkTypeInfo gca_info = - { - "GimpColorArea", - sizeof (GimpColorArea), - sizeof (GimpColorAreaClass), - (GtkClassInitFunc) gimp_color_area_class_init, - (GtkObjectInitFunc) gimp_color_area_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gca_type = gtk_type_unique (gtk_preview_get_type (), &gca_info); - } - - return gca_type; -} - -static void -gimp_color_area_class_init (GimpColorAreaClass *klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass*) klass; - widget_class = (GtkWidgetClass*) klass; - - parent_class = gtk_type_class (gtk_preview_get_type ()); - - gimp_color_area_signals[COLOR_CHANGED] = - gtk_signal_new ("color_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpColorAreaClass, - color_changed), - gtk_signal_default_marshaller, - GTK_TYPE_NONE, - 0); - - gtk_object_class_add_signals (object_class, gimp_color_area_signals, - LAST_SIGNAL); - - klass->color_changed = NULL; - - object_class->destroy = gimp_color_area_destroy; - - widget_class->drag_begin = gimp_color_area_drag_begin; - widget_class->drag_end = gimp_color_area_drag_end; - widget_class->drag_data_received = gimp_color_area_drag_data_received; - widget_class->drag_data_get = gimp_color_area_drag_data_get; -} - -static void -gimp_color_area_init (GimpColorArea *gca) -{ - gimp_rgba_set (&gca->color, 0.0, 0.0, 0.0, 1.0); - gca->type = GIMP_COLOR_AREA_FLAT; - - GTK_PREVIEW (gca)->type = GTK_PREVIEW_COLOR; - GTK_PREVIEW (gca)->bpp = 3; - GTK_PREVIEW (gca)->dither = GDK_RGB_DITHER_NORMAL; - GTK_PREVIEW (gca)->expand = TRUE; - - gtk_signal_connect_after (GTK_OBJECT (gca), "realize", - GTK_SIGNAL_FUNC (gimp_color_area_update), - NULL); - gtk_signal_connect (GTK_OBJECT (gca), "size_allocate", - GTK_SIGNAL_FUNC (gimp_color_area_update), - NULL); -} - -static void -gimp_color_area_destroy (GtkObject *object) -{ - GimpColorArea *gca; - - g_return_if_fail (object != NULL); - g_return_if_fail (GIMP_IS_COLOR_AREA (object)); - - gca = GIMP_COLOR_AREA (object); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -/** - * gimp_color_area_new: - * @color: A pointer to a #GimpRGB struct. - * @alpha: If the color_area should show alpha. - * @drag_mask: The event_mask that should trigger drags. - * - * Creates a new #GimpColorArea widget. - * - * This returns a preview area showing the color. It handles color - * DND. If the color changes, the "color_changed" signal is emitted. - * - * Returns: Pointer to the new #GimpColorArea widget. - **/ -GtkWidget * -gimp_color_area_new (const GimpRGB *color, - GimpColorAreaType type, - GdkModifierType drag_mask) -{ - GimpColorArea *gca; - - g_return_val_if_fail (color != NULL, NULL); - - gca = gtk_type_new (gimp_color_area_get_type ()); - - gca->color = *color; - gca->type = type; - - gtk_drag_dest_set (GTK_WIDGET (gca), - GTK_DEST_DEFAULT_HIGHLIGHT | - GTK_DEST_DEFAULT_MOTION | - GTK_DEST_DEFAULT_DROP, - targets, 1, - GDK_ACTION_COPY); - - /* do we need this ?? */ - drag_mask &= (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK); - - if (drag_mask) - gtk_drag_source_set (GTK_WIDGET (gca), - drag_mask, - targets, 1, - GDK_ACTION_COPY | GDK_ACTION_MOVE); - - return GTK_WIDGET (gca); -} - -/** - * gimp_color_area_set_color: - * @gca: Pointer to a #GimpColorArea. - * @color: - * - **/ -void -gimp_color_area_set_color (GimpColorArea *gca, - const GimpRGB *color) -{ - g_return_if_fail (gca != NULL); - g_return_if_fail (GIMP_IS_COLOR_AREA (gca)); - - g_return_if_fail (color != NULL); - - if (gimp_rgba_distance (&gca->color, color) > 0.000001) - { - gca->color = *color; - - gimp_color_area_update (gca); - - gtk_signal_emit (GTK_OBJECT (gca), - gimp_color_area_signals[COLOR_CHANGED]); - } -} - -void -gimp_color_area_get_color (GimpColorArea *gca, - GimpRGB *color) -{ - g_return_if_fail (gca != NULL); - g_return_if_fail (GIMP_IS_COLOR_AREA (gca)); - - *color = gca->color; -} - -gboolean -gimp_color_area_has_alpha (GimpColorArea *gca) -{ - g_return_val_if_fail (gca != NULL, FALSE); - g_return_val_if_fail (GIMP_IS_COLOR_AREA (gca), FALSE); - - return gca->type != GIMP_COLOR_AREA_FLAT; -} - -void -gimp_color_area_set_type (GimpColorArea *gca, - GimpColorAreaType type) -{ - g_return_if_fail (gca != NULL); - g_return_if_fail (GIMP_IS_COLOR_AREA (gca)); - - gca->type = type; - gimp_color_area_update (gca); -} - -static void -gimp_color_area_update (GimpColorArea *gca) -{ - gint window_width, window_height; - guint width, height; - guint x, y; - guint check_size = 0; - guchar light[3]; - guchar dark[3]; - guchar opaque[3]; - guchar *p; - guchar *buf; - gdouble frac; - - g_return_if_fail (gca != NULL); - g_return_if_fail (GIMP_IS_COLOR_AREA (gca)); - - if (! GTK_WIDGET_REALIZED (GTK_WIDGET (gca))) - return; - - gdk_window_get_size (GTK_WIDGET (gca)->window, - &window_width, &window_height); - - if (window_width < 1 || window_height < 1) - return; - - width = window_width; - height = window_height; - - switch (gca->type) - { - case GIMP_COLOR_AREA_FLAT: - check_size = 0; - break; - - case GIMP_COLOR_AREA_SMALL_CHECKS: - check_size = GIMP_CHECK_SIZE_SM; - break; - - case GIMP_COLOR_AREA_LARGE_CHECKS: - check_size = GIMP_CHECK_SIZE; - break; - } - - p = buf = g_new (guchar, width * 3); - - opaque[0] = gca->color.r * 255.999; - opaque[1] = gca->color.g * 255.999; - opaque[2] = gca->color.b * 255.999; - - if (check_size && gca->color.a < 1.0) - { - light[0] = (GIMP_CHECK_LIGHT + - (gca->color.r - GIMP_CHECK_LIGHT) * gca->color.a) * 255.999; - dark[0] = (GIMP_CHECK_DARK + - (gca->color.r - GIMP_CHECK_DARK) * gca->color.a) * 255.999; - light[1] = (GIMP_CHECK_LIGHT + - (gca->color.g - GIMP_CHECK_LIGHT) * gca->color.a) * 255.999; - dark[1] = (GIMP_CHECK_DARK + - (gca->color.g - GIMP_CHECK_DARK) * gca->color.a) * 255.999; - light[2] = (GIMP_CHECK_LIGHT + - (gca->color.b - GIMP_CHECK_LIGHT) * gca->color.a) * 255.999; - dark[2] = (GIMP_CHECK_DARK + - (gca->color.b - GIMP_CHECK_DARK) * gca->color.a) * 255.999; - - for (y = 0; y < height; y++) - { - p = buf; - - for (x = 0; x < width; x++) - { - if (x * height > y * width) - { - *p++ = opaque[0]; - *p++ = opaque[1]; - *p++ = opaque[2]; - - continue; - } - - frac = y - (gdouble) (x * height) / (gdouble) width; - - if (((x / check_size) ^ (y / check_size)) & 1) - { - if ((gint) frac) - { - *p++ = light[0]; - *p++ = light[1]; - *p++ = light[2]; - } - else - { - *p++ = (gdouble) light[0] * frac + - (gdouble) opaque[0] * (1.0 - frac); - *p++ = (gdouble) light[1] * frac + - (gdouble) opaque[1] * (1.0 - frac); - *p++ = (gdouble) light[2] * frac + - (gdouble) opaque[2] * (1.0 - frac); - } - } - else - { - if ((gint) frac) - { - *p++ = dark[0]; - *p++ = dark[1]; - *p++ = dark[2]; - } - else - { - *p++ = (gdouble) dark[0] * frac + - (gdouble) opaque[0] * (1.0 - frac); - *p++ = (gdouble) dark[1] * frac + - (gdouble) opaque[1] * (1.0 - frac); - *p++ = (gdouble) dark[2] * frac + - (gdouble) opaque[2] * (1.0 - frac); - } - } - } - - gtk_preview_draw_row (GTK_PREVIEW (gca), buf, - 0, height - y - 1, width); - } - } - else - { - for (x = 0; x < width; x++) - { - *p++ = opaque[0]; - *p++ = opaque[1]; - *p++ = opaque[2]; - } - - for (y = 0; y < height; y++) - gtk_preview_draw_row (GTK_PREVIEW (gca), buf, 0, y, width); - } - - g_free (buf); - - gtk_widget_queue_draw (GTK_WIDGET (gca)); -} - -static void -gimp_color_area_drag_begin (GtkWidget *widget, - GdkDragContext *context) -{ - GimpRGB color; - GtkWidget *window; - GtkWidget *frame; - GtkWidget *color_area; - - window = gtk_window_new (GTK_WINDOW_POPUP); - gtk_widget_realize (window); - - frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); - gtk_container_add (GTK_CONTAINER (window), frame); - - gimp_color_area_get_color (GIMP_COLOR_AREA (widget), &color); - - color_area = - gimp_color_area_new (&color, - GIMP_COLOR_AREA (widget)->type, - 0); - - gtk_widget_set_usize (color_area, DRAG_PREVIEW_SIZE, DRAG_PREVIEW_SIZE); - gtk_container_add (GTK_CONTAINER (frame), color_area); - gtk_widget_show (color_area); - gtk_widget_show (frame); - - gtk_object_set_data_full (GTK_OBJECT (widget), - "gimp-color-area-drag-window", - window, - (GtkDestroyNotify) gtk_widget_destroy); - - gtk_drag_set_icon_widget (context, window, DRAG_ICON_OFFSET, DRAG_ICON_OFFSET); -} - -static void -gimp_color_area_drag_end (GtkWidget *widget, - GdkDragContext *context) -{ - gtk_object_set_data (GTK_OBJECT (widget), - "gimp-color-area-drag-window", NULL); -} - -static void -gimp_color_area_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *selection_data, - guint info, - guint time) -{ - GimpColorArea *gca; - GimpRGB color; - guint16 *vals; - - gca = GIMP_COLOR_AREA (widget); - - if (selection_data->length < 0) - return; - - if ((selection_data->format != 16) || - (selection_data->length != 8)) - { - g_warning ("Received invalid color data"); - return; - } - - vals = (guint16 *)selection_data->data; - - gimp_rgba_set (&color, - (gdouble) vals[0] / 0xffff, - (gdouble) vals[1] / 0xffff, - (gdouble) vals[2] / 0xffff, - (gdouble) vals[3] / 0xffff); - - gimp_color_area_set_color (gca, &color); -} - -static void -gimp_color_area_drag_data_get (GtkWidget *widget, - GdkDragContext *context, - GtkSelectionData *selection_data, - guint info, - guint time) -{ - GimpColorArea *gca; - guint16 vals[4]; - - gca = GIMP_COLOR_AREA (widget); - - vals[0] = gca->color.r * 0xffff; - vals[1] = gca->color.g * 0xffff; - vals[2] = gca->color.b * 0xffff; - - if (gca->type == GIMP_COLOR_AREA_FLAT) - vals[3] = 0xffff; - else - vals[3] = gca->color.a * 0xffff; - - gtk_selection_data_set (selection_data, - gdk_atom_intern ("application/x-color", FALSE), - 16, (guchar *)vals, 8); -} - diff --git a/libgimp/gimpcolorarea.h b/libgimp/gimpcolorarea.h deleted file mode 100644 index 036aec820c..0000000000 --- a/libgimp/gimpcolorarea.h +++ /dev/null @@ -1,81 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpcolorarea.h - * Copyright (C) 2001 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* This provides a color preview area. The preview - * can handle transparency by showing the checkerboard and - * handles drag'n'drop. - */ - -#ifndef __GIMP_COLOR_AREA_H__ -#define __GIMP_COLOR_AREA_H__ - - -#include - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GIMP_TYPE_COLOR_AREA (gimp_color_area_get_type ()) -#define GIMP_COLOR_AREA(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_COLOR_AREA, GimpColorArea)) -#define GIMP_COLOR_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_AREA, GimpColorAreaClass)) -#define GIMP_IS_COLOR_AREA(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_COLOR_AREA)) -#define GIMP_IS_COLOR_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_AREA)) - - -typedef enum -{ - GIMP_COLOR_AREA_FLAT = 0, - GIMP_COLOR_AREA_SMALL_CHECKS, - GIMP_COLOR_AREA_LARGE_CHECKS -} GimpColorAreaType; - -typedef struct _GimpColorAreaClass GimpColorAreaClass; - -struct _GimpColorAreaClass -{ - GtkPreviewClass parent_class; - - void (* color_changed) (GimpColorArea *gca); -}; - - -GtkType gimp_color_area_get_type (void); -GtkWidget * gimp_color_area_new (const GimpRGB *color, - GimpColorAreaType type, - GdkModifierType drag_mask); -void gimp_color_area_set_color (GimpColorArea *gca, - const GimpRGB *color); -void gimp_color_area_get_color (GimpColorArea *gca, - GimpRGB *color); -gboolean gimp_color_area_has_alpha (GimpColorArea *gca); -void gimp_color_area_set_type (GimpColorArea *gca, - GimpColorAreaType type); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_COLOR_AREA_H__ */ diff --git a/libgimp/gimpcolorbutton.c b/libgimp/gimpcolorbutton.c deleted file mode 100644 index 9becbcfa88..0000000000 --- a/libgimp/gimpcolorbutton.c +++ /dev/null @@ -1,477 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpcolorbutton.c - * Copyright (C) 1999-2001 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimp.h" - -#include "gimpuitypes.h" - -#include "gimpcolorarea.h" -#include "gimpcolorbutton.h" -#include "gimplimits.h" - -#include "libgimp-intl.h" - - -static void gimp_color_button_class_init (GimpColorButtonClass *klass); -static void gimp_color_button_init (GimpColorButton *gcb); -static void gimp_color_button_destroy (GtkObject *object); - -static void gimp_color_button_clicked (GtkButton *button); -static void gimp_color_button_state_changed (GtkWidget *widget, - GtkStateType previous_state); - -static void gimp_color_button_dialog_ok (GtkWidget *widget, - gpointer data); -static void gimp_color_button_dialog_cancel (GtkWidget *widget, - gpointer data); - -static void gimp_color_button_use_fg (gpointer callback_data, - guint callback_action, - GtkWidget *widget); -static void gimp_color_button_use_bg (gpointer callback_data, - guint callback_action, - GtkWidget *widget); - -static gint gimp_color_button_menu_popup (GtkWidget *widget, - GdkEvent *event, - gpointer data); -static gchar * gimp_color_button_menu_translate (const gchar *path, - gpointer func_data); - -static void gimp_color_button_color_changed (GtkObject *object, - gpointer data); - - -static GtkItemFactoryEntry menu_items[] = -{ - { N_("/Use Foreground Color"), NULL, gimp_color_button_use_fg, 2, NULL }, - { N_("/Use Background Color"), NULL, gimp_color_button_use_bg, 2, NULL } -}; -static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); - - -enum -{ - COLOR_CHANGED, - LAST_SIGNAL -}; - -static guint gimp_color_button_signals[LAST_SIGNAL] = { 0 }; - -static GtkPreviewClass *parent_class = NULL; - - -static void -gimp_color_button_destroy (GtkObject *object) -{ - GimpColorButton *gcb; - - g_return_if_fail (gcb = GIMP_COLOR_BUTTON (object)); - - g_free (gcb->title); - - if (gcb->dialog) - gtk_widget_destroy (gcb->dialog); - - if (gcb->color_area) - gtk_widget_destroy (gcb->color_area); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - - -static void -gimp_color_button_class_init (GimpColorButtonClass *klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkButtonClass *button_class; - - object_class = (GtkObjectClass *) klass; - widget_class = (GtkWidgetClass *) klass; - button_class = (GtkButtonClass *) klass; - - parent_class = gtk_type_class (gtk_widget_get_type ()); - - gimp_color_button_signals[COLOR_CHANGED] = - gtk_signal_new ("color_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpColorButtonClass, - color_changed), - gtk_signal_default_marshaller, - GTK_TYPE_NONE, - 0); - - gtk_object_class_add_signals (object_class, gimp_color_button_signals, - LAST_SIGNAL); - - klass->color_changed = NULL; - - object_class->destroy = gimp_color_button_destroy; - widget_class->state_changed = gimp_color_button_state_changed; - button_class->clicked = gimp_color_button_clicked; -} - -static void -gimp_color_button_init (GimpColorButton *gcb) -{ - GimpRGB color; - - gcb->title = NULL; - gcb->dialog = NULL; - - gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0); - gcb->color_area = gimp_color_area_new (&color, FALSE, GDK_BUTTON2_MASK); - gtk_signal_connect (GTK_OBJECT (gcb->color_area), "color_changed", - gimp_color_button_color_changed, - gcb); - - gtk_container_add (GTK_CONTAINER (gcb), gcb->color_area); - gtk_widget_show (gcb->color_area); - - /* right-click opens a popup */ - gcb->item_factory = gtk_item_factory_new (GTK_TYPE_MENU, "", NULL); - gtk_item_factory_set_translate_func (gcb->item_factory, - gimp_color_button_menu_translate, - NULL, NULL); - gtk_item_factory_create_items (gcb->item_factory, - nmenu_items, menu_items, gcb); - gtk_signal_connect (GTK_OBJECT (gcb), "button_press_event", - GTK_SIGNAL_FUNC (gimp_color_button_menu_popup), - gcb); -} - -GtkType -gimp_color_button_get_type (void) -{ - static guint gcb_type = 0; - - if (!gcb_type) - { - GtkTypeInfo gcb_info = - { - "GimpColorButton", - sizeof (GimpColorButton), - sizeof (GimpColorButtonClass), - (GtkClassInitFunc) gimp_color_button_class_init, - (GtkObjectInitFunc) gimp_color_button_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gcb_type = gtk_type_unique (gtk_button_get_type (), &gcb_info); - } - - return gcb_type; -} - -/** - * gimp_color_button_new: - * @title: String that will be used as title for the color_selector. - * @width: Width of the colorpreview in pixels. - * @height: Height of the colorpreview in pixels. - * @color: A pointer to a #GimpRGB color. - * @type: - * - * Creates a new #GimpColorButton widget. - * - * This returns a button with a preview showing the color. - * When the button is clicked a GtkColorSelectionDialog is opened. - * If the user changes the color the new color is written into the - * array that was used to pass the initial color and the "color_changed" - * signal is emitted. - * - * Returns: Pointer to the new #GimpColorButton widget. - **/ -GtkWidget * -gimp_color_button_new (const gchar *title, - gint width, - gint height, - const GimpRGB *color, - GimpColorAreaType type) -{ - GimpColorButton *gcb; - - g_return_val_if_fail (color != NULL, NULL); - - gcb = gtk_type_new (gimp_color_button_get_type ()); - - gcb->title = g_strdup (title); - - gtk_widget_set_usize (GTK_WIDGET (gcb->color_area), width, height); - - gimp_color_area_set_color (GIMP_COLOR_AREA (gcb->color_area), color); - gimp_color_area_set_type (GIMP_COLOR_AREA (gcb->color_area), type); - - return GTK_WIDGET (gcb); -} - -/** - * gimp_color_button_set_color: - * @gcb: Pointer to a #GimpColorButton. - * @color: Pointer to the new #GimpRGB color. - * - **/ -void -gimp_color_button_set_color (GimpColorButton *gcb, - const GimpRGB *color) -{ - g_return_if_fail (gcb != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (gcb)); - - g_return_if_fail (color != NULL); - - gimp_color_area_set_color (GIMP_COLOR_AREA (gcb->color_area), color); -} - -/** - * gimp_color_button_get_color: - * @gcb: Pointer to a #GimpColorButton. - * - **/ -void -gimp_color_button_get_color (GimpColorButton *gcb, - GimpRGB *color) -{ - g_return_if_fail (gcb != NULL); - g_return_if_fail (color != NULL); - - g_return_if_fail (color != NULL); - - gimp_color_area_get_color (GIMP_COLOR_AREA (gcb->color_area), color); -} - -/** - * gimp_color_button_has_alpha: - * @gcb: Pointer to a #GimpColorButton. - * - **/ -gboolean -gimp_color_button_has_alpha (GimpColorButton *gcb) -{ - g_return_val_if_fail (gcb != NULL, FALSE); - - return gimp_color_area_has_alpha (GIMP_COLOR_AREA (gcb->color_area)); -} - -void -gimp_color_button_set_type (GimpColorButton *gcb, - GimpColorAreaType type) -{ - g_return_if_fail (gcb != NULL); - - gimp_color_area_set_type (GIMP_COLOR_AREA (gcb->color_area), type); -} - -static void -gimp_color_button_state_changed (GtkWidget *widget, - GtkStateType previous_state) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (widget)); - - if (!GTK_WIDGET_IS_SENSITIVE (widget) && GIMP_COLOR_BUTTON (widget)->dialog) - gtk_widget_hide (GIMP_COLOR_BUTTON (widget)->dialog); - - if (GTK_WIDGET_CLASS (parent_class)->state_changed) - GTK_WIDGET_CLASS (parent_class)->state_changed (widget, previous_state); -} - -static gint -gimp_color_button_menu_popup (GtkWidget *widget, - GdkEvent *event, - gpointer data) -{ - GimpColorButton *gcb; - GdkEventButton *bevent; - gint x; - gint y; - - g_return_val_if_fail (data != NULL, FALSE); - g_return_val_if_fail (GIMP_IS_COLOR_BUTTON (data), FALSE); - - gcb = GIMP_COLOR_BUTTON (data); - - if (event->type != GDK_BUTTON_PRESS) - return FALSE; - - bevent = (GdkEventButton *) event; - - if (bevent->button != 3) - return FALSE; - - gdk_window_get_origin (GTK_WIDGET (widget)->window, &x, &y); - gtk_item_factory_popup (gcb->item_factory, - x + bevent->x, y + bevent->y, - bevent->button, bevent->time); - - return (TRUE); -} - -static void -gimp_color_button_clicked (GtkButton *button) -{ - GimpColorButton *gcb; - GimpRGB color; - gdouble dcolor[4]; - - g_return_if_fail (button != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (button)); - - gcb = GIMP_COLOR_BUTTON (button); - - gimp_color_button_get_color (gcb, &color); - - dcolor[0] = color.r; - dcolor[1] = color.g; - dcolor[2] = color.b; - dcolor[3] = color.a; - - if (!gcb->dialog) - { - gcb->dialog = gtk_color_selection_dialog_new (gcb->title); - - gtk_color_selection_set_opacity (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->colorsel), gimp_color_button_has_alpha (gcb)); - gtk_color_selection_set_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->colorsel), dcolor); - - gtk_widget_destroy (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->help_button); - gtk_container_set_border_width (GTK_CONTAINER (gcb->dialog), 2); - - gtk_signal_connect (GTK_OBJECT (gcb->dialog), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &gcb->dialog); - gtk_signal_connect (GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->ok_button), - "clicked", - GTK_SIGNAL_FUNC (gimp_color_button_dialog_ok), - gcb); - gtk_signal_connect (GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->cancel_button), - "clicked", - GTK_SIGNAL_FUNC (gimp_color_button_dialog_cancel), - gcb); - gtk_window_set_position (GTK_WINDOW (gcb->dialog), GTK_WIN_POS_MOUSE); - } - - gtk_color_selection_set_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->colorsel), dcolor); - - gtk_widget_show (gcb->dialog); -} - -static void -gimp_color_button_dialog_ok (GtkWidget *widget, - gpointer data) -{ - GimpColorButton *gcb; - GimpRGB color; - gdouble dcolor[4]; - - g_return_if_fail (data != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (data)); - - gcb = GIMP_COLOR_BUTTON (data); - - gtk_color_selection_get_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->colorsel), dcolor); - - gimp_rgba_set (&color, dcolor[0], dcolor[1], dcolor[2], dcolor[3]); - gimp_color_button_set_color (gcb, &color); - - gtk_widget_hide (gcb->dialog); -} - -static void -gimp_color_button_dialog_cancel (GtkWidget *widget, - gpointer data) -{ - g_return_if_fail (data != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (data)); - - gtk_widget_hide (GIMP_COLOR_BUTTON (data)->dialog); -} - - -static void -gimp_color_button_use_fg (gpointer callback_data, - guint callback_action, - GtkWidget *widget) -{ - GimpRGB color; - - g_return_if_fail (callback_data != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (callback_data)); - - gimp_color_button_get_color (GIMP_COLOR_BUTTON (callback_data), &color); - gimp_palette_get_foreground_rgb (&color); - gimp_color_button_set_color (GIMP_COLOR_BUTTON (callback_data), &color); -} - -static void -gimp_color_button_use_bg (gpointer callback_data, - guint callback_action, - GtkWidget *widget) -{ - GimpRGB color; - - g_return_if_fail (callback_data != NULL); - g_return_if_fail (GIMP_IS_COLOR_BUTTON (callback_data)); - - gimp_color_button_get_color (GIMP_COLOR_BUTTON (callback_data), &color); - gimp_palette_get_background_rgb (&color); - gimp_color_button_set_color (GIMP_COLOR_BUTTON (callback_data), &color); -} - -static void -gimp_color_button_color_changed (GtkObject *object, - gpointer data) -{ - GimpColorButton *gcb = GIMP_COLOR_BUTTON (data); - - if (gcb->dialog) - { - GimpRGB color; - gdouble dcolor[4]; - - gimp_color_button_get_color (GIMP_COLOR_BUTTON (data), &color); - - dcolor[0] = color.r; - dcolor[1] = color.g; - dcolor[2] = color.b; - dcolor[3] = color.a; - - gtk_color_selection_set_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (gcb->dialog)->colorsel), dcolor); - } - - gtk_signal_emit (GTK_OBJECT (gcb), - gimp_color_button_signals[COLOR_CHANGED]); -} - -static gchar * -gimp_color_button_menu_translate (const gchar *path, - gpointer func_data) -{ - return (gettext (path)); -} diff --git a/libgimp/gimpcolorbutton.h b/libgimp/gimpcolorbutton.h deleted file mode 100644 index 3a74fcf0db..0000000000 --- a/libgimp/gimpcolorbutton.h +++ /dev/null @@ -1,87 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpcolorbutton.h - * Copyright (C) 1999-2001 Sven Neumann - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* This provides a button with a color preview. The preview - * can handle transparency by showing the checkerboard. - * On click, a color selector is opened, which is already - * fully functional wired to the preview button. - */ - -#ifndef __GIMP_COLOR_BUTTON_H__ -#define __GIMP_COLOR_BUTTON_H__ - -#include "libgimp/gimpcolorarea.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GIMP_TYPE_COLOR_BUTTON (gimp_color_button_get_type ()) -#define GIMP_COLOR_BUTTON(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_COLOR_BUTTON, GimpColorButton)) -#define GIMP_COLOR_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BUTTON, GimpColorButtonClass)) -#define GIMP_IS_COLOR_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_COLOR_BUTTON)) -#define GIMP_IS_COLOR_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_BUTTON)) - - -typedef struct _GimpColorButtonClass GimpColorButtonClass; - -struct _GimpColorButton -{ - GtkButton button; - - gchar *title; - - GtkWidget *color_area; - GtkWidget *dialog; - GtkItemFactory *item_factory; -}; - -struct _GimpColorButtonClass -{ - GtkButtonClass parent_class; - - void (* color_changed) (GimpColorButton *gcb); -}; - - -GtkType gimp_color_button_get_type (void); -GtkWidget * gimp_color_button_new (const gchar *title, - gint width, - gint height, - const GimpRGB *color, - GimpColorAreaType alpha); -void gimp_color_button_set_color (GimpColorButton *gcb, - const GimpRGB *color); -void gimp_color_button_get_color (GimpColorButton *gcb, - GimpRGB *color); -gboolean gimp_color_button_has_alpha (GimpColorButton *gcb); -void gimp_color_button_set_type (GimpColorButton *gcb, - GimpColorAreaType alpha); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __COLOR_BUTTON_H__ */ diff --git a/libgimp/gimpdialog.c b/libgimp/gimpdialog.c deleted file mode 100644 index 04f8788c7f..0000000000 --- a/libgimp/gimpdialog.c +++ /dev/null @@ -1,365 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimpdialog.c - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimpuitypes.h" - -#include "gimpdialog.h" -#include "gimphelpui.h" - -#include "pixmaps/wilber.xpm" - -/* local callbacks of gimp_dialog_new () */ -static gint -gimp_dialog_delete_callback (GtkWidget *widget, - GdkEvent *event, - gpointer data) -{ - GtkSignalFunc cancel_callback; - GtkWidget *cancel_widget; - - cancel_callback = - (GtkSignalFunc) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_dialog_cancel_callback"); - cancel_widget = - (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_dialog_cancel_widget"); - - /* the cancel callback has to destroy the dialog */ - if (cancel_callback) - (* cancel_callback) (cancel_widget, data); - - return TRUE; -} - -static void -gimp_dialog_realize_callback (GtkWidget *widget, - gpointer data) -{ - static GdkPixmap *wilber_pixmap = NULL; - static GdkBitmap *wilber_mask = NULL; - GtkStyle *style; - - style = gtk_widget_get_style (widget); - - if (wilber_pixmap == NULL) - wilber_pixmap = - gdk_pixmap_create_from_xpm_d (widget->window, - &wilber_mask, - &style->bg[GTK_STATE_NORMAL], - wilber_xpm); - - gdk_window_set_icon (widget->window, NULL, - wilber_pixmap, wilber_mask); -} - -/** - * gimp_dialog_new: - * @title: The dialog's title which will be set with gtk_window_set_title(). - * @wmclass_name: The dialog's @wmclass_name which will be set with - * gtk_window_set_wmclass(). The @wmclass_class will be - * automatically set to "Gimp". - * @help_func: The function which will be called if the user presses "F1". - * @help_data: The data pointer which will be passed to @help_func. - * @position: The dialog's initial position which will be set with - * gtk_window_set_position(). - * @allow_shrink: The dialog's @allow_shrink flag, ... - * @allow_grow: ... it't @allow_grow flag and ... - * @auto_shrink: ... it's @auto_shrink flag which will all be set with - * gtk_window_set_policy(). - * @...: A #NULL terminated @va_list destribing the action_area buttons. - * - * This function simply packs the action_area arguments passed in "..." - * into a @va_list variable and passes everything to gimp_dialog_newv(). - * - * For a description of the format of the @va_list describing the - * action_area buttons see gimp_dialog_create_action_areav(). - * - * Returns: A #GtkDialog. - * - */ -GtkWidget * -gimp_dialog_new (const gchar *title, - const gchar *wmclass_name, - GimpHelpFunc help_func, - const gchar *help_data, - GtkWindowPosition position, - gint allow_shrink, - gint allow_grow, - gint auto_shrink, - - /* specify action area buttons as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * GtkObject *slot_object, - * GtkWidget **widget_ptr, - * gboolean default_action, - * gboolean connect_delete, - */ - - ...) -{ - GtkWidget *dialog; - va_list args; - - va_start (args, auto_shrink); - - dialog = gimp_dialog_newv (title, - wmclass_name, - help_func, - help_data, - position, - allow_shrink, - allow_grow, - auto_shrink, - args); - - va_end (args); - - return dialog; -} - -/** - * gimp_dialog_newv: - * @title: The dialog's title which will be set with gtk_window_set_title(). - * @wmclass_name: The dialog's @wmclass_name which will be set with - * gtk_window_set_wmclass(). The @wmclass_class will be - * automatically set to "Gimp". - * @help_func: The function which will be called if the user presses "F1". - * @help_data: The data pointer which will be passed to @help_func. - * @position: The dialog's initial position which will be set with - * gtk_window_set_position(). - * @allow_shrink: The dialog's @allow_shrink flag, ... - * @allow_grow: ... it't @allow_grow flag and ... - * @auto_shrink: ... it's @auto_shrink flag which will all be set with - * gtk_window_set_policy(). - * @args: A @va_list as obtained with va_start() describing the action_area - * buttons. - * - * This function performs all neccessary setps to set up a standard GIMP - * dialog. - * - * The @va_list describing the action_area buttons will be passed to - * gimp_dialog_create_action_areav(). - * - * Returns: A #GtkDialog. - * - */ -GtkWidget * -gimp_dialog_newv (const gchar *title, - const gchar *wmclass_name, - GimpHelpFunc help_func, - const gchar *help_data, - GtkWindowPosition position, - gint allow_shrink, - gint allow_grow, - gint auto_shrink, - va_list args) -{ - GtkWidget *dialog; - - g_return_val_if_fail (title != NULL, NULL); - g_return_val_if_fail (wmclass_name != NULL, NULL); - - dialog = gtk_dialog_new (); - gtk_window_set_title (GTK_WINDOW (dialog), title); - gtk_window_set_wmclass (GTK_WINDOW (dialog), wmclass_name, "Gimp"); - gtk_window_set_position (GTK_WINDOW (dialog), position); - gtk_window_set_policy (GTK_WINDOW (dialog), - allow_shrink, allow_grow, auto_shrink); - - /* prepare the action_area */ - gimp_dialog_create_action_areav (GTK_DIALOG (dialog), args); - - /* connect the "F1" help key */ - if (help_func) - gimp_help_connect_help_accel (dialog, help_func, help_data); - - return dialog; -} - -/** - * gimp_dialog_set_icon: - * @dialog: The #GtkWindow you want to set the pixmap icon for. - * - * This function sets the WM pixmap icon for the dialog which will appear - * e.g. in GNOME's or KDE's window list. - * - * Note that this function is automatically called by - * gimp_help_connect_help_accel() which in turn is called by - * gimp_dialog_newv(), so you only have to call it for #GtkWindow's which - * have no help page (like tear-off menus). - * - */ -void -gimp_dialog_set_icon (GtkWindow *dialog) -{ - g_return_if_fail (dialog); - g_return_if_fail (GTK_IS_WINDOW (dialog)); - - if (GTK_WIDGET_REALIZED (GTK_WIDGET (dialog))) - gimp_dialog_realize_callback (GTK_WIDGET (dialog), NULL); - else - gtk_signal_connect (GTK_OBJECT (dialog), "realize", - GTK_SIGNAL_FUNC (gimp_dialog_realize_callback), - NULL); -} - -/** - * gimp_dialog_create_action_area: - * @dialog: The #GtkDialog you want to create the action_area for. - * @...: A #NULL terminated @va_list destribing the action_area buttons. - * - * This function simply packs the action_area arguments passed in "..." - * into a @va_list variable and passes everything to - * gimp_dialog_create_action_areav(). - * - */ -void -gimp_dialog_create_action_area (GtkDialog *dialog, - - /* specify action area buttons as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * GtkObject *slot_object, - * GtkWidget **widget_ptr, - * gboolean default_action, - * gboolean connect_delete, - */ - - ...) -{ - va_list args; - - va_start (args, dialog); - - gimp_dialog_create_action_areav (dialog, args); - - va_end (args); -} - -/** - * gimp_dialog_create_action_areav: - * @dialog: The #GtkDialog you want to create the action_area for. - * @args: A @va_list as obtained with va_start() describing the action_area - * buttons. - * - */ -void -gimp_dialog_create_action_areav (GtkDialog *dialog, - va_list args) -{ - GtkWidget *hbbox = NULL; - GtkWidget *button; - - /* action area variables */ - const gchar *label; - GtkSignalFunc callback; - gpointer data; - GtkObject *slot_object; - GtkWidget **widget_ptr; - gboolean default_action; - gboolean connect_delete; - - gboolean delete_connected = FALSE; - - g_return_if_fail (dialog != NULL); - g_return_if_fail (GTK_IS_DIALOG (dialog)); - - /* prepare the action_area */ - label = va_arg (args, const gchar *); - - if (label) - { - gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 2); - gtk_box_set_homogeneous (GTK_BOX (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 (dialog->action_area), hbbox, FALSE, FALSE, 0); - gtk_widget_show (hbbox); - } - - /* the action_area buttons */ - while (label) - { - callback = va_arg (args, GtkSignalFunc); - data = va_arg (args, gpointer); - slot_object = va_arg (args, GtkObject *); - widget_ptr = va_arg (args, GtkWidget **); - default_action = va_arg (args, gboolean); - connect_delete = va_arg (args, gboolean); - - button = gtk_button_new_with_label (label); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0); - - if (slot_object == (GtkObject *) 1) - slot_object = GTK_OBJECT (dialog); - - if (data == NULL) - data = dialog; - - if (callback) - { - 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; - - if (connect_delete && callback && !delete_connected) - { - gtk_object_set_data (GTK_OBJECT (dialog), - "gimp_dialog_cancel_callback", - callback); - gtk_object_set_data (GTK_OBJECT (dialog), - "gimp_dialog_cancel_widget", - slot_object ? slot_object : GTK_OBJECT (button)); - - /* catch the WM delete event */ - gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", - GTK_SIGNAL_FUNC (gimp_dialog_delete_callback), - data); - - delete_connected = TRUE; - } - - if (default_action) - gtk_widget_grab_default (button); - gtk_widget_show (button); - - label = va_arg (args, gchar *); - } -} diff --git a/libgimp/gimpdialog.h b/libgimp/gimpdialog.h deleted file mode 100644 index fc4626454a..0000000000 --- a/libgimp/gimpdialog.h +++ /dev/null @@ -1,90 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimpdialog.h - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_DIALOG_H__ -#define __GIMP_DIALOG_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -GtkWidget * gimp_dialog_new (const gchar *title, - const gchar *wmclass_name, - GimpHelpFunc help_func, - const gchar *help_data, - GtkWindowPosition position, - gint allow_shrink, - gint allow_grow, - gint auto_shrink, - - /* specify action area buttons - * as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * GtkObject *slot_object, - * GtkWidget **widget_ptr, - * gboolean default_action, - * gboolean connect_delete, - */ - - ...); - -GtkWidget * gimp_dialog_newv (const gchar *title, - const gchar *wmclass_name, - GimpHelpFunc help_func, - const gchar *help_data, - GtkWindowPosition position, - gint allow_shrink, - gint allow_grow, - gint auto_shrink, - va_list args); - -void gimp_dialog_set_icon (GtkWindow *dialog); - -void gimp_dialog_create_action_area (GtkDialog *dialog, - - /* specify action area buttons - * as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * GtkObject *slot_object, - * GtkWidget **widget_ptr, - * gboolean default_action, - * gboolean connect_delete, - */ - - ...); - -void gimp_dialog_create_action_areav (GtkDialog *dialog, - va_list args); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_DIALOG_H__ */ diff --git a/libgimp/gimpfileselection.c b/libgimp/gimpfileselection.c deleted file mode 100644 index 2b3b45b2ba..0000000000 --- a/libgimp/gimpfileselection.c +++ /dev/null @@ -1,459 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpfileselection.c - * Copyright (C) 1999-2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include "config.h" - -#include /* Needed here by Win32 gcc compilation */ - -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include - -#include "gimpfileselection.h" - -#include "libgimp-intl.h" - -#include "pixmaps/yes.xpm" -#include "pixmaps/no.xpm" - - -#ifdef G_OS_WIN32 -# ifndef S_ISDIR -# define S_ISDIR(m) ((m) & _S_IFDIR) -# endif -# ifndef S_ISREG -# define S_ISREG(m) ((m) & _S_IFREG) -# endif -#endif - -/* callbacks */ -static void gimp_file_selection_realize (GtkWidget *widget); -static void gimp_file_selection_entry_callback (GtkWidget *widget, - gpointer data); -static gint gimp_file_selection_entry_focus_out_callback (GtkWidget *widget, - GdkEvent *event, - gpointer data); -static void gimp_file_selection_browse_callback (GtkWidget *widget, - gpointer data); - -/* private functions */ -static void gimp_file_selection_check_filename (GimpFileSelection *gfs); - -enum -{ - FILENAME_CHANGED, - LAST_SIGNAL -}; - -static guint gimp_file_selection_signals[LAST_SIGNAL] = { 0 }; - -static GtkHBoxClass *parent_class = NULL; - -static void -gimp_file_selection_destroy (GtkObject *object) -{ - GimpFileSelection *gfs; - - g_return_if_fail (object != NULL); - g_return_if_fail (GIMP_IS_FILE_SELECTION (object)); - - gfs = GIMP_FILE_SELECTION (object); - - if (gfs->file_selection) - gtk_widget_destroy (gfs->file_selection); - - if (gfs->title) - g_free (gfs->title); - - if (gfs->yes_pixmap) - gdk_pixmap_unref (gfs->yes_pixmap); - if (gfs->yes_mask) - gdk_bitmap_unref (gfs->yes_mask); - - if (gfs->no_pixmap) - gdk_pixmap_unref (gfs->no_pixmap); - if (gfs->no_mask) - gdk_bitmap_unref (gfs->no_mask); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -static void -gimp_file_selection_class_init (GimpFileSelectionClass *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_hbox_get_type ()); - - gimp_file_selection_signals[FILENAME_CHANGED] = - gtk_signal_new ("filename_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpFileSelectionClass, - filename_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, gimp_file_selection_signals, - LAST_SIGNAL); - - class->filename_changed = NULL; - - object_class->destroy = gimp_file_selection_destroy; - widget_class->realize = gimp_file_selection_realize; -} - -static void -gimp_file_selection_init (GimpFileSelection *gfs) -{ - gfs->title = NULL; - gfs->file_selection = NULL; - gfs->check_valid = FALSE; - - gfs->file_exists = NULL; - gfs->yes_pixmap = NULL; - gfs->yes_mask = NULL; - gfs->no_pixmap = NULL; - gfs->no_mask = NULL; - - gtk_box_set_spacing (GTK_BOX (gfs), 2); - gtk_box_set_homogeneous (GTK_BOX (gfs), FALSE); - - gfs->browse_button = gtk_button_new_with_label (" ... "); - gtk_box_pack_end (GTK_BOX (gfs), gfs->browse_button, FALSE, FALSE, 0); - gtk_signal_connect (GTK_OBJECT(gfs->browse_button), "clicked", - GTK_SIGNAL_FUNC (gimp_file_selection_browse_callback), - gfs); - gtk_widget_show (gfs->browse_button); - - gfs->entry = gtk_entry_new (); - gtk_box_pack_end (GTK_BOX (gfs), gfs->entry, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (gfs->entry), "activate", - GTK_SIGNAL_FUNC (gimp_file_selection_entry_callback), - gfs); - gtk_signal_connect (GTK_OBJECT (gfs->entry), "focus_out_event", - GTK_SIGNAL_FUNC (gimp_file_selection_entry_focus_out_callback), - gfs); - gtk_widget_show (gfs->entry); -} - -GtkType -gimp_file_selection_get_type (void) -{ - static GtkType gfs_type = 0; - - if (!gfs_type) - { - GtkTypeInfo gfs_info = - { - "GimpFileSelection", - sizeof (GimpFileSelection), - sizeof (GimpFileSelectionClass), - (GtkClassInitFunc) gimp_file_selection_class_init, - (GtkObjectInitFunc) gimp_file_selection_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gfs_type = gtk_type_unique (gtk_hbox_get_type (), &gfs_info); - } - - return gfs_type; -} - -/** - * gimp_file_selection_new: - * @title: The title of the #GtkFileSelection dialog. - * @filename: The initial filename. - * @dir_only: #TRUE if the file selection should accept directories only. - * @check_valid: #TRUE if the widget should check if the entered file - * really exists. - * - * Creates a new #GimpFileSelection widget. - * - * Returns: A pointer to the new #GimpFileSelection widget. - **/ -GtkWidget * -gimp_file_selection_new (const gchar *title, - const gchar *filename, - gboolean dir_only, - gboolean check_valid) -{ - GimpFileSelection *gfs; - - gfs = gtk_type_new (gimp_file_selection_get_type ()); - - gfs->title = g_strdup (title); - gfs->dir_only = dir_only; - gfs->check_valid = check_valid; - - gimp_file_selection_set_filename (gfs, filename); - - return GTK_WIDGET (gfs); -} - -/** - * gimp_file_selection_get_filename: - * @gfs: The file selection you want to know the filename from. - * - * Note that you have to g_free() the returned string. - * - * Returns: The file or directory the user has entered. - **/ -gchar * -gimp_file_selection_get_filename (GimpFileSelection *gfs) -{ - g_return_val_if_fail (gfs != NULL, g_strdup ("")); - g_return_val_if_fail (GIMP_IS_FILE_SELECTION (gfs), g_strdup ("")); - - return gtk_editable_get_chars (GTK_EDITABLE (gfs->entry), 0, -1); -} - -/** - * gimp_file_selection_set_filename: - * @gfs: The file selection you want to set the filename for. - * @filename: The new filename. - * - * If you specified @check_valid as #TRUE in gimp_file_selection_new() - * the #GimpFileSelection will immediately check the validity of the file - * name. - * - */ -void -gimp_file_selection_set_filename (GimpFileSelection *gfs, - const gchar *filename) -{ - g_return_if_fail (gfs != NULL); - g_return_if_fail (GIMP_IS_FILE_SELECTION (gfs)); - - gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename ? filename : ""); - - /* update everything - */ - gimp_file_selection_entry_callback (gfs->entry, (gpointer) gfs); -} - -static void -gimp_file_selection_realize (GtkWidget *widget) -{ - GimpFileSelection *gfs; - GtkStyle *style; - - gfs = GIMP_FILE_SELECTION (widget); - if (! gfs->check_valid) - return; - - if (GTK_WIDGET_CLASS (parent_class)->realize) - (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - - style = gtk_widget_get_style (widget); - - gfs->yes_pixmap = gdk_pixmap_create_from_xpm_d (widget->window, - &gfs->yes_mask, - &style->bg[GTK_STATE_NORMAL], - yes_xpm); - gfs->no_pixmap = gdk_pixmap_create_from_xpm_d (widget->window, - &gfs->no_mask, - &style->bg[GTK_STATE_NORMAL], - no_xpm); - - gfs->file_exists = gtk_pixmap_new (gfs->no_pixmap, gfs->no_mask); - gtk_box_pack_start (GTK_BOX (gfs), gfs->file_exists, FALSE, FALSE, 0); - - gimp_file_selection_check_filename (gfs); - gtk_widget_show (gfs->file_exists); -} - -static void -gimp_file_selection_entry_callback (GtkWidget *widget, - gpointer data) -{ - GimpFileSelection *gfs; - gchar *filename; - gint len; - - gfs = GIMP_FILE_SELECTION (data); - - /* filenames still need more sanity checking - * (erase double G_DIR_SEPARATORS, ...) - */ - filename = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); - filename = g_strstrip (filename); - - while (((len = strlen (filename)) > 1) && - (filename[len - 1] == G_DIR_SEPARATOR)) - filename[len - 1] = '\0'; - - gtk_signal_handler_block_by_data (GTK_OBJECT (gfs->entry), gfs); - gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gfs->entry), gfs); - - if (gfs->file_selection) - gtk_file_selection_set_filename (GTK_FILE_SELECTION (gfs->file_selection), - filename); - g_free (filename); - - gimp_file_selection_check_filename (gfs); - - gtk_entry_set_position (GTK_ENTRY (gfs->entry), -1); - - gtk_signal_emit (GTK_OBJECT (gfs), - gimp_file_selection_signals[FILENAME_CHANGED]); -} - -static gboolean -gimp_file_selection_entry_focus_out_callback (GtkWidget *widget, - GdkEvent *event, - gpointer data) -{ - gimp_file_selection_entry_callback (widget, data); - - return TRUE; -} - -/* local callbacks of gimp_file_selection_browse_callback() */ -static void -gimp_file_selection_filesel_ok_callback (GtkWidget *widget, - gpointer data) -{ - GimpFileSelection *gfs; - gchar *filename; - - gfs = GIMP_FILE_SELECTION (data); - filename = - gtk_file_selection_get_filename (GTK_FILE_SELECTION (gfs->file_selection)); - - gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename); - - gtk_widget_hide (gfs->file_selection); - - /* update everything */ - gimp_file_selection_entry_callback (gfs->entry, data); -} - -static void -gimp_file_selection_browse_callback (GtkWidget *widget, - gpointer data) -{ - GimpFileSelection *gfs; - gchar *filename; - - gfs = GIMP_FILE_SELECTION (data); - filename = gtk_editable_get_chars (GTK_EDITABLE (gfs->entry), 0, -1); - - if (gfs->file_selection == NULL) - { - if (gfs->dir_only) - { - gfs->file_selection = gtk_file_selection_new (gfs->title); - - /* hiding these widgets uses internal gtk+ knowledge, but it's - * easier than creating my own directory browser -- michael - */ - gtk_widget_hide - (GTK_FILE_SELECTION (gfs->file_selection)->fileop_del_file); - gtk_widget_hide - (GTK_FILE_SELECTION (gfs->file_selection)->file_list->parent); - } - else - { - gfs->file_selection = gtk_file_selection_new (_("Select File")); - } - - gtk_window_set_position (GTK_WINDOW (gfs->file_selection), - GTK_WIN_POS_MOUSE); - gtk_window_set_wmclass (GTK_WINDOW (gfs->file_selection), - "file_select", "Gimp"); - - /* slightly compress the dialog */ - gtk_container_set_border_width (GTK_CONTAINER (gfs->file_selection), 2); - gtk_container_set_border_width (GTK_CONTAINER (GTK_FILE_SELECTION (gfs->file_selection)->button_area), 2); - - gtk_signal_connect - (GTK_OBJECT (GTK_FILE_SELECTION (gfs->file_selection)->ok_button), - "clicked", - GTK_SIGNAL_FUNC (gimp_file_selection_filesel_ok_callback), - gfs); - gtk_signal_connect - (GTK_OBJECT (GTK_FILE_SELECTION (gfs->file_selection)->selection_entry), - "activate", - GTK_SIGNAL_FUNC (gimp_file_selection_filesel_ok_callback), - gfs); - - gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (gfs->file_selection)->cancel_button), - "clicked", - GTK_SIGNAL_FUNC (gtk_widget_hide), - GTK_OBJECT (gfs->file_selection)); - gtk_signal_connect_object (GTK_OBJECT (gfs), "unmap", - GTK_SIGNAL_FUNC (gtk_widget_hide), - GTK_OBJECT (gfs->file_selection)); - gtk_signal_connect_object (GTK_OBJECT (gfs->file_selection), - "delete_event", - GTK_SIGNAL_FUNC (gtk_widget_hide), - GTK_OBJECT (gfs->file_selection)); - } - - gtk_file_selection_set_filename (GTK_FILE_SELECTION (gfs->file_selection), - filename); - - if (! GTK_WIDGET_VISIBLE (gfs->file_selection)) - gtk_widget_show (gfs->file_selection); - else - gdk_window_raise (gfs->file_selection->window); -} - -static void -gimp_file_selection_check_filename (GimpFileSelection *gfs) -{ - static struct stat statbuf; - gchar *filename; - - if (! gfs->check_valid) - return; - - if (gfs->file_exists == NULL) - return; - - filename = gtk_editable_get_chars (GTK_EDITABLE (gfs->entry), 0, -1); - if ((stat (filename, &statbuf) == 0) && - (gfs->dir_only ? S_ISDIR (statbuf.st_mode) : S_ISREG (statbuf.st_mode))) - { - gtk_pixmap_set (GTK_PIXMAP (gfs->file_exists), - gfs->yes_pixmap, gfs->yes_mask); - } - else - { - gtk_pixmap_set (GTK_PIXMAP (gfs->file_exists), - gfs->no_pixmap, gfs->no_mask); - } - - g_free (filename); -} diff --git a/libgimp/gimpfileselection.h b/libgimp/gimpfileselection.h deleted file mode 100644 index 432b75d2f3..0000000000 --- a/libgimp/gimpfileselection.h +++ /dev/null @@ -1,87 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpfileselection.h - * Copyright (C) 1999 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_FILE_SELECTION_H__ -#define __GIMP_FILE_SELECTION_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -#define GIMP_TYPE_FILE_SELECTION (gimp_file_selection_get_type ()) -#define GIMP_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_FILE_SELECTION, GimpFileSelection)) -#define GIMP_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILE_SELECTION, GimpFileSelectionClass)) -#define GIMP_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_FILE_SELECTION)) -#define GIMP_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILE_SELECTION)) - -typedef struct _GimpFileSelection GimpFileSelection; -typedef struct _GimpFileSelectionClass GimpFileSelectionClass; - -struct _GimpFileSelection -{ - GtkHBox hbox; - - GtkWidget *file_exists; - GtkWidget *entry; - GtkWidget *browse_button; - - GtkWidget *file_selection; - - GdkPixmap *yes_pixmap; - GdkBitmap *yes_mask; - GdkPixmap *no_pixmap; - GdkBitmap *no_mask; - - gchar *title; - gboolean dir_only; - gboolean check_valid; -}; - -struct _GimpFileSelectionClass -{ - GtkHBoxClass parent_class; - - void (* filename_changed) (GimpFileSelection *gfs); -}; - - -GtkType gimp_file_selection_get_type (void); - -GtkWidget* gimp_file_selection_new (const gchar *title, - const gchar *filename, - gboolean dir_only, - gboolean check_valid); - -gchar* gimp_file_selection_get_filename (GimpFileSelection *gfs); - -void gimp_file_selection_set_filename (GimpFileSelection *gfs, - const gchar *filename); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_FILE_SELECTION_H__ */ diff --git a/libgimp/gimphelpui.c b/libgimp/gimphelpui.c deleted file mode 100644 index 4814f5f67f..0000000000 --- a/libgimp/gimphelpui.c +++ /dev/null @@ -1,409 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimphelpui.c - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include -#include - -#include "gimpuitypes.h" - -#include "gimpdialog.h" -#include "gimphelpui.h" - - -/* local function prototypes */ -static void gimp_help_callback (GtkWidget *widget, - gpointer data); -static gint gimp_help_tips_query_idle_show_help (gpointer data); -static gint gimp_help_tips_query_widget_selected (GtkWidget *tips_query, - GtkWidget *widget, - const gchar *tip_text, - const gchar *tip_private, - GdkEventButton *event, - gpointer func_data); -static gint gimp_help_tips_query_idle_start (gpointer tips_query); -static void gimp_help_tips_query_start (GtkWidget *widget, - gpointer tips_query); - -/* local variables */ -static GtkTooltips * tool_tips = NULL; -static GtkWidget * tips_query = NULL; - -/**********************/ -/* public functions */ -/**********************/ - -/** - * gimp_help_init: - * - * This function initializes GIMP's help system. - * - * Currently it only creates a #GtkTooltips object with gtk_tooltips_new() - * which will be used by gimp_help_set_help_data(). - **/ -void -gimp_help_init (void) -{ - tool_tips = gtk_tooltips_new (); -} - -/** - * gimp_help_free: - * - * This function frees the memory used by the #GtkTooltips created by - * gimp_help_init(). - **/ -void -gimp_help_free (void) -{ - gtk_object_destroy (GTK_OBJECT (tool_tips)); - gtk_object_unref (GTK_OBJECT (tool_tips)); -} - -/** - * gimp_help_enable_tooltips: - * - * This function calls gtk_tooltips_enable(). - **/ -void -gimp_help_enable_tooltips (void) -{ - gtk_tooltips_enable (tool_tips); -} - -/** - * gimp_help_disable_tooltips: - * - * This function calls gtk_tooltips_disable(). - **/ -void -gimp_help_disable_tooltips (void) -{ - gtk_tooltips_disable (tool_tips); -} - -/** - * gimp_help_connect_help_accel: - * @widget: The widget you want to connect the help accelerator for. Will - * be a #GtkWindow in most cases. - * @help_func: The function which will be called if the user presses "F1". - * @help_data: The data pointer which will be passed to @help_func. - * - * Note that this function is automatically called by all libgimp dialog - * constructors. You only have to call it for windows/dialogs you created - * "manually". - * - * For convenience, gimp_help_connect_help_accel() calls - * gimp_dialog_set_icon() if the passed widget is a #GtkWindow, so you - * don't have to worry about this. - **/ -void -gimp_help_connect_help_accel (GtkWidget *widget, - GimpHelpFunc help_func, - const gchar *help_data) -{ - GtkAccelGroup *accel_group; - - if (!help_func) - return; - - /* for convenience we set the wm icon here because - * this function is called for almost all gimp windows - */ - if (GTK_IS_WINDOW (widget)) - gimp_dialog_set_icon (GTK_WINDOW (widget)); - - /* set up the help signals and tips query widget - */ - if (!tips_query) - { - tips_query = gtk_tips_query_new (); - - gtk_widget_set (tips_query, - "GtkTipsQuery::emit_always", TRUE, - NULL); - - gtk_signal_connect (GTK_OBJECT (tips_query), "widget_selected", - GTK_SIGNAL_FUNC (gimp_help_tips_query_widget_selected), - NULL); - - /* FIXME: EEEEEEEEEEEEEEEEEEEEK, this is very ugly and forbidden... - * does anyone know a way to do this tips query stuff without - * having to attach to some parent widget??? - */ - tips_query->parent = widget; - gtk_widget_realize (tips_query); - } - - if (! gtk_signal_lookup ("tips_query", GTK_OBJECT (widget)->klass->type)) - { - gtk_object_class_user_signal_new (GTK_OBJECT (widget)->klass, - "tips_query", - GTK_RUN_LAST, - gtk_signal_default_marshaller, - GTK_TYPE_NONE, - 0, - NULL); - - gtk_object_class_user_signal_new (GTK_OBJECT (widget)->klass, - "help", - GTK_RUN_LAST, - gtk_signal_default_marshaller, - GTK_TYPE_NONE, - 0, - NULL); - } - - gimp_help_set_help_data (widget, NULL, help_data); - - gtk_signal_connect (GTK_OBJECT (widget), "help", - GTK_SIGNAL_FUNC (gimp_help_callback), - (gpointer) help_func); - - gtk_signal_connect (GTK_OBJECT (widget), "tips_query", - GTK_SIGNAL_FUNC (gimp_help_tips_query_start), - (gpointer) tips_query); - - gtk_widget_add_events (widget, GDK_BUTTON_PRESS_MASK); - - /* a new accelerator group for this widget */ - accel_group = gtk_accel_group_new (); - - /* FIXME: does not work for some reason... - gtk_widget_add_accelerator (widget, "help", accel_group, - GDK_F1, 0, GTK_ACCEL_LOCKED); - gtk_widget_add_accelerator (widget, "tips_query", accel_group, - GDK_F1, GDK_SHIFT_MASK, GTK_ACCEL_LOCKED); - */ - - /* ...while using this internal stuff works */ - gtk_accel_group_add (accel_group, GDK_F1, 0, 0, - GTK_OBJECT (widget), "help"); - gtk_accel_group_add (accel_group, GDK_F1, GDK_SHIFT_MASK, 0, - GTK_OBJECT (widget), "tips_query"); - - gtk_accel_group_attach (accel_group, GTK_OBJECT (widget)); -} - -/** - * gimp_help_set_help_data: - * @widget: The #GtkWidget you want to set a @tooltip and/or @help_data for. - * @tooltip: The text for this widget's tooltip. - * @help_data: The @help_data for the #GtkTipsQuery tooltips inspector. - * - * The reason why we don't use gtk_tooltips_set_tip() is that it's - * impossible to set a @private_tip (aka @help_data) without a visible - * @tooltip. - * - * This function can be called with @tooltip == #NULL. Use this feature - * if you want to set a HTML help link for a widget which shouldn't have - * a visible tooltip. - * - * You can e.g. set a @help_data string to a complete HTML page for a - * container widget (e.g. a #GtkBox). For the widgets inside the box - * you can set HTML anchors which point inside the container widget's - * help page by setting @help_data strings starting with "#". - * - * If the tooltips inspector (Shift + "F1") is invoked and the user - * clicks on one of the widgets which only contain a "#" link, the - * help system will automatically ascend the widget hierarchy until it - * finds another widget with @help_data attached and concatenates both - * to a complete help path. - **/ -void -gimp_help_set_help_data (GtkWidget *widget, - const gchar *tooltip, - const gchar *help_data) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_WIDGET (widget)); - - if (tooltip) - { - gtk_tooltips_set_tip (tool_tips, widget, tooltip, - (gpointer) help_data); - } - else if (help_data) - { - gtk_object_set_data (GTK_OBJECT (widget), "gimp_help_data", - (gpointer) help_data); - } -} - -/** - * gimp_context_help: - * - * This function invokes the #GtkTipsQuery tooltips inspector. - * - * The mouse cursor will turn turn into a question mark and the user can - * click on any widget of the application which started the inspector. - * - * If the widget the user clicked on has a @help_data string attached - * (see gimp_help_set_help_data()), the corresponding HTML page will - * be displayed. Otherwise the help system will ascend the widget hierarchy - * until it finds an attached @help_data string (which should be the - * case at least for every window/dialog). - **/ -void -gimp_context_help (void) -{ - if (tips_query) - gimp_help_tips_query_start (NULL, tips_query); -} - -/*********************/ -/* local functions */ -/*********************/ - -static void -gimp_help_callback (GtkWidget *widget, - gpointer data) -{ - GimpHelpFunc help_function; - const gchar *help_data; - - help_function = (GimpHelpFunc) data; - help_data = (const gchar *) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_help_data"); - - if (help_function) - (* help_function) (help_data); -} - -/* Do all the actual GtkTipsQuery calls in idle functions and check for - * some widget holding a grab before starting the query because strange - * things happen if (1) the help browser pops up while the query has - * grabbed the pointer or (2) the query grabs the pointer while some - * other part of the gimp has grabbed it (e.g. a tool, eek) - */ - -static gint -gimp_help_tips_query_idle_show_help (gpointer data) -{ - GtkWidget *event_widget; - GtkWidget *toplevel_widget; - GtkWidget *widget; - - GtkTooltipsData *tooltips_data; - - gchar *help_data = NULL; - - event_widget = GTK_WIDGET (data); - toplevel_widget = gtk_widget_get_toplevel (event_widget); - - /* search for help_data in this widget's parent containers */ - for (widget = event_widget; widget; widget = widget->parent) - { - if ((tooltips_data = gtk_tooltips_data_get (widget)) && - tooltips_data->tip_private) - { - help_data = tooltips_data->tip_private; - } - else - { - help_data = (gchar *) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_help_data"); - } - - if (help_data || widget == toplevel_widget) - break; - } - - if (! help_data) - return FALSE; - - if (help_data[0] == '#') - { - gchar *help_index; - - if (widget == toplevel_widget) - return FALSE; - - help_index = help_data; - help_data = NULL; - - for (widget = widget->parent; widget; widget = widget->parent) - { - if ((tooltips_data = gtk_tooltips_data_get (widget)) && - tooltips_data->tip_private) - { - help_data = tooltips_data->tip_private; - } - else - { - help_data = (gchar *) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_help_data"); - } - - if (help_data) - break; - } - - if (help_data) - { - gchar *help_text; - - help_text = g_strconcat (help_data, help_index, NULL); - gimp_standard_help_func (help_text); - g_free (help_text); - } - } - else - { - gimp_standard_help_func (help_data); - } - - return FALSE; -} - -static gint -gimp_help_tips_query_widget_selected (GtkWidget *tips_query, - GtkWidget *widget, - const gchar *tip_text, - const gchar *tip_private, - GdkEventButton *event, - gpointer func_data) -{ - if (widget) - gtk_idle_add ((GtkFunction) gimp_help_tips_query_idle_show_help, - (gpointer) widget); - - return TRUE; -} - -static gint -gimp_help_tips_query_idle_start (gpointer tips_query) -{ - if (! gtk_grab_get_current ()) - gtk_tips_query_start_query (GTK_TIPS_QUERY (tips_query)); - - return FALSE; -} - -static void -gimp_help_tips_query_start (GtkWidget *widget, - gpointer tips_query) -{ - if (! GTK_TIPS_QUERY (tips_query)->in_query) - gtk_idle_add ((GtkFunction) gimp_help_tips_query_idle_start, tips_query); -} diff --git a/libgimp/gimphelpui.h b/libgimp/gimphelpui.h deleted file mode 100644 index 7d5def98d2..0000000000 --- a/libgimp/gimphelpui.h +++ /dev/null @@ -1,62 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimphelpui.h - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_HELP_UI_H__ -#define __GIMP_HELP_UI_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -void gimp_help_init (void); -void gimp_help_free (void); - -void gimp_help_enable_tooltips (void); -void gimp_help_disable_tooltips (void); - -/* the standard gimp help function - * (has different implementations in the main app and in libgimp) - */ -void gimp_standard_help_func (const gchar *help_data); - -/* connect the "F1" accelerator of a window */ -void gimp_help_connect_help_accel (GtkWidget *widget, - GimpHelpFunc help_func, - const gchar *help_data); - -/* set help data for non-window widgets */ -void gimp_help_set_help_data (GtkWidget *widget, - const gchar *tooltip, - const gchar *help_data); - -/* activate the context help inspector */ -void gimp_context_help (void); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_HELP_UI_H__ */ diff --git a/libgimp/gimppatheditor.c b/libgimp/gimppatheditor.c deleted file mode 100644 index 28f72b342a..0000000000 --- a/libgimp/gimppatheditor.c +++ /dev/null @@ -1,482 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimppatheditor.c - * Copyright (C) 1999 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include - -#include "gimptypes.h" -#include "gimpuitypes.h" - -#include "gimppatheditor.h" -#include "gimpfileselection.h" -#include "gimpsizeentry.h" -#include "gimpwidgets.h" - -#include "pixmaps/new.xpm" -#include "pixmaps/delete.xpm" -#include "pixmaps/raise.xpm" -#include "pixmaps/lower.xpm" - - -/* forward declaration */ -static void gimp_path_editor_select_callback (GtkWidget *widget, - gpointer data); -static void gimp_path_editor_deselect_callback (GtkWidget *widget, - gpointer data); -static void gimp_path_editor_new_callback (GtkWidget *widget, - gpointer data); -static void gimp_path_editor_move_callback (GtkWidget *widget, - gpointer data); -static void gimp_path_editor_filesel_callback (GtkWidget *widget, - gpointer data); -static void gimp_path_editor_delete_callback (GtkWidget *widget, - gpointer data); - -enum -{ - PATH_CHANGED, - LAST_SIGNAL -}; - -static guint gimp_path_editor_signals[LAST_SIGNAL] = { 0 }; - -static GtkVBoxClass *parent_class = NULL; - -static void -gimp_path_editor_class_init (GimpPathEditorClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - gimp_path_editor_signals[PATH_CHANGED] = - gtk_signal_new ("path_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpPathEditorClass, - path_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, gimp_path_editor_signals, - LAST_SIGNAL); - - class->path_changed = NULL; -} - -static void -gimp_path_editor_init (GimpPathEditor *gpe) -{ - GtkWidget *button_box; - GtkWidget *button; - GtkWidget *scrolled_window; - - gpe->file_selection = NULL; - gpe->selected_item = NULL; - gpe->number_of_items = 0; - - gpe->upper_hbox = gtk_hbox_new (FALSE, 2); - gtk_box_pack_start (GTK_BOX (gpe), gpe->upper_hbox, FALSE, TRUE, 0); - gtk_widget_show (gpe->upper_hbox); - - button_box = gtk_hbox_new (TRUE, 0); - gtk_box_pack_start (GTK_BOX (gpe->upper_hbox), button_box, FALSE, TRUE, 0); - gtk_widget_show (button_box); - - gpe->new_button = button = gimp_pixmap_button_new (new_xpm, NULL); - gtk_box_pack_start (GTK_BOX (button_box), button, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (gimp_path_editor_new_callback), - gpe); - gtk_widget_show (button); - - gpe->up_button = button = gimp_pixmap_button_new (raise_xpm, NULL); - gtk_widget_set_sensitive (button, FALSE); - gtk_box_pack_start (GTK_BOX (button_box), button, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (gimp_path_editor_move_callback), - gpe); - gtk_widget_show (button); - - gpe->down_button = button = gimp_pixmap_button_new (lower_xpm, NULL); - gtk_widget_set_sensitive (button, FALSE); - gtk_box_pack_start (GTK_BOX (button_box), button, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (gimp_path_editor_move_callback), - gpe); - gtk_widget_show (button); - - gpe->delete_button = button = gimp_pixmap_button_new (delete_xpm, NULL); - gtk_widget_set_sensitive (button, FALSE); - gtk_box_pack_start (GTK_BOX (button_box), button, TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (button), "clicked", - GTK_SIGNAL_FUNC (gimp_path_editor_delete_callback), - gpe); - gtk_widget_show (button); - - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_ALWAYS); - gtk_box_pack_start (GTK_BOX (gpe), scrolled_window, TRUE, TRUE, 2); - gtk_widget_show (scrolled_window); - - gpe->dir_list = gtk_list_new (); - gtk_list_set_selection_mode (GTK_LIST (gpe->dir_list), GTK_SELECTION_SINGLE); - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), - gpe->dir_list); - gtk_widget_show (gpe->dir_list); -} - -GtkType -gimp_path_editor_get_type (void) -{ - static GtkType gpe_type = 0; - - if (!gpe_type) - { - GtkTypeInfo gpe_info = - { - "GimpPathEditor", - sizeof (GimpPathEditor), - sizeof (GimpPathEditorClass), - (GtkClassInitFunc) gimp_path_editor_class_init, - (GtkObjectInitFunc) gimp_path_editor_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gpe_type = gtk_type_unique (gtk_vbox_get_type (), &gpe_info); - } - - return gpe_type; -} - -/** - * gimp_path_editor_new: - * @filesel_title: The title of the #GtkFileSelection dialog which can be - * popped up by the attached #GimpFileSelection. - * @path: The initial search path. - * - * Creates a new #GimpPathEditor widget. - * - * The elements of the initial search path must be separated with the - * #G_SEARCHPATH_SEPARATOR character. - * - * Returns: A pointer to the new #GimpPathEditor widget. - **/ -GtkWidget * -gimp_path_editor_new (const gchar *filesel_title, - const gchar *path) -{ - GimpPathEditor *gpe; - GtkWidget *list_item; - GList *directory_list; - gchar *directory; - gchar *mypath; - - g_return_val_if_fail ((filesel_title != NULL), NULL); - g_return_val_if_fail ((path != NULL), NULL); - - gpe = gtk_type_new (gimp_path_editor_get_type ()); - - gpe->file_selection = gimp_file_selection_new (filesel_title, "", TRUE, TRUE); - gtk_widget_set_sensitive (gpe->file_selection, FALSE); - gtk_box_pack_start (GTK_BOX (gpe->upper_hbox), gpe->file_selection, - TRUE, TRUE, 0); - gtk_signal_connect (GTK_OBJECT (gpe->file_selection), "filename_changed", - GTK_SIGNAL_FUNC (gimp_path_editor_filesel_callback), - gpe); - gtk_widget_show (gpe->file_selection); - - directory_list = NULL; - directory = mypath = g_strdup (path); - - /* split up the path */ - while (strlen (directory)) - { - gchar *current_dir; - gchar *next_separator; - - next_separator = strchr (directory, G_SEARCHPATH_SEPARATOR); - if (next_separator != NULL) - *next_separator = '\0'; - - current_dir = g_strdup (directory); - - list_item = gtk_list_item_new_with_label (current_dir); - gtk_object_set_data_full (GTK_OBJECT (list_item), "gimp_path_editor", - current_dir, - (GtkDestroyNotify) g_free); - directory_list = g_list_append (directory_list, list_item); - gtk_signal_connect (GTK_OBJECT (list_item), "select", - GTK_SIGNAL_FUNC (gimp_path_editor_select_callback), - gpe); - gtk_signal_connect (GTK_OBJECT (list_item), "deselect", - GTK_SIGNAL_FUNC (gimp_path_editor_deselect_callback), - gpe); - gtk_widget_show (list_item); - gpe->number_of_items++; - - if (next_separator != NULL) - directory = next_separator + 1; - else - break; - } - - g_free (mypath); - - if (directory_list) - gtk_list_append_items (GTK_LIST (gpe->dir_list), directory_list); - - return GTK_WIDGET (gpe); -} - -/** - * gimp_path_editor_get_path: - * @gpe: The path editor you want to get the search path from. - * - * The elements of the returned search path string are separated with the - * #G_SEARCHPATH_SEPARATOR character. - * - * Note that you have to g_free() the returned string. - * - * Returns: The search path the user has selected in the path editor. - **/ -gchar * -gimp_path_editor_get_path (GimpPathEditor *gpe) -{ - GList *list; - gchar *path = NULL; - - g_return_val_if_fail (gpe != NULL, g_strdup ("")); - g_return_val_if_fail (GIMP_IS_PATH_EDITOR (gpe), g_strdup ("")); - - for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next) - { - if (path == NULL) - { - path = - g_strdup ((gchar *) gtk_object_get_data (GTK_OBJECT (list->data), - "gimp_path_editor")); - } - else - { - gchar *newpath; - - newpath = - g_strconcat (path, - G_SEARCHPATH_SEPARATOR_S, - (gchar *) gtk_object_get_data (GTK_OBJECT (list->data), - "gimp_path_editor"), - NULL); - - g_free (path); - path = newpath; - } - } - - return path; -} - -static void -gimp_path_editor_select_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe; - gint pos; - gchar *directory; - - gpe = GIMP_PATH_EDITOR (data); - directory = (gchar *) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_path_editor"); - - gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->file_selection), gpe); - gimp_file_selection_set_filename (GIMP_FILE_SELECTION (gpe->file_selection), - directory); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->file_selection), gpe); - gpe->selected_item = widget; - - pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item); - - gtk_widget_set_sensitive (gpe->delete_button, TRUE); - gtk_widget_set_sensitive (gpe->up_button, (pos > 0)); - gtk_widget_set_sensitive (gpe->down_button, - (pos < (gpe->number_of_items - 1))); - gtk_widget_set_sensitive (gpe->file_selection, TRUE); -} - -/* the selected directory may never be deselected except by the 'new' - * button, so catch the "deselect" signal and reselect it - */ -static void -gimp_path_editor_deselect_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe; - - gpe = GIMP_PATH_EDITOR (data); - - if (widget != gpe->selected_item) - return; - - gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe); - gtk_list_select_child (GTK_LIST (gpe->dir_list), gpe->selected_item); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe); -} - -static void -gimp_path_editor_new_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe; - - gpe = GIMP_PATH_EDITOR (data); - - if (gpe->selected_item) - { - gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe); - gtk_list_unselect_child (GTK_LIST (gpe->dir_list), gpe->selected_item); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe); - } - gpe->selected_item = NULL; - - gtk_widget_set_sensitive (gpe->delete_button, FALSE); - gtk_widget_set_sensitive (gpe->up_button, FALSE); - gtk_widget_set_sensitive (gpe->down_button, FALSE); - gtk_widget_set_sensitive (gpe->file_selection, TRUE); - - gtk_editable_set_position - (GTK_EDITABLE (GIMP_FILE_SELECTION (gpe->file_selection)->entry), -1); - gtk_widget_grab_focus - (GTK_WIDGET (GIMP_FILE_SELECTION (gpe->file_selection)->entry)); -} - -static void -gimp_path_editor_move_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe = GIMP_PATH_EDITOR (data); - GList *move_list = NULL; - gint pos; - gint distance; - - if (gpe->selected_item == NULL) - return; - - pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item); - distance = (widget == gpe->up_button) ? - 1 : 1; - move_list = g_list_append (move_list, gpe->selected_item); - - gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->selected_item), gpe); - gtk_list_remove_items_no_unref (GTK_LIST (gpe->dir_list), move_list); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->selected_item), gpe); - gtk_list_insert_items (GTK_LIST (gpe->dir_list), move_list, pos + distance); - gtk_list_select_item (GTK_LIST (gpe->dir_list), pos + distance); - - gtk_signal_emit (GTK_OBJECT (gpe), gimp_path_editor_signals[PATH_CHANGED]); -} - -static void -gimp_path_editor_delete_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe = GIMP_PATH_EDITOR (data); - GList *delete_list = NULL; - gint pos; - - if (gpe->selected_item == NULL) - return; - - pos = gtk_list_child_position (GTK_LIST (gpe->dir_list), gpe->selected_item); - delete_list = g_list_append (delete_list, gpe->selected_item); - - gtk_list_remove_items (GTK_LIST (gpe->dir_list), delete_list); - gpe->number_of_items--; - - if (gpe->number_of_items == 0) - { - gpe->selected_item = NULL; - gtk_signal_handler_block_by_data (GTK_OBJECT (gpe->file_selection), gpe); - gimp_file_selection_set_filename (GIMP_FILE_SELECTION (gpe->file_selection), ""); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gpe->file_selection), gpe); - gtk_widget_set_sensitive (gpe->delete_button, FALSE); - gtk_widget_set_sensitive (gpe->file_selection, FALSE); - - return; - } - - if ((pos == gpe->number_of_items) && (pos > 0)) - pos--; - gtk_list_select_item (GTK_LIST (gpe->dir_list), pos); - - gtk_signal_emit (GTK_OBJECT (gpe), gimp_path_editor_signals[PATH_CHANGED]); -} - -static void -gimp_path_editor_filesel_callback (GtkWidget *widget, - gpointer data) -{ - GimpPathEditor *gpe = GIMP_PATH_EDITOR (data); - GList *append_list = NULL; - GtkWidget *list_item = NULL; - gchar *directory; - - directory = gimp_file_selection_get_filename (GIMP_FILE_SELECTION (widget)); - if (strcmp (directory, "") == 0) - return; - - if (gpe->selected_item == NULL) - { - list_item = gtk_list_item_new_with_label (directory); - gtk_object_set_data_full (GTK_OBJECT (list_item), "gimp_path_editor", - directory, - (GtkDestroyNotify) g_free); - append_list = g_list_append (append_list, list_item); - gtk_signal_connect (GTK_OBJECT (list_item), "select", - GTK_SIGNAL_FUNC (gimp_path_editor_select_callback), - gpe); - gtk_signal_connect (GTK_OBJECT (list_item), "deselect", - GTK_SIGNAL_FUNC (gimp_path_editor_deselect_callback), - gpe); - gtk_widget_show (list_item); - gpe->number_of_items++; - gtk_list_append_items (GTK_LIST (gpe->dir_list), append_list); - gtk_list_select_item (GTK_LIST (gpe->dir_list), gpe->number_of_items - 1); - } - else - { - gtk_label_set_text (GTK_LABEL (GTK_BIN (gpe->selected_item)->child), - directory); - gtk_object_set_data_full (GTK_OBJECT (gpe->selected_item), - "gimp_path_editor", - directory, - (GtkDestroyNotify) g_free); - } - - gtk_signal_emit (GTK_OBJECT (gpe), gimp_path_editor_signals[PATH_CHANGED]); -} diff --git a/libgimp/gimppatheditor.h b/libgimp/gimppatheditor.h deleted file mode 100644 index 7187667bc7..0000000000 --- a/libgimp/gimppatheditor.h +++ /dev/null @@ -1,81 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimppatheditor.h - * Copyright (C) 1999 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_PATH_EDITOR_H__ -#define __GIMP_PATH_EDITOR_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -#define GIMP_TYPE_PATH_EDITOR (gimp_path_editor_get_type ()) -#define GIMP_PATH_EDITOR(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditor)) -#define GIMP_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PATH_EDITOR, GimpPathEditorClass)) -#define GIMP_IS_PATH_EDITOR(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_PATH_EDITOR)) -#define GIMP_IS_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PATH_EDITOR)) - -typedef struct _GimpPathEditorClass GimpPathEditorClass; - -struct _GimpPathEditor -{ - GtkVBox vbox; - - GtkWidget *upper_hbox; - - GtkWidget *new_button; - GtkWidget *up_button; - GtkWidget *down_button; - GtkWidget *delete_button; - - GtkWidget *file_selection; - - GtkWidget *dir_list; - - GtkWidget *selected_item; - gint number_of_items; -}; - -struct _GimpPathEditorClass -{ - GtkVBoxClass parent_class; - - void (* path_changed) (GimpPathEditor *gpe); -}; - -/* For information look into the C source or the html documentation */ - -GtkType gimp_path_editor_get_type (void); - -GtkWidget * gimp_path_editor_new (const gchar *filesel_title, - const gchar *path); - -gchar * gimp_path_editor_get_path (GimpPathEditor *gpe); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_PATH_EDITOR_H__ */ diff --git a/libgimp/gimppixmap.c b/libgimp/gimppixmap.c deleted file mode 100644 index a08b6cbe81..0000000000 --- a/libgimp/gimppixmap.c +++ /dev/null @@ -1,197 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimppixmap.c - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include - -#include "gimppixmap.h" - - -static void gimp_pixmap_destroy (GtkObject *object); -static void gimp_pixmap_realize (GtkWidget *widget); -static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap); - - -static GtkPixmapClass *parent_class = NULL; - - -static void -gimp_pixmap_destroy (GtkObject *object) -{ - GimpPixmap *pixmap; - - g_return_if_fail (pixmap = GIMP_PIXMAP (object)); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -static void -gimp_pixmap_class_init (GimpPixmapClass *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - parent_class = gtk_type_class (gtk_pixmap_get_type ()); - - object_class->destroy = gimp_pixmap_destroy; - widget_class->realize = gimp_pixmap_realize; -} - -static void -gimp_pixmap_init (GimpPixmap *pixmap) -{ - pixmap->xpm_data = NULL; -} - -GtkType -gimp_pixmap_get_type (void) -{ - static guint pixmap_type = 0; - - if (!pixmap_type) - { - GtkTypeInfo pixmap_info = - { - "GimpPixmap", - sizeof (GimpPixmap), - sizeof (GimpPixmapClass), - (GtkClassInitFunc) gimp_pixmap_class_init, - (GtkObjectInitFunc) gimp_pixmap_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - pixmap_type = gtk_type_unique (gtk_pixmap_get_type (), &pixmap_info); - } - - return pixmap_type; -} - -/** - * gimp_pixmap_new: - * @xpm_data: A pointer to a XPM data structure as found in XPM files. - * - * Creates a new #GimpPixmap widget. - * - * Returns: A pointer to the new #GimpPixmap widget. - **/ -GtkWidget * -gimp_pixmap_new (gchar **xpm_data) -{ - GimpPixmap *pixmap; - - pixmap = gtk_type_new (gimp_pixmap_get_type ()); - - gtk_pixmap_set_build_insensitive (GTK_PIXMAP (pixmap), TRUE); - gimp_pixmap_set (pixmap, xpm_data); - - return GTK_WIDGET (pixmap); -} - -/** - * gimp_pixmap_set: - * @pixmap: The pixmap widget you want to set the new xpm_data for. - * @xpm_data: A pointer to a XPM data structure as found in XPM files. - * - * Sets a new image for an existing #GimpPixmap widget. - **/ -void -gimp_pixmap_set (GimpPixmap *pixmap, - gchar **xpm_data) -{ - g_return_if_fail (pixmap != NULL); - g_return_if_fail (GIMP_IS_PIXMAP (pixmap)); - - pixmap->xpm_data = xpm_data; - - GTK_WIDGET (pixmap)->requisition.width = 0; - GTK_WIDGET (pixmap)->requisition.height = 0; - - if (! GTK_WIDGET_REALIZED (GTK_WIDGET (pixmap))) - { - if (xpm_data) - { - gint width, height; - - if (sscanf (xpm_data[0], "%d %d", &width, &height) != 2) - { - g_warning ("passed pointer is no XPM data"); - } - else - { - GTK_WIDGET (pixmap)->requisition.width = - width + GTK_MISC (pixmap)->xpad * 2; - GTK_WIDGET (pixmap)->requisition.height = - height + GTK_MISC (pixmap)->ypad * 2; - } - } - } - else - { - gimp_pixmap_create_from_xpm_d (pixmap); - } -} - -static void -gimp_pixmap_realize (GtkWidget *widget) -{ - if (GTK_WIDGET_CLASS (parent_class)->realize) - GTK_WIDGET_CLASS (parent_class)->realize (widget); - - gimp_pixmap_create_from_xpm_d (GIMP_PIXMAP (widget)); -} - -static void -gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap) -{ - GtkStyle *style; - GdkPixmap *gdk_pixmap = NULL; - GdkBitmap *mask = NULL; - - if (pixmap->xpm_data) - { - GtkWidget *widget; - - widget = GTK_WIDGET (pixmap); - - style = gtk_widget_get_style (widget); - - gdk_pixmap = gdk_pixmap_create_from_xpm_d (widget->window, - &mask, - &style->bg[GTK_STATE_NORMAL], - pixmap->xpm_data); - } - - gtk_pixmap_set (GTK_PIXMAP (pixmap), gdk_pixmap, mask); - - if (gdk_pixmap) - gdk_pixmap_unref (gdk_pixmap); - - if (mask) - gdk_bitmap_unref (mask); -} diff --git a/libgimp/gimppixmap.h b/libgimp/gimppixmap.h deleted file mode 100644 index 4cc9b48ae9..0000000000 --- a/libgimp/gimppixmap.h +++ /dev/null @@ -1,65 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimppixmap.h - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_PIXMAP_H__ -#define __GIMP_PIXMAP_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -#define GIMP_TYPE_PIXMAP (gimp_pixmap_get_type ()) -#define GIMP_PIXMAP(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PIXMAP, GimpPixmap)) -#define GIMP_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PIXMAP, GimpPixmapClass)) -#define GIMP_IS_PIXMAP(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PIXMAP)) -#define GIMP_IS_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PIXMAP)) - -typedef struct _GimpPixmap GimpPixmap; -typedef struct _GimpPixmapClass GimpPixmapClass; - -struct _GimpPixmap -{ - GtkPixmap pixmap; - - gchar **xpm_data; -}; - -struct _GimpPixmapClass -{ - GtkPixmapClass parent_class; -}; - -GtkType gimp_pixmap_get_type (void); -GtkWidget * gimp_pixmap_new (gchar **xpm_data); - -void gimp_pixmap_set (GimpPixmap *pixmap, - gchar **xpm_data); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_PIXMAP_H__ */ diff --git a/libgimp/gimpquerybox.c b/libgimp/gimpquerybox.c deleted file mode 100644 index 9393d6d44b..0000000000 --- a/libgimp/gimpquerybox.c +++ /dev/null @@ -1,647 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpquerybox.c - * Copyright (C) 1999-2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimptypes.h" -#include "gimpuitypes.h" - -#include "gimpdialog.h" -#include "gimppixmap.h" -#include "gimpquerybox.h" -#include "gimpsizeentry.h" -#include "gimpwidgets.h" - -#include "libgimp-intl.h" - -#include "pixmaps/eek.xpm" - - -/* - * String, integer, double and size query boxes - */ - -typedef struct _QueryBox QueryBox; - -struct _QueryBox -{ - GtkWidget *qbox; - GtkWidget *vbox; - GtkWidget *entry; - GtkObject *object; - GtkSignalFunc callback; - gpointer data; -}; - - -static QueryBox * create_query_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - GtkSignalFunc ok_callback, - GtkSignalFunc cancel_callback, - const gchar *message, - const gchar *ok_button, - const gchar *cancel_button, - GtkObject *object, - const gchar *signal, - GtkSignalFunc callback, - gpointer data); - -static QueryBox * query_box_disconnect (gpointer data); - -static void string_query_box_ok_callback (GtkWidget *widget, - gpointer data); -static void int_query_box_ok_callback (GtkWidget *widget, - gpointer data); -static void double_query_box_ok_callback (GtkWidget *widget, - gpointer data); -static void size_query_box_ok_callback (GtkWidget *widget, - gpointer data); - -static void boolean_query_box_true_callback (GtkWidget *widget, - gpointer data); -static void boolean_query_box_false_callback (GtkWidget *widget, - gpointer data); - -static void query_box_cancel_callback (GtkWidget *widget, - gpointer data); - - -/* - * create a generic query box without any entry widget - */ -static QueryBox * -create_query_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - GtkSignalFunc ok_callback, - GtkSignalFunc cancel_callback, - const gchar *message, - const gchar *ok_button, - const gchar *cancel_button, - GtkObject *object, - const gchar *signal, - GtkSignalFunc callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *qbox; - GtkWidget *vbox = NULL; - GtkWidget *label; - - /* make sure the object / signal passed are valid - */ - g_return_val_if_fail (object == NULL || GTK_IS_OBJECT (object), NULL); - g_return_val_if_fail (object == NULL || signal != NULL, NULL); - - query_box = g_new (QueryBox, 1); - - qbox = gimp_dialog_new (title, "query_box", - help_func, help_data, - GTK_WIN_POS_MOUSE, - FALSE, TRUE, FALSE, - - ok_button, ok_callback, - query_box, NULL, NULL, TRUE, FALSE, - cancel_button, cancel_callback, - query_box, NULL, NULL, FALSE, TRUE, - - NULL); - - gtk_signal_connect (GTK_OBJECT (qbox), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &query_box->qbox); - - /* if we are associated with an object, connect to the provided signal - */ - if (object) - { - gtk_signal_connect (GTK_OBJECT (object), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &query_box->object); - - gtk_signal_connect (GTK_OBJECT (object), signal, - GTK_SIGNAL_FUNC (query_box_cancel_callback), - query_box); - } - else - { - object = NULL; - } - - if (message) - { - vbox = gtk_vbox_new (FALSE, 2); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (qbox)->vbox), vbox); - gtk_widget_show (vbox); - - label = gtk_label_new (message); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - } - - query_box->qbox = qbox; - query_box->vbox = vbox; - query_box->entry = NULL; - query_box->object = object; - query_box->callback = callback; - query_box->data = data; - - return query_box; -} - -/** - * gimp_query_string_box: - * @title: The query box dialog's title. - * @help_func: The help function to show this dialog's help page. - * @help_data: A string pointing to this dialog's html help page. - * @message: A string which will be shown above the dialog's entry widget. - * @initial: The initial value. - * @object: The object this query box is associated with. - * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". - * @data: The callback's user data. - * - * Returns: A pointer to the new #GtkDialog. - **/ -GtkWidget * -gimp_query_string_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - const gchar *initial, - GtkObject *object, - const gchar *signal, - GimpQueryStringCallback callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *entry; - - query_box = create_query_box (title, help_func, help_data, - string_query_box_ok_callback, - query_box_cancel_callback, - message, - _("OK"), _("Cancel"), - object, signal, - callback, data); - - if (! query_box) - return NULL; - - entry = gtk_entry_new (); - gtk_box_pack_start (GTK_BOX (query_box->vbox), entry, FALSE, FALSE, 0); - if (initial) - gtk_entry_set_text (GTK_ENTRY (entry), initial); - gtk_widget_grab_focus (entry); - gtk_widget_show (entry); - - query_box->entry = entry; - - return query_box->qbox; -} - -/** - * gimp_query_int_box: - * @title: The query box dialog's title. - * @help_func: The help function to show this dialog's help page. - * @help_data: A string pointing to this dialog's html help page. - * @message: A string which will be shown above the dialog's entry widget. - * @initial: The initial value. - * @lower: The lower boundary of the range of possible values. - * @upper: The upper boundray of the range of possible values. - * @object: The object this query box is associated with. - * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". - * @data: The callback's user data. - * - * Returns: A pointer to the new #GtkDialog. - **/ -GtkWidget * -gimp_query_int_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gint initial, - gint lower, - gint upper, - GtkObject *object, - const gchar *signal, - GimpQueryIntCallback callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *spinbutton; - GtkObject *adjustment; - - query_box = create_query_box (title, help_func, help_data, - int_query_box_ok_callback, - query_box_cancel_callback, - message, - _("OK"), _("Cancel"), - object, signal, - callback, data); - - if (! query_box) - return NULL; - - spinbutton = gimp_spin_button_new (&adjustment, - initial, lower, upper, 1, 10, 0, - 1, 0); - gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0); - gtk_widget_grab_focus (spinbutton); - gtk_widget_show (spinbutton); - - query_box->entry = spinbutton; - - return query_box->qbox; -} - -/** - * gimp_query_double_box: - * @title: The query box dialog's title. - * @help_func: The help function to show this dialog's help page. - * @help_data: A string pointing to this dialog's html help page. - * @message: A string which will be shown above the dialog's entry widget. - * @initial: The initial value. - * @lower: The lower boundary of the range of possible values. - * @upper: The upper boundray of the range of possible values. - * @digits: The number of decimal digits the #GtkSpinButton will provide. - * @object: The object this query box is associated with. - * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". - * @data: The callback's user data. - * - * Returns: A pointer to the new #GtkDialog. - **/ -GtkWidget * -gimp_query_double_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gdouble initial, - gdouble lower, - gdouble upper, - gint digits, - GtkObject *object, - const gchar *signal, - GimpQueryDoubleCallback callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *spinbutton; - GtkObject *adjustment; - - query_box = create_query_box (title, help_func, help_data, - double_query_box_ok_callback, - query_box_cancel_callback, - message, - _("OK"), _("Cancel"), - object, signal, - callback, data); - - if (! query_box) - return NULL; - - spinbutton = gimp_spin_button_new (&adjustment, - initial, lower, upper, 1, 10, 0, - 1, digits); - gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0); - gtk_widget_grab_focus (spinbutton); - gtk_widget_show (spinbutton); - - query_box->entry = spinbutton; - - return query_box->qbox; -} - -/** - * gimp_query_size_box: - * @title: The query box dialog's title. - * @help_func: The help function to show this dialog's help page. - * @help_data: A string pointing to this dialog's html help page. - * @message: A string which will be shown above the dialog's entry widget. - * @initial: The initial value. - * @lower: The lower boundary of the range of possible values. - * @upper: The upper boundray of the range of possible values. - * @digits: The number of decimal digits the #GimpSizeEntry provide in - * "pixel" mode. - * @unit: The unit initially shown by the #GimpUnitMenu. - * @resolution: The resolution (in dpi) which will be used for pixel/unit - * calculations. - * @dot_for_dot: #TRUE if the #GimpUnitMenu's initial unit should be "pixels". - * @object: The object this query box is associated with. - * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". - * @data: The callback's user data. - * - * Returns: A pointer to the new #GtkDialog. - **/ -GtkWidget * -gimp_query_size_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gdouble initial, - gdouble lower, - gdouble upper, - gint digits, - GimpUnit unit, - gdouble resolution, - gboolean dot_for_dot, - GtkObject *object, - const gchar *signal, - GimpQuerySizeCallback callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *sizeentry; - - query_box = create_query_box (title, help_func, help_data, - size_query_box_ok_callback, - query_box_cancel_callback, - message, - _("OK"), _("Cancel"), - object, signal, - callback, data); - - if (! query_box) - return NULL; - - sizeentry = gimp_size_entry_new (1, unit, "%p", TRUE, FALSE, FALSE, 100, - GIMP_SIZE_ENTRY_UPDATE_SIZE); - if (dot_for_dot) - gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (sizeentry), GIMP_UNIT_PIXEL); - gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 0, - resolution, FALSE); - gimp_size_entry_set_refval_digits (GIMP_SIZE_ENTRY (sizeentry), 0, digits); - gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (sizeentry), 0, - lower, upper); - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, initial); - - gtk_box_pack_start (GTK_BOX (query_box->vbox), sizeentry, FALSE, FALSE, 0); - gimp_size_entry_grab_focus (GIMP_SIZE_ENTRY (sizeentry)); - gtk_widget_show (sizeentry); - - query_box->entry = sizeentry; - - return query_box->qbox; -} - -/** - * gimp_query_boolean_box: - * @title: The query box dialog's title. - * @help_func: The help function to show this dialog's help page. - * @help_data: A string pointing to this dialog's html help page. - * @eek: #TRUE if you want the "Eek" wilber to appear left of the dialog's - * message. - * @message: A string which will be shown in the query box. - * @true_button: The string to be shown in the dialog's left button. - * @false_button: The string to be shown in the dialog's right button. - * @object: The object this query box is associated with. - * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user clicks one - * of the buttons. - * @data: The callback's user data. - * - * Returns: A pointer to the new #GtkDialog. - **/ -GtkWidget * -gimp_query_boolean_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - gboolean eek, - const gchar *message, - const gchar *true_button, - const gchar *false_button, - GtkObject *object, - const gchar *signal, - GimpQueryBooleanCallback callback, - gpointer data) -{ - QueryBox *query_box; - GtkWidget *hbox; - GtkWidget *pixmap; - GtkWidget *label; - - query_box = create_query_box (title, help_func, help_data, - boolean_query_box_true_callback, - boolean_query_box_false_callback, - eek ? NULL : message, - true_button, false_button, - object, signal, - callback, data); - - if (! query_box) - return NULL; - - if (! eek) - return query_box->qbox; - - hbox = gtk_hbox_new (FALSE, 10); - gtk_container_set_border_width (GTK_CONTAINER (hbox), 10); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (query_box->qbox)->vbox), hbox); - gtk_widget_show (hbox); - - pixmap = gimp_pixmap_new (eek_xpm); - gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); - gtk_widget_show (pixmap); - - label = gtk_label_new (message); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - return query_box->qbox; -} - - -/* - * private functions - */ - -static QueryBox * -query_box_disconnect (gpointer data) -{ - QueryBox *query_box; - - query_box = (QueryBox *) data; - - gtk_widget_set_sensitive (query_box->qbox, FALSE); - - /* disconnect, if we are connected to some signal */ - if (query_box->object) - gtk_signal_disconnect_by_data (query_box->object, query_box); - - return query_box; -} - -static void -string_query_box_ok_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - gchar *string; - - query_box = query_box_disconnect (data); - - /* Get the entry data */ - string = g_strdup (gtk_entry_get_text (GTK_ENTRY (query_box->entry))); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, string, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -int_query_box_ok_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - gint value; - - query_box = query_box_disconnect (data); - - /* Get the spinbutton data */ - value = - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (query_box->entry)); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, value, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -double_query_box_ok_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - gdouble value; - - query_box = query_box_disconnect (data); - - /* Get the spinbutton data */ - value = - gtk_spin_button_get_value_as_float (GTK_SPIN_BUTTON (query_box->entry)); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, value, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -size_query_box_ok_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - gdouble size; - GimpUnit unit; - - query_box = query_box_disconnect (data); - - /* Get the sizeentry data */ - size = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (query_box->entry), 0); - unit = gimp_size_entry_get_unit (GIMP_SIZE_ENTRY (query_box->entry)); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, size, unit, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -boolean_query_box_true_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - - query_box = query_box_disconnect (data); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, TRUE, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -boolean_query_box_false_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - - query_box = query_box_disconnect (data); - - /* Call the user defined callback */ - (* query_box->callback) (query_box->qbox, FALSE, - query_box->data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} - -static void -query_box_cancel_callback (GtkWidget *widget, - gpointer data) -{ - QueryBox *query_box; - - query_box = query_box_disconnect (data); - - /* Destroy the box */ - if (query_box->qbox) - gtk_widget_destroy (query_box->qbox); - - g_free (query_box); -} diff --git a/libgimp/gimpquerybox.h b/libgimp/gimpquerybox.h deleted file mode 100644 index d94d3e7f42..0000000000 --- a/libgimp/gimpquerybox.h +++ /dev/null @@ -1,125 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpquerybox.h - * Copyright (C) 1999-2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_QUERY_BOX_H__ -#define __GIMP_QUERY_BOX_H__ - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -/* query box callback prototypes */ -typedef void (* GimpQueryStringCallback) (GtkWidget *query_box, - gchar *string, - gpointer data); - -typedef void (* GimpQueryIntCallback) (GtkWidget *query_box, - gint value, - gpointer data); - -typedef void (* GimpQueryDoubleCallback) (GtkWidget *query_box, - gdouble value, - gpointer data); - -typedef void (* GimpQuerySizeCallback) (GtkWidget *query_box, - gdouble size, - GimpUnit unit, - gpointer data); - -typedef void (* GimpQueryBooleanCallback) (GtkWidget *query_box, - gboolean value, - gpointer data); - -/* some simple query dialogs */ -GtkWidget * gimp_query_string_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - const gchar *initial, - GtkObject *object, - const gchar *signal, - GimpQueryStringCallback callback, - gpointer data); - -GtkWidget * gimp_query_int_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gint initial, - gint lower, - gint upper, - GtkObject *object, - const gchar *signal, - GimpQueryIntCallback callback, - gpointer data); - -GtkWidget * gimp_query_double_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gdouble initial, - gdouble lower, - gdouble upper, - gint digits, - GtkObject *object, - const gchar *signal, - GimpQueryDoubleCallback callback, - gpointer data); - -GtkWidget * gimp_query_size_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - const gchar *message, - gdouble initial, - gdouble lower, - gdouble upper, - gint digits, - GimpUnit unit, - gdouble resolution, - gboolean dot_for_dot, - GtkObject *object, - const gchar *signal, - GimpQuerySizeCallback callback, - gpointer data); - -GtkWidget * gimp_query_boolean_box (const gchar *title, - GimpHelpFunc help_func, - const gchar *help_data, - gboolean eek, - const gchar *message, - const gchar *true_button, - const gchar *false_button, - GtkObject *object, - const gchar *signal, - GimpQueryBooleanCallback callback, - gpointer data); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_QUERY_BOX_H__ */ diff --git a/libgimp/gimpsizeentry.c b/libgimp/gimpsizeentry.c deleted file mode 100644 index 26d47cfda2..0000000000 --- a/libgimp/gimpsizeentry.c +++ /dev/null @@ -1,1186 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpsizeentry.c - * Copyright (C) 1999-2000 Sven Neumann - * Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimptypes.h" -#include "gimpuitypes.h" - -#include "gimplimits.h" -#include "gimpsizeentry.h" -#include "gimpunitmenu.h" - - -#define SIZE_MAX_VALUE 500000.0 - -#define GIMP_SIZE_ENTRY_DIGITS(unit) (MIN (gimp_unit_get_digits (unit), 5) + 1) - - -enum -{ - VALUE_CHANGED, - REFVAL_CHANGED, - UNIT_CHANGED, - LAST_SIGNAL -}; - -struct _GimpSizeEntryField -{ - GimpSizeEntry *gse; - - gdouble resolution; - gdouble lower; - gdouble upper; - - GtkObject *value_adjustment; - GtkWidget *value_spinbutton; - gdouble value; - gdouble min_value; - gdouble max_value; - - GtkObject *refval_adjustment; - GtkWidget *refval_spinbutton; - gdouble refval; - gdouble min_refval; - gdouble max_refval; - gint refval_digits; - - gint stop_recursion; -}; - - -static void gimp_size_entry_destroy (GtkObject *object); -static void gimp_size_entry_class_init (GimpSizeEntryClass *class); -static void gimp_size_entry_init (GimpSizeEntry *gse); - -static void gimp_size_entry_update_value (GimpSizeEntryField *gsef, - gdouble value); -static void gimp_size_entry_value_callback (GtkWidget *widget, - gpointer data); -static void gimp_size_entry_update_refval (GimpSizeEntryField *gsef, - gdouble refval); -static void gimp_size_entry_refval_callback (GtkWidget *widget, - gpointer data); -static void gimp_size_entry_update_unit (GimpSizeEntry *gse, - GimpUnit unit); -static void gimp_size_entry_unit_callback (GtkWidget *widget, - gpointer data); - - -static guint gimp_size_entry_signals[LAST_SIGNAL] = { 0 }; - -static GtkTableClass *parent_class = NULL; - -static void -gimp_size_entry_destroy (GtkObject *object) -{ - GimpSizeEntry *gse; - GSList *list; - - g_return_if_fail (object != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (object)); - - gse = GIMP_SIZE_ENTRY (object); - - for (list = gse->fields; list; list = g_slist_next(list)) - g_free (list->data); - - g_slist_free (gse->fields); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gimp_size_entry_class_init (GimpSizeEntryClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) class; - - parent_class = gtk_type_class (gtk_table_get_type ()); - - gimp_size_entry_signals[VALUE_CHANGED] = - gtk_signal_new ("value_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpSizeEntryClass, - value_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gimp_size_entry_signals[REFVAL_CHANGED] = - gtk_signal_new ("refval_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpSizeEntryClass, - refval_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gimp_size_entry_signals[UNIT_CHANGED] = - gtk_signal_new ("unit_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpSizeEntryClass, - unit_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, gimp_size_entry_signals, - LAST_SIGNAL); - - class->value_changed = NULL; - class->refval_changed = NULL; - class->unit_changed = NULL; - - object_class->destroy = gimp_size_entry_destroy; -} - -static void -gimp_size_entry_init (GimpSizeEntry *gse) -{ - gse->fields = NULL; - gse->number_of_fields = 0; - gse->unitmenu = NULL; - gse->unit = GIMP_UNIT_PIXEL; - gse->menu_show_pixels = TRUE; - gse->menu_show_percent = TRUE; - gse->show_refval = FALSE; - gse->update_policy = GIMP_SIZE_ENTRY_UPDATE_NONE; -} - -GtkType -gimp_size_entry_get_type (void) -{ - static guint gse_type = 0; - - if (!gse_type) - { - GtkTypeInfo gse_info = - { - "GimpSizeEntry", - sizeof (GimpSizeEntry), - sizeof (GimpSizeEntryClass), - (GtkClassInitFunc) gimp_size_entry_class_init, - (GtkObjectInitFunc) gimp_size_entry_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gse_type = gtk_type_unique (gtk_table_get_type (), &gse_info); - } - - return gse_type; -} - -/** - * gimp_size_entry_new: - * @number_of_fields: The number of input fields. - * @unit: The initial unit. - * @unit_format: A printf-like unit-format string (see #GimpUnitMenu). - * @menu_show_pixels: #TRUE if the unit menu shold contain an item for - * GIMP_UNIT_PIXEL (ignored if the @update_policy is not - * GIMP_SIZE_ENTRY_UPDATE_NONE). - * @menu_show_percent: #TRUE if the unit menu shold contain an item for - * GIMP_UNIT_PERCENT. - * @show_refval: #TRUE if you want an extra "refenence value" spinbutton per - input field. - * @spinbutton_usize: The minimal horizontal size of the #GtkSpinButton's. - * @update_policy: How the automatic pixel <-> real-world-unit calculations - * should be performed. - * - * Creates a new #GimpSizeEntry widget. - * - * To have all automatic calculations performed correctly, set up the - * widget in the following order: - * - * 1. gimp_size_entry_new() - * - * 2. (for each additional input field) gimp_size_entry_add_field() - * - * 3. gimp_size_entry_set_unit() - * - * For each input field: - * - * 4. gimp_size_entry_set_resolution() - * - * 5. gimp_size_entry_set_refval_boundaries() - * (or gimp_size_entry_set_value_boundaries()) - * - * 6. gimp_size_entry_set_size() - * - * 7. gimp_size_entry_set_refval() (or gimp_size_entry_set_value()) - * - * The #GimpSizeEntry is derived from #GtkTable and will have - * an empty border of one cell width on each side plus an empty column left - * of the #GimpUnitMenu to allow the caller to add labels or a #GimpChainButton. - * - * Returns: A Pointer to the new #GimpSizeEntry widget. - * - */ -GtkWidget * -gimp_size_entry_new (gint number_of_fields, - GimpUnit unit, - const gchar *unit_format, - gboolean menu_show_pixels, - gboolean menu_show_percent, - gboolean show_refval, - gint spinbutton_usize, - GimpSizeEntryUpdatePolicy update_policy) -{ - GimpSizeEntry *gse; - gint i; - - g_return_val_if_fail ((number_of_fields >= 0) && (number_of_fields <= 16), - NULL); - - gse = gtk_type_new (GIMP_TYPE_SIZE_ENTRY); - - gse->number_of_fields = number_of_fields; - gse->unit = unit; - gse->show_refval = show_refval; - gse->update_policy = update_policy; - - gtk_table_resize (GTK_TABLE (gse), - 1 + gse->show_refval + 2, - number_of_fields + 1 + 3); - - /* show the 'pixels' menu entry only if we are a 'size' sizeentry and - * don't have the reference value spinbutton - */ - if ((update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) || - (show_refval == TRUE)) - gse->menu_show_pixels = FALSE; - else - gse->menu_show_pixels = menu_show_pixels; - - /* show the 'percent' menu entry only if we are a 'size' sizeentry - */ - if (update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) - gse->menu_show_percent = FALSE; - else - gse->menu_show_percent = menu_show_percent; - - for (i = 0; i < number_of_fields; i++) - { - GimpSizeEntryField *gsef; - - gsef = g_new0 (GimpSizeEntryField, 1); - gse->fields = g_slist_append (gse->fields, gsef); - - gsef->gse = gse; - gsef->resolution = 1.0; /* just to avoid division by zero */ - gsef->lower = 0.0; - gsef->upper = 100.0; - gsef->value = 0; - gsef->min_value = 0; - gsef->max_value = SIZE_MAX_VALUE; - gsef->refval_adjustment = NULL; - gsef->value_adjustment = NULL; - gsef->refval = 0; - gsef->min_refval = 0; - gsef->max_refval = SIZE_MAX_VALUE; - gsef->refval_digits = - (update_policy == GIMP_SIZE_ENTRY_UPDATE_SIZE) ? 0 : 3; - gsef->stop_recursion = 0; - - gsef->value_adjustment = gtk_adjustment_new (gsef->value, - gsef->min_value, - gsef->max_value, - 1.0, 10.0, 0.0); - gsef->value_spinbutton = - gtk_spin_button_new (GTK_ADJUSTMENT (gsef->value_adjustment), 1.0, - (unit == GIMP_UNIT_PIXEL) ? gsef->refval_digits : - (unit == GIMP_UNIT_PERCENT) ? 2 : - GIMP_SIZE_ENTRY_DIGITS (unit)); - gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON(gsef->value_spinbutton), - GTK_SHADOW_NONE); - gtk_widget_set_usize (gsef->value_spinbutton, spinbutton_usize, 0); - gtk_table_attach_defaults (GTK_TABLE (gse), gsef->value_spinbutton, - i+1, i+2, - gse->show_refval+1, gse->show_refval+2); - gtk_signal_connect (GTK_OBJECT (gsef->value_adjustment), "value_changed", - GTK_SIGNAL_FUNC (gimp_size_entry_value_callback), - gsef); - - gtk_widget_show (gsef->value_spinbutton); - - if (gse->show_refval) - { - gsef->refval_adjustment = gtk_adjustment_new (gsef->refval, - gsef->min_refval, - gsef->max_refval, - 1.0, 10.0, 0.0); - gsef->refval_spinbutton = - gtk_spin_button_new (GTK_ADJUSTMENT (gsef->refval_adjustment), - 1.0, - gsef->refval_digits); - gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (gsef->refval_spinbutton), - GTK_SHADOW_NONE); - gtk_widget_set_usize (gsef->refval_spinbutton, spinbutton_usize, 0); - gtk_table_attach_defaults (GTK_TABLE (gse), gsef->refval_spinbutton, - i + 1, i + 2, 1, 2); - gtk_signal_connect (GTK_OBJECT (gsef->refval_adjustment), - "value_changed", - GTK_SIGNAL_FUNC (gimp_size_entry_refval_callback), - gsef); - - gtk_widget_show (gsef->refval_spinbutton); - } - - if (gse->menu_show_pixels && !gse->show_refval && (unit == GIMP_UNIT_PIXEL)) - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - gsef->refval_digits); - } - - gse->unitmenu = gimp_unit_menu_new (unit_format, unit, - gse->menu_show_pixels, - gse->menu_show_percent, TRUE); - gtk_table_attach (GTK_TABLE (gse), gse->unitmenu, - i+2, i+3, - gse->show_refval+1, gse->show_refval+2, - GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); - gtk_signal_connect (GTK_OBJECT (gse->unitmenu), "unit_changed", - GTK_SIGNAL_FUNC (gimp_size_entry_unit_callback), - gse); - gtk_widget_show (gse->unitmenu); - - return GTK_WIDGET (gse); -} - - -/** - * gimp_size_entry_add_field: - * @gse: The sizeentry you want to add a field to. - * @value_spinbutton: The spinbutton to display the field's value. - * @refval_spinbutton: The spinbutton to display the field's reference value. - * - * Adds an input field to the #GimpSizeEntry. - * - * The new input field will have the index 0. If you specified @show_refval - * as #TRUE in gimp_size_entry_new() you have to pass an additional - * #GtkSpinButton to hold the reference value. If @show_refval was #FALSE, - * @refval_spinbutton will be ignored. - * - */ -void -gimp_size_entry_add_field (GimpSizeEntry *gse, - GtkSpinButton *value_spinbutton, - GtkSpinButton *refval_spinbutton) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail (value_spinbutton != NULL); - g_return_if_fail (GTK_IS_SPIN_BUTTON (value_spinbutton)); - if (gse->show_refval) - { - g_return_if_fail (refval_spinbutton != NULL); - g_return_if_fail (GTK_IS_SPIN_BUTTON (refval_spinbutton)); - } - - gsef = g_new0 (GimpSizeEntryField, 1); - gse->fields = g_slist_prepend (gse->fields, gsef); - gse->number_of_fields++; - - gsef->gse = gse; - gsef->resolution = 1.0; /* just to avoid division by zero */ - gsef->lower = 0.0; - gsef->upper = 100.0; - gsef->value = 0; - gsef->min_value = 0; - gsef->max_value = SIZE_MAX_VALUE; - gsef->refval = 0; - gsef->min_refval = 0; - gsef->max_refval = SIZE_MAX_VALUE; - gsef->refval_digits = - (gse->update_policy == GIMP_SIZE_ENTRY_UPDATE_SIZE) ? 0 : 3; - gsef->stop_recursion = 0; - - gsef->value_adjustment = - GTK_OBJECT (gtk_spin_button_get_adjustment (value_spinbutton)); - gsef->value_spinbutton = GTK_WIDGET (value_spinbutton); - gtk_signal_connect (GTK_OBJECT (gsef->value_adjustment), "value_changed", - GTK_SIGNAL_FUNC (gimp_size_entry_value_callback), - gsef); - - if (gse->show_refval) - { - gsef->refval_adjustment = - GTK_OBJECT (gtk_spin_button_get_adjustment (refval_spinbutton)); - gsef->refval_spinbutton = GTK_WIDGET (refval_spinbutton); - gtk_signal_connect (GTK_OBJECT (gsef->refval_adjustment), "value_changed", - GTK_SIGNAL_FUNC (gimp_size_entry_refval_callback), - gsef); - } - - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (value_spinbutton), - (gse->unit == GIMP_UNIT_PIXEL) ? gsef->refval_digits : - (gse->unit == GIMP_UNIT_PERCENT) ? 2 : - GIMP_SIZE_ENTRY_DIGITS (gse->unit)); - - if (gse->menu_show_pixels && - !gse->show_refval && - (gse->unit == GIMP_UNIT_PIXEL)) - { - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - gsef->refval_digits); - } -} - -/** - * gimp_size_entry_attach_label: - * @gse: The sizeentry you want to add a label to. - * @text: The text of the label. - * @row: The row where the label will be attached. - * @column: The column where the label will be attached. - * @alignment: The horizontal alignment of the label. - * - * Attaches a #GtkLabel to the #GimpSizeEntry (which is a #GtkTable). - */ -void -gimp_size_entry_attach_label (GimpSizeEntry *gse, - const gchar *text, - gint row, - gint column, - gfloat alignment) -{ - GtkWidget* label; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - - label = gtk_label_new (text); - gtk_misc_set_alignment (GTK_MISC (label), alignment, 0.5); - - gtk_table_attach (GTK_TABLE (gse), label, column, column+1, row, row+1, - GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); - gtk_widget_show (label); -} - - -/** - * gimp_size_entry_set_resolution: - * @gse: The sizeentry you want to set a resolution for. - * @field: The index of the field you want to set the resolution for. - * @resolution: The new resolution (in dpi) for the chosen @field. - * @keep_size: #TRUE if the @field's size in pixels should stay the same. - * #FALSE if the @field's size in units should stay the same. - * - * Sets the resolution (in dpi) for field # @field of the #GimpSizeEntry. - * - * The @resolution passed will be clamped to fit in - * [#GIMP_MIN_RESOLUTION..#GIMP_MAX_RESOLUTION]. - * - * This function does nothing if the #GimpSizeEntryUpdatePolicy specified in - * gimp_size_entry_new() doesn't equal to GIMP_SIZE_ENTRY_UPDATE_SIZE. - * - */ -void -gimp_size_entry_set_resolution (GimpSizeEntry *gse, - gint field, - gdouble resolution, - gboolean keep_size) -{ - GimpSizeEntryField *gsef; - gfloat val; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - - resolution = CLAMP (resolution, GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - gsef->resolution = resolution; - - val = gsef->value; - - gsef->stop_recursion = 0; - gimp_size_entry_set_refval_boundaries (gse, field, - gsef->min_refval, gsef->max_refval); - - if (! keep_size) - gimp_size_entry_set_value (gse, field, val); -} - - -/** - * gimp_size_entry_set_size: - * @gse: The sizeentry you want to set a size for. - * @field: The index of the field you want to set the size for. - * @lower: The reference value which will be treated as 0%. - * @upper: The reference value which will be treated as 100%. - * - * Sets the pixel values for field # @field of the #GimpSizeEntry - * which will be treated as 0% and 100%. - * - * These values will be used if you specified @menu_show_percent as #TRUE - * in gimp_size_entry_new() and the user has selected GIMP_UNIT_PERCENT in - * the #GimpSizeEntry's #GimpUnitMenu. - * - * This function does nothing if the #GimpSizeEntryUpdatePolicy specified in - * gimp_size_entry_new() doesn't equal to GIMP_SIZE_ENTRY_UPDATE_SIZE. - * - */ -void -gimp_size_entry_set_size (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - g_return_if_fail (lower <= upper); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - gsef->lower = lower; - gsef->upper = upper; - - gimp_size_entry_set_refval (gse, field, gsef->refval); -} - - -/** - * gimp_size_entry_set_value_boundaries: - * @gse: The sizeentry you want to set value boundaries for. - * @field: The index of the field you want to set value boundaries for. - * @lower: The new lower boundary of the value of the chosen @field. - * @upper: The new upper boundary of the value of the chosen @field. - * - * Limits the range of possible values which can be entered in field # @field - * of the #GimpSizeEntry. - * - * The current value of the @field will be clamped to fit in the @field's - * new boundaries. - * - * NOTE: In most cases you won't be interested in these values because the - * #GimpSizeEntry's purpose is to shield the programmer from unit - * calculations. Use gimp_size_entry_set_refval_boundaries() instead. - * - */ -void -gimp_size_entry_set_value_boundaries (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - g_return_if_fail (lower <= upper); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - gsef->min_value = lower; - gsef->max_value = upper; - - GTK_ADJUSTMENT (gsef->value_adjustment)->lower = gsef->min_value; - GTK_ADJUSTMENT (gsef->value_adjustment)->upper = gsef->max_value; - - if (gsef->stop_recursion) /* this is a hack (but useful ;-) */ - return; - - gsef->stop_recursion++; - switch (gsef->gse->update_policy) - { - case GIMP_SIZE_ENTRY_UPDATE_NONE: - break; - case GIMP_SIZE_ENTRY_UPDATE_SIZE: - switch (gse->unit) - { - case GIMP_UNIT_PIXEL: - gimp_size_entry_set_refval_boundaries (gse, field, - gsef->min_value, - gsef->max_value); - break; - case GIMP_UNIT_PERCENT: - gimp_size_entry_set_refval_boundaries (gse, field, - gsef->lower + - (gsef->upper - gsef->lower) * - gsef->min_value / 100, - gsef->lower + - (gsef->upper - gsef->lower) * - gsef->max_value / 100); - break; - default: - gimp_size_entry_set_refval_boundaries (gse, field, - gsef->min_value * - gsef->resolution / - gimp_unit_get_factor (gse->unit), - gsef->max_value * - gsef->resolution / - gimp_unit_get_factor (gse->unit)); - break; - } - break; - case GIMP_SIZE_ENTRY_UPDATE_RESOLUTION: - gimp_size_entry_set_refval_boundaries (gse, field, - gsef->min_value * - gimp_unit_get_factor (gse->unit), - gsef->max_value * - gimp_unit_get_factor (gse->unit)); - break; - default: - break; - } - gsef->stop_recursion--; - - gimp_size_entry_set_value (gse, field, gsef->value); -} - -/** - * gimp_size_entry_get_value; - * @gse: The sizeentry you want to know a value of. - * @field: The index of the filed you want to know the value of. - * - * Returns the value of field # @field of the #GimpSizeEntry. - * - * The @value returned is a distance or resolution - * in the #GimpUnit the user has selected in the #GimpSizeEntry's - * #GimpUnitMenu. - * - * NOTE: In most cases you won't be interested in this value because the - * #GimpSizeEntry's purpose is to shield the programmer from unit - * calculations. Use gimp_size_entry_get_refval() instead. - * - * Returns: The value of the chosen @field. - * - */ -gdouble -gimp_size_entry_get_value (GimpSizeEntry *gse, - gint field) -{ - GimpSizeEntryField *gsef; - - g_return_val_if_fail (gse != NULL, 0); - g_return_val_if_fail (GIMP_IS_SIZE_ENTRY (gse), 0); - g_return_val_if_fail ((field >= 0) && (field < gse->number_of_fields), 0); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - return gsef->value; -} - -static void -gimp_size_entry_update_value (GimpSizeEntryField *gsef, - gdouble value) -{ - if (gsef->stop_recursion > 1) - return; - - gsef->value = value; - - switch (gsef->gse->update_policy) - { - case GIMP_SIZE_ENTRY_UPDATE_NONE: - break; - - case GIMP_SIZE_ENTRY_UPDATE_SIZE: - switch (gsef->gse->unit) - { - case GIMP_UNIT_PIXEL: - gsef->refval = value; - break; - case GIMP_UNIT_PERCENT: - gsef->refval = - CLAMP (gsef->lower + (gsef->upper - gsef->lower) * value / 100, - gsef->min_refval, gsef->max_refval); - break; - default: - gsef->refval = - CLAMP (value * gsef->resolution / - gimp_unit_get_factor (gsef->gse->unit), - gsef->min_refval, gsef->max_refval); - break; - } - if (gsef->gse->show_refval) - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->refval_adjustment), - gsef->refval); - break; - case GIMP_SIZE_ENTRY_UPDATE_RESOLUTION: - gsef->refval = - CLAMP (value * gimp_unit_get_factor (gsef->gse->unit), - gsef->min_refval, gsef->max_refval); - if (gsef->gse->show_refval) - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->refval_adjustment), - gsef->refval); - break; - - default: - break; - } -} - -/** - * gimp_size_entry_set_value; - * @gse: The sizeentry you want to set a value for. - * @field: The index of the field you want to set a value for. - * @value: The new value for @field. - * - * Sets the value for field # @field of the #GimpSizeEntry. - * - * The @value passed is treated to be a distance or resolution - * in the #GimpUnit the user has selected in the #GimpSizeEntry's - * #GimpUnitMenu. - * - * NOTE: In most cases you won't be interested in this value because the - * #GimpSizeEntry's purpose is to shield the programmer from unit - * calculations. Use gimp_size_entry_set_refval() instead. - * - */ -void -gimp_size_entry_set_value (GimpSizeEntry *gse, - gint field, - gdouble value) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - - value = CLAMP (value, gsef->min_value, gsef->max_value); - - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->value_adjustment), value); - - gimp_size_entry_update_value (gsef, value); -} - - -static void -gimp_size_entry_value_callback (GtkWidget *widget, - gpointer data) -{ - GimpSizeEntryField *gsef; - gdouble new_value; - - gsef = (GimpSizeEntryField*) data; - - new_value = GTK_ADJUSTMENT (widget)->value; - - if (gsef->value != new_value) - { - gimp_size_entry_update_value (gsef, new_value); - gtk_signal_emit (GTK_OBJECT (gsef->gse), - gimp_size_entry_signals[VALUE_CHANGED]); - } -} - - -/** - * gimp_size_entry_set_refval_boundaries: - * @gse: The sizeentry you want to set the reference value boundaries for. - * @field: The index of the field you want to set the reference value - * boundaries for. - * @lower: The new lower boundary of the reference value of the chosen @field. - * @upper: The new upper boundary of the reference value of the chosen @field. - * - * Limits the range of possible reference values which can be entered in - * field # @field of the #GimpSizeEntry. - * - * The current reference value of the @field will be clamped to fit in the - * @field's new boundaries. - * - */ -void -gimp_size_entry_set_refval_boundaries (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - g_return_if_fail (lower <= upper); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - gsef->min_refval = lower; - gsef->max_refval = upper; - - if (gse->show_refval) - { - GTK_ADJUSTMENT (gsef->refval_adjustment)->lower = gsef->min_refval; - GTK_ADJUSTMENT (gsef->refval_adjustment)->upper = gsef->max_refval; - } - - if (gsef->stop_recursion) /* this is a hack (but useful ;-) */ - return; - - gsef->stop_recursion++; - switch (gsef->gse->update_policy) - { - case GIMP_SIZE_ENTRY_UPDATE_NONE: - break; - - case GIMP_SIZE_ENTRY_UPDATE_SIZE: - switch (gse->unit) - { - case GIMP_UNIT_PIXEL: - gimp_size_entry_set_value_boundaries (gse, field, - gsef->min_refval, - gsef->max_refval); - break; - case GIMP_UNIT_PERCENT: - gimp_size_entry_set_value_boundaries (gse, field, - 100 * (gsef->min_refval - - gsef->lower) / - (gsef->upper - gsef->lower), - 100 * (gsef->max_refval - - gsef->lower) / - (gsef->upper - gsef->lower)); - break; - default: - gimp_size_entry_set_value_boundaries (gse, field, - gsef->min_refval * - gimp_unit_get_factor(gse->unit) / - gsef->resolution, - gsef->max_refval * - gimp_unit_get_factor(gse->unit) / - gsef->resolution); - break; - } - break; - case GIMP_SIZE_ENTRY_UPDATE_RESOLUTION: - gimp_size_entry_set_value_boundaries (gse, field, - gsef->min_refval / - gimp_unit_get_factor (gse->unit), - gsef->max_refval / - gimp_unit_get_factor (gse->unit)); - break; - - default: - break; - } - gsef->stop_recursion--; - - gimp_size_entry_set_refval (gse, field, gsef->refval); -} - -/** - * gimp_size_entry_set_refval_digits: - * @gse: The sizeentry you want to set the reference value digits for. - * @field: The index of the field you want to set the reference value for. - * @digits: The new number of decimal digits for the #GtkSpinButton which - * displays @field's reference value. - * - * Sets the decimal digits of field # @field of the #GimpSizeEntry to - * @digits. - * - * If you don't specify this value explicitly, the reference value's number - * of digits will equal to 0 for GIMP_SIZE_ENTRY_UPDATE_SIZE and to 2 for - * GIMP_SIZE_ENTRY_UPDATE_RESOLUTION. - * - */ -void -gimp_size_entry_set_refval_digits (GimpSizeEntry *gse, - gint field, - gint digits) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - g_return_if_fail ((digits >= 0) && (digits <= 6)); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - gsef->refval_digits = digits; - - if (gse->update_policy == GIMP_SIZE_ENTRY_UPDATE_SIZE) - { - if (gse->show_refval) - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->refval_spinbutton), - gsef->refval_digits); - else if (gse->unit == GIMP_UNIT_PIXEL) - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - gsef->refval_digits); - } -} - -/** - * gimp_size_entry_get_refval; - * @gse: The sizeentry you want to know a reference value of. - * @field: The index of the field you want to know the reference value of. - * - * Returns the reference value for field # @field of the #GimpSizeEntry. - * - * The reference value is either a distance in pixels or a resolution - * in dpi, depending on which #GimpSizeEntryUpdatePolicy you chose in - * gimp_size_entry_new(). - * - * Returns: The reference value of the chosen @field. - * - */ -gdouble -gimp_size_entry_get_refval (GimpSizeEntry *gse, - gint field) -{ - GimpSizeEntryField *gsef; - - /* return 1.0 to avoid division by zero */ - g_return_val_if_fail (gse != NULL, 1.0); - g_return_val_if_fail (GIMP_IS_SIZE_ENTRY (gse), 1.0); - g_return_val_if_fail ((field >= 0) && (field < gse->number_of_fields), 1.0); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - return gsef->refval; -} - -static void -gimp_size_entry_update_refval (GimpSizeEntryField *gsef, - gdouble refval) -{ - if (gsef->stop_recursion > 1) - return; - - gsef->refval = refval; - - switch (gsef->gse->update_policy) - { - case GIMP_SIZE_ENTRY_UPDATE_NONE: - break; - - case GIMP_SIZE_ENTRY_UPDATE_SIZE: - switch (gsef->gse->unit) - { - case GIMP_UNIT_PIXEL: - gsef->value = refval; - break; - case GIMP_UNIT_PERCENT: - gsef->value = - CLAMP (100 * (refval - gsef->lower) / (gsef->upper - gsef->lower), - gsef->min_value, gsef->max_value); - break; - default: - gsef->value = - CLAMP (refval * gimp_unit_get_factor (gsef->gse->unit) / - gsef->resolution, - gsef->min_value, gsef->max_value); - break; - } - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->value_adjustment), - gsef->value); - break; - case GIMP_SIZE_ENTRY_UPDATE_RESOLUTION: - gsef->value = - CLAMP (refval / gimp_unit_get_factor (gsef->gse->unit), - gsef->min_value, gsef->max_value); - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->value_adjustment), - gsef->value); - break; - - default: - break; - } -} - -/** - * gimp_size_entry_set_refval; - * @gse: The sizeentry you want to set a reference value for. - * @field: The index of the field you want to set the reference value for. - * @refval: The new reference value for @field. - * - * Sets the reference value for field # @field of the #GimpSizeEntry. - * - * The @refval passed is either a distance in pixels or a resolution in dpi, - * depending on which #GimpSizeEntryUpdatePolicy you chose in - * gimp_size_entry_new(). - * - */ -void -gimp_size_entry_set_refval (GimpSizeEntry *gse, - gint field, - gdouble refval) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail ((field >= 0) && (field < gse->number_of_fields)); - - gsef = (GimpSizeEntryField*) g_slist_nth_data (gse->fields, field); - - refval = CLAMP (refval, gsef->min_refval, gsef->max_refval); - - if (gse->show_refval) - { - gtk_adjustment_set_value (GTK_ADJUSTMENT (gsef->refval_adjustment), - refval); - } - - gimp_size_entry_update_refval (gsef, refval); -} - -static void -gimp_size_entry_refval_callback (GtkWidget *widget, - gpointer data) -{ - GimpSizeEntryField *gsef; - gdouble new_refval; - - gsef = (GimpSizeEntryField*) data; - - new_refval = GTK_ADJUSTMENT (widget)->value; - - if (gsef->refval != new_refval) - { - gimp_size_entry_update_refval (gsef, new_refval); - gtk_signal_emit (GTK_OBJECT (gsef->gse), - gimp_size_entry_signals[REFVAL_CHANGED]); - } -} - - -/** - * gimp_size_entry_get_unit: - * @gse: The sizeentry you want to know the unit of. - * - * Returns the #GimpUnit the user has selected in the #GimpSizeEntry's - * #GimpUnitMenu. - * - * Returns: The sizeentry's unit. - * - */ -GimpUnit -gimp_size_entry_get_unit (GimpSizeEntry *gse) -{ - g_return_val_if_fail (gse != NULL, GIMP_UNIT_INCH); - g_return_val_if_fail (GIMP_IS_SIZE_ENTRY (gse), GIMP_UNIT_INCH); - - return gse->unit; -} - -static void -gimp_size_entry_update_unit (GimpSizeEntry *gse, - GimpUnit unit) -{ - GimpSizeEntryField *gsef; - gint i; - gint digits; - - gse->unit = unit; - - for (i = 0; i < gse->number_of_fields; i++) - { - gsef = (GimpSizeEntryField *) g_slist_nth_data (gse->fields, i); - - if (gse->update_policy == GIMP_SIZE_ENTRY_UPDATE_SIZE) - { - if (unit == GIMP_UNIT_PIXEL) - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - gsef->refval_digits); - else if (unit == GIMP_UNIT_PERCENT) - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - 2); - else - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - GIMP_SIZE_ENTRY_DIGITS (unit)); - } - else if (gse->update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) - { - digits = - -(gimp_unit_get_digits (unit) - gimp_unit_get_digits (GIMP_UNIT_INCH)); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (gsef->value_spinbutton), - MAX (3 + digits, 3)); - } - - gsef->stop_recursion = 0; /* hack !!! */ - - gtk_signal_handler_block_by_data (GTK_OBJECT (gsef->value_adjustment), - gsef); - - gimp_size_entry_set_refval_boundaries (gse, i, - gsef->min_refval, gsef->max_refval); - - gtk_signal_handler_unblock_by_data (GTK_OBJECT (gsef->value_adjustment), - gsef); - } - - gtk_signal_emit (GTK_OBJECT (gse), gimp_size_entry_signals[VALUE_CHANGED]); -} - -/** - * gimp_size_entry_set_unit: - * @gse: The sizeentry you want to change the unit for. - * @unit: The new unit. - * - * Sets the #GimpSizeEntry's unit. The reference value for all fields will - * stay the same but the value in units or pixels per unit will change - * according to which #GimpSizeEntryUpdatePolicy you chose in - * gimp_size_entry_new(). - * - */ -void -gimp_size_entry_set_unit (GimpSizeEntry *gse, - GimpUnit unit) -{ - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - g_return_if_fail (gse->menu_show_pixels || (unit != GIMP_UNIT_PIXEL)); - g_return_if_fail (gse->menu_show_percent || (unit != GIMP_UNIT_PERCENT)); - - gimp_unit_menu_set_unit (GIMP_UNIT_MENU (gse->unitmenu), unit); - gimp_size_entry_update_unit (gse, unit); -} - -static void -gimp_size_entry_unit_callback (GtkWidget *widget, - gpointer data) -{ - gimp_size_entry_update_unit (GIMP_SIZE_ENTRY (data), - gimp_unit_menu_get_unit (GIMP_UNIT_MENU(widget))); - - gtk_signal_emit (GTK_OBJECT (data), gimp_size_entry_signals[UNIT_CHANGED]); -} - -/** - * gimp_size_entry_grab_focus: - * @gse: The sizeentry you want to grab the keyboard focus. - * - * This function is rather ugly and just a workaround for the fact that - * it's impossible to implement gtk_widget_grab_focus() for a #GtkTable. - * - */ -void -gimp_size_entry_grab_focus (GimpSizeEntry *gse) -{ - GimpSizeEntryField *gsef; - - g_return_if_fail (gse != NULL); - g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse)); - - gsef = (GimpSizeEntryField*) gse->fields->data; - - gtk_widget_grab_focus (gse->show_refval ? - gsef->refval_spinbutton : gsef->value_spinbutton); -} diff --git a/libgimp/gimpsizeentry.h b/libgimp/gimpsizeentry.h deleted file mode 100644 index 23f34cc11e..0000000000 --- a/libgimp/gimpsizeentry.h +++ /dev/null @@ -1,138 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpsizeentry.h - * Copyright (C) 1999-2000 Sven Neumann - * Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_SIZE_ENTRY_H__ -#define __GIMP_SIZE_ENTRY_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -#define GIMP_TYPE_SIZE_ENTRY (gimp_size_entry_get_type ()) -#define GIMP_SIZE_ENTRY(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntry)) -#define GIMP_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntryClass)) -#define GIMP_IS_SIZE_ENTRY(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_SIZE_ENTRY)) -#define GIMP_IS_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SIZE_ENTRY)) - -typedef struct _GimpSizeEntryClass GimpSizeEntryClass; - -typedef struct _GimpSizeEntryField GimpSizeEntryField; - -struct _GimpSizeEntry -{ - GtkTable table; - - GSList *fields; - gint number_of_fields; - - GtkWidget *unitmenu; - GimpUnit unit; - gboolean menu_show_pixels; - gboolean menu_show_percent; - - gboolean show_refval; - GimpSizeEntryUpdatePolicy update_policy; -}; - -struct _GimpSizeEntryClass -{ - GtkTableClass parent_class; - - void (* value_changed) (GimpSizeEntry *gse); - void (* refval_changed) (GimpSizeEntry *gse); - void (* unit_changed) (GimpSizeEntry *gse); -}; - -/* For information look into the C source or the html documentation */ - -GtkType gimp_size_entry_get_type (void); - -GtkWidget * gimp_size_entry_new (gint number_of_fields, - GimpUnit unit, - const gchar *unit_format, - gboolean menu_show_pixels, - gboolean menu_show_percent, - gboolean show_refval, - gint spinbutton_usize, - GimpSizeEntryUpdatePolicy update_policy); - -void gimp_size_entry_add_field (GimpSizeEntry *gse, - GtkSpinButton *value_spinbutton, - GtkSpinButton *refval_spinbutton); - -void gimp_size_entry_attach_label (GimpSizeEntry *gse, - const gchar *text, - gint row, - gint column, - gfloat alignment); - -void gimp_size_entry_set_resolution (GimpSizeEntry *gse, - gint field, - gdouble resolution, - gboolean keep_size); - -void gimp_size_entry_set_size (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper); - -void gimp_size_entry_set_value_boundaries (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper); - -gdouble gimp_size_entry_get_value (GimpSizeEntry *gse, - gint field); -void gimp_size_entry_set_value (GimpSizeEntry *gse, - gint field, - gdouble value); - -void gimp_size_entry_set_refval_boundaries (GimpSizeEntry *gse, - gint field, - gdouble lower, - gdouble upper); -void gimp_size_entry_set_refval_digits (GimpSizeEntry *gse, - gint field, - gint digits); - -gdouble gimp_size_entry_get_refval (GimpSizeEntry *gse, - gint field); -void gimp_size_entry_set_refval (GimpSizeEntry *gse, - gint field, - gdouble refval); - -GimpUnit gimp_size_entry_get_unit (GimpSizeEntry *gse); -void gimp_size_entry_set_unit (GimpSizeEntry *gse, - GimpUnit unit); - -void gimp_size_entry_grab_focus (GimpSizeEntry *gse); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_SIZE_ENTRY_H__ */ diff --git a/libgimp/gimpui.h b/libgimp/gimpui.h index 9b7b700d0d..8013bb94c4 100644 --- a/libgimp/gimpui.h +++ b/libgimp/gimpui.h @@ -22,22 +22,12 @@ #include +#include + #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #ifdef __cplusplus diff --git a/libgimp/gimpuitypes.h b/libgimp/gimpuitypes.h index 591dc82757..89c8fdd8a6 100644 --- a/libgimp/gimpuitypes.h +++ b/libgimp/gimpuitypes.h @@ -29,24 +29,14 @@ extern "C" { /* For information look into the html documentation */ -typedef enum -{ - GIMP_SIZE_ENTRY_UPDATE_NONE = 0, - GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, - GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 -} GimpSizeEntryUpdatePolicy; - -typedef struct _GimpColorArea GimpColorArea; -typedef struct _GimpColorButton GimpColorButton; -typedef struct _GimpPathEditor GimpPathEditor; -typedef struct _GimpSizeEntry GimpSizeEntry; -typedef struct _GimpUnitMenu GimpUnitMenu; - -typedef void (* GimpHelpFunc) (const gchar *help_data); +/* empty at the moment because most stuff went to libgimpwidgets. + * + * left here because it will contain stuff again --Mitch + */ #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* __GIMP_TYPES_H__ */ +#endif /* __GIMP_UI_TYPES_H__ */ diff --git a/libgimp/gimpunitmenu.c b/libgimp/gimpunitmenu.c deleted file mode 100644 index c03b275f5a..0000000000 --- a/libgimp/gimpunitmenu.c +++ /dev/null @@ -1,630 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball - * - * gimpunitmenu.c - * Copyright (C) 1999 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "gimptypes.h" -#include "gimpuitypes.h" - -#include "gimpdialog.h" -#include "gimphelpui.h" -#include "gimpunitmenu.h" - -#include "libgimp-intl.h" - - -/* private functions */ -static const gchar * gimp_unit_menu_build_string (const gchar *format, - GimpUnit unit); -static void gimp_unit_menu_callback (GtkWidget *widget, - gpointer data); - -enum -{ - UNIT_CHANGED, - LAST_SIGNAL -}; - -static guint gimp_unit_menu_signals[LAST_SIGNAL] = { 0 }; - -static GtkOptionMenuClass *parent_class = NULL; - -static void -gimp_unit_menu_destroy (GtkObject *object) -{ - GimpUnitMenu *gum; - - g_return_if_fail (object != NULL); - g_return_if_fail (GIMP_IS_UNIT_MENU (object)); - - gum = GIMP_UNIT_MENU (object); - - if (gum->format) - g_free (gum->format); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gimp_unit_menu_class_init (GimpUnitMenuClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) klass; - - parent_class = gtk_type_class (gtk_option_menu_get_type ()); - - gimp_unit_menu_signals[UNIT_CHANGED] = - gtk_signal_new ("unit_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GimpUnitMenuClass, - unit_changed), - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, gimp_unit_menu_signals, - LAST_SIGNAL); - - klass->unit_changed = NULL; - - object_class->destroy = gimp_unit_menu_destroy; -} - -static void -gimp_unit_menu_init (GimpUnitMenu *gum) -{ - gum->format = NULL; - gum->unit = GIMP_UNIT_PIXEL; - gum->show_pixels = FALSE; - gum->show_percent = FALSE; - gum->selection = NULL; - gum->clist = NULL; -} - -GtkType -gimp_unit_menu_get_type (void) -{ - static GtkType gum_type = 0; - - if (!gum_type) - { - GtkTypeInfo gum_info = - { - "GimpUnitMenu", - sizeof (GimpUnitMenu), - sizeof (GimpUnitMenuClass), - (GtkClassInitFunc) gimp_unit_menu_class_init, - (GtkObjectInitFunc) gimp_unit_menu_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL - }; - - gum_type = gtk_type_unique (gtk_option_menu_get_type (), &gum_info); - } - - return gum_type; -} - -/** - * gimp_unit_menu_new: - * @format: A printf-like format string which is used to create the unit - * strings. - * @unit: The initially selected unit. - * @show_pixels: #TRUE if the unit menu should contain an item for - * GIMP_UNIT_PIXEL. - * @show_percent: #TRUE in the unit menu should contain an item for - * GIMP_UNIT_PERCENT. - * @show_custom: #TRUE if the unit menu should contain a "More..." item for - * opening the user-defined-unit selection dialog. - * - * Creates a new #GimpUnitMenu widget. - * - * The @format string supports the following percent expansions: - * - * Returns: A pointer to the new #GimpUnitMenu widget. - * - */ -GtkWidget * -gimp_unit_menu_new (const gchar *format, - GimpUnit unit, - gboolean show_pixels, - gboolean show_percent, - gboolean show_custom) -{ - GimpUnitMenu *gum; - GtkWidget *menu; - GtkWidget *menuitem; - GimpUnit u; - - g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) && - (unit < gimp_unit_get_number_of_units ()) || - (unit == GIMP_UNIT_PERCENT), NULL); - - if ((unit >= gimp_unit_get_number_of_built_in_units ()) && - (unit != GIMP_UNIT_PERCENT)) - show_custom = TRUE; - - gum = gtk_type_new (gimp_unit_menu_get_type ()); - - gum->format = g_strdup (format); - gum->show_pixels = show_pixels; - gum->show_percent = show_percent; - - menu = gtk_menu_new (); - for (u = show_pixels ? GIMP_UNIT_PIXEL : GIMP_UNIT_INCH; - u < gimp_unit_get_number_of_built_in_units (); - u++) - { - /* special cases "pixels" and "percent" */ - if (u == GIMP_UNIT_INCH) - { - if (show_percent) - { - menuitem = - gtk_menu_item_new_with_label - (gimp_unit_menu_build_string (format, GIMP_UNIT_PERCENT)); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gimp_unit_menu_callback), - gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer) GIMP_UNIT_PERCENT); - gtk_widget_show (menuitem); - } - - if (show_pixels || show_percent) - { - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_set_sensitive (menuitem, FALSE); - gtk_widget_show (menuitem); - } - } - - menuitem = - gtk_menu_item_new_with_label (gimp_unit_menu_build_string (format, u)); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gimp_unit_menu_callback), - gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer) u); - gtk_widget_show (menuitem); - } - - if ((unit >= gimp_unit_get_number_of_built_in_units ()) && - (unit != GIMP_UNIT_PERCENT)) - { - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_set_sensitive (menuitem, FALSE); - gtk_widget_show (menuitem); - - menuitem = - gtk_menu_item_new_with_label (gimp_unit_menu_build_string (format, unit)); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gimp_unit_menu_callback), - gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer) unit); - gtk_widget_show (menuitem); - } - - if (show_custom) - { - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_widget_set_sensitive (menuitem, FALSE); - gtk_widget_show (menuitem); - - menuitem = - gtk_menu_item_new_with_label (_("More...")); - gtk_menu_append (GTK_MENU (menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gimp_unit_menu_callback), - gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer) (GIMP_UNIT_PERCENT + 1)); - gtk_widget_show (menuitem); - } - - gtk_option_menu_set_menu (GTK_OPTION_MENU (gum), menu); - - gum->unit = unit; - gtk_option_menu_set_history (GTK_OPTION_MENU (gum), - (unit == GIMP_UNIT_PIXEL) ? 0 : - ((unit == GIMP_UNIT_PERCENT) ? - (show_pixels ? 1 : 0) : - (((show_pixels || show_percent) ? 2 : 0) + - ((show_pixels && show_percent) ? 1 : 0) + - ((unit < GIMP_UNIT_END) ? - (unit - 1) : GIMP_UNIT_END)))); - - return GTK_WIDGET (gum); -} - -/** - * gimp_unit_menu_set_unit: - * @gum: The unit menu you want to set the unit for. - * @unit: The new unit. - * - * Sets a new #GimpUnit for the specified #GimpUnitMenu. - * - */ -void -gimp_unit_menu_set_unit (GimpUnitMenu *gum, - GimpUnit unit) -{ - GtkWidget *menuitem = NULL; - GList *items; - gint user_unit; - - g_return_if_fail (gum != NULL); - g_return_if_fail (GIMP_IS_UNIT_MENU (gum)); - g_return_if_fail (((unit >= GIMP_UNIT_PIXEL) && - ((unit > GIMP_UNIT_PIXEL) || gum->show_pixels) && - (unit < gimp_unit_get_number_of_units ())) || - ((unit == GIMP_UNIT_PERCENT) && gum->show_percent)); - - if (unit == gum->unit) - return; - - items = GTK_MENU_SHELL (GTK_OPTION_MENU (gum)->menu)->children; - user_unit = (GIMP_UNIT_END + - (((gum->show_pixels || gum->show_percent) ? 2 : 0) + - ((gum->show_pixels && gum->show_percent) ? 1 : 0))); - - if ((unit >= GIMP_UNIT_END) && (unit != GIMP_UNIT_PERCENT)) - { - if ((g_list_length (items) - 3) >= user_unit) - { - gtk_widget_destroy (GTK_WIDGET (g_list_nth_data (items, - user_unit - 1))); - gtk_widget_destroy (GTK_WIDGET (g_list_nth_data (items, - user_unit - 1))); - } - - menuitem = gtk_menu_item_new (); - gtk_menu_append (GTK_MENU (GTK_OPTION_MENU (gum)->menu), menuitem); - gtk_widget_set_sensitive (menuitem, FALSE); - gtk_menu_reorder_child (GTK_MENU (GTK_OPTION_MENU (gum)->menu), - menuitem, user_unit - 1); - gtk_widget_show (menuitem); - - menuitem = - gtk_menu_item_new_with_label (gimp_unit_menu_build_string (gum->format, - unit)); - gtk_menu_append (GTK_MENU (GTK_OPTION_MENU (gum)->menu), menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (gimp_unit_menu_callback), - gum); - gtk_object_set_data (GTK_OBJECT (menuitem), "gimp_unit_menu", - (gpointer) unit); - gtk_menu_reorder_child (GTK_MENU (GTK_OPTION_MENU (gum)->menu), - menuitem, user_unit); - gtk_widget_show (menuitem); - } - - gum->unit = unit; - gtk_option_menu_set_history (GTK_OPTION_MENU (gum), - (unit == GIMP_UNIT_PIXEL) ? 0 : - ((unit == GIMP_UNIT_PERCENT) ? - (gum->show_pixels ? 1 : 0) : - (((gum->show_pixels || - gum->show_percent) ? 2 : 0) + - ((gum->show_pixels && - gum->show_percent) ? 1 : 0) + - ((unit < GIMP_UNIT_END) ? - (unit - 1) : GIMP_UNIT_END)))); -} - -/** - * gimp_unit_menu_get_unit: - * @gum: The unit menu you want to know the unit of. - * - * Returns the #GimpUnit the user has selected from the #GimpUnitMenu. - * - * Returns: The unit the user has selected. - * - */ -GimpUnit -gimp_unit_menu_get_unit (GimpUnitMenu *gum) -{ - g_return_val_if_fail (gum != NULL, GIMP_UNIT_INCH); - g_return_val_if_fail (GIMP_IS_UNIT_MENU (gum), GIMP_UNIT_INCH); - - return gum->unit; -} - -/* most of the next two functions is stolen from app/gdisplay.c */ -static gint -print (gchar *buf, - gint len, - gint start, - const gchar *fmt, - ...) -{ - va_list args; - gint printed; - - va_start (args, fmt); - - printed = g_vsnprintf (buf + start, len - start, fmt, args); - if (printed < 0) - printed = len - start; - - va_end (args); - - return printed; -} - -static const gchar * -gimp_unit_menu_build_string (const gchar *format, - GimpUnit unit) -{ - static gchar buffer[64]; - gint i = 0; - - while (i < (sizeof (buffer) - 1) && *format) - { - switch (*format) - { - case '%': - format++; - switch (*format) - { - case 0: - g_warning ("unit-menu-format string ended within %%-sequence"); - break; - - case '%': - buffer[i++] = '%'; - break; - - case 'f': /* factor (how many units make up an inch) */ - i += print (buffer, sizeof (buffer), i, "%f", - gimp_unit_get_factor (unit)); - break; - - case 'y': /* symbol ("''" for inch) */ - i += print (buffer, sizeof (buffer), i, "%s", - gimp_unit_get_symbol (unit)); - break; - - case 'a': /* abbreviation */ - i += print (buffer, sizeof (buffer), i, "%s", - gimp_unit_get_abbreviation (unit)); - break; - - case 's': /* singular */ - i += print (buffer, sizeof (buffer), i, "%s", - gimp_unit_get_singular (unit)); - break; - - case 'p': /* plural */ - i += print (buffer, sizeof (buffer), i, "%s", - gimp_unit_get_plural (unit)); - break; - - default: - g_warning ("gimp_unit_menu_build_string(): " - "unit-menu-format contains unknown format sequence " - "'%%%c'", *format); - break; - } - break; - - default: - buffer[i++] = *format; - break; - } - - format++; - } - - buffer[MIN (i, sizeof (buffer) - 1)] = 0; - - return buffer; -} - -/* private callback of gimp_unit_menu_create_selection () */ -static void -gimp_unit_menu_selection_ok_callback (GtkWidget *widget, - gpointer data) -{ - GimpUnitMenu *gum; - GimpUnit unit; - - gum = GIMP_UNIT_MENU (data); - - if (gum->selection && GTK_CLIST (gum->clist)->selection) - { - unit = (GimpUnit) - gtk_clist_get_row_data (GTK_CLIST (gum->clist), - (gint) (GTK_CLIST (gum->clist)->selection->data)); - gimp_unit_menu_set_unit (gum, unit); - gtk_signal_emit (GTK_OBJECT (gum), - gimp_unit_menu_signals[UNIT_CHANGED]); - - gtk_widget_destroy (gum->selection); - } -} - -static void -gimp_unit_menu_selection_select_row_callback (GtkWidget *widget, - gint row, - gint column, - GdkEventButton *bevent, - gpointer data) -{ - if (bevent && bevent->type == GDK_2BUTTON_PRESS) - gimp_unit_menu_selection_ok_callback (NULL, data); -} - -/* private function of gimp_unit_menu_callback () */ -static void -gimp_unit_menu_create_selection (GimpUnitMenu *gum) -{ - GtkWidget *vbox; - GtkWidget *scrolled_win; - gchar *titles[2]; - gchar *row[2]; - GimpUnit unit; - gint num_units; - gint unit_width; - gint factor_width; - - gum->selection = - gimp_dialog_new (_("Unit Selection"), "unit_selection", - gimp_standard_help_func, "dialogs/unit_selection.html", - GTK_WIN_POS_MOUSE, - FALSE, TRUE, FALSE, - - _("OK"), gimp_unit_menu_selection_ok_callback, - gum, NULL, NULL, TRUE, FALSE, - _("Cancel"), gtk_widget_destroy, - NULL, 1, NULL, FALSE, TRUE, - - NULL); - - gtk_signal_connect (GTK_OBJECT (gum->selection), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &gum->selection); - - gtk_signal_connect_object_while_alive (GTK_OBJECT (gum), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroy), - GTK_OBJECT (gum->selection)); - gtk_signal_connect_object_while_alive (GTK_OBJECT (gum), "unmap", - GTK_SIGNAL_FUNC (gtk_widget_destroy), - GTK_OBJECT (gum->selection)); - - /* the main vbox */ - vbox = gtk_vbox_new (FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (gum->selection)->vbox), vbox); - gtk_widget_show (vbox); - - /* the selection list */ - scrolled_win = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), - GTK_POLICY_NEVER, - GTK_POLICY_ALWAYS); - gtk_container_add (GTK_CONTAINER (vbox), scrolled_win); - gtk_widget_show (scrolled_win); - - titles[0] = _("Unit"); - titles[1] = _("Factor"); - gum->clist = gtk_clist_new_with_titles (2, titles); - gtk_clist_set_shadow_type (GTK_CLIST (gum->clist), GTK_SHADOW_IN); - gtk_clist_set_selection_mode (GTK_CLIST (gum->clist), GTK_SELECTION_BROWSE); - gtk_clist_column_titles_passive (GTK_CLIST (gum->clist)); - /* the unit lines */ - num_units = gimp_unit_get_number_of_units (); - for (unit = GIMP_UNIT_END; unit < num_units; unit++) - { - row[0] = g_strdup (gimp_unit_menu_build_string (gum->format, unit)); - row[1] = g_strdup (gimp_unit_menu_build_string ("(%f)", unit)); - - gtk_clist_append (GTK_CLIST (gum->clist), row); - gtk_clist_set_row_data (GTK_CLIST (gum->clist), - unit - GIMP_UNIT_END, - (gpointer) unit); - - g_free (row[0]); - g_free (row[1]); - } - - unit_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 0); - factor_width = gtk_clist_optimal_column_width (GTK_CLIST (gum->clist), 1); - - gtk_clist_set_column_width (GTK_CLIST (gum->clist), 0, unit_width); - gtk_clist_set_column_width (GTK_CLIST (gum->clist), 1, factor_width); - - gtk_widget_set_usize (gum->clist, -1, 150); - - gtk_container_add (GTK_CONTAINER (scrolled_win), gum->clist); - gtk_signal_connect (GTK_OBJECT (gum->clist), "select_row", - GTK_SIGNAL_FUNC (gimp_unit_menu_selection_select_row_callback), - gum); - gtk_widget_show (gum->clist); - - gtk_signal_connect (GTK_OBJECT (gum->clist), "destroy", - GTK_SIGNAL_FUNC (gtk_widget_destroyed), - &gum->clist); - - gtk_widget_show (vbox); - gtk_widget_show (gum->selection); - - if (gum->unit >= GIMP_UNIT_END) - { - gtk_clist_select_row (GTK_CLIST (gum->clist), - gum->unit - GIMP_UNIT_END, 0); - gtk_clist_moveto (GTK_CLIST (gum->clist), - gum->unit - GIMP_UNIT_END, 0, 0.0, 0.0); - } -} - -static void -gimp_unit_menu_callback (GtkWidget *widget, - gpointer data) -{ - GimpUnitMenu *gum; - GimpUnit new_unit; - - gum = data; - new_unit = (guint) gtk_object_get_data (GTK_OBJECT (widget), - "gimp_unit_menu"); - - if (gum->unit == new_unit) - return; - - /* was "More..." selected? */ - if (new_unit == (GIMP_UNIT_PERCENT + 1)) - { - gtk_option_menu_set_history (GTK_OPTION_MENU (gum), - (gum->unit == GIMP_UNIT_PIXEL) ? 0 : - ((gum->unit == GIMP_UNIT_PERCENT) ? - (gum->show_pixels ? 1 : 0) : - ((gum->show_pixels || - gum->show_percent ? 2 : 0) + - (gum->show_pixels && - gum->show_percent ? 1 : 0) + - ((gum->unit < GIMP_UNIT_END) ? - gum->unit - 1 : GIMP_UNIT_END)))); - if (! gum->selection) - gimp_unit_menu_create_selection (gum); - return; - } - else if (gum->selection) - { - gtk_widget_destroy (gum->selection); - } - - gimp_unit_menu_set_unit (gum, new_unit); - gtk_signal_emit (GTK_OBJECT (gum), - gimp_unit_menu_signals[UNIT_CHANGED]); -} diff --git a/libgimp/gimpunitmenu.h b/libgimp/gimpunitmenu.h deleted file mode 100644 index 5a3b236c58..0000000000 --- a/libgimp/gimpunitmenu.h +++ /dev/null @@ -1,83 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpunitmenu.h - * Copyright (C) 1999 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_UNIT_MENU_H__ -#define __GIMP_UNIT_MENU_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - - -#define GIMP_TYPE_UNIT_MENU (gimp_unit_menu_get_type ()) -#define GIMP_UNIT_MENU(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_UNIT_MENU, GimpUnitMenu)) -#define GIMP_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_UNIT_MENU, GimpUnitMenuClass)) -#define GIMP_IS_UNIT_MENU(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_UNIT_MENU)) -#define GIMP_IS_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_UNIT_MENU)) - -typedef struct _GimpUnitMenuClass GimpUnitMenuClass; - -struct _GimpUnitMenu -{ - GtkOptionMenu optionmenu; - - /* public (read only) */ - gchar *format; - GimpUnit unit; - - gboolean show_pixels; - gboolean show_percent; - - /* private */ - GtkWidget *selection; - GtkWidget *clist; -}; - -struct _GimpUnitMenuClass -{ - GtkOptionMenuClass parent_class; - - void (* unit_changed) (GimpUnitMenu *gum); -}; - - -GtkType gimp_unit_menu_get_type (void); - -GtkWidget * gimp_unit_menu_new (const gchar *format, - GimpUnit unit, - gboolean show_pixels, - gboolean show_percent, - gboolean show_custom); - -void gimp_unit_menu_set_unit (GimpUnitMenu *gum, - GimpUnit unit); - -GimpUnit gimp_unit_menu_get_unit (GimpUnitMenu *gum); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_UNIT_MENU_H__ */ diff --git a/libgimp/gimpwidgets.c b/libgimp/gimpwidgets.c deleted file mode 100644 index 812ca75edf..0000000000 --- a/libgimp/gimpwidgets.c +++ /dev/null @@ -1,1404 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpwidgets.c - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include - -#include "libgimpmath/gimpmath.h" - -#include "gimptypes.h" -#include "gimpuitypes.h" - -#include "gimpchainbutton.h" -#include "gimphelpui.h" -#include "gimppixmap.h" -#include "gimpsizeentry.h" -#include "gimpunitmenu.h" -#include "gimpwidgets.h" - -#include "libgimp-intl.h" - - -/* - * Widget Constructors - */ - -/** - * gimp_option_menu_new: - * @menu_only: #TRUE if the function should return a #GtkMenu only. - * @...: A #NULL terminated @va_list describing the menu items. - * - * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). - **/ -GtkWidget * -gimp_option_menu_new (gboolean menu_only, - - /* specify menu items as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * gpointer user_data, - * GtkWidget **widget_ptr, - * gboolean active - */ - - ...) -{ - GtkWidget *menu; - GtkWidget *menuitem; - - /* menu item variables */ - const gchar *label; - GtkSignalFunc callback; - gpointer data; - gpointer user_data; - GtkWidget **widget_ptr; - gboolean active; - - va_list args; - gint i; - gint initial_index; - - menu = gtk_menu_new (); - - /* create the menu items */ - initial_index = 0; - - va_start (args, menu_only); - label = va_arg (args, const gchar *); - - for (i = 0; label; i++) - { - callback = va_arg (args, GtkSignalFunc); - data = va_arg (args, gpointer); - user_data = va_arg (args, gpointer); - widget_ptr = va_arg (args, GtkWidget **); - active = va_arg (args, gboolean); - - if (strcmp (label, "---")) - { - menuitem = gtk_menu_item_new_with_label (label); - - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - callback, - data); - - if (user_data) - gtk_object_set_user_data (GTK_OBJECT (menuitem), user_data); - } - else - { - menuitem = gtk_menu_item_new (); - - gtk_widget_set_sensitive (menuitem, FALSE); - } - - gtk_menu_append (GTK_MENU (menu), menuitem); - - if (widget_ptr) - *widget_ptr = menuitem; - - gtk_widget_show (menuitem); - - /* remember the initial menu item */ - if (active) - initial_index = i; - - label = va_arg (args, const gchar *); - } - va_end (args); - - if (! menu_only) - { - GtkWidget *optionmenu; - - optionmenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); - - /* select the initial menu item */ - gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index); - - return optionmenu; - } - - return menu; -} - -/** - * gimp_option_menu_new2: - * @menu_only: #TRUE if the function should return a #GtkMenu only. - * @menu_item_callback: The callback each menu item's "activate" signal will - * be connected with. - * @data: The data which will be passed to gtk_signal_connect(). - * @initial: The @user_data of the initially selected menu item. - * @...: A #NULL terminated @va_list describing the menu items. - * - * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). - **/ -GtkWidget * -gimp_option_menu_new2 (gboolean menu_only, - GtkSignalFunc menu_item_callback, - gpointer data, - gpointer initial, /* user_data */ - - /* specify menu items as va_list: - * const gchar *label, - * gpointer user_data, - * GtkWidget **widget_ptr, - */ - - ...) -{ - GtkWidget *menu; - GtkWidget *menuitem; - - /* menu item variables */ - const gchar *label; - gpointer user_data; - GtkWidget **widget_ptr; - - va_list args; - gint i; - gint initial_index; - - menu = gtk_menu_new (); - - /* create the menu items */ - initial_index = 0; - - va_start (args, initial); - label = va_arg (args, const gchar *); - - for (i = 0; label; i++) - { - user_data = va_arg (args, gpointer); - widget_ptr = va_arg (args, GtkWidget **); - - if (strcmp (label, "---")) - { - menuitem = gtk_menu_item_new_with_label (label); - - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - menu_item_callback, - data); - - if (user_data) - gtk_object_set_user_data (GTK_OBJECT (menuitem), user_data); - } - else - { - menuitem = gtk_menu_item_new (); - - gtk_widget_set_sensitive (menuitem, FALSE); - } - - gtk_menu_append (GTK_MENU (menu), menuitem); - - if (widget_ptr) - *widget_ptr = menuitem; - - gtk_widget_show (menuitem); - - /* remember the initial menu item */ - if (user_data == initial) - initial_index = i; - - label = va_arg (args, const gchar *); - } - va_end (args); - - if (! menu_only) - { - GtkWidget *optionmenu; - - optionmenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); - - /* select the initial menu item */ - gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), initial_index); - - return optionmenu; - } - - return menu; -} - -/** - * gimp_option_menu_set_history: - * @option_menu: A #GtkOptionMenu as returned by gimp_option_menu_new() or - * gimp_option_menu_new2(). - * @user_data: The @user_data of the menu item you want to select. - **/ -void -gimp_option_menu_set_history (GtkOptionMenu *option_menu, - gpointer user_data) -{ - GtkWidget *menu_item; - GList *list; - gint history = 0; - - g_return_if_fail (option_menu); - g_return_if_fail (GTK_IS_OPTION_MENU (option_menu)); - - for (list = GTK_MENU_SHELL (option_menu->menu)->children; - list; - list = g_list_next (list)) - { - menu_item = GTK_WIDGET (list->data); - - if (GTK_IS_LABEL (GTK_BIN (menu_item)->child) && - gtk_object_get_user_data (GTK_OBJECT (menu_item)) == user_data) - { - break; - } - - history++; - } - - if (list) - gtk_option_menu_set_history (option_menu, history); -} - -/** - * gimp_radio_group_new: - * @in_frame: #TRUE if you want a #GtkFrame around the radio button group. - * @frame_title: The title of the Frame or #NULL if you don't want a title. - * @...: A #NULL terminated @va_list describing the radio buttons. - * - * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). - **/ -GtkWidget * -gimp_radio_group_new (gboolean in_frame, - const gchar *frame_title, - - /* specify radio buttons as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * gpointer user_data, - * GtkWidget **widget_ptr, - * gboolean active, - */ - - ...) -{ - GtkWidget *vbox; - GtkWidget *button; - GSList *group; - - /* radio button variables */ - const gchar *label; - GtkSignalFunc callback; - gpointer data; - gpointer user_data; - GtkWidget **widget_ptr; - gboolean active; - - va_list args; - - vbox = gtk_vbox_new (FALSE, 1); - - group = NULL; - - /* create the radio buttons */ - va_start (args, frame_title); - label = va_arg (args, const gchar *); - while (label) - { - callback = va_arg (args, GtkSignalFunc); - data = va_arg (args, gpointer); - user_data = va_arg (args, gpointer); - widget_ptr = va_arg (args, GtkWidget **); - active = va_arg (args, gboolean); - - if (label != (gpointer) 1) - button = gtk_radio_button_new_with_label (group, label); - else - button = gtk_radio_button_new (group); - - group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - - if (user_data) - gtk_object_set_user_data (GTK_OBJECT (button), user_data); - - if (widget_ptr) - *widget_ptr = button; - - if (active) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); - - gtk_signal_connect (GTK_OBJECT (button), "toggled", - callback, - data); - - gtk_widget_show (button); - - label = va_arg (args, const gchar *); - } - va_end (args); - - if (in_frame) - { - GtkWidget *frame; - - gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); - - frame = gtk_frame_new (frame_title); - gtk_container_add (GTK_CONTAINER (frame), vbox); - gtk_widget_show (vbox); - - return frame; - } - - return vbox; -} - -/** - * gimp_radio_group_new2: - * @in_frame: #TRUE if you want a #GtkFrame around the - * radio button group. - * @frame_title: The title of the Frame or #NULL if you don't want - * a title. - * @radio_button_callback: The callback each button's "toggled" signal will - * be connected with. - * @data: The data which will be passed to - * gtk_signal_connect(). - * @initial: The @user_data of the initially pressed radio button. - * @...: A #NULL terminated @va_list describing - * the radio buttons. - * - * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). - **/ -GtkWidget * -gimp_radio_group_new2 (gboolean in_frame, - const gchar *frame_title, - GtkSignalFunc radio_button_callback, - gpointer data, - gpointer initial, /* user_data */ - - /* specify radio buttons as va_list: - * const gchar *label, - * gpointer user_data, - * GtkWidget **widget_ptr, - */ - - ...) -{ - GtkWidget *vbox; - GtkWidget *button; - GSList *group; - - /* radio button variables */ - const gchar *label; - gpointer user_data; - GtkWidget **widget_ptr; - - va_list args; - - vbox = gtk_vbox_new (FALSE, 1); - - group = NULL; - - /* create the radio buttons */ - va_start (args, initial); - label = va_arg (args, const gchar *); - - while (label) - { - user_data = va_arg (args, gpointer); - widget_ptr = va_arg (args, GtkWidget **); - - if (label != (gpointer) 1) - button = gtk_radio_button_new_with_label (group, label); - else - button = gtk_radio_button_new (group); - - group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - - if (user_data) - gtk_object_set_user_data (GTK_OBJECT (button), user_data); - - if (widget_ptr) - *widget_ptr = button; - - if (initial == user_data) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); - - gtk_signal_connect (GTK_OBJECT (button), "toggled", - radio_button_callback, - data); - - gtk_widget_show (button); - - label = va_arg (args, const gchar *); - } - va_end (args); - - if (in_frame) - { - GtkWidget *frame; - - gtk_container_set_border_width (GTK_CONTAINER (vbox), 2); - - frame = gtk_frame_new (frame_title); - gtk_container_add (GTK_CONTAINER (frame), vbox); - gtk_widget_show (vbox); - - return frame; - } - - return vbox; -} - -/** - * gimp_spin_button_new: - * @adjustment: Returns the spinbutton's #GtkAdjustment. - * @value: The initial value of the spinbutton. - * @lower: The lower boundary. - * @upper: The uppper boundary. - * @step_increment: The spinbutton's step increment. - * @page_increment: The spinbutton's page increment (mouse button 2). - * @page_size: The spinbutton's page size. - * @climb_rate: The spinbutton's climb rate. - * @digits: The spinbutton's number of decimal digits. - * - * This function is a shortcut for gtk_adjustment_new() and a subsequent - * gtk_spin_button_new() and does some more initialisation stuff like - * setting a standard minimun horizontal size. - * - * Returns: A #GtkSpinbutton and it's #GtkAdjustment. - **/ -GtkWidget * -gimp_spin_button_new (GtkObject **adjustment, /* return value */ - gfloat value, - gfloat lower, - gfloat upper, - gfloat step_increment, - gfloat page_increment, - gfloat page_size, - gfloat climb_rate, - guint digits) -{ - GtkWidget *spinbutton; - - *adjustment = gtk_adjustment_new (value, lower, upper, - step_increment, page_increment, page_size); - - spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (*adjustment), - climb_rate, digits); - gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton), - GTK_SHADOW_NONE); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE); - gtk_widget_set_usize (spinbutton, 75, -1); - - return spinbutton; -} - -static void -gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment, - GtkAdjustment *other_adj) -{ - gtk_signal_handler_block_by_data (GTK_OBJECT (other_adj), adjustment); - - gtk_adjustment_set_value (other_adj, adjustment->value); - - gtk_signal_handler_unblock_by_data (GTK_OBJECT (other_adj), adjustment); -} - -/** - * gimp_scale_entry_new: - * @table: The #GtkTable the widgets will be attached to. - * @column: The column to start with. - * @row: The row to attach the widgets. - * @text: The text for the #GtkLabel which will appear - * left of the #GtkHScale. - * @scale_usize: The minimum horizontal size of the #GtkHScale. - * @spinbutton_usize: The minimum horizontal size of the #GtkSpinButton. - * @value: The initial value. - * @lower: The lower boundary. - * @upper: The upper boundary. - * @step_increment: The step increment. - * @page_increment: The page increment. - * @digits: The number of decimal digits. - * @constrain: #TRUE if the range of possible values of the - * #GtkSpinButton should be the same as of the #GtkHScale. - * @unconstrained_lower: The spinbutton's lower boundary - * if @constrain == #FALSE. - * @unconstrained_upper: The spinbutton's upper boundary - * if @constrain == #FALSE. - * @tooltip: A tooltip message for the scale and the spinbutton. - * @help_data: The widgets' help_data (see gimp_help_set_help_data()). - * - * This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and - * attaches them to a 3-column #GtkTable. - * - * Note that if you pass a @tooltip or @help_data to this function you'll - * have to initialize GIMP's help system with gimp_help_init() before using it. - * - * Returns: The #GtkSpinButton's #GtkAdjustment. - **/ -GtkObject * -gimp_scale_entry_new (GtkTable *table, - gint column, - gint row, - const gchar *text, - gint scale_usize, - gint spinbutton_usize, - gfloat value, - gfloat lower, - gfloat upper, - gfloat step_increment, - gfloat page_increment, - guint digits, - gboolean constrain, - gfloat unconstrained_lower, - gfloat unconstrained_upper, - const gchar *tooltip, - const gchar *help_data) -{ - GtkWidget *label; - GtkWidget *scale; - GtkWidget *spinbutton; - GtkObject *adjustment; - GtkObject *return_adj; - - label = gtk_label_new (text); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, - column, column + 1, row, row + 1, - GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - - if (! constrain && - unconstrained_lower <= lower && - unconstrained_upper >= upper) - { - GtkObject *constrained_adj; - - constrained_adj = gtk_adjustment_new (value, lower, upper, - step_increment, page_increment, - 0.0); - - spinbutton = gimp_spin_button_new (&adjustment, value, - unconstrained_lower, - unconstrained_upper, - step_increment, page_increment, 0.0, - 1.0, digits); - - gtk_signal_connect - (GTK_OBJECT (constrained_adj), "value_changed", - GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback), - adjustment); - - gtk_signal_connect - (GTK_OBJECT (adjustment), "value_changed", - GTK_SIGNAL_FUNC (gimp_scale_entry_unconstrained_adjustment_callback), - constrained_adj); - - return_adj = adjustment; - - adjustment = constrained_adj; - } - else - { - spinbutton = gimp_spin_button_new (&adjustment, value, lower, upper, - step_increment, page_increment, 0.0, - 1.0, digits); - - return_adj = adjustment; - } - - if (spinbutton_usize > 0) - gtk_widget_set_usize (spinbutton, spinbutton_usize, -1); - - scale = gtk_hscale_new (GTK_ADJUSTMENT (adjustment)); - if (scale_usize > 0) - gtk_widget_set_usize (scale, scale_usize, -1); - gtk_scale_set_digits (GTK_SCALE (scale), digits); - gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); - gtk_table_attach (GTK_TABLE (table), scale, - column + 1, column + 2, row, row + 1, - GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); - gtk_widget_show (scale); - - gtk_table_attach (GTK_TABLE (table), spinbutton, - column + 2, column + 3, row, row + 1, - GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_widget_show (spinbutton); - - if (tooltip || help_data) - { - gimp_help_set_help_data (scale, tooltip, help_data); - gimp_help_set_help_data (spinbutton, tooltip, help_data); - } - - gtk_object_set_data (GTK_OBJECT (return_adj), "label", label); - gtk_object_set_data (GTK_OBJECT (return_adj), "scale", scale); - gtk_object_set_data (GTK_OBJECT (return_adj), "spinbutton", spinbutton); - - return return_adj; -} - -static void -gimp_random_seed_toggle_update (GtkWidget *widget, - gpointer data) -{ - gint *toggle_val; - - toggle_val = (gint *) data; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) - *toggle_val = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), - "time_true")); - else - *toggle_val = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), - "time_false")); - - gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); -} - -/** - * gimp_random_seed_new: - * @seed: A pointer to the variable which stores the random seed. - * @use_time: A pointer to the variable which stores the @use_time - * toggle boolean. - * @time_true: The value to write to @use_time if the toggle button is checked. - * @time_false: The value to write to @use_time if the toggle button is - * unchecked. - * - * Note that this widget automatically sets tooltips with - * gimp_help_set_help_data(), so you'll have to initialize GIMP's help - * system with gimp_help_init() before using it. - * - * Returns: A #GtkHBox containing a #GtkSpinButton for the random seed and - * a #GtkToggleButton for toggling the @use_time behaviour. - **/ -GtkWidget * -gimp_random_seed_new (gint *seed, - gint *use_time, - gint time_true, - gint time_false) -{ - GtkWidget *hbox; - GtkWidget *spinbutton; - GtkObject *adj; - GtkWidget *button; - - hbox = gtk_hbox_new (FALSE, 4); - - spinbutton = gimp_spin_button_new (&adj, *seed, - 0, G_MAXRAND, 1, 10, 0, 1, 0); - gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0); - gtk_signal_connect (GTK_OBJECT (adj), "value_changed", - GTK_SIGNAL_FUNC (gimp_int_adjustment_update), - seed); - gtk_widget_show (spinbutton); - - gimp_help_set_help_data (spinbutton, - _("If the \"Time\" button is not pressed, " - "use this value for random number generator " - "seed - this allows you to repeat a " - "given \"random\" operation"), NULL); - - button = gtk_toggle_button_new_with_label (_("Time")); - gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0); - gtk_signal_connect (GTK_OBJECT (button), "toggled", - GTK_SIGNAL_FUNC (gimp_random_seed_toggle_update), - use_time); - gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); - gtk_widget_show (button); - - gimp_help_set_help_data (button, - _("Seed random number generator from the current " - "time - this guarantees a reasonable " - "randomization"), NULL); - - gtk_object_set_data (GTK_OBJECT (button), "time_true", - GINT_TO_POINTER (time_true)); - gtk_object_set_data (GTK_OBJECT (button), "time_false", - GINT_TO_POINTER (time_false)); - - gtk_object_set_data (GTK_OBJECT (button), "inverse_sensitive", - spinbutton); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), - *use_time == time_true); - - gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton); - gtk_object_set_data (GTK_OBJECT (hbox), "togglebutton", button); - - return hbox; -} - -typedef struct -{ - GimpChainButton *chainbutton; - gboolean chain_constrains_ratio; - gdouble orig_x; - gdouble orig_y; - gdouble last_x; - gdouble last_y; -} GimpCoordinatesData; - -static void -gimp_coordinates_callback (GtkWidget *widget, - gpointer data) -{ - GimpCoordinatesData *gcd; - gdouble new_x; - gdouble new_y; - - gcd = (GimpCoordinatesData *) data; - - new_x = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0); - new_y = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1); - - if (gimp_chain_button_get_active (gcd->chainbutton)) - { - gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "value_changed"); - - if (gcd->chain_constrains_ratio) - { - if ((gcd->orig_x != 0) && (gcd->orig_y != 0)) - { - if (new_x != gcd->last_x) - { - gcd->last_x = new_x; - gcd->last_y = new_y = (new_x * gcd->orig_y) / gcd->orig_x; - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, - new_y); - } - else if (new_y != gcd->last_y) - { - gcd->last_y = new_y; - gcd->last_x = new_x = (new_y * gcd->orig_x) / gcd->orig_y; - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, - new_x); - } - } - } - else - { - if (new_x != gcd->last_x) - { - gcd->last_y = new_y = gcd->last_x = new_x; - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, new_x); - } - else if (new_y != gcd->last_y) - { - gcd->last_x = new_x = gcd->last_y = new_y; - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, new_y); - } - } - } - else - { - if (new_x != gcd->last_x) - gcd->last_x = new_x; - if (new_y != gcd->last_y) - gcd->last_y = new_y; - } -} - -/** - * gimp_coordinates_new: - * @unit: The initial unit of the #GimpUnitMenu. - * @unit_format: The unit format string as passed to - * gimp_size_entry_new(). - * @menu_show_pixels: #TRUE if the #GimpUnitMenu should contain an item for - * GIMP_UNIT_PIXEL. - * @menu_show_percent: #TRUE if the #GimpUnitMenu should contain an item for - * GIMP_UNIT_PERCENT. - * @spinbutton_usize: The horizontal usize of the #GimpSizeEntry's - * #GtkSpinButton's. - * @update_policy: The update policy for the #GimpSizeEntry. - * @chainbutton_active: #TRUE if the attached #GimpChainButton should be - * active. - * @chain_constrains_ratio: #TRUE if the chainbutton should constrain the - * fields' aspect ratio. If #FALSE, the values will - * be constrained. - * @xlabel: The label for the X coordinate. - * @x: The initial value of the X coordinate. - * @xres: The horizontal resolution in DPI. - * @lower_boundary_x: The lower boundary of the X coordinate. - * @upper_boundary_x: The upper boundary of the X coordinate. - * @xsize_0: The X value which will be treated as 0%. - * @xsize_100: The X value which will be treated as 100%. - * @ylabel: The label for the Y coordinate. - * @y: The initial value of the Y coordinate. - * @yres: The vertical resolution in DPI. - * @lower_boundary_y: The lower boundary of the Y coordinate. - * @upper_boundary_y: The upper boundary of the Y coordinate. - * @ysize_0: The Y value which will be treated as 0%. - * @ysize_100: The Y value which will be treated as 100%. - * - * Returns: A #GimpSizeEntry with two fields for x/y coordinates/sizes with - * a #GimpChainButton attached to constrain either the two fields' - * values or the ratio between them. - **/ -GtkWidget * -gimp_coordinates_new (GimpUnit unit, - const gchar *unit_format, - gboolean menu_show_pixels, - gboolean menu_show_percent, - gint spinbutton_usize, - GimpSizeEntryUpdatePolicy update_policy, - - gboolean chainbutton_active, - gboolean chain_constrains_ratio, - - const gchar *xlabel, - gdouble x, - gdouble xres, - gdouble lower_boundary_x, - gdouble upper_boundary_x, - gdouble xsize_0, /* % */ - gdouble xsize_100, /* % */ - - const gchar *ylabel, - gdouble y, - gdouble yres, - gdouble lower_boundary_y, - gdouble upper_boundary_y, - gdouble ysize_0, /* % */ - gdouble ysize_100 /* % */) -{ - GimpCoordinatesData *gcd; - GtkObject *adjustment; - GtkWidget *spinbutton; - GtkWidget *sizeentry; - GtkWidget *chainbutton; - - spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2); - sizeentry = gimp_size_entry_new (1, unit, unit_format, - menu_show_pixels, - menu_show_percent, - FALSE, - spinbutton_usize, - update_policy); - gtk_table_set_col_spacing (GTK_TABLE (sizeentry), 0, 4); - gtk_table_set_col_spacing (GTK_TABLE (sizeentry), 2, 4); - gimp_size_entry_add_field (GIMP_SIZE_ENTRY (sizeentry), - GTK_SPIN_BUTTON (spinbutton), NULL); - gtk_table_attach_defaults (GTK_TABLE (sizeentry), spinbutton, 1, 2, 0, 1); - gtk_widget_show (spinbutton); - - gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (sizeentry), - (update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) || (menu_show_pixels == FALSE) ? - GIMP_UNIT_INCH : GIMP_UNIT_PIXEL); - - gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 0, xres, TRUE); - gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 1, yres, TRUE); - gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (sizeentry), 0, - lower_boundary_x, upper_boundary_x); - gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (sizeentry), 1, - lower_boundary_y, upper_boundary_y); - - if (menu_show_percent) - { - gimp_size_entry_set_size (GIMP_SIZE_ENTRY (sizeentry), 0, - xsize_0, xsize_100); - gimp_size_entry_set_size (GIMP_SIZE_ENTRY (sizeentry), 1, - ysize_0, ysize_100); - } - - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 0, x); - gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 1, y); - - gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), xlabel, 0, 0, 1.0); - gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), ylabel, 1, 0, 1.0); - - chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT); - if (chainbutton_active) - gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainbutton), TRUE); - gtk_table_attach (GTK_TABLE (sizeentry), chainbutton, 2, 3, 0, 2, - GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (chainbutton); - - gcd = g_new (GimpCoordinatesData, 1); - gcd->chainbutton = GIMP_CHAIN_BUTTON (chainbutton); - gcd->chain_constrains_ratio = chain_constrains_ratio; - gcd->orig_x = x; - gcd->orig_y = y; - gcd->last_x = x; - gcd->last_y = y; - - gtk_signal_connect_object (GTK_OBJECT (sizeentry), "destroy", - GTK_SIGNAL_FUNC (g_free), - (GtkObject *) gcd); - - gtk_signal_connect (GTK_OBJECT (sizeentry), "value_changed", - GTK_SIGNAL_FUNC (gimp_coordinates_callback), - gcd); - - gtk_object_set_data (GTK_OBJECT (sizeentry), "chainbutton", chainbutton); - - return sizeentry; -} - -typedef struct -{ - GtkAdjustment *adjustment; - GtkAdjustment *divided_adj; - guint mem_size_unit; -} GimpMemSizeEntryData; - -static void -gimp_mem_size_entry_callback (GtkAdjustment *adj, - gpointer data) -{ - GimpMemSizeEntryData *gmsed; - guint new_value; - - gmsed = (GimpMemSizeEntryData *)data; - new_value = adj->value * gmsed->mem_size_unit; - - gtk_adjustment_set_value (gmsed->adjustment, new_value); -} - -static void -gimp_mem_size_unit_callback (GtkWidget *widget, - gpointer data) -{ - GimpMemSizeEntryData *gmsed; - guint divided_mem_size; - guint new_unit; - - gmsed = (GimpMemSizeEntryData *)data; - - new_unit = (guint) gtk_object_get_user_data (GTK_OBJECT (widget)); - - if (new_unit && new_unit != gmsed->mem_size_unit) - { - divided_mem_size = gmsed->adjustment->value / new_unit; - gmsed->mem_size_unit = new_unit; - - gtk_adjustment_set_value (GTK_ADJUSTMENT (gmsed->divided_adj), divided_mem_size); - } -} - -/** - * gimp_mem_size_entry_new: - * @adjustment: The adjustment containing the memsize and it's limits. - * - * Returns: A #GtkHBox with a #GtkSpinButton and a #GtkOptionMenu. - **/ -GtkWidget * -gimp_mem_size_entry_new (GtkAdjustment *adjustment) -{ - GtkWidget *hbox; - GtkObject *divided_adj; - GtkWidget *spinbutton; - GtkWidget *optionmenu; - - GimpMemSizeEntryData *gmsed; - guint mem_size_unit = 1; - guint divided_mem_size; - gint i; - - gmsed = g_new (GimpMemSizeEntryData, 1); - - for (i = 0; i < 3; i++) - { - if ( (gint) adjustment->value % (mem_size_unit * 1024) != 0 ) - break; - mem_size_unit *= 1024; - } - divided_mem_size = adjustment->value / mem_size_unit; - - hbox = gtk_hbox_new (FALSE, 2); - spinbutton = - gimp_spin_button_new (÷d_adj, divided_mem_size, - 0.0, (4096.0 * 1024 * 1024 - 1), 1.0, 16.0, 0.0, - 1.0, 0.0); - gtk_signal_connect (GTK_OBJECT (divided_adj), "value_changed", - GTK_SIGNAL_FUNC (gimp_mem_size_entry_callback), - gmsed); - gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0); - gtk_widget_show (spinbutton); - - optionmenu = - gimp_option_menu_new2 (FALSE, gimp_mem_size_unit_callback, - gmsed, (gpointer) mem_size_unit, - - _("Bytes"), (gpointer) 1, NULL, - _("KiloBytes"), (gpointer) 1024, NULL, - _("MegaBytes"), (gpointer) (1024 * 1024), NULL, - - NULL); - gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0); - gtk_widget_show (optionmenu); - - gtk_signal_connect_object (GTK_OBJECT (hbox), "destroy", - GTK_SIGNAL_FUNC (gtk_object_unref), - GTK_OBJECT (adjustment)); - gtk_signal_connect_object (GTK_OBJECT (hbox), "destroy", - GTK_SIGNAL_FUNC (g_free), - (GtkObject *) gmsed); - - gmsed->adjustment = adjustment; - gmsed->divided_adj = GTK_ADJUSTMENT (divided_adj); - gmsed->mem_size_unit = mem_size_unit; - - gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton); - gtk_object_set_data (GTK_OBJECT (hbox), "optionmenu", optionmenu); - - return hbox; -} - -/** - * gimp_pixmap_button_new: - * @xpm_data: The XPM data which will be passed to gimp_pixmap_new(). - * @text: An optional text which will appear right of the pixmap. - * - * Returns: A #GtkButton with a #GimpPixmap and an optional #GtkLabel. - **/ -GtkWidget * -gimp_pixmap_button_new (gchar **xpm_data, - const gchar *text) -{ - GtkWidget *button; - GtkWidget *pixmap; - - button = gtk_button_new (); - pixmap = gimp_pixmap_new (xpm_data); - - if (text) - { - GtkWidget *abox; - GtkWidget *hbox; - GtkWidget *label; - - abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); - gtk_container_add (GTK_CONTAINER (button), abox); - gtk_widget_show (abox); - - hbox = gtk_hbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (abox), hbox); - gtk_widget_show (hbox); - - gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 4); - gtk_widget_show (pixmap); - - label = gtk_label_new (text); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4); - gtk_widget_show (label); - } - else - { - gtk_container_add (GTK_CONTAINER (button), pixmap); - gtk_widget_show (pixmap); - } - - - return button; -} - -/* - * Standard Callbacks - */ - -/** - * gimp_toggle_button_sensitive_update: - * @toggle_button: The #GtkToggleButton the "set_sensitive" and - * "inverse_sensitive" lists are attached to. - * - * If you attached a pointer to a #GtkWidget with gtk_object_set_data() and - * the "set_sensitive" key to the #GtkToggleButton, the sensitive state of - * the attached widget will be set according to the toggle button's - * "active" state. - * - * You can attach an arbitrary list of widgets by attaching another - * "set_sensitive" data pointer to the first widget (and so on...). - * - * This function can also set the sensitive state according to the toggle - * button's inverse "active" state by attaching widgets with the - * "inverse_sensitive" key. - **/ -void -gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button) -{ - GtkWidget *set_sensitive; - gboolean active; - - active = gtk_toggle_button_get_active (toggle_button); - - set_sensitive = - gtk_object_get_data (GTK_OBJECT (toggle_button), "set_sensitive"); - while (set_sensitive) - { - gtk_widget_set_sensitive (set_sensitive, active); - set_sensitive = - gtk_object_get_data (GTK_OBJECT (set_sensitive), "set_sensitive"); - } - - set_sensitive = - gtk_object_get_data (GTK_OBJECT (toggle_button), "inverse_sensitive"); - while (set_sensitive) - { - gtk_widget_set_sensitive (set_sensitive, ! active); - set_sensitive = - gtk_object_get_data (GTK_OBJECT (set_sensitive), "inverse_sensitive"); - } -} - -/** - * gimp_toggle_button_update: - * @widget: A #GtkToggleButton. - * @data: A pointer to a #gint variable which will store the value of - * gtk_toggle_button_get_active(). - * - * Note that this function calls gimp_toggle_button_sensitive_update(). - **/ -void -gimp_toggle_button_update (GtkWidget *widget, - gpointer data) -{ - gint *toggle_val; - - toggle_val = (gint *) data; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) - *toggle_val = TRUE; - else - *toggle_val = FALSE; - - gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); -} - -/** - * gimp_radio_button_update: - * @widget: A #GtkRadioButton. - * @data: A pointer to a #gint variable which will store the value of - * GPOINTER_TO_INT (gtk_object_get_user_data()). - * - * Note that this function calls gimp_toggle_button_sensitive_update(). - **/ -void -gimp_radio_button_update (GtkWidget *widget, - gpointer data) -{ - gint *toggle_val; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) - { - toggle_val = (gint *) data; - - *toggle_val = - GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (widget))); - } - - gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); -} - -/** - * gimp_menu_item_update: - * @widget: A #GtkMenuItem. - * @data: A pointer to a #gint variable which will store the value of - * GPOINTER_TO_INT (gtk_object_get_user_data()). - **/ -void -gimp_menu_item_update (GtkWidget *widget, - gpointer data) -{ - gint *item_val; - - item_val = (gint *) data; - - *item_val = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (widget))); -} - -/** - * gimp_int_adjustment_update: - * @adjustment: A #GtkAdjustment. - * @data: A pointer to a #gint variable which will store the - * @adjustment's value. - * - * Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded - * with RINT(). - **/ -void -gimp_int_adjustment_update (GtkAdjustment *adjustment, - gpointer data) -{ - gint *val; - - val = (gint *) data; - *val = RINT (adjustment->value); -} - -/** - * gimp_uint_adjustment_update: - * @adjustment: A #GtkAdjustment. - * @data: A pointer to a #guint variable which will store the - * @adjustment's value. - * - * Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded - * with (#guint) (value + 0.5). - **/ -void -gimp_uint_adjustment_update (GtkAdjustment *adjustment, - gpointer data) -{ - guint *val; - - val = (guint *) data; - *val = (guint) (adjustment->value + 0.5); -} - -/** - * gimp_float_adjustment_update: - * @adjustment: A #GtkAdjustment. - * @data: A pointer to a #gfloat varaiable which willl store the - * @adjustment's value. - **/ -void -gimp_float_adjustment_update (GtkAdjustment *adjustment, - gpointer data) -{ - gfloat *val; - - val = (gfloat *) data; - *val = adjustment->value; -} - -/** - * gimp_double_adjustment_update: - * @adjustment: A #GtkAdjustment. - * @data: A pointer to a #gdouble variable which will store the - * @adjustment's value. - **/ -void -gimp_double_adjustment_update (GtkAdjustment *adjustment, - gpointer data) -{ - gdouble *val; - - val = (gdouble *) data; - *val = adjustment->value; -} - -/** - * gimp_unit_menu_update: - * @widget: A #GimpUnitMenu. - * @data: A pointer to a #GimpUnit variable which will store the unit menu's - * value. - * - * This callback can set the number of decimal digits of an arbitrary number - * of #GtkSpinButton's. To use this functionality, attach the spinbuttons - * as list of data pointers attached with gtk_object_set_data() with the - * "set_digits" key. - * - * See gimp_toggle_button_sensitive_update() for a description of how - * to set up the list. - **/ -void -gimp_unit_menu_update (GtkWidget *widget, - gpointer data) -{ - GimpUnit *val; - GtkWidget *spinbutton; - gint digits; - - val = (GimpUnit *) data; - *val = gimp_unit_menu_get_unit (GIMP_UNIT_MENU (widget)); - - digits = ((*val == GIMP_UNIT_PIXEL) ? 0 : - ((*val == GIMP_UNIT_PERCENT) ? 2 : - (MIN (6, MAX (3, gimp_unit_get_digits (*val)))))); - - spinbutton = - gtk_object_get_data (GTK_OBJECT (widget), "set_digits"); - while (spinbutton) - { - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (spinbutton), digits); - spinbutton = gtk_object_get_data (GTK_OBJECT (spinbutton), "set_digits"); - } -} - - -/* - * Helper Functions - */ - -/** - * gimp_table_attach_aligned: - * @table: The #GtkTable the widgets will be attached to. - * @column: The column to start with. - * @row: The row to attach the eidgets. - * @label_text: The text for the #GtkLabel which will be attached left of the - * widget. - * @xalign: The horizontal alignment of the #GtkLabel. - * @yalign: The vertival alignment of the #GtkLabel. - * @widget: The #GtkWidget to attach right of the label. - * @colspan: The number of columns the widget will use. - * @left_align: #TRUE if the widget should be left-aligned. - * - * Note that the @label_text can be #NULL and that the widget will be attached - * starting at (@column + 1) in this case, too. - **/ -void -gimp_table_attach_aligned (GtkTable *table, - gint column, - gint row, - const gchar *label_text, - gfloat xalign, - gfloat yalign, - GtkWidget *widget, - gint colspan, - gboolean left_align) -{ - if (label_text) - { - GtkWidget *label; - - label = gtk_label_new (label_text); - gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); - gtk_table_attach (table, label, - column, column + 1, - row, row + 1, - GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - } - - if (left_align) - { - GtkWidget *alignment; - - alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); - gtk_container_add (GTK_CONTAINER (alignment), widget); - gtk_widget_show (widget); - - widget = alignment; - } - - gtk_table_attach (table, widget, - column + 1, column + 1 + colspan, - row, row + 1, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - - gtk_widget_show (widget); -} diff --git a/libgimp/gimpwidgets.h b/libgimp/gimpwidgets.h deleted file mode 100644 index 62513e4055..0000000000 --- a/libgimp/gimpwidgets.h +++ /dev/null @@ -1,250 +0,0 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpwidgets.h - * Copyright (C) 2000 Michael Natterer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_WIDGETS_H__ -#define __GIMP_WIDGETS_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* For information look into the C source or the html documentation */ - -/* - * Widget Constructors - */ - -GtkWidget * gimp_option_menu_new (gboolean menu_only, - - /* specify menu items as va_list: - * gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * gpointer user_data, - * GtkWidget **widget_ptr, - * gboolean active - */ - - ...); - -GtkWidget * gimp_option_menu_new2 (gboolean menu_only, - GtkSignalFunc menu_item_callback, - gpointer data, - gpointer initial, /* user_data */ - - /* specify menu items as va_list: - * gchar *label, - * gpointer user_data, - * GtkWidget **widget_ptr, - */ - - ...); - -void gimp_option_menu_set_history (GtkOptionMenu *option_menu, - gpointer user_data); - -GtkWidget * gimp_radio_group_new (gboolean in_frame, - const gchar *frame_title, - - /* specify radio buttons as va_list: - * const gchar *label, - * GtkSignalFunc callback, - * gpointer data, - * gpointer user_data, - * GtkWidget **widget_ptr, - * gboolean active, - */ - - ...); - -GtkWidget * gimp_radio_group_new2 (gboolean in_frame, - const gchar *frame_title, - GtkSignalFunc radio_button_callback, - gpointer data, - gpointer initial, /* user_data */ - - /* specify radio buttons as va_list: - * const gchar *label, - * gpointer user_data, - * GtkWidget **widget_ptr, - */ - - ...); - -GtkWidget * gimp_spin_button_new (/* return value: */ - GtkObject **adjustment, - - gfloat value, - gfloat lower, - gfloat upper, - gfloat step_increment, - gfloat page_increment, - gfloat page_size, - gfloat climb_rate, - guint digits); - -#define GIMP_SCALE_ENTRY_LABEL(adj) \ - GTK_LABEL (gtk_object_get_data (GTK_OBJECT(adj), "label")) - -#define GIMP_SCALE_ENTRY_SCALE(adj) \ - GTK_HSCALE (gtk_object_get_data (GTK_OBJECT(adj), "scale")) -#define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \ - gtk_range_get_adjustment \ - (GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale"))) - -#define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")) -#define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \ - gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))) - -GtkObject * gimp_scale_entry_new (GtkTable *table, - gint column, - gint row, - const gchar *text, - gint scale_usize, - gint spinbutton_usize, - gfloat value, - gfloat lower, - gfloat upper, - gfloat step_increment, - gfloat page_increment, - guint digits, - gboolean constrain, - gfloat unconstrained_lower, - gfloat unconstrained_upper, - const gchar *tooltip, - const gchar *help_data); - -#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton")) -#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \ - gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton"))) - -#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \ - GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \ - "togglebutton")) - -GtkWidget * gimp_random_seed_new (gint *seed, - gint *use_time, - gint time_true, - gint time_false); - -#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \ - GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \ - "chainbutton")) - -GtkWidget * gimp_coordinates_new (GimpUnit unit, - const gchar *unit_format, - gboolean menu_show_pixels, - gboolean menu_show_percent, - gint spinbutton_usize, - GimpSizeEntryUpdatePolicy update_policy, - - gboolean chainbutton_active, - gboolean chain_constrains_ratio, - - const gchar *xlabel, - gdouble x, - gdouble xres, - gdouble lower_boundary_x, - gdouble upper_boundary_x, - gdouble xsize_0, /* % */ - gdouble xsize_100, /* % */ - - const gchar *ylabel, - gdouble y, - gdouble yres, - gdouble lower_boundary_y, - gdouble upper_boundary_y, - gdouble ysize_0, /* % */ - gdouble ysize_100 /* % */); - -#define GIMP_MEM_SIZE_ENTRY_SPINBUTTON(memsize) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (memsize), \ - "spinbutton")) -#define GIMP_MEM_SIZE_ENTRY_SPINBUTTON_ADJ(memsize) \ - gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (memsize), \ - "spinbutton"))) -#define GIMP_MEM_SIZE_ENTRY_OPTIONMENU(memsize) \ - GTK_OPTION_MENU (gtk_object_get_data (GTK_OBJECT (memsize), \ - "optionmenu")) - -GtkWidget * gimp_mem_size_entry_new (GtkAdjustment *adjustment); - - -GtkWidget * gimp_pixmap_button_new (gchar **xpm_data, - const gchar *text); - -/* - * Standard Callbacks - */ - -void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button); - -void gimp_toggle_button_update (GtkWidget *widget, - gpointer data); - -void gimp_radio_button_update (GtkWidget *widget, - gpointer data); - -void gimp_menu_item_update (GtkWidget *widget, - gpointer data); - -void gimp_int_adjustment_update (GtkAdjustment *adjustment, - gpointer data); - -void gimp_uint_adjustment_update (GtkAdjustment *adjustment, - gpointer data); - -void gimp_float_adjustment_update (GtkAdjustment *adjustment, - gpointer data); - -void gimp_double_adjustment_update (GtkAdjustment *adjustment, - gpointer data); - -void gimp_unit_menu_update (GtkWidget *widget, - gpointer data); - - -/* - * Helper Functions - */ - -void gimp_table_attach_aligned (GtkTable *table, - gint column, - gint row, - const gchar *label_text, - gfloat xalign, - gfloat yalign, - GtkWidget *widget, - gint colspan, - gboolean left_align); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __GIMP_WIDGETS_H__ */ diff --git a/libgimp/makefile.mingw.in b/libgimp/makefile.mingw.in index e6b2b70610..297e7c66dc 100644 --- a/libgimp/makefile.mingw.in +++ b/libgimp/makefile.mingw.in @@ -64,23 +64,10 @@ PDB_WRAPPERS_O = \ gimpi_OBJECTS = \ gimpenv.o \ - gimpchainbutton.o \ - gimpcolorbutton.o \ - gimpdialog.o \ - gimpfileselection.o \ - gimphelpui.o \ - gimpmatrix.o \ gimpparasite.o \ gimpparasiteio.o \ - gimppatheditor.o \ - gimppixmap.o \ gimpprotocol.o \ - gimpquerybox.o \ - gimpsizeentry.o \ - gimpunitmenu.o \ gimputils.o \ - gimpvector.o \ - gimpwidgets.o \ gimpwire.o libgimpi.a : $(gimpi_OBJECTS) @@ -96,7 +83,6 @@ gimp_OBJECTS = \ gimphelp.o \ gimpimage.o \ gimplayer.o \ - gimpmatrix.o \ gimpparasite.o \ gimpparasiteio.o \ gimppixelrgn.o \ @@ -105,7 +91,6 @@ gimp_OBJECTS = \ gimpselection.o \ gimptile.o \ gimpunit.o \ - gimpvector.o \ gimpwire.o gimp-$(GIMP_VER).dll : $(gimp_OBJECTS) gimp.def @@ -122,19 +107,10 @@ gimpui_OBJECTS = \ gimpbrushmenu.o \ gimpchainbutton.o \ gimpcolorbutton.o \ - gimpdialog.o \ gimpexport.o \ - gimpfileselection.o \ - gimphelpui.o \ gimpgradientmenu.o \ - gimppatheditor.o \ gimppatternmenu.o \ - gimppixmap.o \ - gimpquerybox.o \ - gimpsizeentry.o \ - gimpui.o \ - gimpunitmenu.o \ - gimpwidgets.o + gimpui.o gimpui-$(GIMP_VER).dll : $(gimpui_OBJECTS) gimpui.def $(GLIB)/build-dll gimpui $(GIMP_VER) gimpui.def -s $(gimpui_OBJECTS) -L . -lgimp-$(GIMP_VER) $(GTK_LIBS) $(INTL_LIBS) $(GLIB_LIBS) diff --git a/libgimp/makefile.msc b/libgimp/makefile.msc index e183de78dc..5dc4b973ca 100644 --- a/libgimp/makefile.msc +++ b/libgimp/makefile.msc @@ -90,24 +90,10 @@ PDB_WRAPPERS_O = \ gimpi_OBJECTS = \ gimpenv.obj \ - gimpchainbutton.obj \ - gimpcolorbutton.obj \ - gimpcolorspace.obj \ - gimpdialog.obj \ - gimpfileselection.obj \ - gimphelpui.obj \ - gimpmatrix.obj \ gimpparasite.obj \ gimpparasiteio.obj \ - gimppatheditor.obj \ - gimppixmap.obj \ gimpprotocol.obj \ - gimpquerybox.obj \ - gimpsizeentry.obj \ - gimpunitmenu.obj \ gimputils.c \ - gimpvector.obj \ - gimpwidgets.obj \ gimpwire.obj gimpi.lib : $(gimpi_OBJECTS) @@ -124,7 +110,6 @@ gimp_OBJECTS = \ gimphelp.obj \ gimpimage.obj \ gimplayer.obj \ - gimpmatrix.obj \ gimpparasite.obj \ gimpparasiteio.obj \ gimppixelrgn.obj \ @@ -133,7 +118,6 @@ gimp_OBJECTS = \ gimpselection.obj \ gimptile.obj \ gimpunit.obj \ - gimpvector.obj \ gimpwire.obj gimp-$(GIMP_VER).dll : $(gimp_OBJECTS) gimp.def @@ -147,21 +131,11 @@ gimp.obj : gimp.c gimpui_OBJECTS = \ gimpmenu.obj \ gimpbrushmenu.obj \ - gimpchainbutton.obj \ - gimpcolorbutton.obj \ - gimpdialog.obj \ gimpexport.obj \ - gimpfileselection.obj \ - gimphelpui.obj \ gimpgradientmenu.obj \ gimppatheditor.obj \ gimppatternmenu.obj \ - gimppixmap.obj \ - gimpquerybox.obj \ - gimpsizeentry.obj \ - gimpui.obj \ - gimpunitmenu.obj \ - gimpwidgets.obj + gimpui.obj gimpui-$(GIMP_VER).dll : $(gimpui_OBJECTS) gimpui.def $(CC) $(CFLAGS) -LD -Fegimpui-$(GIMP_VER).dll $(gimpui_OBJECTS) gimp-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gimpui.def diff --git a/libgimpwidgets/gimpcolorarea.c b/libgimpwidgets/gimpcolorarea.c index f3fdae340d..3688b6d40d 100644 --- a/libgimpwidgets/gimpcolorarea.c +++ b/libgimpwidgets/gimpcolorarea.c @@ -24,12 +24,12 @@ #include -#include "gimp.h" +#include "libgimpcolor/gimpcolor.h" +#include "libgimp/gimplimits.h" -#include "gimpuitypes.h" +#include "gimpwidgetstypes.h" #include "gimpcolorarea.h" -#include "gimplimits.h" #define DRAG_PREVIEW_SIZE 32 @@ -520,4 +520,3 @@ gimp_color_area_drag_data_get (GtkWidget *widget, gdk_atom_intern ("application/x-color", FALSE), 16, (guchar *)vals, 8); } - diff --git a/libgimpwidgets/gimpcolorbutton.c b/libgimpwidgets/gimpcolorbutton.c index 9becbcfa88..191557d12f 100644 --- a/libgimpwidgets/gimpcolorbutton.c +++ b/libgimpwidgets/gimpcolorbutton.c @@ -24,15 +24,16 @@ #include -#include "gimp.h" +#include "libgimpcolor/gimpcolor.h" -#include "gimpuitypes.h" +#include "gimpwidgetstypes.h" #include "gimpcolorarea.h" #include "gimpcolorbutton.h" -#include "gimplimits.h" -#include "libgimp-intl.h" +#include "libgimp/gimppalette.h" + +#include "libgimp/libgimp-intl.h" static void gimp_color_button_class_init (GimpColorButtonClass *klass); diff --git a/libgimpwidgets/gimpcolorbutton.h b/libgimpwidgets/gimpcolorbutton.h index 3a74fcf0db..c8f9d02858 100644 --- a/libgimpwidgets/gimpcolorbutton.h +++ b/libgimpwidgets/gimpcolorbutton.h @@ -29,7 +29,8 @@ #ifndef __GIMP_COLOR_BUTTON_H__ #define __GIMP_COLOR_BUTTON_H__ -#include "libgimp/gimpcolorarea.h" + +#include "libgimpwidgets/gimpcolorarea.h" #ifdef __cplusplus diff --git a/libgimpwidgets/gimpcolorselect.c b/libgimpwidgets/gimpcolorselect.c index 815bed9da8..ede552b439 100644 --- a/libgimpwidgets/gimpcolorselect.c +++ b/libgimpwidgets/gimpcolorselect.c @@ -26,20 +26,18 @@ #include #include "libgimpcolor/gimpcolor.h" +#include "libgimpwidgets/gimpwidgets.h" #include "apptypes.h" -#include "appenv.h" #include "color_select.h" #include "colormaps.h" #include "gimpdnd.h" #include "gimprc.h" -#include "gimpui.h" #include "session.h" #include "color_area.h" #include "libgimp/gimpcolorselector.h" -#include "libgimp/gimphelpui.h" #include "libgimp/gimpintl.h" diff --git a/libgimpwidgets/gimpdialog.c b/libgimpwidgets/gimpdialog.c index 04f8788c7f..3b284cf55f 100644 --- a/libgimpwidgets/gimpdialog.c +++ b/libgimpwidgets/gimpdialog.c @@ -24,13 +24,14 @@ #include -#include "gimpuitypes.h" +#include "gimpwidgetstypes.h" #include "gimpdialog.h" #include "gimphelpui.h" #include "pixmaps/wilber.xpm" + /* local callbacks of gimp_dialog_new () */ static gint gimp_dialog_delete_callback (GtkWidget *widget, diff --git a/libgimpwidgets/gimpfileentry.c b/libgimpwidgets/gimpfileentry.c index 2b3b45b2ba..ded794d883 100644 --- a/libgimpwidgets/gimpfileentry.c +++ b/libgimpwidgets/gimpfileentry.c @@ -19,6 +19,7 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #include "config.h" #include /* Needed here by Win32 gcc compilation */ @@ -34,7 +35,7 @@ #include "gimpfileselection.h" -#include "libgimp-intl.h" +#include "libgimp/libgimp-intl.h" #include "pixmaps/yes.xpm" #include "pixmaps/no.xpm" diff --git a/libgimpwidgets/gimpfileselection.c b/libgimpwidgets/gimpfileselection.c index 2b3b45b2ba..ded794d883 100644 --- a/libgimpwidgets/gimpfileselection.c +++ b/libgimpwidgets/gimpfileselection.c @@ -19,6 +19,7 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #include "config.h" #include /* Needed here by Win32 gcc compilation */ @@ -34,7 +35,7 @@ #include "gimpfileselection.h" -#include "libgimp-intl.h" +#include "libgimp/libgimp-intl.h" #include "pixmaps/yes.xpm" #include "pixmaps/no.xpm" diff --git a/libgimpwidgets/gimphelpui.c b/libgimpwidgets/gimphelpui.c index 4814f5f67f..c6a6729699 100644 --- a/libgimpwidgets/gimphelpui.c +++ b/libgimpwidgets/gimphelpui.c @@ -25,7 +25,7 @@ #include #include -#include "gimpuitypes.h" +#include "gimpwidgetstypes.h" #include "gimpdialog.h" #include "gimphelpui.h" diff --git a/libgimpwidgets/gimppatheditor.c b/libgimpwidgets/gimppatheditor.c index 28f72b342a..c0c3bead36 100644 --- a/libgimpwidgets/gimppatheditor.c +++ b/libgimpwidgets/gimppatheditor.c @@ -26,8 +26,9 @@ #include -#include "gimptypes.h" -#include "gimpuitypes.h" +#include "libgimp/gimpunit.h" + +#include "gimpwidgetstypes.h" #include "gimppatheditor.h" #include "gimpfileselection.h" diff --git a/libgimpwidgets/gimpquerybox.c b/libgimpwidgets/gimpquerybox.c index 9393d6d44b..490dc1b783 100644 --- a/libgimpwidgets/gimpquerybox.c +++ b/libgimpwidgets/gimpquerybox.c @@ -24,8 +24,9 @@ #include -#include "gimptypes.h" -#include "gimpuitypes.h" +#include "libgimp/gimpunit.h" + +#include "gimpwidgetstypes.h" #include "gimpdialog.h" #include "gimppixmap.h" @@ -33,7 +34,7 @@ #include "gimpsizeentry.h" #include "gimpwidgets.h" -#include "libgimp-intl.h" +#include "libgimp/libgimp-intl.h" #include "pixmaps/eek.xpm" diff --git a/libgimpwidgets/gimpsizeentry.c b/libgimpwidgets/gimpsizeentry.c index 26d47cfda2..5f3fad8a70 100644 --- a/libgimpwidgets/gimpsizeentry.c +++ b/libgimpwidgets/gimpsizeentry.c @@ -25,10 +25,11 @@ #include -#include "gimptypes.h" -#include "gimpuitypes.h" +#include "libgimp/gimplimits.h" +#include "libgimp/gimpunit.h" + +#include "gimpwidgetstypes.h" -#include "gimplimits.h" #include "gimpsizeentry.h" #include "gimpunitmenu.h" @@ -104,23 +105,23 @@ gimp_size_entry_destroy (GtkObject *object) gse = GIMP_SIZE_ENTRY (object); - for (list = gse->fields; list; list = g_slist_next(list)) + for (list = gse->fields; list; list = g_slist_next (list)) g_free (list->data); g_slist_free (gse->fields); if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + GTK_OBJECT_CLASS (parent_class)->destroy (object); } static void -gimp_size_entry_class_init (GimpSizeEntryClass *class) +gimp_size_entry_class_init (GimpSizeEntryClass *klass) { GtkObjectClass *object_class; - object_class = (GtkObjectClass*) class; + object_class = (GtkObjectClass*) klass; - parent_class = gtk_type_class (gtk_table_get_type ()); + parent_class = gtk_type_class (GTK_TYPE_TABLE); gimp_size_entry_signals[VALUE_CHANGED] = gtk_signal_new ("value_changed", @@ -149,11 +150,11 @@ gimp_size_entry_class_init (GimpSizeEntryClass *class) gtk_object_class_add_signals (object_class, gimp_size_entry_signals, LAST_SIGNAL); - class->value_changed = NULL; - class->refval_changed = NULL; - class->unit_changed = NULL; - object_class->destroy = gimp_size_entry_destroy; + + klass->value_changed = NULL; + klass->refval_changed = NULL; + klass->unit_changed = NULL; } static void @@ -174,7 +175,7 @@ gimp_size_entry_get_type (void) { static guint gse_type = 0; - if (!gse_type) + if (! gse_type) { GtkTypeInfo gse_info = { @@ -188,7 +189,7 @@ gimp_size_entry_get_type (void) (GtkClassInitFunc) NULL }; - gse_type = gtk_type_unique (gtk_table_get_type (), &gse_info); + gse_type = gtk_type_unique (GTK_TYPE_TABLE, &gse_info); } return gse_type; diff --git a/libgimpwidgets/gimpunitmenu.c b/libgimpwidgets/gimpunitmenu.c index c03b275f5a..2eacfa9e5d 100644 --- a/libgimpwidgets/gimpunitmenu.c +++ b/libgimpwidgets/gimpunitmenu.c @@ -24,14 +24,15 @@ #include -#include "gimptypes.h" -#include "gimpuitypes.h" +#include "libgimp/gimpunit.h" + +#include "gimpwidgetstypes.h" #include "gimpdialog.h" #include "gimphelpui.h" #include "gimpunitmenu.h" -#include "libgimp-intl.h" +#include "libgimp/libgimp-intl.h" /* private functions */ diff --git a/libgimpwidgets/gimpwidgets.c b/libgimpwidgets/gimpwidgets.c index 812ca75edf..4e49fb9fdc 100644 --- a/libgimpwidgets/gimpwidgets.c +++ b/libgimpwidgets/gimpwidgets.c @@ -25,9 +25,9 @@ #include #include "libgimpmath/gimpmath.h" +#include "libgimp/gimpunit.h" -#include "gimptypes.h" -#include "gimpuitypes.h" +#include "gimpwidgetstypes.h" #include "gimpchainbutton.h" #include "gimphelpui.h" @@ -36,7 +36,7 @@ #include "gimpunitmenu.h" #include "gimpwidgets.h" -#include "libgimp-intl.h" +#include "libgimp/libgimp-intl.h" /* diff --git a/libgimpwidgets/gimpwidgets.def b/libgimpwidgets/gimpwidgets.def new file mode 100644 index 0000000000..eda5b6634a --- /dev/null +++ b/libgimpwidgets/gimpwidgets.def @@ -0,0 +1,10 @@ +EXPORTS + gimp_hls_to_rgb + gimp_hsv_to_rgb + gimp_hsv_to_rgb4 + gimp_hsv_to_rgb_double + gimp_rgb_to_hls + gimp_rgb_to_hsv + gimp_rgb_to_hsv4 + gimp_rgb_to_hsv_double + gimp_rgb_to_l diff --git a/libgimpwidgets/gimpwidgets.h b/libgimpwidgets/gimpwidgets.h index 62513e4055..e773468e0b 100644 --- a/libgimpwidgets/gimpwidgets.h +++ b/libgimpwidgets/gimpwidgets.h @@ -23,6 +23,22 @@ #ifndef __GIMP_WIDGETS_H__ #define __GIMP_WIDGETS_H__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ diff --git a/libgimpwidgets/gimpwidgetstypes.h b/libgimpwidgets/gimpwidgetstypes.h new file mode 100644 index 0000000000..d9d1a1c22a --- /dev/null +++ b/libgimpwidgets/gimpwidgetstypes.h @@ -0,0 +1,61 @@ +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpwidgetstypes.h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GIMP_WIDGETS_TYPES_H__ +#define __GIMP_WIDGETS_TYPES_H__ + + +/* EEK */ +#include + +#include + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* For information look into the html documentation */ + + +typedef enum +{ + GIMP_SIZE_ENTRY_UPDATE_NONE = 0, + GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, + GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 +} GimpSizeEntryUpdatePolicy; + + +typedef struct _GimpColorArea GimpColorArea; +typedef struct _GimpColorButton GimpColorButton; +typedef struct _GimpPathEditor GimpPathEditor; +typedef struct _GimpSizeEntry GimpSizeEntry; +typedef struct _GimpUnitMenu GimpUnitMenu; + + +typedef void (* GimpHelpFunc) (const gchar *help_data); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GIMP_WIDGETS_TYPES_H__ */ diff --git a/modules/colorsel_water.c b/modules/colorsel_water.c index cb30cf45c6..1acc6a09a7 100644 --- a/modules/colorsel_water.c +++ b/modules/colorsel_water.c @@ -26,12 +26,12 @@ #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" +#include "libgimpwidgets/gimpwidgets.h" #include "libgimp/gimpuitypes.h" #include "libgimp/gimpcolorselector.h" #include "libgimp/gimpmodule.h" -#include "libgimp/gimphelpui.h" #include "gimpmodregister.h" diff --git a/plug-ins/FractalExplorer/Makefile.am b/plug-ins/FractalExplorer/Makefile.am index 450e3468cf..dac3862239 100644 --- a/plug-ins/FractalExplorer/Makefile.am +++ b/plug-ins/FractalExplorer/Makefile.am @@ -26,10 +26,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/Lighting/Makefile.am b/plug-ins/Lighting/Makefile.am index c6ae18da67..ec8660c08a 100644 --- a/plug-ins/Lighting/Makefile.am +++ b/plug-ins/Lighting/Makefile.am @@ -38,12 +38,13 @@ AM_CPPFLAGS = \ -DLOCALEDIR=\""$(localedir)"\" LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(top_builddir)/libgimpmath/libgimpmath.la \ - $(top_builddir)/plug-ins/libgck/gck/libgck.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(top_builddir)/libgimpmath/libgimpmath.la \ + $(top_builddir)/plug-ins/libgck/gck/libgck.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/MapObject/Makefile.am b/plug-ins/MapObject/Makefile.am index a0dbddc4c8..cd42d8f9cf 100644 --- a/plug-ins/MapObject/Makefile.am +++ b/plug-ins/MapObject/Makefile.am @@ -37,12 +37,13 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(top_builddir)/libgimpmath/libgimpmath.la \ - $(top_builddir)/plug-ins/libgck/gck/libgck.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(top_builddir)/libgimpmath/libgimpmath.la \ + $(top_builddir)/plug-ins/libgck/gck/libgck.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/bmp/Makefile.am b/plug-ins/bmp/Makefile.am index 4e5c9215fe..b8a47702e7 100644 --- a/plug-ins/bmp/Makefile.am +++ b/plug-ins/bmp/Makefile.am @@ -19,10 +19,11 @@ AM_CPPFLAGS = \ -DLOCALEDIR=\""$(localedir)"\" LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am index 66a14b4144..2e844b3d41 100644 --- a/plug-ins/common/Makefile.am +++ b/plug-ins/common/Makefile.am @@ -167,1268 +167,1379 @@ AlienMap_SOURCES = \ AlienMap.c AlienMap_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AlienMap2_SOURCES = \ AlienMap2.c AlienMap2_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) CEL_SOURCES = \ CEL.c CEL_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) CML_explorer_SOURCES = \ CML_explorer.c CML_explorer_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) aa_SOURCES = \ aa.c aa_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBAA) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBAA) \ + $(GTK_LIBS) \ $(INTLLIBS) align_layers_SOURCES = \ align_layers.c align_layers_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) animationplay_SOURCES = \ animationplay.c animationplay_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) animoptimize_SOURCES = \ animoptimize.c animoptimize_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) apply_lens_SOURCES = \ apply_lens.c apply_lens_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) autocrop_SOURCES = \ autocrop.c autocrop_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) autostretch_hsv_SOURCES = \ autostretch_hsv.c autostretch_hsv_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) blinds_SOURCES = \ blinds.c blinds_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) blur_SOURCES = \ blur.c blur_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) borderaverage_SOURCES = \ borderaverage.c borderaverage_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) bumpmap_SOURCES = \ bumpmap.c bumpmap_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) bz2_SOURCES = \ bz2.c bz2_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) c_astretch_SOURCES = \ c_astretch.c c_astretch_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) checkerboard_SOURCES = \ checkerboard.c checkerboard_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) color_enhance_SOURCES = \ color_enhance.c color_enhance_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) colorify_SOURCES = \ colorify.c colorify_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) colortoalpha_SOURCES = \ colortoalpha.c colortoalpha_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) compose_SOURCES = \ compose.c compose_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) convmatrix_SOURCES = \ convmatrix.c convmatrix_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) csource_SOURCES = \ csource.c csource_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) cubism_SOURCES = \ cubism.c cubism_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) curve_bend_SOURCES = \ curve_bend.c curve_bend_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) decompose_SOURCES = \ decompose.c decompose_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) deinterlace_SOURCES = \ deinterlace.c deinterlace_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) depthmerge_SOURCES = \ depthmerge.c depthmerge_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) despeckle_SOURCES = \ despeckle.c despeckle_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) destripe_SOURCES = \ destripe.c destripe_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) diffraction_SOURCES = \ diffraction.c diffraction_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) displace_SOURCES = \ displace.c displace_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) edge_SOURCES = \ edge.c edge_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) emboss_SOURCES = \ emboss.c emboss_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) engrave_SOURCES = \ engrave.c engrave_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) exchange_SOURCES = \ exchange.c exchange_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) film_SOURCES = \ film.c film_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) flarefx_SOURCES = \ flarefx.c flarefx_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) fractaltrace_SOURCES = \ fractaltrace.c fractaltrace_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gauss_iir_SOURCES = \ gauss_iir.c gauss_iir_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gauss_rle_SOURCES = \ gauss_rle.c gauss_rle_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gbr_SOURCES = \ gbr.c gbr_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gee_SOURCES = \ gee.c gee_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gee_zoom_SOURCES = \ gee_zoom.c gee_zoom_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gicon_SOURCES = \ gicon.c gicon_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gif_SOURCES = \ gif.c gif_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gifload_SOURCES = \ gifload.c gifload_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gih_SOURCES = \ gih.c gih_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) glasstile_SOURCES = \ glasstile.c glasstile_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gqbist_SOURCES = \ gqbist.c gqbist_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gradmap_SOURCES = \ gradmap.c gradmap_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) grid_SOURCES = \ grid.c grid_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gtm_SOURCES = \ gtm.c gtm_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) guillotine_SOURCES = \ guillotine.c guillotine_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) gz_SOURCES = \ gz.c gz_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) header_SOURCES = \ header.c header_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) hot_SOURCES = \ hot.c hot_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) hrz_SOURCES = \ hrz.c hrz_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) illusion_SOURCES = \ illusion.c illusion_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) iwarp_SOURCES = \ iwarp.c iwarp_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) jigsaw_SOURCES = \ jigsaw.c jigsaw_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) jpeg_SOURCES = \ jpeg.c jpeg_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBJPEG) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBJPEG) \ + $(GTK_LIBS) \ $(INTLLIBS) laplace_SOURCES = \ laplace.c laplace_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) lic_SOURCES = \ lic.c lic_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) mail_SOURCES = \ mail.c mail_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) mapcolor_SOURCES = \ mapcolor.c mapcolor_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) max_rgb_SOURCES = \ max_rgb.c max_rgb_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) mblur_SOURCES = \ mblur.c mblur_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) mpeg_SOURCES = \ mpeg.c mpeg_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBMPEG) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBMPEG) \ + $(GTK_LIBS) \ $(INTLLIBS) newsprint_SOURCES = \ newsprint.c newsprint_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) nlfilt_SOURCES = \ nlfilt.c nlfilt_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) noisify_SOURCES = \ noisify.c noisify_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) normalize_SOURCES = \ normalize.c normalize_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) nova_SOURCES = \ nova.c nova_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) oilify_SOURCES = \ oilify.c oilify_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) papertile_SOURCES = \ papertile.c papertile_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) pat_SOURCES = \ pat.c pat_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) pcx_SOURCES = \ pcx.c pcx_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) pix_SOURCES = \ pix.c pix_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) pixelize_SOURCES = \ pixelize.c pixelize_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) plasma_SOURCES = \ plasma.c plasma_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) plugindetails_SOURCES = \ plugindetails.c plugindetails_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) png_SOURCES = \ png.c png_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBPNG) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBPNG) \ + $(GTK_LIBS) \ $(INTLLIBS) pnm_SOURCES = \ pnm.c pnm_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) polar_SOURCES = \ polar.c polar_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) ps_SOURCES = \ ps.c ps_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) psd_SOURCES = \ psd.c psd_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) psp_SOURCES = \ psp.c psp_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBZ) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBZ) \ + $(GTK_LIBS) \ $(INTLLIBS) randomize_SOURCES = \ randomize.c randomize_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) ripple_SOURCES = \ ripple.c ripple_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) rotate_SOURCES = \ rotate.c rotate_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) sample_colorize_SOURCES = \ sample_colorize.c sample_colorize_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) scatter_hsv_SOURCES = \ scatter_hsv.c scatter_hsv_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) screenshot_SOURCES = \ screenshot.c screenshot_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) sel_gauss_SOURCES = \ sel_gauss.c sel_gauss_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) semiflatten_SOURCES = \ semiflatten.c semiflatten_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) sharpen_SOURCES = \ sharpen.c sharpen_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) shift_SOURCES = \ shift.c shift_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) sinus_SOURCES = \ sinus.c sinus_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) smooth_palette_SOURCES = \ smooth_palette.c smooth_palette_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) snoise_SOURCES = \ snoise.c snoise_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) sobel_SOURCES = \ sobel.c sobel_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) sparkle_SOURCES = \ sparkle.c sparkle_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) spread_SOURCES = \ spread.c spread_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) struc_SOURCES = \ struc.c struc_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) sunras_SOURCES = \ sunras.c sunras_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) tga_SOURCES = \ tga.c tga_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) threshold_alpha_SOURCES = \ threshold_alpha.c threshold_alpha_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) tiff_SOURCES = \ tiff.c tiff_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBTIFF) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBTIFF) \ + $(GTK_LIBS) \ $(INTLLIBS) tile_SOURCES = \ tile.c tile_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) tileit_SOURCES = \ tileit.c tileit_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) tiler_SOURCES = \ tiler.c tiler_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) uniteditor_SOURCES = \ uniteditor.c uniteditor_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) unsharp_SOURCES = \ unsharp.c unsharp_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) url_SOURCES = \ url.c url_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) video_SOURCES = \ video.c video_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) vinvert_SOURCES = \ vinvert.c vinvert_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) vpropagate_SOURCES = \ vpropagate.c vpropagate_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) warp_SOURCES = \ warp.c warp_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) waves_SOURCES = \ waves.c waves_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) whirlpinch_SOURCES = \ whirlpinch.c whirlpinch_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) wind_SOURCES = \ wind.c wind_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) wmf_SOURCES = \ wmf.c wmf_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) xbm_SOURCES = \ xbm.c xbm_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) xpm_SOURCES = \ xpm.c xpm_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBXPM) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBXPM) \ + $(GTK_LIBS) \ $(INTLLIBS) xwd_SOURCES = \ xwd.c xwd_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) zealouscrop_SOURCES = \ zealouscrop.c zealouscrop_LDADD = \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GLIB_LIBS) \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GLIB_LIBS) \ $(INTLLIBS) diff --git a/plug-ins/common/mkgen.pl b/plug-ins/common/mkgen.pl index ef12c7b30c..f390f8fcc2 100755 --- a/plug-ins/common/mkgen.pl +++ b/plug-ins/common/mkgen.pl @@ -81,16 +81,19 @@ foreach (sort keys %plugins) { $libgimp .= "\$(top_builddir)/libgimp/libgimp.la"; if (exists $plugins{$_}->{ui}) { - $libgimp .= "\t\t\\\n\t$libgimp"; + $libgimp .= "\t\t\t\\\n\t$libgimp"; $libgimp =~ s/gimp\./gimpui./; + + $libgimp .= "\t\t\t\\\n\t\$(top_builddir)/libgimpwidgets/libgimpwidgets.la"; + $libgimp .= "\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor.la"; + } else { + $libgimp .= "\t\t\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor.la"; } - $libgimp .= "\t\t\\\n\t\$(top_builddir)/libgimpcolor/libgimpcolor.la"; - - my $optlib = ""; + my $optlib = ""; if (exists $plugins{$_}->{optional}) { my $name = exists $plugins{$_}->{libopt} ? $plugins{$_}->{libopt} : $_; - $optlib = "\n\t\$(LIB\U$name\E)\t\t\t\t\t\\"; + $optlib = "\n\t\$(LIB\U$name\E)\t\t\t\t\t\t\\"; } if (exists $plugins{$_}->{libsupp}) { @@ -106,8 +109,8 @@ ${_}_SOURCES = \\ $_.c ${_}_LDADD = \\ - $libgimp \\$optlib - \$(\U$plugins{$_}->{libdep}\E_LIBS) \\ + $libgimp \\$optlib + \$(\U$plugins{$_}->{libdep}\E_LIBS) \\ \$(INTLLIBS) EOT diff --git a/plug-ins/dbbrowser/Makefile.am b/plug-ins/dbbrowser/Makefile.am index 5f83457416..bd75736bca 100644 --- a/plug-ins/dbbrowser/Makefile.am +++ b/plug-ins/dbbrowser/Makefile.am @@ -20,10 +20,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/fits/Makefile.am b/plug-ins/fits/Makefile.am index 92a6e48835..c4055a83fe 100644 --- a/plug-ins/fits/Makefile.am +++ b/plug-ins/fits/Makefile.am @@ -15,10 +15,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/flame/Makefile.am b/plug-ins/flame/Makefile.am index 10a0f5d85f..8eb7a4bd21 100644 --- a/plug-ins/flame/Makefile.am +++ b/plug-ins/flame/Makefile.am @@ -23,11 +23,12 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ - $(LIBUCB) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ + $(LIBUCB) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/fp/Makefile.am b/plug-ins/fp/Makefile.am index 4901938cf5..7d7823d112 100644 --- a/plug-ins/fp/Makefile.am +++ b/plug-ins/fp/Makefile.am @@ -20,10 +20,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/gap/Makefile.am b/plug-ins/gap/Makefile.am index b490870d8a..b738f7136d 100644 --- a/plug-ins/gap/Makefile.am +++ b/plug-ins/gap/Makefile.am @@ -209,18 +209,20 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) gap_decode_mpeg_LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(LIBMPEG) \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(LIBMPEG) \ + $(GTK_LIBS) \ $(INTLLIBS) files: diff --git a/plug-ins/gdyntext/Makefile.am b/plug-ins/gdyntext/Makefile.am index caa1dc0ac6..372f029de9 100644 --- a/plug-ins/gdyntext/Makefile.am +++ b/plug-ins/gdyntext/Makefile.am @@ -52,10 +52,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/gfig/Makefile.am b/plug-ins/gfig/Makefile.am index 5f49cdf27d..f2a384a134 100644 --- a/plug-ins/gfig/Makefile.am +++ b/plug-ins/gfig/Makefile.am @@ -21,10 +21,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/gflare/Makefile.am b/plug-ins/gflare/Makefile.am index 9f003366bf..671c7455e3 100644 --- a/plug-ins/gflare/Makefile.am +++ b/plug-ins/gflare/Makefile.am @@ -22,10 +22,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/gfli/Makefile.am b/plug-ins/gfli/Makefile.am index 712af13ec6..72bb4a0b30 100644 --- a/plug-ins/gfli/Makefile.am +++ b/plug-ins/gfli/Makefile.am @@ -15,10 +15,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/gimpressionist/Makefile.am b/plug-ins/gimpressionist/Makefile.am index 6aa3fdfa92..af32ff6496 100644 --- a/plug-ins/gimpressionist/Makefile.am +++ b/plug-ins/gimpressionist/Makefile.am @@ -40,10 +40,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/helpbrowser/Makefile.am b/plug-ins/helpbrowser/Makefile.am index 3ef0f6bdb0..242e06f6b5 100644 --- a/plug-ins/helpbrowser/Makefile.am +++ b/plug-ins/helpbrowser/Makefile.am @@ -18,11 +18,12 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ - $(GTKXMHTML_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ + $(GTKXMHTML_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/ifscompose/Makefile.am b/plug-ins/ifscompose/Makefile.am index d7e02b6af9..611f422fa6 100644 --- a/plug-ins/ifscompose/Makefile.am +++ b/plug-ins/ifscompose/Makefile.am @@ -18,10 +18,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/imagemap/Makefile.am b/plug-ins/imagemap/Makefile.am index eb9c10ea91..4d0a990b23 100644 --- a/plug-ins/imagemap/Makefile.am +++ b/plug-ins/imagemap/Makefile.am @@ -172,10 +172,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/plug-ins/maze/Makefile.am b/plug-ins/maze/Makefile.am index f2d315a203..02574a7ee1 100644 --- a/plug-ins/maze/Makefile.am +++ b/plug-ins/maze/Makefile.am @@ -20,10 +20,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/mosaic/Makefile.am b/plug-ins/mosaic/Makefile.am index fc153e34d4..08a9a1ad3d 100644 --- a/plug-ins/mosaic/Makefile.am +++ b/plug-ins/mosaic/Makefile.am @@ -17,10 +17,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/pagecurl/Makefile.am b/plug-ins/pagecurl/Makefile.am index be4c45265e..5c2e87d207 100644 --- a/plug-ins/pagecurl/Makefile.am +++ b/plug-ins/pagecurl/Makefile.am @@ -24,11 +24,12 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(top_builddir)/libgimpmath/libgimpmath.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(top_builddir)/libgimpmath/libgimpmath.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/print/Makefile.am b/plug-ins/print/Makefile.am index be2c0197b5..bdb11ed343 100644 --- a/plug-ins/print/Makefile.am +++ b/plug-ins/print/Makefile.am @@ -47,10 +47,11 @@ AM_CPPFLAGS = \ -DRELEASE_DATE=\"$(GIMP_PRINT_RELEASE_DATE)\" LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) escputil_LDADD = diff --git a/plug-ins/rcm/Makefile.am b/plug-ins/rcm/Makefile.am index f6cdcdc02b..f59e32455f 100644 --- a/plug-ins/rcm/Makefile.am +++ b/plug-ins/rcm/Makefile.am @@ -31,10 +31,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/script-fu/Makefile.am b/plug-ins/script-fu/Makefile.am index e413c49187..b509b6530f 100644 --- a/plug-ins/script-fu/Makefile.am +++ b/plug-ins/script-fu/Makefile.am @@ -40,6 +40,7 @@ INCLUDES = \ LDADD = \ $(top_builddir)/plug-ins/dbbrowser/dbbrowser_utils.o \ $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ $(top_builddir)/libgimp/libgimp.la \ $(top_builddir)/libgimpcolor/libgimpcolor.la \ $(GTK_LIBS) \ diff --git a/plug-ins/sel2path/Makefile.am b/plug-ins/sel2path/Makefile.am index 4d599d3d4c..3580304a02 100644 --- a/plug-ins/sel2path/Makefile.am +++ b/plug-ins/sel2path/Makefile.am @@ -38,10 +38,11 @@ AM_CPPFLAGS = \ -DLOCALEDIR=\""$(localedir)"\" LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/sgi/Makefile.am b/plug-ins/sgi/Makefile.am index af9da94aae..9b6d0cfdc6 100644 --- a/plug-ins/sgi/Makefile.am +++ b/plug-ins/sgi/Makefile.am @@ -18,10 +18,11 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ $(INTLLIBS) .PHONY: files diff --git a/plug-ins/webbrowser/Makefile.am b/plug-ins/webbrowser/Makefile.am index ea7b7f4134..5a03e38aa8 100644 --- a/plug-ins/webbrowser/Makefile.am +++ b/plug-ins/webbrowser/Makefile.am @@ -20,11 +20,12 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ - $(LIBXMU) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ + $(LIBXMU) \ $(INTLLIBS) EXTRA_DIST = $(scriptdata_DATA) diff --git a/plug-ins/xjt/Makefile.am b/plug-ins/xjt/Makefile.am index ced1ffa29c..2b5b8eff93 100644 --- a/plug-ins/xjt/Makefile.am +++ b/plug-ins/xjt/Makefile.am @@ -19,11 +19,12 @@ INCLUDES = \ -I$(includedir) LDADD = \ - $(top_builddir)/libgimp/libgimpui.la \ - $(top_builddir)/libgimp/libgimp.la \ - $(top_builddir)/libgimpcolor/libgimpcolor.la \ - $(GTK_LIBS) \ - $(LIBJPEG) \ + $(top_builddir)/libgimp/libgimpui.la \ + $(top_builddir)/libgimpwidgets/libgimpwidgets.la \ + $(top_builddir)/libgimp/libgimp.la \ + $(top_builddir)/libgimpcolor/libgimpcolor.la \ + $(GTK_LIBS) \ + $(LIBJPEG) \ $(INTLLIBS) AM_CPPFLAGS = \ diff --git a/po-libgimp/POTFILES.in b/po-libgimp/POTFILES.in index 796baf0630..f8cfbb1e84 100644 --- a/po-libgimp/POTFILES.in +++ b/po-libgimp/POTFILES.in @@ -1,11 +1,10 @@ # Files from the Gimp distribution which have already been # marked to allow runtime translation of messages -libgimp/gimpcolorbutton.c libgimp/gimpexport.c -libgimp/gimpfileselection.c -libgimp/gimpquerybox.c -libgimp/gimpunitmenu.c libgimp/gimpunit.c -libgimp/gimpunitmenu.c -libgimp/gimpwidgets.c +libgimpwidgets/gimpcolorbutton.c +libgimpwidgets/gimpfileselection.c +libgimpwidgets/gimpquerybox.c +libgimpwidgets/gimpunitmenu.c +libgimpwidgets/gimpwidgets.c diff --git a/tools/pdbgen/pdb/misc_tools.pdb b/tools/pdbgen/pdb/misc_tools.pdb index 4b2f26fa57..d6ba8b0a6c 100644 --- a/tools/pdbgen/pdb/misc_tools.pdb +++ b/tools/pdbgen/pdb/misc_tools.pdb @@ -1533,7 +1533,7 @@ sub ink { ); } -@headers = qw("gimpimage.h" "tile_manager.h"); +@headers = qw("libgimpmath/gimpmath.h" "gimpimage.h" "tile_manager.h"); @procs = qw(airbrush airbrush_default blend bucket_fill by_color_select clone clone_default color_picker diff --git a/tools/pdbgen/pdb/paint_tools.pdb b/tools/pdbgen/pdb/paint_tools.pdb index 4b2f26fa57..d6ba8b0a6c 100644 --- a/tools/pdbgen/pdb/paint_tools.pdb +++ b/tools/pdbgen/pdb/paint_tools.pdb @@ -1533,7 +1533,7 @@ sub ink { ); } -@headers = qw("gimpimage.h" "tile_manager.h"); +@headers = qw("libgimpmath/gimpmath.h" "gimpimage.h" "tile_manager.h"); @procs = qw(airbrush airbrush_default blend bucket_fill by_color_select clone clone_default color_picker diff --git a/tools/pdbgen/pdb/palette.pdb b/tools/pdbgen/pdb/palette.pdb index 194d81213b..d62b336257 100644 --- a/tools/pdbgen/pdb/palette.pdb +++ b/tools/pdbgen/pdb/palette.pdb @@ -182,7 +182,7 @@ CODE ); } -@headers = qw("gimpcontext.h" "palette.h"); +@headers = qw("libgimpcolor/gimpcolor.h" "gimpcontext.h" "palette.h"); @procs = qw(palette_get_foreground palette_get_background palette_set_foreground palette_set_background diff --git a/tools/pdbgen/pdb/tools.pdb b/tools/pdbgen/pdb/tools.pdb index 4b2f26fa57..d6ba8b0a6c 100644 --- a/tools/pdbgen/pdb/tools.pdb +++ b/tools/pdbgen/pdb/tools.pdb @@ -1533,7 +1533,7 @@ sub ink { ); } -@headers = qw("gimpimage.h" "tile_manager.h"); +@headers = qw("libgimpmath/gimpmath.h" "gimpimage.h" "tile_manager.h"); @procs = qw(airbrush airbrush_default blend bucket_fill by_color_select clone clone_default color_picker diff --git a/tools/pdbgen/pdb/transform_tools.pdb b/tools/pdbgen/pdb/transform_tools.pdb index 4b2f26fa57..d6ba8b0a6c 100644 --- a/tools/pdbgen/pdb/transform_tools.pdb +++ b/tools/pdbgen/pdb/transform_tools.pdb @@ -1533,7 +1533,7 @@ sub ink { ); } -@headers = qw("gimpimage.h" "tile_manager.h"); +@headers = qw("libgimpmath/gimpmath.h" "gimpimage.h" "tile_manager.h"); @procs = qw(airbrush airbrush_default blend bucket_fill by_color_select clone clone_default color_picker