[gimp] Bug 646316 - Hinting change to medium on first edit of text field
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 646316 - Hinting change to medium on first edit of text field
- Date: Sat, 16 Apr 2011 13:19:14 +0000 (UTC)
commit f0a52f1db9688a19f60b0d354ab426d48f1f741d
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 16 15:17:22 2011 +0200
Bug 646316 - Hinting change to medium on first edit of text field
gimp_text_set_property(): Deserialize the compat "hinting" property
only if the new "hint-style" one has its default value, so we don't
overwrite a serialized new "hint-style" with a compat "hinting" that
is only there for old GIMP versions.
app/text/gimptext.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/app/text/gimptext.c b/app/text/gimptext.c
index 1666030..80d2c80 100644
--- a/app/text/gimptext.c
+++ b/app/text/gimptext.c
@@ -504,9 +504,14 @@ gimp_text_set_property (GObject *object,
text->border = g_value_get_int (value);
break;
case PROP_HINTING:
- text->hint_style = (g_value_get_boolean (value) ?
- GIMP_TEXT_HINT_STYLE_MEDIUM :
- GIMP_TEXT_HINT_STYLE_NONE);
+ /* interpret "hinting" only if "hint-style" has its default
+ * value, so we don't overwrite a serialized new hint-style with
+ * a compat "hinting" that is only there for old GIMP versions
+ */
+ if (text->hint_style == GIMP_TEXT_HINT_STYLE_MEDIUM)
+ text->hint_style = (g_value_get_boolean (value) ?
+ GIMP_TEXT_HINT_STYLE_MEDIUM :
+ GIMP_TEXT_HINT_STYLE_NONE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]