[banshee/1.5.1-fixes: 23/56] [QueueableSourceComboBox] Show a tooltip if the name is too long (bgo#598504)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/1.5.1-fixes: 23/56] [QueueableSourceComboBox] Show a tooltip if the name is too long (bgo#598504)
- Date: Mon, 22 Mar 2010 18:06:00 +0000 (UTC)
commit 7485a1848c51ad196d439ed2445bc152539ca7a4
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]