[banshee] StreamPositionLabel: Avoid unnecessary redraws (bgo#647144)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] StreamPositionLabel: Avoid unnecessary redraws (bgo#647144)
- Date: Fri, 8 Apr 2011 16:50:12 +0000 (UTC)
commit 97eda7ffed4f7402b2966bfd7ee4ae000f9247f2
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Apr 8 11:42:36 2011 -0500
StreamPositionLabel: Avoid unnecessary redraws (bgo#647144)
Ignore attempts to set the label to its current value.
.../Banshee.Widgets/StreamPositionLabel.cs | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
index fdb1293..a31a21c 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
@@ -174,12 +174,14 @@ namespace Banshee.Widgets
}
}
+ private string last_text;
private void UpdateLabel (string text)
{
- if (!IsRealized || layout == null) {
+ if (!IsRealized || layout == null || text == last_text) {
return;
}
+ last_text = text;
layout.SetMarkup (String.Format (format_string, GLib.Markup.EscapeText (text)));
QueueResize ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]