[longomatch] Disable links for Tag buttons
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Disable links for Tag buttons
- Date: Fri, 17 Apr 2015 16:25:11 +0000 (UTC)
commit 353772b0ae3cf60847e71b5ad7722bf445d12588
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Apr 14 12:10:28 2015 +0200
Disable links for Tag buttons
.../Dashboard/DashboardButtonObject.cs | 16 ++++++++++++----
.../CanvasObjects/Dashboard/TagObject.cs | 1 +
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
index 08df6b6..3580a5a 100644
--- a/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/DashboardButtonObject.cs
@@ -31,6 +31,7 @@ namespace LongoMatch.Drawing.CanvasObjects.Dashboard
public DashboardButtonObject (DashboardButton tagger)
{
Button = tagger;
+ SupportsLinks = true;
anchor = new LinkAnchorObject (this, null, new Point (5, 5));
anchor.RedrawEvent += (co, area) => {
EmitRedrawEvent (anchor, area);
@@ -48,6 +49,11 @@ namespace LongoMatch.Drawing.CanvasObjects.Dashboard
set;
}
+ public bool SupportsLinks {
+ get;
+ set;
+ }
+
public bool ShowLinks {
get;
set;
@@ -161,7 +167,7 @@ namespace LongoMatch.Drawing.CanvasObjects.Dashboard
protected void DrawAnchor (IDrawingToolkit tk, Area area)
{
- if (ShowLinks) {
+ if (ShowLinks && SupportsLinks) {
anchor.Draw (tk, area);
}
}
@@ -174,9 +180,11 @@ namespace LongoMatch.Drawing.CanvasObjects.Dashboard
public override Selection GetSelection (Point p, double precision, bool inMotion = false)
{
- Selection sel = anchor.GetSelection (p, precision, inMotion);
- if (sel != null)
- return sel;
+ if (SupportsLinks) {
+ Selection sel = anchor.GetSelection (p, precision, inMotion);
+ if (sel != null)
+ return sel;
+ }
return base.GetSelection (p, precision, inMotion);
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
b/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
index 6b74db7..4b26153 100644
--- a/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Dashboard/TagObject.cs
@@ -29,6 +29,7 @@ namespace LongoMatch.Drawing.CanvasObjects.Dashboard
{
TagButton = tagger;
Toggle = true;
+ SupportsLinks = false;
if (iconImage == null) {
iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
StyleConf.ButtonTagIcon));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]