]> git.lyx.org Git - features.git/commitdiff
Fix display of CREDITS info in Help->About dialog.
authorAngus Leeming <leeming@lyx.org>
Fri, 8 Apr 2005 15:11:47 +0000 (15:11 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 8 Apr 2005 15:11:47 +0000 (15:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9794 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QAbout.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormAboutlyx.C

index f33dc6b9e84a36102263cff34a9211583cc56118..8ab07cdccbdfb5f9a100c5f3b8a827278cd823d4 100644 (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
index fe9c83febdd46bb5a834c171fea5db34e87e55e3..50588c1bb7272d439f037bb1088bd2f074f7e950 100644 (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();
index 9637392ba0fa8a109931a63294fce4ca8abbdba8..ec35d0b4985bdefbae0efc555dc00da081396f7e 100644 (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
index 2d39c6a0b58e75f6dce77901086f239f3bdca16e..a3891ab446c2f3f02689457c1ccd1e15d33aedb8 100644 (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));