* The program version is now propagated to the program; and it now ends up

showed in the About dialog.
This commit is contained in:
Konstantin Isakov 2009-04-12 22:02:15 +00:00
parent 14ed53ac65
commit 61888beb2b
4 changed files with 41 additions and 11 deletions

View file

@ -38,14 +38,31 @@
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QLabel" name="label"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="text"> <property name="spacing">
<string>GoldenDict dictionary lookup program, version 0.7</string> <number>0</number>
</property> </property>
<property name="alignment"> <item>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <widget class="QLabel" name="label">
</property> <property name="text">
</widget> <string>GoldenDict dictionary lookup program, version </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="version">
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string>#.#</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">

View file

@ -43,6 +43,8 @@ unix {
INSTALLS += target locale INSTALLS += target locale
} }
DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\"
# Input # Input
HEADERS += folding.hh \ HEADERS += folding.hh \
inc_case_folding.hh \ inc_case_folding.hh \

View file

@ -19,17 +19,26 @@
<translation>О программе</translation> <translation>О программе</translation>
</message> </message>
<message> <message>
<location filename="../about.ui" line="43"/>
<source>GoldenDict dictionary lookup program, version 0.7</source> <source>GoldenDict dictionary lookup program, version 0.7</source>
<translation>Словарь GoldenDict, версия 0.7</translation> <translation type="obsolete">Словарь GoldenDict, версия 0.7</translation>
</message> </message>
<message> <message>
<location filename="../about.ui" line="53"/> <location filename="../about.ui" line="48"/>
<source>GoldenDict dictionary lookup program, version </source>
<translation>Словарь GoldenDict, версия </translation>
</message>
<message>
<location filename="../about.ui" line="61"/>
<source>#.#</source>
<translation>#.#</translation>
</message>
<message>
<location filename="../about.ui" line="70"/>
<source>(c) 2008-2009 Konstantin Isakov (ikm@users.berlios.de)</source> <source>(c) 2008-2009 Konstantin Isakov (ikm@users.berlios.de)</source>
<translation>© Константин Исаков (ikm@users.berlios.de), 2008-2009</translation> <translation>© Константин Исаков (ikm@users.berlios.de), 2008-2009</translation>
</message> </message>
<message> <message>
<location filename="../about.ui" line="63"/> <location filename="../about.ui" line="80"/>
<source>Licensed under GNU GPLv3 or later</source> <source>Licensed under GNU GPLv3 or later</source>
<translation>Лицензия: GNU GPLv3 или более поздняя версия</translation> <translation>Лицензия: GNU GPLv3 или более поздняя версия</translation>
</message> </message>

View file

@ -1138,6 +1138,8 @@ void MainWindow::showAbout()
ui.setupUi( &about ); ui.setupUi( &about );
ui.version->setText( PROGRAM_VERSION );
about.show(); about.show();
about.exec(); about.exec();
} }