From 8f17d458dcae272175003a8b05350ada365976e5 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 27 Jun 2007 11:54:41 +0000 Subject: [PATCH] fixed spelling error. 2007-06-27 Sven Neumann * 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 --- ChangeLog | 8 ++++++++ app/widgets/gimpcolorpanel.c | 16 +++++++++------- app/widgets/gimpcolorpanel.h | 1 + app/widgets/gimpimagecommenteditor.c | 8 +++++--- app/widgets/gimpimagecommenteditor.h | 2 +- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 206109f622..29ac07f0e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-27 Sven Neumann + + * 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 * app/widgets/gimpcontrollerlist.c (gimp_controller_list_init): diff --git a/app/widgets/gimpcolorpanel.c b/app/widgets/gimpcolorpanel.c index 2fd9c201ff..382ded33ec 100644 --- a/app/widgets/gimpcolorpanel.c +++ b/app/widgets/gimpcolorpanel.c @@ -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; } } diff --git a/app/widgets/gimpcolorpanel.h b/app/widgets/gimpcolorpanel.h index ddf6807c2a..68759b804a 100644 --- a/app/widgets/gimpcolorpanel.h +++ b/app/widgets/gimpcolorpanel.h @@ -39,6 +39,7 @@ struct _GimpColorPanel GimpContext *context; GtkWidget *color_dialog; + gboolean recoursing; }; struct _GimpColorPanelClass diff --git a/app/widgets/gimpimagecommenteditor.c b/app/widgets/gimpimagecommenteditor.c index 1d3ce0915c..47d12c16bd 100644 --- a/app/widgets/gimpimagecommenteditor.c +++ b/app/widgets/gimpimagecommenteditor.c @@ -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); } diff --git a/app/widgets/gimpimagecommenteditor.h b/app/widgets/gimpimagecommenteditor.h index 2bbbb7d098..72e7b1a7f1 100644 --- a/app/widgets/gimpimagecommenteditor.h +++ b/app/widgets/gimpimagecommenteditor.h @@ -41,7 +41,7 @@ struct _GimpImageCommentEditor GimpImageParasiteView parent_instance; GtkTextBuffer *buffer; - gboolean recursing; + gboolean recoursing; }; struct _GimpImageCommentEditorClass