[chronojump] manage tags on load session. Done!
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] manage tags on load session. Done!
- Date: Sun, 6 Dec 2020 20:15:04 +0000 (UTC)
commit d1e7f2a58d947325e5d3814c6ba997b0400fa134
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Dec 6 21:14:32 2020 +0100
manage tags on load session. Done!
glade/app1.glade | 15 +++++++++++++--
src/gui/app1/session/addEdit.cs | 9 ++++-----
src/gui/app1/session/loadAndImport.cs | 29 +++++++++++++++++++++++++++++
src/gui/app1/session/main.cs | 1 +
4 files changed, 47 insertions(+), 7 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 70b829f0..b7746d3b 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -38026,7 +38026,7 @@ then click this button.</property>
<widget class="GtkVBox" id="vbox208">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">4</property>
<child>
<widget class="GtkHBox" id="hbox240">
<property name="visible">True</property>
@@ -38076,7 +38076,18 @@ then click this button.</property>
</packing>
</child>
<child>
- <placeholder/>
+ <widget class="GtkButton"
id="app1s_button_manage_tags">
+ <property name="label"
translatable="yes">Manage</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_app1s_button_manage_tags_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
</child>
</widget>
<packing>
diff --git a/src/gui/app1/session/addEdit.cs b/src/gui/app1/session/addEdit.cs
index 551554af..675df202 100644
--- a/src/gui/app1/session/addEdit.cs
+++ b/src/gui/app1/session/addEdit.cs
@@ -550,16 +550,15 @@ public partial class ChronoJumpWindow
else
tagSessionSelect.PassVariables(false, currentSession.UniqueID,
preferences.askDeletion);
- tagSessionSelect.FakeButtonDone.Clicked -= new EventHandler(on_select_tags_clicked_done);
- tagSessionSelect.FakeButtonDone.Clicked += new EventHandler(on_select_tags_clicked_done);
+ tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_addEdit);
+ tagSessionSelect.FakeButtonDone.Clicked += new
EventHandler(on_select_tags_clicked_done_addEdit);
tagSessionSelect.Do();
tagSessionSelect.Show();
}
-
- private void on_select_tags_clicked_done (object o, EventArgs args)
+ private void on_select_tags_clicked_done_addEdit (object o, EventArgs args)
{
- tagSessionSelect.FakeButtonDone.Clicked -= new EventHandler(on_select_tags_clicked_done);
+ tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_addEdit);
if(app1sae_addSession)
app1sae_label_tags_selected.Text = tagSessionSelect.TagsListStringForAddSession;
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index a6c1557f..0f05c03d 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -112,6 +112,7 @@ public partial class ChronoJumpWindow
createComboSessionLoadTags (false); //TODO: care because this is only related to load (not
report)
app1s_entry_search_filter.Text = "";
+ app1s_button_manage_tags.Sensitive = (app1s_selected != "-1");
app1s_createTreeView(app1s_treeview_session_load, true, false, false, false);
app1s_store = app1s_getStore(true, false, false, false);
@@ -483,6 +484,8 @@ public partial class ChronoJumpWindow
app1s_button_accept.Sensitive = false;
app1s_button_import.Sensitive = false;
}
+
+ app1s_button_manage_tags.Sensitive = (app1s_selected != "-1");
}
//TODO: do not need to be public ? maybe for import
@@ -644,6 +647,32 @@ public partial class ChronoJumpWindow
sb.Value += sb.Adjustment.PageIncrement;
}
+ private void on_app1s_button_manage_tags_clicked (object o, EventArgs args)
+ {
+ if(app1s_selected == "" || app1s_selected == "-1")
+ return;
+
+ int sessionID = app1s_CurrentSessionId();
+ if(sessionID == -1)
+ return;
+
+ tagSessionSelect = new TagSessionSelect();
+
+ tagSessionSelect.PassVariables(false, sessionID, preferences.askDeletion);
+
+ tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_loadSession);
+ tagSessionSelect.FakeButtonDone.Clicked += new
EventHandler(on_select_tags_clicked_done_loadSession);
+
+ tagSessionSelect.Do();
+ tagSessionSelect.Show();
+ }
+ private void on_select_tags_clicked_done_loadSession (object o, EventArgs args)
+ {
+ tagSessionSelect.FakeButtonDone.Clicked -= new
EventHandler(on_select_tags_clicked_done_loadSession);
+
+ app1s_recreateTreeView("changed tags on manage");
+ }
+
// ---- notebook page 3 (import) buttons ----
void app1s_on_button_back_clicked (object o, EventArgs args)
{
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 46c2dce1..74e2bfa0 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -53,6 +53,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button app1s_button_import;
[Widget] Gtk.Image app1s_image_import;
[Widget] Gtk.Entry app1s_entry_search_filter;
+ [Widget] Gtk.Button app1s_button_manage_tags;
[Widget] Gtk.CheckButton app1s_checkbutton_show_data_persons;
[Widget] Gtk.CheckButton app1s_checkbutton_show_data_jump_run;
[Widget] Gtk.CheckButton app1s_checkbutton_show_data_other_tests;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]