diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 9688b0e764..a3ec300b09 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -39,10 +39,13 @@ Include "stdtoolbars.inc" # left: the toolbar should be at the left of the window # right: the toolbar should be at the right of the window # +# samerow: do not create new line for this toolbar +# (note that order of toolbars is defined in stdtoolbars.inc) +# Toolbars "standard" "on,top" "view/update" "on,top" - "extra" "on,top" + "extra" "on,top,samerow" "review" "auto,review,top" "vcs" "off,top" "table" "auto,table,bottom" diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc index 8c085bb606..3aab9d4109 100644 --- a/lib/ui/stdtoolbars.inc +++ b/lib/ui/stdtoolbars.inc @@ -95,6 +95,16 @@ ToolbarSet Item "Toggle table toolbar" "toolbar-toggle table" End + Toolbar "view/update" "View/Update" + Item "View" "buffer-view" + Item "Update" "buffer-update" + Item "View master document" "master-buffer-view" + Item "Update master document" "master-buffer-update" + Separator + StickyPopupMenu "view-others" "View other formats" + StickyPopupMenu "update-others" "Update other formats" + End + Toolbar "extra" "Extra" Item "Default" "layout" Item "Numbered list" "layout Enumerate" @@ -215,16 +225,6 @@ ToolbarSet Item "Next note" "note-next" End - Toolbar "view/update" "View/Update" - Item "View" "buffer-view" - Item "Update" "buffer-update" - Item "View master document" "master-buffer-view" - Item "Update master document" "master-buffer-update" - Separator - StickyPopupMenu "view-others" "View other formats" - StickyPopupMenu "update-others" "Update other formats" - End - Toolbar "view-others" "View Other Formats" ViewFormats End diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index a503ed86f4..009fd6d598 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -536,7 +536,7 @@ void GuiView::initToolbars() if (!tb) continue; int const visibility = guiApp->toolbars().defaultVisibility(cit->name); - bool newline = true; + bool newline = !(visibility & Toolbars::SAMEROW); tb->setVisible(false); tb->setVisibility(visibility); diff --git a/src/frontends/qt4/Toolbars.cpp b/src/frontends/qt4/Toolbars.cpp index 347a2725e7..f395e52a0a 100644 --- a/src/frontends/qt4/Toolbars.cpp +++ b/src/frontends/qt4/Toolbars.cpp @@ -358,6 +358,8 @@ void Toolbars::readToolbarSettings(Lexer & lex) flag = RIGHT; else if (!compare_ascii_no_case(*cit, "auto")) flag = AUTO; + else if (!compare_ascii_no_case(*cit, "samerow")) + flag = SAMEROW; else { LYXERR(Debug::ANY, "Toolbars::readToolbarSettings: unrecognised token:`" diff --git a/src/frontends/qt4/Toolbars.h b/src/frontends/qt4/Toolbars.h index e10587683a..92bd3de78b 100644 --- a/src/frontends/qt4/Toolbars.h +++ b/src/frontends/qt4/Toolbars.h @@ -107,7 +107,8 @@ public: MATH = 128, //< show when in math TABLE = 256, //< show when in table REVIEW = 512, //< show when change tracking is enabled - MATHMACROTEMPLATE = 1024 //< show in math macro template + MATHMACROTEMPLATE = 1024, //< show in math macro template + SAMEROW = 2048 //place to the current row, no new line }; typedef std::vector Infos;