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: no longer in the source branch.
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
1=== modified file 'src/Tooltip.cpp'
2--- src/Tooltip.cpp 2011-03-30 16:40:20 +0000
3+++ src/Tooltip.cpp 2011-05-26 09:47:36 +0000
4@@ -67,8 +67,8 @@
5 _vlayout->AddLayout(_top_space, 0);
6
7 _tooltip_text = new nux::StaticCairoText (_labelText.GetTCharPtr (), NUX_TRACKER_LOCATION);
8- _tooltip_text->sigTextChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
9- _tooltip_text->sigFontChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
10+ _on_text_changed_connection = (sigc::connection) _tooltip_text->sigTextChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
11+ _on_font_changed_connection = (sigc::connection) _tooltip_text->sigFontChanged.connect (sigc::mem_fun (this, &Tooltip::RecvCairoTextChanged));
12 _tooltip_text->Reference();
13
14 _vlayout->AddView(_tooltip_text, 1, eCenter, eFull);
15@@ -92,6 +92,12 @@
16 if (_texture_bg)
17 _texture_bg->UnReference ();
18
19+ if (_on_text_changed_connection.connected ())
20+ _on_text_changed_connection.disconnect ();
21+
22+ if (_on_font_changed_connection.connected ())
23+ _on_font_changed_connection.disconnect ();
24+
25 _tooltip_text->UnReference();
26 }
27
28
29=== modified file 'src/Tooltip.h'
30--- src/Tooltip.h 2010-12-13 20:10:14 +0000
31+++ src/Tooltip.h 2011-05-26 09:47:36 +0000
32@@ -130,6 +130,9 @@
33
34 // Introspection
35 gchar *_name;
36+
37+ sigc::connection _on_text_changed_connection;
38+ sigc::connection _on_font_changed_connection;
39 };
40 }
41