minor layout tweak.

2007-07-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/channel_mixer.c: minor layout tweak.

	* libgimpwidgets/gimppreviewarea.c 
(gimp_preview_area_set_colormap):
	clear the colormap to all zeros before setting the new colors.


svn path=/trunk/; revision=22893
This commit is contained in:
Sven Neumann 2007-07-06 20:47:44 +00:00 committed by Sven Neumann
parent ee0572b45d
commit 7b19c74d10
3 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2007-07-06 Sven Neumann <sven@gimp.org>
* plug-ins/common/channel_mixer.c: minor layout tweak.
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_set_colormap):
clear the colormap to all zeros before setting the new colors.
2007-07-06 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd-load.c

View File

@ -1638,7 +1638,9 @@ gimp_preview_area_set_colormap (GimpPreviewArea *area,
if (num_colors > 0)
{
if (! area->colormap)
if (area->colormap)
memset (area->colormap, 0, 3 * 256);
else
area->colormap = g_new0 (guchar, 3 * 256);
memcpy (area->colormap, colormap, 3 * num_colors);

View File

@ -440,6 +440,7 @@ cm_dialog (CmParamsType *mix,
{
GtkWidget *dialog;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkWidget *frame;
GtkWidget *hbox;
GtkWidget *button;
@ -625,12 +626,16 @@ cm_dialog (CmParamsType *mix,
G_CALLBACK (cm_blue_scale_callback),
mix);
vbox = gtk_vbox_new (6, FALSE);
gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
/* The monochrome toggle */
mix->monochrome_toggle =
gtk_check_button_new_with_mnemonic (_("_Monochrome"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mix->monochrome_toggle),
mix->monochrome);
gtk_box_pack_start (GTK_BOX (main_vbox), mix->monochrome_toggle,
gtk_box_pack_start (GTK_BOX (vbox), mix->monochrome_toggle,
FALSE, FALSE, 0);
gtk_widget_show (mix->monochrome_toggle);
@ -644,7 +649,7 @@ cm_dialog (CmParamsType *mix,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
(mix->preserve_luminosity_toggle),
mix->preserve_luminosity);
gtk_box_pack_start (GTK_BOX (main_vbox), mix->preserve_luminosity_toggle,
gtk_box_pack_start (GTK_BOX (vbox), mix->preserve_luminosity_toggle,
FALSE, FALSE, 0);
gtk_widget_show (mix->preserve_luminosity_toggle);