[chronojump] Encoder export working again (bug since last few commits)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder export working again (bug since last few commits)
- Date: Wed, 28 Jan 2015 19:29:37 +0000 (UTC)
commit f66a91597b7f43a2910bb04662f4883b476f3cec
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jan 28 20:29:10 2015 +0100
Encoder export working again (bug since last few commits)
encoder/graph.R | 5 ++---
src/constants.cs | 2 +-
src/gui/encoder.cs | 16 ++++++++--------
3 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 40ce183..cc31e6d 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -2397,7 +2397,6 @@ doProcess <- function(options)
}
if(op$Analysis=="exportCSV") {
print("Starting export...")
- File = op$OutputData1;
curvesNum = length(curves[,1])
maxLength = 0
@@ -2489,9 +2488,9 @@ doProcess <- function(options)
#colnames(df)=c(titleColumns[1]," ", titleColumns[2],titleColumns[3],rep("
",(curvesNum*curveCols-4)))
if(op$DecimalSeparator == "COMMA")
- write.csv2(df, file = op$File, row.names=T, na="")
+ write.csv2(df, file = op$OutputData1, row.names=T, na="")
else
- write.csv(df, file = op$File, row.names=T, na="")
+ write.csv(df, file = op$OutputData1, row.names=T, na="")
print("Export done.")
}
diff --git a/src/constants.cs b/src/constants.cs
index 0479c3b..8a2ace4 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -729,7 +729,7 @@ public class Constants
public static string EccentricConcentric = "Eccentric-concentric";
//public static string ConcentricEccentric = "Concentric-eccentric";
- public enum EncoderCheckFileOp { ANALYZE_EXPORT_ALL_CURVES, ANALYZE_SAVE_IMAGE, ANALYZE_SAVE_TABLE}
+ public enum EncoderCheckFileOp { CAPTURE_EXPORT_ALL, ANALYZE_SAVE_IMAGE, ANALYZE_SAVE_TABLE}
public static double EncoderErrorCode = -1;
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index b90753a..e293204 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1410,7 +1410,7 @@ public partial class ChronoJumpWindow
void on_button_encoder_export_all_curves_clicked (object o, EventArgs args)
{
- checkFile(Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES);
+ checkFile(Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL);
}
void on_button_encoder_export_all_curves_file_selected (string selectedFileName)
@@ -1466,15 +1466,15 @@ public partial class ChronoJumpWindow
protected void checkFile (Constants.EncoderCheckFileOp checkFileOp)
{
string exportString = "";
- if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES)
- exportString = Catalog.GetString ("Export session in format CSV");
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL)
+ exportString = Catalog.GetString ("Export set in format CSV");
else if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_SAVE_IMAGE)
exportString = Catalog.GetString ("Save image");
else if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_SAVE_TABLE)
exportString = Catalog.GetString ("Save table");
string nameString = "";
- if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES)
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL)
nameString = "encoder_export.csv";
else if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_SAVE_IMAGE)
nameString = "encoder_image.png";
@@ -1494,7 +1494,7 @@ public partial class ChronoJumpWindow
{
exportFileName = fc.Filename;
//add ".csv" if needed
- if(checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES ||
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL ||
checkFileOp == Constants.EncoderCheckFileOp.ANALYZE_SAVE_TABLE)
exportFileName = Util.AddCsvIfNeeded(exportFileName);
else
@@ -1511,7 +1511,7 @@ public partial class ChronoJumpWindow
"Are you sure you want to overwrite file: "),
"",
exportFileName);
- if(checkFileOp ==
Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES)
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL)
confirmWin.Button_accept.Clicked +=
new
EventHandler(on_overwrite_file_export_all_curves_accepted);
else if(checkFileOp ==
Constants.EncoderCheckFileOp.ANALYZE_SAVE_IMAGE)
@@ -1522,7 +1522,7 @@ public partial class ChronoJumpWindow
new
EventHandler(on_overwrite_file_encoder_save_table_accepted);
} else {
- if(checkFileOp ==
Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES)
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL)
on_button_encoder_export_all_curves_file_selected
(exportFileName);
else if(checkFileOp ==
Constants.EncoderCheckFileOp.ANALYZE_SAVE_IMAGE)
on_button_encoder_save_image_file_selected (exportFileName);
@@ -1531,7 +1531,7 @@ public partial class ChronoJumpWindow
string myString = string.Format(Catalog.GetString("Saved to {0}"),
exportFileName);
- if(checkFileOp ==
Constants.EncoderCheckFileOp.ANALYZE_EXPORT_ALL_CURVES)
+ if(checkFileOp == Constants.EncoderCheckFileOp.CAPTURE_EXPORT_ALL)
myString += Constants.SpreadsheetString;
new DialogMessage(Constants.MessageTypes.INFO, myString);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]