We need to be able to pass a GimpUIManager to
gimp_dialog_factory_dialog_new(), so make that possible. Also make
sure to set ui_manager in gimp_dialog_factory_dialog_new_internal()
when we create both a dock window and a dock, so tooltips works in
toolboxes created from scratch.
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.
Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
Rename back global_dock_window_factory to
global_dock_factory. Renaming to global_dock_window_factory was done
under the assumption that there would be a separate factory that would
create non-toplevel dockables, but I don't expect this to happen in
the forseeable future.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-05-16 Michael Natterer <mitch@gimp.org>
Implement the presistent menu of recently closed docks, still
somewhat hackish but fully functional. Fixes bug #132744.
* app/actions/dialogs-actions.c
* app/actions/dialogs-commands.[ch]
* menus/image-menu.xml.in: remove the menu items that were
creating the hardcoded preconfigured docks.
* app/dialogs/dialogs.[ch]: add GimpContainer of recently closed
docks and API to load and save it.
* app/gui/session.c: call the recent dock load and save functions.
* app/widgets/gimpsessioninfo.[ch]: implement the GimpConfig interface
and (de)serialize via proper interface methods.
* app/gui/session.c
* app/widgets/gimpdialogfactory.c: use the GimpConfig API
to (de)serialize session infos and added the code that was
formerly in the info's (de)serialize functions but didn't belong
there.
* app/widgets/gimpaction.[ch]: add "max-width-chars" property and
set it on proxy menu item labels.
* app/actions/windows-actions.[ch]
* app/actions/windows-commands.[ch]
* app/menus/windows-menu.c: add actions and menu of recently
closed docks and code to restore the dock when the menu items are
selected. Use above new action property to ensure a minimum
width of the menu.
* app/widgets/gimpmenudock.c: use '-' instead of '|' for
separating notebooks in the window title. Menu items don't like '|'.
* app/widgets/gimpdock.c: removed the confirmation dialog when
closing docks and simply add them to the recent docks container.
This code is totally misplaced and will move to another file soon.
svn path=/trunk/; revision=25671
2008-05-10 Michael Natterer <mitch@gimp.org>
Start changing the "Dialogs" menu to "Windows", still incomplete.
Addresses bug #309707.
* app/actions/Makefile.am
* app/actions/windows-actions.[ch]
* app/actions/windows-commands.[ch]: new files which currently
hold the "show toolbox" action and callback and new code which
maintains automatically generated actions for accessing (raising)
all open images.
* app/actions/actions.c: register the new "windows" action group.
* app/actions/dialogs-actions.c
* app/actions/dialogs-commands.[ch]: remove "show toolbox"
action and callback and also the action for the "Disalogs" menu.
* app/menus/Makefile.am
* app/menus/windows-menu.[ch]: new files which create and destroy
the menu items for the image window actions.
* app/menus/menus.c: register the "windows" action group with
all UI managers that have the "dialogs" action group.
* app/menus/image-menu.c (image_menu_setup): call
windows_menu_setup().
* app/gui/gui.c: s/dialogs_show_toolbox/windows_show_toolbox/g
* menus/image-menu.xml.in: some minor s/dialogs/windows/
and add the "Images" submenu.
svn path=/trunk/; revision=25623
2005-12-29 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: split
gimp_dialog_factories_toggle() into two functions. Turned the
tri-state into a simple boolean state. Dialogs are now either
shown or not, without treating the toolbox any special.
* app/actions/dialogs-commands.c
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
2005-05-11 Michael Natterer <mitch@gimp.org>
Some dock refactoring which separates the docking logic from
active image and UI manager stuff:
* app/widgets/gimpmenudock.[ch]: new widget renamed from
GimpImageDock, zero changes except the name change.
* app/widgets/gimpimagedock.[ch]: new widget derived from
GimpDock. Keeps the UI manager.
* app/widgets/gimpdock.[ch]: removed the UI manager. GimpDock only
contains the basic docking logic again.
* app/widgets/gimpmenudock.[ch]
* app/widgets/gimptoolbox.[ch]: derive them from GimpImageDock.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/actions/dialogs-commands.c
* app/actions/dock-actions.c
* app/actions/dock-commands.c
* app/actions/dockable-commands.c
* app/dialogs/dialogs-constructors.c: changed accordingly.
2004-09-11 Simon Budig <simon@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: Added boolean parameter to
gimp_dialog_factories_toggle to make it possible to ensure a visible
toolbox.
* app/actions/dialogs-commands.c: Use the new parameter to ensure
toolbox visibility after the last image window closes.
* app/display/gimpdisplayshell-callbacks.c: Changed accordingly.
Fixes bug #137057 (the discussion is in bug #152285)
2004-09-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: added a boolean parameter to
gimp_dialog_factory_dialog_new() to let the caller decide whether
the window should be presented or not.
* app/actions/dialogs-commands.c
* app/actions/image-commands.c
* app/actions/templates-commands.c
* app/gui/gui-vtable.c
* app/gui/gui.c
* app/widgets/gimpsessioninfo.c: changed accordingly. Do not let
gimp_dialog_factory_dialog_new() present the dialog if we need to
change it after creation. This avoids annoying resizes, noticeable
especially with the error dialog.
2004-07-04 Simon Budig <simon@gimp.org>
* app/actions/dialogs-commands.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/preferences-dialog.c
* app/tools/gimppainttool.c
* app/widgets/gimpdeviceinfo.c
* app/widgets/gimpitemtreeview.c
* plug-ins/imagemap/imap_selection.c
* tools/pdbgen/pdb/gradients.pdb: Small changes to make GIMP
CVS compile with gcc 2.95 again. Mostly double semicolons and
variable declarations after other stuff. Spotted by Martin
Renold.
* app/pdb/gradients_cmds.c: regenerated.
(there is one issue left, see his patch at
http://old.homeip.net/martin/gcc-2.95.diff, I did not
copy the #define va_copy __va_copy, since I don't know
what happens here.)
2004-04-29 Michael Natterer <mitch@gimp.org>
Switch from GtkItemFactory to GtkUIManager. The migration is
almost complete, still stuff missing/incomplete, definitely added
a bunch of new bugs...
* app/actions/*-commands.[ch]: converted all callback from
GtkItemFactory callbacks to GtkAction callbacks.
* app/actions/debug-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/help-actions.c
* app/actions/plug-in-actions.c
* app/actions/qmask-actions.c
* app/actions/tool-options-actions.c: various fixes.
* app/display/gimpdisplay.[ch]
* app/display/gimpdisplayshell-appearance.[ch]
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: move everything from
GtkItemFactory to GtkUIManager.
* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
Needed because the action callbacks don't have a widget parameter
and sometimes we need a parent window for showing dialogs.
* app/gui/Makefile.am
* app/gui/brushes-menu.[ch]
* app/gui/buffers-menu.[ch]
* app/gui/channels-menu.[ch]
* app/gui/colormap-editor-menu.[ch]
* app/gui/dialogs-menu.[ch]
* app/gui/documents-menu.[ch]
* app/gui/error-console-menu.[ch]
* app/gui/fonts-menu.[ch]
* app/gui/gradient-editor-menu.[ch]
* app/gui/gradients-menu.[ch]
* app/gui/images-menu.[ch]
* app/gui/layers-menu.[ch]
* app/gui/palette-editor-menu.[ch]
* app/gui/palettes-menu.[ch]
* app/gui/patterns-menu.[ch]
* app/gui/qmask-menu.[ch]
* app/gui/templates-menu.[ch]
* app/gui/vectors-menu.[ch]: removed these files.
* app/gui/gui.c: create a global UI manager for the image popup
menu and the toolbox menubar.
* app/gui/menus.[ch]: removed all GtkItemFactory code.
* app/gui/image-menu.[ch]
* app/gui/toolbox-menu.[ch]: removed everything except the trivial
setup_funcs.
* app/gui/file-open-menu.c
* app/gui/file-save-menu.c
* app/gui/tool-options-menu.c: don't use the macros from menus.h
any more, they are gone.
* app/gui/gui-vtable.c
* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
menu entries.
* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
gimp_ui_manager_update/g
* app/widgets/gimpuimanager.[ch]: added API to get an action
group by name.
* app/widgets/gimpmenufactory.c: don't choke on the item_factory
entries being NULL.
* app/widgets/gimpactiongroup.c: make sure booleans set using
g_object_set() only have TRUE or FALSE values.
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdockable.[ch]
* app/widgets/gimpdocked.[ch]
* app/widgets/gimpeditor.[ch]
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
code and enable the #if 0'ed UI manager stuff.
* menus/gradient-editor-menu.xml: fixed typos.
* menus/image-menu.xml: duplicate everything so we have both
an image menubar and an image popup menu. Badly cries for an
XSL processor.
* menus/toolbox-menu.xml: added an "Extensions" placeholder.
2004-04-19 Michael Natterer <mitch@gimp.org>
More GtkAction stuff (still unused):
* configure.in: added new directories menus/ and app/actions/
* Makefile.am: build menus/
* menus/.cvsignore
* menus/Makefile.am
* menus/*-menu.xml: new files: XML menu descriptions for each menu
which is now defined in gui/*-menu.c.
* app/widgets/widgets-types.h: some typedefs for GimpActionGroup.
* app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only
property. Added APIs to set actions visible/sensitive/active
and an unimplemented stub for setting the action's color.
* app/Makefile.am: build actions/ and link libappactions.a
* app/actions/.cvsignore
* app/actions/Makefile.am
* app/actions/*-actions.[ch]: new files: GtkActions for each
*-commands.c file in gui/. Ported all "update" functions from the
*-menu.c files.
(everything completely unused, untested and partly #if 0'ed)
* app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added
API to raise/lower channels/vectors to top/bottom.
* app/gui/channels-commands.[ch]
* app/gui/vectors-commands.[ch]: added callbacks for the new
to top/bottom functions.
* app/gui/Makefile.am
* app/gui/dockable-commands.[ch]: new files split out of
dialogs-commands.[ch].
* app/gui/dialogs-commands.[ch]
* app/gui/dialogs-menu.c: changed accordingly.
* app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback()
and remove usage of "guint action".
* app/gui/image-menu.c: changed accordingly.
* app/gui/palette-editor-commands.[ch]: split
+palette_editor_new_color_cmd_callback() into separate callbacks
for adding from FG and BG.
* app/gui/palette-editor-menu.c: changed accordingly.
2004-01-22 Simon Budig <simon@gimp.org>
* app/gui/dialogs-commands.c: replaced the indexed palette in
the default "Layers, Channels, Paths"-Dock (as created by the
menu in the toolbox) with the Undo History, since the indexed
palette is pretty useless most of the time and the new setup
at least matches the upper half of the dockable that comes up
after a new user starts the Gimp the first time.
2003-11-18 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]
(gimp_dialog_factory_dialog_raise): support '|'-separated lists of
dialog identifiers and raise any of them if it is already open, or
the first dialog in the list otherwise.
* app/gui/dialogs-commands.c (dialogs_create_dockable_cmd_callback):
removed the same functionality here.
* app/gui/edit-commands.c
* app/tools/gimppaintoptions-gui.c
* app/tools/gimptextoptions.c
* app/widgets/gimpdevicestatus.c
* app/widgets/gimptoolbox-indicator-area.c: pass lists of dialog
identifiers to gimp_dialog_factory_dialog_raise().
2003-11-10 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c: removed the
"Move to Screen" hack.
* app/gui/dialogs-commands.[ch]
* app/gui/view-commands.[ch]
* app/gui/dialogs-menu.c
* app/gui/image-menu.c: added proper menu items to the
<Image>/View and the <Dialogs> menus so all image windows and
docks can be sent to other screens. Hide the menu items when
there is just one screen.
* app/widgets/gimphelp-ids.h: new help IDd for the new menu items.
2003-11-08 Michael Natterer <mitch@gimp.org>
To be multihead safe, each new window or menu needs to be
associated with a GdkScreen or it will pop up on the default
screen.
* libgimpwidgets/gimpquerybox.[ch]
* app/display/gimpdisplayshell-layer-select.[ch]
* app/widgets/widgets-types.h
* app/widgets/gimpitemfactory.[ch]
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimptemplateview.[ch]
* app/widgets/gimptooldialog.[ch]
* app/widgets/gimpviewabledialog.[ch]
* app/gui/channels-commands.[ch]
* app/gui/color-notebook.[ch]
* app/gui/convert-dialog.[ch]
* app/gui/edit-commands.[ch]
* app/gui/grid-dialog.[ch]
* app/gui/image-commands.[ch]
* app/gui/info-dialog.[ch]
* app/gui/layers-commands.[ch]
* app/gui/offset-dialog.[ch]
* app/gui/resize-dialog.[ch]
* app/gui/stroke-dialog.[ch]
* app/gui/templates-commands.[ch]
* app/gui/vectors-commands.[ch]: added "GtkWidget *parent"
paramaters to all functions which create menus, popups or windows
and pass "parent" to gimp_dialog_new() or one of the various
wrappers around it. As a side effect, this fixes bug #61092.
* app/widgets/gimpdialogfactory.[ch]: added "GdkScreen *screen"
instead of "parent" here since there are no possible parent
windows on startup.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_origin_button_press): added a quick hack to
send a display to another screen: click the origin button with the
middle mouse button.
* app/display/gimpdisplayshell.c
(gimp_display_shell_screen_changed): don't chain up
undonditionally (don't crash).
* libgimpwidgets/gimpdialog.c (gimp_dialog_new_valist): set the
dialog's screen from a non-GtkWidget parent widget. The rest of
non-window parent widget handling is still unimplemented.
* libgimpwidgets/gimpcolorbutton.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdockable.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimperrorconsole.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpsessioninfo.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpwidgets-utils.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpnavigationview.c
* app/gui/module-browser.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c
* app/gui/file-commands.c
* app/gui/file-new-dialog.c
* app/gui/file-save-dialog.c
* app/gui/gradient-editor-commands.c
* app/gui/gui-vtable.c
* app/gui/gui.c
* app/gui/info-window.c
* app/gui/palette-import-dialog.c
* app/gui/palettes-commands.c
* app/gui/qmask-commands.c
* app/gui/select-commands.c
* app/gui/tool-options-commands.c
* app/gui/view-commands.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptransformtool.c
* plug-ins/FractalExplorer/FractalExplorer.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c: changed addordingly. Changed all
menu_position funcs to place the menu on the right screen.
2003-10-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: renamed
gimp_dialog_factories_idle() and _unidle() to
gimp_dialog_factories_set_busy() and _unset_busy().
Added utility function gimp_dialog_factory_set_widget_data() and
public API gimp_dialog_factory_from_widget() so we don't need to
g_object_[set|get]_data() with magic keys all over the place.
* app/widgets/gimpsessioninfo.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-menu.c
* app/gui/gui-vtable.c: changed accordingly.
* app/widgets/gimpsessioninfo.c: remember active page of all dock
notebooks in sessionrc.
* app/widgets/gimpsessioninfo.h: cleaned up the session info structs.
2003-10-10 Michael Natterer <mitch@gimp.org>
Cleaned up session management and changed the format of sessionrc
in a way that allows extensions without changing the format during
the 2.0 cycle:
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpsessioninfo.[ch]: new files implementing the whole
GimpSessionInfo stuff (parsing, saving, restoring, utility functions).
Save / parse the position of GimpDock's panes (bug #122964).
* app/widgets/gimpdialogfactory.[ch]: removed saving, restoring
and session related utility functions and use the ones from
the new files above.
* app/gui/session.c: removed parsing and use the new stuff.
* app/widgets/gimpdock.[ch]: added new virtual functions
GimpDock::set_aux_info() and GimpDock::get_aux_info():
* app/widgets/gimpimagedock.c: implement them and handle the
"auto_follow_active" and "show_image_menu" properties.
* app/widgets/gimpdockable.[ch]: added the same virtual functions
to the GimpDockable class. Enables forward-compatible per-dockable
session management (bug #122964).
* app/gui/dialogs-commands.c
* app/gui/gui.c: changed accordingly.
* etc/sessionrc: ditto. Look at this file and update your own
sessionrc manually if you don't want to lose it.
2003-10-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.[ch]: added new pure virtual function
GimpDock::setup() which configures a dock like a passed template
dock.
* app/widgets/gimpimagedock.c: implement it and set
"show_image_menu" and "auto_follow_active" accordingly.
* app/widgets/gimpdockable.c (gimp_dockable_detach): call
gimp_dock_setup() to configure the new dock like the old one.
Removed inclusion if "gimpimagedock.h".
* app/gui/dialogs-commands.c: minor code cleanups.
2003-10-07 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdockable.[ch] (gimp_dockable_detach): new
function. Need to include ugly stuff for proper GimpImageDock
setup.
* app/widgets/gimpdockbook.c (gimp_dockbook_menu_end): use
gimp_dockable_detach() and removed the evil includes.
* app/gui/dialogs-commands.c (dialogs_detach_tab_cmd_callback):
implement it using gimp_dockable_detach().
2003-09-30 Sven Neumann <sven@gimp.org>
* app/gui/dialogs-commands.c (dialogs_create_dockable_cmd_callback):
accept a list of dialog identifiers and try to raise an existing
dockable from the list. If that fails, create a new one from the
first entry.
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: specify alternative dialog identifiers
where appropriate.
* app/vectors/gimpstroke.c (gimp_stroke_interpolate): use NULL
instead of 0.
2003-09-23 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpmenufactory.[ch]: added a "menu_title" which is
registered with each menu.
* app/widgets/gimpitemfactory.[ch]: added the title to the
constructor and to the GimpItemFactory struct.
* app/gui/menus.c: register titles with all menus.
* app/widgets/gimpdockable.[ch]: show the tab menu, not the
contained dialog's menu when clicking on the menu button.
Embed the dialog's menu as submenu. Use the item_factory's
title and the dockable's stock_id for the submenu entry.
* app/widgets/gimpeditor.c: removed GtkWidget:popup_menu()
implementation since that's done by GimpDockable now.
* app/widgets/gimpdockbook.c: set the new menu item invisible
when showing the menu as tab menu.
* app/widgets/gimphelp-ids.h: added GIMP_HELP_DOCK_TAB_DETACH
and renamed _TAB_REMOVE to _TAB_CLOSE.
* app/gui/dialogs-menu.c: added the new menu entry for showing the
dialog's sub-menu. Added a "Detach" menu item, renamed "Remove" to
"Close". Accept both a GimpDockbook and a GimpDockable pointer as
"data" in dialogs_menu_update().
* app/gui/dialogs-commands.[ch]: changed accordingly. Never use
gtk_item_factory_popup_data_from_widget() but always the "data"
passed to the callbacks. Take care to not set the already active
preview_size, tab_style and list/grid type in the resp. callbacks
to avoid being called from dialogs_menu_update().
* app/gui/dialogs-constructors.c: removed separate
set_context_funcs and get_menu_funcs for GimpContainerView and
GimpContainerEditor widgets and simply use
gimp_container_view_get_by_dockable() to find the right widget.
2003-07-08 Michael Natterer <mitch@gimp.org>
Added configurable styles for dockable tabs (fixes bug #87376):
* app/widgets/widgets-enums.[ch]: added new enum GimpTabStyle
which can be one on { ICON, NAME, ICON_NAME, ICON_BLURB }.
* app/widgets/gimpdockable.[ch]: added a GimpTabStyle member to
the GimpDockable struct which defaults to GIMP_TAB_STYLE_ICON.
Renamed "short_name" to "name" and "name" to "blurb". Renamed
GimpDockableGetTabFunc to GimpDockableGetIconFunc. Implemented all
tab styles in gimp_dockable_real_get_tab_widget() and use the
"get_icon_func" only for creating the tab's icon, not the entire
tab widget.
* app/widgets/gimpdockbook.[ch]: changed accordingly. Create the
menu widgets and the DND icon using gimp_dockable_get_tab_widget()
with tab_style == GIMP_TAB_STYLE_ICON_BLURB instead of duplicating
tons of code. Made gimp_dockbook_get_tab_widget() public because
it's needed for exchanging tabs on-the-fly.
* app/widgets/gimpimagedock.c: changed accordingly.
* app/widgets/gimpdialogfactory.c: remember the dockables' tab
style in sessionrc.
* app/gui/dialogs-menu.c: added a submenu to select the tab style
for each dockable.
* app/gui/dialogs-commands.[ch]: new callback
dialogs_tab_style_cmd_callback().
* app/gui/dialogs-constructors.[ch]: added stock_ids to all
dockables, swapped the "name" and "blurb" parameters, reordered
functions, cleanup.
* app/gui/dialogs-menu.c
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: use GIMP_STOCK_DEFAULT_COLORS for the
color editor dockable and renamed it to "FG/BG Color".
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: moved the convenience items which
create new docks from the "Dialogs/" level to a new
"Dialogs/Create New Dock/" sub-menu. Fixes bug #111278.
* app/gui/dialogs-commands.[ch] (dialogs_create_data_cmd_callback):
new convenience constructor callback. Factored out duplicated
code to the new dialogs_create_dock() utility function.
2003-02-24 Michael Natterer <mitch@gimp.org>
* app/gui/dialogs-commands.c (dialogs_toggle_view_cmd_callback):
fixed strstr() call so we can switch back from tree views again.
2003-01-13 Michael Natterer <mitch@gimp.org>
* app/gui/brushes-menu.[ch]
* app/gui/buffers-menu.[ch]
* app/gui/channels-menu.[ch]
* app/gui/colormap-editor-menu.[ch]
* app/gui/dialogs-menu.[ch]
* app/gui/documents-menu.[ch]
* app/gui/file-open-menu.[ch]
* app/gui/file-save-menu.[ch]
* app/gui/gradient-editor-menu.[ch]
* app/gui/gradients-menu.[ch]
* app/gui/image-menu.[ch]
* app/gui/images-menu.[ch]
* app/gui/layers-menu.[ch]
* app/gui/palette-editor-menu.[ch]
* app/gui/palettes-menu.[ch]
* app/gui/patterns-menu.[ch]
* app/gui/qmask-menu.[ch]
* app/gui/toolbox-menu.[ch]
* app/gui/vectors-menu.[ch]: new files, one per GimpItemFactory,
containing the menu entries and their setup and update funcs.
* app/gui/brushes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed because they contained
only update funcs.
* app/gui/Makefile.am: changed accordingly. Split the huge
SOURCES list in smaller ones for menus and dialogs.
* app/gui/menus.[ch]: removed the menu entries and setup funcs.
Added MENU_SEPARATOR() and MENU_BRANCH() macros to the header.
Made some utility functions public.
* app/display/gimpdisplayshell.[ch]
* app/gui/buffers-commands.[ch]
* app/gui/channels-commands.[ch]
* app/gui/colormap-editor-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/images-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palette-editor-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/qmask-commands.[ch]
* app/gui/vectors-commands.[ch]: removed the update funcs.
* app/gui/plug-in-menus.[ch]: renamed plug_in_set_menu_sensitivity()
to plug_in_menus_update(). Cleanup.
* app/gui/paths-dialog.[ch]: added the <Paths> entries here
so they will go away together with these files.
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c: removed useless #includes.
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.
2002-12-10 Michael Natterer <mitch@gimp.org>
The unbelievable happened: a menu bar per display (optionally)
* app/widgets/gimpitemfactory.[ch]: Added the possibility to have
more than one item factory per <Prefix>. Added
gimp_item_factories_set_foobar() variants of all functions which
set menu item properties (label, sensitive, ...). Removed
the #ifndef ENABLE_NLS code since that's no longer possible.
* app/widgets/gimptoolbox.c: made it robust againt the <Image>
factory not existing at the time of toolbox creation.
* app/config/gimpconfig-blurbs.h
* app/config/gimpdisplayconfig.[ch]: added boolean
"menu_bar_per_display" property.
* app/gui/preferences-dialog.c: added a toggle for the new option.
* app/gui/menus.[ch]: added menus_get_new_image_factory() as
temporary solution. Will add a GimpMenuFactory which creates the
item factories soon.
* app/display/gimpdisplayshell.c: add the menu bar if requested.
Changed widget packing slightly for the menu bar case.
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
Currently there is no right-click popup menu when we have a menu
bar. This will change soon.
* app/gui/file-dialog-utils.c
* app/gui/gui.c: use gimp_item_factories_set_foo().
* app/gui/channels-commands.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/plug-in-commands.c
* app/gui/select-commands.c
* app/gui/tools-commands.c
* app/gui/vectors-commands.c
* app/gui/view-commands.c: per-display item factories pass the
GimpDisplay as user_data to callbacks, not a Gimp. Changed all
return_if_no_foo() macros to handle both cases.
Cleaned up the plug-in menu stuff:
* app/plug-in/plug-in-types.h: removed PlugInMenuEntry type.
* app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_add() as
counterpart to plug_ins_proc_def_remove(). Added
plug_ins_locale_domain() as counterpart to plug_ins_help_path().
Remember the locale domains just as the help paths. Changed
plug-in initialization so that their menus can be created multiple
times.
* app/plug-in/plug-in.[ch]: use plug_ins_proc_def_add() instead of
doing it manually.
* app/gui/plug-in-menus.[ch]: added plug_in_menus_init() which
just registers the locale domains. Changed plug_in_make_menu() to
take a list of proc_defs, not plug_ins_defs so it can be used
after plug-in query.
2002-05-10 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplay.c: added a read-only property for the
display's image, so it can be retreived by the core, which
treats displays as simple GimpObjects.
* app/core/gimpcontext.c: made context->display an object
property, not just gpointer. Connect to the "remove" signal of
gimp->displays to get notified of disappearing displays. Removed
the EEKWrapper and get the display's gimage with g_object_get().
* app/widgets/gimpimagedock.[ch]: added image_dock->display_container
and require it being passed in the constructor. Do voodoo things
in the "image_changed" and "display_changed" callbacks to ensure
that the dock doesn't end up with no display even if the active
image has one. Added a style property for the image menu's preview
size.
* app/gui/dialogs-commands.c (dialogs_menu_update): set the
"View as List" and "View as Grid" items insensitive if the
other view type doesn't exist. Hide them if the view cannot
be classified as "list" or "grid" at all. Also hide the
"Preview Size" submenu if it's pointless for the view.
* app/gui/dialogs-constructors.c: added a special tab for the
navigation dialog. Will propbaby add dockable->stock_id to
generalize this kind of tab. Pass gimp->displays to
gimp_image_dock_new().
* app/gui/menus.c: reordered the "<Dialogs>" factory entries,
added more stock icons, cleanup.
* etc/gtkrc_user
* themes/Default/gtkrc: document usage of GimpImageDock's
"menu_preview_height" property.
2002-03-14 Michael Natterer <mitch@gimp.org>
* app/core/gimptoolinfo.c: g_strdup() the stock_id passed to
gimp_tool_info_new() because the caller's memory may disappear
after registering the tool (tool modules).
Made a GimpDock out of the toolbox:
* app/gui/Makefile.am
* app/gui/color-area.[ch]
* app/gui/indicator-area.[ch]
* app/gui/toolbox.[ch]: removed...
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimptoolbox-color-area.[ch]
* app/widgets/gimptoolbox-indicator-area.[ch]
* app/widgets/gimptoolbox.[ch]: ...and added here.
* app/widgets/gimpdock.[ch]: don't set a minimal width. Added a
"destroy_if_empty" boolean so we can prevent destruction of the
toolbox if it's last dockable is removed. Added gimp_dock_construct()
which is called from GimpImageDock and GimpToolbox.
* app/widgets/gimpimagedock.[ch]: Default to not showing the image
menu, set a minimal width here, misc. minor cleanup.
* app/widgets/gimpdockbook.c: some more GIMP_IS_IMAGE_DOCK()
checks, fixed dnd widget creation.
* app/widgets/gimpdialogfactory.[ch]: changed
gimp_dialog_factories_toggle() to take just the toolbox_factory as
parameter. When restoring the session use the created dock's
dialog factory to create dockables, not the the factory we
created the dock from (for the toolbox).
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
* app/gui/dialogs.[ch]: create an own dialog factory for the toolbox
and set dialogs_toolbox_new() as it's new_dock_func.
* app/gui/dialogs-constructors.[ch]: changed dialogs_toolbox_get()
accordingly.
* app/gui/dialogs-commands.[ch]: added dialogs_show_toolbox(), ckeck
if a dock is really a GimpImageDock before casting.
* app/gui/gui.c
* app/gui/menus.c
* app/widgets/gimppaletteeditor.c: changed accordingly.
* app/gui/color-notebook.c
* app/gui/color-select.c
* app/gui/colormap-dialog.c
* app/gui/palette-editor-commands.c: removed useless inclusion of
"gui/color-area.h".
* themes/Default/gtkrc: set "gimp-dock-style" for GimpToolbox widgets.
2002-02-27 Michael Natterer <mitch@gimp.org>
* themes/Default/images/stock-button-stroke.png
* themes/Default/images/stock-button-to-path.png
* themes/Default/images/stock-button-to-selection.png: removed.
* themes/Default/images/stock-button-path-stroke.png
* themes/Default/images/stock-button-selection-stroke.png
* themes/Default/images/stock-button-selection-to-path.png: new ones.
* themes/Default/Makefile.am
* themes/Default/images/Makefile.am
* libgimpwidgets/gimpstock.[ch]: changed accordingly.
* themes/Default/images/stock-button-selection-add.png
* themes/Default/images/stock-button-selection-intersect.png
* themes/Default/images/stock-button-selection-replace.png
* themes/Default/images/stock-button-selection-subtract.png: cropped.
* themes/Default/images/tools/stock-tool-button-brightness-contrast.png:
a nicer one from Ville Pätsi.
* app/gui/menus.c
* app/widgets/gimpvectorslistview.c: use the new stock items.
* app/gui/dialogs-commands.c: create the new paths dialog, not the
old one in dialogs_lc_cmd_callback().
* app/gui/vectors-commands.c: some more s/Vectors/Path/ in
user-visible strings.
* app/app_procs.c: some test code for the filename -> uri migration.
2001-11-30 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-qmask.[ch]: new files: the QMask stuff
stripped from GUI code. Added gimp_image_qmask_invert().
* app/core/gimpimage.[ch]: removed the QMask functions.
* app/display/Makefile.am
* app/display/gimpdisplayshell-qmask.[ch]: removed.
* app/gui/Makefile.am
* app/gui/qmask-commands.[ch]: new files for the new QMask item
factory callbacks and the qmask query dialog.
* app/gui/menus.c: added a context menu for the QMask button.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-handlers.c: don't include the qmask
stuff.
* app/display/gimpdisplayshell-callbacks.[ch]: Moved the 2 qmask
callbacks here. Don't popup the dialog on double_click. Show
the contect menu on right-click.
* app/display/gimpdisplayshell-callbacks.[ch]:
gimp_display_shell_canvas_events(): removed the hack of
conntecting "key_press_event" to gtk_true() while a tool is
active. Instead, check for (event & GDK_BUTTON1_MASK) in the
key_press and key_release handlers and stop signal emission. Save
the modifier state on "button_press" and restore it after
"button_release".
Changed the way context menus are updated/shown:
- removed GimpContainerContextFunc.
- pass around item factory identifiers (e.g. "<Brushes>")
- added voodoo to update the menus before showing them.
* app/widgets/gimpitemfactory.[ch]: gimp_item_factory_new(): take
a GimpItemFactoryUpdateFunc parameter, attach it as data to the
factory and use it to update the menu in
gimp_item_factory_popup_with_date().
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_item_factory_popup_with_data() here.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]: use item_factory
identifier strings all over the place.
* app/widgets/gimpdockbook.c: removed the menu update code, it's
now in gui/dialogs-commands.c.
* app/gui/brushes-commands.[ch]
* app/gui/buffers-commands.[c]
* app/gui/channels-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed all show_context_menu()
functions and made the update functions public. Changed all
update functions to use the gimp_item_factory_set_foo() methods
instead of gimp_menu_item_set_foo().
* app/gui/menus.c: pass the update functions to the
gimp_item_factory_new().
* app/gui/dialogs-constructors.c: pass item factory identifiers to
all view constructors.
* app/gui/gradient-editor.c: show the context menu using the new
method.
* app/gui/toolbox.c: no need to include "dialogs-commands.h".