]> git.lyx.org Git - features.git/commitdiff
Add tab with build information to Help > About LyX
authorScott Kostyshak <skostysh@lyx.org>
Sun, 7 Oct 2012 15:27:07 +0000 (11:27 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Sun, 7 Oct 2012 15:30:58 +0000 (11:30 -0400)
The tab displays the same information as the 'lyx --version' command.

src/frontends/qt4/GuiAbout.cpp
src/frontends/qt4/ui/AboutUi.ui

index fcd0653afd8740951ba19cb51a974a0593e475da..8a75a538f4a775802495ebdb7522ac2985eeebdd 100644 (file)
@@ -132,6 +132,18 @@ static QString version()
        return res;
 }
 
+static QString buildinfo()
+{
+       QString res;
+       QTextStream out(&res);
+       out << "LyX " << lyx_version
+               << " (" << lyx_release_date << ")" << endl;
+       out << "Built on " << __DATE__ << ", " << __TIME__ << endl;
+
+       out << lyx_version_info << endl;
+       return res;
+}
+
 
 struct GuiAbout::Private
 {
@@ -152,6 +164,7 @@ GuiAbout::GuiAbout(GuiView & lv)
        d->ui.copyrightTB->append(disclaimer());
 
        d->ui.versionLA->setText(version());
+       d->ui.buildinfoTB->setText(buildinfo());
        d->ui.creditsTB->setHtml(credits());
 }
 
index 5333a7ffccca4758ea1d608234cce544be133c8f..ed5d153916e4068217b0aa22686987e19ae15ee1 100644 (file)
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="buildinfotab" >
+      <attribute name="title" >
+       <string>Build Info</string>
+      </attribute>
+      <layout class="QGridLayout" >
+       <property name="margin" >
+        <number>9</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item row="0" column="0" >
+        <widget class="QTextBrowser" name="buildinfoTB" />
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
    <item row="1" column="0" >