]> git.lyx.org Git - lyx.git/commitdiff
Make M-x show the minibuffer
authorJohn Levon <levon@movementarian.org>
Wed, 21 Apr 2004 00:19:27 +0000 (00:19 +0000)
committerJohn Levon <levon@movementarian.org>
Wed, 21 Apr 2004 00:19:27 +0000 (00:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8686 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
lib/ChangeLog
lib/ui/default.ui
lib/ui/stdtoolbars.ui
po/POTFILES.in
src/ChangeLog
src/ToolbarBackend.C
src/ToolbarBackend.h
src/frontends/ChangeLog
src/frontends/Toolbar.C
src/frontends/Toolbar.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/QLToolbar.C
src/lyxfunc.C

index 652a1aa19ebfc1b12a0c669adad143fc584b1cbb..a9a4e84bad1574a9c762075b2de837360cfb99ab 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-21  John Levon  <levon@movementarian.org>
+
+       * ui/default.ui:
+       * ui/stdtoolbars.ui: add a non-GUI name for toolbars
+
 2004-04-20  Angus Leeming  <leeming@lyx.org>
 
        * configure.m4: change the lyxpreview_to_bitmap_command to the
index 1318a2cb670c74b9f79f7698d1d77cc10765e30b..ec3a61769df62ee26adc364a9de8fc5feb8bf876 100644 (file)
@@ -29,9 +29,9 @@ Include "stdtoolbars.ui"
 # right: the toolbar should be at the right of the window
 #
 Toolbars
-       "Standard" "on,top"
-       "Extra" "on,top"
-       "Table" "off,bottom"
-       "Math" "off,bottom"
-       "Command Buffer" "off,bottom"
+       "standard" "on,top"
+       "extra" "on,top"
+       "table" "off,bottom"
+       "math" "off,bottom"
+       "minibuffer" "off,bottom"
 End
index c281f641d010ef2113e2fa6ef2ead671beaa356c..31fab8bb32fdc8a453652929dc9824ee98e17962 100644 (file)
@@ -11,7 +11,7 @@
 
 # A Toolbar starts like :
 #
-# Toolbar "Name"
+# Toolbar "name" "GUI Name"
 #
 # Only four commands are allowed inside the begin_toolbar and end_toolbar
 # directives:
@@ -36,7 +36,7 @@
 #
 # This is the default toolbar:
 
-Toolbar "Standard"
+Toolbar "standard" "Standard"
        Layouts
        Item "New document" "buffer-new"
        Item "Open document" "file-open"
@@ -59,7 +59,7 @@ Toolbar "Standard"
        Item "Insert table" "tabular-insert 4 4"
 End
 
-Toolbar "Extra"
+Toolbar "extra" "Extra"
        Item "Numbered list" "layout Enumerate"
        Item "Itemized list" "layout Itemize"
        Item "List" "layout List"
@@ -88,7 +88,7 @@ Toolbar "Extra"
        Item "Thesaurus" "thesaurus-entry"
 End
 
-Toolbar "Table"
+Toolbar "table" "Table"
        Item "Add row" "tabular-feature append-row"
        Item "Add column" "tabular-feature append-column"
        Item "Delete row" "tabular-feature delete-row"
@@ -114,7 +114,7 @@ Toolbar "Table"
        Item "Set multi-column" "tabular-feature multicolumn"
 End
 
-Toolbar "Math"
+Toolbar "math" "Math"
        Item "Show math panel" "dialog-show mathpanel"
        Item "Set display mode" "math-display"
        Item "Subscript" "math-subscript"
@@ -138,6 +138,6 @@ Toolbar "Math"
        Item "Delete column" "tabular-feature delete-column"
 End
 
-Toolbar "Command Buffer"
+Toolbar "minibuffer" "Command Buffer"
        Minibuffer
 End
index 2f914c23428f517e53f79bc0435fb690db33cc4a..6e837e3f78155471cb3a275faec8505e360fc537 100644 (file)
@@ -187,6 +187,8 @@ src/output_plaintext.C
 src/paragraph.C
 src/rowpainter.C
 src/support/globbing.C
+src/support/path_defines.C
+src/tex2lyx/lengthcommon.C
 src/text.C
 src/text2.C
 src/text3.C
index 76ed58e39309944f18cb8dc99265eb98212673da..48cfe8b025ae1c4c7e4b5c246b7ed29ea90d26d5 100644 (file)
@@ -1,3 +1,11 @@
+2004-04-21  John Levon  <levon@movementarian.org>
+
+       * ToolbarBackend.h:
+       * ToolbarBackend.C: make "name" be a programmatic name
+       and a gui_name field.
+
+       * lyxfunc.C: display the minibuffer on M-x
+
 2004-04-18  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * LaTeX.C (runMakeIndex, runBibTeX): quote correctly file name
index cebf1262bd759ea66a4f49474e7a2e95ab0c54df..41338d58c2bd537ced81e4cc76a078626f6d7e16 100644 (file)
@@ -75,6 +75,13 @@ void ToolbarBackend::read(LyXLex & lex)
 
        Toolbar tb;
        tb.name = lex.getString();
+       lex.next(true);
+       if (!lex.isOK()) {
+               lyxerr << "ToolbarBackend::read: Malformed toolbar "
+                       "description " <<  lex.getString() << endl;
+               return;
+       }
+       tb.gui_name = lex.getString();
 
        bool quit = false;
 
index 873da4df313f35effb82cb7d5bba3721b31d10a7..8169ea910a9f60d4541cf84c06f1f8a14a025791 100644 (file)
@@ -54,8 +54,10 @@ public:
 
        /// a toolbar
        struct Toolbar {
-               /// toolbar UI name
+               /// toolbar name
                std::string name;
+               /// toolbar GUI name
+               std::string gui_name;
                /// toolbar contents
                Items items;
                /// flags
index abd5a264ab9128698fc7f2605bd1074d09ebfbef..554c2c0599b88c197ffc1018bf73f695f01c2779 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-21  John Levon  <levon@movementarian.org>
+
+       * Toolbar.h:
+       * Toolbar.C: add display()
+
 2004-04-19  John Levon  <levon@movementarian.org>
 
        * screen.C: re-show the cursor after a full expose
index d83e149af13fbee401f9b90bcfdd485c05906196..1674f5ee7e6102d68ef3fe3983250ca74338a6ee 100644 (file)
@@ -16,6 +16,8 @@
 #include "LyXAction.h"
 #include "ToolbarBackend.h"
 
+using std::string;
+using std::endl;
 
 Toolbar::Toolbar()
        : last_textclass_(-1)
@@ -39,6 +41,23 @@ void Toolbar::init()
 }
 
 
+void Toolbar::display(string const & name, bool show)
+{
+       ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
+       ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
+
+       for (; cit != end; ++cit) {
+               if (cit->name == name) {
+                       displayToolbar(*cit, show);
+                       return;
+               }
+       }
+
+       lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
+               << name << endl;
+}
+
+
 void Toolbar::update(bool in_math, bool in_table)
 {
        update();
index e6d23cac6ddd849fa36930941fcd259667802aa5..8338ee08c0c241a20d08c585119b8608449dcf43 100644 (file)
@@ -35,6 +35,9 @@ public:
        /// update the state of the toolbars
        void update(bool in_math, bool in_table);
 
+       /// show/hide the named toolbar
+       void display(std::string const & name, bool show);
+
        /// update the layout combox
        virtual void setLayout(std::string const & layout) = 0;
        /**
index 7c0e106948402e5b6442349a3c13e1c85d9723c8..014a0556d59374a391d2c0d2defdab3d2e1833cc 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-21  John Levon  <levon@movementarian.org>
+
+       * QLToolbar.C: use GUI name for tooltip
+
 2004-04-19  Angus Leeming  <leeming@lyx.org>
 
        * QPref.C:
index 07fa9829e7e9f6b4379cc8d49558fe467567527d..d3a5c9dde62829f4f75511ef8fec1d87a9db98d5 100644 (file)
@@ -212,7 +212,8 @@ QMainWindow::ToolBarDock getPosition(ToolbarBackend::Flags const & flags)
 
 void QLToolbar::add(ToolbarBackend::Toolbar const & tb)
 {
-       QToolBar * qtb = new QToolBar(qt_(tb.name), owner_, getPosition(tb.flags));
+       QToolBar * qtb = new QToolBar(qt_(tb.gui_name), owner_,
+               getPosition(tb.flags));
        // give visual separation between adjacent toolbars
        qtb->addSeparator();
 
index 42d09b4fbcfa3ab553f54ebae855aaae21c06f75..244a858dbca70488982b1fd23ae0c899a75d5db6 100644 (file)
@@ -631,6 +631,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
                        break;
 
                case LFUN_EXEC_COMMAND:
+                       owner->getToolbar().display("minibuffer", true);
                        owner->focus_command_buffer();
                        break;