[chronojump] after importing a session to a new session, allows to load it in the same dialog
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] after importing a session to a new session, allows to load it in the same dialog
- Date: Thu, 15 Apr 2021 14:48:36 +0000 (UTC)
commit c3f00ccf3a527292fe33c7b5479f0165f2a817a7
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Apr 15 16:47:43 2021 +0200
after importing a session to a new session, allows to load it in the same dialog
glade/app1.glade | 58 +++++++++++++++++++++++++++--------
src/gui/app1/session/loadAndImport.cs | 17 ++++++++--
src/gui/app1/session/main.cs | 2 +-
3 files changed, 61 insertions(+), 16 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 16a5445b..404d60ee 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25065,6 +25065,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -31232,18 +31235,6 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -31280,6 +31271,18 @@ Concentric</property>
</packing>
</child>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -39723,6 +39726,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -42753,13 +42759,39 @@ then click this button.</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
+ <widget class="GtkHBox"
id="app1s_hbox_import_done_at_new_session">
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
<widget class="GtkLabel"
id="app1s_label_import_done_at_new_session">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label"
translatable="yes">Imported to a new session. You can load it now in Session - Load.</property>
+ <property name="label"
translatable="yes">Imported to a new session.</property>
<property name="wrap">True</property>
</widget>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="app1s_button_import_at_new_done_do_load">
+ <property name="label" translatable="yes">Load
session</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_import_at_new_done_do_load_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index 5276ab95..116b0c94 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -691,7 +691,7 @@ public partial class ChronoJumpWindow
public void app1s_ShowLabelImportedOk()
{
if(app1s_radio_import_new_session.Active)
- app1s_label_import_done_at_new_session.Visible = true;
+ app1s_hbox_import_done_at_new_session.Visible = true;
else
app1s_label_import_done_at_current_session.Visible = true;
}
@@ -883,13 +883,26 @@ public partial class ChronoJumpWindow
}
//import notebook page 4 buttons
+ private void on_app1s_button_import_at_new_done_do_load_clicked (object o, EventArgs args)
+ {
+ //ID has to be the last one, get the last session
+ List<Session> session_l = SqliteSession.SelectAll(Sqlite.Orders_by.ID_DESC);
+ if(session_l == null && session_l.Count == 0)
+ return;
+
+ currentSession = session_l[0];
+ on_load_session_accepted();
+ notebook_supSetOldPage();
+ }
+
private void app1s_on_button_import_close_clicked(object o, EventArgs args)
{
app1s_notebook.CurrentPage = app1s_PAGE_MODES;
}
+
private void app1s_on_button_import_again_clicked(object o, EventArgs args)
{
- app1s_label_import_done_at_new_session.Visible = false;
+ app1s_hbox_import_done_at_new_session.Visible = false;
app1s_label_import_done_at_current_session.Visible = false;
app1s_scrolledwindow_import_error.Visible = false;
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 2176fe4b..56d03e9d 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -97,7 +97,7 @@ public partial class ChronoJumpWindow
//notebook tab 4
[Widget] Gtk.ProgressBar app1s_progressbarImport;
- [Widget] Gtk.Label app1s_label_import_done_at_new_session;
+ [Widget] Gtk.HBox app1s_hbox_import_done_at_new_session;
[Widget] Gtk.Label app1s_label_import_done_at_current_session;
[Widget] Gtk.ScrolledWindow app1s_scrolledwindow_import_error;
[Widget] Gtk.TextView app1s_textview_import_error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]