[banshee] Dispose copied FontDescriptions
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Dispose copied FontDescriptions
- Date: Fri, 12 Feb 2010 11:19:54 +0000 (UTC)
commit 32bac7b6e0091b7c62b379f9d90875e0ae6e4dc1
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Fri Feb 12 22:19:37 2010 +1100
Dispose copied FontDescriptions
.../Banshee.Collection.Gui/ColumnCellAlbum.cs | 1 +
.../Banshee.Collection.Gui/ColumnCellTrack.cs | 1 -
.../Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs | 2 ++
.../Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs | 3 +++
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 1 +
5 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
index 8371884..716fad0 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
@@ -169,6 +169,7 @@ namespace Banshee.Collection.Gui
layout.GetPixelSize (out text_w, out text_h);
height += text_h;
+ layout.FontDescription.Dispose ();
layout.Dispose ();
return (height < image_size ? image_size : height) + 6;
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrack.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrack.cs
index 4aebd48..8d5c904 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrack.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellTrack.cs
@@ -68,7 +68,6 @@ namespace Banshee.Collection.Gui
context.Layout.Width = (int)((cellWidth - 8) * Pango.Scale.PangoScale);
context.Layout.Ellipsize = Pango.EllipsizeMode.End;
- //context.Layout.FontDescription = context.Widget.PangoContext.FontDescription.Copy ();
context.Layout.FontDescription.Weight = font_weight;
context.Layout.SetMarkup (String.Format ("<b>{0}</b>\n<small><i>{1}</i></small>",
GLib.Markup.EscapeText (track.DisplayTrackTitle),
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
index a0566f2..67055ab 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
@@ -138,11 +138,13 @@ namespace Banshee.Gui.Widgets
protected override void OnThemeChanged ()
{
if (first_line_layout != null) {
+ first_line_layout.FontDescription.Dispose ();
first_line_layout.Dispose ();
first_line_layout = null;
}
if (second_line_layout != null) {
+ second_line_layout.FontDescription.Dispose ();
second_line_layout.Dispose ();
second_line_layout = null;
}
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs
index c611a89..3d53e7c 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs
@@ -90,16 +90,19 @@ namespace Banshee.Gui.Widgets
protected override void OnThemeChanged ()
{
if (first_line_layout != null) {
+ first_line_layout.FontDescription.Dispose ();
first_line_layout.Dispose ();
first_line_layout = null;
}
if (second_line_layout != null) {
+ second_line_layout.FontDescription.Dispose ();
second_line_layout.Dispose ();
second_line_layout = null;
}
if (third_line_layout != null) {
+ third_line_layout.FontDescription.Dispose ();
third_line_layout.Dispose ();
third_line_layout = null;
}
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 00948bf..806f91e 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -73,6 +73,7 @@ namespace Hyena.Data.Gui
Gdk.Drawable drawable = cell_context != null ? cell_context.Drawable : null;
if (pango_layout != null) {
+ pango_layout.FontDescription.Dispose ();
pango_layout.Dispose ();
pango_layout = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]