Add output_sync icon to view/update toolbar

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34499 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-05-25 11:36:02 +00:00
parent 9f9104d9c4
commit 053b905e08
5 changed files with 22 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -100,6 +100,7 @@ ToolbarSet
Item "Update" "buffer-update"
Item "View master document" "master-buffer-view"
Item "Update master document" "master-buffer-update"
Item "Toggle Resources for Forward/Reverse Search" "buffer-toggle-output-sync"
Separator
StickyPopupMenu "view-others" "View other formats"
StickyPopupMenu "update-others" "Update other formats"

View File

@ -1078,7 +1078,12 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
flag.setOnOff(buffer_.params().compressed);
break;
}
case LFUN_BUFFER_TOGGLE_OUTPUT_SYNC: {
flag.setOnOff(buffer_.params().output_sync);
break;
}
case LFUN_SCREEN_UP:
case LFUN_SCREEN_DOWN:
case LFUN_SCROLL:
@ -1588,6 +1593,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
buffer_.params().compressed = !buffer_.params().compressed;
break;
case LFUN_BUFFER_TOGGLE_OUTPUT_SYNC:
buffer_.params().output_sync = !buffer_.params().output_sync;
break;
case LFUN_SCREEN_UP:
case LFUN_SCREEN_DOWN: {
Point p = getPos(cur);

View File

@ -447,6 +447,7 @@ enum FuncCode
LFUN_PREVIEW_INSERT, // vfr, 20100328
LFUN_FORWARD_SEARCH,
LFUN_INSET_COPY_AS, // vfr, 20100419
LFUN_BUFFER_TOGGLE_OUTPUT_SYNC,
LFUN_LASTACTION // end of the table
};

View File

@ -2843,7 +2843,6 @@ void LyXAction::init()
* \endvar
*/
{ LFUN_FORWARD_SEARCH, "forward-search", ReadOnly, System },
/*!
* \var lyx::FuncCode lyx::LFUN_SERVER_NOTIFY
* \li Action: Sends notify message about the last key-sequence to client.
@ -2920,6 +2919,16 @@ void LyXAction::init()
* \endvar
*/
{ LFUN_BUFFER_TOGGLE_COMPRESSION, "buffer-toggle-compression", Noop, Buffer },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_TOGGLE_OUTPUT_SYNC
* \li Action: Toggles including of resources for forward/reverse search of the given document.
* \li Notion: When toggled on, SyncTeX is invoked for PDF, while srcltx package
is used for DVI. Custom LaTeX macro can be defined in preferences.
* \li Syntax: buffer-toggle-output-sync
* \li Origin: sanda, 25 May 2010
* \endvar
*/
{ LFUN_BUFFER_TOGGLE_OUTPUT_SYNC, "buffer-toggle-output-sync", Noop, System },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_CLOSE
* \li Action: Closes the current buffer.