#include "xforms_helpers.h"
#include "xformsBC.h"
+#include "bufferparams.h"
+
#include "support/lstrings.h"
#include "lyx_forms.h"
-using lyx::support::getStringFromVector;
-using lyx::support::getVectorFromString;
-using lyx::support::trim;
-
using std::find;
using std::max;
using std::string;
+namespace lyx {
+
+using support::getStringFromVector;
+using support::getVectorFromString;
+using support::trim;
+
+namespace frontend {
+
namespace {
// shamelessly stolen from Menubar_pimpl.C
// Find the style of the citekeys
vector<biblio::CiteStyle> const & styles =
ControlCitation::getCiteStyles();
- biblio::CitationStyle cs = biblio::getCitationStyle(command);
+ biblio::CitationStyle const cs(command);
vector<biblio::CiteStyle>::const_iterator cit =
find(styles.begin(), styles.end(), cs.style);
bool const force =
fl_get_button(dialog_->check_force_uppercase);
- command = biblio::getCiteCommand(styles[choice], full, force);
+ command =
+ biblio::CitationStyle(styles[choice], full, force)
+ .asLatexStr();
+
}
controller().params().setCmdName(command);
fl_set_choice(dialog_->choice_style, choice);
}
+ // Invalid if no citation has been chosen
+ if (fl_get_browser_maxline(dialog_->browser_cite) < 1)
+ activate = ButtonPolicy::SMI_INVALID;
+
return activate;
}
setEnabled(dialog_->button_up, activate_up);
setEnabled(dialog_->button_down, activate_down);
}
+
+} // namespace frontend
+} // namespace lyx