fixed spelling error.

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

	* app/widgets/gimpimagecommenteditor.[ch]: fixed spelling error.

	* app/widgets/gimpcolorpanel.[ch]: applied slightly modified patch
	from Tor Lillqvist that changes the ColorPanel to provide live
	updates (bug #451568).

svn path=/trunk/; revision=22850
This commit is contained in:
Sven Neumann 2007-06-27 11:54:41 +00:00 committed by Sven Neumann
parent c8102e617a
commit 8f17d458dc
5 changed files with 24 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2007-06-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpimagecommenteditor.[ch]: fixed spelling error.
* app/widgets/gimpcolorpanel.[ch]: applied slightly modified patch
from Tor Lillqvist that changes the ColorPanel to provide live
updates (bug #451568).
2007-06-27 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontrollerlist.c (gimp_controller_list_init):

View File

@ -46,7 +46,6 @@ static void gimp_color_panel_dialog_update (GimpColorDialog *dialog,
GimpColorDialogState state,
GimpColorPanel *panel);
G_DEFINE_TYPE (GimpColorPanel, gimp_color_panel, GIMP_TYPE_COLOR_BUTTON)
#define parent_class gimp_color_panel_parent_class
@ -75,6 +74,7 @@ gimp_color_panel_init (GimpColorPanel *panel)
{
panel->context = NULL;
panel->color_dialog = NULL;
panel->recoursing = FALSE;
}
static void
@ -163,7 +163,7 @@ gimp_color_panel_clicked (GtkButton *button)
GTK_WIDGET (button),
NULL, NULL,
(const GimpRGB *) &color,
FALSE,
TRUE,
gimp_color_button_has_alpha (GIMP_COLOR_BUTTON (button)));
g_signal_connect (panel->color_dialog, "destroy",
@ -216,11 +216,11 @@ gimp_color_panel_color_changed (GimpColorButton *button)
GimpColorPanel *panel = GIMP_COLOR_PANEL (button);
GimpRGB color;
if (panel->color_dialog)
if (panel->color_dialog && ! panel->recoursing)
{
gimp_color_button_get_color (GIMP_COLOR_BUTTON (button), &color);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (panel->color_dialog),
&color);
&color);
}
}
@ -246,13 +246,15 @@ gimp_color_panel_dialog_update (GimpColorDialog *dialog,
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
panel->recoursing = TRUE;
gimp_color_button_set_color (GIMP_COLOR_BUTTON (panel), color);
panel->recoursing = FALSE;
break;
case GIMP_COLOR_DIALOG_OK:
gimp_color_button_set_color (GIMP_COLOR_BUTTON (panel), color);
/* Fallthrough */
case GIMP_COLOR_DIALOG_CANCEL:
gimp_color_button_set_color (GIMP_COLOR_BUTTON (panel), color);
gtk_widget_hide (panel->color_dialog);
break;
}
}

View File

@ -39,6 +39,7 @@ struct _GimpColorPanel
GimpContext *context;
GtkWidget *color_dialog;
gboolean recoursing;
};
struct _GimpColorPanelClass

View File

@ -63,6 +63,8 @@ gimp_image_comment_editor_init (GimpImageCommentEditor *editor)
GtkWidget *scrolled_window;
GtkWidget *text_view;
editor->recoursing = FALSE;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
@ -114,7 +116,7 @@ gimp_image_comment_editor_update (GimpImageParasiteView *view)
GimpImageCommentEditor *editor = GIMP_IMAGE_COMMENT_EDITOR (view);
const GimpParasite *parasite;
if (editor->recursing)
if (editor->recoursing)
return;
g_signal_handlers_block_by_func (editor->buffer,
@ -168,7 +170,7 @@ gimp_image_comment_editor_buffer_changed (GtkTextBuffer *buffer,
len = text ? strlen (text) : 0;
editor->recursing = TRUE;
editor->recoursing = TRUE;
if (len > 0)
{
@ -186,7 +188,7 @@ gimp_image_comment_editor_buffer_changed (GtkTextBuffer *buffer,
gimp_image_parasite_detach (image, GIMP_IMAGE_COMMENT_PARASITE);
}
editor->recursing = FALSE;
editor->recoursing = FALSE;
g_free (text);
}

View File

@ -41,7 +41,7 @@ struct _GimpImageCommentEditor
GimpImageParasiteView parent_instance;
GtkTextBuffer *buffer;
gboolean recursing;
gboolean recoursing;
};
struct _GimpImageCommentEditorClass