[gnumeric] Minor code cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Minor code cleanup.
- Date: Wed, 11 Jan 2012 00:27:11 +0000 (UTC)
commit 5b466b2725ccbe33c93d23232fa1ec2faa523639
Author: Morten Welinder <terra gnome org>
Date: Tue Jan 10 19:26:47 2012 -0500
Minor code cleanup.
ChangeLog | 5 +++++
src/gui-util.c | 7 ++-----
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e9f99e4..ad21a9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-10 Morten Welinder <terra gnome org>
+
+ * src/gui-util.c (gnm_store_text_tag_attr_in_pango): Use
+ gnm_object_get_bool.
+
2012-01-09 Morten Welinder <terra gnome org>
* src/wbc-gtk.c (wbc_gtk_init): No need to load the file history
diff --git a/src/gui-util.c b/src/gui-util.c
index 84e3afc..fb9900b 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -948,8 +948,7 @@ gnm_load_pango_attributes_into_buffer (PangoAttrList *markup, GtkTextBuffer *bu
}
#define gnmstoretexttagattrinpangoint(nameset, name, gnm_pango_attr_new) \
- g_object_get (G_OBJECT (tag), nameset, &is_set, NULL); \
- if (is_set) { \
+ if (gnm_object_get_bool (tag, nameset)) { \
int value; \
g_object_get (G_OBJECT (tag), name, &value, NULL); \
attr = gnm_pango_attr_new (value); \
@@ -964,15 +963,13 @@ gnm_store_text_tag_attr_in_pango (PangoAttrList *list, GtkTextTag *tag, GtkTextI
{
GtkTextIter end = *start;
gint x, y;
- gboolean is_set;
PangoAttribute * attr;
gtk_text_iter_forward_to_tag_toggle (&end, tag);
x = g_utf8_offset_to_pointer (text, gtk_text_iter_get_offset (start)) - text;
y = g_utf8_offset_to_pointer (text, gtk_text_iter_get_offset (&end)) - text;
- g_object_get (G_OBJECT (tag), "foreground-set", &is_set, NULL);
- if (is_set) {
+ if (gnm_object_get_bool (tag, "foreground-set")) {
#if GTK_MAJOR_VERSION > 3 || GTK_MINOR_VERSION >= 2
GdkRGBA *color = NULL;
g_object_get (G_OBJECT (tag), "foreground-rgba", &color, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]