Merge lp:~unity-team/unity/unity.fix-762801 into lp:unity

Proposed by Mirco Müller
Status: Merged
Approved by: Mirco Müller
Approved revision: 1196
Merged at revision: 1196
Proposed branch: lp:~unity-team/unity/unity.fix-762801
Merge into: lp:unity
Diff against target: 40 lines (+11/-2)
2 files modified
src/Tooltip.cpp (+8/-2)
src/Tooltip.h (+3/-0)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-762801
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+62438@code.launchpad.net

Description of the change

Correctly remove any signal-connections (sigc) used for StaticCairoText in the destructor of the Tooltip. Should fix any remaining issue regarding LP: #762801

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Tooltip.cpp'
--- src/Tooltip.cpp 2011-03-30 16:40:20 +0000
+++ src/Tooltip.cpp 2011-05-26 09:47:36 +0000
@@ -67,8 +67,8 @@
67 _vlayout->AddLayout(_top_space, 0);67 _vlayout->AddLayout(_top_space, 0);
6868
69 _tooltip_text = new nux::StaticCairoText (_labelText.GetTCharPtr (), NUX_TRACKER_LOCATION);69 _tooltip_text = new nux::StaticCairoText (_labelText.GetTCharPtr (), NUX_TRACKER_LOCATION);
70 _tooltip_text->sigTextChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));70 _on_text_changed_connection = (sigc::connection) _tooltip_text->sigTextChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
71 _tooltip_text->sigFontChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));71 _on_font_changed_connection = (sigc::connection) _tooltip_text->sigFontChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
72 _tooltip_text->Reference();72 _tooltip_text->Reference();
73 73
74 _vlayout->AddView(_tooltip_text, 1, eCenter, eFull);74 _vlayout->AddView(_tooltip_text, 1, eCenter, eFull);
@@ -92,6 +92,12 @@
92 if (_texture_bg)92 if (_texture_bg)
93 _texture_bg->UnReference ();93 _texture_bg->UnReference ();
9494
95 if (_on_text_changed_connection.connected ())
96 _on_text_changed_connection.disconnect ();
97
98 if (_on_font_changed_connection.connected ())
99 _on_font_changed_connection.disconnect ();
100
95 _tooltip_text->UnReference();101 _tooltip_text->UnReference();
96 }102 }
97103
98104
=== modified file 'src/Tooltip.h'
--- src/Tooltip.h 2010-12-13 20:10:14 +0000
+++ src/Tooltip.h 2011-05-26 09:47:36 +0000
@@ -130,6 +130,9 @@
130 130
131 // Introspection131 // Introspection
132 gchar *_name;132 gchar *_name;
133
134 sigc::connection _on_text_changed_connection;
135 sigc::connection _on_font_changed_connection;
133 };136 };
134}137}
135138