mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 20:41:43 +00:00
8d86ec25e0
2003-01-10 Michael Natterer <mitch@gimp.org> Move away from creating all item_factories statically in menus_init() but create a new one for each place where one is needed: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpmenufactory.[ch]: new factory which creates and configures the GimpItemFactories it knows about on-the-fly. * app/widgets/gimpitemfactory.[ch]: added gimp_item_factory_update() which calls the "update_func". Added "gboolean update_on_popup" so item_factories can be configured to require manual updates (used for the <Image> factory). * app/gui/menus.[ch]: create a "global_menu_factory" and register all menus we have with it. Added various setup functions which do stuff like adding the "Open Recent" menu or reorder plug-in menu entries. Removed the debugging stuff... * app/gui/Makefile.am * app/gui/debug-commands.[ch]: ...and added it here. * app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the <Paths> factories here because they are still global. * app/gui/plug-in-menus.[ch]: changed the "image_factory" parameters to "item_factory" and create/update the entries for the passed item_factory only. Makes the whole stuff much more straightforward. * app/plug-in/plug-ins.c: don't call plug_in_make_menu(). * app/display/gimpdisplay.[ch] * app/display/gimpdisplayshell.[ch]: added "menu_factory" and "popup_factory" parameters to gimp_display_new() and gimp_display_shell_new(). Create the menubar_factory and the qmask_factory dynamically. Pass the shell, not a Gimp to the QMask callbacks. Changed gimp_display_shell_set_menu_sensitivity() to gimp_display_shell_menu_update() and don't call it directly (it's a GimpItemFactory update_func now). Call gimp_item_factory_update() on the resp. factories instead. * app/gui/qmask-commands.c * app/display/gimpdisplayshell-callbacks.c * app/tools/gimpimagemaptool.c: changed accordingly. * app/widgets/gimpbrusheditor.c * app/widgets/gimpbrushfactoryview.[ch] * app/widgets/gimpbufferview.[ch] * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpdataeditor.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdock.c * app/widgets/gimpdockbook.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemlistview.[ch] * app/widgets/gimppaletteeditor.[ch]: pass around lots of GimpMenuFactory pointers and menu_identifiers so all views can create their item_factories themselves. Unref the factories when they are no longer needed because they belong to the views now. * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/dialogs.c * app/gui/brush-select.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c: changed accordingly. * app/gui/file-dialog-utils.[ch] (file_dialog_new): require menu_factory and menu_identifier parameters. * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init() (they went to menus.c as setup_funcs). Added file_*_dialog_set_type() and moved the <Load> and <Save> factory callbacks to file-commands.c * app/gui/file-commands.[ch]: changed accordingly. * app/gui/view-commands.c: changed the statusbar, menubar, rulers and guides callbacks to do their job only if the setting has actually changed. Don't update whole item factories afterwards. Instead, just change the state of the items that actually need update. Unrelated: * app/core/gimpchannel.c (gimp_channel_init): set "bounds_known" and friends to FALSE since we don't know that the new channel will be empty (fixes QMask and probably other stuff). * app/gui/image-commands.c * app/gui/vectors-commands.c: cleanup.
189 lines
4.7 KiB
Makefile
189 lines
4.7 KiB
Makefile
## Process this file with automake to produce Makefile.in
|
|
|
|
AM_CPPFLAGS = \
|
|
-DG_LOG_DOMAIN=\"Gimp-Widgets\" \
|
|
@GIMP_THREAD_FLAGS@ \
|
|
@GIMP_MP_FLAGS@
|
|
|
|
INCLUDES = \
|
|
-I$(top_builddir) \
|
|
-I$(top_srcdir) \
|
|
-I$(top_builddir)/app \
|
|
-I$(top_srcdir)/app \
|
|
$(GTK_CFLAGS) \
|
|
$(PANGOFT2_CFLAGS) \
|
|
-I$(includedir)
|
|
|
|
noinst_LIBRARIES = libappwidgets.a
|
|
|
|
libappwidgets_a_sources = \
|
|
widgets-enums.h \
|
|
widgets-types.h \
|
|
gimpbrusheditor.c \
|
|
gimpbrusheditor.h \
|
|
gimpbrushfactoryview.c \
|
|
gimpbrushfactoryview.h \
|
|
gimpbrushpreview.c \
|
|
gimpbrushpreview.h \
|
|
gimpbufferpreview.c \
|
|
gimpbufferpreview.h \
|
|
gimpbufferview.c \
|
|
gimpbufferview.h \
|
|
gimpchannellistitem.c \
|
|
gimpchannellistitem.h \
|
|
gimpchannellistview.c \
|
|
gimpchannellistview.h \
|
|
gimpcoloreditor.c \
|
|
gimpcoloreditor.h \
|
|
gimpcolormapeditor.c \
|
|
gimpcolormapeditor.h \
|
|
gimpcolorpanel.c \
|
|
gimpcolorpanel.h \
|
|
gimpcomponentlistitem.c \
|
|
gimpcomponentlistitem.h \
|
|
gimpcontainereditor.c \
|
|
gimpcontainereditor.h \
|
|
gimpcontainergridview.c \
|
|
gimpcontainergridview.h \
|
|
gimpcontainerlistview.c \
|
|
gimpcontainerlistview.h \
|
|
gimpcontainermenu.c \
|
|
gimpcontainermenu.h \
|
|
gimpcontainermenuimpl.c \
|
|
gimpcontainermenuimpl.h \
|
|
gimpcontainerview.c \
|
|
gimpcontainerview.h \
|
|
gimpcontainerview-utils.c \
|
|
gimpcontainerview-utils.h \
|
|
gimpcursor.c \
|
|
gimpcursor.h \
|
|
gimpdataeditor.c \
|
|
gimpdataeditor.h \
|
|
gimpdatafactoryview.c \
|
|
gimpdatafactoryview.h \
|
|
gimpdeviceinfo.c \
|
|
gimpdeviceinfo.h \
|
|
gimpdevices.c \
|
|
gimpdevices.h \
|
|
gimpdialogfactory.c \
|
|
gimpdialogfactory.h \
|
|
gimpdnd.c \
|
|
gimpdnd.h \
|
|
gimpdock.c \
|
|
gimpdock.h \
|
|
gimpdockable.c \
|
|
gimpdockable.h \
|
|
gimpdockbook.c \
|
|
gimpdockbook.h \
|
|
gimpdocumentview.c \
|
|
gimpdocumentview.h \
|
|
gimpdrawablelistitem.c \
|
|
gimpdrawablelistitem.h \
|
|
gimpdrawablelistview.c \
|
|
gimpdrawablelistview.h \
|
|
gimpdrawablepreview.c \
|
|
gimpdrawablepreview.h \
|
|
gimpeditor.c \
|
|
gimpeditor.h \
|
|
gimpenummenu.c \
|
|
gimpenummenu.h \
|
|
gimpfontselection.c \
|
|
gimpfontselection.h \
|
|
gimpfontselection-dialog.c \
|
|
gimpfontselection-dialog.h \
|
|
gimpgradienteditor.c \
|
|
gimpgradienteditor.h \
|
|
gimpgradientpreview.c \
|
|
gimpgradientpreview.h \
|
|
gimphelp.c \
|
|
gimphelp.h \
|
|
gimphistogrambox.c \
|
|
gimphistogrambox.h \
|
|
gimphistogramview.c \
|
|
gimphistogramview.h \
|
|
gimpimagedock.c \
|
|
gimpimagedock.h \
|
|
gimpimagefilepreview.c \
|
|
gimpimagefilepreview.h \
|
|
gimpimagepreview.c \
|
|
gimpimagepreview.h \
|
|
gimpimageview.c \
|
|
gimpimageview.h \
|
|
gimpitemfactory.c \
|
|
gimpitemfactory.h \
|
|
gimpitemlistitem.c \
|
|
gimpitemlistitem.h \
|
|
gimpitemlistview.c \
|
|
gimpitemlistview.h \
|
|
gimplayerlistitem.c \
|
|
gimplayerlistitem.h \
|
|
gimplayerlistview.c \
|
|
gimplayerlistview.h \
|
|
gimplistitem.c \
|
|
gimplistitem.h \
|
|
gimpmenufactory.c \
|
|
gimpmenufactory.h \
|
|
gimpmenuitem.c \
|
|
gimpmenuitem.h \
|
|
gimpnavigationpreview.c \
|
|
gimpnavigationpreview.h \
|
|
gimppaletteeditor.c \
|
|
gimppaletteeditor.h \
|
|
gimppalettepreview.c \
|
|
gimppalettepreview.h \
|
|
gimppatternpreview.c \
|
|
gimppatternpreview.h \
|
|
gimppreview.c \
|
|
gimppreview.h \
|
|
gimppreview-utils.c \
|
|
gimppreview-utils.h \
|
|
gimppropwidgets.c \
|
|
gimppropwidgets.h \
|
|
gimpselectioneditor.c \
|
|
gimpselectioneditor.h \
|
|
gimptoolbox.c \
|
|
gimptoolbox.h \
|
|
gimptoolbox-color-area.c \
|
|
gimptoolbox-color-area.h \
|
|
gimptoolbox-indicator-area.c \
|
|
gimptoolbox-indicator-area.h \
|
|
gimptoolinfopreview.c \
|
|
gimptoolinfopreview.h \
|
|
gimpvectorslistview.c \
|
|
gimpvectorslistview.h \
|
|
gimpviewabledialog.c \
|
|
gimpviewabledialog.h \
|
|
gimpwidgets-constructors.c \
|
|
gimpwidgets-constructors.h \
|
|
gimpwidgets-utils.c \
|
|
gimpwidgets-utils.h \
|
|
gtkwrapbox.c \
|
|
gtkwrapbox.h \
|
|
gtkhwrapbox.c \
|
|
gtkhwrapbox.h \
|
|
gtkvwrapbox.c \
|
|
gtkvwrapbox.h
|
|
|
|
libappwidgets_a_built_sources = widgets-enums.c
|
|
|
|
libappwidgets_a_SOURCES = \
|
|
$(libappwidgets_a_built_sources) $(libappwidgets_a_sources)
|
|
|
|
#
|
|
# rules to generate built sources
|
|
#
|
|
# setup autogeneration dependancies
|
|
gen_sources = xgen-wec
|
|
CLEANFILES = $(gen_sources)
|
|
|
|
$(srcdir)/widgets-enums.c: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS)
|
|
$(GIMP_MKENUMS) \
|
|
--fhead "#include \"config.h\"\n#include <gtk/gtk.h>\n#include \"widgets-enums.h\"\n#include \"libgimp/gimpintl.h\"" \
|
|
--fprod "\n/* enumerations from \"@filename@\" */" \
|
|
--vhead "\nstatic const GEnumValue @enum_name@_enum_values[] =\n{" \
|
|
--vprod " { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
|
|
--vtail " { 0, NULL, NULL }\n};\n\nGType\n@enum_name@_get_type (void)\n{\n static GType enum_type = 0;\n\n if (!enum_type)\n enum_type = g_enum_register_static (\"@EnumName@\", @enum_name@_enum_values);\n\n return enum_type;\n}\n" \
|
|
$(srcdir)/widgets-enums.h > xgen-wec \
|
|
&& cp xgen-wec $(@F) \
|
|
&& rm -f xgen-wec
|