mirror of https://github.com/GNOME/gimp.git
gimprc.in replaced "color-cube" by "min-colors".
2000-04-30 Michael Natterer <mitch@gimp.org> * gimprc.in * app/gimprc.[ch]: replaced "color-cube" by "min-colors". * app/app_procs.c: read unitrc/gimprc before displaying the splash. * app/colormaps.c: set min_colors and install_cmap before initializing GdkRGB. * app/gimprc.[ch] * app/gimpunit.c: don't call the splash's progress_update function. * app/plug_in.c: pass min_colors instead of color_cube to plugins. * app/preferences_dialog.c: widget for min_colors. * libgimp/gimp.[ch]: s/color_cube/min_colors/ but left gimp_color_cube() there for source level compatibility. * libgimp/gimpprotocol.[ch]: changed the GPConfig message accordinly and increased the gimp protocol version number because the change breaks binary compatibility. Also actually pass the use_xshm variable over the wire (was only in the GPConfig struct before). Was it the right thing to do to increase the version number?? * libgimp/gimpui.c (gimp_ui_init): use the same code as the app for initializing GdkRGB. Never explicitly activate Gdk's SHM usage (only switch it off). * app/main.c * libgimp/gimp.c: reverted the handling of all signals except SIGCHLD back to plain old signal() because those signals are fatal anyway and sigaction() as used by gimp_signal_*() made debugging (stacktrace) impossible. * plug-ins/AlienMap/AlienMap.c * plug-ins/AlienMap2/AlienMap2.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/bmp/bmp.c * plug-ins/borderaverage/borderaverage.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/faxg3/faxg3.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/fp/fp.c * plug-ins/fp/fp_gtk.c * plug-ins/gdyntext/Makefile.am * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gfli/gfli.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/Makefile.am * plug-ins/imagemap/imap_main.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/print/print.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-server.c * plug-ins/sel2path/Makefile.am * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/sinus/sinus.c * plug-ins/struc/struc.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjt.c: use gimp_ui_init(). * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off, never on. Don't use gimp_ui_init() here because of libgck.
This commit is contained in:
parent
ab4e420026
commit
ef751a454d
81
ChangeLog
81
ChangeLog
|
@ -1,4 +1,85 @@
|
|||
2000-04-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* gimprc.in
|
||||
* app/gimprc.[ch]: replaced "color-cube" by "min-colors".
|
||||
|
||||
* app/app_procs.c: read unitrc/gimprc before displaying the splash.
|
||||
|
||||
* app/colormaps.c: set min_colors and install_cmap before
|
||||
initializing GdkRGB.
|
||||
|
||||
* app/gimprc.[ch]
|
||||
* app/gimpunit.c: don't call the splash's progress_update function.
|
||||
|
||||
* app/plug_in.c: pass min_colors instead of color_cube to plugins.
|
||||
|
||||
* app/preferences_dialog.c: widget for min_colors.
|
||||
|
||||
* libgimp/gimp.[ch]: s/color_cube/min_colors/ but left
|
||||
gimp_color_cube() there for source level compatibility.
|
||||
|
||||
* libgimp/gimpprotocol.[ch]: changed the GPConfig message
|
||||
accordinly and increased the gimp protocol version number because
|
||||
the change breaks binary compatibility. Also actually pass the
|
||||
use_xshm variable over the wire (was only in the GPConfig struct
|
||||
before).
|
||||
|
||||
Was it the right thing to do to increase the version number??
|
||||
|
||||
* libgimp/gimpui.c (gimp_ui_init): use the same code as the app
|
||||
for initializing GdkRGB. Never explicitly activate Gdk's SHM
|
||||
usage (only switch it off).
|
||||
|
||||
* app/main.c
|
||||
* libgimp/gimp.c: reverted the handling of all signals except
|
||||
SIGCHLD back to plain old signal() because those signals are
|
||||
fatal anyway and sigaction() as used by gimp_signal_*() made
|
||||
debugging (stacktrace) impossible.
|
||||
|
||||
* plug-ins/AlienMap/AlienMap.c
|
||||
* plug-ins/AlienMap2/AlienMap2.c
|
||||
* plug-ins/FractalExplorer/Dialogs.c
|
||||
* plug-ins/bmp/bmp.c
|
||||
* plug-ins/borderaverage/borderaverage.c
|
||||
* plug-ins/dbbrowser/dbbrowser.c
|
||||
* plug-ins/faxg3/faxg3.c
|
||||
* plug-ins/fits/fits.c
|
||||
* plug-ins/flame/flame.c
|
||||
* plug-ins/fp/fp.c
|
||||
* plug-ins/fp/fp_gtk.c
|
||||
* plug-ins/gdyntext/Makefile.am
|
||||
* plug-ins/gdyntext/gdyntext_ui.c
|
||||
* plug-ins/gfig/gfig.c
|
||||
* plug-ins/gflare/gflare.c
|
||||
* plug-ins/gfli/gfli.c
|
||||
* plug-ins/gimpressionist/gimpressionist.c
|
||||
* plug-ins/helpbrowser/helpbrowser.c
|
||||
* plug-ins/ifscompose/ifscompose.c
|
||||
* plug-ins/imagemap/Makefile.am
|
||||
* plug-ins/imagemap/imap_main.c
|
||||
* plug-ins/maze/maze_face.c
|
||||
* plug-ins/mosaic/mosaic.c
|
||||
* plug-ins/pagecurl/pagecurl.c
|
||||
* plug-ins/print/print.c
|
||||
* plug-ins/rcm/rcm_dialog.c
|
||||
* plug-ins/script-fu/script-fu-console.c
|
||||
* plug-ins/script-fu/script-fu-scripts.c
|
||||
* plug-ins/script-fu/script-fu-server.c
|
||||
* plug-ins/sel2path/Makefile.am
|
||||
* plug-ins/sel2path/sel2path.c
|
||||
* plug-ins/sgi/sgi.c
|
||||
* plug-ins/sinus/sinus.c
|
||||
* plug-ins/struc/struc.c
|
||||
* plug-ins/webbrowser/webbrowser.c
|
||||
* plug-ins/winsnap/winsnap.c
|
||||
* plug-ins/xjt/xjt.c: use gimp_ui_init().
|
||||
|
||||
* plug-ins/Lighting/lighting_ui.c
|
||||
* plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off,
|
||||
never on. Don't use gimp_ui_init() here because of libgck.
|
||||
|
||||
2000-04-30 Garry R. Osgood <gosgood@idt.net>
|
||||
|
||||
* app/main.c
|
||||
* libgimp/gimpsignal.c [Documentation only]
|
||||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -493,6 +493,12 @@ app_init (void)
|
|||
|
||||
gtk_rc_parse (filename);
|
||||
|
||||
if (parse_buffers_init ())
|
||||
{
|
||||
parse_unitrc (); /* this needs to be done before gimprc loading */
|
||||
parse_gimprc (); /* parse the local GIMP configuration file */
|
||||
}
|
||||
|
||||
if (!no_interface)
|
||||
get_standard_colormaps ();
|
||||
|
||||
|
@ -518,12 +524,6 @@ app_init (void)
|
|||
color_display_init ();
|
||||
|
||||
RESET_BAR();
|
||||
if (parse_buffers_init ())
|
||||
{
|
||||
parse_unitrc (); /* this needs to be done before gimprc loading */
|
||||
parse_gimprc (); /* parse the local GIMP configuration file */
|
||||
}
|
||||
|
||||
if (always_restore_session)
|
||||
restore_session = TRUE;
|
||||
|
||||
|
|
|
@ -58,6 +58,14 @@ get_color (int red,
|
|||
void
|
||||
get_standard_colormaps (void)
|
||||
{
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
gdk_rgb_set_min_colors (min_colors);
|
||||
gdk_rgb_set_install (install_cmap);
|
||||
|
||||
g_visual = gdk_rgb_get_visual ();
|
||||
g_cmap = gdk_rgb_get_cmap ();
|
||||
|
||||
|
|
|
@ -279,7 +279,6 @@ parse_unitrc (void)
|
|||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("unitrc");
|
||||
app_init_update_status (NULL, filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ static gchar * old_default_comment;
|
|||
static gint old_default_dot_for_dot;
|
||||
static gint old_stingy_memory_use;
|
||||
static gint old_tile_cache_size;
|
||||
static gint old_min_colors;
|
||||
static gint old_install_cmap;
|
||||
static gint old_cycled_marching_ants;
|
||||
static gint old_last_opened_size;
|
||||
|
@ -130,6 +131,7 @@ static gint old_default_threshold;
|
|||
|
||||
/* variables which can't be changed on the fly */
|
||||
static gint edit_stingy_memory_use;
|
||||
static gint edit_min_colors;
|
||||
static gint edit_install_cmap;
|
||||
static gint edit_cycled_marching_ants;
|
||||
static gint edit_last_opened_size;
|
||||
|
@ -161,6 +163,7 @@ static GtkWidget * prefs_dlg = NULL;
|
|||
so they're set on the fly is not hard).
|
||||
|
||||
stingy-memory-use
|
||||
min-colors
|
||||
install-cmap
|
||||
cycled-marching-ants
|
||||
last-opened-size
|
||||
|
@ -306,6 +309,7 @@ file_prefs_check_settings (void)
|
|||
|
||||
/* ...then check if we need a restart notification */
|
||||
if (edit_stingy_memory_use != old_stingy_memory_use ||
|
||||
edit_min_colors != old_min_colors ||
|
||||
edit_install_cmap != old_install_cmap ||
|
||||
edit_cycled_marching_ants != old_cycled_marching_ants ||
|
||||
edit_last_opened_size != old_last_opened_size ||
|
||||
|
@ -437,6 +441,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
PrefsState state;
|
||||
|
||||
gint save_stingy_memory_use;
|
||||
gint save_min_colors;
|
||||
gint save_install_cmap;
|
||||
gint save_cycled_marching_ants;
|
||||
gint save_last_opened_size;
|
||||
|
@ -486,6 +491,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* Save variables so that we can restore them later */
|
||||
save_stingy_memory_use = stingy_memory_use;
|
||||
save_min_colors = min_colors;
|
||||
save_install_cmap = install_cmap;
|
||||
save_cycled_marching_ants = cycled_marching_ants;
|
||||
save_last_opened_size = last_opened_size;
|
||||
|
@ -678,6 +684,11 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
stingy_memory_use = edit_stingy_memory_use;
|
||||
update = g_list_append (update, "stingy-memory-use");
|
||||
}
|
||||
if (edit_min_colors != old_min_colors)
|
||||
{
|
||||
min_colors = edit_min_colors;
|
||||
update = g_list_append (update, "min-colors");
|
||||
}
|
||||
if (edit_install_cmap != old_install_cmap)
|
||||
{
|
||||
install_cmap = edit_install_cmap;
|
||||
|
@ -779,6 +790,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* restore variables which must not change */
|
||||
stingy_memory_use = save_stingy_memory_use;
|
||||
min_colors = save_min_colors;
|
||||
install_cmap = save_install_cmap;
|
||||
cycled_marching_ants = save_cycled_marching_ants;
|
||||
last_opened_size = save_last_opened_size;
|
||||
|
@ -873,6 +885,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
|||
|
||||
/* restore values which need a restart */
|
||||
edit_stingy_memory_use = old_stingy_memory_use;
|
||||
edit_min_colors = old_min_colors;
|
||||
edit_install_cmap = old_install_cmap;
|
||||
edit_cycled_marching_ants = old_cycled_marching_ants;
|
||||
edit_last_opened_size = old_last_opened_size;
|
||||
|
@ -1337,6 +1350,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
* copy config vals to edit variables.
|
||||
*/
|
||||
edit_stingy_memory_use = stingy_memory_use;
|
||||
edit_min_colors = min_colors;
|
||||
edit_install_cmap = install_cmap;
|
||||
edit_cycled_marching_ants = cycled_marching_ants;
|
||||
edit_last_opened_size = last_opened_size;
|
||||
|
@ -1404,6 +1418,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
|
||||
/* values which will need a restart */
|
||||
old_stingy_memory_use = edit_stingy_memory_use;
|
||||
old_min_colors = edit_min_colors;
|
||||
old_install_cmap = edit_install_cmap;
|
||||
old_cycled_marching_ants = edit_cycled_marching_ants;
|
||||
old_last_opened_size = edit_last_opened_size;
|
||||
|
@ -1715,6 +1730,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
if (g_visual->depth != 8)
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (vbox2->parent), FALSE);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
spinbutton =
|
||||
gimp_spin_button_new (&adjustment, edit_min_colors,
|
||||
27.0,
|
||||
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
|
||||
1.0, 8.0, 0.0, 1.0, 0.0);
|
||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
&edit_min_colors);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Minimum Number of Colors:"), 1.0, 0.5,
|
||||
spinbutton, 1, TRUE);
|
||||
|
||||
button = gtk_check_button_new_with_label(_("Install Colormap"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
edit_install_cmap);
|
||||
|
|
68
app/gimprc.c
68
app/gimprc.c
|
@ -70,7 +70,6 @@ typedef enum
|
|||
TT_MEMSIZE,
|
||||
TT_IMAGETYPE,
|
||||
TT_INTERP,
|
||||
TT_XCOLORCUBE,
|
||||
TT_XPREVSIZE,
|
||||
TT_XUNIT,
|
||||
TT_XPLUGIN,
|
||||
|
@ -127,7 +126,7 @@ gboolean perfectmouse = FALSE; /* off (fast and sloppy) */
|
|||
gint transparency_size = 1; /* Medium sized */
|
||||
gint levels_of_undo = 2; /* 2 levels of undo default */
|
||||
gint last_opened_size = 4; /* 4 documents in the MRU list */
|
||||
gint color_cube_shades[4] = { 6, 7, 4, 24 };
|
||||
gint min_colors = 144; /* 6*6*4 */
|
||||
gboolean install_cmap = FALSE;
|
||||
gint cycled_marching_ants = 0;
|
||||
gint default_threshold = 15;
|
||||
|
@ -188,7 +187,6 @@ static gint parse_position (gpointer val1p, gpointer val2p);
|
|||
static gint parse_mem_size (gpointer val1p, gpointer val2p);
|
||||
static gint parse_image_type (gpointer val1p, gpointer val2p);
|
||||
static gint parse_interpolation_type (gpointer val1p, gpointer val2p);
|
||||
static gint parse_color_cube (gpointer val1p, gpointer val2p);
|
||||
static gint parse_preview_size (gpointer val1p, gpointer val2p);
|
||||
static gint parse_nav_preview_size (gpointer val1p, gpointer val2p);
|
||||
static gint parse_units (gpointer val1p, gpointer val2p);
|
||||
|
@ -219,7 +217,6 @@ static inline gchar * position_to_str (gpointer val1p, gpointer val2p)
|
|||
static inline gchar * mem_size_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * image_type_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * interpolation_type_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * color_cube_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * preview_size_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * nav_preview_size_to_str (gpointer val1p, gpointer val2p);
|
||||
static inline gchar * units_to_str (gpointer val1p, gpointer val2p);
|
||||
|
@ -263,7 +260,6 @@ static ParseFunc funcs[] =
|
|||
{ "default-palette", TT_STRING, &default_palette, NULL },
|
||||
{ "default-gradient", TT_STRING, &default_gradient, NULL },
|
||||
{ "gamma-correction", TT_DOUBLE, &gamma_val, NULL },
|
||||
{ "color-cube", TT_XCOLORCUBE, NULL, NULL },
|
||||
{ "tile-cache-size", TT_MEMSIZE, &tile_cache_size, NULL },
|
||||
{ "marching-ants-speed", TT_INT, &marching_speed, NULL },
|
||||
{ "last-opened-size", TT_INT, &last_opened_size, NULL },
|
||||
|
@ -271,6 +267,7 @@ static ParseFunc funcs[] =
|
|||
{ "transparency-type", TT_INT, &transparency_type, NULL },
|
||||
{ "perfect-mouse", TT_BOOLEAN, &perfectmouse, NULL },
|
||||
{ "transparency-size", TT_INT, &transparency_size, NULL },
|
||||
{ "min-colors", TT_INT, &min_colors, NULL },
|
||||
{ "install-colormap", TT_BOOLEAN, &install_cmap, NULL },
|
||||
{ "colormap-cycling", TT_BOOLEAN, &cycled_marching_ants, NULL },
|
||||
{ "default-threshold", TT_INT, &default_threshold, NULL },
|
||||
|
@ -413,7 +410,6 @@ parse_gimprc (void)
|
|||
else
|
||||
libfilename = g_strdup (gimp_system_rc_file ());
|
||||
|
||||
app_init_update_status(_("Resource configuration"), libfilename, -1);
|
||||
parse_gimprc_file (libfilename);
|
||||
|
||||
if (alternate_gimprc != NULL)
|
||||
|
@ -422,10 +418,7 @@ parse_gimprc (void)
|
|||
filename = gimp_personal_rc_file ("gimprc");
|
||||
|
||||
if (g_strcasecmp (filename, libfilename) != 0)
|
||||
{
|
||||
app_init_update_status(NULL, filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
}
|
||||
parse_gimprc_file (filename);
|
||||
|
||||
g_free (filename);
|
||||
g_free (libfilename);
|
||||
|
@ -852,8 +845,6 @@ parse_statement (void)
|
|||
return parse_image_type (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_INTERP:
|
||||
return parse_interpolation_type (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XCOLORCUBE:
|
||||
return parse_color_cube (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XPREVSIZE:
|
||||
return parse_preview_size (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XNAVPREVSIZE:
|
||||
|
@ -1227,48 +1218,6 @@ parse_interpolation_type (gpointer val1p,
|
|||
return OK;
|
||||
}
|
||||
|
||||
static int
|
||||
parse_color_cube (gpointer val1p,
|
||||
gpointer val2p)
|
||||
{
|
||||
int token;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
color_cube_shades[0] = token_num;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
color_cube_shades[1] = token_num;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
color_cube_shades[2] = token_num;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_NUMBER))
|
||||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
color_cube_shades[3] = token_num;
|
||||
|
||||
token = peek_next_token ();
|
||||
if (!token || (token != TOKEN_RIGHT_PAREN))
|
||||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int
|
||||
parse_preview_size (gpointer val1p,
|
||||
gpointer val2p)
|
||||
|
@ -2571,8 +2520,6 @@ value_to_str (char *name)
|
|||
return image_type_to_str (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_INTERP:
|
||||
return interpolation_type_to_str (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XCOLORCUBE:
|
||||
return color_cube_to_str (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XPREVSIZE:
|
||||
return preview_size_to_str (funcs[i].val1p, funcs[i].val2p);
|
||||
case TT_XNAVPREVSIZE:
|
||||
|
@ -2707,15 +2654,6 @@ interpolation_type_to_str (gpointer val1p,
|
|||
}
|
||||
}
|
||||
|
||||
static inline char *
|
||||
color_cube_to_str (gpointer val1p,
|
||||
gpointer val2p)
|
||||
{
|
||||
return g_strdup_printf ("%d %d %d %d",
|
||||
color_cube_shades[0], color_cube_shades[1],
|
||||
color_cube_shades[2], color_cube_shades[3]);
|
||||
}
|
||||
|
||||
static inline char *
|
||||
preview_size_to_str (gpointer val1p,
|
||||
gpointer val2p)
|
||||
|
|
|
@ -19,9 +19,12 @@
|
|||
#define __GIMPRC_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include "libgimp/gimpunit.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "libgimp/gimpunit.h"
|
||||
|
||||
|
||||
/* global gimprc variables */
|
||||
extern gchar *plug_in_path;
|
||||
extern gchar *temp_path;
|
||||
|
@ -45,7 +48,7 @@ extern gint transparency_type;
|
|||
extern gboolean perfectmouse;
|
||||
extern gint transparency_size;
|
||||
extern gint levels_of_undo;
|
||||
extern gint color_cube_shades[];
|
||||
extern gint min_colors;
|
||||
extern gboolean install_cmap;
|
||||
extern gboolean cycled_marching_ants;
|
||||
extern gint default_threshold;
|
||||
|
|
|
@ -279,7 +279,6 @@ parse_unitrc (void)
|
|||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("unitrc");
|
||||
app_init_update_status (NULL, filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -100,6 +100,7 @@ static gchar * old_default_comment;
|
|||
static gint old_default_dot_for_dot;
|
||||
static gint old_stingy_memory_use;
|
||||
static gint old_tile_cache_size;
|
||||
static gint old_min_colors;
|
||||
static gint old_install_cmap;
|
||||
static gint old_cycled_marching_ants;
|
||||
static gint old_last_opened_size;
|
||||
|
@ -130,6 +131,7 @@ static gint old_default_threshold;
|
|||
|
||||
/* variables which can't be changed on the fly */
|
||||
static gint edit_stingy_memory_use;
|
||||
static gint edit_min_colors;
|
||||
static gint edit_install_cmap;
|
||||
static gint edit_cycled_marching_ants;
|
||||
static gint edit_last_opened_size;
|
||||
|
@ -161,6 +163,7 @@ static GtkWidget * prefs_dlg = NULL;
|
|||
so they're set on the fly is not hard).
|
||||
|
||||
stingy-memory-use
|
||||
min-colors
|
||||
install-cmap
|
||||
cycled-marching-ants
|
||||
last-opened-size
|
||||
|
@ -306,6 +309,7 @@ file_prefs_check_settings (void)
|
|||
|
||||
/* ...then check if we need a restart notification */
|
||||
if (edit_stingy_memory_use != old_stingy_memory_use ||
|
||||
edit_min_colors != old_min_colors ||
|
||||
edit_install_cmap != old_install_cmap ||
|
||||
edit_cycled_marching_ants != old_cycled_marching_ants ||
|
||||
edit_last_opened_size != old_last_opened_size ||
|
||||
|
@ -437,6 +441,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
PrefsState state;
|
||||
|
||||
gint save_stingy_memory_use;
|
||||
gint save_min_colors;
|
||||
gint save_install_cmap;
|
||||
gint save_cycled_marching_ants;
|
||||
gint save_last_opened_size;
|
||||
|
@ -486,6 +491,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* Save variables so that we can restore them later */
|
||||
save_stingy_memory_use = stingy_memory_use;
|
||||
save_min_colors = min_colors;
|
||||
save_install_cmap = install_cmap;
|
||||
save_cycled_marching_ants = cycled_marching_ants;
|
||||
save_last_opened_size = last_opened_size;
|
||||
|
@ -678,6 +684,11 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
stingy_memory_use = edit_stingy_memory_use;
|
||||
update = g_list_append (update, "stingy-memory-use");
|
||||
}
|
||||
if (edit_min_colors != old_min_colors)
|
||||
{
|
||||
min_colors = edit_min_colors;
|
||||
update = g_list_append (update, "min-colors");
|
||||
}
|
||||
if (edit_install_cmap != old_install_cmap)
|
||||
{
|
||||
install_cmap = edit_install_cmap;
|
||||
|
@ -779,6 +790,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* restore variables which must not change */
|
||||
stingy_memory_use = save_stingy_memory_use;
|
||||
min_colors = save_min_colors;
|
||||
install_cmap = save_install_cmap;
|
||||
cycled_marching_ants = save_cycled_marching_ants;
|
||||
last_opened_size = save_last_opened_size;
|
||||
|
@ -873,6 +885,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
|||
|
||||
/* restore values which need a restart */
|
||||
edit_stingy_memory_use = old_stingy_memory_use;
|
||||
edit_min_colors = old_min_colors;
|
||||
edit_install_cmap = old_install_cmap;
|
||||
edit_cycled_marching_ants = old_cycled_marching_ants;
|
||||
edit_last_opened_size = old_last_opened_size;
|
||||
|
@ -1337,6 +1350,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
* copy config vals to edit variables.
|
||||
*/
|
||||
edit_stingy_memory_use = stingy_memory_use;
|
||||
edit_min_colors = min_colors;
|
||||
edit_install_cmap = install_cmap;
|
||||
edit_cycled_marching_ants = cycled_marching_ants;
|
||||
edit_last_opened_size = last_opened_size;
|
||||
|
@ -1404,6 +1418,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
|
||||
/* values which will need a restart */
|
||||
old_stingy_memory_use = edit_stingy_memory_use;
|
||||
old_min_colors = edit_min_colors;
|
||||
old_install_cmap = edit_install_cmap;
|
||||
old_cycled_marching_ants = edit_cycled_marching_ants;
|
||||
old_last_opened_size = edit_last_opened_size;
|
||||
|
@ -1715,6 +1730,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
if (g_visual->depth != 8)
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (vbox2->parent), FALSE);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
spinbutton =
|
||||
gimp_spin_button_new (&adjustment, edit_min_colors,
|
||||
27.0,
|
||||
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
|
||||
1.0, 8.0, 0.0, 1.0, 0.0);
|
||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
&edit_min_colors);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Minimum Number of Colors:"), 1.0, 0.5,
|
||||
spinbutton, 1, TRUE);
|
||||
|
||||
button = gtk_check_button_new_with_label(_("Install Colormap"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
edit_install_cmap);
|
||||
|
|
22
app/main.c
22
app/main.c
|
@ -334,15 +334,15 @@ main (int argc,
|
|||
|
||||
/* Handle some signals */
|
||||
|
||||
gimp_signal_syscallrestart (SIGHUP, on_signal);
|
||||
gimp_signal_syscallrestart (SIGINT, on_signal);
|
||||
gimp_signal_syscallrestart (SIGQUIT, on_signal);
|
||||
gimp_signal_syscallrestart (SIGABRT, on_signal);
|
||||
gimp_signal_syscallrestart (SIGBUS, on_signal);
|
||||
gimp_signal_syscallrestart (SIGSEGV, on_signal);
|
||||
gimp_signal_syscallrestart (SIGPIPE, on_signal);
|
||||
gimp_signal_syscallrestart (SIGTERM, on_signal);
|
||||
gimp_signal_syscallrestart (SIGFPE, on_signal);
|
||||
signal (SIGHUP, on_signal);
|
||||
signal (SIGINT, on_signal);
|
||||
signal (SIGQUIT, on_signal);
|
||||
signal (SIGABRT, on_signal);
|
||||
signal (SIGBUS, on_signal);
|
||||
signal (SIGSEGV, on_signal);
|
||||
signal (SIGPIPE, on_signal);
|
||||
signal (SIGTERM, on_signal);
|
||||
signal (SIGFPE, on_signal);
|
||||
|
||||
#ifndef __EMX__ /* OS/2 may not support SA_NOCLDSTOP -GRO */
|
||||
|
||||
|
@ -415,11 +415,11 @@ on_error (const gchar *domain,
|
|||
|
||||
/* gimp core signal handler for fatal signals */
|
||||
|
||||
static gboolean caught_fatal_sig = FALSE;
|
||||
|
||||
static void
|
||||
on_signal (gint sig_num)
|
||||
{
|
||||
static gboolean caught_fatal_sig = FALSE;
|
||||
|
||||
if (caught_fatal_sig)
|
||||
kill (getpid (), sig_num);
|
||||
caught_fatal_sig = TRUE;
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -1253,22 +1253,23 @@ plug_in_run (ProcRecord *proc_rec,
|
|||
|
||||
plug_in_push (plug_in);
|
||||
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.version = GP_VERSION;
|
||||
config.tile_width = TILE_WIDTH;
|
||||
config.tile_height = TILE_HEIGHT;
|
||||
config.shm_ID = shm_ID;
|
||||
config.gamma = gamma_val;
|
||||
config.install_cmap = install_cmap;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.color_cube[0] = color_cube_shades[0];
|
||||
config.color_cube[1] = color_cube_shades[1];
|
||||
config.color_cube[2] = color_cube_shades[2];
|
||||
config.color_cube[3] = color_cube_shades[3];
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
config.use_xshm = gdk_get_use_xshm ();
|
||||
config.gdisp_ID = gdisp_ID;
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
if (gtk_check_version (1, 2, 8))
|
||||
config.min_colors = CLAMP (min_colors, 27, 216);
|
||||
else
|
||||
config.min_colors = CLAMP (min_colors, 27, 256);
|
||||
|
||||
proc_run.name = proc_rec->name;
|
||||
proc_run.nparams = argc;
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
|
||||
|
||||
if (!gp_config_write (current_writechannel, &config) ||
|
||||
!gp_proc_run_write (current_writechannel, &proc_run) ||
|
||||
|
|
|
@ -100,6 +100,7 @@ static gchar * old_default_comment;
|
|||
static gint old_default_dot_for_dot;
|
||||
static gint old_stingy_memory_use;
|
||||
static gint old_tile_cache_size;
|
||||
static gint old_min_colors;
|
||||
static gint old_install_cmap;
|
||||
static gint old_cycled_marching_ants;
|
||||
static gint old_last_opened_size;
|
||||
|
@ -130,6 +131,7 @@ static gint old_default_threshold;
|
|||
|
||||
/* variables which can't be changed on the fly */
|
||||
static gint edit_stingy_memory_use;
|
||||
static gint edit_min_colors;
|
||||
static gint edit_install_cmap;
|
||||
static gint edit_cycled_marching_ants;
|
||||
static gint edit_last_opened_size;
|
||||
|
@ -161,6 +163,7 @@ static GtkWidget * prefs_dlg = NULL;
|
|||
so they're set on the fly is not hard).
|
||||
|
||||
stingy-memory-use
|
||||
min-colors
|
||||
install-cmap
|
||||
cycled-marching-ants
|
||||
last-opened-size
|
||||
|
@ -306,6 +309,7 @@ file_prefs_check_settings (void)
|
|||
|
||||
/* ...then check if we need a restart notification */
|
||||
if (edit_stingy_memory_use != old_stingy_memory_use ||
|
||||
edit_min_colors != old_min_colors ||
|
||||
edit_install_cmap != old_install_cmap ||
|
||||
edit_cycled_marching_ants != old_cycled_marching_ants ||
|
||||
edit_last_opened_size != old_last_opened_size ||
|
||||
|
@ -437,6 +441,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
PrefsState state;
|
||||
|
||||
gint save_stingy_memory_use;
|
||||
gint save_min_colors;
|
||||
gint save_install_cmap;
|
||||
gint save_cycled_marching_ants;
|
||||
gint save_last_opened_size;
|
||||
|
@ -486,6 +491,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* Save variables so that we can restore them later */
|
||||
save_stingy_memory_use = stingy_memory_use;
|
||||
save_min_colors = min_colors;
|
||||
save_install_cmap = install_cmap;
|
||||
save_cycled_marching_ants = cycled_marching_ants;
|
||||
save_last_opened_size = last_opened_size;
|
||||
|
@ -678,6 +684,11 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
stingy_memory_use = edit_stingy_memory_use;
|
||||
update = g_list_append (update, "stingy-memory-use");
|
||||
}
|
||||
if (edit_min_colors != old_min_colors)
|
||||
{
|
||||
min_colors = edit_min_colors;
|
||||
update = g_list_append (update, "min-colors");
|
||||
}
|
||||
if (edit_install_cmap != old_install_cmap)
|
||||
{
|
||||
install_cmap = edit_install_cmap;
|
||||
|
@ -779,6 +790,7 @@ file_prefs_save_callback (GtkWidget *widget,
|
|||
|
||||
/* restore variables which must not change */
|
||||
stingy_memory_use = save_stingy_memory_use;
|
||||
min_colors = save_min_colors;
|
||||
install_cmap = save_install_cmap;
|
||||
cycled_marching_ants = save_cycled_marching_ants;
|
||||
last_opened_size = save_last_opened_size;
|
||||
|
@ -873,6 +885,7 @@ file_prefs_cancel_callback (GtkWidget *widget,
|
|||
|
||||
/* restore values which need a restart */
|
||||
edit_stingy_memory_use = old_stingy_memory_use;
|
||||
edit_min_colors = old_min_colors;
|
||||
edit_install_cmap = old_install_cmap;
|
||||
edit_cycled_marching_ants = old_cycled_marching_ants;
|
||||
edit_last_opened_size = old_last_opened_size;
|
||||
|
@ -1337,6 +1350,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
* copy config vals to edit variables.
|
||||
*/
|
||||
edit_stingy_memory_use = stingy_memory_use;
|
||||
edit_min_colors = min_colors;
|
||||
edit_install_cmap = install_cmap;
|
||||
edit_cycled_marching_ants = cycled_marching_ants;
|
||||
edit_last_opened_size = last_opened_size;
|
||||
|
@ -1404,6 +1418,7 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
|
||||
/* values which will need a restart */
|
||||
old_stingy_memory_use = edit_stingy_memory_use;
|
||||
old_min_colors = edit_min_colors;
|
||||
old_install_cmap = edit_install_cmap;
|
||||
old_cycled_marching_ants = edit_cycled_marching_ants;
|
||||
old_last_opened_size = edit_last_opened_size;
|
||||
|
@ -1715,6 +1730,25 @@ file_pref_cmd_callback (GtkWidget *widget,
|
|||
if (g_visual->depth != 8)
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (vbox2->parent), FALSE);
|
||||
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
spinbutton =
|
||||
gimp_spin_button_new (&adjustment, edit_min_colors,
|
||||
27.0,
|
||||
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
|
||||
1.0, 8.0, 0.0, 1.0, 0.0);
|
||||
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
&edit_min_colors);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Minimum Number of Colors:"), 1.0, 0.5,
|
||||
spinbutton, 1, TRUE);
|
||||
|
||||
button = gtk_check_button_new_with_label(_("Install Colormap"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
edit_install_cmap);
|
||||
|
|
|
@ -16,20 +16,20 @@
|
|||
(gimp_plugin_dir "@gimpplugindir@")
|
||||
|
||||
# Set the temporary storage directory...files will appear here
|
||||
# during the course of running the gimp. Most files will disappear
|
||||
# when the gimp exits, but some files are likely to remain,
|
||||
# such as working palette files, so it is best if this directory
|
||||
# not be one that is shared by other users or is cleared on machine
|
||||
# reboot such as /tmp.
|
||||
# during the course of running the gimp. Most files will disappear
|
||||
# when the gimp exits, but some files are likely to remain,
|
||||
# such as working palette files, so it is best if this directory
|
||||
# not be one that is shared by other users or is cleared on machine
|
||||
# reboot such as /tmp.
|
||||
(temp-path "${gimp_dir}/tmp")
|
||||
|
||||
# Set the swap file location. The gimp uses a tile based memory
|
||||
# allocation scheme. The swap file is used to quickly and easily
|
||||
# swap files out to disk and back in. Be aware that the swap file
|
||||
# can easily get very large if the gimp is used with large images.
|
||||
# Also, things can get horribly slow if the swap file is created on
|
||||
# a directory that is mounted over NFS. For these reasons, it may
|
||||
# be desirable to put your swap file in "/tmp".
|
||||
# allocation scheme. The swap file is used to quickly and easily
|
||||
# swap files out to disk and back in. Be aware that the swap file
|
||||
# can easily get very large if the gimp is used with large images.
|
||||
# Also, things can get horribly slow if the swap file is created on
|
||||
# a directory that is mounted over NFS. For these reasons, it may
|
||||
# be desirable to put your swap file in "/tmp".
|
||||
(swap-path "${gimp_dir}")
|
||||
|
||||
# Set the brush search path...this path will be searched for valid
|
||||
|
@ -81,16 +81,16 @@
|
|||
(module-path "${gimp_dir}/modules:${gimp_plugin_dir}/modules")
|
||||
|
||||
# The tile cache is used to make sure the gimp doesn't thrash
|
||||
# tiles between memory and disk. Setting this value higher will
|
||||
# cause the gimp to use less swap space, but will also cause
|
||||
# the gimp to use more memory. Conversely, a smaller cache size
|
||||
# causes the gimp to use more swap space and less memory.
|
||||
# Note: the gimp will still run even if `tile-cache-size' is
|
||||
# set to 0. The actual size can contain a suffix of 'm', 'M',
|
||||
# 'k', 'K', 'b' or 'B', which makes the gimp interpret the
|
||||
# size as being specified in megabytes, kilobytes and bytes
|
||||
# respectively. If no suffix is specified the size defaults to
|
||||
# being specified in kilobytes.
|
||||
# tiles between memory and disk. Setting this value higher will
|
||||
# cause the gimp to use less swap space, but will also cause
|
||||
# the gimp to use more memory. Conversely, a smaller cache size
|
||||
# causes the gimp to use more swap space and less memory.
|
||||
# Note: the gimp will still run even if `tile-cache-size' is
|
||||
# set to 0. The actual size can contain a suffix of 'm', 'M',
|
||||
# 'k', 'K', 'b' or 'B', which makes the gimp interpret the
|
||||
# size as being specified in megabytes, kilobytes and bytes
|
||||
# respectively. If no suffix is specified the size defaults to
|
||||
# being specified in kilobytes.
|
||||
(tile-cache-size 32m)
|
||||
|
||||
# Speed of marching ants in the selection outline
|
||||
|
@ -101,17 +101,22 @@
|
|||
# Set the number of operations kept on the undo stack
|
||||
(undo-levels 5)
|
||||
|
||||
# Set the color-cube resource for dithering on 8-bit displays
|
||||
# The 4 values stand for Shades of red, green, blue and grays
|
||||
# Set the minimal number of colors for dithering on 8-bit displays.
|
||||
# If the GIMP cannot allocate at least this number of colors, a
|
||||
# private colormap will be allocated, resulting in colormap "flashing".
|
||||
# The default value of 144 corresponds to a "color cube" of 6*6*4 colors
|
||||
# where the 3 values stand for shades of red, green and blue.
|
||||
# Multiplying the # of shades of each primary color yields
|
||||
# the total number of colors that will be allocated from the
|
||||
# gimp colormap. This number should not exceed 256. Most of the
|
||||
# colors remaining after the allocation of the colorcube
|
||||
# will be left to the system palette in an effort to reduce
|
||||
# colormap "flashing".
|
||||
(color-cube 6 6 4 24)
|
||||
# the total number of colors that will be allocated for the
|
||||
# GIMP colormap.
|
||||
# This number must not exceed 256. Most of the colors remaining after
|
||||
# the allocation of the colorcube will be left to the system palette
|
||||
# in an effort to reduce colormap "flashing".
|
||||
# Note that setting this value to something higher than 216 (6*6*6)
|
||||
# will not work with Gtk versions lower than 1.2.8.
|
||||
(min-colors 144)
|
||||
|
||||
# Install a GIMP colormap by default -- only for 8-bit displays
|
||||
# Install a private GIMP colormap by default -- only for 8-bit displays
|
||||
# (install-colormap)
|
||||
|
||||
# Specify that marching ants for selected regions will be drawn
|
||||
|
|
65
gimprc.in
65
gimprc.in
|
@ -16,20 +16,20 @@
|
|||
(gimp_plugin_dir "@gimpplugindir@")
|
||||
|
||||
# Set the temporary storage directory...files will appear here
|
||||
# during the course of running the gimp. Most files will disappear
|
||||
# when the gimp exits, but some files are likely to remain,
|
||||
# such as working palette files, so it is best if this directory
|
||||
# not be one that is shared by other users or is cleared on machine
|
||||
# reboot such as /tmp.
|
||||
# during the course of running the gimp. Most files will disappear
|
||||
# when the gimp exits, but some files are likely to remain,
|
||||
# such as working palette files, so it is best if this directory
|
||||
# not be one that is shared by other users or is cleared on machine
|
||||
# reboot such as /tmp.
|
||||
(temp-path "${gimp_dir}/tmp")
|
||||
|
||||
# Set the swap file location. The gimp uses a tile based memory
|
||||
# allocation scheme. The swap file is used to quickly and easily
|
||||
# swap files out to disk and back in. Be aware that the swap file
|
||||
# can easily get very large if the gimp is used with large images.
|
||||
# Also, things can get horribly slow if the swap file is created on
|
||||
# a directory that is mounted over NFS. For these reasons, it may
|
||||
# be desirable to put your swap file in "/tmp".
|
||||
# allocation scheme. The swap file is used to quickly and easily
|
||||
# swap files out to disk and back in. Be aware that the swap file
|
||||
# can easily get very large if the gimp is used with large images.
|
||||
# Also, things can get horribly slow if the swap file is created on
|
||||
# a directory that is mounted over NFS. For these reasons, it may
|
||||
# be desirable to put your swap file in "/tmp".
|
||||
(swap-path "${gimp_dir}")
|
||||
|
||||
# Set the brush search path...this path will be searched for valid
|
||||
|
@ -81,16 +81,16 @@
|
|||
(module-path "${gimp_dir}/modules:${gimp_plugin_dir}/modules")
|
||||
|
||||
# The tile cache is used to make sure the gimp doesn't thrash
|
||||
# tiles between memory and disk. Setting this value higher will
|
||||
# cause the gimp to use less swap space, but will also cause
|
||||
# the gimp to use more memory. Conversely, a smaller cache size
|
||||
# causes the gimp to use more swap space and less memory.
|
||||
# Note: the gimp will still run even if `tile-cache-size' is
|
||||
# set to 0. The actual size can contain a suffix of 'm', 'M',
|
||||
# 'k', 'K', 'b' or 'B', which makes the gimp interpret the
|
||||
# size as being specified in megabytes, kilobytes and bytes
|
||||
# respectively. If no suffix is specified the size defaults to
|
||||
# being specified in kilobytes.
|
||||
# tiles between memory and disk. Setting this value higher will
|
||||
# cause the gimp to use less swap space, but will also cause
|
||||
# the gimp to use more memory. Conversely, a smaller cache size
|
||||
# causes the gimp to use more swap space and less memory.
|
||||
# Note: the gimp will still run even if `tile-cache-size' is
|
||||
# set to 0. The actual size can contain a suffix of 'm', 'M',
|
||||
# 'k', 'K', 'b' or 'B', which makes the gimp interpret the
|
||||
# size as being specified in megabytes, kilobytes and bytes
|
||||
# respectively. If no suffix is specified the size defaults to
|
||||
# being specified in kilobytes.
|
||||
(tile-cache-size 32m)
|
||||
|
||||
# Speed of marching ants in the selection outline
|
||||
|
@ -101,17 +101,22 @@
|
|||
# Set the number of operations kept on the undo stack
|
||||
(undo-levels 5)
|
||||
|
||||
# Set the color-cube resource for dithering on 8-bit displays
|
||||
# The 4 values stand for Shades of red, green, blue and grays
|
||||
# Set the minimal number of colors for dithering on 8-bit displays.
|
||||
# If the GIMP cannot allocate at least this number of colors, a
|
||||
# private colormap will be allocated, resulting in colormap "flashing".
|
||||
# The default value of 144 corresponds to a "color cube" of 6*6*4 colors
|
||||
# where the 3 values stand for shades of red, green and blue.
|
||||
# Multiplying the # of shades of each primary color yields
|
||||
# the total number of colors that will be allocated from the
|
||||
# gimp colormap. This number should not exceed 256. Most of the
|
||||
# colors remaining after the allocation of the colorcube
|
||||
# will be left to the system palette in an effort to reduce
|
||||
# colormap "flashing".
|
||||
(color-cube 6 6 4 24)
|
||||
# the total number of colors that will be allocated for the
|
||||
# GIMP colormap.
|
||||
# This number must not exceed 256. Most of the colors remaining after
|
||||
# the allocation of the colorcube will be left to the system palette
|
||||
# in an effort to reduce colormap "flashing".
|
||||
# Note that setting this value to something higher than 216 (6*6*6)
|
||||
# will not work with Gtk versions lower than 1.2.8.
|
||||
(min-colors 144)
|
||||
|
||||
# Install a GIMP colormap by default -- only for 8-bit displays
|
||||
# Install a private GIMP colormap by default -- only for 8-bit displays
|
||||
# (install-colormap)
|
||||
|
||||
# Specify that marching ants for selected regions will be drawn
|
||||
|
|
|
@ -108,6 +108,7 @@ static gdouble _gamma_val;
|
|||
static gboolean _install_cmap;
|
||||
static gboolean _use_xshm;
|
||||
static guchar _color_cube[4];
|
||||
static gint _min_colors;
|
||||
static gint _gdisp_ID = -1;
|
||||
|
||||
static gchar *progname = NULL;
|
||||
|
@ -197,14 +198,14 @@ gimp_main (int argc,
|
|||
* about the program error, and offer debugging if the plug-in
|
||||
* has been built with MSVC, and the user has MSVC installed.
|
||||
*/
|
||||
gimp_signal_syscallrestart (SIGHUP, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGINT, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGQUIT, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGBUS, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGSEGV, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGPIPE, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGTERM, gimp_plugin_signalhandler);
|
||||
gimp_signal_syscallrestart (SIGFPE, gimp_plugin_signalhandler);
|
||||
signal (SIGHUP, gimp_plugin_signalhandler);
|
||||
signal (SIGINT, gimp_plugin_signalhandler);
|
||||
signal (SIGQUIT, gimp_plugin_signalhandler);
|
||||
signal (SIGBUS, gimp_plugin_signalhandler);
|
||||
signal (SIGSEGV, gimp_plugin_signalhandler);
|
||||
signal (SIGPIPE, gimp_plugin_signalhandler);
|
||||
signal (SIGTERM, gimp_plugin_signalhandler);
|
||||
signal (SIGFPE, gimp_plugin_signalhandler);
|
||||
#endif
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
|
@ -1012,12 +1013,18 @@ gimp_use_xshm (void)
|
|||
return _use_xshm;
|
||||
}
|
||||
|
||||
guchar*
|
||||
guchar *
|
||||
gimp_color_cube (void)
|
||||
{
|
||||
return _color_cube;
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_min_colors (void)
|
||||
{
|
||||
return _min_colors;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_process_message (WireMessage *msg)
|
||||
{
|
||||
|
@ -1300,17 +1307,18 @@ gimp_config (GPConfig *config)
|
|||
gimp_quit ();
|
||||
}
|
||||
|
||||
_gimp_tile_width = config->tile_width;
|
||||
_gimp_tile_width = config->tile_width;
|
||||
_gimp_tile_height = config->tile_height;
|
||||
_shm_ID = config->shm_ID;
|
||||
_gamma_val = config->gamma;
|
||||
_install_cmap = config->install_cmap;
|
||||
_use_xshm = config->use_xshm;
|
||||
_color_cube[0] = config->color_cube[0];
|
||||
_color_cube[1] = config->color_cube[1];
|
||||
_color_cube[2] = config->color_cube[2];
|
||||
_color_cube[3] = config->color_cube[3];
|
||||
_gdisp_ID = config->gdisp_ID;
|
||||
_shm_ID = config->shm_ID;
|
||||
_gamma_val = config->gamma;
|
||||
_install_cmap = config->install_cmap;
|
||||
_color_cube[0] = 6; /* These are the former default values */
|
||||
_color_cube[1] = 6; /* (for backward compatibility only) */
|
||||
_color_cube[2] = 4;
|
||||
_color_cube[3] = 24;
|
||||
_use_xshm = config->use_xshm;
|
||||
_min_colors = config->min_colors;
|
||||
_gdisp_ID = config->gdisp_ID;
|
||||
|
||||
if (_shm_ID != -1)
|
||||
{
|
||||
|
@ -1439,4 +1447,3 @@ gimp_plugin_domain_add_with_path (gchar *domain_name,
|
|||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
|
|
|
@ -424,6 +424,7 @@ gdouble gimp_gamma (void);
|
|||
gboolean gimp_install_cmap (void);
|
||||
gboolean gimp_use_xshm (void);
|
||||
guchar* gimp_color_cube (void);
|
||||
gint gimp_min_colors (void);
|
||||
void gimp_request_wakeups (void);
|
||||
|
||||
|
||||
|
|
|
@ -417,7 +417,9 @@ _gp_config_read (GIOChannel *channel,
|
|||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) &config->install_cmap, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) config->color_cube, 3))
|
||||
if (!wire_read_int8 (channel, (guint8*) &config->use_xshm, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int32 (channel, (guint32*) &config->min_colors, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int32 (channel, (guint32*) &config->gdisp_ID, 1))
|
||||
goto cleanup;
|
||||
|
@ -448,7 +450,9 @@ _gp_config_write (GIOChannel *channel,
|
|||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) &config->install_cmap, 1))
|
||||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) config->color_cube, 3))
|
||||
if (!wire_write_int8 (channel, (guint8*) &config->use_xshm, 1))
|
||||
return;
|
||||
if (!wire_write_int32 (channel, (guint32*) &config->min_colors, 1))
|
||||
return;
|
||||
if (!wire_write_int32 (channel, (guint32*) &config->gdisp_ID, 1))
|
||||
return;
|
||||
|
|
|
@ -65,7 +65,7 @@ struct _GPConfig
|
|||
gdouble gamma;
|
||||
gint8 install_cmap;
|
||||
gint8 use_xshm;
|
||||
guint8 color_cube[4];
|
||||
gint32 min_colors;
|
||||
gint32 gdisp_ID;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,22 +41,15 @@ gimp_ui_init (gchar *prog_name,
|
|||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
/* FIXME: check if gimp could allocate and attach smh and don't blindly
|
||||
* use the commandline option
|
||||
*/
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
/* It's only safe to switch Gdk SHM usage off */
|
||||
if (! gimp_use_xshm ())
|
||||
gdk_set_use_xshm (FALSE);
|
||||
|
||||
/* FIXME: check if gimp's GdkRGB subsystem actually installed a cmap
|
||||
* and don't blindly use the gimprc option
|
||||
*/
|
||||
if (gimp_install_cmap ())
|
||||
{
|
||||
gdk_rgb_set_install (TRUE);
|
||||
gdk_rgb_set_min_colors (gimp_min_colors ());
|
||||
gdk_rgb_set_install (gimp_install_cmap ());
|
||||
|
||||
/* or is this needed in all cases? */
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
}
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual ());
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap ());
|
||||
|
||||
/* Set the gamma after installing the colormap because
|
||||
* gtk_preview_set_gamma() initializes GdkRGB if not already done
|
||||
|
|
|
@ -417,7 +417,9 @@ _gp_config_read (GIOChannel *channel,
|
|||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) &config->install_cmap, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) config->color_cube, 3))
|
||||
if (!wire_read_int8 (channel, (guint8*) &config->use_xshm, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int32 (channel, (guint32*) &config->min_colors, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int32 (channel, (guint32*) &config->gdisp_ID, 1))
|
||||
goto cleanup;
|
||||
|
@ -448,7 +450,9 @@ _gp_config_write (GIOChannel *channel,
|
|||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) &config->install_cmap, 1))
|
||||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) config->color_cube, 3))
|
||||
if (!wire_write_int8 (channel, (guint8*) &config->use_xshm, 1))
|
||||
return;
|
||||
if (!wire_write_int32 (channel, (guint32*) &config->min_colors, 1))
|
||||
return;
|
||||
if (!wire_write_int32 (channel, (guint32*) &config->gdisp_ID, 1))
|
||||
return;
|
||||
|
|
|
@ -65,7 +65,7 @@ struct _GPConfig
|
|||
gdouble gamma;
|
||||
gint8 install_cmap;
|
||||
gint8 use_xshm;
|
||||
guint8 color_cube[4];
|
||||
gint32 min_colors;
|
||||
gint32 gdisp_ID;
|
||||
};
|
||||
|
||||
|
|
|
@ -601,25 +601,8 @@ alienmap_dialog (void)
|
|||
GtkWidget *toggle3;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
guchar *color_cube;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("alienmap");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("alienmap", TRUE);
|
||||
|
||||
build_preview_source_image ();
|
||||
|
||||
|
|
|
@ -593,25 +593,8 @@ alienmap2_dialog (void)
|
|||
GtkWidget *sep;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
guchar *color_cube;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("alienmap2");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("alienmap2", TRUE);
|
||||
|
||||
build_preview_source_image ();
|
||||
|
||||
|
|
|
@ -261,30 +261,13 @@ explorer_dialog (void)
|
|||
GtkWidget *gradient;
|
||||
GtkWidget *sep;
|
||||
gchar *gradient_name;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
guchar *color_cube;
|
||||
GSList *group = NULL;
|
||||
gint i;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("fractalexplorer");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("fractalexplorer", TRUE);
|
||||
|
||||
plug_in_parse_fractalexplorer_path ();
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
|
||||
wint.wimage = g_new (guchar, preview_width * preview_height * 3);
|
||||
elements = g_new (DialogElements, 1);
|
||||
|
||||
|
|
|
@ -1062,7 +1062,8 @@ main_dialog (GDrawable *drawable)
|
|||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
if (! gimp_use_xshm ())
|
||||
gdk_set_use_xshm (FALSE);
|
||||
|
||||
visinfo = gck_visualinfo_new ();
|
||||
|
||||
|
|
|
@ -1361,11 +1361,12 @@ main_dialog (GDrawable *drawable)
|
|||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("MapObject");
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
if (! gimp_use_xshm ())
|
||||
gdk_set_use_xshm (FALSE);
|
||||
|
||||
/* Set up ArcBall stuff */
|
||||
/* ==================== */
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ static void run (gchar *name,
|
|||
GParam *param,
|
||||
gint *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static void init_gtk (void);
|
||||
|
||||
GPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -221,7 +220,7 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
init_gtk ();
|
||||
gimp_ui_init ("bmp", FALSE);
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "BMP",
|
||||
(CAN_HANDLE_RGB |
|
||||
CAN_HANDLE_GRAY |
|
||||
|
@ -302,17 +301,3 @@ FromS (gint16 wert,
|
|||
bopuffer[0] = (wert & 0x00ff)>>0x00;
|
||||
bopuffer[1] = (wert & 0xff00)>>0x08;
|
||||
}
|
||||
|
||||
static void
|
||||
init_gtk (void)
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("bmp");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -383,15 +382,8 @@ borderaverage_dialog (void)
|
|||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkWidget *menu;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("borderaverage");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("borderaverage", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Borderaverage"), "borderaverage",
|
||||
gimp_plugin_help_func, "filters/borderaverage.html",
|
||||
|
@ -411,7 +403,7 @@ borderaverage_dialog (void)
|
|||
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dlg)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
frame = gtk_frame_new (_("Border Size"));
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -383,15 +382,8 @@ borderaverage_dialog (void)
|
|||
GtkWidget *spinbutton;
|
||||
GtkObject *adj;
|
||||
GtkWidget *menu;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("borderaverage");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("borderaverage", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Borderaverage"), "borderaverage",
|
||||
gimp_plugin_help_func, "filters/borderaverage.html",
|
||||
|
@ -411,7 +403,7 @@ borderaverage_dialog (void)
|
|||
|
||||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dlg)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
frame = gtk_frame_new (_("Border Size"));
|
||||
|
|
|
@ -30,9 +30,10 @@
|
|||
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
#include "fp.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "fp.h"
|
||||
|
||||
FP_Params Current =
|
||||
{
|
||||
|
@ -83,7 +84,6 @@ query (void)
|
|||
};
|
||||
gint nargs = sizeof (args) / sizeof (args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
gimp_install_procedure ("plug_in_filter_pack",
|
||||
"Allows the user to change H, S, or C with many previews",
|
||||
"No help available",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
/* The mosaic logo */
|
||||
#include "mosaic_logo.h"
|
||||
|
||||
|
@ -518,27 +519,9 @@ mosaic_dialog (void)
|
|||
GtkWidget *preview;
|
||||
GtkWidget *table;
|
||||
GtkObject *scale_data;
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
gint y;
|
||||
gint y;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("mosaic");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("mosaic", TRUE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Mosaic"), "mosaic",
|
||||
gimp_plugin_help_func, "filters/mosaic.html",
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
|
@ -114,16 +115,9 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("dbbrowser");
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("dbbrowser", FALSE);
|
||||
|
||||
gtk_quit_add_destroy (1, (GtkObject *) gimp_db_browser (NULL));
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
|
@ -114,16 +115,9 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("dbbrowser");
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("dbbrowser", FALSE);
|
||||
|
||||
gtk_quit_add_destroy (1, (GtkObject *) gimp_db_browser (NULL));
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
|
@ -114,16 +115,9 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("dbbrowser");
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("dbbrowser", FALSE);
|
||||
|
||||
gtk_quit_add_destroy (1, (GtkObject *) gimp_db_browser (NULL));
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
* This is a plugin for the GIMP.
|
||||
/* This is a plugin for the GIMP.
|
||||
*
|
||||
* Copyright (C) 1997 Jochen Friedrich
|
||||
* Parts Copyright (C) 1995 Gert Doering
|
||||
|
@ -18,11 +17,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#define VERSION "0.6"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h> /* For G_OS_WIN32 */
|
||||
|
@ -44,33 +39,40 @@
|
|||
#define _O_BINARY 0
|
||||
#endif
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
#include "g3.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
#define VERSION "0.6"
|
||||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
gint32 emitgimp (int, int, char *, int, char *);
|
||||
void query (void);
|
||||
static void run (char *name,
|
||||
int nparams,
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
gint *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
static gint32 load_image (char *);
|
||||
|
||||
static gint32 load_image (gchar *);
|
||||
|
||||
gint32 emitgimp (gint, gint, gchar *, gint, gchar *);
|
||||
|
||||
GPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
NULL, /* init_proc */
|
||||
NULL, /* quit_proc */
|
||||
query, /* query_proc */
|
||||
run, /* run_proc */
|
||||
NULL, /* init_proc */
|
||||
NULL, /* quit_proc */
|
||||
query, /* query_proc */
|
||||
run, /* run_proc */
|
||||
};
|
||||
|
||||
MAIN ()
|
||||
|
||||
void query ()
|
||||
void query (void)
|
||||
{
|
||||
static GParamDef load_args[] =
|
||||
{
|
||||
|
@ -85,27 +87,29 @@ void query ()
|
|||
static int nload_args = sizeof (load_args) / sizeof (load_args[0]);
|
||||
static int nload_return_vals = sizeof (load_return_vals) / sizeof (load_return_vals[0]);
|
||||
|
||||
INIT_I18N();
|
||||
|
||||
gimp_install_procedure ("file_faxg3_load",
|
||||
"loads g3 fax files",
|
||||
"This plug-in loads Fax G3 Image files.",
|
||||
"Jochen Friedrich",
|
||||
"Jochen Friedrich, Gert Doering, Spencer Kimball & Peter Mattis",
|
||||
VERSION,
|
||||
"<Load>/Fax G3",
|
||||
N_("<Load>/Fax G3"),
|
||||
NULL,
|
||||
PROC_PLUG_IN,
|
||||
nload_args, nload_return_vals,
|
||||
load_args, load_return_vals);
|
||||
|
||||
gimp_register_magic_load_handler ("file_faxg3_load", "g3", "", "0,short,0x0001,0,short,0x0014");
|
||||
gimp_register_magic_load_handler ("file_faxg3_load",
|
||||
"g3",
|
||||
"",
|
||||
"0,short,0x0001,0,short,0x0014");
|
||||
}
|
||||
|
||||
static void run (char *name,
|
||||
int nparams,
|
||||
static void
|
||||
run (gchar *name,
|
||||
gint nparams,
|
||||
GParam *param,
|
||||
int *nreturn_vals,
|
||||
gint *nreturn_vals,
|
||||
GParam **return_vals)
|
||||
{
|
||||
static GParam values[2];
|
||||
|
@ -118,6 +122,7 @@ static void run (char *name,
|
|||
*return_vals = values;
|
||||
values[0].type = PARAM_STATUS;
|
||||
values[0].data.d_status = STATUS_CALLING_ERROR;
|
||||
|
||||
if (strcmp (name, "file_faxg3_load") == 0)
|
||||
{
|
||||
INIT_I18N();
|
||||
|
@ -126,7 +131,7 @@ static void run (char *name,
|
|||
image_ID = load_image (param[1].data.d_string);
|
||||
values[1].type = PARAM_IMAGE;
|
||||
values[1].data.d_image = image_ID;
|
||||
|
||||
|
||||
if (image_ID != -1)
|
||||
{
|
||||
values[0].data.d_status = STATUS_SUCCESS;
|
||||
|
@ -169,7 +174,7 @@ static int rs; /* read buffer size */
|
|||
#define MAX_COLS 1728 /* !! FIXME - command line parameter */
|
||||
|
||||
static gint32
|
||||
load_image (char *filename)
|
||||
load_image (gchar *filename)
|
||||
{
|
||||
int data;
|
||||
int hibit;
|
||||
|
|
|
@ -48,6 +48,7 @@ static char ident[] = "@(#) GIMP FITS file-plugin v1.06 21-Nov-99";
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
/* Load info */
|
||||
typedef struct
|
||||
{
|
||||
|
@ -103,8 +104,6 @@ static gint32 load_fits (gchar *filename,
|
|||
guint ncompose);
|
||||
|
||||
|
||||
static void init_gtk (void);
|
||||
|
||||
static gint load_dialog (void);
|
||||
static void load_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
@ -287,7 +286,7 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
init_gtk ();
|
||||
gimp_ui_init ("fits", FALSE);
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "FITS",
|
||||
(CAN_HANDLE_RGB |
|
||||
CAN_HANDLE_GRAY |
|
||||
|
@ -761,9 +760,9 @@ create_fits_header (FITS_FILE *ofp,
|
|||
|
||||
/* Save direct colours (GRAY, GRAYA, RGB, RGBA) */
|
||||
static gint
|
||||
save_direct (FITS_FILE *ofp,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
save_direct (FITS_FILE *ofp,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
{
|
||||
int height, width, i, j, channel;
|
||||
int tile_height, bpp, bpsl;
|
||||
|
@ -969,21 +968,6 @@ save_index (FITS_FILE *ofp,
|
|||
#undef GET_INDEXED_TILE
|
||||
}
|
||||
|
||||
static void
|
||||
init_gtk (void)
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("fits");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
}
|
||||
|
||||
|
||||
/* Load interface functions */
|
||||
|
||||
static gint
|
||||
|
@ -993,7 +977,7 @@ load_dialog (void)
|
|||
GtkWidget *vbox;
|
||||
GtkWidget *frame;
|
||||
|
||||
init_gtk ();
|
||||
gimp_ui_init ("fits", FALSE);
|
||||
|
||||
dialog = gimp_dialog_new (_("Load FITS File"), "fits",
|
||||
gimp_plugin_help_func, "filters/fits.html",
|
||||
|
|
|
@ -902,24 +902,8 @@ dialog (void)
|
|||
GtkWidget *table;
|
||||
GtkWidget *box;
|
||||
GtkObject *adj;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
guchar *color_cube;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("flame");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("flame", TRUE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Flame"), "flame",
|
||||
gimp_plugin_help_func, "filters/flame.html",
|
||||
|
|
|
@ -30,9 +30,10 @@
|
|||
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
#include "fp.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "fp.h"
|
||||
|
||||
FP_Params Current =
|
||||
{
|
||||
|
@ -83,7 +84,6 @@ query (void)
|
|||
};
|
||||
gint nargs = sizeof (args) / sizeof (args[0]);
|
||||
|
||||
INIT_I18N();
|
||||
gimp_install_procedure ("plug_in_filter_pack",
|
||||
"Allows the user to change H, S, or C with many previews",
|
||||
"No help available",
|
||||
|
|
|
@ -877,31 +877,13 @@ fp_dialog (void)
|
|||
GtkWidget *pixelsBy;
|
||||
GtkWidget *satur;
|
||||
GtkWidget *control;
|
||||
|
||||
GtkWidget *table;
|
||||
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
reduced = Reduce_The_Image (drawable,mask,
|
||||
Current.PreviewSize,
|
||||
Current.SlctnOnly);
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("fp");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("fp", TRUE);
|
||||
|
||||
/********************************************************************/
|
||||
/************************* All the Standard Stuff *******************/
|
||||
|
|
|
@ -40,6 +40,7 @@ INCLUDES = \
|
|||
-I$(includedir)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/libgimp/libgimpui.la \
|
||||
$(top_builddir)/libgimp/libgimp.la \
|
||||
$(GTK_LIBS) \
|
||||
$(INTLLIBS)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "gdyntext_ui.h"
|
||||
|
||||
|
@ -665,31 +666,8 @@ create_main_window (GdtMainWindow **main_window,
|
|||
gboolean
|
||||
gdt_create_ui (GdtVals *data)
|
||||
{
|
||||
int argc = 1;
|
||||
char **argv;
|
||||
#ifndef DEBUG_UI
|
||||
guchar *color_cube;
|
||||
#endif
|
||||
|
||||
argv = g_new0(gchar *, 1);
|
||||
argv[0] = g_strdup("gdyntext");
|
||||
gimp_ui_init ("gdyntext", TRUE);
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
gtk_rc_parse(gimp_gtkrc());
|
||||
gdk_set_use_xshm(gimp_use_xshm());
|
||||
|
||||
#ifndef DEBUG_UI
|
||||
gtk_preview_set_gamma(gimp_gamma());
|
||||
gtk_preview_set_install_cmap(gimp_install_cmap());
|
||||
color_cube = gimp_color_cube();
|
||||
gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]);
|
||||
#else
|
||||
gtk_preview_set_install_cmap(TRUE);
|
||||
#endif
|
||||
|
||||
gtk_widget_set_default_visual(gtk_preview_get_visual());
|
||||
gtk_widget_set_default_colormap(gtk_preview_get_cmap());
|
||||
|
||||
create_message_window(&message_window);
|
||||
|
||||
if (data->messages)
|
||||
|
|
|
@ -3909,31 +3909,14 @@ gfig_dialog (void)
|
|||
GtkWidget *notebook;
|
||||
GtkWidget *page;
|
||||
GtkWidget *top_level_dlg;
|
||||
guchar *color_cube;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("gfig");
|
||||
gimp_ui_init ("gfig", TRUE);
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
yyy = gdk_rgb_get_visual ();
|
||||
xxx = gdk_rgb_get_cmap ();
|
||||
|
||||
/*kill (getpid (), 19);*/
|
||||
/* And my bit */
|
||||
plug_in_parse_gfig_path ();
|
||||
|
||||
/* Get the stuff for the preview window...*/
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
gtk_widget_set_default_visual (yyy = gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (xxx = gtk_preview_get_cmap ());
|
||||
|
||||
/*cache_preview (); Get the preview image and store it also set has_alpha */
|
||||
|
||||
img_width = gimp_drawable_width (gfig_select_drawable->id);
|
||||
|
|
|
@ -2433,45 +2433,19 @@ dlg_run (void)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *abox;
|
||||
GtkWidget *notebook;
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("gflare");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
|
||||
/* gdk_set_show_events (TRUE);
|
||||
gdk_set_debug_level (3); */
|
||||
gimp_ui_init ("gflare", TRUE);
|
||||
|
||||
/*
|
||||
* Init Main Dialog
|
||||
*/
|
||||
|
||||
#if 0 /* @@@ debug stuff */
|
||||
printf("Waiting... (pid %d)\n", getpid());
|
||||
kill(getpid(), 19); /* SIGSTOP */
|
||||
#endif
|
||||
|
||||
pint.run = FALSE;
|
||||
dlg = g_new (GFlareDialog, 1);
|
||||
dlg->init = TRUE;
|
||||
dlg->update_preview = TRUE;
|
||||
|
||||
gradient_menu_init(); /* FIXME: this should go elsewhere */
|
||||
gradient_menu_init (); /* FIXME: this should go elsewhere */
|
||||
dlg_setup_gflare ();
|
||||
|
||||
g_assert (gflares_list != NULL);
|
||||
|
|
|
@ -60,10 +60,12 @@
|
|||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
#include <libgimp/stdplugins-intl.h>
|
||||
|
||||
#include "fli.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
|
@ -71,8 +73,6 @@ static void run (gchar *name,
|
|||
gint *nreturn_vals,
|
||||
GParam **return_vals);
|
||||
|
||||
static void init_gtk (void);
|
||||
|
||||
/* return the image-ID of the new image, or -1 in case of an error */
|
||||
static gint32 load_image (gchar *filename,
|
||||
gint32 from_frame,
|
||||
|
@ -347,7 +347,7 @@ run (gchar *name,
|
|||
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
init_gtk ();
|
||||
gimp_ui_init ("gfli", FALSE);
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "FLI",
|
||||
(CAN_HANDLE_INDEXED |
|
||||
CAN_HANDLE_GRAY |
|
||||
|
@ -809,30 +809,6 @@ cb_ok (GtkWidget *widget,
|
|||
gtk_widget_destroy (GTK_WIDGET (data));
|
||||
}
|
||||
|
||||
void
|
||||
init_gtk (void)
|
||||
{
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("gfli");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
}
|
||||
|
||||
gint
|
||||
load_dialog (gchar *name)
|
||||
{
|
||||
|
@ -847,7 +823,7 @@ load_dialog (gchar *name)
|
|||
from_frame = 1;
|
||||
to_frame = nframes;
|
||||
|
||||
init_gtk ();
|
||||
gimp_ui_init ("gfli", FALSE);
|
||||
|
||||
dialog = gimp_dialog_new (_("GFLI 1.3 - Load framestack"), "gfli",
|
||||
gimp_plugin_help_func, "filters/gfli.html",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
|
||||
#define HAVE_DIRENT_H
|
||||
#define HAVE_UNISTD_H
|
||||
#endif
|
||||
|
@ -17,10 +18,15 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "gimpressionist.h"
|
||||
#include "ppmtool.h"
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/stdplugins-intl.h>
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
#ifndef GIMP_CHECK_VERSION
|
||||
#define GIMP_CHECK_VERSION(a,b,c) 0
|
||||
|
@ -416,27 +422,26 @@ int create_dialog(void)
|
|||
GtkWidget *tmpw, *box1, *box2, *box3, *preview_box;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
guchar *color_cube;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new(char *, 1);
|
||||
argv[0] = "gimpressionist";
|
||||
if (standalone)
|
||||
{
|
||||
argc = 1;
|
||||
argv = g_new(char *, 1);
|
||||
argv[0] = "gimpressionist";
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
if(!standalone) {
|
||||
gdk_set_use_xshm(gimp_use_xshm());
|
||||
gtk_preview_set_gamma(gimp_gamma());
|
||||
gtk_preview_set_install_cmap(gimp_install_cmap());
|
||||
color_cube = gimp_color_cube();
|
||||
gtk_preview_set_color_cube(color_cube[0], color_cube[1], color_cube[2], color_cube[3]);
|
||||
}
|
||||
gtk_init(&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_widget_set_default_visual(gtk_preview_get_visual());
|
||||
gtk_widget_set_default_colormap(gtk_preview_get_cmap());
|
||||
gtk_widget_set_default_visual (gdk_rgb_get_visual());
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_cmap());
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_ui_init ("gimpressionist", TRUE);
|
||||
}
|
||||
|
||||
tooltips = gtk_tooltips_new();
|
||||
gtk_tooltips_enable(tooltips);
|
||||
tooltips = gtk_tooltips_new ();
|
||||
gtk_tooltips_enable (tooltips);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
|
|
@ -21,24 +21,28 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk-xmhtml/gtk-xmhtml.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include <gtk-xmhtml/gtk-xmhtml.h>
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
/* pixmaps */
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "forward.xpm"
|
||||
#include "back.xpm"
|
||||
|
||||
|
||||
/* defines */
|
||||
|
||||
#ifdef __EMX__
|
||||
|
@ -87,39 +91,39 @@ typedef struct
|
|||
|
||||
/* constant strings */
|
||||
|
||||
static char *doc_not_found_format_string =
|
||||
_("<html><head><title>Document not found</title></head>"
|
||||
"<body bgcolor=\"#ffffff\">"
|
||||
"<center>"
|
||||
"<p>"
|
||||
"%s"
|
||||
"<h3>Couldn't find document</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"</center>"
|
||||
"<p>"
|
||||
"<small>This either means that the help for this topic has not been written "
|
||||
"yet or that something is wrong with your installation. "
|
||||
"Please check carefully before you report this as a bug.</small>"
|
||||
"</body>"
|
||||
"</html>");
|
||||
static gchar *doc_not_found_format_string =
|
||||
N_("<html><head><title>Document not found</title></head>"
|
||||
"<body bgcolor=\"#ffffff\">"
|
||||
"<center>"
|
||||
"<p>"
|
||||
"%s"
|
||||
"<h3>Couldn't find document</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"</center>"
|
||||
"<p>"
|
||||
"<small>This either means that the help for this topic has not been written "
|
||||
"yet or that something is wrong with your installation. "
|
||||
"Please check carefully before you report this as a bug.</small>"
|
||||
"</body>"
|
||||
"</html>");
|
||||
|
||||
static char *dir_not_found_format_string =
|
||||
_("<html><head><title>Directory not found</title></head>"
|
||||
"<body bgcolor=\"#ffffff\">"
|
||||
"<center>"
|
||||
"<p>"
|
||||
"%s"
|
||||
"<h3>Couldn't change to directory</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"<h3>while trying to access</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"</center>"
|
||||
"<p>"
|
||||
"<small>This either means that the help for this topic has not been written "
|
||||
"yet or that something is wrong with your installation. "
|
||||
"Please check carefully before you report this as a bug.</small>"
|
||||
"</body>"
|
||||
"</html>");
|
||||
static gchar *dir_not_found_format_string =
|
||||
N_("<html><head><title>Directory not found</title></head>"
|
||||
"<body bgcolor=\"#ffffff\">"
|
||||
"<center>"
|
||||
"<p>"
|
||||
"%s"
|
||||
"<h3>Couldn't change to directory</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"<h3>while trying to access</h3>"
|
||||
"<tt>%s</tt>"
|
||||
"</center>"
|
||||
"<p>"
|
||||
"<small>This either means that the help for this topic has not been written "
|
||||
"yet or that something is wrong with your installation. "
|
||||
"Please check carefully before you report this as a bug.</small>"
|
||||
"</body>"
|
||||
"</html>");
|
||||
|
||||
static gchar *eek_png_tag = "<h1>Eeek!</h1>";
|
||||
|
||||
|
@ -443,7 +447,7 @@ load_page (HelpPage *source_page,
|
|||
else
|
||||
new_ref = g_strconcat (old_dir, G_DIR_SEPARATOR_S, ref, NULL);
|
||||
|
||||
g_string_sprintf (file_contents, dir_not_found_format_string,
|
||||
g_string_sprintf (file_contents, gettext (dir_not_found_format_string),
|
||||
eek_png_tag, new_dir, new_ref);
|
||||
html_source (dest_page, new_ref, 0, file_contents->str, add_to_queue, FALSE);
|
||||
|
||||
|
@ -482,7 +486,7 @@ load_page (HelpPage *source_page,
|
|||
if (strlen (file_contents->str) <= 0)
|
||||
{
|
||||
chdir (old_dir);
|
||||
g_string_sprintf (file_contents, doc_not_found_format_string,
|
||||
g_string_sprintf (file_contents, gettext (doc_not_found_format_string),
|
||||
eek_png_tag, ref);
|
||||
}
|
||||
else
|
||||
|
@ -711,25 +715,8 @@ open_browser_dialog (gchar *locale,
|
|||
gchar *eek_png_path;
|
||||
gint success;
|
||||
guint i;
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
guchar *color_cube;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("webbrowser");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("webbrowser", TRUE);
|
||||
|
||||
root_dir = g_strconcat (gimp_data_directory(), G_DIR_SEPARATOR_S,
|
||||
GIMP_HELP_PREFIX, NULL);
|
||||
|
|
|
@ -734,9 +734,6 @@ ifs_compose_dialog (GDrawable *drawable)
|
|||
GtkWidget *aspect_frame;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *page;
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
gint design_width;
|
||||
gint design_height;
|
||||
|
@ -773,21 +770,7 @@ ifs_compose_dialog (GDrawable *drawable)
|
|||
|
||||
ifsD->in_update = 0;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("ifscompose");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("ifscompose", TRUE);
|
||||
|
||||
dlg = gimp_dialog_new (_("IfsCompose"), "ifscompose",
|
||||
gimp_plugin_help_func, "filters/ifscompose.html",
|
||||
|
|
|
@ -169,6 +169,7 @@ INCLUDES = \
|
|||
-I$(includedir)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/libgimp/libgimpui.la \
|
||||
$(top_builddir)/libgimp/libgimp.la \
|
||||
$(GTK_LIBS) \
|
||||
$(INTLLIBS)
|
||||
|
|
|
@ -20,17 +20,18 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "gdk/gdkkeysyms.h" /* for keyboard values */
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h> /* for keyboard values */
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "imap_about.h"
|
||||
#include "imap_circle.h"
|
||||
|
@ -74,6 +75,9 @@
|
|||
#include "imap_toolbar.h"
|
||||
#include "imap_tools.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
#define MAX_ZOOM_FACTOR 8
|
||||
#define ZOOMED(x) (_zoom_factor * (x))
|
||||
#define GET_REAL_COORD(x) ((x) / _zoom_factor)
|
||||
|
@ -1317,22 +1321,10 @@ dialog(GDrawable *drawable)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *main_vbox;
|
||||
Tools_t *tools;
|
||||
gchar **argv;
|
||||
gint argc = 1;
|
||||
Menu_t *menu;
|
||||
PopupMenu_t *popup;
|
||||
|
||||
argv = g_new(gchar *, 1);
|
||||
argv[0] = g_strdup("imagemap");
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
gtk_rc_parse(gimp_gtkrc());
|
||||
|
||||
gdk_set_use_xshm(gimp_use_xshm());
|
||||
gtk_preview_set_gamma(gimp_gamma());
|
||||
|
||||
gtk_widget_set_default_visual(gtk_preview_get_visual());
|
||||
gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
|
||||
gimp_ui_init ("imagemap", TRUE);
|
||||
|
||||
_shapes = make_object_list();
|
||||
|
||||
|
|
|
@ -178,17 +178,9 @@ maze_dialog (void)
|
|||
GtkWidget *div_x_entry, *div_y_entry;
|
||||
|
||||
gint trow = 0;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
gchar *message;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("maze");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gdk_set_use_xshm(gimp_use_xshm());
|
||||
gimp_ui_init ("maze", FALSE);
|
||||
gimp_help_init();
|
||||
|
||||
dlg = gimp_dialog_new (MAZE_TITLE, "maze",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
/* The mosaic logo */
|
||||
#include "mosaic_logo.h"
|
||||
|
||||
|
@ -518,27 +519,9 @@ mosaic_dialog (void)
|
|||
GtkWidget *preview;
|
||||
GtkWidget *table;
|
||||
GtkObject *scale_data;
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
gint y;
|
||||
gint y;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("mosaic");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("mosaic", TRUE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Mosaic"), "mosaic",
|
||||
gimp_plugin_help_func, "filters/mosaic.html",
|
||||
|
|
|
@ -508,16 +508,7 @@ do_dialog (void)
|
|||
GtkObject *adjustment;
|
||||
gint pixmapindex;
|
||||
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("pagecurl");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gimp_ui_init ("pagecurl", FALSE);
|
||||
|
||||
dialog = gimp_dialog_new ( _("Pagecurl Effect"), "pagecurl",
|
||||
gimp_plugin_help_func, "filters/pagecurl.html",
|
||||
|
|
|
@ -74,7 +74,6 @@ static void get_system_printers (void);
|
|||
|
||||
static void query (void);
|
||||
static void run (char *, int, GParam *, int *, GParam **);
|
||||
static void init_gtk (void);
|
||||
static int do_print_dialog (void);
|
||||
|
||||
extern void gimp_create_main_window (void);
|
||||
|
@ -280,7 +279,7 @@ run(char *name, /* I - Name of print program. */
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
init_gtk ();
|
||||
gimp_ui_init ("print", TRUE);
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "Print",
|
||||
(CAN_HANDLE_RGB | CAN_HANDLE_GRAY | CAN_HANDLE_INDEXED |
|
||||
CAN_HANDLE_ALPHA));
|
||||
|
@ -526,20 +525,6 @@ run(char *name, /* I - Name of print program. */
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
static void
|
||||
init_gtk (void)
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("print");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
}
|
||||
|
||||
/*
|
||||
* 'do_print_dialog()' - Pop up the print dialog...
|
||||
*/
|
||||
|
@ -550,8 +535,7 @@ do_print_dialog (void)
|
|||
/*
|
||||
* Initialize the program's display...
|
||||
*/
|
||||
init_gtk ();
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
gimp_ui_init ("print", TRUE);
|
||||
|
||||
#ifdef SIGBUS
|
||||
signal (SIGBUS, SIG_DFL);
|
||||
|
|
|
@ -712,32 +712,13 @@ rcm_dialog (void)
|
|||
{
|
||||
GtkWidget *table, *dlg, *hbox, *notebook;
|
||||
GtkWidget *previews, *mains, *miscs;
|
||||
|
||||
guchar *color_cube;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("rcm");
|
||||
|
||||
Current.Bna = g_new (RcmBna, 1);
|
||||
|
||||
/* init GTK and install colormap */
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
gimp_ui_init ("rcm", TRUE);
|
||||
|
||||
/* Create dialog */
|
||||
|
||||
dlg = gimp_dialog_new (_("Colormap Rotation"), "rcm",
|
||||
gimp_plugin_help_func, "filters/rcm.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
|
|
|
@ -178,17 +178,10 @@ script_fu_console_interface (void)
|
|||
GtkWidget *vsb;
|
||||
GtkWidget *table;
|
||||
GtkWidget *hbox;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("script-fu");
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("script-fu", FALSE);
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), _("Script-Fu Console"));
|
||||
|
|
|
@ -1113,20 +1113,8 @@ script_fu_interface (SFScript *script)
|
|||
{
|
||||
INIT_I18N_UI();
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
g_set_prgname ("script-fu");
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1], color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap());
|
||||
|
||||
gimp_ui_init ("script-fu", TRUE);
|
||||
|
||||
gtk_initted = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1113,20 +1113,8 @@ script_fu_interface (SFScript *script)
|
|||
{
|
||||
INIT_I18N_UI();
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
g_set_prgname ("script-fu");
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
gdk_set_use_xshm (gimp_use_xshm ());
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1], color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap());
|
||||
|
||||
gimp_ui_init ("script-fu", TRUE);
|
||||
|
||||
gtk_initted = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -527,28 +527,20 @@ server_quit (void)
|
|||
}
|
||||
|
||||
static gint
|
||||
server_interface ()
|
||||
server_interface (void)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *table;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
|
||||
argv[0] = g_strdup ("script-fu");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
|
||||
INIT_I18N_UI();
|
||||
|
||||
dlg = gimp_dialog_new (_("Script-Fu Server Options"), argv[0],
|
||||
gimp_ui_init ("script-fu", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Script-Fu Server Options"), "script-fu",
|
||||
gimp_plugin_help_func, "filters/script-fu.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
|
||||
_("OK"), ok_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
|
@ -584,7 +576,6 @@ server_interface ()
|
|||
gtk_widget_show (dlg);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
gdk_flush ();
|
||||
|
||||
return sint.run;
|
||||
|
|
|
@ -38,6 +38,7 @@ AM_CPPFLAGS = \
|
|||
-DLOCALEDIR=\""$(localedir)"\"
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/libgimp/libgimpui.la \
|
||||
$(top_builddir)/libgimp/libgimp.la \
|
||||
$(GTK_LIBS) \
|
||||
$(INTLLIBS)
|
||||
|
|
|
@ -317,15 +317,8 @@ sel2path_dialog (SELVALS *sels)
|
|||
GtkWidget *button;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("sel2path");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("sel2path", FALSE);
|
||||
|
||||
dlg = gtk_dialog_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (dlg), "Sel2path");
|
||||
|
|
|
@ -71,7 +71,6 @@ static gint save_image (gchar *filename,
|
|||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static void init_gtk (void);
|
||||
static gint save_dialog (void);
|
||||
|
||||
/*
|
||||
|
@ -207,7 +206,7 @@ run (gchar *name,
|
|||
{
|
||||
case RUN_INTERACTIVE:
|
||||
case RUN_WITH_LAST_VALS:
|
||||
init_gtk ();
|
||||
gimp_ui_init ("sgi", FALSE);
|
||||
export = gimp_export_image (&image_ID, &drawable_ID, "SGI",
|
||||
(CAN_HANDLE_RGB |
|
||||
CAN_HANDLE_GRAY |
|
||||
|
@ -627,20 +626,6 @@ save_ok_callback (GtkWidget *widget,
|
|||
gtk_widget_destroy (GTK_WIDGET (data));
|
||||
}
|
||||
|
||||
static void
|
||||
init_gtk (void)
|
||||
{
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("sgi");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
}
|
||||
|
||||
static gint
|
||||
save_dialog (void)
|
||||
{
|
||||
|
|
|
@ -733,15 +733,8 @@ sinus_dialog (void)
|
|||
char buf[3*100];
|
||||
guchar *data;
|
||||
#endif
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("sinus");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("sinus", TRUE);
|
||||
|
||||
/* Create Main window with a vbox */
|
||||
/* ============================== */
|
||||
|
@ -1170,16 +1163,6 @@ mw_preview_new (GtkWidget *parent,
|
|||
GtkWidget *pframe;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *button;
|
||||
guchar *color_cube;
|
||||
|
||||
gtk_preview_set_gamma (gimp_gamma ());
|
||||
gtk_preview_set_install_cmap (gimp_install_cmap ());
|
||||
color_cube = gimp_color_cube ();
|
||||
gtk_preview_set_color_cube (color_cube[0], color_cube[1],
|
||||
color_cube[2], color_cube[3]);
|
||||
|
||||
gtk_widget_set_default_visual (gtk_preview_get_visual ());
|
||||
gtk_widget_set_default_colormap (gtk_preview_get_cmap ());
|
||||
|
||||
frame = gtk_frame_new (_("Preview"));
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
|
|
|
@ -41,9 +41,10 @@
|
|||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "struc.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
#include "struc.h"
|
||||
|
||||
/* --- Typedefs --- */
|
||||
enum
|
||||
|
@ -243,15 +244,8 @@ struc_dialog (void)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("struc");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("struc", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Apply Canvas"), "struc",
|
||||
gimp_plugin_help_func, "filters/struc.html",
|
||||
|
|
|
@ -267,17 +267,9 @@ open_url_dialog (void)
|
|||
GtkWidget *entry;
|
||||
GtkWidget *table;
|
||||
GSList *group;
|
||||
gchar buffer[256];
|
||||
|
||||
gint argc;
|
||||
gchar **argv;
|
||||
gchar buffer[256];
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("webbrowser");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("webbrowser", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Open URL"), "webbbrowser",
|
||||
gimp_plugin_help_func, "filters/webbrowser.html",
|
||||
|
|
|
@ -879,13 +879,8 @@ snap_dialog(void)
|
|||
GSList *radio_group = NULL;
|
||||
gint radio_pressed[2];
|
||||
gint decorations;
|
||||
gint argc = 1;
|
||||
gchar **argv = g_new (gchar *, 1);
|
||||
guint delay;
|
||||
|
||||
/* Set the name */
|
||||
argv[0] = g_strdup("winsnap");
|
||||
|
||||
/* Set defaults */
|
||||
radio_pressed[0] = (winsnapvals.root == FALSE);
|
||||
radio_pressed[1] = (winsnapvals.root == TRUE);
|
||||
|
@ -893,10 +888,7 @@ snap_dialog(void)
|
|||
delay = winsnapvals.delay;
|
||||
|
||||
/* Init GTK */
|
||||
gtk_init(&argc, &argv);
|
||||
gtk_rc_parse(gimp_gtkrc());
|
||||
|
||||
gdk_set_use_xshm(gimp_use_xshm());
|
||||
gimp_ui_init ("winsnap", FALSE);
|
||||
|
||||
/* Main Dialog */
|
||||
dialog = gtk_dialog_new ();
|
||||
|
|
|
@ -782,15 +782,8 @@ save_dialog (void)
|
|||
GtkWidget *table;
|
||||
GtkWidget *toggle;
|
||||
GtkObject *scale_data;
|
||||
gchar **argv;
|
||||
gint argc;
|
||||
|
||||
argc = 1;
|
||||
argv = g_new (gchar *, 1);
|
||||
argv[0] = g_strdup ("xjt");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_rc_parse (gimp_gtkrc ());
|
||||
gimp_ui_init ("xjt", FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Save as XJT"), "xjt",
|
||||
gimp_plugin_help_func, "filters/xjt.html",
|
||||
|
|
Loading…
Reference in New Issue