]> git.lyx.org Git - features.git/commitdiff
Add outline-in/out/up/down to the outline context menu.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 3 May 2009 16:06:00 +0000 (16:06 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 3 May 2009 16:06:00 +0000 (16:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29516 a592a061-630c-0410-9148-cb99ea01b6c8

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

index f200ec5bb0ecd76bf9fe61be60d1beed5a2d3be3..1900116c3b0995503a1988e507ea49702c556a17 100644 (file)
@@ -540,5 +540,16 @@ Menuset
                Item "Accept Change|C" "change-accept"
                Item "Reject Change|R" "change-reject"
        End     
+       
+#
+# Toc Table of Context context menu
+#
+
+       Menu "context-toc-tableofcontents"
+               Item "Promote Section|P" "outline-out"
+               Item "Demote Section|D" "outline-in"
+               Item "Move Section Up|U" "outline-up"
+               Item "Move Section Down|w" "outline-down"
+       End     
 
 End
index fa044ad6455b8a5299c4faf55470cd4a87695c2f..acf6ecb39cb42c479fb15d7370eed73c95cd7ea9 100644 (file)
@@ -136,6 +136,10 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
        {
        case LFUN_CHANGE_ACCEPT:
        case LFUN_CHANGE_REJECT:
+       case LFUN_OUTLINE_UP:
+       case LFUN_OUTLINE_DOWN:
+       case LFUN_OUTLINE_IN:
+       case LFUN_OUTLINE_OUT:
                status.setEnabled(true);
                return true;
 
@@ -164,6 +168,13 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
                dispatch(item.action());
                cur.dispatch(tmpcmd);
                break;
+       
+       case LFUN_OUTLINE_UP:
+       case LFUN_OUTLINE_DOWN:
+       case LFUN_OUTLINE_IN:
+       case LFUN_OUTLINE_OUT:
+               outline(cmd.action);
+               break;
 
        default:
                if (inset)