]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiAbout.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiAbout.cpp
index 4f3fd301f684a863b7b6959d543b31aa86ab943d..747723ff0680bcab06f168997b41e72358697d53 100644 (file)
@@ -49,14 +49,12 @@ static QString credits()
 
        if (!file.exists()) {
                out << qt_("ERROR: LyX wasn't able to find the CREDITS file\n");
-               out << qt_("Please install correctly to estimate the great\n");
-               out << qt_("amount of work other people have done for the LyX project.");
+               out << qt_("Please install correctly to estimate the great\namount of work other people have done for the LyX project.");
        } else {
                file.open(QIODevice::ReadOnly);
                if (!file.isReadable()) {
                        out << qt_("ERROR: LyX wasn't able to read the CREDITS file\n");
-                       out << qt_("Please install correctly to estimate the great\n");
-                       out << qt_("amount of work other people have done for the LyX project.");
+                       out << qt_("Please install correctly to estimate the great\namount of work other people have done for the LyX project.");
                } else {
                        QTextStream ts(&file);
                        ts.setCodec("UTF-8");
@@ -91,14 +89,12 @@ static QString release_notes()
 
        if (!file.exists()) {
                out << qt_("ERROR: LyX wasn't able to find the RELEASE-NOTES file\n");
-               out << qt_("Please install correctly to see what has changed\n");
-               out << qt_("for this version of LyX.");
+               out << qt_("Please install correctly to see what has changed\nfor this version of LyX.");
        } else {
                file.open(QIODevice::ReadOnly);
                if (!file.isReadable()) {
                        out << qt_("ERROR: LyX wasn't able to read the RELEASE-NOTES file\n");
-                       out << qt_("Please install correctly to see what has changed\n");
-                       out << qt_("for this version of LyX.");
+                       out << qt_("Please install correctly to see what has changed\nfor this version of LyX.");
                } else {
                        QTextStream ts(&file);
                        ts.setCodec("UTF-8");
@@ -121,6 +117,11 @@ static QString release_notes()
                                        continue;
                                } if (incomment)
                                        continue;
+
+                               // detect links to the tracker
+                               line.replace(QRegExp("(bug )(\\#)(\\d+)*"),
+                                            "<a href=\"http://www.lyx.org/trac/ticket/\\3\">\\1\\3</a>");
+
                                // headings
                                if (line.startsWith("!!!")) {
                                        if (inlist) {
@@ -223,11 +224,9 @@ static QString version()
        out << "\n";
        out << qt_("User directory: ");
        out << toqstr(makeDisplayPath(package().user_support().absFileName()));
-       if (std::string(lyx_git_commit_hash) != "none") {
-               out << "\n";
-               out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion()))) << "\n";
-               out << toqstr(bformat(_("Qt Version (compile-time): %1$s"), from_ascii(QT_VERSION_STR))) << "\n";
-       }
+       out << "\n";
+       out << toqstr(bformat(_("Qt Version (run-time): %1$s"), from_ascii(qVersion()))) << "\n";
+       out << toqstr(bformat(_("Qt Version (compile-time): %1$s"), from_ascii(QT_VERSION_STR))) << "\n";
        return res;
 }
 
@@ -267,11 +266,14 @@ GuiAbout::GuiAbout(GuiView & lv)
        d->ui.versionLA->setText(version());
        d->ui.buildinfoTB->setText(buildinfo());
        d->ui.releasenotesTB->setHtml(release_notes());
+       d->ui.releasenotesTB->setOpenExternalLinks(true);
        d->ui.creditsTB->setHtml(credits());
+
+       d->ui.tab->setUsesScrollButtons(false);
 }
 
 
-void GuiAbout::on_closePB_clicked()
+void GuiAbout::on_buttonBox_rejected()
 {
        close();
 }