On Tue, Oct 2, 2012 at 5:42 AM, Scott Kostyshak <skost...@lyx.org> wrote:
> On Mon, Oct 1, 2012 at 4:06 AM, Jean-Marc Lasgouttes <lasgout...@lyx.org> 
> wrote:
>> Le 01/10/2012 08:45, Scott Kostyshak a écrit :
>>
>>> This might encourage users to post this information when reporting bugs
>>> and sometimes it's useful to be able to copy the paths of the Library
>>> and User directories.
>>>
>>> Comments?
>>
>>
>> Looks good.
>
> OK I applied this to trunk.
>
>> If you are playing with this ui file, it would be nice to have
>> also the information contained in lyx_version_info (version.h) available in
>> another tab. This is what one can get using "lyx -version".
>
> Sure, I will have a look at this.

A patch is attached. Is this what you had in mind?

Do you have a good name for the new tab? Here are a few ideas:
Diagnostics
Extended Info
Build Info

Where do you want the tab placed? Currently it is at the end.

Note that when built with CMake the --version command does not give much output:
LyX 2.1.0dev (2011-04-29)
Built on Oct  3 2012, 05:31:04
CMake Build

Thanks,

Scott
From 8763e024a2e261587e0ebb2d8d464d25b8c79de4 Mon Sep 17 00:00:00 2001
From: Scott Kostyshak <skost...@lyx.org>
Date: Wed, 3 Oct 2012 05:21:44 -0400
Subject: [PATCH] Add tab with build information to Help > About LyX

The tab displays the same information as the 'lyx --version' command.
---
 src/frontends/qt4/GuiAbout.cpp  |   14 ++++++++++++++
 src/frontends/qt4/ui/AboutUi.ui |   16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/src/frontends/qt4/GuiAbout.cpp b/src/frontends/qt4/GuiAbout.cpp
index fcd0653..d4070af 100644
--- a/src/frontends/qt4/GuiAbout.cpp
+++ b/src/frontends/qt4/GuiAbout.cpp
@@ -132,6 +132,19 @@ static QString version()
        return res;
 }
 
+// provide everything from the version tab and more.
+static QString diagnostics()
+{
+       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 +165,7 @@ GuiAbout::GuiAbout(GuiView & lv)
        d->ui.copyrightTB->append(disclaimer());
 
        d->ui.versionLA->setText(version());
+       d->ui.diagnosticsTB->setText(diagnostics());
        d->ui.creditsTB->setHtml(credits());
 }
 
diff --git a/src/frontends/qt4/ui/AboutUi.ui b/src/frontends/qt4/ui/AboutUi.ui
index 5333a7f..c36eb55 100644
--- a/src/frontends/qt4/ui/AboutUi.ui
+++ b/src/frontends/qt4/ui/AboutUi.ui
@@ -94,6 +94,22 @@
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="diagnosticstab" >
+      <attribute name="title" >
+       <string>Diagnostics</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="diagnosticsTB" />
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
    <item row="1" column="0" >
-- 
1.7.9.5

Reply via email to