* 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>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>GoldenDict dictionary lookup program, version 0.7</string>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
<item>
<widget class="QLabel" name="label">
<property name="text">
<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>
<widget class="QLabel" name="label_2">

View file

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

View file

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

View file

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