[the-board] [tb] Change tb_mx_stylable_get_padding() to use mx_stylable_get()



commit 620c6302c0e82ddac893ef4643dd7da1e3b74a8f
Author: Lucas Rocha <lucasr gnome org>
Date:   Sat Mar 26 01:25:14 2011 +0000

    [tb] Change tb_mx_stylable_get_padding() to use mx_stylable_get()
    
    Using mx_stylable_get_property() was causing an unexpected crash related
    to GValue handling. Using mx_stylable_get() not only fixes the bug but
    also looks cleaner.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=645519

 src/tb/tb-mx-util.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/tb/tb-mx-util.c b/src/tb/tb-mx-util.c
index e3065c7..7702626 100644
--- a/src/tb/tb-mx-util.c
+++ b/src/tb/tb-mx-util.c
@@ -14,11 +14,11 @@
 MxPadding *
 tb_mx_stylable_get_padding (MxStylable *stylable)
 {
-  GValue padding;
+  MxPadding *padding;
 
-  g_value_init (&padding, MX_TYPE_PADDING);
+  mx_stylable_get (stylable,
+                   "padding", &padding,
+                   NULL);
 
-  mx_stylable_get_property (stylable, "padding", &padding);
-
-  return g_value_get_boxed (&padding);
+  return padding;
 }



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