]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormToc.C
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / FormToc.C
index c62488ac2917507676daa0fa10eb454d228a82b6..a14c5f5ea06cb5dd6ae862c4571678dbf651e71d 100644 (file)
@@ -1,30 +1,30 @@
 /**
- * \file xforms/FormToc.C
+ * \file FormToc.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "FormToc.h"
-#include "xformsBC.h"
-#include "xforms_helpers.h"
 #include "ControlToc.h"
 #include "forms/form_toc.h"
+
+#include "xforms_helpers.h"
+#include "xformsBC.h"
+
 #include "support/lstrings.h" // frontStrip, strip
-#include "debug.h"
-#include "gettext.h"
-#include FORMS_H_LOCATION
 
-#include <vector>
+#include "lyx_forms.h"
+
+using lyx::support::getStringFromVector;
 
 using std::vector;
-using std::endl;
+using std::string;
 
 
 typedef FormController<ControlToc, FormView<FD_toc> > base_class;
@@ -46,7 +46,7 @@ void FormToc::build()
        fl_addto_choice(dialog_->choice_toc_type, choice.c_str());
 
        // Manage the cancel/close button
-       bc().setCancel(dialog_->button_close);
+       bcview().setCancel(dialog_->button_close);
 }
 
 
@@ -86,7 +86,7 @@ void FormToc::updateType()
        fl_addto_choice(dialog_->choice_toc_type, choice.c_str());
 
        // And select the correct one
-       string const type = toc::getType(controller().params().getCmdName());
+       string const type = lyx::toc::getType(controller().params().getCmdName());
        fl_set_choice_text(dialog_->choice_toc_type, type.c_str());
 }
 
@@ -97,12 +97,12 @@ void FormToc::updateContents()
        if (type.empty()) {
                fl_clear_browser(dialog_->browser_toc);
                fl_add_browser_line(dialog_->browser_toc,
-                                   _("*** No Lists ***"));
+                                   _("*** No Lists ***").c_str());
                setEnabled(dialog_->browser_toc, false);
                return;
        }
 
-       toc::Toc const contents = controller().getContents(type);
+       lyx::toc::Toc const contents = controller().getContents(type);
 
        // Check if all elements are the same.
        if (toc_ == contents) {
@@ -115,7 +115,7 @@ void FormToc::updateContents()
        if (contents.empty()) {
                fl_clear_browser(dialog_->browser_toc);
                fl_add_browser_line(dialog_->browser_toc,
-                                   _("*** No Lists ***"));
+                                   _("*** No Lists ***").c_str());
                setEnabled(dialog_->browser_toc, false);
                return;
        }
@@ -127,8 +127,8 @@ void FormToc::updateContents()
        fl_clear_browser(dialog_->browser_toc);
        setEnabled(dialog_->browser_toc, true);
 
-       toc::Toc::const_iterator cit = contents.begin();
-       toc::Toc::const_iterator end = contents.end();
+       lyx::toc::Toc::const_iterator cit = contents.begin();
+       lyx::toc::Toc::const_iterator end = contents.end();
        for (; cit != end; ++cit) {
                fl_add_browser_line(dialog_->browser_toc,
                                    cit->asString().c_str());