Commit Graph

74 Commits

Author SHA1 Message Date
Michael Natterer 3b6b3fc189 app: GtkAction -> GAction madness part two
Change all action callbacks so they can be invoked by a GAction:

- add GimpActionCallback typedef:
  void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
  with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
  GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
  strings
- badly hack around to force a GimpProcedure pointer into a
  uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
  they all have the same signature now
2019-07-04 01:11:48 +02:00
Michael Natterer b9d47f2d1f app: change all action callback signatures to use GimpAction
instead of GtkAction, which is correct now because all our actions
implement the GimpAction interface.
2019-07-02 16:12:18 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Jehan 7642715c17 app: allow setting parent for dialogs created by GimpDialogFactory.
Fixes a bunch of:
> Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
2018-05-20 21:06:33 +02:00
Michael Natterer 5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
Michael Natterer aea161c9a5 app: also include <gegl.h> when we include "libgimpwidgets/gimpwidgets.h" 2013-11-01 22:28:18 +01:00
Michael Natterer 0a68527edc app: move the GimpWindowStrategy interface from display/ to widgets/ 2012-01-30 23:33:21 +01:00
Michael Natterer 79a66d36d2 app: rename GimpWindowStrategy::create_dockable_dialog()
to ::show_dockable_dialog() because that's what it wlays does, no
matter if the dialog has to be created or now.
2012-01-30 22:59:09 +01:00
Martin Nordholts 07556242b0 app: Make positioning of new dockables depend on window mode
Add GimpWindowingStrategy with create_dockable_dialog() and use it in
dialogs_create_dockable_cmd_callback(). There are two implementations:
GimpSingleWindowStrategy and GimpMultiWindowStrategy. Depending on the
window mode, we want new dockables to appear in different places when
created. In single-window mode, they should appear inside the single
image window. In multi-window mode, a new dock window is created.
2011-07-03 21:20:36 +02:00
Martin Nordholts d7dc2dc1ab app: Make tooltips in the toolbox work again
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.
2010-05-16 12:19:18 +02:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
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.
2010-02-28 23:23:24 +01:00
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Martin Nordholts 66197c5d11 app: global_dock_window_factory -> global_dock_factory
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.
2010-01-19 22:40:06 +01:00
Martin Nordholts 8699511bbd app: global_dock_window_factory -> global_dock_factory
With GimpDock not being a toplevel any longer, it makes more sense to
name global_dock_factory global_dock_window_factory. Do that.
2009-12-20 14:41:02 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer ff5310a4ea Implement the presistent menu of recently closed docks, still somewhat
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-16 16:06:42 +00:00
Michael Natterer b1a1da88c5 Start changing the "Dialogs" menu to "Windows", still incomplete.
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
2008-05-10 16:21:37 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 63329e0a28 moved the installtion log into a GtkExpander.
2006-04-24  Sven Neumann  <sven@gimp.org>

	* app/dialogs/user-install-dialog.c: moved the installtion log
	into a GtkExpander.
2006-04-24 15:26:08 +00:00
Sven Neumann e4c1dc0a5a app/actions/dialogs-commands.c app/config/gimpconfig-dump.c
2006-04-18  Sven Neumann  <sven@gimp.org>

	* app/actions/dialogs-commands.c
	* app/config/gimpconfig-dump.c
	* app/core/gimpcontext.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpparasitelist.c
	* app/display/gimpdisplayshell.c: avoid unnecessary relocations.
2006-04-18 10:08:10 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 8fec4cd8c1 split gimp_dialog_factories_toggle() into two functions. Turned the
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-12-29 20:47:29 +00:00
Michael Natterer 1f1305c372 Some dock refactoring which separates the docking logic from active image
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.
2005-05-11 20:26:12 +00:00
Michael Natterer 726d805872 purely cosmetic.
2004-10-14  Michael Natterer  <mitch@gimp.org>

	* app/actions/dialogs-commands.c: purely cosmetic.
2004-10-14 14:12:40 +00:00
Michael Natterer 7d065360c7 configure.in added new directory app/dialogs and link libappdialogs.c into
2004-09-13  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am: added new directory app/dialogs and link
	libappdialogs.c into the gimp binary.

	* app/gui/Makefile.am
	* app/gui/gui-types.h
	* app/gui/gui-vtable.c
	* app/gui/gui.c

	* app/gui/about-dialog.[ch]
	* app/gui/authors.h
	* app/gui/color-notebook.[ch]
	* app/gui/convert-dialog.[ch]
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.[ch]
	* app/gui/file-dialog-utils.[ch]
	* app/gui/file-new-dialog.[ch]
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-open-location-dialog.[ch]
	* app/gui/file-save-dialog.[ch]
	* app/gui/grid-dialog.[ch]
	* app/gui/info-dialog.[ch]
	* app/gui/info-window.[ch]
	* app/gui/module-browser.[ch]
	* app/gui/offset-dialog.[ch]
	* app/gui/palette-import-dialog.[ch]
	* app/gui/preferences-dialog.[ch]
	* app/gui/quit-dialog.[ch]
	* app/gui/resize-dialog.[ch]
	* app/gui/resolution-calibrate-dialog.[ch]
	* app/gui/stroke-dialog.[ch]
	* app/gui/tips-dialog.[ch]
	* app/gui/tips-parser.[ch]
	* app/gui/user-install-dialog.[ch]: removed these files...

	* app/dialogs/Makefile.am
	* app/dialogs/dialogs-types.h

	* app/dialogs/*.[ch]: ...and added them here. Changed some
	filenames like module-browser -> module-dialog.

	* app/app_procs.c
	* app/actions/actions-types.h
	* app/actions/actions.c
	* app/actions/dialogs-actions.c
	* app/actions/dialogs-commands.c
	* app/actions/dockable-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/file-commands.c
	* app/actions/gradient-editor-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/select-commands.c
	* app/actions/templates-commands.c
	* app/actions/templates-commands.h
	* app/actions/vectors-commands.c
	* app/actions/view-commands.c
	* app/display/gimpdisplayshell-cursor.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.[ch]
	* app/tools/gimpcroptool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimptransformtool.[ch]
	* app/tools/gimpvectortool.c
	* app/widgets/gimpcolormapeditor.[ch]
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimptoolbox-color-area.c
	* menus/toolbox-menu.xml.in
	* tools/authorsgen/authorsgen.pl: changed accordingly.
2004-09-13 15:15:23 +00:00
Simon Budig 4a75d7271e Added boolean parameter to gimp_dialog_factories_toggle to make it
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-11 19:19:26 +00:00
Sven Neumann ce1370bb2e added a boolean parameter to gimp_dialog_factory_dialog_new() to let the
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-08-31 22:41:15 +00:00
Simon Budig e7af53b0d3 app/actions/dialogs-commands.c app/display/gimpdisplayshell-dnd.c
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-07-04 21:27:09 +00:00
Michael Natterer 3590757d2a app/actions/actions.h. added the various return_if_no_foo() macros here.
2004-05-03  Michael Natterer  <mitch@gimp.org>

	* app/actions/actions.h. added the various return_if_no_foo()
	macros here.

	* app/actions/channels-commands.c
	* app/actions/dialogs-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/file-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/qmask-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/actions/view-commands.c: removed them here. Some cleanup.
2004-05-03 14:46:29 +00:00
Michael Natterer 4654280114 Switch from GtkItemFactory to GtkUIManager. The migration is almost
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-29 12:52:29 +00:00
Michael Natterer 661f6ddeb8 removed...
2004-04-20  Michael Natterer  <mitch@gimp.org>

	* app/gui/*-commands.[ch]: removed...

	* app/actions/*-commands.[ch]: ...and added here.

	* app/gui/Makefile.am
	* app/gui/*-menu.c
	* app/gui/dialogs-constructors.c
	* app/gui/gui.c
	* app/gui/menus.c
	* app/actions/Makefile.am
	* app/actions/*-actions.c: changed accordingly.

	* app/actions/plug-in-actions.[ch]
	* app/actions/tools-actions.[ch]: new files.

	* app/Makefile.am: had to add more -u evilness because gui/
	and actions/ have cyclic dependencies.

	* menus/image-menu.xml: added some more items.
2004-04-20 13:25:55 +00:00
Michael Natterer 8848558f95 More GtkAction stuff (still unused):
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-04-19 14:54:24 +00:00
Simon Budig f1348dc2e6 replaced the indexed palette in the default "Layers, Channels, Paths"-Dock
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.
2004-01-21 23:48:38 +00:00
Michael Natterer edff0480e1 show the image menu in newly created layers, channels & paths docks.
2004-01-21  Michael Natterer  <mitch@gimp.org>

	* app/gui/dialogs-commands.c: show the image menu in newly created
	layers, channels & paths docks.
2004-01-21 22:35:07 +00:00
Michael Natterer 56863fac49 support '|'-separated lists of dialog identifiers and raise any of them if
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-18 12:28:15 +00:00
Michael Natterer 6eb772946b libgimpwidgets/gimpquerybox.c configure the labels in the message dialog
2003-11-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpquerybox.c
	* app/widgets/gimpwidgets-utils.c: configure the labels in the
	message dialog and the query boxes to do automatic word wrapping
	to be HIG compliant.

	* app/app_procs.c
	* app/batch.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-utils.c
	* app/config/gimpconfigwriter.c
	* app/config/gimpscanner.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/gui.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/palette-select.c
	* app/gui/palettes-commands.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c
	* app/gui/select-commands.c
	* app/gui/stroke-dialog.c
	* app/gui/tool-options-menu.c
	* app/gui/vectors-commands.c
	* app/gui/view-commands.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptooloptionseditor.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
	messages. Reduced number of translatable strings by making many
	file error messages the same. Quote single words and filenames
	with 'foo', not "foo". Replaced some more "drawable" by "layer".
	General message cleanup and consistency check.

	* app/pdb/image_cmds.c: regenerated.
2003-11-14 15:33:40 +00:00
Michael Natterer 729ff4faac removed the "Move to Screen" hack.
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-10 00:24:33 +00:00
Michael Natterer bcd9794a99 To be multihead safe, each new window or menu needs to be associated with
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-11-08 15:29:47 +00:00
Michael Natterer 2b0c05131f renamed gimp_dialog_factories_idle() and _unidle() to
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-13 11:57:50 +00:00
Michael Natterer 87480880c3 Cleaned up session management and changed the format of sessionrc in a way
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-10 15:59:12 +00:00
Michael Natterer 181a2c4820 added new pure virtual function GimpDock::setup() which configures a dock
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-08 15:44:35 +00:00
Michael Natterer f65a7acbab new function. Need to include ugly stuff for proper GimpImageDock setup.
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-10-07 12:24:01 +00:00
Sven Neumann b563329c28 accept a list of dialog identifiers and try to raise an existing dockable
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-30 15:48:14 +00:00
Michael Natterer c5fd48f2fb added a "menu_title" which is registered with each menu.
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-09-23 16:17:25 +00:00
Michael Natterer 6fabca2e17 Added configurable styles for dockable tabs (fixes bug #87376):
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-07-08 15:07:56 +00:00
Michael Natterer ef30cf315d app/gui/image-menu.c moved the convenience items which create new docks
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-06-06 12:16:13 +00:00
Michael Natterer f20e559bbf app/widgets/gimpbrushfactoryview.[ch] app/widgets/gimpbufferview.[ch]
2003-04-08  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainergridview.[ch]
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimpimageview.[ch]
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimptemplateview.[ch]: removed "min_item_x" and
	"min_item_y" parameters all over the place. Added
	"preview_border_width" instead.

	* app/widgets/gimpmenuitem.c: ensure that all menu items have the
	same height.

	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpundoeditor.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c: changed accordingly.

	* app/gui/dialogs-constructors.c: removed the borders from the tool
	and template lists.
2003-04-08 12:39:02 +00:00
Michael Natterer c1dffc05e0 Removed deprecated and broken list views based on GtkList[Item] (fixes bug
2003-03-20  Michael Natterer  <mitch@gimp.org>

	Removed deprecated and broken list views
	based on GtkList[Item] (fixes bug #90965):

	* app/widgets/gimpchannellistitem.[ch]
	* app/widgets/gimpchannellistview.[ch]
	* app/widgets/gimpcontainerlistview.[ch]
	* app/widgets/gimpdrawablelistitem.[ch]
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimpitemlistitem.[ch]
	* app/widgets/gimpitemlistview.[ch]
	* app/widgets/gimplayerlistitem.[ch]
	* app/widgets/gimplayerlistview.[ch]
	* app/widgets/gimplistitem.[ch]
	* app/widgets/gimpvectorslistview.[ch]: removed.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/widgets-enums.h
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerview-utils.c
	* app/widgets/gimpdatafactoryview.c
	* app/gui/channels-commands.c
	* app/gui/channels-menu.c
	* app/gui/drawable-commands.c
	* app/gui/layers-commands.c
	* app/gui/layers-menu.c
	* app/gui/palettes-commands.c
	* app/gui/test-commands.c
	* app/gui/vectors-commands.c
	* app/gui/vectors-menu.c: changed accordingly.

	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c: removed the term "tree" from all user visible
	places and create tree views when lists are requested.

2003-03-20  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: app/widgets/*list* -> *tree*
2003-03-20 13:05:52 +00:00
Michael Natterer 034d9d3e49 fixed strstr() call so we can switch back from tree views again.
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-02-24 12:40:55 +00:00