preview the curve settings in the image window when initializing the tool.

2000-12-17  Sven Neumann  <sven@gimp.org>

	* app/curves.c: preview the curve settings in the image window when
	initializing the tool. This way the new curves behaviour (init with
	last settings) is visible.

	* app/user_install.c: check that strings are non-NULL before passing
	them to strcmp.

	* libgimp/gimpfileselection: do not try to pass a NULL text to
	gtk_entry_set_text, use an empty string instead.
This commit is contained in:
Sven Neumann 2000-12-17 00:28:32 +00:00 committed by Sven Neumann
parent 0c6ba7b0fa
commit 6639e17c0d
12 changed files with 59 additions and 24 deletions

View file

@ -1,3 +1,15 @@
2000-12-17 Sven Neumann <sven@gimp.org>
* app/curves.c: preview the curve settings in the image window when
initializing the tool. This way the new curves behaviour (init with
last settings) is visible.
* app/user_install.c: check that strings are non-NULL before passing
them to strcmp.
* libgimp/gimpfileselection: do not try to pass a NULL text to
gtk_entry_set_text, use an empty string instead.
2000-12-16 Sven Neumann <sven@gimp.org>
* app/gimppreviewcache.h

View file

@ -466,8 +466,8 @@ curves_initialize (GDisplay *gdisp)
}
}
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->image_map = image_map_create (gdisp, curves_dialog->drawable);
/* check for alpha channel */
@ -488,13 +488,18 @@ curves_initialize (GDisplay *gdisp)
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu),
curves_dialog->channel);
gimp_lut_setup (curves_dialog->lut, (GimpLutFunc) curves_lut_func,
(void *) curves_dialog, gimp_drawable_bytes (curves_dialog->drawable));
gimp_lut_setup (curves_dialog->lut,
(GimpLutFunc) curves_lut_func,
(void *) curves_dialog,
gimp_drawable_bytes (curves_dialog->drawable));
if (!GTK_WIDGET_VISIBLE (curves_dialog->shell))
gtk_widget_show (curves_dialog->shell);
curves_update (curves_dialog, GRAPH | DRAW);
if (curves_dialog->preview)
curves_preview (curves_dialog);
}
void

View file

@ -466,8 +466,8 @@ curves_initialize (GDisplay *gdisp)
}
}
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->image_map = image_map_create (gdisp, curves_dialog->drawable);
/* check for alpha channel */
@ -488,13 +488,18 @@ curves_initialize (GDisplay *gdisp)
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu),
curves_dialog->channel);
gimp_lut_setup (curves_dialog->lut, (GimpLutFunc) curves_lut_func,
(void *) curves_dialog, gimp_drawable_bytes (curves_dialog->drawable));
gimp_lut_setup (curves_dialog->lut,
(GimpLutFunc) curves_lut_func,
(void *) curves_dialog,
gimp_drawable_bytes (curves_dialog->drawable));
if (!GTK_WIDGET_VISIBLE (curves_dialog->shell))
gtk_widget_show (curves_dialog->shell);
curves_update (curves_dialog, GRAPH | DRAW);
if (curves_dialog->preview)
curves_preview (curves_dialog);
}
void

View file

@ -1292,7 +1292,8 @@ user_install_resolution_done (void)
tile_cache_size = new_tile_cache_size;
update = g_list_append (update, "tile-cache-size");
}
if (strcmp (swap_path, new_swap_path))
if (swap_path && new_swap_path &&
strcmp (swap_path, new_swap_path))
{
g_free (swap_path); swap_path = new_swap_path;
update = g_list_append (update, "swap-path");

View file

@ -1292,7 +1292,8 @@ user_install_resolution_done (void)
tile_cache_size = new_tile_cache_size;
update = g_list_append (update, "tile-cache-size");
}
if (strcmp (swap_path, new_swap_path))
if (swap_path && new_swap_path &&
strcmp (swap_path, new_swap_path))
{
g_free (swap_path); swap_path = new_swap_path;
update = g_list_append (update, "swap-path");

View file

@ -466,8 +466,8 @@ curves_initialize (GDisplay *gdisp)
}
}
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->image_map = image_map_create (gdisp, curves_dialog->drawable);
/* check for alpha channel */
@ -488,13 +488,18 @@ curves_initialize (GDisplay *gdisp)
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu),
curves_dialog->channel);
gimp_lut_setup (curves_dialog->lut, (GimpLutFunc) curves_lut_func,
(void *) curves_dialog, gimp_drawable_bytes (curves_dialog->drawable));
gimp_lut_setup (curves_dialog->lut,
(GimpLutFunc) curves_lut_func,
(void *) curves_dialog,
gimp_drawable_bytes (curves_dialog->drawable));
if (!GTK_WIDGET_VISIBLE (curves_dialog->shell))
gtk_widget_show (curves_dialog->shell);
curves_update (curves_dialog, GRAPH | DRAW);
if (curves_dialog->preview)
curves_preview (curves_dialog);
}
void

View file

@ -466,8 +466,8 @@ curves_initialize (GDisplay *gdisp)
}
}
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->drawable = gimage_active_drawable (gdisp->gimage);
curves_dialog->color = drawable_color (curves_dialog->drawable);
curves_dialog->image_map = image_map_create (gdisp, curves_dialog->drawable);
/* check for alpha channel */
@ -488,13 +488,18 @@ curves_initialize (GDisplay *gdisp)
gtk_option_menu_set_history (GTK_OPTION_MENU (curves_dialog->channel_menu),
curves_dialog->channel);
gimp_lut_setup (curves_dialog->lut, (GimpLutFunc) curves_lut_func,
(void *) curves_dialog, gimp_drawable_bytes (curves_dialog->drawable));
gimp_lut_setup (curves_dialog->lut,
(GimpLutFunc) curves_lut_func,
(void *) curves_dialog,
gimp_drawable_bytes (curves_dialog->drawable));
if (!GTK_WIDGET_VISIBLE (curves_dialog->shell))
gtk_widget_show (curves_dialog->shell);
curves_update (curves_dialog, GRAPH | DRAW);
if (curves_dialog->preview)
curves_preview (curves_dialog);
}
void

View file

@ -1292,7 +1292,8 @@ user_install_resolution_done (void)
tile_cache_size = new_tile_cache_size;
update = g_list_append (update, "tile-cache-size");
}
if (strcmp (swap_path, new_swap_path))
if (swap_path && new_swap_path &&
strcmp (swap_path, new_swap_path))
{
g_free (swap_path); swap_path = new_swap_path;
update = g_list_append (update, "swap-path");

View file

@ -3,8 +3,8 @@ AC_INIT(gimprc.in)
dnl Initialize automake stuff
GIMP_MAJOR_VERSION=1
GIMP_MINOR_VERSION=1
GIMP_MICRO_VERSION=30
GIMP_MINOR_VERSION=2
GIMP_MICRO_VERSION=0
GIMP_INTERFACE_AGE=0
GIMP_BINARY_AGE=0
GIMP_VERSION=$GIMP_MAJOR_VERSION.$GIMP_MINOR_VERSION.$GIMP_MICRO_VERSION

View file

@ -254,7 +254,7 @@ gimp_file_selection_set_filename (GimpFileSelection *gfs,
g_return_if_fail (gfs != NULL);
g_return_if_fail (GIMP_IS_FILE_SELECTION (gfs));
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename);
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename ? filename : "");
/* update everything
*/

View file

@ -254,7 +254,7 @@ gimp_file_selection_set_filename (GimpFileSelection *gfs,
g_return_if_fail (gfs != NULL);
g_return_if_fail (GIMP_IS_FILE_SELECTION (gfs));
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename);
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename ? filename : "");
/* update everything
*/

View file

@ -254,7 +254,7 @@ gimp_file_selection_set_filename (GimpFileSelection *gfs,
g_return_if_fail (gfs != NULL);
g_return_if_fail (GIMP_IS_FILE_SELECTION (gfs));
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename);
gtk_entry_set_text (GTK_ENTRY (gfs->entry), filename ? filename : "");
/* update everything
*/