]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormRef.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormRef.C
index 6cd04355a86e837f3d2fef9f048ba825e1ee9a37..0fe2db21726f9dfe1561e9710d7335090b200906 100644 (file)
@@ -5,33 +5,38 @@
  *
  * \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 <algorithm>
 
-
-#include "xformsBC.h"
-#include "ControlRef.h"
 #include "FormRef.h"
-#include "Tooltips.h"
+#include "ControlRef.h"
 #include "forms/form_ref.h"
+
+#include "Tooltips.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
+
 #include "insets/insetref.h"
-#include "helper_funcs.h" // getStringFromVector
-#include "support/lstrings.h" // frontStrip, strip
-#include FORMS_H_LOCATION
+
+#include "support/lstrings.h" // trim
+
+#include "lyx_forms.h"
+
+using lyx::support::getStringFromVector;
 
 using std::find;
 using std::max;
 using std::sort;
+using std::string;
 using std::vector;
 
+
 typedef FormController<ControlRef, FormView<FD_ref> > base_class;
 
 FormRef::FormRef(Dialog & parent)
-       : base_class(parent, _("Reference")),
+       : base_class(parent, _("Cross-reference")),
          at_ref_(false)
 {}
 
@@ -42,7 +47,7 @@ void FormRef::build()
 
        for (int i = 0; !InsetRef::types[i].latex_name.empty(); ++i)
                fl_addto_choice(dialog_->choice_format,
-                               _(InsetRef::types[i].gui_name.c_str()));
+                               _(InsetRef::types[i].gui_name).c_str());
 
        // Force the user to use the browser to change refs.
        fl_deactivate_object(dialog_->input_ref);
@@ -175,7 +180,7 @@ void FormRef::updateBrowser(vector<string> const & akeys) const
 
        if (keys.empty()) {
                fl_add_browser_line(dialog_->browser_refs,
-                                   _("*** No labels found in document ***"));
+                                   _("*** No labels found in document ***").c_str());
 
                setEnabled(dialog_->browser_refs, false);
                setEnabled(dialog_->check_sort,   false);
@@ -273,11 +278,11 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
 void FormRef::switch_go_button()
 {
        if (at_ref_) {
-               fl_set_object_label(dialog_->button_go, _("Go back"));
-               tooltips().init(dialog_->button_go, _("Go back to original place."));
+               fl_set_object_label(dialog_->button_go, _("Go back").c_str());
+               tooltips().init(dialog_->button_go, _("Go back to original place.").c_str());
        } else {
-               fl_set_object_label(dialog_->button_go, _("Go to"));
-               tooltips().init(dialog_->button_go, _("Go to selected reference."));
+               fl_set_object_label(dialog_->button_go, _("Go to").c_str());
+               tooltips().init(dialog_->button_go, _("Go to selected reference.").c_str());
        }
        fl_set_button_shortcut(dialog_->button_go, "#G", 1);
        fl_show_object(dialog_->button_go);