mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 04:51:44 +00:00
37354a9248
2005-09-04 Michael Natterer <mitch@gimp.org> Cleaned up and fixed the order in which default tool options and user context values are initialized, and added loading / saving of the global user context. Fixes bug #165078. * app/core/Makefile.am * app/core/gimp-contexts.[ch]: new files which manage the global contexts. Contains gimp_contexts_init/exit/load/save/clear(). * app/core/gimp.c: use the new init/exit functions instead of implementing the stuff here. * app/tools/gimp-tools.c: load/save/clear the user context from here so it follows the same logic as the tool options. Reset all tool options before loading the user context and copy the user context's property to all tool options before loading tool options. * app/core/gimptoolinfo.c (gimp_tool_info_new): don't initialize the tool options with the users context's properties. It's way too early here and they will be overwritten later. * app/widgets/gimpdevices.c (gimp_devices_restore): initialize all device contexts with the user context's properties before loading the devices and copying the active one back to the user context.
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* gimp-contexts.h
|
|
*
|
|
* 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 __GIMP_CONTEXTS_H__
|
|
#define __GIMP_CONTEXTS_H__
|
|
|
|
|
|
void gimp_contexts_init (Gimp *gimp);
|
|
void gimp_contexts_exit (Gimp *gimp);
|
|
|
|
void gimp_contexts_load (Gimp *gimp);
|
|
void gimp_contexts_save (Gimp *gimp);
|
|
|
|
gboolean gimp_contexts_clear (Gimp *gimp,
|
|
GError **error);
|
|
|
|
|
|
#endif /* __GIMP_CONTEXTS_H__ */
|