[gtkmm] Style: Virtual Functions: Correct reference counting errors.



commit 61147cd5c2dcdff48611465dbf60f2f08454b083
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Mon Nov 1 13:22:42 2010 -0400

    	Style: Virtual Functions: Correct reference counting errors.
    
    	* tools/m4/convert_pango.m4: Remove the conversion from `PangoLayout*'
    	to `const Glib::RefPtr<Pango::Layout>&' so it doesn't cause reference
    	counting errors in the future.
    	* gtk/src/style.hg: Put the PangoLayout conversion in this file
    	locally for the draw_layout virtual function. Also correct a
    	conversion that could cause reference counting errors.
    
    	Fixes GNOME Bug #633689 (mario).

 ChangeLog                 |   13 +++++++++++++
 gtk/src/style.hg          |    3 ++-
 tools/m4/convert_pango.m4 |    1 -
 3 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6f56b21..1476dc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-01  José Alburquerque  <jaalburqu svn gnome org>
+
+	Style: Virtual Functions: Correct reference counting errors.
+
+	* tools/m4/convert_pango.m4: Remove the conversion from `PangoLayout*'
+	to `const Glib::RefPtr<Pango::Layout>&' so it doesn't cause reference
+	counting errors in the future.
+	* gtk/src/style.hg: Put the PangoLayout conversion in this file
+	locally for the draw_layout virtual function. Also correct a
+	conversion that could cause reference counting errors.
+
+	Fixes GNOME Bug #633689 (mario).
+
 2.91.2:
 
 2010-10-26  Murray Cumming  <murrayc murrayc com>
diff --git a/gtk/src/style.hg b/gtk/src/style.hg
index 46986b4..93ba3c5 100644
--- a/gtk/src/style.hg
+++ b/gtk/src/style.hg
@@ -364,7 +364,7 @@ protected:
 
   _WRAP_VFUNC(Glib::RefPtr<Style> clone(), clone)
 
-#m4 _CONVERSION(`GtkRcStyle*',`const Glib::RefPtr<RcStyle>&',`Glib::wrap($3)')
+#m4 _CONVERSION(`GtkRcStyle*',`const Glib::RefPtr<RcStyle>&',`Glib::wrap($3, true)')
   _WRAP_VFUNC(void init_from_rc(const Glib::RefPtr<RcStyle>& rc_style), init_from_rc)
 
 
@@ -484,6 +484,7 @@ protected:
          Widget* widget,
          const Glib::ustring& detail,
          int x, int y, ExpanderStyle expander_style), draw_expander)
+#m4 _CONVERSION(`PangoLayout*',`const Glib::RefPtr<Pango::Layout>&',Glib::wrap($3, true))
   _WRAP_VFUNC(void draw_layout(const Cairo::RefPtr<Cairo::Context>& cr,
          Gtk::StateType state_type,
          bool use_text,
diff --git a/tools/m4/convert_pango.m4 b/tools/m4/convert_pango.m4
index 947b7ed..1b6db57 100644
--- a/tools/m4/convert_pango.m4
+++ b/tools/m4/convert_pango.m4
@@ -134,7 +134,6 @@ _CONVERSION(`const Glib::RefPtr<Context>&',`PangoContext*',__CONVERT_REFPTR_TO_P
 _CONVERSION(`PangoLayout*',`Glib::RefPtr<Pango::Layout>',Glib::wrap($3))
 _CONVERSION(`PangoLayout*',`Glib::RefPtr<const Pango::Layout>',Glib::wrap($3))
 _CONVERSION(`PangoLayout*',`Glib::RefPtr<Layout>',Glib::wrap($3))
-_CONVERSION(`PangoLayout*',`const Glib::RefPtr<Pango::Layout>&',Glib::wrap($3))
 _CONVERSION(`const Glib::RefPtr<Layout>&',`PangoLayout*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<Pango::Layout>&',`PangoLayout*',__CONVERT_REFPTR_TO_P)
 # Special treatment for the Sun Forte compiler



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