]> git.lyx.org Git - features.git/commitdiff
Introduce "samerow" toolbar tag and let View/Update toolbar to be in the
authorPavel Sanda <sanda@lyx.org>
Wed, 27 Jan 2010 17:19:14 +0000 (17:19 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 27 Jan 2010 17:19:14 +0000 (17:19 +0000)
beginning of the first row.

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg156961.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33234 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/default.ui
lib/ui/stdtoolbars.inc
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/Toolbars.cpp
src/frontends/qt4/Toolbars.h

index 9688b0e764fe7464fb223ec6617d5c56df9395b0..a3ec300b09bb6572aef243e22de73e87e42b127f 100644 (file)
@@ -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"
index 8c085bb606102aee4f75f630df756259744d6e61..3aab9d4109380906a46f606218a081f2927cf19a 100644 (file)
@@ -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
index a503ed86f4e7528796bde224647006eb952dc478..009fd6d598fe17a987f68b14ebac2fa3d51b4056 100644 (file)
@@ -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);
 
index 347a2725e7f8bb2727bb0237688e0d28e70b1c78..f395e52a0a65b147859a54b7f698ceb1ad4a34de 100644 (file)
@@ -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:`"
index e10587683a033e63c0325a2ab960c19669d63ed8..92bd3de78b46e1f1032264c6f7a88538808f5a7e 100644 (file)
@@ -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<ToolbarInfo> Infos;