[longomatch] Make actions links visible only when its supported
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make actions links visible only when its supported
- Date: Thu, 23 Apr 2015 15:20:03 +0000 (UTC)
commit 1c1474cd8e8184078c379aba9fc5a77a5659fc85
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 17 15:12:06 2015 +0200
Make actions links visible only when its supported
LongoMatch.Core/Config.cs | 5 +++++
LongoMatch.GUI/Gui/Component/DashboardWidget.cs | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 61a9982..9575422 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -283,6 +283,11 @@ namespace LongoMatch
set;
}
+ static public bool SupportsActionLinks {
+ get;
+ set;
+ }
+
static public string LatestVersionURL {
get;
set;
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index 25bc067..e67fc10 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -187,6 +187,15 @@ namespace LongoMatch.Gui.Component
}
}
+ public bool LinksButtonVisible {
+ set {
+ if (!Config.SupportsActionLinks)
+ linksbutton.Visible = false;
+ else
+ linksbutton.Visible = value;
+ }
+ }
+
public void ClickButton (DashboardButton button, Tag tag = null)
{
tagger.Click (button, tag);
@@ -233,7 +242,7 @@ namespace LongoMatch.Gui.Component
tagger.Mode = this.mode = mode;
// Add buttons for cards/tags/etc.. can be handled remotely.
hbuttonbox2.Visible = mode == DashboardMode.Edit && internalButtons;
- editbutton.Active = rightbox.Visible = linksbutton.Visible = mode ==
DashboardMode.Edit;
+ LinksButtonVisible = editbutton.Active = rightbox.Visible = mode ==
DashboardMode.Edit;
if (mode == DashboardMode.Edit) {
editimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-dash-edit_active", 22);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]