moserial r38 - in trunk: . data/glade src



Author: mjc
Date: Tue Apr  7 12:53:52 2009
New Revision: 38
URL: http://svn.gnome.org/viewvc/moserial?rev=38&view=rev

Log:
2009-04-07  Michael J. Chudobiak  <mjc svn gnome org>

        * data/glade/moserial.glade:
        * data/glade/moserial.ui:
        * src/SerialConnection.vala:
        Added ESC as a termination character.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/data/glade/moserial.glade
   trunk/data/glade/moserial.ui
   trunk/src/SerialConnection.vala

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue Apr  7 12:53:52 2009
@@ -1,3 +1,10 @@
+Version 1.0.9
+-------------
+
+	* Added ESC as a termination character.
+	* Pressing the escape key now scrolls all text boxes to
+	  their end, and moves the focus to the entry box.
+
 Version 1.0.8
 -------------
 

Modified: trunk/data/glade/moserial.glade
==============================================================================
--- trunk/data/glade/moserial.glade	(original)
+++ trunk/data/glade/moserial.glade	Tue Apr  7 12:53:52 2009
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Apr  3 13:21:08 2009 -->
+<!--Generated with glade3 3.4.5 on Tue Apr  7 08:43:57 2009 -->
 <glade-interface>
   <widget class="GtkWindow" id="window">
     <property name="title" translatable="yes">moserial</property>
@@ -513,6 +513,7 @@
 CR end
 LF end
 TAB end
+ESC end
 No end</property>
                   </widget>
                   <packing>
@@ -597,268 +598,268 @@
                 <property name="n_rows">8</property>
                 <property name="n_columns">2</property>
                 <child>
-                  <widget class="GtkCheckButton" id="settings_local_echo">
+                  <widget class="GtkComboBox" id="settings_open_for">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="tooltip" translatable="yes">Normally disabled</property>
-                    <property name="label" translatable="yes">Echo received data</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="items" translatable="yes">Read and Write
+Read Only
+Write Only</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="x_padding">2</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="y_options">GTK_EXPAND</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label26">
+                  <widget class="GtkHBox" id="hbox3">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Local Echo</property>
+                    <child>
+                      <widget class="GtkCheckButton" id="settings_hardware_handshake">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip" translatable="yes">Also known as RTS/CTS handshaking</property>
+                        <property name="label" translatable="yes">Hardware</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="settings_software_handshake">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip" translatable="yes">Also known as XON/XOFF handshaking</property>
+                        <property name="label" translatable="yes">Software</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">2</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </widget>
                   <packing>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="x_padding">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label1">
+                  <widget class="GtkComboBox" id="settings_parity">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Device</property>
+                    <property name="items" translatable="yes">None
+Odd
+Even
+Mark
+Space</property>
                   </widget>
                   <packing>
-                    <property name="x_padding">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label2">
+                  <widget class="GtkComboBox" id="settings_stop_bits">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Baud Rate</property>
+                    <property name="items" translatable="yes">1
+2</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_padding">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label3">
+                  <widget class="GtkComboBox" id="settings_data_bits">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Data Bits</property>
+                    <property name="items" translatable="yes">5
+6
+7
+8</property>
                   </widget>
                   <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
                     <property name="top_attach">2</property>
                     <property name="bottom_attach">3</property>
-                    <property name="x_padding">4</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label4">
+                  <widget class="GtkComboBox" id="settings_baud_rate">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Stop Bits</property>
+                    <property name="items" translatable="yes">300
+600
+1200
+2400
+4800
+9600
+19200
+38400
+57600
+115200
+230400
+460800
+576000
+927600</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_padding">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label5">
+                  <widget class="GtkComboBoxEntry" id="settings_device">
                     <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Parity</property>
+                    <property name="items" translatable="yes">/dev/ttyS0
+/dev/ttyS1
+/dev/ttyS2
+/dev/ttyS3
+/dev/ttyUSB0
+/dev/ttyUSB1
+/dev/ttyUSB2
+/dev/ttyUSB3</property>
+                    <child internal-child="entry">
+                      <widget class="GtkEntry" id="comboboxentry-entry1">
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_padding">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label7">
+                  <widget class="GtkLabel" id="label8">
                     <property name="visible">True</property>
                     <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Handshake</property>
+                    <property name="label" translatable="yes">Access Mode</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
                     <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label8">
+                  <widget class="GtkLabel" id="label7">
                     <property name="visible">True</property>
                     <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Access Mode</property>
+                    <property name="label" translatable="yes">Handshake</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
                     <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBoxEntry" id="settings_device">
+                  <widget class="GtkLabel" id="label5">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">/dev/ttyS0
-/dev/ttyS1
-/dev/ttyS2
-/dev/ttyS3
-/dev/ttyUSB0
-/dev/ttyUSB1
-/dev/ttyUSB2
-/dev/ttyUSB3</property>
-                    <child internal-child="entry">
-                      <widget class="GtkEntry" id="comboboxentry-entry1">
-                      </widget>
-                    </child>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Parity</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBox" id="settings_baud_rate">
+                  <widget class="GtkLabel" id="label4">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">300
-600
-1200
-2400
-4800
-9600
-19200
-38400
-57600
-115200
-230400
-460800
-576000
-927600</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Stop Bits</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBox" id="settings_data_bits">
+                  <widget class="GtkLabel" id="label3">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">5
-6
-7
-8</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Data Bits</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
                     <property name="top_attach">2</property>
                     <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBox" id="settings_stop_bits">
+                  <widget class="GtkLabel" id="label2">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">1
-2</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Baud Rate</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBox" id="settings_parity">
+                  <widget class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">None
-Odd
-Even
-Mark
-Space</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Device</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox3">
+                  <widget class="GtkLabel" id="label26">
                     <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkCheckButton" id="settings_hardware_handshake">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip" translatable="yes">Also known as RTS/CTS handshaking</property>
-                        <property name="label" translatable="yes">Hardware</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="padding">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="settings_software_handshake">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip" translatable="yes">Also known as XON/XOFF handshaking</property>
-                        <property name="label" translatable="yes">Software</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="padding">2</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Local Echo</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkComboBox" id="settings_open_for">
+                  <widget class="GtkCheckButton" id="settings_local_echo">
                     <property name="visible">True</property>
-                    <property name="items" translatable="yes">Read and Write
-Read Only
-Write Only</property>
+                    <property name="can_focus">True</property>
+                    <property name="tooltip" translatable="yes">Normally disabled</property>
+                    <property name="label" translatable="yes">Echo received data</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_padding">2</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
@@ -1057,13 +1058,19 @@
         <property name="visible">True</property>
         <property name="n_rows">4</property>
         <child>
-          <widget class="GtkLabel" id="stop_recording_label">
+          <widget class="GtkLabel" id="disconnect_label">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Stop Recording</property>
+            <property name="label" translatable="yes">Disconnect</property>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="connect_label">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Connect</property>
           </widget>
           <packing>
-            <property name="top_attach">3</property>
-            <property name="bottom_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
           </packing>
         </child>
         <child>
@@ -1077,21 +1084,15 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkLabel" id="connect_label">
+          <widget class="GtkLabel" id="stop_recording_label">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Connect</property>
+            <property name="label" translatable="yes">Stop Recording</property>
           </widget>
           <packing>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
           </packing>
         </child>
-        <child>
-          <widget class="GtkLabel" id="disconnect_label">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Disconnect</property>
-          </widget>
-        </child>
       </widget>
     </child>
   </widget>

Modified: trunk/data/glade/moserial.ui
==============================================================================
--- trunk/data/glade/moserial.ui	(original)
+++ trunk/data/glade/moserial.ui	Tue Apr  7 12:53:52 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!--Generated with glade3 3.4.5 on Fri Apr  3 13:21:08 2009 -->
+<!--Generated with glade3 3.4.5 on Tue Apr  7 08:43:57 2009 -->
 <interface>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">5000</property>
@@ -75,6 +75,9 @@
         <col id="0">TAB end</col>
       </row>
       <row>
+        <col id="0">ESC end</col>
+      </row>
+      <row>
         <col id="0">No end</col>
       </row>
     </data>
@@ -85,32 +88,71 @@
     </columns>
     <data>
       <row>
-        <col id="0">/dev/ttyS0</col>
+        <col id="0">Read and Write</col>
       </row>
       <row>
-        <col id="0">/dev/ttyS1</col>
+        <col id="0">Read Only</col>
       </row>
       <row>
-        <col id="0">/dev/ttyS2</col>
+        <col id="0">Write Only</col>
       </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
       <row>
-        <col id="0">/dev/ttyS3</col>
+        <col id="0">None</col>
       </row>
       <row>
-        <col id="0">/dev/ttyUSB0</col>
+        <col id="0">Odd</col>
       </row>
       <row>
-        <col id="0">/dev/ttyUSB1</col>
+        <col id="0">Even</col>
       </row>
       <row>
-        <col id="0">/dev/ttyUSB2</col>
+        <col id="0">Mark</col>
       </row>
       <row>
-        <col id="0">/dev/ttyUSB3</col>
+        <col id="0">Space</col>
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="model4">
+  <object class="GtkListStore" id="model5">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">1</col>
+      </row>
+      <row>
+        <col id="0">2</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model6">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">5</col>
+      </row>
+      <row>
+        <col id="0">6</col>
+      </row>
+      <row>
+        <col id="0">7</col>
+      </row>
+      <row>
+        <col id="0">8</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model7">
     <columns>
       <column type="gchararray"/>
     </columns>
@@ -159,73 +201,34 @@
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="model5">
-    <columns>
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">5</col>
-      </row>
-      <row>
-        <col id="0">6</col>
-      </row>
-      <row>
-        <col id="0">7</col>
-      </row>
-      <row>
-        <col id="0">8</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model6">
-    <columns>
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">1</col>
-      </row>
-      <row>
-        <col id="0">2</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model7">
+  <object class="GtkListStore" id="model8">
     <columns>
       <column type="gchararray"/>
     </columns>
     <data>
       <row>
-        <col id="0">None</col>
+        <col id="0">/dev/ttyS0</col>
       </row>
       <row>
-        <col id="0">Odd</col>
+        <col id="0">/dev/ttyS1</col>
       </row>
       <row>
-        <col id="0">Even</col>
+        <col id="0">/dev/ttyS2</col>
       </row>
       <row>
-        <col id="0">Mark</col>
+        <col id="0">/dev/ttyS3</col>
       </row>
       <row>
-        <col id="0">Space</col>
+        <col id="0">/dev/ttyUSB0</col>
       </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model8">
-    <columns>
-      <column type="gchararray"/>
-    </columns>
-    <data>
       <row>
-        <col id="0">Read and Write</col>
+        <col id="0">/dev/ttyUSB1</col>
       </row>
       <row>
-        <col id="0">Read Only</col>
+        <col id="0">/dev/ttyUSB2</col>
       </row>
       <row>
-        <col id="0">Write Only</col>
+        <col id="0">/dev/ttyUSB3</col>
       </row>
     </data>
   </object>
@@ -793,140 +796,63 @@
                 <property name="n_rows">8</property>
                 <property name="n_columns">2</property>
                 <child>
-                  <object class="GtkCheckButton" id="settings_local_echo">
+                  <object class="GtkComboBox" id="settings_open_for">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="tooltip-text" translatable="yes">Normally disabled</property>
-                    <property name="label" translatable="yes">Echo received data</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="model">model3</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="renderer3"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="x_padding">2</property>
-                    <property name="y_padding">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label26">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Local Echo</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Device</property>
-                  </object>
-                  <packing>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Baud Rate</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Data Bits</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Stop Bits</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Parity</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Handshake</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="x_padding">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label8">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">Access Mode</property>
-                  </object>
-                  <packing>
                     <property name="top_attach">6</property>
                     <property name="bottom_attach">7</property>
-                    <property name="x_padding">4</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxEntry" id="settings_device">
+                  <object class="GtkHBox" id="hbox3">
                     <property name="visible">True</property>
-                    <child internal-child="entry">
-                      <object class="GtkEntry" id="comboboxentry-entry1">
+                    <child>
+                      <object class="GtkCheckButton" id="settings_hardware_handshake">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip-text" translatable="yes">Also known as RTS/CTS handshaking</property>
+                        <property name="label" translatable="yes">Hardware</property>
+                        <property name="draw_indicator">True</property>
                       </object>
+                      <packing>
+                        <property name="padding">2</property>
+                      </packing>
                     </child>
-                    <property name="model">model3</property>
                     <child>
-                      <object class="GtkCellRendererText" id="renderer3"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
+                      <object class="GtkCheckButton" id="settings_software_handshake">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip-text" translatable="yes">Also known as XON/XOFF handshaking</property>
+                        <property name="label" translatable="yes">Software</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="padding">2</property>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="y_options">GTK_EXPAND</property>
-                    <property name="y_padding">2</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="settings_baud_rate">
+                  <object class="GtkComboBox" id="settings_parity">
                     <property name="visible">True</property>
                     <property name="model">model4</property>
                     <child>
@@ -939,14 +865,14 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
                     <property name="y_options">GTK_EXPAND</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="settings_data_bits">
+                  <object class="GtkComboBox" id="settings_stop_bits">
                     <property name="visible">True</property>
                     <property name="model">model5</property>
                     <child>
@@ -959,14 +885,14 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
                     <property name="y_options">GTK_EXPAND</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="settings_stop_bits">
+                  <object class="GtkComboBox" id="settings_data_bits">
                     <property name="visible">True</property>
                     <property name="model">model6</property>
                     <child>
@@ -979,14 +905,14 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
                     <property name="y_options">GTK_EXPAND</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="settings_parity">
+                  <object class="GtkComboBox" id="settings_baud_rate">
                     <property name="visible">True</property>
                     <property name="model">model7</property>
                     <child>
@@ -999,65 +925,142 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="y_options">GTK_EXPAND</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="hbox3">
+                  <object class="GtkComboBoxEntry" id="settings_device">
                     <property name="visible">True</property>
-                    <child>
-                      <object class="GtkCheckButton" id="settings_hardware_handshake">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip-text" translatable="yes">Also known as RTS/CTS handshaking</property>
-                        <property name="label" translatable="yes">Hardware</property>
-                        <property name="draw_indicator">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry" id="comboboxentry-entry1">
                       </object>
-                      <packing>
-                        <property name="padding">2</property>
-                      </packing>
                     </child>
+                    <property name="model">model8</property>
                     <child>
-                      <object class="GtkCheckButton" id="settings_software_handshake">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip-text" translatable="yes">Also known as XON/XOFF handshaking</property>
-                        <property name="label" translatable="yes">Software</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="padding">2</property>
-                        <property name="position">1</property>
-                      </packing>
+                      <object class="GtkCellRendererText" id="renderer8"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
                     </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
+                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="y_padding">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label8">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Access Mode</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label7">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Handshake</property>
+                  </object>
+                  <packing>
                     <property name="top_attach">5</property>
                     <property name="bottom_attach">6</property>
+                    <property name="x_padding">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="settings_open_for">
+                  <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
-                    <property name="model">model8</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="renderer8"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Parity</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Stop Bits</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Data Bits</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Baud Rate</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Device</property>
+                  </object>
+                  <packing>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label26">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Local Echo</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_padding">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="settings_local_echo">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="tooltip-text" translatable="yes">Normally disabled</property>
+                    <property name="label" translatable="yes">Echo received data</property>
+                    <property name="draw_indicator">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="y_options">GTK_EXPAND</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_padding">2</property>
                     <property name="y_padding">2</property>
                   </packing>
                 </child>
@@ -1107,9 +1110,9 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="0">settings_local_echo</action-widget>
       <action-widget response="0">settings_hardware_handshake</action-widget>
       <action-widget response="0">settings_software_handshake</action-widget>
+      <action-widget response="0">settings_local_echo</action-widget>
       <action-widget response="0">settings_cancel_button</action-widget>
       <action-widget response="0">settings_ok_button</action-widget>
     </action-widgets>
@@ -1265,13 +1268,19 @@
         <property name="visible">True</property>
         <property name="n_rows">4</property>
         <child>
-          <object class="GtkLabel" id="stop_recording_label">
+          <object class="GtkLabel" id="disconnect_label">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Stop Recording</property>
+            <property name="label" translatable="yes">Disconnect</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel" id="connect_label">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Connect</property>
           </object>
           <packing>
-            <property name="top_attach">3</property>
-            <property name="bottom_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
           </packing>
         </child>
         <child>
@@ -1285,21 +1294,15 @@
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="connect_label">
+          <object class="GtkLabel" id="stop_recording_label">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Connect</property>
+            <property name="label" translatable="yes">Stop Recording</property>
           </object>
           <packing>
-            <property name="top_attach">1</property>
-            <property name="bottom_attach">2</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkLabel" id="disconnect_label">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Disconnect</property>
-          </object>
-        </child>
       </object>
     </child>
   </object>

Modified: trunk/src/SerialConnection.vala
==============================================================================
--- trunk/src/SerialConnection.vala	(original)
+++ trunk/src/SerialConnection.vala	Tue Apr  7 12:53:52 2009
@@ -16,7 +16,7 @@
         private GLib.IOChannel IOChannelFd;
         signal void newData(uchar[100] data, int size);
         private  int flags=0;
-	public enum LineEnd{ CRLF, CR, LF, TAB, NONE }
+	public enum LineEnd{ CRLF, CR, LF, TAB, ESC, NONE }
 	uint? sourceId;
 	bool localEcho;
         public bool doConnect (Settings settings) {
@@ -92,6 +92,10 @@
                                 s = "\t";
                                 break;
                         }
+                        case LineEnd.ESC: {
+                                s = "\x1b";
+                                break;
+                        }
                         case LineEnd.NONE:
 			default: {
 				s = "";



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