]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormNote.C
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / FormNote.C
index c54b48a0a71b9936866d27628a73e0dc66c38ade..3db5352fc54f1fc1c2810f82ee893b2b9fc510ee 100644 (file)
@@ -22,6 +22,9 @@
 #include "lyx_forms.h"
 
 
+using std::string;
+
+
 typedef FormController<ControlNote, FormView<FD_note> > base_class;
 
 FormNote::FormNote(Dialog & parent)
@@ -35,7 +38,7 @@ void FormNote::build()
 
        note_gui_tokens(ids_, gui_names_);
 
-       for (int i = 0; i < 3; ++i) {
+       for (string::size_type i = 0; i < gui_names_.size(); ++i) {
                fl_addto_choice(dialog_->choice_type, gui_names_[i].c_str());
        }
 
@@ -53,7 +56,7 @@ void FormNote::build()
 void FormNote::update()
 {
        string type(controller().params().type);
-       for (int i = 0; i < 3; ++i) {
+       for (string::size_type i = 0; i < gui_names_.size(); ++i) {
                if (type == ids_[i])
                        fl_set_choice_text(dialog_->choice_type, gui_names_[i].c_str());
                }
@@ -65,4 +68,3 @@ void FormNote::apply()
        int i = fl_get_choice(dialog_->choice_type);
        controller().params().type = ids_[i - 1];
 }
-