Fix display of CREDITS info in Help->About dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9794 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-04-08 15:11:47 +00:00
parent 1fc0f73ef5
commit f8b0dc67eb
4 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-04-08 Angus Leeming <leeming@lyx.org>
* QAbout.C (build_dialog): specify that the CREDITS data is
encoded in ISO-8859-1 (latin1).
2005-03-18 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* ui/QPrefLatexModule.ui: fix layout

View File

@ -24,6 +24,7 @@
#include <qlabel.h>
#include <qpushbutton.h>
#include <qtextcodec.h>
#include <qtextview.h>
using lyx::support::prefixIs;
@ -104,7 +105,16 @@ void QAbout::build_dialog()
}
#endif
dialog_->creditsTV->setText(toqstr(out.str()));
// Try and grab the latin1 codec
QTextCodec * const codec =
QTextCodec::codecForName("ISO8859-1");
if (!codec)
lyxerr << "Unable to find ISO8859-1 codec" << std::endl;
QString const qtext = codec ?
codec->toUnicode(out.str().c_str()) :
toqstr(out.str());
dialog_->creditsTV->setText(qtext);
// try to resize to a good size
dialog_->copyright->hide();

View File

@ -1,3 +1,8 @@
2005-04-08 Angus Leeming <leeming@lyx.org>
* FormAboutlyx.C (build): ensure that the CREDITS data fits on the
browser.
2005-03-02 Angus Leeming <leeming@lyx.org>
* forms/form_filedialog.fd: do Lars' dirty work for him and remove

View File

@ -65,7 +65,10 @@ void FormAboutlyx::build()
ostringstream crs;
controller().getCredits(crs);
fl_add_browser_line(credits_->browser_credits, crs.str().c_str());
std::string const credits_text =
formatted(crs.str().c_str(),
credits_->browser_credits->w - 15);
fl_add_browser_line(credits_->browser_credits, credits_text.c_str());
// create license tab
license_.reset(build_aboutlyx_license(this));