mirror of https://github.com/GNOME/gimp.git
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org> * app/app_procs.[ch]: removed the gimp_busy boolean, check whether user_installation is needed here, not in user_install.c, parse gtkrc an friends only if(!no_interface), create the Gimp object before parsing gimp's rc files an pas it to the parse functions, many other cleanups. * app/appenums.h: added MessageHandlerType and StackTraceMode. * app/appenv.h: removed MessageHandlerType, declare all global variables from main.c (no more hidden global stuff please). * app/errors.[ch]: added the fatal message func here (from main.c), removed the StackTraceMode enum. * app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp pointer to some functions. * app/gimpunit.c * app/unitrc.h: ok, this is ugly: renamed all functions to _gimp_unit_*() and made them public. The unit list is part of the Gimp object now, so pass a Gimp* to all functions. * app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*() functions which are used by widgets. * app/main.c: cleaned up the global variables, removed the fatal message handler, call app_init() directly, not via the user_install stuff, misc. cleanups. * app/user_install.[ch]: removed the check if user_installation is needed (done by app_procs.c now). * app/core/gimp.[ch]: added the user_unit list and the "busy" boolean. Moved gimp_[set|unset]_busy() here. Added gimp_initialize() which is called after unitrc and gimprc are parsed. * app/batch.c * app/colormaps.c * app/devices.c * app/disp_callbacks.c * app/gdisplay_ops.c * app/gimphelp.c * app/module_db.c * app/nav_window.c * app/plug_in.c * app/core/gimpcontext.c * app/core/gimpdatafiles.c * app/core/gimpimage-convert.c * app/core/gimpimage-duplicate.c * app/core/gimpimage.c * app/core/gimpparasite.c * app/core/gimpparasitelist.h * app/gui/file-open-dialog.c * app/gui/gui.[ch] * app/gui/info-dialog.c * app/gui/info-window.c * app/gui/preferences-dialog.c * app/gui/session.c * app/gui/tips-dialog.c * app/gui/toolbox.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimptransformtool.c * app/tools/tool_manager.c * app/widgets/gimpcolorpanel.c * app/widgets/gimpcursor.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/xcf/xcf.c * tools/pdbgen/Makefile.am * tools/pdbgen/app.pl * tools/pdbgen/enums.pl * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/unit.pdb * app/pdb/image_cmds.c * app/pdb/message_cmds.c * app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
This commit is contained in:
parent
d7fde9e68d
commit
9d87e554de
84
ChangeLog
84
ChangeLog
|
@ -1,3 +1,87 @@
|
|||
2001-07-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
|
||||
user_installation is needed here, not in user_install.c, parse
|
||||
gtkrc an friends only if(!no_interface), create the Gimp object
|
||||
before parsing gimp's rc files an pas it to the parse functions,
|
||||
many other cleanups.
|
||||
|
||||
* app/appenums.h: added MessageHandlerType and StackTraceMode.
|
||||
|
||||
* app/appenv.h: removed MessageHandlerType, declare all global
|
||||
variables from main.c (no more hidden global stuff please).
|
||||
|
||||
* app/errors.[ch]: added the fatal message func here (from main.c),
|
||||
removed the StackTraceMode enum.
|
||||
|
||||
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
|
||||
pointer to some functions.
|
||||
|
||||
* app/gimpunit.c
|
||||
* app/unitrc.h: ok, this is ugly: renamed all functions to
|
||||
_gimp_unit_*() and made them public. The unit list is part
|
||||
of the Gimp object now, so pass a Gimp* to all functions.
|
||||
|
||||
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
|
||||
functions which are used by widgets.
|
||||
|
||||
* app/main.c: cleaned up the global variables, removed the fatal
|
||||
message handler, call app_init() directly, not via the
|
||||
user_install stuff, misc. cleanups.
|
||||
|
||||
* app/user_install.[ch]: removed the check if user_installation is
|
||||
needed (done by app_procs.c now).
|
||||
|
||||
* app/core/gimp.[ch]: added the user_unit list and the "busy"
|
||||
boolean. Moved gimp_[set|unset]_busy() here. Added
|
||||
gimp_initialize() which is called after unitrc and gimprc are
|
||||
parsed.
|
||||
|
||||
* app/batch.c
|
||||
* app/colormaps.c
|
||||
* app/devices.c
|
||||
* app/disp_callbacks.c
|
||||
* app/gdisplay_ops.c
|
||||
* app/gimphelp.c
|
||||
* app/module_db.c
|
||||
* app/nav_window.c
|
||||
* app/plug_in.c
|
||||
* app/core/gimpcontext.c
|
||||
* app/core/gimpdatafiles.c
|
||||
* app/core/gimpimage-convert.c
|
||||
* app/core/gimpimage-duplicate.c
|
||||
* app/core/gimpimage.c
|
||||
* app/core/gimpparasite.c
|
||||
* app/core/gimpparasitelist.h
|
||||
* app/gui/file-open-dialog.c
|
||||
* app/gui/gui.[ch]
|
||||
* app/gui/info-dialog.c
|
||||
* app/gui/info-window.c
|
||||
* app/gui/preferences-dialog.c
|
||||
* app/gui/session.c
|
||||
* app/gui/tips-dialog.c
|
||||
* app/gui/toolbox.c
|
||||
* app/tools/gimpblendtool.c
|
||||
* app/tools/gimpbucketfilltool.c
|
||||
* app/tools/gimpcolorpickertool.c
|
||||
* app/tools/gimpfuzzyselecttool.c
|
||||
* app/tools/gimptransformtool.c
|
||||
* app/tools/tool_manager.c
|
||||
* app/widgets/gimpcolorpanel.c
|
||||
* app/widgets/gimpcursor.c
|
||||
* app/xcf/xcf-load.c
|
||||
* app/xcf/xcf-save.c
|
||||
* app/xcf/xcf.c
|
||||
* tools/pdbgen/Makefile.am
|
||||
* tools/pdbgen/app.pl
|
||||
* tools/pdbgen/enums.pl
|
||||
* tools/pdbgen/pdb/image.pdb
|
||||
* tools/pdbgen/pdb/message.pdb
|
||||
* tools/pdbgen/pdb/unit.pdb
|
||||
* app/pdb/image_cmds.c
|
||||
* app/pdb/message_cmds.c
|
||||
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
|
||||
|
||||
2001-07-09 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
183
app/app_procs.c
183
app/app_procs.c
|
@ -23,6 +23,11 @@
|
|||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@ -42,7 +47,6 @@
|
|||
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "gui/color-notebook.h"
|
||||
#include "gui/file-open-dialog.h"
|
||||
#include "gui/gui.h"
|
||||
#include "gui/splash.h"
|
||||
|
@ -51,16 +55,15 @@
|
|||
#include "app_procs.h"
|
||||
#include "batch.h"
|
||||
#include "colormaps.h"
|
||||
#include "docindex.h"
|
||||
#include "errors.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gdisplay_ops.h"
|
||||
#include "gimprc.h"
|
||||
#include "plug_in.h"
|
||||
#include "module_db.h"
|
||||
|
||||
#include "plug_in.h"
|
||||
#include "undo.h"
|
||||
#include "unitrc.h"
|
||||
#include "errors.h"
|
||||
#include "docindex.h"
|
||||
#include "user_install.h"
|
||||
|
||||
#ifdef DISPLAY_FILTERS
|
||||
#include "gdisplay_color.h"
|
||||
|
@ -72,9 +75,6 @@
|
|||
Gimp *the_gimp = NULL;
|
||||
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
gboolean gimp_busy = FALSE;
|
||||
|
||||
static gboolean is_app_exit_finish_done = FALSE;
|
||||
|
||||
|
||||
|
@ -89,38 +89,77 @@ app_init_update_status (const gchar *text1,
|
|||
}
|
||||
}
|
||||
|
||||
/* #define RESET_BAR() app_init_update_status("", "", 0) */
|
||||
#define RESET_BAR()
|
||||
|
||||
void
|
||||
app_init (gint gimp_argc,
|
||||
gchar **gimp_argv)
|
||||
{
|
||||
const gchar *gtkrc;
|
||||
gchar *filename;
|
||||
const gchar *gimp_dir;
|
||||
struct stat stat_buf;
|
||||
|
||||
/* parse the systemwide gtkrc */
|
||||
gtkrc = gimp_gtkrc ();
|
||||
/* Create an instance of the "Gimp" object which is the root of the
|
||||
* core object system
|
||||
*/
|
||||
the_gimp = gimp_new ();
|
||||
|
||||
if (be_verbose)
|
||||
g_print (_("parsing \"%s\"\n"), gtkrc);
|
||||
gtk_object_ref (GTK_OBJECT (the_gimp));
|
||||
gtk_object_sink (GTK_OBJECT (the_gimp));
|
||||
|
||||
gtk_rc_parse (gtkrc);
|
||||
/* Check if the usesr's gimp_directory exists
|
||||
*/
|
||||
gimp_dir = gimp_directory ();
|
||||
|
||||
/* parse the user gtkrc */
|
||||
filename = gimp_personal_rc_file ("gtkrc");
|
||||
|
||||
if (be_verbose)
|
||||
g_print (_("parsing \"%s\"\n"), filename);
|
||||
|
||||
gtk_rc_parse (filename);
|
||||
|
||||
g_free (filename);
|
||||
|
||||
if (gimprc_init ())
|
||||
if (stat (gimp_dir, &stat_buf) != 0)
|
||||
{
|
||||
parse_unitrc (); /* this needs to be done before gimprc loading */
|
||||
parse_gimprc (); /* parse the local GIMP configuration file */
|
||||
/* not properly installed */
|
||||
|
||||
if (no_interface)
|
||||
{
|
||||
g_print (_("The GIMP is not properly installed for the current user\n"));
|
||||
g_print (_("User installation was skipped because the '--nointerface' flag was encountered\n"));
|
||||
g_print (_("To perform user installation, run the GIMP without the '--nointerface' flag\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
user_install_dialog_create (the_gimp);
|
||||
|
||||
gtk_main ();
|
||||
}
|
||||
}
|
||||
|
||||
if (! no_interface)
|
||||
{
|
||||
const gchar *gtkrc;
|
||||
gchar *filename;
|
||||
|
||||
/* parse the systemwide gtkrc */
|
||||
gtkrc = gimp_gtkrc ();
|
||||
|
||||
if (be_verbose)
|
||||
g_print (_("parsing \"%s\"\n"), gtkrc);
|
||||
|
||||
gtk_rc_parse (gtkrc);
|
||||
|
||||
/* parse the user gtkrc */
|
||||
filename = gimp_personal_rc_file ("gtkrc");
|
||||
|
||||
if (be_verbose)
|
||||
g_print (_("parsing \"%s\"\n"), filename);
|
||||
|
||||
gtk_rc_parse (filename);
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
/* The user_install dialog may have parsed unitrc and gimprc, so
|
||||
* check gimprc_init()'s return value
|
||||
*/
|
||||
if (gimprc_init (the_gimp))
|
||||
{
|
||||
/* this needs to be done before gimprc loading */
|
||||
gimp_unitrc_load (the_gimp);
|
||||
|
||||
/* parse the local GIMP configuration file */
|
||||
gimprc_parse (the_gimp);
|
||||
}
|
||||
|
||||
if (! no_interface)
|
||||
|
@ -134,13 +173,10 @@ app_init (gint gimp_argc,
|
|||
/* initialize lowlevel stuff */
|
||||
base_init ();
|
||||
|
||||
/* Create an instance of the "Gimp" object which is the root of the
|
||||
* core object system
|
||||
/* Create all members of the global Gimp instance which need an already
|
||||
* parsed gimprc, e.g. the data factories
|
||||
*/
|
||||
the_gimp = gimp_new ();
|
||||
|
||||
gtk_object_ref (GTK_OBJECT (the_gimp));
|
||||
gtk_object_sink (GTK_OBJECT (the_gimp));
|
||||
gimp_initialize (the_gimp);
|
||||
|
||||
tool_manager_init (the_gimp);
|
||||
|
||||
|
@ -155,27 +191,25 @@ app_init (gint gimp_argc,
|
|||
color_display_init ();
|
||||
#endif /* DISPLAY_FILTERS */
|
||||
|
||||
RESET_BAR();
|
||||
if (gimprc.always_restore_session)
|
||||
restore_session = TRUE;
|
||||
/* Initialize the xcf file format routines
|
||||
*/
|
||||
xcf_init (the_gimp);
|
||||
|
||||
/* Now we are ready to draw the splash-screen-image to the start-up window */
|
||||
/* Now we are ready to draw the splash-screen-image
|
||||
* to the start-up window
|
||||
*/
|
||||
if (! no_interface && ! no_splash_image)
|
||||
{
|
||||
splash_logo_load ();
|
||||
}
|
||||
|
||||
RESET_BAR();
|
||||
xcf_init (the_gimp); /* initialize the xcf file format routines */
|
||||
|
||||
/* load all data files */
|
||||
gimp_restore (the_gimp);
|
||||
/* Load all data files
|
||||
*/
|
||||
gimp_restore (the_gimp, no_data);
|
||||
|
||||
plug_in_init (); /* initialize the plug in structures */
|
||||
module_db_init (); /* load any modules we need */
|
||||
|
||||
RESET_BAR();
|
||||
|
||||
if (! no_interface)
|
||||
{
|
||||
if (! no_splash)
|
||||
|
@ -185,14 +219,12 @@ app_init (gint gimp_argc,
|
|||
|
||||
/* FIXME: This needs to go in preferences */
|
||||
message_handler = MESSAGE_BOX;
|
||||
}
|
||||
|
||||
if (! no_interface)
|
||||
{
|
||||
gui_restore (the_gimp);
|
||||
}
|
||||
|
||||
/* Parse the rest of the command line arguments as images to load */
|
||||
/* Parse the rest of the command line arguments as images to load
|
||||
*/
|
||||
if (gimp_argc > 0)
|
||||
while (gimp_argc--)
|
||||
{
|
||||
|
@ -235,9 +267,7 @@ app_exit_finish (void)
|
|||
}
|
||||
|
||||
module_db_free ();
|
||||
gdisplays_delete ();
|
||||
plug_in_kill ();
|
||||
save_unitrc ();
|
||||
|
||||
tool_manager_exit (the_gimp);
|
||||
|
||||
|
@ -266,46 +296,3 @@ app_exit_finish_done (void)
|
|||
{
|
||||
return is_app_exit_finish_done;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_busy (void)
|
||||
{
|
||||
/* FIXME: gimp_busy HACK */
|
||||
gimp_busy = TRUE;
|
||||
|
||||
gui_set_busy (the_gimp);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_idle_unset_busy (gpointer data)
|
||||
{
|
||||
gimp_unset_busy ();
|
||||
|
||||
*((guint *) data) = 0;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_busy_until_idle (void)
|
||||
{
|
||||
static guint busy_idle_id = 0;
|
||||
|
||||
if (! busy_idle_id)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
|
||||
busy_idle_id = g_idle_add_full (G_PRIORITY_HIGH,
|
||||
gimp_idle_unset_busy, &busy_idle_id,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_unset_busy (void)
|
||||
{
|
||||
gui_unset_busy (the_gimp);
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
gimp_busy = FALSE;
|
||||
}
|
||||
|
|
|
@ -26,19 +26,15 @@
|
|||
extern Gimp *the_gimp;
|
||||
|
||||
|
||||
void app_init_update_status (const gchar *label1,
|
||||
const gchar *label2,
|
||||
gdouble percentage);
|
||||
void app_init_update_status (const gchar *label1,
|
||||
const gchar *label2,
|
||||
gdouble percentage);
|
||||
|
||||
void app_init (gint gimp_argc,
|
||||
gchar **gimp_argv);
|
||||
void app_exit (gboolean kill_it);
|
||||
void app_exit_finish (void);
|
||||
gboolean app_exit_finish_done (void);
|
||||
|
||||
void gimp_set_busy (void);
|
||||
void gimp_set_busy_until_idle (void);
|
||||
void gimp_unset_busy (void);
|
||||
void app_init (gint gimp_argc,
|
||||
gchar **gimp_argv);
|
||||
void app_exit (gboolean kill_it);
|
||||
void app_exit_finish (void);
|
||||
gboolean app_exit_finish_done (void);
|
||||
|
||||
|
||||
#endif /* __APP_PROCS_H__ */
|
||||
|
|
|
@ -20,6 +20,20 @@
|
|||
#define __APPENUMS_H__
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MESSAGE_BOX,
|
||||
CONSOLE,
|
||||
ERROR_CONSOLE
|
||||
} MessageHandlerType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STACK_TRACE_NEVER,
|
||||
STACK_TRACE_QUERY,
|
||||
STACK_TRACE_ALWAYS
|
||||
} StackTraceMode;
|
||||
|
||||
/* Brush application types */
|
||||
typedef enum
|
||||
{
|
||||
|
|
39
app/appenv.h
39
app/appenv.h
|
@ -20,28 +20,25 @@
|
|||
#define __APPENV_H__
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MESSAGE_BOX,
|
||||
CONSOLE,
|
||||
ERROR_CONSOLE
|
||||
} MessageHandlerType;
|
||||
/* command line options */
|
||||
extern gboolean no_interface;
|
||||
extern gboolean no_splash;
|
||||
extern gboolean no_splash_image;
|
||||
extern gboolean no_data;
|
||||
extern gboolean be_verbose;
|
||||
extern gboolean use_debug_handler;
|
||||
extern gboolean console_messages;
|
||||
extern gboolean restore_session;
|
||||
extern StackTraceMode stack_trace_mode;
|
||||
extern gchar *alternate_gimprc;
|
||||
extern gchar *alternate_system_gimprc;
|
||||
extern gchar **batch_cmds;
|
||||
|
||||
|
||||
extern gboolean no_interface;
|
||||
extern gboolean no_splash;
|
||||
extern gboolean no_splash_image;
|
||||
extern gboolean no_data;
|
||||
extern gboolean be_verbose;
|
||||
extern gboolean use_debug_handler;
|
||||
extern gboolean console_messages;
|
||||
extern gboolean restore_session;
|
||||
extern gboolean double_speed;
|
||||
|
||||
extern MessageHandlerType message_handler;
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
extern gboolean gimp_busy;
|
||||
/* other global variables */
|
||||
extern gchar *prog_name;
|
||||
extern MessageHandlerType message_handler;
|
||||
extern gboolean double_speed;
|
||||
extern gboolean use_mmx;
|
||||
|
||||
|
||||
#endif /* __APPENV_H__ */
|
||||
|
|
|
@ -51,11 +51,10 @@ static void batch_pserver (Gimp *gimp,
|
|||
|
||||
static ProcRecord *eval_proc;
|
||||
|
||||
|
||||
void
|
||||
batch_init (Gimp *gimp)
|
||||
{
|
||||
extern gchar **batch_cmds;
|
||||
|
||||
gboolean read_from_stdin;
|
||||
gboolean perl_server_already_running = FALSE;
|
||||
gint i;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "colormaps.h"
|
||||
#include "gimprc.h"
|
||||
|
|
|
@ -149,7 +149,7 @@ gimp_parasiterc_load (Gimp *gimp)
|
|||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("parasiterc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
gboolean new_layer;
|
||||
gint i, x, y;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gdisp->gimage->gimp);
|
||||
|
||||
tool = GIMP_TOOL (gt_tool);
|
||||
|
||||
|
@ -655,7 +655,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gdisp->gimage->gimp);
|
||||
|
||||
gdisplays_flush ();
|
||||
|
||||
|
|
354
app/core/gimp.c
354
app/core/gimp.c
|
@ -45,16 +45,19 @@
|
|||
#include "gimpparasite.h"
|
||||
#include "gimptoolinfo.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "unitrc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
static void gimp_class_init (GimpClass *klass);
|
||||
static void gimp_init (Gimp *gimp);
|
||||
static void gimp_class_init (GimpClass *klass);
|
||||
static void gimp_init (Gimp *gimp);
|
||||
|
||||
static void gimp_destroy (GtkObject *object);
|
||||
static void gimp_destroy (GtkObject *object);
|
||||
|
||||
static void gimp_context_destroy_callback (GimpContext *context,
|
||||
Gimp *gimp);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
@ -100,40 +103,15 @@ gimp_class_init (GimpClass *klass)
|
|||
static void
|
||||
gimp_init (Gimp *gimp)
|
||||
{
|
||||
GimpContext *context;
|
||||
gimp->create_display_func = NULL;
|
||||
gimp->gui_set_busy_func = NULL;
|
||||
gimp->gui_unset_busy_func = NULL;
|
||||
|
||||
static const GimpDataFactoryLoaderEntry brush_loader_entries[] =
|
||||
{
|
||||
{ gimp_brush_load, GIMP_BRUSH_FILE_EXTENSION },
|
||||
{ gimp_brush_load, GIMP_BRUSH_PIXMAP_FILE_EXTENSION },
|
||||
{ gimp_brush_generated_load, GIMP_BRUSH_GENERATED_FILE_EXTENSION },
|
||||
{ gimp_brush_pipe_load, GIMP_BRUSH_PIPE_FILE_EXTENSION }
|
||||
};
|
||||
static gint n_brush_loader_entries = (sizeof (brush_loader_entries) /
|
||||
sizeof (brush_loader_entries[0]));
|
||||
gimp->busy = FALSE;
|
||||
gimp->busy_idle_id = 0;
|
||||
|
||||
static const GimpDataFactoryLoaderEntry pattern_loader_entries[] =
|
||||
{
|
||||
{ gimp_pattern_load, GIMP_PATTERN_FILE_EXTENSION }
|
||||
};
|
||||
static gint n_pattern_loader_entries = (sizeof (pattern_loader_entries) /
|
||||
sizeof (pattern_loader_entries[0]));
|
||||
|
||||
static const GimpDataFactoryLoaderEntry gradient_loader_entries[] =
|
||||
{
|
||||
{ gimp_gradient_load, GIMP_GRADIENT_FILE_EXTENSION },
|
||||
{ gimp_gradient_load, NULL /* legacy loader */ }
|
||||
};
|
||||
static gint n_gradient_loader_entries = (sizeof (gradient_loader_entries) /
|
||||
sizeof (gradient_loader_entries[0]));
|
||||
|
||||
static const GimpDataFactoryLoaderEntry palette_loader_entries[] =
|
||||
{
|
||||
{ gimp_palette_load, GIMP_PALETTE_FILE_EXTENSION },
|
||||
{ gimp_palette_load, NULL /* legacy loader */ }
|
||||
};
|
||||
static gint n_palette_loader_entries = (sizeof (palette_loader_entries) /
|
||||
sizeof (palette_loader_entries[0]));
|
||||
gimp->user_units = NULL;
|
||||
gimp->n_user_units = 0;
|
||||
|
||||
gimp->images = gimp_list_new (GIMP_TYPE_IMAGE,
|
||||
GIMP_CONTAINER_POLICY_WEAK);
|
||||
|
@ -146,47 +124,12 @@ gimp_init (Gimp *gimp)
|
|||
gtk_object_ref (GTK_OBJECT (gimp->named_buffers));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->named_buffers));
|
||||
|
||||
gimp_parasites_init (gimp);
|
||||
gimp->parasites = NULL;
|
||||
|
||||
gimp->brush_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_BRUSH,
|
||||
(const gchar **) &core_config->brush_path,
|
||||
brush_loader_entries,
|
||||
n_brush_loader_entries,
|
||||
gimp_brush_new,
|
||||
gimp_brush_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->brush_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->brush_factory));
|
||||
|
||||
gimp->pattern_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_PATTERN,
|
||||
(const gchar **) &core_config->pattern_path,
|
||||
pattern_loader_entries,
|
||||
n_pattern_loader_entries,
|
||||
gimp_pattern_new,
|
||||
gimp_pattern_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->pattern_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->pattern_factory));
|
||||
|
||||
gimp->gradient_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_GRADIENT,
|
||||
(const gchar **) &core_config->gradient_path,
|
||||
gradient_loader_entries,
|
||||
n_gradient_loader_entries,
|
||||
gimp_gradient_new,
|
||||
gimp_gradient_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->gradient_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->gradient_factory));
|
||||
|
||||
gimp->palette_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_PALETTE,
|
||||
(const gchar **) &core_config->palette_path,
|
||||
palette_loader_entries,
|
||||
n_palette_loader_entries,
|
||||
gimp_palette_new,
|
||||
gimp_palette_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->palette_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->palette_factory));
|
||||
gimp->brush_factory = NULL;
|
||||
gimp->pattern_factory = NULL;
|
||||
gimp->gradient_factory = NULL;
|
||||
gimp->palette_factory = NULL;
|
||||
|
||||
procedural_db_init (gimp);
|
||||
|
||||
|
@ -195,20 +138,15 @@ gimp_init (Gimp *gimp)
|
|||
gtk_object_ref (GTK_OBJECT (gimp->tool_info_list));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->tool_info_list));
|
||||
|
||||
gimp_image_new_init (gimp);
|
||||
gimp->image_base_type_names = NULL;
|
||||
gimp->fill_type_names = NULL;
|
||||
gimp->have_current_cut_buffer = FALSE;
|
||||
|
||||
gimp->standard_context = gimp_create_context (gimp, "Standard", NULL);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->standard_context));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->standard_context));
|
||||
|
||||
/* TODO: load from disk */
|
||||
context = gimp_create_context (gimp, "Default", NULL);
|
||||
gimp_set_default_context (gimp, context);
|
||||
|
||||
context = gimp_create_context (gimp, "User", context);
|
||||
gimp_set_user_context (gimp, context);
|
||||
|
||||
gimp_set_current_context (gimp, context);
|
||||
gimp->context_list = NULL;
|
||||
gimp->standard_context = NULL;
|
||||
gimp->default_context = NULL;
|
||||
gimp->user_context = NULL;
|
||||
gimp->current_context = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -287,6 +225,15 @@ gimp_destroy (GtkObject *object)
|
|||
gimp->images = NULL;
|
||||
}
|
||||
|
||||
if (gimp->user_units)
|
||||
{
|
||||
g_list_foreach (gimp->user_units, (GFunc) g_free, NULL);
|
||||
g_list_free (gimp->user_units);
|
||||
|
||||
gimp->user_units = NULL;
|
||||
gimp->n_user_units = 0;
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
}
|
||||
|
@ -302,7 +249,107 @@ gimp_new (void)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_restore (Gimp *gimp)
|
||||
gimp_initialize (Gimp *gimp)
|
||||
{
|
||||
GimpContext *context;
|
||||
|
||||
static const GimpDataFactoryLoaderEntry brush_loader_entries[] =
|
||||
{
|
||||
{ gimp_brush_load, GIMP_BRUSH_FILE_EXTENSION },
|
||||
{ gimp_brush_load, GIMP_BRUSH_PIXMAP_FILE_EXTENSION },
|
||||
{ gimp_brush_generated_load, GIMP_BRUSH_GENERATED_FILE_EXTENSION },
|
||||
{ gimp_brush_pipe_load, GIMP_BRUSH_PIPE_FILE_EXTENSION }
|
||||
};
|
||||
static gint n_brush_loader_entries = (sizeof (brush_loader_entries) /
|
||||
sizeof (brush_loader_entries[0]));
|
||||
|
||||
static const GimpDataFactoryLoaderEntry pattern_loader_entries[] =
|
||||
{
|
||||
{ gimp_pattern_load, GIMP_PATTERN_FILE_EXTENSION }
|
||||
};
|
||||
static gint n_pattern_loader_entries = (sizeof (pattern_loader_entries) /
|
||||
sizeof (pattern_loader_entries[0]));
|
||||
|
||||
static const GimpDataFactoryLoaderEntry gradient_loader_entries[] =
|
||||
{
|
||||
{ gimp_gradient_load, GIMP_GRADIENT_FILE_EXTENSION },
|
||||
{ gimp_gradient_load, NULL /* legacy loader */ }
|
||||
};
|
||||
static gint n_gradient_loader_entries = (sizeof (gradient_loader_entries) /
|
||||
sizeof (gradient_loader_entries[0]));
|
||||
|
||||
static const GimpDataFactoryLoaderEntry palette_loader_entries[] =
|
||||
{
|
||||
{ gimp_palette_load, GIMP_PALETTE_FILE_EXTENSION },
|
||||
{ gimp_palette_load, NULL /* legacy loader */ }
|
||||
};
|
||||
static gint n_palette_loader_entries = (sizeof (palette_loader_entries) /
|
||||
sizeof (palette_loader_entries[0]));
|
||||
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
gimp_parasites_init (gimp);
|
||||
|
||||
gimp->brush_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_BRUSH,
|
||||
(const gchar **) &core_config->brush_path,
|
||||
brush_loader_entries,
|
||||
n_brush_loader_entries,
|
||||
gimp_brush_new,
|
||||
gimp_brush_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->brush_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->brush_factory));
|
||||
|
||||
gimp->pattern_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_PATTERN,
|
||||
(const gchar **) &core_config->pattern_path,
|
||||
pattern_loader_entries,
|
||||
n_pattern_loader_entries,
|
||||
gimp_pattern_new,
|
||||
gimp_pattern_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->pattern_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->pattern_factory));
|
||||
|
||||
gimp->gradient_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_GRADIENT,
|
||||
(const gchar **) &core_config->gradient_path,
|
||||
gradient_loader_entries,
|
||||
n_gradient_loader_entries,
|
||||
gimp_gradient_new,
|
||||
gimp_gradient_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->gradient_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->gradient_factory));
|
||||
|
||||
gimp->palette_factory =
|
||||
gimp_data_factory_new (GIMP_TYPE_PALETTE,
|
||||
(const gchar **) &core_config->palette_path,
|
||||
palette_loader_entries,
|
||||
n_palette_loader_entries,
|
||||
gimp_palette_new,
|
||||
gimp_palette_get_standard);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->palette_factory));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->palette_factory));
|
||||
|
||||
gimp_image_new_init (gimp);
|
||||
|
||||
gimp->standard_context = gimp_create_context (gimp, "Standard", NULL);
|
||||
gtk_object_ref (GTK_OBJECT (gimp->standard_context));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->standard_context));
|
||||
|
||||
/* TODO: load from disk */
|
||||
context = gimp_create_context (gimp, "Default", NULL);
|
||||
gimp_set_default_context (gimp, context);
|
||||
|
||||
context = gimp_create_context (gimp, "User", context);
|
||||
gimp_set_user_context (gimp, context);
|
||||
|
||||
gimp_set_current_context (gimp, context);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_restore (Gimp *gimp,
|
||||
gboolean no_data)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
@ -333,11 +380,71 @@ gimp_restore (Gimp *gimp)
|
|||
void
|
||||
gimp_shutdown (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
gimp_data_factory_data_save (gimp->brush_factory);
|
||||
gimp_data_factory_data_save (gimp->pattern_factory);
|
||||
gimp_data_factory_data_save (gimp->gradient_factory);
|
||||
gimp_data_factory_data_save (gimp->palette_factory);
|
||||
gimp_parasiterc_save (gimp);
|
||||
gimp_unitrc_save (gimp);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_busy (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
gimp->busy = TRUE;
|
||||
|
||||
if (gimp->gui_set_busy_func)
|
||||
gimp->gui_set_busy_func (the_gimp);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_idle_unset_busy (gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
|
||||
gimp = (Gimp *) data;
|
||||
|
||||
gimp_unset_busy (gimp);
|
||||
|
||||
gimp->busy_idle_id = 0;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_set_busy_until_idle (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
if (! gimp->busy_idle_id)
|
||||
{
|
||||
gimp_set_busy (gimp);
|
||||
|
||||
gimp->busy_idle_id = g_idle_add_full (G_PRIORITY_HIGH,
|
||||
gimp_idle_unset_busy, gimp,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_unset_busy (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
if (gimp->gui_unset_busy_func)
|
||||
gimp->gui_unset_busy_func (the_gimp);
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
gimp->busy = FALSE;
|
||||
}
|
||||
|
||||
GimpImage *
|
||||
|
@ -445,12 +552,26 @@ gimp_create_context (Gimp *gimp,
|
|||
|
||||
gimp->context_list = g_list_prepend (gimp->context_list, context);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (context), "destroy",
|
||||
GTK_SIGNAL_FUNC (gimp_context_destroy_callback),
|
||||
gimp);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_context_destroy_callback (GimpContext *context,
|
||||
Gimp *gimp)
|
||||
{
|
||||
gimp->context_list = g_list_remove (gimp->context_list, context);
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
gimp_get_standard_context (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (gimp != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
return gimp->standard_context;
|
||||
}
|
||||
|
||||
|
@ -458,12 +579,30 @@ void
|
|||
gimp_set_default_context (Gimp *gimp,
|
||||
GimpContext *context)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (! context || GIMP_IS_CONTEXT (context));
|
||||
|
||||
if (gimp->default_context)
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (gimp->default_context));
|
||||
}
|
||||
|
||||
gimp->default_context = context;
|
||||
|
||||
if (gimp->default_context)
|
||||
{
|
||||
gtk_object_ref (GTK_OBJECT (gimp->default_context));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->default_context));
|
||||
}
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
gimp_get_default_context (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (gimp != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
return gimp->default_context;
|
||||
}
|
||||
|
||||
|
@ -471,12 +610,30 @@ void
|
|||
gimp_set_user_context (Gimp *gimp,
|
||||
GimpContext *context)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (! context || GIMP_IS_CONTEXT (context));
|
||||
|
||||
if (gimp->user_context)
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (gimp->user_context));
|
||||
}
|
||||
|
||||
gimp->user_context = context;
|
||||
|
||||
if (gimp->user_context)
|
||||
{
|
||||
gtk_object_ref (GTK_OBJECT (gimp->user_context));
|
||||
gtk_object_sink (GTK_OBJECT (gimp->user_context));
|
||||
}
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
gimp_get_user_context (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (gimp != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
return gimp->user_context;
|
||||
}
|
||||
|
||||
|
@ -484,11 +641,28 @@ void
|
|||
gimp_set_current_context (Gimp *gimp,
|
||||
GimpContext *context)
|
||||
{
|
||||
g_return_if_fail (gimp != NULL);
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (! context || GIMP_IS_CONTEXT (context));
|
||||
|
||||
if (gimp->current_context)
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (gimp->current_context));
|
||||
}
|
||||
|
||||
gimp->current_context = context;
|
||||
|
||||
if (gimp->current_context)
|
||||
{
|
||||
gtk_object_ref (GTK_OBJECT (gimp->current_context));
|
||||
}
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
gimp_get_current_context (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (gimp != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
return gimp->current_context;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
|
||||
typedef void (* GimpCreateDisplayFunc) (GimpImage *gimage);
|
||||
typedef void (* GimpSetBusyFunc) (Gimp *gimp);
|
||||
typedef void (* GimpUnsetBusyFunc) (Gimp *gimp);
|
||||
|
||||
|
||||
#define GIMP_TYPE_GIMP (gimp_get_type ())
|
||||
|
@ -41,6 +43,14 @@ struct _Gimp
|
|||
GimpObject parent_instance;
|
||||
|
||||
GimpCreateDisplayFunc create_display_func;
|
||||
GimpSetBusyFunc gui_set_busy_func;
|
||||
GimpUnsetBusyFunc gui_unset_busy_func;
|
||||
|
||||
gboolean busy;
|
||||
guint busy_idle_id;
|
||||
|
||||
GList *user_units;
|
||||
gint n_user_units;
|
||||
|
||||
GimpContainer *images;
|
||||
|
||||
|
@ -89,9 +99,16 @@ struct _GimpClass
|
|||
GtkType gimp_get_type (void);
|
||||
Gimp * gimp_new (void);
|
||||
|
||||
void gimp_restore (Gimp *gimp);
|
||||
void gimp_initialize (Gimp *gimp);
|
||||
|
||||
void gimp_restore (Gimp *gimp,
|
||||
gboolean no_data);
|
||||
void gimp_shutdown (Gimp *gimp);
|
||||
|
||||
void gimp_set_busy (Gimp *gimp);
|
||||
void gimp_set_busy_until_idle (Gimp *gimp);
|
||||
void gimp_unset_busy (Gimp *gimp);
|
||||
|
||||
GimpImage * gimp_create_image (Gimp *gimp,
|
||||
gint width,
|
||||
gint height,
|
||||
|
|
|
@ -560,9 +560,6 @@ gimp_context_destroy (GtkObject *object)
|
|||
if (context->parent)
|
||||
gimp_context_unset_parent (context);
|
||||
|
||||
context->gimp->context_list = g_list_remove (context->gimp->context_list,
|
||||
context);
|
||||
|
||||
context->image = NULL;
|
||||
context->display = NULL;
|
||||
|
||||
|
|
|
@ -67,10 +67,11 @@ static struct stat filestat;
|
|||
static gboolean
|
||||
is_script (const gchar *filename)
|
||||
{
|
||||
const gchar *ext = strrchr (filename, '.');
|
||||
gchar *pathext;
|
||||
static gchar **exts = NULL;
|
||||
gint i;
|
||||
|
||||
const gchar *ext = strrchr (filename, '.');
|
||||
gchar *pathext;
|
||||
gint i;
|
||||
|
||||
if (exts == NULL)
|
||||
{
|
||||
|
@ -125,12 +126,12 @@ gimp_datafiles_read_directories (const gchar *path_str,
|
|||
GimpDataFileLoaderFunc loader_func,
|
||||
gpointer loader_data)
|
||||
{
|
||||
gchar *local_path;
|
||||
GList *path;
|
||||
GList *list;
|
||||
gchar *filename;
|
||||
gint err;
|
||||
DIR *dir;
|
||||
gchar *local_path;
|
||||
GList *path;
|
||||
GList *list;
|
||||
gchar *filename;
|
||||
gint err;
|
||||
DIR *dir;
|
||||
struct dirent *dir_ent;
|
||||
|
||||
g_return_if_fail (path_str != NULL);
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "errors.h"
|
||||
#include "gdisplay.h"
|
||||
|
@ -923,7 +922,7 @@ blend (GimpImage *gimage,
|
|||
gint bytes;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
has_selection = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
||||
|
@ -958,7 +957,7 @@ blend (GimpImage *gimage,
|
|||
/* free the temporary buffer */
|
||||
tile_manager_destroy (buf_tiles);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static gdouble
|
||||
|
|
|
@ -558,7 +558,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
gboolean new_layer;
|
||||
gint i, x, y;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gdisp->gimage->gimp);
|
||||
|
||||
tool = GIMP_TOOL (gt_tool);
|
||||
|
||||
|
@ -655,7 +655,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gdisp->gimage->gimp);
|
||||
|
||||
gdisplays_flush ();
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
#include "base/pixel-region.h"
|
||||
#include "base/tile-manager.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-convert.h"
|
||||
|
@ -115,10 +116,8 @@
|
|||
#include "gimplayer.h"
|
||||
#include "gimppalette.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gdisplay.h"
|
||||
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "undo.h"
|
||||
|
||||
|
||||
|
@ -694,7 +693,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
|
||||
theCustomPalette = custom_palette;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -947,7 +946,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
|
||||
gimp_image_mode_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "gimplist.h"
|
||||
#include "gimpparasitelist.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -73,7 +72,7 @@ gimp_image_duplicate (GimpImage *gimage)
|
|||
g_return_val_if_fail (gimage != NULL, NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Create a new image */
|
||||
new_gimage = gimp_create_image (gimage->gimp,
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "tool_manager.h"
|
||||
#include "tool_options.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ gimp_parasiterc_load (Gimp *gimp)
|
|||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("parasiterc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define __GIMP_PARASITE_LIST_H__
|
||||
|
||||
|
||||
#include "core/gimpobject.h"
|
||||
#include "gimpobject.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_PARASITE_LIST (gimp_parasite_list_get_type ())
|
||||
|
@ -64,7 +64,7 @@ void gimp_parasite_list_foreach (GimpParasiteList *list,
|
|||
GimpParasite * gimp_parasite_list_find (GimpParasiteList *list,
|
||||
const gchar *name);
|
||||
|
||||
void gimp_parasite_shift_parent (GimpParasite *parasite);
|
||||
void gimp_parasite_shift_parent (GimpParasite *parasite);
|
||||
|
||||
|
||||
#endif /* __GIMP_PARASITE_LIST_H__ */
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "path.h"
|
||||
|
@ -767,7 +766,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
GList *list;
|
||||
GList *guide_list;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
g_assert (new_width > 0 && new_height > 0);
|
||||
|
||||
|
@ -853,7 +852,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -880,7 +879,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
@ -981,7 +980,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2341,11 +2340,11 @@ gimp_image_validate (TileManager *tm,
|
|||
gint x, y;
|
||||
gint w, h;
|
||||
|
||||
gimp_set_busy_until_idle ();
|
||||
|
||||
/* Get the gimage from the tilemanager */
|
||||
gimage = (GimpImage *) tile_manager_get_user_data (tm);
|
||||
|
||||
gimp_set_busy_until_idle (gimage->gimp);
|
||||
|
||||
/* Find the coordinates of this tile */
|
||||
tile_manager_get_tile_coordinates (tm, tile, &x, &y);
|
||||
w = tile_ewidth (tile);
|
||||
|
@ -3021,12 +3020,12 @@ gimp_image_merge_visible_layers (GimpImage *gimage,
|
|||
|
||||
if (merge_list && merge_list->next)
|
||||
{
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3054,7 +3053,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* if there's a floating selection, anchor it */
|
||||
if (gimp_image_floating_sel (gimage))
|
||||
|
@ -3075,7 +3074,7 @@ gimp_image_flatten (GimpImage *gimage)
|
|||
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
@ -3116,12 +3115,12 @@ gimp_image_merge_down (GimpImage *gimage,
|
|||
{
|
||||
merge_list = g_slist_prepend (merge_list, current_layer);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
|
||||
g_slist_free (merge_list);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
#include "unitrc.h"
|
||||
|
||||
|
@ -74,45 +75,45 @@ static GimpUnitDef gimp_unit_percent =
|
|||
FALSE, 0.0, 0, "percent", "%", "%", N_("percent"), N_("percent")
|
||||
};
|
||||
|
||||
static GSList* user_units = NULL;
|
||||
static gint number_of_user_units = 0;
|
||||
|
||||
/* private functions */
|
||||
|
||||
static GimpUnitDef *
|
||||
gimp_unit_get_user_unit (GimpUnit unit)
|
||||
_gimp_unit_get_user_unit (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
return g_slist_nth_data (user_units, unit - GIMP_UNIT_END);
|
||||
return g_list_nth_data (gimp->user_units, unit - GIMP_UNIT_END);
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_units (void)
|
||||
_gimp_unit_get_number_of_units (Gimp *gimp)
|
||||
{
|
||||
return GIMP_UNIT_END + number_of_user_units;
|
||||
return GIMP_UNIT_END + gimp->n_user_units;
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_built_in_units (void)
|
||||
_gimp_unit_get_number_of_built_in_units (Gimp *gimp)
|
||||
{
|
||||
return GIMP_UNIT_END;
|
||||
}
|
||||
|
||||
|
||||
GimpUnit
|
||||
gimp_unit_new (gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural)
|
||||
_gimp_unit_new (Gimp *gimp,
|
||||
gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural)
|
||||
{
|
||||
GimpUnitDef *user_unit;
|
||||
|
||||
user_unit = g_new (GimpUnitDef, 1);
|
||||
user_unit = g_new0 (GimpUnitDef, 1);
|
||||
|
||||
user_unit->delete_on_exit = TRUE;
|
||||
user_unit->factor = factor;
|
||||
user_unit->digits = digits;
|
||||
|
@ -122,70 +123,71 @@ gimp_unit_new (gchar *identifier,
|
|||
user_unit->singular = g_strdup (singular);
|
||||
user_unit->plural = g_strdup (plural);
|
||||
|
||||
user_units = g_slist_append (user_units, user_unit);
|
||||
number_of_user_units++;
|
||||
gimp->user_units = g_list_append (gimp->user_units, user_unit);
|
||||
gimp->n_user_units++;
|
||||
|
||||
return GIMP_UNIT_END + number_of_user_units - 1;
|
||||
return GIMP_UNIT_END + gimp->n_user_units - 1;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gimp_unit_get_deletion_flag (GimpUnit unit)
|
||||
_gimp_unit_get_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)), FALSE);
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)), FALSE);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return FALSE;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->delete_on_exit;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->delete_on_exit;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_unit_set_deletion_flag (GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
_gimp_unit_set_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
{
|
||||
g_return_if_fail ((unit >= GIMP_UNIT_END) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)));
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)));
|
||||
|
||||
gimp_unit_get_user_unit (unit)->delete_on_exit =
|
||||
_gimp_unit_get_user_unit (gimp, unit)->delete_on_exit =
|
||||
deletion_flag ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
gdouble
|
||||
gimp_unit_get_factor (GimpUnit unit)
|
||||
_gimp_unit_get_factor (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)),
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].factor);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return gimp_unit_defs[unit].factor;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->factor;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->factor;
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
gimp_unit_get_digits (GimpUnit unit)
|
||||
_gimp_unit_get_digits (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)),
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].digits);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return gimp_unit_defs[unit].digits;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->digits;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->digits;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_identifier (GimpUnit unit)
|
||||
_gimp_unit_get_identifier (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].identifier);
|
||||
|
||||
|
@ -195,15 +197,15 @@ gimp_unit_get_identifier (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.identifier;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->identifier;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->identifier;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_symbol (GimpUnit unit)
|
||||
_gimp_unit_get_symbol (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].symbol);
|
||||
|
||||
|
@ -213,15 +215,15 @@ gimp_unit_get_symbol (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.symbol;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->symbol;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->symbol;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_abbreviation (GimpUnit unit)
|
||||
_gimp_unit_get_abbreviation (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].abbreviation);
|
||||
|
||||
|
@ -231,15 +233,15 @@ gimp_unit_get_abbreviation (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.abbreviation;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->abbreviation;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->abbreviation;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_singular (GimpUnit unit)
|
||||
_gimp_unit_get_singular (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gettext (gimp_unit_defs[GIMP_UNIT_INCH].singular));
|
||||
|
||||
|
@ -249,15 +251,15 @@ gimp_unit_get_singular (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.singular);
|
||||
|
||||
return gettext (gimp_unit_get_user_unit (unit)->singular);
|
||||
return gettext (_gimp_unit_get_user_unit (gimp, unit)->singular);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_plural (GimpUnit unit)
|
||||
_gimp_unit_get_plural (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gettext (gimp_unit_defs[GIMP_UNIT_INCH].plural));
|
||||
|
||||
|
@ -267,25 +269,24 @@ gimp_unit_get_plural (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.plural);
|
||||
|
||||
return gettext (gimp_unit_get_user_unit (unit)->plural);
|
||||
return gettext (_gimp_unit_get_user_unit (gimp, unit)->plural);
|
||||
}
|
||||
|
||||
|
||||
/* unitrc functions **********/
|
||||
|
||||
void
|
||||
parse_unitrc (void)
|
||||
gimp_unitrc_load (Gimp *gimp)
|
||||
{
|
||||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("unitrc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
save_unitrc (void)
|
||||
gimp_unitrc_save (Gimp *gimp)
|
||||
{
|
||||
gint i;
|
||||
gchar *filename;
|
||||
|
|
|
@ -16,12 +16,48 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __UNITRC_H__
|
||||
#define __UNITRC_H__
|
||||
#ifndef __APP_GIMP_UNIT_H__
|
||||
#define __APP_GIMP_UNIT_H__
|
||||
|
||||
|
||||
void parse_unitrc (void);
|
||||
void save_unitrc (void);
|
||||
void gimp_unitrc_load (Gimp *gimp);
|
||||
void gimp_unitrc_save (Gimp *gimp);
|
||||
|
||||
gint _gimp_unit_get_number_of_units (Gimp *gimp);
|
||||
gint _gimp_unit_get_number_of_built_in_units (Gimp *gimp);
|
||||
|
||||
GimpUnit _gimp_unit_new (Gimp *gimp,
|
||||
gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural);
|
||||
|
||||
gboolean _gimp_unit_get_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
void _gimp_unit_set_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit,
|
||||
gboolean deletion_flag);
|
||||
|
||||
gdouble _gimp_unit_get_factor (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
|
||||
gint _gimp_unit_get_digits (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
|
||||
gchar * _gimp_unit_get_identifier (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
|
||||
gchar * _gimp_unit_get_symbol (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
gchar * _gimp_unit_get_abbreviation (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
gchar * _gimp_unit_get_singular (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
gchar * _gimp_unit_get_plural (Gimp *gimp,
|
||||
GimpUnit unit);
|
||||
|
||||
|
||||
#endif /* __UNITRC_H__ */
|
||||
#endif /* __APP_GIMP_UNIT_H__ */
|
||||
|
|
|
@ -324,7 +324,7 @@ devices_restore (void)
|
|||
|
||||
/* Augment with information from rc file */
|
||||
filename = gimp_personal_rc_file ("devicerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
if ((device_info = device_info_get_by_id (current_device)) == NULL)
|
||||
|
|
|
@ -617,7 +617,7 @@ file_open_genbutton_callback (GtkWidget *widget,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (the_gimp);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), FALSE);
|
||||
|
||||
/* new mult-file preview make: */
|
||||
|
@ -702,7 +702,7 @@ file_open_genbutton_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), TRUE);
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (the_gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "info-dialog.h"
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "app_procs.h"
|
||||
#include "colormaps.h"
|
||||
#include "gdisplay.h"
|
||||
#include "unitrc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
@ -501,12 +502,16 @@ info_window_update_extended (GDisplay *gdisp,
|
|||
else
|
||||
{
|
||||
/* width and height */
|
||||
unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
|
||||
unit_digits = gimp_unit_get_digits (gdisp->gimage->unit);
|
||||
unit_factor = _gimp_unit_get_factor (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
unit_digits = _gimp_unit_get_digits (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
if (iwd->unit_str != gimp_unit_get_abbreviation (gdisp->gimage->unit))
|
||||
if (iwd->unit_str != _gimp_unit_get_abbreviation (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit))
|
||||
{
|
||||
iwd->unit_str = gimp_unit_get_abbreviation (gdisp->gimage->unit);
|
||||
iwd->unit_str = _gimp_unit_get_abbreviation (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (iwd->unit_labels[0]), iwd->unit_str);
|
||||
gtk_label_set_text (GTK_LABEL (iwd->unit_labels[1]), iwd->unit_str);
|
||||
|
@ -608,8 +613,10 @@ info_window_update (GDisplay *gdisp)
|
|||
return;
|
||||
|
||||
/* width and height */
|
||||
unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
|
||||
unit_digits = gimp_unit_get_digits (gdisp->gimage->unit);
|
||||
unit_factor = _gimp_unit_get_factor (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
unit_digits = _gimp_unit_get_digits (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
g_snprintf (iwd->dimensions_str, MAX_BUF,
|
||||
_("%d x %d pixels"),
|
||||
|
@ -618,7 +625,8 @@ info_window_update (GDisplay *gdisp)
|
|||
g_snprintf (format_buf, sizeof (format_buf),
|
||||
"%%.%df x %%.%df %s",
|
||||
unit_digits + 1, unit_digits + 1,
|
||||
gimp_unit_get_plural (gdisp->gimage->unit));
|
||||
_gimp_unit_get_plural (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit));
|
||||
g_snprintf (iwd->real_dimensions_str, MAX_BUF, format_buf,
|
||||
gdisp->gimage->width * unit_factor / gdisp->gimage->xresolution,
|
||||
gdisp->gimage->height * unit_factor / gdisp->gimage->yresolution);
|
||||
|
|
|
@ -210,7 +210,7 @@ module_db_init (void)
|
|||
|
||||
/* load the modulerc file */
|
||||
filename = gimp_personal_rc_file ("modulerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
/* Load and initialize gimp modules */
|
||||
|
|
|
@ -813,7 +813,7 @@ prefs_save_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
|
||||
|
||||
if (gimprc.using_xserver_resolution)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
|
||||
|
@ -208,7 +208,7 @@ tips_dialog_destroy (GtkWidget *widget,
|
|||
update = g_list_append (update, "show-tips");
|
||||
remove = g_list_append (remove, "dont-show-tips");
|
||||
old_show_tips = gimprc.show_tips;
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
}
|
||||
g_list_free (update);
|
||||
g_list_free (remove);
|
||||
|
|
|
@ -74,9 +74,11 @@
|
|||
#define PAGE_STYLE(widget) gtk_widget_set_style (widget, page_style)
|
||||
#define TITLE_STYLE(widget) gtk_widget_set_style (widget, title_style)
|
||||
|
||||
static void user_install_dialog_create (UserInstallCallback);
|
||||
static void user_install_continue_callback (GtkWidget *widget, gpointer data);
|
||||
static void user_install_cancel_callback (GtkWidget *widget, gpointer data);
|
||||
|
||||
static void user_install_continue_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void user_install_cancel_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
static gboolean user_install_run (void);
|
||||
static void user_install_tuning (void);
|
||||
|
@ -85,39 +87,6 @@ static void user_install_resolution (void);
|
|||
static void user_install_resolution_done (void);
|
||||
|
||||
|
||||
void
|
||||
user_install_verify (UserInstallCallback user_install_callback)
|
||||
{
|
||||
gboolean properly_installed = TRUE;
|
||||
const gchar *filename;
|
||||
struct stat stat_buf;
|
||||
|
||||
/* gimp_directory now always returns something */
|
||||
filename = gimp_directory ();
|
||||
|
||||
if (stat (filename, &stat_buf) != 0)
|
||||
properly_installed = FALSE;
|
||||
|
||||
/* If there is already a proper installation, invoke the callback */
|
||||
if (properly_installed)
|
||||
{
|
||||
(* user_install_callback) ();
|
||||
}
|
||||
/* Otherwise, prepare for installation */
|
||||
else if (no_interface)
|
||||
{
|
||||
g_print (_("The GIMP is not properly installed for the current user\n"));
|
||||
g_print (_("User installation was skipped because the '--nointerface' flag was encountered\n"));
|
||||
g_print (_("To perform user installation, run the GIMP without the '--nointerface' flag\n"));
|
||||
|
||||
(* user_install_callback) ();
|
||||
}
|
||||
else
|
||||
{
|
||||
user_install_dialog_create (user_install_callback);
|
||||
}
|
||||
}
|
||||
|
||||
/* private stuff */
|
||||
|
||||
static GtkWidget *user_install_dialog = NULL;
|
||||
|
@ -350,9 +319,10 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
static gint notebook_index = 0;
|
||||
UserInstallCallback callback;
|
||||
|
||||
callback = (UserInstallCallback) data;
|
||||
Gimp *gimp;
|
||||
|
||||
gimp = (Gimp *) data;
|
||||
|
||||
switch (notebook_index)
|
||||
{
|
||||
|
@ -382,9 +352,9 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
#ifdef G_OS_WIN32
|
||||
FreeConsole ();
|
||||
#endif
|
||||
gimprc_init ();
|
||||
parse_unitrc ();
|
||||
parse_gimprc ();
|
||||
gimprc_init (gimp);
|
||||
gimp_unitrc_load (gimp);
|
||||
gimprc_parse (gimp);
|
||||
user_install_tuning ();
|
||||
break;
|
||||
|
||||
|
@ -401,7 +371,7 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
gtk_style_unref (title_style);
|
||||
gtk_style_unref (page_style);
|
||||
|
||||
(* callback) ();
|
||||
gtk_main_quit ();
|
||||
return;
|
||||
break;
|
||||
|
||||
|
@ -426,7 +396,7 @@ user_install_cancel_callback (GtkWidget *widget,
|
|||
|
||||
gtk_widget_destroy (continue_button);
|
||||
user_install_notebook_set_page (GTK_NOTEBOOK (notebook), EEK_PAGE);
|
||||
timeout = gtk_timeout_add (1024, (GtkFunction)gtk_exit, (gpointer)0);
|
||||
timeout = gtk_timeout_add (1024, (GtkFunction) gtk_exit, (gpointer) 0);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -534,7 +504,7 @@ user_install_ctree_select_row (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
user_install_dialog_create (UserInstallCallback callback)
|
||||
user_install_dialog_create (Gimp *gimp)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *vbox;
|
||||
|
@ -553,9 +523,9 @@ user_install_dialog_create (UserInstallCallback callback)
|
|||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("Continue"), user_install_continue_callback,
|
||||
callback, NULL, &continue_button, TRUE, FALSE,
|
||||
gimp, NULL, &continue_button, TRUE, FALSE,
|
||||
_("Cancel"), user_install_cancel_callback,
|
||||
callback, 1, &cancel_button, FALSE, TRUE,
|
||||
gimp, 1, &cancel_button, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
|
@ -939,11 +909,11 @@ quote_spaces (char *string)
|
|||
static gboolean
|
||||
user_install_run (void)
|
||||
{
|
||||
FILE *pfp;
|
||||
gchar buffer[2048];
|
||||
struct stat stat_buf;
|
||||
gint err;
|
||||
gboolean executable = TRUE;
|
||||
FILE *pfp;
|
||||
gchar buffer[2048];
|
||||
struct stat stat_buf;
|
||||
gint err;
|
||||
gboolean executable = TRUE;
|
||||
|
||||
/* Generate output */
|
||||
g_snprintf (buffer, sizeof (buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL,
|
||||
|
@ -1328,7 +1298,7 @@ user_install_resolution_done (void)
|
|||
gimprc.monitor_yres = 0.0;
|
||||
}
|
||||
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
|
||||
if (gimprc.using_xserver_resolution)
|
||||
gdisplay_xserver_resolution (&gimprc.monitor_xres, &gimprc.monitor_yres);
|
||||
|
|
|
@ -16,15 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __USER_INSTALL_H__
|
||||
#define __USER_INSTALL_H__
|
||||
#ifndef __USER_INSTALL_DIALOG_H__
|
||||
#define __USER_INSTALL_DIALOG_H__
|
||||
|
||||
|
||||
/* Install callback function */
|
||||
typedef void (* UserInstallCallback) (void);
|
||||
|
||||
/* Function declarations */
|
||||
void user_install_verify (UserInstallCallback user_install_callback);
|
||||
void user_install_dialog_create (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __USER_INSTALL_H__ */
|
||||
#endif /* __USER_INSTALL_DIALOG_H__ */
|
||||
|
|
|
@ -53,8 +53,6 @@
|
|||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
|
@ -224,7 +222,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* Find out what device the event occurred upon */
|
||||
if (! gimp_busy && devices_check_change (event))
|
||||
if (! gdisp->gimage->gimp->busy && devices_check_change (event))
|
||||
gdisplay_check_device_cursor (gdisp);
|
||||
|
||||
switch (event->type)
|
||||
|
@ -270,7 +268,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = bevent->state;
|
||||
|
||||
/* ignore new mouse events */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -409,8 +407,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -482,8 +481,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
/* Ask for the pointer position, but ignore it except for cursor
|
||||
|
@ -561,7 +561,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key presses */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -612,7 +612,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key releases */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -640,7 +640,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* if we reached this point in gimp_busy mode, return now */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
/* Cursor update support */
|
||||
|
@ -684,7 +684,7 @@ gdisplay_hruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -722,7 +722,7 @@ gdisplay_vruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -784,7 +784,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (! gimp_busy && event->button == 1)
|
||||
if (! gdisp->gimage->gimp->busy && event->button == 1)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
|
@ -824,11 +824,12 @@ gdisplay_drop_drawable (GtkWidget *widget,
|
|||
gint bytes;
|
||||
GimpImageBaseType type;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
drawable = GIMP_DRAWABLE (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
src_gimage = gimp_drawable_gimage (drawable);
|
||||
src_width = gimp_drawable_width (drawable);
|
||||
|
@ -933,15 +934,17 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
TempBuf *pat_buf = NULL;
|
||||
gboolean new_buf = FALSE;
|
||||
|
||||
if (gimp_busy)
|
||||
return;
|
||||
|
||||
gimage = ((GDisplay *) data)->gimage;
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
if (!drawable)
|
||||
|
||||
if (gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
gimp_set_busy ();
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! drawable)
|
||||
return;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the bucket fill context */
|
||||
tool_info = tool_manager_get_info_by_type (gimage->gimp,
|
||||
|
@ -1023,7 +1026,7 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1062,11 +1065,12 @@ gdisplay_drop_buffer (GtkWidget *widget,
|
|||
GimpBuffer *buffer;
|
||||
GDisplay *gdisp;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
buffer = GIMP_BUFFER (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
/* FIXME: popup a menu for selecting "Paste Into" */
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@
|
|||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
|
@ -224,7 +222,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* Find out what device the event occurred upon */
|
||||
if (! gimp_busy && devices_check_change (event))
|
||||
if (! gdisp->gimage->gimp->busy && devices_check_change (event))
|
||||
gdisplay_check_device_cursor (gdisp);
|
||||
|
||||
switch (event->type)
|
||||
|
@ -270,7 +268,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = bevent->state;
|
||||
|
||||
/* ignore new mouse events */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -409,8 +407,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -482,8 +481,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
/* Ask for the pointer position, but ignore it except for cursor
|
||||
|
@ -561,7 +561,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key presses */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -612,7 +612,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key releases */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -640,7 +640,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* if we reached this point in gimp_busy mode, return now */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
/* Cursor update support */
|
||||
|
@ -684,7 +684,7 @@ gdisplay_hruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -722,7 +722,7 @@ gdisplay_vruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -784,7 +784,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (! gimp_busy && event->button == 1)
|
||||
if (! gdisp->gimage->gimp->busy && event->button == 1)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
|
@ -824,11 +824,12 @@ gdisplay_drop_drawable (GtkWidget *widget,
|
|||
gint bytes;
|
||||
GimpImageBaseType type;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
drawable = GIMP_DRAWABLE (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
src_gimage = gimp_drawable_gimage (drawable);
|
||||
src_width = gimp_drawable_width (drawable);
|
||||
|
@ -933,15 +934,17 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
TempBuf *pat_buf = NULL;
|
||||
gboolean new_buf = FALSE;
|
||||
|
||||
if (gimp_busy)
|
||||
return;
|
||||
|
||||
gimage = ((GDisplay *) data)->gimage;
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
if (!drawable)
|
||||
|
||||
if (gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
gimp_set_busy ();
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! drawable)
|
||||
return;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the bucket fill context */
|
||||
tool_info = tool_manager_get_info_by_type (gimage->gimp,
|
||||
|
@ -1023,7 +1026,7 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1062,11 +1065,12 @@ gdisplay_drop_buffer (GtkWidget *widget,
|
|||
GimpBuffer *buffer;
|
||||
GDisplay *gdisp;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
buffer = GIMP_BUFFER (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
/* FIXME: popup a menu for selecting "Paste Into" */
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "colormaps.h"
|
||||
#include "gdisplay_ops.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -117,7 +117,7 @@ gdisplay_close_window (GDisplay *gdisp,
|
|||
/* FIXME: gimp_busy HACK not really appropriate here because we only
|
||||
* want to prevent the busy image and display to be closed. --Mitch
|
||||
*/
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
/* If the image has been modified, give the user a chance to save
|
||||
|
|
|
@ -53,8 +53,6 @@
|
|||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
|
@ -224,7 +222,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* Find out what device the event occurred upon */
|
||||
if (! gimp_busy && devices_check_change (event))
|
||||
if (! gdisp->gimage->gimp->busy && devices_check_change (event))
|
||||
gdisplay_check_device_cursor (gdisp);
|
||||
|
||||
switch (event->type)
|
||||
|
@ -270,7 +268,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = bevent->state;
|
||||
|
||||
/* ignore new mouse events */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -409,8 +407,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
switch (bevent->button)
|
||||
|
@ -482,8 +481,9 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
*
|
||||
* ugly: fuzzy_select sets busy cursors while ACTIVE.
|
||||
*/
|
||||
if (gimp_busy && ! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
if (gdisp->gimage->gimp->busy &&
|
||||
! (GIMP_IS_FUZZY_SELECT_TOOL (active_tool) &&
|
||||
active_tool->state == ACTIVE))
|
||||
return TRUE;
|
||||
|
||||
/* Ask for the pointer position, but ignore it except for cursor
|
||||
|
@ -561,7 +561,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key presses */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -612,7 +612,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
state = kevent->state;
|
||||
|
||||
/* ignore any key releases */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
switch (kevent->keyval)
|
||||
|
@ -640,7 +640,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
/* if we reached this point in gimp_busy mode, return now */
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
/* Cursor update support */
|
||||
|
@ -684,7 +684,7 @@ gdisplay_hruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -722,7 +722,7 @@ gdisplay_vruler_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
if (event->button == 1)
|
||||
|
@ -784,7 +784,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
|
|||
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (! gimp_busy && event->button == 1)
|
||||
if (! gdisp->gimage->gimp->busy && event->button == 1)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
|
@ -824,11 +824,12 @@ gdisplay_drop_drawable (GtkWidget *widget,
|
|||
gint bytes;
|
||||
GimpImageBaseType type;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
drawable = GIMP_DRAWABLE (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
src_gimage = gimp_drawable_gimage (drawable);
|
||||
src_width = gimp_drawable_width (drawable);
|
||||
|
@ -933,15 +934,17 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
TempBuf *pat_buf = NULL;
|
||||
gboolean new_buf = FALSE;
|
||||
|
||||
if (gimp_busy)
|
||||
return;
|
||||
|
||||
gimage = ((GDisplay *) data)->gimage;
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
if (!drawable)
|
||||
|
||||
if (gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
gimp_set_busy ();
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! drawable)
|
||||
return;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Get the bucket fill context */
|
||||
tool_info = tool_manager_get_info_by_type (gimage->gimp,
|
||||
|
@ -1023,7 +1026,7 @@ gdisplay_bucket_fill (GtkWidget *widget,
|
|||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1062,11 +1065,12 @@ gdisplay_drop_buffer (GtkWidget *widget,
|
|||
GimpBuffer *buffer;
|
||||
GDisplay *gdisp;
|
||||
|
||||
if (gimp_busy)
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
buffer = GIMP_BUFFER (viewable);
|
||||
gdisp = (GDisplay *) data;
|
||||
|
||||
/* FIXME: popup a menu for selecting "Paste Into" */
|
||||
|
||||
|
|
|
@ -885,11 +885,11 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
gint xoff = 0;
|
||||
gint yoff = 0;
|
||||
|
||||
gimp_set_busy ();
|
||||
|
||||
gdisp = nav_dialog->gdisp;
|
||||
gimage = gdisp->gimage;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Min size is 2 */
|
||||
pwidth = nav_dialog->pwidth;
|
||||
pheight = nav_dialog->pheight;
|
||||
|
@ -1034,7 +1034,7 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
if (preview_buf_notdot)
|
||||
temp_buf_free (preview_buf_notdot);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -885,11 +885,11 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
gint xoff = 0;
|
||||
gint yoff = 0;
|
||||
|
||||
gimp_set_busy ();
|
||||
|
||||
gdisp = nav_dialog->gdisp;
|
||||
gimage = gdisp->gimage;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Min size is 2 */
|
||||
pwidth = nav_dialog->pwidth;
|
||||
pheight = nav_dialog->pheight;
|
||||
|
@ -1034,7 +1034,7 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
if (preview_buf_notdot)
|
||||
temp_buf_free (preview_buf_notdot);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
61
app/errors.c
61
app/errors.c
|
@ -33,7 +33,6 @@
|
|||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "errorconsole.h"
|
||||
#include "errors.h"
|
||||
|
||||
|
@ -41,15 +40,12 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
extern gchar *prog_name;
|
||||
|
||||
StackTraceMode stack_trace_mode = STACK_TRACE_QUERY;
|
||||
|
||||
void
|
||||
gimp_message_func (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer data)
|
||||
gimp_message_log_func (const gchar *log_domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *message,
|
||||
gpointer data)
|
||||
{
|
||||
if (console_messages == FALSE)
|
||||
{
|
||||
|
@ -74,16 +70,28 @@ gimp_message_func (const gchar *log_domain,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_error_log_func (const gchar *domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *message,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_fatal_error ("%s", message);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_fatal_error (gchar *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_list args;
|
||||
gchar *message;
|
||||
|
||||
va_start (args, fmt);
|
||||
message = g_strdup_vprintf (fmt, args);
|
||||
va_end (args);
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
||||
va_start (args, fmt);
|
||||
g_printerr ("%s: fatal error: %s\n", prog_name, g_strdup_vprintf (fmt, args));
|
||||
va_end (args);
|
||||
g_printerr ("%s: fatal error: %s\n", prog_name, message);
|
||||
|
||||
switch (stack_trace_mode)
|
||||
{
|
||||
|
@ -117,31 +125,27 @@ gimp_fatal_error (gchar *fmt, ...)
|
|||
#else
|
||||
|
||||
/* g_on_error_* don't do anything reasonable on Win32. */
|
||||
gchar *msg;
|
||||
|
||||
va_start (args, fmt);
|
||||
msg = g_strdup_vprintf (fmt, args);
|
||||
va_end (args);
|
||||
|
||||
MessageBox (NULL, msg, prog_name, MB_OK|MB_ICONERROR);
|
||||
/* I don't dare do anything more. */
|
||||
ExitProcess (1);
|
||||
MessageBox (NULL, message, prog_name, MB_OK|MB_ICONERROR);
|
||||
|
||||
#endif /* ! G_OS_WIN32 */
|
||||
|
||||
app_exit (TRUE);
|
||||
gdk_exit (1);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_terminate (gchar *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_list args;
|
||||
gchar *message;
|
||||
|
||||
va_start (args, fmt);
|
||||
message = g_strdup_vprintf (fmt, args);
|
||||
va_end (args);
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
||||
va_start (args, fmt);
|
||||
g_printerr ("%s terminated: %s\n", prog_name, g_strdup_vprintf (fmt, args));
|
||||
va_end (args);
|
||||
g_printerr ("%s terminated: %s\n", prog_name, message);
|
||||
|
||||
if (use_debug_handler)
|
||||
{
|
||||
|
@ -178,13 +182,8 @@ gimp_terminate (gchar *fmt, ...)
|
|||
#else
|
||||
|
||||
/* g_on_error_* don't do anything reasonable on Win32. */
|
||||
gchar *msg;
|
||||
|
||||
va_start (args, fmt);
|
||||
msg = g_strdup_vprintf (fmt, args);
|
||||
va_end (args);
|
||||
|
||||
MessageBox (NULL, msg, prog_name, MB_OK|MB_ICONERROR);
|
||||
MessageBox (NULL, message, prog_name, MB_OK|MB_ICONERROR);
|
||||
|
||||
#endif /* ! G_OS_WIN32 */
|
||||
|
||||
|
|
27
app/errors.h
27
app/errors.h
|
@ -20,24 +20,17 @@
|
|||
#define __ERRORS_H__
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STACK_TRACE_NEVER,
|
||||
STACK_TRACE_QUERY,
|
||||
STACK_TRACE_ALWAYS
|
||||
} StackTraceMode;
|
||||
void gimp_message_log_func (const gchar *log_domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *message,
|
||||
gpointer data);
|
||||
void gimp_error_log_func (const gchar *domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *message,
|
||||
gpointer data);
|
||||
|
||||
|
||||
void gimp_message_func (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer data);
|
||||
|
||||
void gimp_fatal_error (gchar *, ...);
|
||||
void gimp_terminate (gchar *, ...);
|
||||
|
||||
|
||||
extern StackTraceMode stack_trace_mode;
|
||||
void gimp_fatal_error (gchar *, ...);
|
||||
void gimp_terminate (gchar *, ...);
|
||||
|
||||
|
||||
#endif /* __ERRORS_H__ */
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "colormaps.h"
|
||||
#include "gdisplay_ops.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -117,7 +117,7 @@ gdisplay_close_window (GDisplay *gdisp,
|
|||
/* FIXME: gimp_busy HACK not really appropriate here because we only
|
||||
* want to prevent the busy image and display to be closed. --Mitch
|
||||
*/
|
||||
if (gimp_busy)
|
||||
if (gdisp->gimage->gimp->busy)
|
||||
return;
|
||||
|
||||
/* If the image has been modified, give the user a chance to save
|
||||
|
|
|
@ -164,7 +164,7 @@ gimp_help_internal_not_found_callback (GtkWidget *widget,
|
|||
gimprc.help_browser = HELP_BROWSER_NETSCAPE;
|
||||
|
||||
update = g_list_append (update, "help-browser");
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
}
|
||||
|
||||
gtk_main_quit ();
|
||||
|
|
17
app/gimprc.c
17
app/gimprc.c
|
@ -371,11 +371,6 @@ static gint cur_token;
|
|||
static gint next_token;
|
||||
|
||||
|
||||
/* extern variables */
|
||||
extern gchar *alternate_gimprc;
|
||||
extern gchar *alternate_system_gimprc;
|
||||
|
||||
|
||||
static gchar *
|
||||
gimp_system_rc_file (void)
|
||||
{
|
||||
|
@ -391,7 +386,7 @@ gimp_system_rc_file (void)
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimprc_init (void)
|
||||
gimprc_init (Gimp *gimp)
|
||||
{
|
||||
if (! parse_info.buffer)
|
||||
{
|
||||
|
@ -512,7 +507,7 @@ parse_add_directory_tokens (void)
|
|||
}
|
||||
|
||||
void
|
||||
parse_gimprc (void)
|
||||
gimprc_parse (Gimp *gimp)
|
||||
{
|
||||
gchar *libfilename;
|
||||
gchar *filename;
|
||||
|
@ -524,7 +519,7 @@ parse_gimprc (void)
|
|||
else
|
||||
libfilename = g_strdup (gimp_system_rc_file ());
|
||||
|
||||
if (! parse_gimprc_file (libfilename))
|
||||
if (! gimprc_parse_file (libfilename))
|
||||
g_message ("Can't open '%s' for reading.", libfilename);
|
||||
|
||||
if (alternate_gimprc != NULL)
|
||||
|
@ -533,7 +528,7 @@ parse_gimprc (void)
|
|||
filename = gimp_personal_rc_file ("gimprc");
|
||||
|
||||
if (g_strcasecmp (filename, libfilename) != 0)
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
g_free (filename);
|
||||
g_free (libfilename);
|
||||
|
@ -582,7 +577,7 @@ parse_absolute_gimprc_file (char *filename)
|
|||
}
|
||||
|
||||
gboolean
|
||||
parse_gimprc_file (gchar *filename)
|
||||
gimprc_parse_file (gchar *filename)
|
||||
{
|
||||
gchar *rfilename;
|
||||
gboolean parsed;
|
||||
|
@ -772,7 +767,7 @@ save_gimprc_strings (gchar *token,
|
|||
}
|
||||
|
||||
void
|
||||
save_gimprc (GList **updated_options,
|
||||
gimprc_save (GList **updated_options,
|
||||
GList **conflicting_options)
|
||||
{
|
||||
gchar timestamp[40];
|
||||
|
|
17
app/gimprc.h
17
app/gimprc.h
|
@ -19,6 +19,7 @@
|
|||
#ifndef __GIMPRC_H__
|
||||
#define __GIMPRC_H__
|
||||
|
||||
|
||||
typedef struct _GimpRc GimpRc;
|
||||
|
||||
/* global gimprc variables - need some comments on this stuff */
|
||||
|
@ -67,14 +68,16 @@ struct _GimpRc
|
|||
|
||||
extern GimpRc gimprc;
|
||||
|
||||
/* function prototypes */
|
||||
gboolean gimprc_init (void); /* this has to be called before any file
|
||||
* is parsed
|
||||
*/
|
||||
void parse_gimprc (void);
|
||||
gboolean parse_gimprc_file (gchar *filename);
|
||||
void save_gimprc (GList **updated_options,
|
||||
/* this has to be called before any file is parsed
|
||||
*/
|
||||
gboolean gimprc_init (Gimp *gimp);
|
||||
|
||||
void gimprc_parse (Gimp *gimp);
|
||||
void gimprc_save (GList **updated_options,
|
||||
GList **conflicting_options);
|
||||
|
||||
gboolean gimprc_parse_file (gchar *filename);
|
||||
|
||||
gchar * gimprc_find_token (gchar *token);
|
||||
gchar * gimprc_value_to_str (gchar *name);
|
||||
void save_gimprc_strings (gchar *token,
|
||||
|
|
121
app/gimpunit.c
121
app/gimpunit.c
|
@ -30,7 +30,8 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
#include "unitrc.h"
|
||||
|
||||
|
@ -74,45 +75,45 @@ static GimpUnitDef gimp_unit_percent =
|
|||
FALSE, 0.0, 0, "percent", "%", "%", N_("percent"), N_("percent")
|
||||
};
|
||||
|
||||
static GSList* user_units = NULL;
|
||||
static gint number_of_user_units = 0;
|
||||
|
||||
/* private functions */
|
||||
|
||||
static GimpUnitDef *
|
||||
gimp_unit_get_user_unit (GimpUnit unit)
|
||||
_gimp_unit_get_user_unit (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
return g_slist_nth_data (user_units, unit - GIMP_UNIT_END);
|
||||
return g_list_nth_data (gimp->user_units, unit - GIMP_UNIT_END);
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_units (void)
|
||||
_gimp_unit_get_number_of_units (Gimp *gimp)
|
||||
{
|
||||
return GIMP_UNIT_END + number_of_user_units;
|
||||
return GIMP_UNIT_END + gimp->n_user_units;
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_built_in_units (void)
|
||||
_gimp_unit_get_number_of_built_in_units (Gimp *gimp)
|
||||
{
|
||||
return GIMP_UNIT_END;
|
||||
}
|
||||
|
||||
|
||||
GimpUnit
|
||||
gimp_unit_new (gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural)
|
||||
_gimp_unit_new (Gimp *gimp,
|
||||
gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural)
|
||||
{
|
||||
GimpUnitDef *user_unit;
|
||||
|
||||
user_unit = g_new (GimpUnitDef, 1);
|
||||
user_unit = g_new0 (GimpUnitDef, 1);
|
||||
|
||||
user_unit->delete_on_exit = TRUE;
|
||||
user_unit->factor = factor;
|
||||
user_unit->digits = digits;
|
||||
|
@ -122,70 +123,71 @@ gimp_unit_new (gchar *identifier,
|
|||
user_unit->singular = g_strdup (singular);
|
||||
user_unit->plural = g_strdup (plural);
|
||||
|
||||
user_units = g_slist_append (user_units, user_unit);
|
||||
number_of_user_units++;
|
||||
gimp->user_units = g_list_append (gimp->user_units, user_unit);
|
||||
gimp->n_user_units++;
|
||||
|
||||
return GIMP_UNIT_END + number_of_user_units - 1;
|
||||
return GIMP_UNIT_END + gimp->n_user_units - 1;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gimp_unit_get_deletion_flag (GimpUnit unit)
|
||||
_gimp_unit_get_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)), FALSE);
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)), FALSE);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return FALSE;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->delete_on_exit;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->delete_on_exit;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_unit_set_deletion_flag (GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
_gimp_unit_set_deletion_flag (Gimp *gimp,
|
||||
GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
{
|
||||
g_return_if_fail ((unit >= GIMP_UNIT_END) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)));
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)));
|
||||
|
||||
gimp_unit_get_user_unit (unit)->delete_on_exit =
|
||||
_gimp_unit_get_user_unit (gimp, unit)->delete_on_exit =
|
||||
deletion_flag ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
gdouble
|
||||
gimp_unit_get_factor (GimpUnit unit)
|
||||
_gimp_unit_get_factor (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)),
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].factor);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return gimp_unit_defs[unit].factor;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->factor;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->factor;
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
gimp_unit_get_digits (GimpUnit unit)
|
||||
_gimp_unit_get_digits (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)),
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].digits);
|
||||
|
||||
if (unit < GIMP_UNIT_END)
|
||||
return gimp_unit_defs[unit].digits;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->digits;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->digits;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_identifier (GimpUnit unit)
|
||||
_gimp_unit_get_identifier (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].identifier);
|
||||
|
||||
|
@ -195,15 +197,15 @@ gimp_unit_get_identifier (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.identifier;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->identifier;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->identifier;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_symbol (GimpUnit unit)
|
||||
_gimp_unit_get_symbol (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].symbol);
|
||||
|
||||
|
@ -213,15 +215,15 @@ gimp_unit_get_symbol (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.symbol;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->symbol;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->symbol;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_abbreviation (GimpUnit unit)
|
||||
_gimp_unit_get_abbreviation (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gimp_unit_defs[GIMP_UNIT_INCH].abbreviation);
|
||||
|
||||
|
@ -231,15 +233,15 @@ gimp_unit_get_abbreviation (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gimp_unit_percent.abbreviation;
|
||||
|
||||
return gimp_unit_get_user_unit (unit)->abbreviation;
|
||||
return _gimp_unit_get_user_unit (gimp, unit)->abbreviation;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_singular (GimpUnit unit)
|
||||
_gimp_unit_get_singular (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gettext (gimp_unit_defs[GIMP_UNIT_INCH].singular));
|
||||
|
||||
|
@ -249,15 +251,15 @@ gimp_unit_get_singular (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.singular);
|
||||
|
||||
return gettext (gimp_unit_get_user_unit (unit)->singular);
|
||||
return gettext (_gimp_unit_get_user_unit (gimp, unit)->singular);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_plural (GimpUnit unit)
|
||||
_gimp_unit_get_plural (Gimp *gimp,
|
||||
GimpUnit unit)
|
||||
{
|
||||
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
|
||||
(unit < (GIMP_UNIT_END + number_of_user_units)) ||
|
||||
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
|
||||
(unit == GIMP_UNIT_PERCENT),
|
||||
gettext (gimp_unit_defs[GIMP_UNIT_INCH].plural));
|
||||
|
||||
|
@ -267,25 +269,24 @@ gimp_unit_get_plural (GimpUnit unit)
|
|||
if (unit == GIMP_UNIT_PERCENT)
|
||||
return gettext (gimp_unit_percent.plural);
|
||||
|
||||
return gettext (gimp_unit_get_user_unit (unit)->plural);
|
||||
return gettext (_gimp_unit_get_user_unit (gimp, unit)->plural);
|
||||
}
|
||||
|
||||
|
||||
/* unitrc functions **********/
|
||||
|
||||
void
|
||||
parse_unitrc (void)
|
||||
gimp_unitrc_load (Gimp *gimp)
|
||||
{
|
||||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("unitrc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
save_unitrc (void)
|
||||
gimp_unitrc_save (Gimp *gimp)
|
||||
{
|
||||
gint i;
|
||||
gchar *filename;
|
||||
|
|
|
@ -324,7 +324,7 @@ devices_restore (void)
|
|||
|
||||
/* Augment with information from rc file */
|
||||
filename = gimp_personal_rc_file ("devicerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
if ((device_info = device_info_get_by_id (current_device)) == NULL)
|
||||
|
|
|
@ -617,7 +617,7 @@ file_open_genbutton_callback (GtkWidget *widget,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (the_gimp);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), FALSE);
|
||||
|
||||
/* new mult-file preview make: */
|
||||
|
@ -702,7 +702,7 @@ file_open_genbutton_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (fileload), TRUE);
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (the_gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -69,7 +69,10 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gui_set_busy (Gimp *gimp);
|
||||
static void gui_unset_busy (Gimp *gimp);
|
||||
static void gui_display_new (GimpImage *gimage);
|
||||
|
||||
static gint gui_rotate_the_shield_harmonics (GtkWidget *widget,
|
||||
GdkEvent *eevent,
|
||||
gpointer data);
|
||||
|
@ -121,6 +124,11 @@ void
|
|||
gui_init (Gimp *gimp)
|
||||
{
|
||||
gimp->create_display_func = gui_display_new;
|
||||
gimp->gui_set_busy_func = gui_set_busy;
|
||||
gimp->gui_unset_busy_func = gui_unset_busy;
|
||||
|
||||
if (gimprc.always_restore_session)
|
||||
restore_session = TRUE;
|
||||
|
||||
image_destroy_handler_id =
|
||||
gimp_container_add_handler (gimp->images, "destroy",
|
||||
|
@ -243,6 +251,8 @@ gui_shutdown (Gimp *gimp)
|
|||
pattern_dialog_free ();
|
||||
palette_dialog_free ();
|
||||
gradient_dialog_free ();
|
||||
|
||||
gdisplays_delete ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -277,42 +287,6 @@ gui_exit (Gimp *gimp)
|
|||
image_update_handler_id = 0;
|
||||
}
|
||||
|
||||
void
|
||||
gui_set_busy (Gimp *gimp)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GSList *list;
|
||||
|
||||
/* Canvases */
|
||||
for (list = display_list; list; list = g_slist_next (list))
|
||||
{
|
||||
gdisp = (GDisplay *) list->data;
|
||||
gdisplay_install_override_cursor (gdisp, GDK_WATCH);
|
||||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_idle_all ();
|
||||
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
void
|
||||
gui_unset_busy (Gimp *gimp)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GSList *list;
|
||||
|
||||
/* Canvases */
|
||||
for (list = display_list; list; list = g_slist_next (list))
|
||||
{
|
||||
gdisp = (GDisplay *) list->data;
|
||||
gdisplay_remove_override_cursor (gdisp);
|
||||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_unidle_all ();
|
||||
}
|
||||
|
||||
void
|
||||
gui_really_quit_dialog (void)
|
||||
{
|
||||
|
@ -352,6 +326,42 @@ gui_display_new (GimpImage *gimage)
|
|||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gui_set_busy (Gimp *gimp)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GSList *list;
|
||||
|
||||
/* Canvases */
|
||||
for (list = display_list; list; list = g_slist_next (list))
|
||||
{
|
||||
gdisp = (GDisplay *) list->data;
|
||||
gdisplay_install_override_cursor (gdisp, GDK_WATCH);
|
||||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_idle_all ();
|
||||
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
static void
|
||||
gui_unset_busy (Gimp *gimp)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GSList *list;
|
||||
|
||||
/* Canvases */
|
||||
for (list = display_list; list; list = g_slist_next (list))
|
||||
{
|
||||
gdisp = (GDisplay *) list->data;
|
||||
gdisplay_remove_override_cursor (gdisp);
|
||||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_unidle_all ();
|
||||
}
|
||||
|
||||
static gint
|
||||
gui_rotate_the_shield_harmonics (GtkWidget *widget,
|
||||
GdkEvent *eevent,
|
||||
|
|
|
@ -27,9 +27,6 @@ void gui_post_init (Gimp *gimp);
|
|||
void gui_shutdown (Gimp *gimp);
|
||||
void gui_exit (Gimp *gimp);
|
||||
|
||||
void gui_set_busy (Gimp *gimp);
|
||||
void gui_unset_busy (Gimp *gimp);
|
||||
|
||||
void gui_really_quit_dialog (void);
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "info-dialog.h"
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "app_procs.h"
|
||||
#include "colormaps.h"
|
||||
#include "gdisplay.h"
|
||||
#include "unitrc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
@ -501,12 +502,16 @@ info_window_update_extended (GDisplay *gdisp,
|
|||
else
|
||||
{
|
||||
/* width and height */
|
||||
unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
|
||||
unit_digits = gimp_unit_get_digits (gdisp->gimage->unit);
|
||||
unit_factor = _gimp_unit_get_factor (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
unit_digits = _gimp_unit_get_digits (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
if (iwd->unit_str != gimp_unit_get_abbreviation (gdisp->gimage->unit))
|
||||
if (iwd->unit_str != _gimp_unit_get_abbreviation (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit))
|
||||
{
|
||||
iwd->unit_str = gimp_unit_get_abbreviation (gdisp->gimage->unit);
|
||||
iwd->unit_str = _gimp_unit_get_abbreviation (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (iwd->unit_labels[0]), iwd->unit_str);
|
||||
gtk_label_set_text (GTK_LABEL (iwd->unit_labels[1]), iwd->unit_str);
|
||||
|
@ -608,8 +613,10 @@ info_window_update (GDisplay *gdisp)
|
|||
return;
|
||||
|
||||
/* width and height */
|
||||
unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
|
||||
unit_digits = gimp_unit_get_digits (gdisp->gimage->unit);
|
||||
unit_factor = _gimp_unit_get_factor (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
unit_digits = _gimp_unit_get_digits (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit);
|
||||
|
||||
g_snprintf (iwd->dimensions_str, MAX_BUF,
|
||||
_("%d x %d pixels"),
|
||||
|
@ -618,7 +625,8 @@ info_window_update (GDisplay *gdisp)
|
|||
g_snprintf (format_buf, sizeof (format_buf),
|
||||
"%%.%df x %%.%df %s",
|
||||
unit_digits + 1, unit_digits + 1,
|
||||
gimp_unit_get_plural (gdisp->gimage->unit));
|
||||
_gimp_unit_get_plural (gdisp->gimage->gimp,
|
||||
gdisp->gimage->unit));
|
||||
g_snprintf (iwd->real_dimensions_str, MAX_BUF, format_buf,
|
||||
gdisp->gimage->width * unit_factor / gdisp->gimage->xresolution,
|
||||
gdisp->gimage->height * unit_factor / gdisp->gimage->yresolution);
|
||||
|
|
|
@ -324,7 +324,7 @@ devices_restore (void)
|
|||
|
||||
/* Augment with information from rc file */
|
||||
filename = gimp_personal_rc_file ("devicerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
if ((device_info = device_info_get_by_id (current_device)) == NULL)
|
||||
|
|
|
@ -210,7 +210,7 @@ module_db_init (void)
|
|||
|
||||
/* load the modulerc file */
|
||||
filename = gimp_personal_rc_file ("modulerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
/* Load and initialize gimp modules */
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -813,7 +813,7 @@ prefs_save_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
|
||||
|
||||
if (gimprc.using_xserver_resolution)
|
||||
|
|
|
@ -73,7 +73,7 @@ session_init (void)
|
|||
filename = gimp_personal_rc_file ("sessionrc");
|
||||
app_init_update_status (NULL, filename, -1);
|
||||
|
||||
if (! parse_gimprc_file (filename))
|
||||
if (! gimprc_parse_file (filename))
|
||||
{
|
||||
/* always show L&C&P, Tool Options and Brushes on first invocation */
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
|
||||
|
@ -208,7 +208,7 @@ tips_dialog_destroy (GtkWidget *widget,
|
|||
update = g_list_append (update, "show-tips");
|
||||
remove = g_list_append (remove, "dont-show-tips");
|
||||
old_show_tips = gimprc.show_tips;
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
}
|
||||
g_list_free (update);
|
||||
g_list_free (remove);
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "appenv.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -587,7 +586,7 @@ toolbox_drop_buffer (GtkWidget *widget,
|
|||
GimpViewable *viewable,
|
||||
gpointer data)
|
||||
{
|
||||
if (gimp_busy)
|
||||
if (the_gimp->busy)
|
||||
return;
|
||||
|
||||
gimp_edit_paste_as_new (the_gimp, NULL, GIMP_BUFFER (viewable)->tiles);
|
||||
|
|
|
@ -74,9 +74,11 @@
|
|||
#define PAGE_STYLE(widget) gtk_widget_set_style (widget, page_style)
|
||||
#define TITLE_STYLE(widget) gtk_widget_set_style (widget, title_style)
|
||||
|
||||
static void user_install_dialog_create (UserInstallCallback);
|
||||
static void user_install_continue_callback (GtkWidget *widget, gpointer data);
|
||||
static void user_install_cancel_callback (GtkWidget *widget, gpointer data);
|
||||
|
||||
static void user_install_continue_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void user_install_cancel_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
static gboolean user_install_run (void);
|
||||
static void user_install_tuning (void);
|
||||
|
@ -85,39 +87,6 @@ static void user_install_resolution (void);
|
|||
static void user_install_resolution_done (void);
|
||||
|
||||
|
||||
void
|
||||
user_install_verify (UserInstallCallback user_install_callback)
|
||||
{
|
||||
gboolean properly_installed = TRUE;
|
||||
const gchar *filename;
|
||||
struct stat stat_buf;
|
||||
|
||||
/* gimp_directory now always returns something */
|
||||
filename = gimp_directory ();
|
||||
|
||||
if (stat (filename, &stat_buf) != 0)
|
||||
properly_installed = FALSE;
|
||||
|
||||
/* If there is already a proper installation, invoke the callback */
|
||||
if (properly_installed)
|
||||
{
|
||||
(* user_install_callback) ();
|
||||
}
|
||||
/* Otherwise, prepare for installation */
|
||||
else if (no_interface)
|
||||
{
|
||||
g_print (_("The GIMP is not properly installed for the current user\n"));
|
||||
g_print (_("User installation was skipped because the '--nointerface' flag was encountered\n"));
|
||||
g_print (_("To perform user installation, run the GIMP without the '--nointerface' flag\n"));
|
||||
|
||||
(* user_install_callback) ();
|
||||
}
|
||||
else
|
||||
{
|
||||
user_install_dialog_create (user_install_callback);
|
||||
}
|
||||
}
|
||||
|
||||
/* private stuff */
|
||||
|
||||
static GtkWidget *user_install_dialog = NULL;
|
||||
|
@ -350,9 +319,10 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
static gint notebook_index = 0;
|
||||
UserInstallCallback callback;
|
||||
|
||||
callback = (UserInstallCallback) data;
|
||||
Gimp *gimp;
|
||||
|
||||
gimp = (Gimp *) data;
|
||||
|
||||
switch (notebook_index)
|
||||
{
|
||||
|
@ -382,9 +352,9 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
#ifdef G_OS_WIN32
|
||||
FreeConsole ();
|
||||
#endif
|
||||
gimprc_init ();
|
||||
parse_unitrc ();
|
||||
parse_gimprc ();
|
||||
gimprc_init (gimp);
|
||||
gimp_unitrc_load (gimp);
|
||||
gimprc_parse (gimp);
|
||||
user_install_tuning ();
|
||||
break;
|
||||
|
||||
|
@ -401,7 +371,7 @@ user_install_continue_callback (GtkWidget *widget,
|
|||
gtk_style_unref (title_style);
|
||||
gtk_style_unref (page_style);
|
||||
|
||||
(* callback) ();
|
||||
gtk_main_quit ();
|
||||
return;
|
||||
break;
|
||||
|
||||
|
@ -426,7 +396,7 @@ user_install_cancel_callback (GtkWidget *widget,
|
|||
|
||||
gtk_widget_destroy (continue_button);
|
||||
user_install_notebook_set_page (GTK_NOTEBOOK (notebook), EEK_PAGE);
|
||||
timeout = gtk_timeout_add (1024, (GtkFunction)gtk_exit, (gpointer)0);
|
||||
timeout = gtk_timeout_add (1024, (GtkFunction) gtk_exit, (gpointer) 0);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -534,7 +504,7 @@ user_install_ctree_select_row (GtkWidget *widget,
|
|||
}
|
||||
|
||||
void
|
||||
user_install_dialog_create (UserInstallCallback callback)
|
||||
user_install_dialog_create (Gimp *gimp)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *vbox;
|
||||
|
@ -553,9 +523,9 @@ user_install_dialog_create (UserInstallCallback callback)
|
|||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("Continue"), user_install_continue_callback,
|
||||
callback, NULL, &continue_button, TRUE, FALSE,
|
||||
gimp, NULL, &continue_button, TRUE, FALSE,
|
||||
_("Cancel"), user_install_cancel_callback,
|
||||
callback, 1, &cancel_button, FALSE, TRUE,
|
||||
gimp, 1, &cancel_button, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
|
@ -939,11 +909,11 @@ quote_spaces (char *string)
|
|||
static gboolean
|
||||
user_install_run (void)
|
||||
{
|
||||
FILE *pfp;
|
||||
gchar buffer[2048];
|
||||
struct stat stat_buf;
|
||||
gint err;
|
||||
gboolean executable = TRUE;
|
||||
FILE *pfp;
|
||||
gchar buffer[2048];
|
||||
struct stat stat_buf;
|
||||
gint err;
|
||||
gboolean executable = TRUE;
|
||||
|
||||
/* Generate output */
|
||||
g_snprintf (buffer, sizeof (buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL,
|
||||
|
@ -1328,7 +1298,7 @@ user_install_resolution_done (void)
|
|||
gimprc.monitor_yres = 0.0;
|
||||
}
|
||||
|
||||
save_gimprc (&update, &remove);
|
||||
gimprc_save (&update, &remove);
|
||||
|
||||
if (gimprc.using_xserver_resolution)
|
||||
gdisplay_xserver_resolution (&gimprc.monitor_xres, &gimprc.monitor_yres);
|
||||
|
|
|
@ -16,15 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __USER_INSTALL_H__
|
||||
#define __USER_INSTALL_H__
|
||||
#ifndef __USER_INSTALL_DIALOG_H__
|
||||
#define __USER_INSTALL_DIALOG_H__
|
||||
|
||||
|
||||
/* Install callback function */
|
||||
typedef void (* UserInstallCallback) (void);
|
||||
|
||||
/* Function declarations */
|
||||
void user_install_verify (UserInstallCallback user_install_callback);
|
||||
void user_install_dialog_create (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __USER_INSTALL_H__ */
|
||||
#endif /* __USER_INSTALL_DIALOG_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "unitrc.h"
|
||||
#include "libgimp_glue.h"
|
||||
|
||||
|
||||
|
@ -70,3 +71,97 @@ gimp_palette_get_background (GimpRGB *color)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_units (void)
|
||||
{
|
||||
return _gimp_unit_get_number_of_units (the_gimp);
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_built_in_units (void)
|
||||
{
|
||||
return GIMP_UNIT_END;
|
||||
}
|
||||
|
||||
GimpUnit
|
||||
gimp_unit_new (gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural)
|
||||
{
|
||||
return _gimp_unit_new (the_gimp,
|
||||
identifier,
|
||||
factor,
|
||||
digits,
|
||||
symbol,
|
||||
abbreviation,
|
||||
singular,
|
||||
plural);
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gimp_unit_get_deletion_flag (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_deletion_flag (the_gimp, unit);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_unit_set_deletion_flag (GimpUnit unit,
|
||||
gboolean deletion_flag)
|
||||
{
|
||||
_gimp_unit_set_deletion_flag (the_gimp, unit, deletion_flag);
|
||||
}
|
||||
|
||||
|
||||
gdouble
|
||||
gimp_unit_get_factor (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_factor (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
gimp_unit_get_digits (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_digits (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_identifier (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_identifier (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_symbol (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_symbol (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_abbreviation (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_abbreviation (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_singular (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_singular (the_gimp, unit);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gimp_unit_get_plural (GimpUnit unit)
|
||||
{
|
||||
return _gimp_unit_get_plural (the_gimp, unit);
|
||||
}
|
||||
|
|
|
@ -26,10 +26,30 @@
|
|||
*/
|
||||
|
||||
|
||||
gboolean gimp_palette_set_foreground (const GimpRGB *color);
|
||||
gboolean gimp_palette_get_foreground (GimpRGB *color);
|
||||
gboolean gimp_palette_set_background (const GimpRGB *color);
|
||||
gboolean gimp_palette_get_background (GimpRGB *color);
|
||||
gboolean gimp_palette_set_foreground (const GimpRGB *color);
|
||||
gboolean gimp_palette_get_foreground (GimpRGB *color);
|
||||
gboolean gimp_palette_set_background (const GimpRGB *color);
|
||||
gboolean gimp_palette_get_background (GimpRGB *color);
|
||||
|
||||
gint gimp_unit_get_number_of_units (void);
|
||||
gint gimp_unit_get_number_of_built_in_units (void);
|
||||
GimpUnit gimp_unit_new (gchar *identifier,
|
||||
gdouble factor,
|
||||
gint digits,
|
||||
gchar *symbol,
|
||||
gchar *abbreviation,
|
||||
gchar *singular,
|
||||
gchar *plural);
|
||||
gboolean gimp_unit_get_deletion_flag (GimpUnit unit);
|
||||
void gimp_unit_set_deletion_flag (GimpUnit unit,
|
||||
gboolean deletion_flag);
|
||||
gdouble gimp_unit_get_factor (GimpUnit unit);
|
||||
gint gimp_unit_get_digits (GimpUnit unit);
|
||||
gchar * gimp_unit_get_identifier (GimpUnit unit);
|
||||
gchar * gimp_unit_get_symbol (GimpUnit unit);
|
||||
gchar * gimp_unit_get_abbreviation (GimpUnit unit);
|
||||
gchar * gimp_unit_get_singular (GimpUnit unit);
|
||||
gchar * gimp_unit_get_plural (GimpUnit unit);
|
||||
|
||||
|
||||
#endif /* __LIBGIMP_GLUE_H__ */
|
||||
|
|
127
app/main.c
127
app/main.c
|
@ -45,52 +45,43 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "errors.h"
|
||||
#include "user_install.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
static void gimp_sigfatal_handler (gint sig_num);
|
||||
static void gimp_sigchld_handler (gint sig_num);
|
||||
static void gimp_sigfatal_handler (gint sig_num);
|
||||
static void gimp_sigchld_handler (gint sig_num);
|
||||
#endif
|
||||
|
||||
static void init (void);
|
||||
static void gimp_error_handler (const gchar *domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *msg,
|
||||
gpointer user_data);
|
||||
|
||||
/* GLOBAL data */
|
||||
gboolean no_interface = FALSE;
|
||||
gboolean no_data = FALSE;
|
||||
gboolean no_splash = FALSE;
|
||||
gboolean no_splash_image = FALSE;
|
||||
gboolean be_verbose = FALSE;
|
||||
gboolean use_shm = FALSE;
|
||||
gboolean use_debug_handler = FALSE;
|
||||
gboolean console_messages = FALSE;
|
||||
gboolean restore_session = FALSE;
|
||||
gboolean double_speed = FALSE;
|
||||
gboolean use_mmx = FALSE;
|
||||
|
||||
/* TODO: this should probably go into a header file */
|
||||
#ifdef HAVE_ASM_MMX
|
||||
unsigned long intel_cpu_features(void);
|
||||
unsigned long intel_cpu_features (void);
|
||||
#endif
|
||||
|
||||
MessageHandlerType message_handler = CONSOLE;
|
||||
|
||||
gchar *prog_name = NULL; /* The path name we are invoked with */
|
||||
gchar *alternate_gimprc = NULL;
|
||||
gchar *alternate_system_gimprc = NULL;
|
||||
gchar **batch_cmds = NULL;
|
||||
/* command line options */
|
||||
gboolean no_interface = FALSE;
|
||||
gboolean no_data = FALSE;
|
||||
gboolean no_splash = FALSE;
|
||||
gboolean no_splash_image = FALSE;
|
||||
gboolean be_verbose = FALSE;
|
||||
gboolean use_shm = FALSE;
|
||||
gboolean use_debug_handler = FALSE;
|
||||
gboolean console_messages = FALSE;
|
||||
gboolean restore_session = FALSE;
|
||||
StackTraceMode stack_trace_mode = STACK_TRACE_QUERY;
|
||||
gchar *alternate_gimprc = NULL;
|
||||
gchar *alternate_system_gimprc = NULL;
|
||||
gchar **batch_cmds = NULL;
|
||||
|
||||
/* other global variables */
|
||||
gchar *prog_name = NULL; /* our executable name */
|
||||
MessageHandlerType message_handler = CONSOLE;
|
||||
gboolean double_speed = FALSE;
|
||||
gboolean use_mmx = FALSE;
|
||||
|
||||
/* LOCAL data */
|
||||
static gint gimp_argc = 0;
|
||||
static gchar **gimp_argv = NULL;
|
||||
|
||||
/*
|
||||
* argv processing:
|
||||
|
@ -101,7 +92,6 @@ static gchar **gimp_argv = NULL;
|
|||
* unparsed args are treated as images to load on
|
||||
* startup.
|
||||
*
|
||||
*
|
||||
* The GTK switches are processed first (X switches are
|
||||
* processed here, not by any X routines). Then the
|
||||
* general GIMP switches are processed. Any args
|
||||
|
@ -117,11 +107,11 @@ int
|
|||
main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
gboolean show_version = FALSE;
|
||||
gboolean show_help = FALSE;
|
||||
gint i, j;
|
||||
gboolean show_version = FALSE;
|
||||
gboolean show_help = FALSE;
|
||||
gint i, j;
|
||||
#ifdef HAVE_PUTENV
|
||||
gchar *display_env;
|
||||
gchar *display_env;
|
||||
#endif
|
||||
|
||||
g_atexit (g_mem_profile);
|
||||
|
@ -306,7 +296,9 @@ main (int argc,
|
|||
#endif
|
||||
|
||||
if (show_version)
|
||||
g_print ( "%s %s\n", _("GIMP version"), GIMP_VERSION);
|
||||
{
|
||||
g_print ( "%s %s\n", _("GIMP version"), GIMP_VERSION);
|
||||
}
|
||||
|
||||
if (show_help)
|
||||
{
|
||||
|
@ -355,31 +347,40 @@ main (int argc,
|
|||
|
||||
g_log_set_handler ("Gimp",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Base",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Core",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-PDB",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-XCF",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Widgets",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-Tools",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
g_log_set_handler ("Gimp-GUI",
|
||||
G_LOG_LEVEL_MESSAGE,
|
||||
gimp_message_func,
|
||||
gimp_message_log_func,
|
||||
NULL);
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL,
|
||||
gimp_error_log_func,
|
||||
NULL);
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
@ -412,25 +413,18 @@ main (int argc,
|
|||
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL,
|
||||
gimp_error_handler,
|
||||
NULL);
|
||||
|
||||
/* Keep the command line arguments--for use in gimp_init */
|
||||
gimp_argc = argc - 1;
|
||||
gimp_argv = argv + 1;
|
||||
|
||||
/* Check the user_installation */
|
||||
user_install_verify (init);
|
||||
/* Initialize the application */
|
||||
app_init (argc - 1,
|
||||
argv + 1);
|
||||
|
||||
/* Main application loop */
|
||||
if (!app_exit_finish_done ())
|
||||
if (! app_exit_finish_done ())
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* In case we build this as a windowed application */
|
||||
|
@ -450,27 +444,12 @@ WinMain (struct HINSTANCE__ *hInstance,
|
|||
return main (__argc, __argv);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
static void
|
||||
init (void)
|
||||
{
|
||||
/* Continue initializing */
|
||||
app_init (gimp_argc, gimp_argv);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gimp_error_handler (const gchar *domain,
|
||||
GLogLevelFlags flags,
|
||||
const gchar *msg,
|
||||
gpointer user_data)
|
||||
{
|
||||
gimp_fatal_error ("%s", msg);
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
||||
|
||||
/* gimp core signal handler for fatal signals */
|
||||
|
||||
static void
|
||||
|
@ -512,4 +491,4 @@ gimp_sigchld_handler (gint sig_num)
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* !G_OS_WIN32 */
|
||||
#endif /* ! G_OS_WIN32 */
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -210,7 +210,7 @@ module_db_init (void)
|
|||
|
||||
/* load the modulerc file */
|
||||
filename = gimp_personal_rc_file ("modulerc");
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
g_free (filename);
|
||||
|
||||
/* Load and initialize gimp modules */
|
||||
|
|
|
@ -885,11 +885,11 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
gint xoff = 0;
|
||||
gint yoff = 0;
|
||||
|
||||
gimp_set_busy ();
|
||||
|
||||
gdisp = nav_dialog->gdisp;
|
||||
gimage = gdisp->gimage;
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
/* Min size is 2 */
|
||||
pwidth = nav_dialog->pwidth;
|
||||
pheight = nav_dialog->pheight;
|
||||
|
@ -1034,7 +1034,7 @@ nav_dialog_update_preview (NavigationDialog *nav_dialog)
|
|||
if (preview_buf_notdot)
|
||||
temp_buf_free (preview_buf_notdot);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -351,7 +351,7 @@ image_resize_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
gimp_set_busy_until_idle ();
|
||||
gimp_set_busy_until_idle (gimp);
|
||||
gimp_image_resize (gimage, new_width, new_height, offx, offy);
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,7 @@ image_scale_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
gimp_set_busy_until_idle ();
|
||||
gimp_set_busy_until_idle (gimp);
|
||||
gimp_image_scale (gimage, new_width, new_height);
|
||||
}
|
||||
|
||||
|
@ -3789,7 +3789,7 @@ image_set_unit_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
unit = args[1].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_INCH || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_INCH || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/core-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "appenums.h"
|
||||
#include "appenv.h"
|
||||
|
||||
static ProcRecord message_proc;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/core-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "unitrc.h"
|
||||
|
||||
#include "libgimpbase/gimpunit.h"
|
||||
|
||||
|
@ -68,7 +69,7 @@ unit_get_number_of_units_invoker (Gimp *gimp,
|
|||
Argument *return_args;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_number_of_units_proc, TRUE);
|
||||
return_args[1].value.pdb_int = gimp_unit_get_number_of_units ();
|
||||
return_args[1].value.pdb_int = _gimp_unit_get_number_of_units (gimp);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -105,7 +106,7 @@ unit_get_number_of_built_in_units_invoker (Gimp *gimp,
|
|||
Argument *return_args;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_number_of_built_in_units_proc, TRUE);
|
||||
return_args[1].value.pdb_int = gimp_unit_get_number_of_units ();
|
||||
return_args[1].value.pdb_int = _gimp_unit_get_number_of_units (gimp);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -175,8 +176,8 @@ unit_new_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
unit = gimp_unit_new (identifier, factor, digits, symbol, abbreviation,
|
||||
singular, plural);
|
||||
unit = _gimp_unit_new (gimp, identifier, factor, digits, symbol, abbreviation,
|
||||
singular, plural);
|
||||
|
||||
return_args = procedural_db_return_args (&unit_new_proc, success);
|
||||
|
||||
|
@ -259,13 +260,13 @@ unit_get_deletion_flag_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_deletion_flag_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = gimp_unit_get_deletion_flag (unit);
|
||||
return_args[1].value.pdb_int = _gimp_unit_get_deletion_flag (gimp, unit);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -313,13 +314,13 @@ unit_set_deletion_flag_invoker (Gimp *gimp,
|
|||
gboolean deletion_flag;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
deletion_flag = args[1].value.pdb_int ? TRUE : FALSE;
|
||||
|
||||
if (success)
|
||||
gimp_unit_set_deletion_flag (unit, deletion_flag);
|
||||
_gimp_unit_set_deletion_flag (gimp, unit, deletion_flag);
|
||||
|
||||
return procedural_db_return_args (&unit_set_deletion_flag_proc, success);
|
||||
}
|
||||
|
@ -363,13 +364,13 @@ unit_get_identifier_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_identifier_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_pointer = g_strdup (gimp_unit_get_identifier (unit));
|
||||
return_args[1].value.pdb_pointer = g_strdup (_gimp_unit_get_identifier (gimp, unit));
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -417,13 +418,13 @@ unit_get_factor_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_factor_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_float = gimp_unit_get_factor (unit);
|
||||
return_args[1].value.pdb_float = _gimp_unit_get_factor (gimp, unit);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -471,13 +472,13 @@ unit_get_digits_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_digits_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = gimp_unit_get_digits (unit);
|
||||
return_args[1].value.pdb_int = _gimp_unit_get_digits (gimp, unit);
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -525,13 +526,13 @@ unit_get_symbol_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_symbol_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_pointer = g_strdup (gimp_unit_get_symbol (unit));
|
||||
return_args[1].value.pdb_pointer = g_strdup (_gimp_unit_get_symbol (gimp, unit));
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -579,13 +580,13 @@ unit_get_abbreviation_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_abbreviation_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_pointer = g_strdup (gimp_unit_get_abbreviation (unit));
|
||||
return_args[1].value.pdb_pointer = g_strdup (_gimp_unit_get_abbreviation (gimp, unit));
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -633,13 +634,13 @@ unit_get_singular_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_singular_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_pointer = g_strdup (gimp_unit_get_singular (unit));
|
||||
return_args[1].value.pdb_pointer = g_strdup (_gimp_unit_get_singular (gimp, unit));
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -687,13 +688,13 @@ unit_get_plural_invoker (Gimp *gimp,
|
|||
GimpUnit unit;
|
||||
|
||||
unit = args[0].value.pdb_int;
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= gimp_unit_get_number_of_units ())
|
||||
if (unit < GIMP_UNIT_PIXEL || unit >= _gimp_unit_get_number_of_units (gimp))
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&unit_get_plural_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_pointer = g_strdup (gimp_unit_get_plural (unit));
|
||||
return_args[1].value.pdb_pointer = g_strdup (_gimp_unit_get_plural (gimp, unit));
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -341,7 +341,7 @@ plug_in_init (void)
|
|||
filename = gimp_personal_rc_file ("pluginrc");
|
||||
|
||||
app_init_update_status (_("Resource configuration"), filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
gimprc_parse_file (filename);
|
||||
|
||||
/* query any plug-ins that have changed since we last wrote out
|
||||
* the pluginrc file.
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "errors.h"
|
||||
#include "gdisplay.h"
|
||||
|
@ -923,7 +922,7 @@ blend (GimpImage *gimage,
|
|||
gint bytes;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
has_selection = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
||||
|
@ -958,7 +957,7 @@ blend (GimpImage *gimage,
|
|||
/* free the temporary buffer */
|
||||
tile_manager_destroy (buf_tiles);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static gdouble
|
||||
|
|
|
@ -39,11 +39,7 @@
|
|||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimppattern.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "gimpbucketfilltool.h"
|
||||
#include "gimpfuzzyselecttool.h"
|
||||
|
@ -51,7 +47,9 @@
|
|||
#include "paint_options.h"
|
||||
#include "tool_manager.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
@ -535,7 +533,7 @@ bucket_fill (GimpImage *gimage,
|
|||
pat_buf = pattern->mask;
|
||||
}
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
bytes = gimp_drawable_bytes (drawable);
|
||||
has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
|
@ -611,7 +609,7 @@ bucket_fill (GimpImage *gimage,
|
|||
if (new_buf)
|
||||
temp_buf_free (pat_buf);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gimage->gimp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "tool_manager.h"
|
||||
#include "tool_options.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
|
|
|
@ -31,15 +31,12 @@
|
|||
#include "base/tile-manager.h"
|
||||
#include "base/tile.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "gimpeditselectiontool.h"
|
||||
#include "gimpfuzzyselecttool.h"
|
||||
#include "gimptool.h"
|
||||
|
@ -47,6 +44,9 @@
|
|||
#include "tool_options.h"
|
||||
#include "tool_manager.h"
|
||||
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define WANT_FUZZY_SELECT_BITS
|
||||
|
@ -631,7 +631,7 @@ fuzzy_select_calculate (GimpFuzzySelectTool *fuzzy_sel,
|
|||
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gdisp->gimage->gimp);
|
||||
|
||||
use_offsets = fuzzy_options->sample_merged ? FALSE : TRUE;
|
||||
|
||||
|
@ -677,7 +677,7 @@ fuzzy_select_calculate (GimpFuzzySelectTool *fuzzy_sel,
|
|||
/* free boundary segments */
|
||||
g_free (bsegs);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gdisp->gimage->gimp);
|
||||
|
||||
return segs;
|
||||
}
|
||||
|
|
|
@ -31,15 +31,12 @@
|
|||
#include "base/tile-manager.h"
|
||||
#include "base/tile.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "gimpeditselectiontool.h"
|
||||
#include "gimpfuzzyselecttool.h"
|
||||
#include "gimptool.h"
|
||||
|
@ -47,6 +44,9 @@
|
|||
#include "tool_options.h"
|
||||
#include "tool_manager.h"
|
||||
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
#define WANT_FUZZY_SELECT_BITS
|
||||
|
@ -631,7 +631,7 @@ fuzzy_select_calculate (GimpFuzzySelectTool *fuzzy_sel,
|
|||
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gdisp->gimage->gimp);
|
||||
|
||||
use_offsets = fuzzy_options->sample_merged ? FALSE : TRUE;
|
||||
|
||||
|
@ -677,7 +677,7 @@ fuzzy_select_calculate (GimpFuzzySelectTool *fuzzy_sel,
|
|||
/* free boundary segments */
|
||||
g_free (bsegs);
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gdisp->gimage->gimp);
|
||||
|
||||
return segs;
|
||||
}
|
||||
|
|
|
@ -558,7 +558,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
gboolean new_layer;
|
||||
gint i, x, y;
|
||||
|
||||
gimp_set_busy ();
|
||||
gimp_set_busy (gdisp->gimage->gimp);
|
||||
|
||||
tool = GIMP_TOOL (gt_tool);
|
||||
|
||||
|
@ -655,7 +655,7 @@ gimp_transform_tool_doit (GimpTransformTool *gt_tool,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_unset_busy ();
|
||||
gimp_unset_busy (gdisp->gimage->gimp);
|
||||
|
||||
gdisplays_flush ();
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "gimppenciltool.h"
|
||||
#include "gimpsmudgetool.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -581,7 +580,7 @@ tool_manager_tool_changed (GimpContext *user_context,
|
|||
tool_manager = (GimpToolManager *) data;
|
||||
|
||||
/* FIXME: gimp_busy HACK */
|
||||
if (gimp_busy)
|
||||
if (user_context->gimp->busy)
|
||||
{
|
||||
/* there may be contexts waiting for the user_context's "tool_changed"
|
||||
* signal, so stop emitting it.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue