Add context menus to the toc for child-documents, listings and indices.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29319 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-04-18 18:53:39 +00:00
parent b6ce46fb94
commit ee4e7db35e
2 changed files with 38 additions and 3 deletions

View File

@ -461,6 +461,14 @@ Menuset
Item "Settings...|S" "inset-settings"
End
#
# Toc Listings context menu
#
Menu "context-toc-listing"
Item "Settings...|S" "inset-settings"
End
#
# Toc Tables context menu
#
@ -469,6 +477,29 @@ Menuset
Item "Settings...|S" "inset-settings"
End
#
# Toc Childs context menu
#
Menu "context-toc-child"
Item "Include|c" "inset-modify changetype include"
Item "Input|p" "inset-modify changetype input"
Item "Verbatim|V" "inset-modify changetype verbatiminput"
Item "Verbatim (marked blanks)|b" "inset-modify changetype verbatiminput*"
Item "Listing|L" "inset-modify changetype lstinputlisting"
Separator
Item "Settings...|S" "inset-settings"
Separator
Item "Edit included file...|E" "inset-edit"
End
#
# Toc Indicis context menu
#
Menu "context-toc-index"
OptItem "Settings...|S" "inset-settings"
End
#
# Index context menu
#

View File

@ -106,13 +106,17 @@ Inset * TocWidget::itemInset() const
Inset * inset = 0;
if (current_type_ == "label"
|| current_type_ == "graphics"
|| current_type_ == "citation")
|| current_type_ == "citation"
|| current_type_ == "child")
inset = dit.nextInset();
else if (current_type_ == "branch")
else if (current_type_ == "branch"
|| current_type_ == "index")
inset = &dit.inset();
else if (current_type_ == "table" || current_type_ == "figure") {
else if (current_type_ == "table"
|| current_type_ == "listing"
|| current_type_ == "figure") {
DocIterator tmp_dit(dit);
tmp_dit.pop_back();
inset = &tmp_dit.inset();