[chronojump] ExecuteAuto does not allow to add exercises on load
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ExecuteAuto does not allow to add exercises on load
- Date: Wed, 2 Jun 2021 16:22:48 +0000 (UTC)
commit ad011c3904d9b5105538b50f3d9c656a0cccafef
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jun 2 18:21:06 2021 +0200
ExecuteAuto does not allow to add exercises on load
src/gui/executeAuto.cs | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/gui/executeAuto.cs b/src/gui/executeAuto.cs
index e842cb939..fee2db026 100644
--- a/src/gui/executeAuto.cs
+++ b/src/gui/executeAuto.cs
@@ -35,6 +35,7 @@ public class ExecuteAutoWindow
//1st tab
[Widget] Gtk.RadioButton radio_load;
+ [Widget] Gtk.RadioButton radio_new;
[Widget] Gtk.Notebook notebook_load_or_new;
[Widget] Gtk.TreeView treeview_load;
[Widget] Gtk.RadioButton radio_by_persons;
@@ -462,17 +463,20 @@ public class ExecuteAutoWindow
return IDs;
}
- //true means "by series" (shows more stuff)
- private void showSeriesStuff(bool show)
+ private void showSeriesStuff(bool newSequence, bool bySets)
{
- button_add2.Visible = show;
- button_add3.Visible = show;
+ //on load do not allow to edit
+ combo_select.Visible = newSequence;
+ button_add1.Visible = newSequence;
- label_serie1.Visible = show;
- label_serie2.Visible = show;
- label_serie3.Visible = show;
+ button_add2.Visible = newSequence && bySets;
+ button_add3.Visible = newSequence && bySets;
- if(! show)
+ label_serie1.Visible = newSequence && bySets;
+ label_serie2.Visible = newSequence && bySets;
+ label_serie3.Visible = newSequence && bySets;
+
+ if(! bySets)
treeview_serie1.SetSizeRequest(150,120);
else {
treeview_serie1.SetSizeRequest(150,80);
@@ -480,8 +484,8 @@ public class ExecuteAutoWindow
treeview_serie3.SetSizeRequest(150,80);
}
- scrolled_win_serie2.Visible = show;
- scrolled_win_serie3.Visible = show;
+ scrolled_win_serie2.Visible = bySets;
+ scrolled_win_serie3.Visible = bySets;
}
private void createTreeviewResult(bool by_sets) {
@@ -524,7 +528,8 @@ public class ExecuteAutoWindow
button_next.Sensitive = false;
}
- showSeriesStuff(mode == ExecuteAuto.ModeTypes.BY_SETS);
+ showSeriesStuff(radio_new.Active, mode == ExecuteAuto.ModeTypes.BY_SETS);
+
notebook_main.NextPage();
}
else if(notebook_main.CurrentPage == 1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]