[gtkmm/gtkmm-2-22] Style: Virtual Functions: Correct reference counting errors.



commit 4fdd0972a4cbda1ba609d4cdfbd6364430040379
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Mon Nov 1 13:48:15 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 5c7863a..213dee5 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).
+
 2010-10-13  Armin Burgmeier  <armin arbur net>
 
 	* win32_installer/gtkmm-vc100-2_4.props:
diff --git a/gtk/src/style.hg b/gtk/src/style.hg
index 97f0d1b..e536686 100644
--- a/gtk/src/style.hg
+++ b/gtk/src/style.hg
@@ -438,7 +438,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)
 
 #m4 _CONVERSION(`GdkWindow*',`const Glib::RefPtr<Gdk::Window>&', `Glib::wrap((GdkWindowObject*)($3), true)')
@@ -585,6 +585,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 Glib::RefPtr<Gdk::Window>& window,
          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]