[banshee] [QueueableSourceComboBox] Show a tooltip if the name is too long (bgo#598504)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [QueueableSourceComboBox] Show a tooltip if the name is too long (bgo#598504)
- Date: Fri, 6 Nov 2009 09:14:52 +0000 (UTC)
commit 69ca5177b07ec4cbaef4279c931e6bea07d87359
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Fri Nov 6 20:12:24 2009 +1100
[QueueableSourceComboBox] Show a tooltip if the name is too long (bgo#598504)
.../Banshee.PlayQueue/QueueableSourceComboBox.cs | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/QueueableSourceComboBox.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/QueueableSourceComboBox.cs
index db7f6bc..756af51 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/QueueableSourceComboBox.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/QueueableSourceComboBox.cs
@@ -63,6 +63,23 @@ namespace Banshee.PlayQueue
store.Refresh ();
SetActiveSource (source_name);
+
+ HasTooltip = true;
+ QueryTooltip += HandleQueryTooltip;
+ }
+
+ private void HandleQueryTooltip (object o, QueryTooltipArgs args)
+ {
+ var source = Source;
+ if (source != null && Child.Allocation.Width < Child.Requisition.Width) {
+ args.Tooltip.Text = source.Name;
+ args.RetVal = true;
+ }
+
+ // Work around ref counting SIGSEGV, see http://bugzilla.gnome.org/show_bug.cgi?id=478519#c9
+ if (args.Tooltip != null) {
+ args.Tooltip.Dispose ();
+ }
}
private void SetActiveSource (string name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]