BranchList:

*FilenameSuffix -> *FileNameSuffix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34244 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-04-21 01:19:35 +00:00
parent 88635c7e77
commit e5ce07206c
5 changed files with 13 additions and 13 deletions

View File

@ -78,13 +78,13 @@ bool Branch::setSelected(bool b)
}
bool Branch::hasFilenameSuffix() const
bool Branch::hasFileNameSuffix() const
{
return filenameSuffix_;
}
void Branch::setFilenameSuffix(bool b)
void Branch::setFileNameSuffix(bool b)
{
filenameSuffix_ = b;
}
@ -148,7 +148,7 @@ bool BranchList::add(docstring const & s)
Branch br;
br.setBranch(name);
br.setSelected(false);
br.setFilenameSuffix(false);
br.setFileNameSuffix(false);
list.push_back(br);
}
if (j == docstring::npos)
@ -188,12 +188,12 @@ bool BranchList::rename(docstring const & oldname,
}
docstring BranchList::getFilenameSuffix() const
docstring BranchList::getFileNameSuffix() const
{
docstring result;
List::const_iterator it = list.begin();
for (; it != list.end(); ++it) {
if (it->isSelected() && it->hasFilenameSuffix())
if (it->isSelected() && it->hasFileNameSuffix())
result += "-" + it->branch();
}
return support::subst(result, from_ascii("/"), from_ascii("_"));

View File

@ -56,9 +56,9 @@ public:
/** If true, the branch name will be appended
* to the output file name.
*/
bool hasFilenameSuffix() const;
bool hasFileNameSuffix() const;
/// Select/deselect filename suffix property.
void setFilenameSuffix(bool);
void setFileNameSuffix(bool);
///
RGBColor const & color() const;
///
@ -120,7 +120,7 @@ public:
*/
bool rename(docstring const &, docstring const &, bool const merge = false);
/// get the complete filename suffix
docstring getFilenameSuffix() const;
docstring getFileNameSuffix() const;
private:
///

View File

@ -553,7 +553,7 @@ string Buffer::latexName(bool const no_path) const
FileName Buffer::Impl::exportFileName() const
{
docstring const branch_suffix =
params.branchlist().getFilenameSuffix();
params.branchlist().getFileNameSuffix();
if (branch_suffix.empty())
return filename;

View File

@ -671,7 +671,7 @@ string BufferParams::readToken(Lexer & lex, string const & token,
if (tok == "\\filename_suffix") {
lex.next();
if (branch_ptr)
branch_ptr->setFilenameSuffix(lex.getInteger());
branch_ptr->setFileNameSuffix(lex.getInteger());
}
if (tok == "\\color") {
lex.eatLine();
@ -945,7 +945,7 @@ void BufferParams::writeFile(ostream & os) const
for (; it != end; ++it) {
os << "\\branch " << to_utf8(it->branch())
<< "\n\\selected " << it->isSelected()
<< "\n\\filename_suffix " << it->hasFilenameSuffix()
<< "\n\\filename_suffix " << it->hasFileNameSuffix()
<< "\n\\color " << lyx::X11hexname(it->color())
<< "\n\\end_branch"
<< "\n";

View File

@ -104,7 +104,7 @@ void GuiBranches::updateView()
coloritem.fill(itemcolor);
newItem->setIcon(2, QIcon(coloritem));
}
newItem->setText(3, it->hasFilenameSuffix() ? qt_("Yes") : qt_("No"));
newItem->setText(3, it->hasFileNameSuffix() ? qt_("Yes") : qt_("No"));
// restore selected branch
if (bname == sel_branch) {
branchesTW->setCurrentItem(newItem);
@ -287,7 +287,7 @@ void GuiBranches::toggleSuffix(QTreeWidgetItem * item)
Branch * branch = branchlist_.find(qstring_to_ucs4(sel_branch));
if (branch) {
branch->setFilenameSuffix(!branch->hasFilenameSuffix());
branch->setFileNameSuffix(!branch->hasFileNameSuffix());
newBranchLE->clear();
updateView();
}