GUI: Improve External editor add/edit dialog layout.

Get rid of the form layout stretching the Browse-button so wide. Use
form-like but more flexible layout. Change the term 'Application to
execute' to 'Command to execute'. This reduces duplication and makes
clear difference between application name and the command to execute
to start the application. Fix also tab ordering so that the
application name field gets the focus initially.
This commit is contained in:
Kimmo Varis 2010-10-28 23:47:30 +03:00
parent 3b4770e5a3
commit ca9f8a7036
1 changed files with 71 additions and 30 deletions

View File

@ -20,43 +20,78 @@
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Here you can add applications that can open error files. <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
Specify a name for the application and the application to execute. &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
The following texts are replaced with appropriate values when application is executed: &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
(file) - Filename containing the error &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Here you can add applications that can open error files.&lt;/span&gt;&lt;/p&gt;
(line) - Line number containing the error &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Specify a name for the application and the command to execute.&lt;/span&gt;&lt;/p&gt;
(message) - Error message &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
(severity) - Error severity &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;The following texts are replaced with appropriate values when application is executed:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(file) - Filename containing the error&lt;/span&gt;&lt;/p&gt;
Example opening a file with Kate and make Kate scroll to the correct line: &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(line) - Line number containing the error&lt;/span&gt;&lt;/p&gt;
kate -l(line) (file)</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(message) - Error message&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(severity) - Error severity&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Example opening a file with Kate and make Kate scroll to the correct line:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;kate -l(line) (file)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QFormLayout" name="formLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="0" column="0"> <item>
<widget class="QLabel" name="label_2"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="text"> <item>
<string>Application's name</string> <widget class="QLabel" name="label_2">
<property name="text">
<string>Application's name:</string>
</property>
<property name="buddy">
<cstring>mName</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Command to execute:</string>
</property>
<property name="buddy">
<cstring>mPath</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLineEdit" name="mName"/>
</item>
<item>
<widget class="QLineEdit" name="mPath"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
</item> <size>
<item row="1" column="0"> <width>40</width>
<widget class="QLabel" name="label_3"> <height>20</height>
<property name="text"> </size>
<string>Application to execute</string>
</property> </property>
</widget> </spacer>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QLineEdit" name="mName"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="mPath"/>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="mButtonBrowse"> <widget class="QPushButton" name="mButtonBrowse">
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
@ -77,6 +112,12 @@ kate -l(line) (file)</string>
</item> </item>
</layout> </layout>
</widget> </widget>
<tabstops>
<tabstop>mName</tabstop>
<tabstop>mPath</tabstop>
<tabstop>mButtonBrowse</tabstop>
<tabstop>mButtons</tabstop>
</tabstops>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>