mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Add LFUN_MENUBAR_TOGGLE and LFUN_STATUSBAR_TOGGLE.
This partly solves the bug http://bugzilla.lyx.org/show_bug.cgi?id=4146 . git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22809 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fae0a30802
commit
c2e397cdee
@ -1093,6 +1093,24 @@ void LyXAction::init()
|
||||
{ LFUN_LYX_QUIT, "lyx-quit", NoBuffer, Buffer },
|
||||
{ LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer, Buffer },
|
||||
{ LFUN_MENU_OPEN, "menu-open", NoBuffer, Buffer },
|
||||
/*!
|
||||
* \var lyx::kb_action lyx::LFUN_MENUBAR_TOGGLE
|
||||
* \li Action: Toggles visibility of the main menu.
|
||||
* \li Notion: This can be used for the fullscreen mode.
|
||||
* \li Syntax: menubar-toggle
|
||||
* \li Origin: ps, 6 Feb 2008
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_MENUBAR_TOGGLE, "menubar-toggle", NoBuffer, Buffer },
|
||||
/*!
|
||||
* \var lyx::kb_action lyx::LFUN_STATUSBAR_TOGGLE
|
||||
* \li Action: Toggles visibility of the main menu.
|
||||
* \li Notion: This can be used for the fullscreen mode.
|
||||
* \li Syntax: statusbar-toggle
|
||||
* \li Origin: ps, 6 Feb 2008
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_STATUSBAR_TOGGLE, "statusbar-toggle", NoBuffer, Buffer },
|
||||
|
||||
{ LFUN_WINDOW_NEW, "window-new", NoBuffer, Buffer },
|
||||
{ LFUN_WINDOW_CLOSE, "window-close", NoBuffer, Buffer },
|
||||
|
@ -522,6 +522,8 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
break;
|
||||
|
||||
case LFUN_TOOLBAR_TOGGLE:
|
||||
case LFUN_MENUBAR_TOGGLE:
|
||||
case LFUN_STATUSBAR_TOGGLE:
|
||||
case LFUN_INSET_APPLY:
|
||||
case LFUN_BUFFER_WRITE:
|
||||
case LFUN_BUFFER_WRITE_AS:
|
||||
|
@ -69,6 +69,7 @@
|
||||
#include <QDropEvent>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QPoint>
|
||||
@ -1524,6 +1525,13 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LFUN_MENUBAR_TOGGLE:
|
||||
menuBar()->setVisible(!menuBar()->isVisible());
|
||||
break;
|
||||
|
||||
case LFUN_STATUSBAR_TOGGLE:
|
||||
statusBar()->setVisible(!statusBar()->isVisible());
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
|
@ -413,6 +413,9 @@ enum kb_action {
|
||||
LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM,
|
||||
LFUN_IN_MATHMACROTEMPLATE,
|
||||
LFUN_SCROLL,
|
||||
LFUN_MENUBAR_TOGGLE,
|
||||
LFUN_STATUSBAR_TOGGLE,
|
||||
// 320
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user