From: Vincent van Ravesteijn Date: Sat, 18 Apr 2009 18:53:39 +0000 (+0000) Subject: Add context menus to the toc for child-documents, listings and indices. X-Git-Tag: 2.0.0~6799 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ee4e7db35e6ae898cc4892e9512a24b271be18a9;p=features.git 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 --- diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index 5eb179b472..640dcc4c92 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -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 # diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index f44283ef80..dd5cc5a888 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -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();