[chronojump/chronojump-importer] Returns the session number to be imported.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/chronojump-importer] Returns the session number to be imported.
- Date: Tue, 13 Sep 2016 09:10:56 +0000 (UTC)
commit a9e1965df30d88847f285a0633c01300d695d615
Author: Carles Pina i Estany <carles pina cat>
Date: Tue Sep 13 10:10:39 2016 +0100
Returns the session number to be imported.
src/gui/chronojump.cs | 3 ++-
src/gui/session.cs | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index fd8b211..3cbf7f4 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2608,7 +2608,8 @@ public partial class ChronoJumpWindow
//from import session
private void on_load_session_accepted_to_import(object o, EventArgs args)
{
- // TODO
+ int sessionNumber = sessionLoadWin.CurrentSessionId();
+ // TODO needs to import this session number
}
private void on_open_activate (object o, EventArgs args)
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 88305b5..10c23a6 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -919,6 +919,17 @@ public class SessionLoadWindow {
} else
button_accept.Sensitive = false;
}
+
+ public int CurrentSessionId() {
+ TreeModel model;
+ TreeIter iter;
+
+ if (treeview_session_load.Selection.GetSelected (out model, out iter)) {
+ string selected = (string)model.GetValue (iter, 0);
+ return Convert.ToInt32 (selected.Split (':')[0]);
+ }
+ return -1;
+ }
void on_row_double_clicked (object o, Gtk.RowActivatedArgs args)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]