moserial r37 - in trunk: . data/glade src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: moserial r37 - in trunk: . data/glade src
- Date: Fri, 3 Apr 2009 17:23:36 +0000 (UTC)
Author: mjc
Date: Fri Apr 3 17:23:36 2009
New Revision: 37
URL: http://svn.gnome.org/viewvc/moserial?rev=37&view=rev
Log:
2009-04-03 Michael J. Chudobiak <mjc svn gnome org>
* data/glade/moserial.glade:
* data/glade/moserial.ui:
* src/MainWindow.vala:
Remove the Escape key definition out from glade and put it in the
code. Also, scroll all text boxes to the bottom after pressing
escape.
Modified:
trunk/ChangeLog
trunk/data/glade/moserial.glade
trunk/data/glade/moserial.ui
trunk/src/MainWindow.vala
Modified: trunk/data/glade/moserial.glade
==============================================================================
--- trunk/data/glade/moserial.glade (original)
+++ trunk/data/glade/moserial.glade Fri Apr 3 17:23:36 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 Tue Mar 17 08:32:06 2009 -->
+<!--Generated with glade3 3.4.5 on Fri Apr 3 13:21:08 2009 -->
<glade-interface>
<widget class="GtkWindow" id="window">
<property name="title" translatable="yes">moserial</property>
@@ -477,7 +477,6 @@
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Enter your new outgoing data here. Data is transmitted on a character-by-character basis.</property>
<property name="tooltip" translatable="yes">Enter the data that you wish to transmit here. Press Enter or Send when you are ready to send it.</property>
- <accelerator key="Escape" modifiers="" signal="grab-focus"/>
</widget>
</child>
<child>
@@ -598,168 +597,90 @@
<property name="n_rows">8</property>
<property name="n_columns">2</property>
<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>
<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_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="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_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>
- </packing>
- </child>
- <child>
- <widget class="GtkComboBox" id="settings_baud_rate">
- <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>
- </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="x_padding">4</property>
</packing>
</child>
<child>
- <widget class="GtkComboBoxEntry" id="settings_device">
+ <widget class="GtkLabel" id="label4">
<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">Stop Bits</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">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_padding">4</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label8">
+ <widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Access Mode</property>
+ <property name="label" translatable="yes">Parity</property>
</widget>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_padding">4</property>
</packing>
</child>
@@ -776,90 +697,168 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label5">
+ <widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes">Parity</property>
+ <property name="label" translatable="yes">Access Mode</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</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="label4">
+ <widget class="GtkComboBoxEntry" id="settings_device">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Stop Bits</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">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="y_options">GTK_EXPAND</property>
+ <property name="y_padding">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label3">
+ <widget class="GtkComboBox" id="settings_baud_rate">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Data 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="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="GtkComboBox" id="settings_data_bits">
+ <property name="visible">True</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="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="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="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="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>
@@ -1058,19 +1057,13 @@
<property name="visible">True</property>
<property name="n_rows">4</property>
<child>
- <widget class="GtkLabel" id="disconnect_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Disconnect</property>
- </widget>
- </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>
@@ -1084,15 +1077,21 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="stop_recording_label">
+ <widget class="GtkLabel" id="connect_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">Stop Recording</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>
+ <widget class="GtkLabel" id="disconnect_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Disconnect</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -1165,8 +1164,8 @@
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="has_separator">False</property>
- <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">False</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox10">
<property name="visible">True</property>
Modified: trunk/data/glade/moserial.ui
==============================================================================
--- trunk/data/glade/moserial.ui (original)
+++ trunk/data/glade/moserial.ui Fri Apr 3 17:23:36 2009
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!--Generated with glade3 3.4.5 on Tue Mar 17 08:32:06 2009 -->
+<!--Generated with glade3 3.4.5 on Fri Apr 3 13:21:08 2009 -->
<interface>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">5000</property>
@@ -85,71 +85,32 @@
</columns>
<data>
<row>
- <col id="0">Read and Write</col>
- </row>
- <row>
- <col id="0">Read Only</col>
- </row>
- <row>
- <col id="0">Write Only</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="model4">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0">None</col>
- </row>
- <row>
- <col id="0">Odd</col>
- </row>
- <row>
- <col id="0">Even</col>
- </row>
- <row>
- <col id="0">Mark</col>
+ <col id="0">/dev/ttyS0</col>
</row>
<row>
- <col id="0">Space</col>
+ <col id="0">/dev/ttyS1</col>
</row>
- </data>
- </object>
- <object class="GtkListStore" id="model5">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
<row>
- <col id="0">1</col>
+ <col id="0">/dev/ttyS2</col>
</row>
<row>
- <col id="0">2</col>
+ <col id="0">/dev/ttyS3</col>
</row>
- </data>
- </object>
- <object class="GtkListStore" id="model6">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
<row>
- <col id="0">5</col>
+ <col id="0">/dev/ttyUSB0</col>
</row>
<row>
- <col id="0">6</col>
+ <col id="0">/dev/ttyUSB1</col>
</row>
<row>
- <col id="0">7</col>
+ <col id="0">/dev/ttyUSB2</col>
</row>
<row>
- <col id="0">8</col>
+ <col id="0">/dev/ttyUSB3</col>
</row>
</data>
</object>
- <object class="GtkListStore" id="model7">
+ <object class="GtkListStore" id="model4">
<columns>
<column type="gchararray"/>
</columns>
@@ -198,34 +159,73 @@
</row>
</data>
</object>
- <object class="GtkListStore" id="model8">
+ <object class="GtkListStore" id="model5">
<columns>
<column type="gchararray"/>
</columns>
<data>
<row>
- <col id="0">/dev/ttyS0</col>
+ <col id="0">5</col>
</row>
<row>
- <col id="0">/dev/ttyS1</col>
+ <col id="0">6</col>
</row>
<row>
- <col id="0">/dev/ttyS2</col>
+ <col id="0">7</col>
</row>
<row>
- <col id="0">/dev/ttyS3</col>
+ <col id="0">8</col>
</row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model6">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
<row>
- <col id="0">/dev/ttyUSB0</col>
+ <col id="0">1</col>
</row>
<row>
- <col id="0">/dev/ttyUSB1</col>
+ <col id="0">2</col>
</row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model7">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
<row>
- <col id="0">/dev/ttyUSB2</col>
+ <col id="0">None</col>
</row>
<row>
- <col id="0">/dev/ttyUSB3</col>
+ <col id="0">Odd</col>
+ </row>
+ <row>
+ <col id="0">Even</col>
+ </row>
+ <row>
+ <col id="0">Mark</col>
+ </row>
+ <row>
+ <col id="0">Space</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model8">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">Read and Write</col>
+ </row>
+ <row>
+ <col id="0">Read Only</col>
+ </row>
+ <row>
+ <col id="0">Write Only</col>
</row>
</data>
</object>
@@ -667,7 +667,6 @@
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Enter your new outgoing data here. Data is transmitted on a character-by-character basis.</property>
<property name="tooltip-text" translatable="yes">Enter the data that you wish to transmit here. Press Enter or Send when you are ready to send it.</property>
- <accelerator key="Escape" modifiers="" signal="grab-focus"/>
</object>
</child>
<child>
@@ -794,63 +793,140 @@
<property name="n_rows">8</property>
<property name="n_columns">2</property>
<child>
- <object class="GtkComboBox" id="settings_open_for">
+ <object class="GtkCheckButton" id="settings_local_echo">
<property name="visible">True</property>
- <property name="model">model3</property>
- <child>
- <object class="GtkCellRendererText" id="renderer3"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <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">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="y_options">GTK_EXPAND</property>
- <property name="y_padding">2</property>
+ <property name="x_padding">4</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">model3</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="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">5</property>
- <property name="bottom_attach">6</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">model4</property>
<child>
@@ -863,14 +939,14 @@
<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="GtkComboBox" id="settings_stop_bits">
+ <object class="GtkComboBox" id="settings_data_bits">
<property name="visible">True</property>
<property name="model">model5</property>
<child>
@@ -883,14 +959,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_data_bits">
+ <object class="GtkComboBox" id="settings_stop_bits">
<property name="visible">True</property>
<property name="model">model6</property>
<child>
@@ -903,14 +979,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_baud_rate">
+ <object class="GtkComboBox" id="settings_parity">
<property name="visible">True</property>
<property name="model">model7</property>
<child>
@@ -923,142 +999,65 @@
<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="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">model8</property>
<child>
- <object class="GtkCellRendererText" id="renderer8"/>
- <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>
- </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="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="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">
+ <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">model8</property>
+ <child>
+ <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="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>
@@ -1108,9 +1107,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>
@@ -1266,19 +1265,13 @@
<property name="visible">True</property>
<property name="n_rows">4</property>
<child>
- <object class="GtkLabel" id="disconnect_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Disconnect</property>
- </object>
- </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>
@@ -1292,15 +1285,21 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="stop_recording_label">
+ <object class="GtkLabel" id="connect_label">
<property name="visible">True</property>
- <property name="label" translatable="yes">Stop Recording</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>
+ <object class="GtkLabel" id="disconnect_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Disconnect</property>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -1377,8 +1376,8 @@
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="has_separator">False</property>
- <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="local_only">False</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox10">
<property name="visible">True</property>
Modified: trunk/src/MainWindow.vala
==============================================================================
--- trunk/src/MainWindow.vala (original)
+++ trunk/src/MainWindow.vala Fri Apr 3 17:23:36 2009
@@ -70,6 +70,11 @@
private bool profileChanged=false;
private Gtk.Action cutMenuItem;
private Gtk.Action copyMenuItem;
+ private Adjustment va1;
+ private Adjustment va2;
+ private Adjustment va3;
+ private Adjustment va4;
+
//private Gtk.RecentChooser recentChooser;
public MainWindow(Builder builder, string? profileFilename) {
this.builder=builder;
@@ -80,6 +85,7 @@
gtkWindow = (Gtk.Window)builder.get_object("window");
gtkWindow.destroy += quitSave;
gtkWindow.delete_event += deleteSaveSize;
+ gtkWindow.key_press_event += keyPress;
//load defaults
profile=new Profile();
@@ -219,13 +225,13 @@
//setup scrolling
ScrolledWindow incomingAsciiScrolledWindow = (ScrolledWindow)builder.get_object("incoming_ascii_scrolledwindow");
- Adjustment va1 = incomingAsciiScrolledWindow.get_vadjustment();
+ va1 = incomingAsciiScrolledWindow.get_vadjustment();
ScrolledWindow incomingHexScrolledWindow = (ScrolledWindow)builder.get_object("incoming_hex_scrolledwindow");
- Adjustment va2 = incomingHexScrolledWindow.get_vadjustment();
+ va2 = incomingHexScrolledWindow.get_vadjustment();
ScrolledWindow outgoingAsciiScrolledWindow = (ScrolledWindow)builder.get_object("outgoing_ascii_scrolledwindow");
- Adjustment va3 = outgoingAsciiScrolledWindow.get_vadjustment();
+ va3 = outgoingAsciiScrolledWindow.get_vadjustment();
ScrolledWindow outgoingHexScrolledWindow = (ScrolledWindow)builder.get_object("outgoing_hex_scrolledwindow");
- Adjustment va4 = outgoingHexScrolledWindow.get_vadjustment();
+ va4 = outgoingHexScrolledWindow.get_vadjustment();
AutoScroll.setup(va1, va2, va3, va4);
//setup entry
@@ -268,7 +274,7 @@
currentPaths = DefaultPaths.loadFromProfile(profile);
}
-
+
private void applyProfile (string filename) {
if (profile.load(filename, gtkWindow)) {
profileFilename = filename;
@@ -741,6 +747,21 @@
return true;
}
+ private bool keyPress(Widget widget, EventKey key) {
+ /* Bug 551184 â Need gdk/gdkkeysyms.h bindings */
+ if (key.keyval == 0xff1b) { /* Escape */
+ AutoScroll.scroll (va1);
+ AutoScroll.scroll (va2);
+ AutoScroll.scroll (va3);
+ AutoScroll.scroll (va4);
+ entry.grab_focus();
+ entry.set_position(-1);
+ return true;
+ }
+
+ return false;
+ }
+
private void windowSizeSave () {
int width = 0;
int height = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]