[chronojump] Consolidates all the LogB.Debug() in one place.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Consolidates all the LogB.Debug() in one place.
- Date: Fri, 30 Sep 2016 07:54:08 +0000 (UTC)
commit 0872e56d6921ba8985b00647d5ca98d5ee92f1bc
Author: Carles Pina i Estany <carles pina cat>
Date: Fri Sep 30 09:53:19 2016 +0200
Consolidates all the LogB.Debug() in one place.
Changes the Window title. If the user is importing a session it shows
"Import Session" instead of "Load Session".
src/chronojumpImporter.cs | 4 ----
src/gui/chronojump.cs | 5 +++--
src/gui/session.cs | 6 ++++++
3 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/chronojumpImporter.cs b/src/chronojumpImporter.cs
index 633597d..c3f54ab 100644
--- a/src/chronojumpImporter.cs
+++ b/src/chronojumpImporter.cs
@@ -117,7 +117,6 @@ class ChronojumpImporter
try {
json = JsonValue.Parse (result.output);
} catch (Exception e) {
- LogB.Debug ("getDatabaseVersionFromFile: invalid JSON content:" +
result.output);
return new Result(false, "",
String.Format(Catalog.GetString("getDatabaseVersionFromFile: invalid JSON content:\n{0}\nException. {1}"),
result.output, e.Message));
}
@@ -126,7 +125,6 @@ class ChronojumpImporter
return new Result (true, databaseVersion);
} else {
- LogB.Debug ("getDatabaseVersionFromFile: no success fetching the database version" +
filePath);
return new Result(false, "",
String.Format(Catalog.GetString("getDatabaseVersionFromFile: no success fetching the database version
of:\n{0}\nError: {1}"), filePath, result.error));
}
}
@@ -173,7 +171,6 @@ class ChronojumpImporter
"Exception:\n" +
"{2}"),
processStartInfo.FileName,
processStartInfo.Arguments, e.Message);
- LogB.Information (errorMessage);
return new Result (false, "", errorMessage);
}
@@ -189,7 +186,6 @@ class ChronojumpImporter
"output: {2}"),
processStartInfo.FileName,
processStartInfo.Arguments, allOutput);
- LogB.Information (errorMessage);
// Python interpretar was executed but the Python file wasn't found or the script
failed
return new Result (false, allOutput, errorMessage);
}
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 887e06d..21a605b 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2418,9 +2418,10 @@ public partial class ChronoJumpWindow
if (result.success) {
updateComboStats ();
new DialogMessage (Constants.MessageTypes.INFO, Catalog.GetString ("Session
imported."));
- }
- else
+ } else {
+ LogB.Debug ("Chronojump Importer error: ", result.error);
new DialogMessage (Constants.MessageTypes.WARNING, result.error);
+ }
}
private void on_open_activate (object o, EventArgs args)
diff --git a/src/gui/session.cs b/src/gui/session.cs
index be12304..2f0bdfe 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -684,6 +684,12 @@ public class SessionLoadWindow {
checkbutton_show_data_encoder.Visible = (type == WindowType.LOAD_SESSION);
checkbutton_show_data_jump_run.Visible = (type == WindowType.LOAD_SESSION);
+ if (type == WindowType.LOAD_SESSION) {
+ session_load.Title = Catalog.GetString ("Load session");
+ } else {
+ session_load.Title = Catalog.GetString ("Import session");
+ }
+
//put an icon to window
UtilGtk.IconWindow(session_load);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]