]> git.sur5r.net Git - glabels/commitdiff
2004-07-05 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Mon, 5 Jul 2004 19:43:23 +0000 (19:43 +0000)
committerJim Evins <evins@snaught.com>
Mon, 5 Jul 2004 19:43:23 +0000 (19:43 +0000)
* 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

glabels2/ChangeLog
glabels2/src/object-editor-fill-page.c
glabels2/src/object-editor-line-page.c

index 1f2bb4c375310728139bd514db5eb9de8a006f80..f64b0b9f991202d4d2db3a17122a420bbf3fae2a 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-05  Jim Evins  <evins@snaught.com>
+
+       * 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  <evins@snaught.com>
 
        * data/glabels.1:
index b5a33af8022aeb83743849898db7fd2428956aa0..d6f943f1fddf3a2f546983e15d58ca3c697217f4 100644 (file)
@@ -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,
index 78df8da4aaac76e3b9e454b146857f5f9fc2205c..de6864097d06b9010df1a6d29f7164ccb30a5d3e 100644 (file)
@@ -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,