From: Jim Evins Date: Mon, 5 Jul 2004 19:43:23 +0000 (+0000) Subject: 2004-07-05 Jim Evins X-Git-Tag: glabels-2_3_0~468 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=64e93eac58ec9545c3896e271ce3b78f23ebea26;p=glabels 2004-07-05 Jim Evins * src/object-editor-fill-page.c: (gl_object_editor_set_fill_color): * src/object-editor-line-page.c: (gl_object_editor_set_line_color): Preserve "is_default" of fill and line color_combos when creating from existing objects. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@429 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 1f2bb4c3..f64b0b9f 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,10 @@ +2004-07-05 Jim Evins + + * src/object-editor-fill-page.c: (gl_object_editor_set_fill_color): + * src/object-editor-line-page.c: (gl_object_editor_set_line_color): + Preserve "is_default" of fill and line color_combos when creating from + existing objects. + 2004-07-02 Jim Evins * data/glabels.1: diff --git a/glabels2/src/object-editor-fill-page.c b/glabels2/src/object-editor-fill-page.c index b5a33af8..d6f943f1 100644 --- a/glabels2/src/object-editor-fill-page.c +++ b/glabels2/src/object-editor-fill-page.c @@ -98,9 +98,18 @@ gl_object_editor_set_fill_color (glObjectEditor *editor, gl_object_editor_changed_cb, editor); - gdk_color = gl_color_to_gdk_color (color); - color_combo_set_color (COLOR_COMBO(editor->priv->fill_color_combo), gdk_color); - g_free (gdk_color); + if ( color == GL_COLOR_NONE ) { + + color_combo_set_color_to_default (COLOR_COMBO(editor->priv->fill_color_combo)); + + } else { + + gdk_color = gl_color_to_gdk_color (color); + color_combo_set_color (COLOR_COMBO(editor->priv->fill_color_combo), + gdk_color); + g_free (gdk_color); + + } g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->fill_color_combo), gl_object_editor_changed_cb, diff --git a/glabels2/src/object-editor-line-page.c b/glabels2/src/object-editor-line-page.c index 78df8da4..de686409 100644 --- a/glabels2/src/object-editor-line-page.c +++ b/glabels2/src/object-editor-line-page.c @@ -156,9 +156,18 @@ gl_object_editor_set_line_color (glObjectEditor *editor, gl_object_editor_changed_cb, editor); - gdk_color = gl_color_to_gdk_color (color); - color_combo_set_color (COLOR_COMBO(editor->priv->line_color_combo), gdk_color); - g_free (gdk_color); + if ( color == GL_COLOR_NONE ) { + + color_combo_set_color_to_default (COLOR_COMBO(editor->priv->line_color_combo)); + + } else { + + gdk_color = gl_color_to_gdk_color (color); + color_combo_set_color (COLOR_COMBO(editor->priv->line_color_combo), + gdk_color); + g_free (gdk_color); + + } g_signal_handlers_unblock_by_func (G_OBJECT(editor->priv->line_color_combo), gl_object_editor_changed_cb,