[chronojump] Networks new parameter on config: HideTaskDone
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Networks new parameter on config: HideTaskDone
- Date: Fri, 2 Aug 2019 11:26:15 +0000 (UTC)
commit 95cd84931f02301437b6288f86d97c11e1566829
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Aug 2 13:22:40 2019 +0200
Networks new parameter on config: HideTaskDone
src/config.cs | 3 +++
src/gui/dialogPersonPopup.cs | 18 +++++++++++-------
src/gui/networks.cs | 2 +-
3 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/src/config.cs b/src/config.cs
index a9ba600e..9393a094 100644
--- a/src/config.cs
+++ b/src/config.cs
@@ -40,6 +40,7 @@ public class Config
public bool Compujump;
public bool CompujumpDjango;
public string CompujumpServerURL = "";
+ public bool CompujumpHideTaskDone = false;
public int CompujumpStationID = -1;
public int CompujumpAdminID = -1; //undefined
@@ -98,6 +99,8 @@ public class Config
Compujump = true;
else if(parts[0] == "CompujumpDjango" && Util.StringToBool(parts[1]))
CompujumpDjango = true;
+ else if(parts[0] == "CompujumpHideTaskDone" &&
Util.StringToBool(parts[1]))
+ CompujumpHideTaskDone = true;
else if(parts[0] == "CompujumpServerURL" && parts[1] != "")
CompujumpServerURL = parts[1];
else if(parts[0] == "CompujumpStationID" && parts[1] != "" &&
Util.IsNumber(parts[1], false))
diff --git a/src/gui/dialogPersonPopup.cs b/src/gui/dialogPersonPopup.cs
index 89e191cd..408b9d8f 100644
--- a/src/gui/dialogPersonPopup.cs
+++ b/src/gui/dialogPersonPopup.cs
@@ -56,7 +56,8 @@ public class DialogPersonPopup
private bool compujumpDjango;
public DialogPersonPopup (int personID, string name, string rfid,
- List<Task> tasks, List<StationCount> stationsCount, bool serverConnected, bool
Autologout, bool compujumpDjango)
+ List<Task> tasks, List<StationCount> stationsCount, bool serverConnected, bool
Autologout,
+ bool compujumpDjango, bool compujumpHideTaskDone)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "dialog_person_popup.glade",
"dialog_person_popup", null);
@@ -162,13 +163,16 @@ public class DialogPersonPopup
task_parametrized_exist = true;
//create button_done (shared on R,L)
- Gtk.Button button_done = new Gtk.Button("Fet!");
- button_done.Clicked += new EventHandler(button_done_clicked);
- hboxRow.PackEnd(button_done, false, false, 0);
- list_buttons_done.Add(button_done);
- list_buttons_done_id.Add(t.Id);
- list_hboxs_row.Add(hboxRow);
+ if(! compujumpHideTaskDone)
+ {
+ Gtk.Button button_done = new Gtk.Button("Fet!");
+ button_done.Clicked += new EventHandler(button_done_clicked);
+ hboxRow.PackEnd(button_done, false, false, 0);
+ list_buttons_done.Add(button_done);
+ list_buttons_done_id.Add(t.Id);
+ }
+ list_hboxs_row.Add(hboxRow);
vbox_tasks_parametrized.PackStart(hboxRow, false, false, 0);
}
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index aa1eea78..eab6c3f2 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -866,7 +866,7 @@ public partial class ChronoJumpWindow
dialogPersonPopup = new DialogPersonPopup(
currentPerson.UniqueID, currentPerson.Name, capturedRFID, tasks,
stationsCount,
serverConnected, compujumpAutologout.Active,
- configChronojump.CompujumpDjango);
+ configChronojump.CompujumpDjango, configChronojump.CompujumpHideTaskDone);
dialogPersonPopup.Fake_button_start_task.Clicked -= new EventHandler(compujumpTaskStart);
dialogPersonPopup.Fake_button_start_task.Clicked += new EventHandler(compujumpTaskStart);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]