[chronojump] minor changes



commit 99bff207701f4b7ee341deea17808836ce7aada0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 15 14:27:19 2013 +0100

    minor changes

 glade/chronojump.glade |   36 +++++++++++++++++++++++++-----------
 src/constants.cs       |    1 +
 src/gui/encoder.cs     |    5 +++--
 src/util.cs            |    3 +++
 4 files changed, 32 insertions(+), 13 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 6781290..2fd330c 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -31143,7 +31143,7 @@ times</property>
           <widget class="GtkVBox" id="vbox120">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="spacing">4</property>
+            <property name="spacing">6</property>
             <child>
               <widget class="GtkImage" id="image_logo">
                 <property name="visible">True</property>
@@ -31156,14 +31156,16 @@ times</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkHBox" id="hbox306">
+              <widget class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="spacing">4</property>
                 <child>
                   <widget class="GtkLabel" id="myLabel">
                     <property name="visible">True</property>
                     <property name="sensitive">False</property>
                     <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
                     <property name="label" translatable="yes">Loading Chronojump...</property>
                   </widget>
                   <packing>
@@ -31173,16 +31175,28 @@ times</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkButton" id="button_cancel">
-                    <property name="label">gtk-cancel</property>
+                  <widget class="GtkHBox" id="hbox1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="has_tooltip">True</property>
-                    <property name="tooltip" translatable="yes">Cancel connection with server</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_stock">True</property>
-                    <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkButton" id="button_cancel">
+                        <property name="label">gtk-cancel</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip" translatable="yes">Cancel connection with server</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_stock">True</property>
+                        <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
+                      </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>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
diff --git a/src/constants.cs b/src/constants.cs
index 91caceb..45ace5c 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -582,6 +582,7 @@ public class Constants
 	public static string EncoderCurvesTemp = "chronojump-last-encoder-curves.txt";
 	public static string EncoderGraphTemp = "chronojump-last-encoder-graph.png";
 	public static string EncoderStatusTemp = "chronojump-encoder-status.txt";
+	public static string EncoderExportTemp = "chronojump-export.csv";
 
 	//note next has 40 chars, and its used also in encoder/graph.R to detect how a file will be treated
 	//if this name changes, change it in encoder/graph.R
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 66460eb..65e7194 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -502,7 +502,7 @@ public partial class ChronoJumpWindow
 		EncoderStruct encoderStruct = new EncoderStruct(
 				dataFileName, 
 				Util.GetEncoderGraphTempFileName(),
-				"/tmp/export.csv", "NULL", ep);
+				Util.GetEncoderExportTempFileName(), "NULL", ep);
 
 		Util.RunPythonEncoder(Constants.EncoderScriptGraphCall, 
 				Util.ChangeSpaceForUnderscore(currentPerson.Name) + "-" + 
@@ -510,7 +510,8 @@ public partial class ChronoJumpWindow
 					"-(" + findMass(true) + "Kg)",
 				encoderStruct, false);
 
-		encoder_pulsebar_capture.Text = "Exported to /tmp/export.csv";
+		encoder_pulsebar_capture.Text = string.Format(Catalog.GetString(
+					"Exported to {0}."), Util.GetEncoderExportTempFileName());
 	}
 	
 	void on_button_encoder_delete_signal_clicked (object o, EventArgs args) 
diff --git a/src/util.cs b/src/util.cs
index 1889b52..94b2edf 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -890,6 +890,9 @@ public class Util
 	public static string GetEncoderStatusTempFileName() {
 		return Path.Combine(Path.GetTempPath(), Constants.EncoderStatusTemp);
 	}
+	public static string GetEncoderExportTempFileName() {
+		return Path.Combine(Path.GetTempPath(), Constants.EncoderExportTemp);
+	}
 
 
 //	public static void MoveTempToEncoderData(int sessionID, int uniqueID) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]