Commit d26c2668 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent 76389b3c
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-25 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/burn-in-anim.scm: added Burn-In script
......
......@@ -98,8 +98,6 @@ gimp_SOURCES = @STRIP_BEGIN@ \
apptypes.h \
batch.c \
batch.h \
color_transfer.c \
color_transfer.h \
context_manager.c \
context_manager.h \
drawable.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 "libgimpwidgets/gimpwidgets.h"
#include "core/core-types.h"
#include "tools/tools-types.h"
#include "core/gimpbuffer.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "tools/tool_manager.h"
#include "edit-commands.h"
#include "context_manager.h"
#include "gdisplay.h"
#include "global_edit.h"
#include "undo.h"
#include "libgimp/gimpintl.h"
#define return_if_no_display(gdisp) \
gdisp = gdisplay_active (); \
if (!gdisp) return
/* local function prototypes */
static void cut_named_buffer_callback (GtkWidget *widget,
gchar *name,
gpointer data);
static void copy_named_buffer_callback (GtkWidget *widget,
gchar *name,
gpointer data);
/* public functions */
void
edit_undo_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
undo_pop (gdisp->gimage);
}
void
edit_redo_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
undo_redo (gdisp->gimage);
}
void
edit_cut_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
/* stop any active tool */
tool_manager_control_active (HALT, gdisp);
if (edit_cut (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage)))
{
gdisplays_flush ();
}
}
void
edit_copy_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
edit_copy (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage));
}
void
edit_paste_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
if (global_buffer)
{
/* stop any active tool */
tool_manager_control_active (HALT, gdisp);
if (edit_paste (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage),
global_buffer,
FALSE))
{
gdisplays_update_title (gdisp->gimage);
gdisplays_flush ();
}
}
}
void
edit_paste_into_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
if (global_buffer)
{
/* stop any active tool */
tool_manager_control_active (HALT, gdisp);
if (edit_paste (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage),
global_buffer,
TRUE))
{
gdisplays_update_title (gdisp->gimage);
gdisplays_flush ();
}
}
}
void
edit_paste_as_new_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
if (global_buffer)
{
/* stop any active tool */
tool_manager_control_active (HALT, gdisp);
edit_paste_as_new (gdisp->gimage,
global_buffer);
}
}
void
edit_named_cut_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
GtkWidget *qbox;
return_if_no_display (gdisp);
/* stop any active tool */
tool_manager_control_active (HALT, gdisp);
qbox = gimp_query_string_box (_("Cut Named"),
gimp_standard_help_func,
"dialogs/cut_named.html",
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
cut_named_buffer_callback, gdisp->gimage);
gtk_widget_show (qbox);
}
void
edit_named_copy_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
GtkWidget *qbox;
return_if_no_display (gdisp);
qbox = gimp_query_string_box (_("Copy Named"),
gimp_standard_help_func,
"dialogs/copy_named.html",
_("Enter a name for this buffer"),
NULL,
GTK_OBJECT (gdisp->gimage), "destroy",
copy_named_buffer_callback, gdisp->gimage);
gtk_widget_show (qbox);
}
void
edit_named_paste_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
named_edit_paste (gdisp->gimage);
}
void
edit_clear_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
edit_clear (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage));
gdisplays_flush ();
}
void
edit_fill_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpFillType fill_type;
GDisplay *gdisp;
return_if_no_display (gdisp);
fill_type = (GimpFillType) action;
edit_fill (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage),
fill_type);
gdisplays_flush ();
}
void
edit_stroke_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
gimage_mask_stroke (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage));
gdisplays_flush ();
}
/* private functions */
static void
cut_named_buffer_callback (GtkWidget *widget,
gchar *name,
gpointer data)
{
TileManager *new_tiles;
GimpImage *gimage;
gimage = (GimpImage *) data;
new_tiles = edit_cut (gimage, gimp_image_active_drawable (gimage));
if (new_tiles)
{
GimpBuffer *buffer;
buffer = gimp_buffer_new (new_tiles, name);
gimp_container_add (named_buffers, GIMP_OBJECT (buffer));
}
gdisplays_flush ();
}
static void
copy_named_buffer_callback (GtkWidget *widget,
gchar *name,
gpointer data)
{
TileManager *new_tiles;
GimpImage *gimage;
gimage = (GimpImage *) data;
new_tiles = edit_copy (gimage, gimp_image_active_drawable (gimage));
if (new_tiles)
{
GimpBuffer *buffer;
buffer = gimp_buffer_new (new_tiles, name);
gimp_container_add (named_buffers, GIMP_OBJECT (buffer));
}
}
/* 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.
*/
#ifndef __EDIT_COMMANDS_H__
#define __EDIT_COMMANDS_H__
void edit_undo_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_redo_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_cut_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_copy_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_paste_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_paste_into_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_paste_as_new_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_named_cut_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_named_copy_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_named_paste_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_clear_cmd_callback (GtkWidget *widget,
gpointer data);
void edit_fill_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void edit_stroke_cmd_callback (GtkWidget *widget,
gpointer data);
#endif /* __EDIT_COMMANDS_H__ */
/* 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 "core/core-types.h"
#include "file-commands.h"
#include "file-new-dialog.h"
#include "file-open-dialog.h"
#include "file-save-dialog.h"
#include "app_procs.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "image_new.h"
#include "libgimp/gimpintl.h"
#define return_if_no_display(gdisp) \
gdisp = gdisplay_active (); \
if (!gdisp) return
void
file_new_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GDisplay *gdisp;
GimpImage *image = NULL;
/* Before we try to determine the responsible gdisplay,
* make sure this wasn't called from the toolbox
*/
if (action)
{
gdisp = gdisplay_active ();
if (gdisp)
image = gdisp->gimage;
}
image_new_create_window (NULL, image);
}
void
file_open_cmd_callback (GtkWidget *widget,
gpointer data)
{
file_open_callback (widget, data);
}
void
file_save_cmd_callback (GtkWidget *widget,
gpointer data)
{
file_save_callback (widget, data);
}
void
file_save_as_cmd_callback (GtkWidget *widget,
gpointer data)
{
file_save_as_callback (widget, data);
}
void
file_save_a_copy_as_cmd_callback (GtkWidget *widget,
gpointer data)
{
file_save_a_copy_as_callback (widget, data);
}
void
file_revert_cmd_callback (GtkWidget *widget,
gpointer data)
{
file_revert_callback (widget, data);
}
void
file_close_cmd_callback (GtkWidget *widget,
gpointer data)
{
GDisplay *gdisp;
return_if_no_display (gdisp);
gdisplay_close_window (gdisp, FALSE);
}
void
file_quit_cmd_callback (GtkWidget *widget,
gpointer data)
{
app_exit (FALSE);
}
/* 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.
*/
#ifndef __FILE_COMMANDS_H__
#define __FILE_COMMANDS_H__
void file_new_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void file_open_cmd_callback (GtkWidget *widget,
gpointer data);
void file_save_cmd_callback (GtkWidget *widget,
gpointer data);
void file_save_as_cmd_callback (GtkWidget *widget,
gpointer data);
void file_save_a_copy_as_cmd_callback (GtkWidget *widget,
gpointer data);
void file_revert_cmd_callback (GtkWidget *widget,
gpointer data);
void file_pref_cmd_callback (GtkWidget *widget,
gpointer data);
void file_close_cmd_callback (GtkWidget *widget,
gpointer data);
void file_quit_cmd_callback (GtkWidget *widget,
gpointer data);
#endif /* __FILE_COMMANDS_H__ */
This diff is collapsed.
......@@ -20,89 +20,24 @@
#define __COMMANDS_H__
void file_new_cmd_callback (GtkWidget *, gpointer, guint);
void file_open_cmd_callback (GtkWidget *, gpointer);
void file_save_cmd_callback (GtkWidget *, gpointer);
void file_save_as_cmd_callback (GtkWidget *, gpointer);
void file_save_a_copy_as_cmd_callback (GtkWidget *, gpointer);
void file_revert_cmd_callback (GtkWidget *, gpointer);
void file_pref_cmd_callback (GtkWidget *, gpointer);
void file_close_cmd_callback (GtkWidget *, gpointer);
void file_quit_cmd_callback (GtkWidget *, gpointer);
void edit_undo_cmd_callback (GtkWidget *, gpointer);
void edit_redo_cmd_callback (GtkWidget *, gpointer);
void edit_cut_cmd_callback (GtkWidget *, gpointer);
void edit_copy_cmd_callback (GtkWidget *, gpointer);
void edit_paste_cmd_callback (GtkWidget *, gpointer);
void edit_paste_into_cmd_callback (GtkWidget *, gpointer);
void edit_paste_as_new_cmd_callback (GtkWidget *, gpointer);
void edit_named_cut_cmd_callback (GtkWidget *, gpointer);
void edit_named_copy_cmd_callback (GtkWidget *, gpointer);
void edit_named_paste_cmd_callback (GtkWidget *, gpointer);
void edit_clear_cmd_callback (GtkWidget *, gpointer);
void edit_fill_cmd_callback (GtkWidget *widget,
gpointer callback_data,
guint callback_action);
void edit_stroke_cmd_callback (GtkWidget *, gpointer);
void select_invert_cmd_callback (GtkWidget *, gpointer);
void select_all_cmd_callback (GtkWidget *, gpointer);
void select_none_cmd_callback (GtkWidget *, gpointer);
void select_float_cmd_callback (GtkWidget *, gpointer);
void select_feather_cmd_callback (GtkWidget *, gpointer);
void select_sharpen_cmd_callback (GtkWidget *, gpointer);
void select_shrink_cmd_callback (GtkWidget *, gpointer);
void select_border_cmd_callback (GtkWidget *, gpointer);
void select_grow_cmd_callback (GtkWidget *, gpointer);
void select_save_cmd_callback (GtkWidget *, gpointer);
void view_zoomin_cmd_callback (GtkWidget *, gpointer);
void view_zoomout_cmd_callback (GtkWidget *, gpointer);
void view_zoom_16_1_cmd_callback (GtkWidget *, gpointer);
void view_zoom_8_1_cmd_callback (GtkWidget *, gpointer);
void view_zoom_4_1_cmd_callback (GtkWidget *, gpointer);
void view_zoom_2_1_cmd_callback (GtkWidget *, gpointer);
void view_zoom_1_1_cmd_callback (GtkWidget *, gpointer);
void view_zoom_1_2_cmd_callback (GtkWidget *, gpointer);
void view_zoom_1_4_cmd_callback (GtkWidget *, gpointer);
void view_zoom_1_8_cmd_callback (GtkWidget *, gpointer);
void view_zoom_1_16_cmd_callback (GtkWidget *, gpointer);
void view_dot_for_dot_cmd_callback (GtkWidget *, gpointer);
void view_info_window_cmd_callback (GtkWidget *, gpointer);
void view_nav_window_cmd_callback (GtkWidget *, gpointer);
void view_toggle_selection_cmd_callback (GtkWidget *, gpointer);
void view_toggle_rulers_cmd_callback (GtkWidget *, gpointer);
void view_toggle_statusbar_cmd_callback (GtkWidget *, gpointer);
void view_toggle_guides_cmd_callback (GtkWidget *, gpointer);
void view_snap_to_guides_cmd_callback (GtkWidget *, gpointer);
void view_new_view_cmd_callback (GtkWidget *, gpointer);
void view_shrink_wrap_cmd_callback (GtkWidget *, gpointer);
void image_convert_rgb_cmd_callback (GtkWidget *, gpointer);
void image_convert_grayscale_cmd_callback (GtkWidget *, gpointer);
void image_convert_indexed_cmd_callback (GtkWidget *, gpointer);
void image_desaturate_cmd_callback (GtkWidget *, gpointer);
void image_invert_cmd_callback (GtkWidget *, gpointer);
void image_equalize_cmd_callback (GtkWidget *, gpointer);
void image_offset_cmd_callback (GtkWidget *, gpointer);
void image_resize_cmd_callback (GtkWidget *, gpointer);
void image_scale_cmd_callback (GtkWidget *, gpointer);
void image_duplicate_cmd_callback (GtkWidget *, gpointer);