removed GimpFillType.

2001-06-29  Michael Natterer  <mitch@gimp.org>

	* app/appenums.h: removed GimpFillType.

	* app/gimprc.c: parse the session-info's new "aux-info" field.

	* app/global_edit.[ch]: removed the old "Paste Named" dialog and
	prefixed all functions with "gimp_".

	* app/core/core-types.h: added GimpFillType.

	* app/core/gimpbrush.[ch]: new signal "spacing_changed".

	* app/gui/Makefile.am
	* app/gui/tools-commands.[ch]: one more file cut out of commands.[ch].

	* app/gui/commands.[ch]: removed the tools stuff here.

	* app/gui/brush-select.[ch]
	* app/gui/dialogs-constructors.c: use the new GimpBrushFactoryView
	(see below).

	* app/gui/dialogs-commands.[ch]
	* app/gui/menus.[ch]:

	- Made it 64bit safe again by passing the dialog factory's
	  identifiers as GQuarks, not as guints created by GPOINTER_TO_UINT().
	- Added a "gchar *quark_string" field to GimpItemFactoryEntry
	  which gets transformed into a GQuark by menus_create_item().
	- Added SEPARATOR() and BRANCH() macros which make the *_entries[]
	  arrays more readable.
	- Added a menu item to show/hide GimpImageDock's image menu.
	- Removed file_last_opened_cmd_callback().

	* app/gui/edit-commands.c: the global_edit functions are "gimp_"
	prefixed now.

	* app/gui/file-commands.[ch]: added file_last_opened_cmd_callback()
	here.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpbrushfactoryview.[ch]: new widget: a
	GimpDataFactory subclass with a "spacing" scale.

	* app/widgets/gimpcontainereditor.[ch]:

	- Connect to the GimpContainerView's "select_item",
	  "activate_item" and "context_item" signals here once instead of
	  in each subclass and dispatch them via new virtual functions.
	- Added a convenience function which makes DND to the buttons much
	  less painful for subclasses.

	* app/widgets/gimpbufferview.c
	* app/widgets/gimpdatafactoryview.[ch]: changed accordingly.

	* app/widgets/gimpdialogfactory.[ch]:

	- Added gimp_dialog_factory_dialog_raise() which can raise
	  toplevel dialogs _and_ dockables (and creates them if they are
	  not open yet).
	- Keep track of all created dialogs (not only toplevels).
	- Added an "aux_info" field to GimpSessionInfo which is a GList of
	  gchar* and is saved in sessionrc.
	- Remember if GimpImageDock's image menu is visible by using an
	  aux_info string.
	- The code did not become nicer with all those new constraints. I
	  have to add comments before I forget how it works.

	* app/widgets/gimpdockbook.c: set the state of the "Show Image Menu"
	menu item before popping up the item factory.

	* app/widgets/gimpimagedock.[ch]: added
	gimp_image_dock_set_show_image_meu().

	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/perl/examples/fit-text
	* plug-ins/perl/examples/terral_text
	* plug-ins/perl/examples/tex-to-float: register all text rendering
	plug-ins under <Image>/Filters/Text

	* app/pdb/brush_select_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/edit_cmds.c
	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/enums.pl
	* po/POTFILES.in: changed according to all the stuff above.
This commit is contained in:
Michael Natterer
2001-06-29 19:25:03 +00:00
committed by Michael Natterer
parent def2f7762b
commit d81b47ce70
71 changed files with 4072 additions and 3217 deletions

View File

@ -20,143 +20,37 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "core/core-types.h"
#include "tools/tools-types.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimptoolinfo.h"
#include "tools/gimptool.h"
#include "tools/tool_manager.h"
#include "commands.h"
#include "layer-select.h"
#include "app_procs.h"
#include "context_manager.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "image_render.h"
#include "plug_in.h"
#include "undo.h"
#include "libgimp/gimpintl.h"
#define return_if_no_display(gdisp) \
gdisp = gdisplay_active (); \
if (!gdisp) return
/***** Tools *****/
void
tools_default_colors_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
gimp_context_set_default_colors (gimp_context_get_user ());
}
void
tools_swap_colors_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
gimp_context_swap_colors (gimp_context_get_user ());
}
void
tools_swap_contexts_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
static GimpContext *swap_context = NULL;
static GimpContext *temp_context = NULL;
if (! swap_context)
{
swap_context = gimp_context_new ("Swap Context",
gimp_context_get_user ());
temp_context = gimp_context_new ("Temp Context", NULL);
}
gimp_context_copy_args (gimp_context_get_user (),
temp_context,
GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (swap_context,
gimp_context_get_user (),
GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (temp_context,
swap_context,
GIMP_CONTEXT_ALL_ARGS_MASK);
}
void
tools_select_cmd_callback (GtkWidget *widget,
gpointer callback_data,
guint callback_action)
{
GtkType tool_type;
GimpToolInfo *tool_info;
GDisplay *gdisp;
tool_type = callback_action;
tool_info = tool_manager_get_info_by_type (tool_type);
gdisp = gdisplay_active ();
gimp_context_set_tool (gimp_context_get_user (), tool_info);
#ifdef __GNUC__
#warning FIXME (let the tool manager to this stuff)
#endif
/* Paranoia */
active_tool->drawable = NULL;
/* Complete the initialisation by doing the same stuff
* tools_initialize() does after it did what tools_select() does
*/
if (GIMP_TOOL_CLASS (GTK_OBJECT (active_tool)->klass)->initialize)
{
gimp_tool_initialize (active_tool, gdisp);
active_tool->drawable = gimp_image_active_drawable (gdisp->gimage);
}
/* setting the tool->gdisp here is a HACK to allow the tools'
* dialog windows being hidden if the tool was selected from
* a tear-off-menu and there was no mouse click in the display
* before deleting it
*/
active_tool->gdisp = gdisp;
}
/***** Filters *****/
void
filters_repeat_cmd_callback (GtkWidget *widget,
gpointer callback_data,
guint callback_action)
gpointer data,
guint action)
{
plug_in_repeat (callback_action);
plug_in_repeat ((gboolean) action);
}
/***** Help *****/
void
help_help_cmd_callback (GtkWidget *widget,
gpointer client_data)
gpointer data)
{
gimp_standard_help_func (NULL);
}
void
help_context_help_cmd_callback (GtkWidget *widget,
gpointer client_data)
gpointer data)
{
gimp_context_help ();
}