]> git.lyx.org Git - features.git/commitdiff
Add context menus to the toc for child-documents, listings and indices.
authorVincent van Ravesteijn <vfr@lyx.org>
Sat, 18 Apr 2009 18:53:39 +0000 (18:53 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sat, 18 Apr 2009 18:53:39 +0000 (18:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29319 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/stdcontext.inc
src/frontends/qt4/TocWidget.cpp

index 5eb179b472453449b814537c6caa8a3002efbca2..640dcc4c92a51482d07b634336b9dfc666b4ab75 100644 (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
 #
index f44283ef8016f57cefb0630632d5ca24085a0472..dd5cc5a888b143bca5c723747c20f0f9d148d723 100644 (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();