mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Use 'assign' as the name for the operation that opens/closes branch
insets according to selection git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8616 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dcd66fa802
commit
9b35643f8e
@ -1,3 +1,8 @@
|
||||
2004-04-07 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* ControlDocument.C: 'assign' for opening/closing branch insets
|
||||
according to selection
|
||||
|
||||
2004-04-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ButtonPolicies.C (printState, printInput): human-readable output
|
||||
|
@ -115,7 +115,7 @@ void ControlDocument::dispatchParams()
|
||||
}
|
||||
|
||||
// Open insets of selected branches, close deselected ones
|
||||
kernel().dispatch(FuncRequest(LFUN_ALL_INSETS_TOGGLE, "toggle branch"));
|
||||
kernel().dispatch(FuncRequest(LFUN_ALL_INSETS_TOGGLE, "assign branch"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-04-07 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* insetcollapsable.C:
|
||||
* insetbranch.C: 'assign' to open/close branch inset according to
|
||||
selection; also print content on closed branch button
|
||||
|
||||
2004-04-06 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* ExternalSupport.C (doSubstitution): add new variables $$AbsPath,
|
||||
|
@ -94,7 +94,8 @@ void InsetBranch::setButtonLabel()
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
|
||||
setLabel("Branch: " + params_.branch);
|
||||
string s = "Branch: " + params_.branch;
|
||||
setLabel(isOpen() ? s : getNewLabel(s) );
|
||||
font.setColor(LColor::foreground);
|
||||
if (!params_.branch.empty())
|
||||
setBackgroundColor(lcolor.getFromLyXName(params_.branch));
|
||||
@ -150,9 +151,15 @@ void InsetBranch::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
else if (cmd.argument == "close") {
|
||||
setStatus(Collapsed);
|
||||
leaveInset(cur, *this);
|
||||
} else if (cmd.argument == "toggle") {
|
||||
if (isOpen()) {
|
||||
setStatus(Collapsed);
|
||||
leaveInset(cur, *this);
|
||||
} else
|
||||
setStatus(Open);
|
||||
|
||||
// The branch inset specialises its behaviour on "toggle".
|
||||
} else if (cmd.argument == "toggle"
|
||||
// The branch inset uses "assign".
|
||||
} else if (cmd.argument == "assign"
|
||||
|| cmd.argument.empty()) {
|
||||
BranchList const & branchlist =
|
||||
cur.bv().buffer()->params().branchlist();
|
||||
|
@ -323,7 +323,8 @@ void InsetCollapsable::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
leaveInset(cur, *this);
|
||||
} else
|
||||
setStatus(Open);
|
||||
}
|
||||
} else // if assign or anything else
|
||||
cur.undispatched();
|
||||
cur.dispatched();
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user