]> git.lyx.org Git - features.git/commitdiff
update for frnt::etc
authorJohn Levon <levon@movementarian.org>
Tue, 30 Apr 2002 00:26:16 +0000 (00:26 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 30 Apr 2002 00:26:16 +0000 (00:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4092 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QCharacter.h

index 9bbbf9b0b8249e41b395e20e549ecc4e9a57d27d..3527a2ac6c23e753d0104b42eb792a436c1aa952 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-30  John Levon  <moz@compsoc.man.ac.uk>
+
+       * QCharacter.h:
+       * QCharacter.C: update for language i18n change
 2002-04-16  John Levon  <moz@compsoc.man.ac.uk>
 
        * Dialogs.C: add tooltipsEnabled()
index 31b08aaad0f0df46ab6c4a6e3e16a4941d761538..4ec2e14b578edf54f648cc4b28af90fc3bb57d41 100644 (file)
@@ -22,7 +22,7 @@
 #include <qcheckbox.h>
 #include <qpushbutton.h>
 
-using namespace character;
+using namespace frnt;
 using std::vector;
 
 typedef Qt2CB<ControlCharacter, Qt2DB<QCharacterDialog> > base_class;
@@ -69,9 +69,9 @@ void QCharacter::build_dialog()
                cit != color.end(); ++cit) {
                dialog_->colorCO->insertItem(cit->first.c_str(), -1);
        }
-       for (vector<string>::const_iterator cit = language.begin();
+       for (vector<LanguagePair>::const_iterator cit = language.begin();
                cit != language.end(); ++cit) {
-               dialog_->langCO->insertItem(cit->c_str(), -1);
+               dialog_->langCO->insertItem(cit->first.c_str(), -1);
        }
 
        bc().setOK(dialog_->okPB);
@@ -113,18 +113,9 @@ void QCharacter::update_contents()
        dialog_->sizeCO->setCurrentItem(findPos2nd(size, controller().getSize()));
        dialog_->miscCO->setCurrentItem(findPos2nd(bar, controller().getBar()));
        dialog_->colorCO->setCurrentItem(findPos2nd(color, controller().getColor()));
+       dialog_->langCO->setCurrentItem(findPos2nd(language, controller().getLanguage()));
 
        dialog_->toggleallCB->setChecked(controller().getToggleAll());
-
-       string const thelanguage(controller().getLanguage());
-       int i = 0;
-       for (vector<string>::const_iterator cit = language.begin();
-               cit != language.end(); ++i, ++cit) {
-               if (*cit == thelanguage) {
-                       dialog_->langCO->setCurrentItem(i);
-                       break;
-               }
-       }
 }
 
 
@@ -136,8 +127,7 @@ void QCharacter::apply()
        controller().setSize(size[dialog_->sizeCO->currentItem()].second);
        controller().setBar(bar[dialog_->miscCO->currentItem()].second);
        controller().setColor(color[dialog_->colorCO->currentItem()].second);
-
-       controller().setLanguage(dialog_->langCO->currentText().latin1());
+       controller().setLanguage(language[dialog_->langCO->currentItem()].second);
 
        controller().setToggleAll(dialog_->toggleallCB->isChecked());
 }
index 523a3bc5d2c819a683ee7f0a34af669b5e700528..39f469d21d1c160c729e69cf7c01792e3a42f554 100644 (file)
@@ -17,6 +17,7 @@
 #include "LString.h"
 #include "Qt2Base.h"
 #include "controllers/character.h"
+#include "controllers/frnt_lang.h"
 
 
 class ControlCharacter;
@@ -38,13 +39,13 @@ private:
        /// build the dialog
        virtual void build_dialog();
 
-       std::vector<character::FamilyPair> family;
-       std::vector<character::SeriesPair> series;
-       std::vector<character::ShapePair>  shape;
-       std::vector<character::SizePair>   size;
-       std::vector<character::BarPair>    bar;
-       std::vector<character::ColorPair>  color;
-       std::vector<string> language;
+       std::vector<frnt::FamilyPair> family;
+       std::vector<frnt::SeriesPair> series;
+       std::vector<frnt::ShapePair>  shape;
+       std::vector<frnt::SizePair>   size;
+       std::vector<frnt::BarPair>    bar;
+       std::vector<frnt::ColorPair>  color;
+       std::vector<frnt::LanguagePair> language;
 };
 
 #endif // QCHARACTER_H