[goffice] Fix font color theme support. [Debian 757611]



commit 5307567bcb16fb4b3a658111d4f261e15778e393
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Aug 10 09:16:14 2014 +0200

    Fix font color theme support. [Debian 757611]

 ChangeLog                |    7 +++++++
 NEWS                     |    1 +
 goffice/utils/go-style.c |   10 ++++++----
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 747bc37..77b6009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-08-10  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/utils/go-style.c (cb_pattern_type_activate),
+       (cb_brightness_changed), (cb_gradient_type_changed),
+       (cb_fill_type_changed), (cb_font_color_changed),
+       (cb_angle_changed): fixed more auto style issues. [see Debian #757611]
+
 2014-07-28  Morten Welinder  <terra gnome org>
 
        * goffice/gtk/go-combo-color.c
diff --git a/NEWS b/NEWS
index 89f06fe..45837d0 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.10.18:
 Jean:
        * Fix grid line theme support. [#733403]
        * Fix default ticks position.
+       * Fix font color theme support. [Debian 757611]
 
 Morten:
        * Work around gtk+ ABI break for colour selector.  [#733350]
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 0cf300b..4aaedb1 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -416,9 +416,8 @@ static void
 cb_pattern_type_activate (GtkWidget *selector, StylePrefState const *state)
 {
        GOStyle *style = state->style;
-       gboolean is_auto;
 
-       style->fill.pattern.pattern = go_selector_get_active (GO_SELECTOR (selector), &is_auto);
+       style->fill.pattern.pattern = go_selector_get_active (GO_SELECTOR (selector), 
&style->fill.auto_pattern);
        set_style (state);
 }
 
@@ -455,6 +454,7 @@ cb_brightness_changed (GtkRange *range, StylePrefState *state)
        GOStyle *style = state->style;
 
        go_style_set_fill_brightness (style, gtk_range_get_value (range));
+       style->fill.gradient.auto_brightness = state->default_style->fill.gradient.auto_brightness;
        set_style (state);
        fill_update_selectors (state);
 }
@@ -463,7 +463,7 @@ static void
 cb_gradient_type_changed (GOSelector *selector, StylePrefState const *state)
 {
        GOStyle *style = state->style;
-       style->fill.gradient.dir = go_selector_get_active (selector, NULL);
+       style->fill.gradient.dir = go_selector_get_active (selector, &style->fill.gradient.auto_dir);
        set_style (state);
 }
 
@@ -675,7 +675,7 @@ cb_fill_type_changed (GtkWidget *menu, StylePrefState *state)
        /* we need to set brightness to 0 because of unicolor gradients recognition */
                gtk_range_set_value (GTK_RANGE (state->fill.gradient.brightness), 0.);
        state->style->fill.type = fill_infos[index].type;
-       state->style->fill.auto_type = FALSE;
+       state->style->fill.auto_type = state->style->fill.type == state->default_style->fill.type;
        set_style (state);
 
        fill_update_visibilies (index, state);
@@ -912,6 +912,7 @@ cb_font_color_changed (GOSelector *selector,
        GOStyle *style = state->style;
 
        style->font.color = go_color_selector_get_color (selector, NULL);
+       style->font.auto_color = style->font.color == state->default_style->font.color;
        set_style (state);
 }
 
@@ -958,6 +959,7 @@ static void
 cb_angle_changed (GORotationSel *grs, int angle, StylePrefState *state)
 {
        go_style_set_text_angle (state->style, angle);
+       state->style->text_layout.auto_angle = state->style->text_layout.angle == 
state->default_style->text_layout.angle;
        set_style (state);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]