Files
gimp/app/actions/help-commands.c
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

163 lines
4.0 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#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)
{
plug_in_repeat (callback_action);
}
/***** Help *****/
void
help_help_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
gimp_standard_help_func (NULL);
}
void
help_context_help_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
gimp_context_help ();
}