[chronojump] tags manage window shows session name (if coming from load session)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] tags manage window shows session name (if coming from load session)
- Date: Sun, 6 Dec 2020 20:34:38 +0000 (UTC)
commit 90b1ed8f263206f7162b01fc4580de1db9f48294
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Dec 6 21:34:05 2020 +0100
tags manage window shows session name (if coming from load session)
src/gui/app1/session/addEdit.cs | 4 ++--
src/gui/app1/session/loadAndImport.cs | 11 ++++++++++-
src/gui/app1/session/tagSessionSelect.cs | 10 ++++++++--
3 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/app1/session/addEdit.cs b/src/gui/app1/session/addEdit.cs
index 675df202..31b6fabc 100644
--- a/src/gui/app1/session/addEdit.cs
+++ b/src/gui/app1/session/addEdit.cs
@@ -546,9 +546,9 @@ public partial class ChronoJumpWindow
tagSessionSelect = new TagSessionSelect();
if(app1sae_addSession)
- tagSessionSelect.PassVariables(true, -1, preferences.askDeletion);
+ tagSessionSelect.PassVariables(true, -1, "", preferences.askDeletion);
else
- tagSessionSelect.PassVariables(false, currentSession.UniqueID,
preferences.askDeletion);
+ tagSessionSelect.PassVariables(false, currentSession.UniqueID, "",
preferences.askDeletion);
tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_addEdit);
tagSessionSelect.FakeButtonDone.Clicked += new
EventHandler(on_select_tags_clicked_done_addEdit);
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index 36e58627..b42d10f6 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -499,6 +499,15 @@ public partial class ChronoJumpWindow
}
return -1;
}
+ private string app1s_CurrentSessionName() {
+ TreeModel model;
+ TreeIter iter;
+
+ if (app1s_treeview_session_load.Selection.GetSelected (out model, out iter)) {
+ return (string)model.GetValue (iter, 2);
+ }
+ return "";
+ }
//TODO: do not need to be public ? maybe for import
public string app1s_ImportDatabasePath() {
@@ -658,7 +667,7 @@ public partial class ChronoJumpWindow
tagSessionSelect = new TagSessionSelect();
- tagSessionSelect.PassVariables(false, sessionID, preferences.askDeletion);
+ tagSessionSelect.PassVariables(false, sessionID, app1s_CurrentSessionName(),
preferences.askDeletion);
tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_loadSession);
tagSessionSelect.FakeButtonDone.Clicked += new
EventHandler(on_select_tags_clicked_done_loadSession);
diff --git a/src/gui/app1/session/tagSessionSelect.cs b/src/gui/app1/session/tagSessionSelect.cs
index d4388bf0..f89aa77b 100644
--- a/src/gui/app1/session/tagSessionSelect.cs
+++ b/src/gui/app1/session/tagSessionSelect.cs
@@ -33,6 +33,7 @@ public class TagSessionSelect
//passed variables
private bool addSession;
private int currentSessionID;
+ private string sessionName;
private bool askDeletion;
private ArrayList allTags_list; //all available tags
@@ -46,10 +47,11 @@ public class TagSessionSelect
public Gtk.Button FakeButtonDone;
- public void PassVariables(bool addSession, int currentSessionID, bool askDeletion)
+ public void PassVariables(bool addSession, int currentSessionID, string sessionName, bool askDeletion)
{
this.addSession = addSession;
this.currentSessionID = currentSessionID;
+ this.sessionName = sessionName;
this.askDeletion = askDeletion;
FakeButtonDone = new Gtk.Button();
@@ -147,7 +149,11 @@ public class TagSessionSelect
genericWin.LabelEntry2 = Catalog.GetString("Create new tag");
genericWin.SetButtonMiddleLabel(Catalog.GetString("Create"));
- genericWin.LabelBeforeTextViewTreeView = Catalog.GetString("Select tags for this session");
+
+ if(sessionName == "")
+ genericWin.LabelBeforeTextViewTreeView = Catalog.GetString("Select tags for this
session");
+ else
+ genericWin.LabelBeforeTextViewTreeView = Catalog.GetString("Select tags for session:
") + sessionName;
genericWin.ShowEditRow(false);
genericWin.HideEditRowCombo();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]