Index: trunk/i18n/en.ts
===================================================================
--- trunk/i18n/en.ts	(revision 79)
+++ trunk/i18n/en.ts	(revision 80)
@@ -147,16 +147,16 @@
     <name>MainWindow</name>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>Language change</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Unable to load translation language.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Would you like to save changes in current task?</source>
         <translation type="unfinished"></translation>
@@ -164,64 +164,64 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="15"/>
-        <location filename="../src/mainwindow.cpp" line="714"/>
+        <location filename="../src/mainwindow.cpp" line="746"/>
         <source>Travelling Salesman Problem</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Language Change</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Unsaved Changes</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="139"/>
+        <location filename="../src/mainwindow.cpp" line="126"/>
         <source>All Supported Formats</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="140"/>
-        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="127"/>
+        <location filename="../src/mainwindow.cpp" line="128"/>
         <source>%1 Task Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="142"/>
-        <location filename="../src/mainwindow.cpp" line="197"/>
-        <location filename="../src/mainwindow.cpp" line="693"/>
+        <location filename="../src/mainwindow.cpp" line="129"/>
+        <location filename="../src/mainwindow.cpp" line="188"/>
+        <location filename="../src/mainwindow.cpp" line="720"/>
         <source>All Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="191"/>
+        <location filename="../src/mainwindow.cpp" line="182"/>
         <source>PDF Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="193"/>
+        <location filename="../src/mainwindow.cpp" line="184"/>
         <source>HTML Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="186"/>
         <source>OpenDocument Files</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
         <source>Selected candidate for branching: %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
+        <location filename="../src/mainwindow.cpp" line="433"/>
+        <source>(%1;%2)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message numerus="yes">
         <location filename="../src/mainwindow.cpp" line="435"/>
-        <source>(%1;%2)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../src/mainwindow.cpp" line="437"/>
         <source>%n alternate candidate(s) for branching: %1.</source>
         <translation>
@@ -230,21 +230,30 @@
         </translation>
     </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="692"/>
+    <message numerus="yes">
+        <location filename="../src/mainwindow.cpp" line="452"/>
+        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
+        <translation>
+            <numerusform>The price is &lt;b&gt;%n&lt;/b&gt; unit.</numerusform>
+            <numerusform>The price is &lt;b&gt;%n&lt;/b&gt; units.</numerusform>
+        </translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="719"/>
         <source>%1 Task File</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>Settings Changed</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="144"/>
+        <location filename="../src/mainwindow.cpp" line="132"/>
+        <location filename="../src/mainwindow.cpp" line="134"/>
         <source>Task Load</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>You have changed color settings.
 Do you wish to apply them to current solution text?</source>
@@ -252,71 +261,67 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="367"/>
+        <location filename="../src/mainwindow.cpp" line="365"/>
         <source>About TSPSG</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Data error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="414"/>
+        <location filename="../src/mainwindow.cpp" line="412"/>
         <source>Variant #%1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="415"/>
+        <location filename="../src/mainwindow.cpp" line="413"/>
         <source>Task:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="418"/>
-        <location filename="../src/mainwindow.cpp" line="462"/>
+        <location filename="../src/mainwindow.cpp" line="416"/>
+        <location filename="../src/mainwindow.cpp" line="460"/>
         <source>Solution of Variant #%1 task</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="424"/>
+        <location filename="../src/mainwindow.cpp" line="422"/>
         <source>Step #%1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location filename="../src/mainwindow.cpp" line="448"/>
+        <source>Optimal path:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location filename="../src/mainwindow.cpp" line="450"/>
-        <source>Optimal path:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="452"/>
         <source>Resulting path:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="454"/>
-        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="457"/>
+        <location filename="../src/mainwindow.cpp" line="455"/>
         <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="700"/>
+        <location filename="../src/mainwindow.cpp" line="728"/>
+        <location filename="../src/mainwindow.cpp" line="730"/>
         <source>Task Save</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
         <source>Language will be autodetected on next application start.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>You have language autodetection turned on.
 It needs to be off.
@@ -325,8 +330,8 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="158"/>
-        <location filename="../src/mainwindow.cpp" line="174"/>
-        <location filename="../src/mainwindow.cpp" line="292"/>
-        <location filename="../src/mainwindow.h" line="96"/>
+        <location filename="../src/mainwindow.cpp" line="149"/>
+        <location filename="../src/mainwindow.cpp" line="165"/>
+        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.h" line="100"/>
         <source>Untitled</source>
         <translation type="unfinished"></translation>
@@ -394,5 +399,5 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="222"/>
-        <location filename="../ui/mainwindow.ui" line="425"/>
+        <location filename="../ui/mainwindow.ui" line="377"/>
         <source>Save solution to a file</source>
         <translation type="unfinished"></translation>
@@ -425,25 +430,15 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="419"/>
-        <source>Solution...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="512"/>
+        <location filename="../ui/mainwindow.ui" line="455"/>
         <source>Context &amp;Help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="527"/>
+        <location filename="../ui/mainwindow.ui" line="470"/>
         <source>&amp;About TSPSG...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="530"/>
-        <source>About TSPSG...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="599"/>
+        <location filename="../ui/mainwindow.ui" line="536"/>
         <source>&amp;Save</source>
         <translation type="unfinished"></translation>
@@ -460,161 +455,136 @@
     </message>
     <message>
+        <location filename="../ui/mainwindow.ui" line="374"/>
+        <source>Save solution</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="386"/>
+        <source>&amp;New</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="389"/>
+        <source>New task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="392"/>
+        <source>Create new task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="395"/>
+        <source>Ctrl+N</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="404"/>
+        <source>&amp;Open...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="407"/>
+        <source>Open task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="410"/>
+        <source>Open saved task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="413"/>
+        <source>Ctrl+O</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <location filename="../ui/mainwindow.ui" line="422"/>
-        <source>Save solution</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="434"/>
-        <source>&amp;New</source>
+        <source>&amp;Preferences...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="425"/>
+        <source>Application preferences</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="437"/>
-        <source>New</source>
+        <source>&amp;Contents</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="440"/>
-        <source>New task</source>
+        <source>Open help contents</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="443"/>
-        <source>Create new task</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="446"/>
-        <source>Ctrl+N</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="455"/>
-        <source>&amp;Open...</source>
+        <source>Ctrl+F1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="458"/>
-        <source>Open...</source>
+        <source>Open context help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="461"/>
-        <source>Open task</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="464"/>
-        <source>Open saved task</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="467"/>
-        <source>Ctrl+O</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="476"/>
-        <source>&amp;Preferences...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="479"/>
-        <source>Preferences...</source>
+        <source>F1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="473"/>
+        <source>About application</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="482"/>
-        <source>Application preferences</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="494"/>
-        <source>&amp;Contents</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="497"/>
-        <source>Open help contents</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="500"/>
-        <source>Ctrl+F1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="515"/>
-        <source>Open context help</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="518"/>
-        <source>F1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="533"/>
-        <source>About application</source>
+        <source>E&amp;xit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="485"/>
+        <source>Exit application</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="490"/>
+        <source>&amp;Task...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="493"/>
+        <location filename="../ui/mainwindow.ui" line="539"/>
+        <source>Save task</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="496"/>
+        <source>Save task to file</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="545"/>
+        <source>Ctrl+S</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../ui/mainwindow.ui" line="507"/>
+        <source>&amp;Autodetect</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location filename="../ui/mainwindow.ui" line="542"/>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="545"/>
-        <source>Exit application</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="550"/>
-        <source>&amp;Task...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="553"/>
-        <source>Task...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="556"/>
-        <location filename="../ui/mainwindow.ui" line="605"/>
-        <source>Save task</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="559"/>
-        <source>Save task to file</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="611"/>
-        <source>Ctrl+S</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="570"/>
-        <source>&amp;Autodetect</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="608"/>
         <source>Save current task</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="620"/>
+        <location filename="../ui/mainwindow.ui" line="554"/>
         <source>About &amp;Qt...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="623"/>
-        <source>About Qt...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="626"/>
+        <location filename="../ui/mainwindow.ui" line="557"/>
         <source>About Qt library</source>
         <translation type="unfinished"></translation>
@@ -636,25 +606,20 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="396"/>
+        <location filename="../src/mainwindow.cpp" line="707"/>
         <source>&amp;Print...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="408"/>
+        <location filename="../src/mainwindow.cpp" line="714"/>
         <source>Ctrl+P</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
         <source>&amp;Solution...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="602"/>
-        <source>Save</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="573"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
         <source>Detect language automatically</source>
         <translation type="unfinished"></translation>
@@ -666,40 +631,30 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="375"/>
+        <location filename="../src/mainwindow.cpp" line="699"/>
         <source>P&amp;rint Preview...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="378"/>
-        <source>Print Preview...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="381"/>
+        <location filename="../src/mainwindow.cpp" line="701"/>
         <source>Preview solution results</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="384"/>
+        <location filename="../src/mainwindow.cpp" line="704"/>
         <source>Preview current solution results before printing</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="399"/>
-        <source>Print...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="402"/>
+        <location filename="../src/mainwindow.cpp" line="709"/>
         <source>Print solution</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="405"/>
+        <location filename="../src/mainwindow.cpp" line="712"/>
         <source>Print current solution results</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="576"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
         <source>Detect language automatically based on regional settings</source>
         <translation type="unfinished"></translation>
Index: trunk/i18n/ru.ts
===================================================================
--- trunk/i18n/ru.ts	(revision 79)
+++ trunk/i18n/ru.ts	(revision 80)
@@ -155,11 +155,11 @@
     <name>MainWindow</name>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>Language change</source>
         <translation>Смена языка</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Unable to load translation language.</source>
         <translation>Невозможно загрузить перевод.</translation>
@@ -167,69 +167,69 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="15"/>
-        <location filename="../src/mainwindow.cpp" line="714"/>
+        <location filename="../src/mainwindow.cpp" line="746"/>
         <source>Travelling Salesman Problem</source>
         <translation>Задача коммивояжера</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Unsaved Changes</source>
         <translation>Несохраненные изменения</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="139"/>
+        <location filename="../src/mainwindow.cpp" line="126"/>
         <source>All Supported Formats</source>
         <translation>Все поддерживаемые форматы</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="142"/>
-        <location filename="../src/mainwindow.cpp" line="197"/>
-        <location filename="../src/mainwindow.cpp" line="693"/>
+        <location filename="../src/mainwindow.cpp" line="129"/>
+        <location filename="../src/mainwindow.cpp" line="188"/>
+        <location filename="../src/mainwindow.cpp" line="720"/>
         <source>All Files</source>
         <translation>Все файлы</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="140"/>
-        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="127"/>
+        <location filename="../src/mainwindow.cpp" line="128"/>
         <source>%1 Task Files</source>
         <translation>Файлы условий %1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Language Change</source>
         <translation>Смена языка</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Would you like to save changes in current task?</source>
         <translation>Желаете сохранить изменения в текущей задаче?</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="191"/>
+        <location filename="../src/mainwindow.cpp" line="182"/>
         <source>PDF Files</source>
         <translation>Файли PDF</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="193"/>
+        <location filename="../src/mainwindow.cpp" line="184"/>
         <source>HTML Files</source>
         <translation>Файлы HTML</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="186"/>
         <source>OpenDocument Files</source>
         <translation>Файлы OpenDocument</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
         <source>Selected candidate for branching: %1.</source>
         <translation>Выбранный кандидат для ветвления: %1.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
-        <location filename="../src/mainwindow.cpp" line="435"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
+        <location filename="../src/mainwindow.cpp" line="433"/>
         <source>(%1;%2)</source>
         <translation></translation>
     </message>
     <message numerus="yes">
-        <location filename="../src/mainwindow.cpp" line="437"/>
+        <location filename="../src/mainwindow.cpp" line="435"/>
         <source>%n alternate candidate(s) for branching: %1.</source>
         <translation>
@@ -239,21 +239,31 @@
         </translation>
     </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="692"/>
+    <message numerus="yes">
+        <location filename="../src/mainwindow.cpp" line="452"/>
+        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
+        <translation>
+            <numerusform>Стоимость - &lt;b&gt;%n&lt;/b&gt; единица.</numerusform>
+            <numerusform>Стоимость - &lt;b&gt;%n&lt;/b&gt; единицы.</numerusform>
+            <numerusform>Стоимость - &lt;b&gt;%n&lt;/b&gt; единиц.</numerusform>
+        </translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="719"/>
         <source>%1 Task File</source>
         <translation>Файл условия %1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>Settings Changed</source>
         <translation>Параметры изменены</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="144"/>
+        <location filename="../src/mainwindow.cpp" line="132"/>
+        <location filename="../src/mainwindow.cpp" line="134"/>
         <source>Task Load</source>
         <translation>Загрузка условия</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>You have changed color settings.
 Do you wish to apply them to current solution text?</source>
@@ -262,71 +272,67 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="367"/>
+        <location filename="../src/mainwindow.cpp" line="365"/>
         <source>About TSPSG</source>
         <translation>Про TSPSG</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Data error</source>
         <translation>Ошибка в данных</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
         <translation>Ошибка в ячейке [Строка %1; Колонка %2]: Неверный формат данных.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="414"/>
+        <location filename="../src/mainwindow.cpp" line="412"/>
         <source>Variant #%1</source>
         <translation>Вариант №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="415"/>
+        <location filename="../src/mainwindow.cpp" line="413"/>
         <source>Task:</source>
         <translation>Условие:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="418"/>
-        <location filename="../src/mainwindow.cpp" line="462"/>
+        <location filename="../src/mainwindow.cpp" line="416"/>
+        <location filename="../src/mainwindow.cpp" line="460"/>
         <source>Solution of Variant #%1 task</source>
         <translation>Решение варианта №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="424"/>
+        <location filename="../src/mainwindow.cpp" line="422"/>
         <source>Step #%1</source>
         <translation>Шаг №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="450"/>
+        <location filename="../src/mainwindow.cpp" line="448"/>
         <source>Optimal path:</source>
         <translation>Оптимальный путь:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="452"/>
+        <location filename="../src/mainwindow.cpp" line="450"/>
         <source>Resulting path:</source>
         <translation>Найденный путь:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="454"/>
-        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
-        <translation>Стоимость - &lt;b&gt;%1&lt;/b&gt; единиц.</translation>
-    </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="457"/>
+        <location filename="../src/mainwindow.cpp" line="455"/>
         <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
         <translation>&lt;b&gt;ВНИМАНИЕ!!!&lt;/b&gt;&lt;br&gt;Найденное решение является рекордом, но может оказаться не оптимальным.&lt;br&gt;Для получения оптимального решения, или проверки текущего на оптимальность, требуется продолжить итерации.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="700"/>
+        <location filename="../src/mainwindow.cpp" line="728"/>
+        <location filename="../src/mainwindow.cpp" line="730"/>
         <source>Task Save</source>
         <translation>Сохранение условия</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
         <source>Language will be autodetected on next application start.</source>
         <translation>Язык будет автоматически определен при следующем запуске приложения.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>You have language autodetection turned on.
 It needs to be off.
@@ -337,8 +343,8 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="158"/>
-        <location filename="../src/mainwindow.cpp" line="174"/>
-        <location filename="../src/mainwindow.cpp" line="292"/>
-        <location filename="../src/mainwindow.h" line="96"/>
+        <location filename="../src/mainwindow.cpp" line="149"/>
+        <location filename="../src/mainwindow.cpp" line="165"/>
+        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.h" line="100"/>
         <source>Untitled</source>
         <translation>Без имени</translation>
@@ -406,5 +412,5 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="222"/>
-        <location filename="../ui/mainwindow.ui" line="425"/>
+        <location filename="../ui/mainwindow.ui" line="377"/>
         <source>Save solution to a file</source>
         <translation>Сохранить решение в файл</translation>
@@ -437,25 +443,15 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="419"/>
-        <source>Solution...</source>
-        <translation>Решение...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="512"/>
+        <location filename="../ui/mainwindow.ui" line="455"/>
         <source>Context &amp;Help</source>
         <translation>&amp;Контекстная справка</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="527"/>
+        <location filename="../ui/mainwindow.ui" line="470"/>
         <source>&amp;About TSPSG...</source>
         <translation>&amp;Про TSPSG...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="530"/>
-        <source>About TSPSG...</source>
-        <translation>Про TSPSG...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="599"/>
+        <location filename="../ui/mainwindow.ui" line="536"/>
         <source>&amp;Save</source>
         <translation>Со&amp;хранить</translation>
@@ -472,161 +468,136 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="422"/>
+        <location filename="../ui/mainwindow.ui" line="374"/>
         <source>Save solution</source>
         <translation>Сохранить решение</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="434"/>
+        <location filename="../ui/mainwindow.ui" line="386"/>
         <source>&amp;New</source>
         <translation>&amp;Создать</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="437"/>
-        <source>New</source>
-        <translation>Создать</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="440"/>
+        <location filename="../ui/mainwindow.ui" line="389"/>
         <source>New task</source>
         <translation>Создать задачу</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="443"/>
+        <location filename="../ui/mainwindow.ui" line="392"/>
         <source>Create new task</source>
         <translation>Создать новую задачу</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="446"/>
+        <location filename="../ui/mainwindow.ui" line="395"/>
         <source>Ctrl+N</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="455"/>
+        <location filename="../ui/mainwindow.ui" line="404"/>
         <source>&amp;Open...</source>
         <translation>&amp;Открыть...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="458"/>
-        <source>Open...</source>
-        <translation>Открыть...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="461"/>
+        <location filename="../ui/mainwindow.ui" line="407"/>
         <source>Open task</source>
         <translation>Открыть условие</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="464"/>
+        <location filename="../ui/mainwindow.ui" line="410"/>
         <source>Open saved task</source>
         <translation>Открыть сохраненное условие задачи</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="467"/>
+        <location filename="../ui/mainwindow.ui" line="413"/>
         <source>Ctrl+O</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="476"/>
+        <location filename="../ui/mainwindow.ui" line="422"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Параметры...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="479"/>
-        <source>Preferences...</source>
-        <translation>Параметры...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="482"/>
+        <location filename="../ui/mainwindow.ui" line="425"/>
         <source>Application preferences</source>
         <translation>Настройка параметров программмы</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="494"/>
+        <location filename="../ui/mainwindow.ui" line="437"/>
         <source>&amp;Contents</source>
         <translation>&amp;Содежание</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="497"/>
+        <location filename="../ui/mainwindow.ui" line="440"/>
         <source>Open help contents</source>
         <translation>Вызвать справку программы</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="500"/>
+        <location filename="../ui/mainwindow.ui" line="443"/>
         <source>Ctrl+F1</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="515"/>
+        <location filename="../ui/mainwindow.ui" line="458"/>
         <source>Open context help</source>
         <translation>Вызвать контекстную справку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="518"/>
+        <location filename="../ui/mainwindow.ui" line="461"/>
         <source>F1</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="533"/>
+        <location filename="../ui/mainwindow.ui" line="473"/>
         <source>About application</source>
         <translation>О программе</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="542"/>
+        <location filename="../ui/mainwindow.ui" line="482"/>
         <source>E&amp;xit</source>
         <translation>В&amp;ыход</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="545"/>
+        <location filename="../ui/mainwindow.ui" line="485"/>
         <source>Exit application</source>
         <translation>Выйти из приложения</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="550"/>
+        <location filename="../ui/mainwindow.ui" line="490"/>
         <source>&amp;Task...</source>
         <translation>&amp;Условие...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="553"/>
-        <source>Task...</source>
-        <translation>Условие...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="556"/>
-        <location filename="../ui/mainwindow.ui" line="605"/>
+        <location filename="../ui/mainwindow.ui" line="493"/>
+        <location filename="../ui/mainwindow.ui" line="539"/>
         <source>Save task</source>
         <translation>Сохранить условие</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="559"/>
+        <location filename="../ui/mainwindow.ui" line="496"/>
         <source>Save task to file</source>
         <translation>Сохранить условие задачи в файл</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="611"/>
+        <location filename="../ui/mainwindow.ui" line="545"/>
         <source>Ctrl+S</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="570"/>
+        <location filename="../ui/mainwindow.ui" line="507"/>
         <source>&amp;Autodetect</source>
         <translation>&amp;Автоопределение</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="608"/>
+        <location filename="../ui/mainwindow.ui" line="542"/>
         <source>Save current task</source>
         <translation>Сохранить текущее условие</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="620"/>
+        <location filename="../ui/mainwindow.ui" line="554"/>
         <source>About &amp;Qt...</source>
         <translation>Про &amp;Qt...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="623"/>
-        <source>About Qt...</source>
-        <translation>Про Qt...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="626"/>
+        <location filename="../ui/mainwindow.ui" line="557"/>
         <source>About Qt library</source>
         <translation>Про библиотеку Qt</translation>
@@ -653,65 +624,50 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="375"/>
+        <location filename="../src/mainwindow.cpp" line="699"/>
         <source>P&amp;rint Preview...</source>
         <translation>П&amp;редварительный просмотр...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="378"/>
-        <source>Print Preview...</source>
-        <translation>Предварительный просмотр...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="381"/>
+        <location filename="../src/mainwindow.cpp" line="701"/>
         <source>Preview solution results</source>
         <translation>Предварительный просмотр результатов решения</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="384"/>
+        <location filename="../src/mainwindow.cpp" line="704"/>
         <source>Preview current solution results before printing</source>
         <translation>Предварительный просмотр результатов решения перед печатью</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="396"/>
+        <location filename="../src/mainwindow.cpp" line="707"/>
         <source>&amp;Print...</source>
         <translation>&amp;Печать...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="399"/>
-        <source>Print...</source>
-        <translation>Печать...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="402"/>
+        <location filename="../src/mainwindow.cpp" line="709"/>
         <source>Print solution</source>
         <translation>Печать решения</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="405"/>
+        <location filename="../src/mainwindow.cpp" line="712"/>
         <source>Print current solution results</source>
         <translation>Распечатать текущие результаты решения</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="408"/>
+        <location filename="../src/mainwindow.cpp" line="714"/>
         <source>Ctrl+P</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
         <source>&amp;Solution...</source>
         <translation>&amp;Решение...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="602"/>
-        <source>Save</source>
-        <translation>Сохранить</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="573"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
         <source>Detect language automatically</source>
         <translation>Определять язык автоматически</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="576"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
         <source>Detect language automatically based on regional settings</source>
         <translation>Определять язык автоматически, основываясь на региональных настройках</translation>
Index: trunk/i18n/uk.ts
===================================================================
--- trunk/i18n/uk.ts	(revision 79)
+++ trunk/i18n/uk.ts	(revision 80)
@@ -185,75 +185,60 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="375"/>
+        <location filename="../src/mainwindow.cpp" line="699"/>
         <source>P&amp;rint Preview...</source>
         <translation>&amp;Попередній перегляд...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="378"/>
-        <source>Print Preview...</source>
-        <translation>Попередній перегляд...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="381"/>
+        <location filename="../src/mainwindow.cpp" line="701"/>
         <source>Preview solution results</source>
         <translation>Попередній перегляд результатів розв&apos;язку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="384"/>
+        <location filename="../src/mainwindow.cpp" line="704"/>
         <source>Preview current solution results before printing</source>
         <translation>Попередній перегляд результатів розв&apos;язку перед друком</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="396"/>
+        <location filename="../src/mainwindow.cpp" line="707"/>
         <source>&amp;Print...</source>
         <translation>&amp;Друк...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="399"/>
-        <source>Print...</source>
-        <translation>Друк...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="402"/>
+        <location filename="../src/mainwindow.cpp" line="709"/>
         <source>Print solution</source>
         <translation>Друк розв&apos;зку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="405"/>
+        <location filename="../src/mainwindow.cpp" line="712"/>
         <source>Print current solution results</source>
         <translation>Роздрукувати поточний результат розв&apos;язку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="408"/>
+        <location filename="../src/mainwindow.cpp" line="714"/>
         <source>Ctrl+P</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="416"/>
+        <location filename="../ui/mainwindow.ui" line="371"/>
         <source>&amp;Solution...</source>
         <translation>&amp;Розв&apos;язок...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="602"/>
-        <source>Save</source>
-        <translation>Зберегти</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="573"/>
+        <location filename="../ui/mainwindow.ui" line="510"/>
         <source>Detect language automatically</source>
         <translation>Визначати мову автоматично</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="576"/>
+        <location filename="../ui/mainwindow.ui" line="513"/>
         <source>Detect language automatically based on regional settings</source>
         <translation>Визначати мову автоматично, використовуючи регіональні стандарти</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="611"/>
+        <location filename="../ui/mainwindow.ui" line="545"/>
         <source>Ctrl+S</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="446"/>
+        <location filename="../ui/mainwindow.ui" line="395"/>
         <source>Ctrl+N</source>
         <translation></translation>
@@ -311,5 +296,5 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="222"/>
-        <location filename="../ui/mainwindow.ui" line="425"/>
+        <location filename="../ui/mainwindow.ui" line="377"/>
         <source>Save solution to a file</source>
         <translation>Зберегти розв&apos;язок у файл</translation>
@@ -342,25 +327,15 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="419"/>
-        <source>Solution...</source>
-        <translation>Розв&apos;язок...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="512"/>
+        <location filename="../ui/mainwindow.ui" line="455"/>
         <source>Context &amp;Help</source>
         <translation>&amp;Контекстна допомога</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="527"/>
+        <location filename="../ui/mainwindow.ui" line="470"/>
         <source>&amp;About TSPSG...</source>
         <translation>&amp;Про TSPSG...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="530"/>
-        <source>About TSPSG...</source>
-        <translation>Про TSPSG...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="599"/>
+        <location filename="../ui/mainwindow.ui" line="536"/>
         <source>&amp;Save</source>
         <translation>&amp;Зберегти</translation>
@@ -377,162 +352,137 @@
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="422"/>
+        <location filename="../ui/mainwindow.ui" line="374"/>
         <source>Save solution</source>
         <translation>Зберегти розв&apos;язок</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="434"/>
+        <location filename="../ui/mainwindow.ui" line="386"/>
         <source>&amp;New</source>
         <translation>&amp;Створити</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="437"/>
-        <source>New</source>
-        <translation>Створити</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="440"/>
+        <location filename="../ui/mainwindow.ui" line="389"/>
         <source>New task</source>
         <translation>Нова задача</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="443"/>
+        <location filename="../ui/mainwindow.ui" line="392"/>
         <source>Create new task</source>
         <translation>Створити нову задачу</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="455"/>
+        <location filename="../ui/mainwindow.ui" line="404"/>
         <source>&amp;Open...</source>
         <translation>&amp;Відкрити...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="458"/>
-        <source>Open...</source>
-        <translation>Відкрити...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="461"/>
+        <location filename="../ui/mainwindow.ui" line="407"/>
         <source>Open task</source>
         <translation>Відкрити умову</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="464"/>
+        <location filename="../ui/mainwindow.ui" line="410"/>
         <source>Open saved task</source>
         <translation>Відкрити збережену умову</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="467"/>
+        <location filename="../ui/mainwindow.ui" line="413"/>
         <source>Ctrl+O</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="476"/>
+        <location filename="../ui/mainwindow.ui" line="422"/>
         <source>&amp;Preferences...</source>
         <translation>&amp;Параметри...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="479"/>
-        <source>Preferences...</source>
-        <translation>Параметри...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="482"/>
+        <location filename="../ui/mainwindow.ui" line="425"/>
         <source>Application preferences</source>
         <translation>Параметри додатку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="494"/>
+        <location filename="../ui/mainwindow.ui" line="437"/>
         <source>&amp;Contents</source>
         <translation>&amp;Зміст</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="497"/>
+        <location filename="../ui/mainwindow.ui" line="440"/>
         <source>Open help contents</source>
         <translation>Відкрити зміст допомоги</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="500"/>
+        <location filename="../ui/mainwindow.ui" line="443"/>
         <source>Ctrl+F1</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="515"/>
+        <location filename="../ui/mainwindow.ui" line="458"/>
         <source>Open context help</source>
         <translation>Відкрити контекстну допомогу</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="518"/>
+        <location filename="../ui/mainwindow.ui" line="461"/>
         <source>F1</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="533"/>
+        <location filename="../ui/mainwindow.ui" line="473"/>
         <source>About application</source>
         <translation>Про додаток</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="542"/>
+        <location filename="../ui/mainwindow.ui" line="482"/>
         <source>E&amp;xit</source>
         <translation>В&amp;ихід</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="545"/>
+        <location filename="../ui/mainwindow.ui" line="485"/>
         <source>Exit application</source>
         <translation>Вийти з додатку</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="550"/>
+        <location filename="../ui/mainwindow.ui" line="490"/>
         <source>&amp;Task...</source>
         <translation>&amp;Умову...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="553"/>
-        <source>Task...</source>
-        <translation>Умову...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="556"/>
-        <location filename="../ui/mainwindow.ui" line="605"/>
+        <location filename="../ui/mainwindow.ui" line="493"/>
+        <location filename="../ui/mainwindow.ui" line="539"/>
         <source>Save task</source>
         <translation>Зберегти умову</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="559"/>
+        <location filename="../ui/mainwindow.ui" line="496"/>
         <source>Save task to file</source>
         <translation>Зберегти умову задачі у файл</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="570"/>
+        <location filename="../ui/mainwindow.ui" line="507"/>
         <source>&amp;Autodetect</source>
         <translation>&amp;Автовизначення</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="608"/>
+        <location filename="../ui/mainwindow.ui" line="542"/>
         <source>Save current task</source>
         <translation>Зберегти поточну умову</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="620"/>
+        <location filename="../ui/mainwindow.ui" line="554"/>
         <source>About &amp;Qt...</source>
         <translation>Про &amp;Qt...</translation>
     </message>
     <message>
-        <location filename="../ui/mainwindow.ui" line="623"/>
-        <source>About Qt...</source>
-        <translation>Про Qt...</translation>
-    </message>
-    <message>
-        <location filename="../ui/mainwindow.ui" line="626"/>
+        <location filename="../ui/mainwindow.ui" line="557"/>
         <source>About Qt library</source>
         <translation>Про бібліотеку Qt</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>Language change</source>
         <translation>Зміна мови</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Unable to load translation language.</source>
         <translation>Неможливо завантажити переклад.</translation>
@@ -540,69 +490,69 @@
     <message>
         <location filename="../ui/mainwindow.ui" line="15"/>
-        <location filename="../src/mainwindow.cpp" line="714"/>
+        <location filename="../src/mainwindow.cpp" line="746"/>
         <source>Travelling Salesman Problem</source>
         <translation>Задача комівояжера</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Unsaved Changes</source>
         <translation>Незбережені зміни</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="139"/>
+        <location filename="../src/mainwindow.cpp" line="126"/>
         <source>All Supported Formats</source>
         <translation>Усі підтримувані формати</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="142"/>
-        <location filename="../src/mainwindow.cpp" line="197"/>
-        <location filename="../src/mainwindow.cpp" line="693"/>
+        <location filename="../src/mainwindow.cpp" line="129"/>
+        <location filename="../src/mainwindow.cpp" line="188"/>
+        <location filename="../src/mainwindow.cpp" line="720"/>
         <source>All Files</source>
         <translation>Усі файли</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="140"/>
-        <location filename="../src/mainwindow.cpp" line="141"/>
+        <location filename="../src/mainwindow.cpp" line="127"/>
+        <location filename="../src/mainwindow.cpp" line="128"/>
         <source>%1 Task Files</source>
         <translation>Файли умов %1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="624"/>
+        <location filename="../src/mainwindow.cpp" line="627"/>
         <source>Language Change</source>
         <translation>Зміна мови</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="635"/>
+        <location filename="../src/mainwindow.cpp" line="637"/>
         <source>Would you like to save changes in current task?</source>
         <translation>Бажаете зберегти зміни у поточній задачі?</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="191"/>
+        <location filename="../src/mainwindow.cpp" line="182"/>
         <source>PDF Files</source>
         <translation>Файлы PDF</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="193"/>
+        <location filename="../src/mainwindow.cpp" line="184"/>
         <source>HTML Files</source>
         <translation>Файли HTML</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="195"/>
+        <location filename="../src/mainwindow.cpp" line="186"/>
         <source>OpenDocument Files</source>
         <translation>Файли OpenDocument</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
         <source>Selected candidate for branching: %1.</source>
         <translation>Обраний кандидат на розгалудження: %1.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="428"/>
-        <location filename="../src/mainwindow.cpp" line="435"/>
+        <location filename="../src/mainwindow.cpp" line="426"/>
+        <location filename="../src/mainwindow.cpp" line="433"/>
         <source>(%1;%2)</source>
         <translation></translation>
     </message>
     <message numerus="yes">
-        <location filename="../src/mainwindow.cpp" line="437"/>
+        <location filename="../src/mainwindow.cpp" line="435"/>
         <source>%n alternate candidate(s) for branching: %1.</source>
         <translation>
@@ -612,21 +562,31 @@
         </translation>
     </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="692"/>
+    <message numerus="yes">
+        <location filename="../src/mainwindow.cpp" line="452"/>
+        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
+        <translation>
+            <numerusform>Вартість - &lt;b&gt;%n&lt;/b&gt; одиниця.</numerusform>
+            <numerusform>Вартість - &lt;b&gt;%n&lt;/b&gt; одиниці.</numerusform>
+            <numerusform>Вартість - &lt;b&gt;%n&lt;/b&gt; одиниць.</numerusform>
+        </translation>
+    </message>
+    <message>
+        <location filename="../src/mainwindow.cpp" line="719"/>
         <source>%1 Task File</source>
         <translation>Файл умови %1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>Settings Changed</source>
         <translation>Параметри змінено</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="144"/>
+        <location filename="../src/mainwindow.cpp" line="132"/>
+        <location filename="../src/mainwindow.cpp" line="134"/>
         <source>Task Load</source>
         <translation>Завантаження умови</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="265"/>
+        <location filename="../src/mainwindow.cpp" line="260"/>
         <source>You have changed color settings.
 Do you wish to apply them to current solution text?</source>
@@ -635,71 +595,67 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="367"/>
+        <location filename="../src/mainwindow.cpp" line="365"/>
         <source>About TSPSG</source>
         <translation>Про TSPSG</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Data error</source>
         <translation>Помилка у даних</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="401"/>
+        <location filename="../src/mainwindow.cpp" line="399"/>
         <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
         <translation>Помилка у комірці  [Рядок %1; Колонка %2]: Невірний формат даних.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="414"/>
+        <location filename="../src/mainwindow.cpp" line="412"/>
         <source>Variant #%1</source>
         <translation>Варіант №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="415"/>
+        <location filename="../src/mainwindow.cpp" line="413"/>
         <source>Task:</source>
         <translation>Умова:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="418"/>
-        <location filename="../src/mainwindow.cpp" line="462"/>
+        <location filename="../src/mainwindow.cpp" line="416"/>
+        <location filename="../src/mainwindow.cpp" line="460"/>
         <source>Solution of Variant #%1 task</source>
         <translation>Розв&apos;язок варіанту №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="424"/>
+        <location filename="../src/mainwindow.cpp" line="422"/>
         <source>Step #%1</source>
         <translation>Крок №%1</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="450"/>
+        <location filename="../src/mainwindow.cpp" line="448"/>
         <source>Optimal path:</source>
         <translation>Оптимальний шлях:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="452"/>
+        <location filename="../src/mainwindow.cpp" line="450"/>
         <source>Resulting path:</source>
         <translation>Знайдений шлях:</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="454"/>
-        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
-        <translation>Вартість - &lt;b&gt;%1&lt;/b&gt; одиниць.</translation>
-    </message>
-    <message>
-        <location filename="../src/mainwindow.cpp" line="457"/>
+        <location filename="../src/mainwindow.cpp" line="455"/>
         <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
         <translation>&lt;b&gt;Увага!!!&lt;/b&gt;&lt;br&gt;Знайдений розв&apos;язок є рекордом, але може бути неоптимальним.&lt;br&gt;Для отримання оптимального розв&apos;зку, або перевірки поточного на оптимальність, потрібно продовжити ітерації.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="700"/>
+        <location filename="../src/mainwindow.cpp" line="728"/>
+        <location filename="../src/mainwindow.cpp" line="730"/>
         <source>Task Save</source>
         <translation>Збереження умови</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="278"/>
+        <location filename="../src/mainwindow.cpp" line="273"/>
         <source>Language will be autodetected on next application start.</source>
         <translation>Мову буде автоматично визначено при наступному запуску додатку.</translation>
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.cpp" line="282"/>
         <source>You have language autodetection turned on.
 It needs to be off.
@@ -710,8 +666,8 @@
     </message>
     <message>
-        <location filename="../src/mainwindow.cpp" line="158"/>
-        <location filename="../src/mainwindow.cpp" line="174"/>
-        <location filename="../src/mainwindow.cpp" line="292"/>
-        <location filename="../src/mainwindow.h" line="96"/>
+        <location filename="../src/mainwindow.cpp" line="149"/>
+        <location filename="../src/mainwindow.cpp" line="165"/>
+        <location filename="../src/mainwindow.cpp" line="287"/>
+        <location filename="../src/mainwindow.h" line="100"/>
         <source>Untitled</source>
         <translation>Без імені</translation>
Index: trunk/src/main.cpp
===================================================================
--- trunk/src/main.cpp	(revision 79)
+++ trunk/src/main.cpp	(revision 80)
@@ -53,4 +53,8 @@
 	qsrand(QDateTime::currentDateTime().toTime_t() ^ QCursor::pos().x() ^ QCursor::pos().y());
 
+QTranslator en;
+	if (en.load("en", PATH_I18N))
+		app.installTranslator(&en);
+
 MainWindow mainwindow;
 	mainwindow.show();
Index: trunk/src/mainwindow.cpp
===================================================================
--- trunk/src/mainwindow.cpp	(revision 79)
+++ trunk/src/mainwindow.cpp	(revision 80)
@@ -34,29 +34,14 @@
 	: QMainWindow(parent)
 {
-	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+	settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", this);
 	loadLanguage();
-	setupUi(this);
-#ifndef Q_OS_WINCE
-QStatusBar *statusbar = new QStatusBar(this);
-	statusbar->setObjectName("statusbar");
-	setStatusBar(statusbar);
-#endif // Q_OS_WINCE
+	setupUi();
+
 	initDocStyleSheet();
-	solutionText->document()->setDefaultFont(settings->value("Output/Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>());
-	solutionText->setTextColor(settings->value("Output/Color",DEF_FONT_COLOR).value<QColor>());
-	solutionText->setWordWrapMode(QTextOption::WordWrap);
-#ifdef Q_OS_WINCE
-	// A little hack for toolbar icons to have a sane size.
-	toolBar->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4));
-#endif
+
 #ifndef QT_NO_PRINTER
 	printer = new QPrinter(QPrinter::HighResolution);
 #endif // QT_NO_PRINTER
-	groupSettingsLanguageList = new QActionGroup(this);
-	actionSettingsLanguageEnglish->setData("en");
-	actionSettingsLanguageEnglish->setActionGroup(groupSettingsLanguageList);
-	loadLangList();
-	spinCities->setMaximum(MAX_NUM_CITIES);
-	actionSettingsLanguageAutodetect->setChecked(settings->value("Language","").toString().isEmpty());
+
 	connect(actionFileNew,SIGNAL(triggered()),this,SLOT(actionFileNewTriggered()));
 	connect(actionFileOpen,SIGNAL(triggered()),this,SLOT(actionFileOpenTriggered()));
@@ -64,4 +49,8 @@
 	connect(actionFileSaveAsTask,SIGNAL(triggered()),this,SLOT(actionFileSaveAsTaskTriggered()));
 	connect(actionFileSaveAsSolution,SIGNAL(triggered()),this,SLOT(actionFileSaveAsSolutionTriggered()));
+#ifndef QT_NO_PRINTER
+	connect(actionFilePrintPreview,SIGNAL(triggered()),this,SLOT(actionFilePrintPreviewTriggered()));
+	connect(actionFilePrint,SIGNAL(triggered()),this,SLOT(actionFilePrintTriggered()));
+#endif // QT_NO_PRINTER
 	connect(actionSettingsPreferences,SIGNAL(triggered()),this,SLOT(actionSettingsPreferencesTriggered()));
 	connect(actionSettingsLanguageAutodetect,SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool)));
@@ -69,17 +58,9 @@
 	connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
 	connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));
-#ifndef QT_NO_PRINTER
-	menuFile->insertAction(actionFileExit,actionFilePrintPreview);
-	menuFile->insertAction(actionFileExit,actionFilePrint);
-	menuFile->insertSeparator(actionFileExit);
-	toolBar->insertAction(actionSettingsPreferences,actionFilePrint);
-	connect(actionFilePrintPreview,SIGNAL(triggered()),this,SLOT(actionFilePrintPreviewTriggered()));
-	connect(actionFilePrint,SIGNAL(triggered()),this,SLOT(actionFilePrintTriggered()));
-#endif // QT_NO_PRINTER
+
 	connect(buttonSolve,SIGNAL(clicked()),this,SLOT(buttonSolveClicked()));
 	connect(buttonRandom,SIGNAL(clicked()),this,SLOT(buttonRandomClicked()));
 	connect(buttonBackToTask,SIGNAL(clicked()),this,SLOT(buttonBackToTaskClicked()));
 	connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));
-	setCentralWidget(tabWidget);
 
 	if (settings->value("SavePos", false).toBool()) {
@@ -100,5 +81,4 @@
 	}
 
-	qsrand(QDateTime().currentDateTime().toTime_t());
 	tspmodel = new CTSPModel(this);
 	taskView->setModel(tspmodel);
@@ -116,4 +96,11 @@
 }
 
+MainWindow::~MainWindow()
+{
+#ifndef QT_NO_PRINTER
+	delete printer;
+#endif
+}
+
 /* Privates **********************************************************/
 
@@ -142,5 +129,9 @@
 	filters.append(trUtf8("All Files") + " (*)");
 
+#ifdef Q_OS_WINCE
+	QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
+#else
 QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"));
+#endif // Q_OS_WINCE
 	if (file.isEmpty() || !QFileInfo(file).isFile())
 		return;
@@ -197,5 +188,9 @@
 	filters.append(trUtf8("All Files") + " (*)");
 
+#ifdef Q_OS_WINCE
+QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
+#else
 QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"));
+#endif
 	if (file.isEmpty())
 		return;
@@ -292,8 +287,10 @@
 bool untitled = (fileName == trUtf8("Untitled") + ".tspt");
 	if (loadLanguage(action->data().toString())) {
+		QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 		settings->setValue("Language",action->data().toString());
-		retranslateUi(this);
+		retranslateUi();
 		if (untitled)
 			setFileName();
+		QApplication::restoreOverrideCursor();
 	}
 }
@@ -348,4 +345,5 @@
 	lblIcon->setPixmap(QPixmap(":/images/tspsg.png").scaledToWidth(logicalDpiX() * 2 / 3, Qt::SmoothTransformation));
 	lblIcon->setAlignment(Qt::AlignTop);
+	lblTitle->setOpenExternalLinks(true);
 	lblTitle->setText(title);
 
@@ -452,5 +450,5 @@
 		output.append("<p>" + trUtf8("Resulting path:") + "</p>");
 	output.append("<p>&nbsp;&nbsp;" + solver.getSortedPath() + "</p>");
-	output.append("<p>" + trUtf8("The price is <b>%1</b> units.").arg(step->price) + "</p>");
+	output.append("<p>" + trUtf8("The price is <b>%n</b> unit(s).", "", step->price) + "</p>");
 	if (!solver.isOptimal()) {
 		output.append("<p>&nbsp;</p>");
@@ -502,4 +500,5 @@
 void MainWindow::spinCitiesValueChanged(int n)
 {
+	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 int count = tspmodel->numCities();
 	tspmodel->setNumCities(n);
@@ -509,4 +508,5 @@
 			taskView->resizeRowToContents(k);
 		}
+	QApplication::restoreOverrideCursor();
 }
 
@@ -596,23 +596,27 @@
 		qApp->removeTranslator(translator);
 		delete translator;
-	}
-	translator = new QTranslator();
-	if ((lng.compare("en") != 0) && !lng.startsWith("en_")) {
-		// Trying to load system Qt library translation...
-		qtTranslator = new QTranslator();
-		if (qtTranslator->load("qt_" + lng,QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+		translator = NULL;
+	}
+
+	if (lng == "en")
+		return true;
+
+	// Trying to load system Qt library translation...
+	qtTranslator = new QTranslator(this);
+	if (qtTranslator->load("qt_" + lng,QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+		qApp->installTranslator(qtTranslator);
+	else {
+		// No luck. Let's try to load a bundled one.
+		if (qtTranslator->load("qt_" + lng,PATH_I18N))
 			qApp->installTranslator(qtTranslator);
 		else {
-			// No luck. Let's try to load a bundled one.
-			if (qtTranslator->load("qt_" + lng,PATH_I18N))
-				qApp->installTranslator(qtTranslator);
-			else {
-				// Qt library translation unavailable
-				delete qtTranslator;
-				qtTranslator = NULL;
-			}
+			// Qt library translation unavailable
+			delete qtTranslator;
+			qtTranslator = NULL;
 		}
 	}
+
 	// Now let's load application translation.
+	translator = new QTranslator(this);
 	if (translator->load(lng,PATH_I18N))
 		qApp->installTranslator(translator);
@@ -620,9 +624,7 @@
 		delete translator;
 		translator = NULL;
-		if ((lng.compare("en") != 0) && !lng.startsWith("en_")) {
-			if (!ad)
-				QMessageBox(QMessageBox::Warning,trUtf8("Language Change"),trUtf8("Unable to load translation language."),QMessageBox::Ok,this).exec();
-			return false;
-		}
+		if (!ad)
+			QMessageBox(QMessageBox::Warning,trUtf8("Language Change"),trUtf8("Unable to load translation language."),QMessageBox::Ok,this).exec();
+		return false;
 	}
 	return true;
@@ -689,4 +691,29 @@
 }
 
+void MainWindow::retranslateUi(bool all)
+{
+	if (all)
+		Ui::MainWindow::retranslateUi(this);
+
+#ifndef QT_NO_PRINTER
+	actionFilePrintPreview->setText(QApplication::translate("MainWindow", "P&rint Preview...", 0, QApplication::UnicodeUTF8));
+#ifndef QT_NO_TOOLTIP
+	actionFilePrintPreview->setToolTip(QApplication::translate("MainWindow", "Preview solution results", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_TOOLTIP
+#ifndef QT_NO_STATUSTIP
+	actionFilePrintPreview->setStatusTip(QApplication::translate("MainWindow", "Preview current solution results before printing", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_STATUSTIP
+
+	actionFilePrint->setText(QApplication::translate("MainWindow", "&Print...", 0, QApplication::UnicodeUTF8));
+#ifndef QT_NO_TOOLTIP
+	actionFilePrint->setToolTip(QApplication::translate("MainWindow", "Print solution", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_TOOLTIP
+#ifndef QT_NO_STATUSTIP
+	actionFilePrint->setStatusTip(QApplication::translate("MainWindow", "Print current solution results", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_STATUSTIP
+	actionFilePrint->setShortcut(QApplication::translate("MainWindow", "Ctrl+P", 0, QApplication::UnicodeUTF8));
+#endif // QT_NO_PRINTER
+}
+
 bool MainWindow::saveTask() {
 QStringList filters(trUtf8("%1 Task File").arg("TSPSG") + " (*.tspt)");
@@ -698,5 +725,10 @@
 		file = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".tspt";
 
+#ifdef Q_OS_WINCE
+	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
+#else
 	file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"));
+#endif // Q_OS_WINCE
+
 	if (file.isEmpty())
 		return false;
@@ -715,4 +747,58 @@
 }
 
+void MainWindow::setupUi()
+{
+	Ui::MainWindow::setupUi(this);
+
+#if QT_VERSION >= 0x040600
+	setToolButtonStyle(Qt::ToolButtonFollowStyle);
+#endif
+
+#ifndef Q_OS_WINCE
+QStatusBar *statusbar = new QStatusBar(this);
+	statusbar->setObjectName("statusbar");
+	setStatusBar(statusbar);
+#endif // Q_OS_WINCE
+
+#ifdef Q_OS_WINCE
+	//! \hack HACK: A little hack for toolbar icons to have a sane size.
+	toolBar->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4));
+#endif
+
+	solutionText->document()->setDefaultFont(settings->value("Output/Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>());
+	solutionText->setTextColor(settings->value("Output/Color",DEF_FONT_COLOR).value<QColor>());
+	solutionText->setWordWrapMode(QTextOption::WordWrap);
+
+#ifndef QT_NO_PRINTER
+	actionFilePrintPreview = new QAction(this);
+	actionFilePrintPreview->setObjectName("actionFilePrintPreview");
+	actionFilePrintPreview->setEnabled(false);
+	actionFilePrintPreview->setIcon(QIcon(":/images/icons/document_preview.png"));
+
+	actionFilePrint = new QAction(this);
+	actionFilePrint->setObjectName("actionFilePrint");
+	actionFilePrint->setEnabled(false);
+	actionFilePrint->setIcon(QIcon(":/images/icons/fileprint.png"));
+
+	menuFile->insertAction(actionFileExit,actionFilePrintPreview);
+	menuFile->insertAction(actionFileExit,actionFilePrint);
+	menuFile->insertSeparator(actionFileExit);
+
+	toolBar->insertAction(actionSettingsPreferences,actionFilePrint);
+#endif // QT_NO_PRINTER
+
+	groupSettingsLanguageList = new QActionGroup(this);
+	actionSettingsLanguageEnglish->setData("en");
+	actionSettingsLanguageEnglish->setActionGroup(groupSettingsLanguageList);
+	loadLangList();
+	actionSettingsLanguageAutodetect->setChecked(settings->value("Language","").toString().isEmpty());
+
+	spinCities->setMaximum(MAX_NUM_CITIES);
+
+	retranslateUi(false);
+
+	setCentralWidget(tabWidget);
+}
+
 void MainWindow::toggleSolutionActions(bool enable)
 {
Index: trunk/src/mainwindow.h
===================================================================
--- trunk/src/mainwindow.h	(revision 79)
+++ trunk/src/mainwindow.h	(revision 80)
@@ -47,4 +47,5 @@
 public:
 	MainWindow(QWidget *parent = 0);
+	~MainWindow();
 
 private slots:
@@ -82,4 +83,6 @@
 #ifndef QT_NO_PRINTER
 	QPrinter *printer;
+	QAction *actionFilePrintPreview;
+	QAction *actionFilePrint;
 #endif // QT_NO_PRINTER
 	QSettings *settings;
@@ -93,6 +96,8 @@
 	void outputMatrix(const TMatrix &matrix, QStringList &output);
 	void outputMatrix(const SStep &step, QStringList &output);
+	void retranslateUi(bool all = true);
 	bool saveTask();
 	void setFileName(const QString &fileName = trUtf8("Untitled") + ".tspt");
+	void setupUi();
 	void toggleSolutionActions(bool enable = true);
 };
Index: trunk/src/settingsdialog.cpp
===================================================================
--- trunk/src/settingsdialog.cpp	(revision 79)
+++ trunk/src/settingsdialog.cpp	(revision 80)
@@ -181,5 +181,7 @@
 	labelHint->setText(labelHint->statusTip());
 #endif // Q_OS_WINCE
-	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+
+	settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", this);
+
 	spinRandMin->setMaximum(MAX_RAND_VALUE);
 	spinRandMin->setValue(settings->value("MinCost",DEF_RAND_MIN).toInt());
Index: trunk/src/tspmodel.cpp
===================================================================
--- trunk/src/tspmodel.cpp	(revision 79)
+++ trunk/src/tspmodel.cpp	(revision 80)
@@ -31,5 +31,5 @@
 	: QAbstractTableModel(parent), nCities(0)
 {
-	settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg");
+	settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", this);
 }
 
@@ -468,4 +468,4 @@
 inline int CTSPModel::rand(int min, int max) const
 {
-	return min + (int)(((float)qrand() / RAND_MAX) * (max - min));
-}
+	return min + (int)floor(((double)qrand() / RAND_MAX) * (max + 1 - min));
+}
Index: trunk/ui/mainwindow.ui
===================================================================
--- trunk/ui/mainwindow.ui	(revision 79)
+++ trunk/ui/mainwindow.ui	(revision 80)
@@ -8,6 +8,6 @@
     <x>0</x>
     <y>0</y>
-    <width>503</width>
-    <height>387</height>
+    <width>297</width>
+    <height>353</height>
    </rect>
   </property>
@@ -272,5 +272,5 @@
      <x>0</x>
      <y>0</y>
-     <width>503</width>
+     <width>297</width>
      <height>21</height>
     </rect>
@@ -364,49 +364,4 @@
    <addaction name="actionFileExit"/>
   </widget>
-  <action name="actionFilePrintPreview">
-   <property name="enabled">
-    <bool>false</bool>
-   </property>
-   <property name="icon">
-    <iconset resource="../resources/tspsg.qrc">
-     <normaloff>:/images/icons/document_preview.png</normaloff>:/images/icons/document_preview.png</iconset>
-   </property>
-   <property name="text">
-    <string>P&amp;rint Preview...</string>
-   </property>
-   <property name="iconText">
-    <string>Print Preview...</string>
-   </property>
-   <property name="toolTip">
-    <string>Preview solution results</string>
-   </property>
-   <property name="statusTip">
-    <string>Preview current solution results before printing</string>
-   </property>
-  </action>
-  <action name="actionFilePrint">
-   <property name="enabled">
-    <bool>false</bool>
-   </property>
-   <property name="icon">
-    <iconset resource="../resources/tspsg.qrc">
-     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
-   </property>
-   <property name="text">
-    <string>&amp;Print...</string>
-   </property>
-   <property name="iconText">
-    <string>Print...</string>
-   </property>
-   <property name="toolTip">
-    <string>Print solution</string>
-   </property>
-   <property name="statusTip">
-    <string>Print current solution results</string>
-   </property>
-   <property name="shortcut">
-    <string>Ctrl+P</string>
-   </property>
-  </action>
   <action name="actionFileSaveAsSolution">
    <property name="enabled">
@@ -416,7 +371,4 @@
     <string>&amp;Solution...</string>
    </property>
-   <property name="iconText">
-    <string>Solution...</string>
-   </property>
    <property name="toolTip">
     <string>Save solution</string>
@@ -434,7 +386,4 @@
     <string>&amp;New</string>
    </property>
-   <property name="iconText">
-    <string>New</string>
-   </property>
    <property name="toolTip">
     <string>New task</string>
@@ -455,7 +404,4 @@
     <string>&amp;Open...</string>
    </property>
-   <property name="iconText">
-    <string>Open...</string>
-   </property>
    <property name="toolTip">
     <string>Open task</string>
@@ -475,7 +421,4 @@
    <property name="text">
     <string>&amp;Preferences...</string>
-   </property>
-   <property name="iconText">
-    <string>Preferences...</string>
    </property>
    <property name="statusTip">
@@ -527,7 +470,4 @@
     <string>&amp;About TSPSG...</string>
    </property>
-   <property name="iconText">
-    <string>About TSPSG...</string>
-   </property>
    <property name="statusTip">
     <string>About application</string>
@@ -549,7 +489,4 @@
    <property name="text">
     <string>&amp;Task...</string>
-   </property>
-   <property name="iconText">
-    <string>Task...</string>
    </property>
    <property name="toolTip">
@@ -599,7 +536,4 @@
     <string>&amp;Save</string>
    </property>
-   <property name="iconText">
-    <string>Save</string>
-   </property>
    <property name="toolTip">
     <string>Save task</string>
@@ -619,7 +553,4 @@
    <property name="text">
     <string>About &amp;Qt...</string>
-   </property>
-   <property name="iconText">
-    <string>About Qt...</string>
    </property>
    <property name="statusTip">
