[chronojump] Importer error shown on same window and removed file from POTFILES.in
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Importer error shown on same window and removed file from POTFILES.in
- Date: Thu, 17 Oct 2019 10:04:09 +0000 (UTC)
commit 0f9f927c6dea67dfce45b564ab06500427dc56f5
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Oct 17 12:03:20 2019 +0200
Importer error shown on same window and removed file from POTFILES.in
glade/session_load.glade | 24 ++++++++++++++++++++++--
po/POTFILES.in | 1 -
src/gui/chronojumpImporter.cs | 3 +--
src/gui/session.cs | 9 +++++++++
4 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/glade/session_load.glade b/glade/session_load.glade
index 0eabff2c..077e1244 100644
--- a/glade/session_load.glade
+++ b/glade/session_load.glade
@@ -576,10 +576,29 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow_import_error">
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <child>
+ <widget class="GtkTextView" id="textview_import_error">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="cursor_visible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -587,6 +606,7 @@
<widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="layout_style">spread</property>
<child>
<widget class="GtkButton" id="button_import_close">
<property name="label">gtk-close</property>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4c18023f..99984c64 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -57,7 +57,6 @@ src/execute/run.cs
src/exportSession.cs
src/forceSensor.cs
src/gui/chronojump.cs
-src/gui/chronojumpImporter.cs
src/gui/chronopic.cs
src/gui/chronopicRegister.cs
src/gui/convertWeight.cs
diff --git a/src/gui/chronojumpImporter.cs b/src/gui/chronojumpImporter.cs
index 41a48f12..56e86c3f 100644
--- a/src/gui/chronojumpImporter.cs
+++ b/src/gui/chronojumpImporter.cs
@@ -21,7 +21,6 @@
using Gtk;
using System;
using System.Threading;
-using Mono.Unix;
public partial class ChronoJumpWindow
{
@@ -176,7 +175,7 @@ public partial class ChronoJumpWindow
sessionLoadWin.ShowLabelImportedOk();
} else {
LogB.Debug ("Chronojump Importer error: ", importerResult.error);
- new DialogMessage (Catalog.GetString("Chronojump importer"),
Constants.MessageTypes.WARNING, importerResult.error, true);
+ sessionLoadWin.ShowImportError(importerResult.error);
}
}
}
diff --git a/src/gui/session.cs b/src/gui/session.cs
index 522f6367..720f0857 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -708,6 +708,8 @@ public class SessionLoadWindow
[Widget] Gtk.ProgressBar progressbarImport;
[Widget] Gtk.Label label_import_done_at_new_session;
[Widget] Gtk.Label label_import_done_at_current_session;
+ [Widget] Gtk.ScrolledWindow scrolledwindow_import_error;
+ [Widget] Gtk.TextView textview_import_error;
static SessionLoadWindow SessionLoadWindowBox;
@@ -1146,6 +1148,12 @@ public class SessionLoadWindow
label_import_done_at_current_session.Visible = true;
}
+ public void ShowImportError(string str)
+ {
+ scrolledwindow_import_error.Visible = true;
+ textview_import_error.Buffer.Text = str;
+ }
+
public void NotebookPage(int i)
{
notebook_import.CurrentPage = i;
@@ -1213,6 +1221,7 @@ public class SessionLoadWindow
{
label_import_done_at_new_session.Visible = false;
label_import_done_at_current_session.Visible = false;
+ scrolledwindow_import_error.Visible = false;
notebook_import.CurrentPage = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]