added a GimpContainer of tool options presets.

2003-09-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimptoolinfo.[ch]: added a GimpContainer of tool
	options presets.

	* app/core/gimptooloptions.[ch] (gimp_tool_options_set_property):
	silently accept setting the *same* tool_info again.

	(gimp_tool_options_build_filename): is public now.

	* app/tools/gimp-tools.c (gimp_tools_restore,save): load and save
	the presets container.

	* app/gui/tool-options-dialog.[ch]: removed.

	* app/gui/tool-options-commands.[ch]
	* app/gui/tool-options-menu.[ch]: new files implementing a menu
	for the new GimpToolOptionsEditor widget. Has submenus for saving,
	loading, and deleting tool options to/from the
	tool_info->options_presets container.

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

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimptooloptionseditor.[ch]: the tool options dialog
	as proper widget. The "Load" and "Save" buttons still do the same
	stuff as before. Will make them use the new presets since making
	them do something useful was the reason for this whole change.

	* app/widgets/gimphelp-ids.h: added missing help IDs for the tool
	options dialog.
This commit is contained in:
Michael Natterer
2003-09-29 20:26:09 +00:00
committed by Michael Natterer
parent 017d183968
commit d1ba870458
25 changed files with 1395 additions and 510 deletions

View File

@ -0,0 +1,43 @@
/* 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 __TOOL_OPTIONS_COMMANDS_H__
#define __TOOL_OPTIONS_COMMANDS_H__
void tool_options_save_to_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void tool_options_save_new_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void tool_options_restore_from_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void tool_options_delete_saved_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void tool_options_reset_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void tool_options_reset_all_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
#endif /* __TOOL_OPTIONS_COMMANDS_H__ */