Commit Graph

17 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
Michael Natterer 49ffbbbbc0 app: add menu items and a dialog for GimpItem::fill()
which are essentially a copy of the stroking GUI. We now can fill the
exact shape outlined by stroking selections and paths. Suggestions for
the menu item labels are welcome.
2016-03-15 21:07:59 +01:00
Michael Natterer 0dfeee1614 app: reorder select-commands.[ch] to be in the same order as -actions.c 2016-01-25 23:07:33 +01:00
Ell 71119d41c0 app: Add "Flood" select action
and associated UI entries.

This action applies the "gimp:flood" operation to the selection.
2016-01-25 22:58:33 +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
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
Michael Natterer ff02c7af99 app/actions/select-actions.c app/actions/select-commands.[ch]
2004-10-21  Michael Natterer  <mitch@gimp.org>

	* app/actions/select-actions.c
	* app/actions/select-commands.[ch]
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.[ch]: added actions and callbacks
	to stroke with the last values used without showing the stroke
	dialog. The actions have no menu entries but can be called via
	shortcuts. Fixes bug #135746.

	(Disclaimer: the uglyness of the callbacks shows the need for a
	stroke API overhaul).
2004-10-20 23:14:24 +00:00
Michael Natterer 421b2a0d0e added alternative actions "vectors-selection-from-vectors" and
2004-06-03  Michael Natterer  <mitch@gimp.org>

	* app/actions/vectors-actions.c: added alternative actions
	"vectors-selection-from-vectors" and
	"vectors-selection-to-vectors-short" with different labels suited
	for the "Select" menu.

	* app/actions/select-actions.c: removed "select-from-vectors"
	and "select-to-vectors" (to vectors was crashing anyway).

	* app/actions/select-commands.[ch]: removed
	select_from_vectors_cmd_callback(). Fixes code dupliction.

	* menus/image-menu.xml.in
	* menus/selection-editor-menu.xml: changed accordingly.
2004-06-03 09:47:05 +00:00
Michael Natterer 43cdd54dd1 reoedered to somehow reflect the class hierarchy.
2004-05-23  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-types.h: reoedered to somehow reflect the
	class hierarchy.

	Some dockable context handling cleanup:

	* app/widgets/gimpdocked.[ch]: removed "prev_context" parameter
	from GimpDocked::set_context(). Widgets which need the old context
	to disconnect from should remember it themselves.

	* app/widgets/gimpdockable.c (gimp_dockable_set_context): don't
	pass the old context to gimp_docked_set_context().
	Some cleanup.

	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainereditor.c: changed accordingly.

	* app/display/gimpnavigationview.[ch]
	* app/widgets/gimpimageeditor.[ch]
	* app/widgets/gimpitemtreeview.[ch]: added a "context" member
	which holds the context set by GimpDocked::set_context().

	* app/widgets/gimpdrawabletreeview.c: use the view's context
	instead of gimp_get_user_context().

	* app/widgets/gimpcoloreditor.[ch]: removed separate API to
	set the context because it implements the GimpDockedInterface.

	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimperrorconsole.c: pass "menu-factory",
	"menu-identifier" and "ui-path" to g_object_new() instead of
	calling gimp_editor_create_menu() later.

	Action cleanup partly related to the context stuff above:

	* app/actions/actions.c (action_data_get_gimp): get the Gimp from
	context->gimp, not gimage->gimp because gimage may be NULL.

	(action_data_get_context): changed to use the new context members
	added above.

	* app/actions/channels-actions.c (channels_actions_update): cleanup.

	* app/actions/edit-actions.c (edit_actions_update): fixed
	sensitivity of "edit-undo-clear".

	* app/actions/vectors-actions.c (vectors_actions_update): make
	"vectors-merge-visible" sensitive only if there is more than one
	GimpVectors in the image.

	* app/actions/colormap-editor-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/palette-editor-actions.c: added FG/BG color previews
	to actions which take colors from them. Changed code to be safe
	against "context" being NULL.

	* app/actions/drawable-commands.c:
	s/active_drawable/drawable/g. Makes the code more readable.

	* app/actions/select-commands.[ch]
	* app/actions/vectors-commands.[ch]: removed public stroke utility
	functions and other stuff which is not needed any more because
	dialog buttons invoke the correct actions now. Moved the
	functions' code to the resp. action callbacks.
2004-05-23 10:04:41 +00:00
Michael Natterer 2632cd8f64 app/actions/documents-actions.c app/actions/documents-commands.c
2004-05-12  Michael Natterer  <mitch@gimp.org>

	* app/actions/documents-actions.c
	* app/actions/documents-commands.c
	* app/actions/edit-actions.c
	* app/actions/edit-commands.[ch]
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/actions/select-commands.[ch]
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.[ch]: added tooltips for actions
	which are now used for dialog buttons, added callback
	implementations which formerly lived in various widgets, moved
	some actions around and did some general cleanups.

	* menus/image-menu.xml.in: s/edit-stroke/select-stroke/

	* menus/Makefile.am
	* menus/selection-editor-menu.xml: new popup menu.

	* app/menus/menus.c: register <SelectionEditor> and <UndoEditor>
	UI managers.

	* app/widgets/gimpeditor.[ch]: added construct properties
	"menu-factory", "menu-identifier", "ui-path" and "popup-data".
	Implement GObject::constructor() and create the UI manager
	if all needed properties were set. Enables creating action
	buttons at widget construction time because they need a
	UI manager.

	(gimp_editor_add_action_button): changed to take a va_list of
	"extended" actions which are invoked if the resp. button emits
	"extended_clicked". Store the actions and their modifier masks in
	a list attached to the button.

	* app/widgets/gimpcontainerview.c
	(gimp_container_view_item_selected): if the view has container
	*and* context, simply change the context and return.

	(gimp_container_view_context_changed): don't emit "select_item"
	manually but simply call gimp_container_view_select_item().

	(gimp_container_view_viewable_dropped): use
	gimp_container_view_item_selected() instead of changing the
	context directly.

	* app/widgets/gimpcontainereditor.c
	(gimp_container_editor_select_item): update the UI manager.

	* app/widgets/gimpdockable.c: don't try to fiddle with the
	dialog's menu if it doesn't have a ui_path (happens if the UI
	manager is just a collection of actions for the dialog buttons and
	has no menu registered).

	* app/widgets/gimpimageeditor.c: connect to the image's "flush"
	signal and update the UI manager in the callback.

	* app/widgets/gimpitemtreeview.c: use GimpEditor's construct
	properties to create the UI manager so GimpItemTreeView subclasses
	can have action buttons. Update the UI manager in
	gimp_item_tree_view_select_item().

	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpfontview.c
	* app/widgets/gimpimageview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptoolview.c: changed calls to
	gimp_editor_add_action_button() accordingly and removed some
	unneeded select_item() implementations.

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpvectorstreeview.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpselectioneditor.[ch]
	* app/widgets/gimpundoeditor.[ch]: use action buttons and removed
	lots of callbacks which went to the resp. action callbacks.

	* app/widgets/widgets-types.h: removed some now unneeded function
	prototypes.

	* app/gui/dialogs-constructors.c: changed (simplified) many dialog
	constructors accordingly.
2004-05-12 18:36:33 +00:00
Michael Natterer 8895917db2 renamed action "qmask-toggle" to "qmask-active" and added new action
2004-05-02  Michael Natterer  <mitch@gimp.org>

	* app/actions/qmask-actions.c: renamed action "qmask-toggle" to
	"qmask-active" and added new action "qmask-toggle" with a label
	and shortcut suited for the "Select" menu.

	* app/actions/select-actions.c: removed "select-toggle-qmask".

	* app/actions/select-commands.[ch]: removed callback
	select_toggle_quickmask_cmd_callback().

	* app/actions/channels-actions.c (channels_actions_update)
	* app/actions/vectors-actions.c (vectors_actions_update): handle
	"data" being both GimpDisplay and GimpDisplayShell so the actions
	can be used in the image menu.

	* menus/image-menu.xml.in: s/select-toggle-qmask/qmask-toggle/.

	* menus/qmask-menu.xml: s/qmask-toggle/qmask-active/.
2004-05-02 19:37:17 +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
Simon Budig 63177de7c4 new callbacks to convert the current vector to the selection.
2004-03-20  Simon Budig  <simon@gimp.org>

	* app/gui/select-commands.[ch]: new callbacks to convert the
	current vector to the selection.

	* app/gui/image-menu.c: hook it into the menu. Default shortcut
	is Shift+V.
2004-03-20 16:14:49 +00:00
Sven Neumann 1806e66f9b app/gui/menus.c added a menu entry that toggles the QuickMask state and
2002-08-27  Sven Neumann  <sven@gimp.org>

	* app/gui/menus.c
	* app/gui/select-commands.[ch]: added a menu entry that toggles
	the QuickMask state and bound Shift-Q to it (bug #86580).
2002-08-27 13:29:47 +00:00
Michael Natterer d26c26686e app/Makefile.am removed.
2001-06-26  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/color_transfer.[ch]: removed.

	* app/tools/Makefile.am
	* app/tools/gimpcolorbalancetool-transfer.[ch]: added.

	* app/tools/gimpcolorbalancetool.c: changed accordingly.

	* app/base/Makefile.am
	* app/base/tile-manager-crop.[ch]: formerly known as crop_buffer().

	* app/tools/gimptexttool.c: changed accordingly.

	* app/context_manager.[ch]: added the global clipboard and the
	named buffer list here.

	* app/app_procs.c: don't call color_transfer_init() and don't free
	the buffer stuff (done by the context manager now).

	* app/errorconsole.c: don't #include "gui/commands.h"

	* app/global_edit.[ch]: removed lots of stuff which is now done by
	gui/edit-commands.* or the new GimpBuffer object. The "paste
	named" dialog will go away and this file will be moved to core/
	soon.

	* app/image_new.c: no need to declare the global_buffer extern any
	more.

	* app/qmask.c: don't #include "global_edit.h"

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpbuffer.[ch]: new object (aka named buffer)

	* app/core/gimpcontext.[ch]: added a GimpBuffer attribute.

	* app/core/gimpimage.[ch]: one s/int/gboolean/.

	* app/core/gimppattern.c: hmm...

	* app/gui/commands.[ch]: split up in small files:

	* app/gui/Makefile.am
	* app/gui/edit-commands.[ch]
	* app/gui/file-commands.[ch]
	* app/gui/image-commands.[ch]
	* app/gui/select-commands.[ch]
	* app/gui/view-commands.[ch]: new files.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c: added the named buffer list & grid.

	* app/gui/file-new-dialog.[ch]
	* app/gui/menus.c
	* app/gui/palette-editor.c
	* app/gui/test-commands.c: changed accordingly.

	* app/pdb/edit_cmds.c
	* tools/pdbgen/pdb/edit.pdb: changed for the global_edit stuff.

	* app/widgets/Makefile.am
	* app/widgets/gimpbufferpreview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcontainereditor.[ch]: new widgets.

	* app/widgets/gimpcontainerview-utils.c
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimplayerlistview.c
	* app/widgets/gimppreview.c
	* app/widgets/widgets-types.h: changed accordingly for the new
	GimpBuffer object and it's views, misc. cleanups.

	* pixmaps/Makefile.am
	* pixmaps/paste-as-new.xpm
	* pixmaps/paste-into.xpm
	* pixmaps/paste.xpm: new pixmaps (they all look the same... Tigert? ;-)

	* po/POTFILES.in: added the new files.
2001-06-26 12:09:43 +00:00