[chronojump] Ensure sensitiveGuiNoPerson is applied when load a session without persons
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Ensure sensitiveGuiNoPerson is applied when load a session without persons
- Date: Mon, 3 May 2021 14:42:20 +0000 (UTC)
commit f3ebb847ceec96cd24b8884ffb94790e43bd0641
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 3 16:41:23 2021 +0200
Ensure sensitiveGuiNoPerson is applied when load a session without persons
src/gui/app1/chronojump.cs | 16 ++++++++++++----
src/treeview/person.cs | 4 +++-
2 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 0cb1f89a..674b1be5 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1214,7 +1214,10 @@ public partial class ChronoJumpWindow
//return true if selection is done (there's any person)
private bool selectRowTreeView_persons(Gtk.TreeView tv, int rowNum)
{
- myTreeViewPersons.SelectRow(rowNum);
+ LogB.Information("selectRowTreeView_persons");
+
+ if(! myTreeViewPersons.SelectRow(rowNum))
+ return false;
//the selection of row in treeViewPersons.SelectRow is not a real selection
//and unfortunately doesn't raises the on_treeview_persons_cursor_changed ()
@@ -2752,7 +2755,7 @@ public partial class ChronoJumpWindow
hbox_persons_bottom_photo.Sensitive = false;
hbox_persons_bottom_no_photo.Sensitive = false;
-
+ LogB.Information("foundPersons: " + foundPersons.ToString());
//if there are persons
if(foundPersons) {
//activate the gui for persons in main window
@@ -2762,6 +2765,7 @@ public partial class ChronoJumpWindow
label_top_encoder_person_name.Text = "<b>" + currentPerson.Name + "</b>";
label_top_encoder_person_name.UseMarkup = true;
} else {
+ sensitiveGuiNoPerson();
currentPerson = null;
label_top_person_name.Text = "";
label_top_encoder_person_name.Text = "";
@@ -7630,7 +7634,9 @@ LogB.Debug("mc finished 5");
}
//only called by delete person functions (if we run out of persons)
- private void sensitiveGuiNoPerson () {
+ private void sensitiveGuiNoPerson ()
+ {
+ LogB.Information("sensitiveGuiNoPerson");
vbox_jumps.Sensitive = false;
hbox_jumps_rj.Sensitive = false;
button_execute_test.Sensitive = false;
@@ -7659,7 +7665,9 @@ LogB.Debug("mc finished 5");
label_top_encoder_person_name.Text = "";
}
- private void sensitiveGuiYesPerson () {
+ private void sensitiveGuiYesPerson ()
+ {
+ LogB.Information("sensitiveGuiYesPerson");
vbox_jumps.Sensitive = true;
hbox_jumps_rj.Sensitive = true;
button_execute_test.Sensitive = true;
diff --git a/src/treeview/person.cs b/src/treeview/person.cs
index 351b5fb0..fc821c8f 100644
--- a/src/treeview/person.cs
+++ b/src/treeview/person.cs
@@ -162,7 +162,7 @@ public class TreeViewPersons
}
//pass 0 for first row
- public void SelectRow(int rowNumber)
+ public bool SelectRow(int rowNumber)
{
TreeIter iter;
bool iterOk = store.GetIterFirst(out iter);
@@ -175,7 +175,9 @@ public class TreeViewPersons
treeview.Selection.SelectIter(iter);
TreePath path = store.GetPath (iter);
treeview.ScrollToCell (path, null, true, 0, 0);
+ return true;
}
+ return false;
}
public bool IsThereAnyRecord() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]