[chronojump] Minot interface improvements



commit 583303f34e6e32837a3ad90d967fe6dc8e95133d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Feb 24 14:05:39 2011 +0100

    Minot interface improvements

 glade/chronojump.glade |   73 +++++++++++++++++++++++++++---------------------
 src/gui/chronojump.cs  |    9 ++++--
 src/gui/confirm.cs     |    9 ++++--
 3 files changed, 53 insertions(+), 38 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 267caa9..02460f7 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -2690,44 +2690,53 @@ weight</property>
         <property name="visible">True</property>
         <property name="spacing">10</property>
         <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="use_markup">True</property>
-            <property name="justify">center</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label_link">
+          <widget class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="use_markup">True</property>
-            <property name="justify">center</property>
-            <property name="selectable">True</property>
+            <property name="spacing">4</property>
+            <child>
+              <widget class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="use_markup">True</property>
+                <property name="justify">center</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label_link">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="use_markup">True</property>
+                <property name="justify">center</property>
+                <property name="selectable">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label_question">
+                <property name="visible">True</property>
+                <property name="use_markup">True</property>
+                <property name="justify">center</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </widget>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkLabel" id="label_question">
-            <property name="visible">True</property>
-            <property name="use_markup">True</property>
-            <property name="justify">center</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
           <widget class="GtkHButtonBox" id="hbuttonbox12">
             <property name="visible">True</property>
             <property name="spacing">10</property>
@@ -2769,7 +2778,7 @@ weight</property>
             <property name="expand">False</property>
             <property name="fill">False</property>
             <property name="pack_type">end</property>
-            <property name="position">3</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 4967a56..880a15a 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -387,6 +387,7 @@ public class ChronoJumpWindow
 	
 	static EventExecuteWindow eventExecuteWin;
 
+	private bool firstTest; //if the chronopic is not connected, this is used to show the user that's simulated
 	private bool firstRjValue;
 	private double rjTcCount;
 	private double rjTvCount;
@@ -491,6 +492,8 @@ public class ChronoJumpWindow
 			confirmWin.Button_accept.Clicked += new EventHandler(chronopicAtStart);
 		}
 		*/
+		
+		firstTest = true;
 	}
 /*
 	private void chronopicAtStart(object o, EventArgs args) {
@@ -2882,10 +2885,10 @@ Console.WriteLine("X");
 		}
 	}
 
-	
 	//suitable for all jumps not repetitive
 	private void on_normal_jump_activate (object o, EventArgs args) 
 	{
+		firstTest = false;
 		if(o == (object) button_free || o == (object) menuitem_jump_free) {
 			currentJumpType = new JumpType("Free");
 		}else if(o == (object) button_sj || o == (object) sj) {
@@ -4553,7 +4556,7 @@ Console.WriteLine("X");
 		if (myTreeViewJumps.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected jump?", "");
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want to delete selected jump?"), "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_jump_accepted);
 			} else {
 				on_delete_selected_jump_accepted(o, args);
@@ -4615,7 +4618,7 @@ Console.WriteLine("X");
 		if (myTreeViewRuns.EventSelectedID > 0) {
 			//3.- display confirmwindow of deletion 
 			if (askDeletion) {
-				confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete selected run?", "");
+				confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want to delete selected run?"), "");
 				confirmWinJumpRun.Button_accept.Clicked += new EventHandler(on_delete_selected_run_accepted);
 			} else {
 				on_delete_selected_run_accepted(o, args);
diff --git a/src/gui/confirm.cs b/src/gui/confirm.cs
index 06f240f..595dcf5 100644
--- a/src/gui/confirm.cs
+++ b/src/gui/confirm.cs
@@ -47,7 +47,10 @@ public class ConfirmWindowJumpRun
 		UtilGtk.IconWindow(confirm_window);
 		
 		label1.Text = text1;
-		label_question.Text = question;
+		if(question == "")
+			label_question.Hide();
+		else
+			label_question.Text = question;
 	}
 
 	static public ConfirmWindowJumpRun Show (string text1, string question)
@@ -116,13 +119,13 @@ public class ConfirmWindow
 			label_link.Text = link;
 			label_link.UseMarkup = true;
 		} else
-			label_link.Visible = false;
+			label_link.Hide();
 
 		if(question != "") {
 			label_question.Text = question;
 			label_question.UseMarkup = true;
 		} else
-			label_question.Visible = false;
+			label_question.Hide();
 
 	}
 



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