Make M-x show the minibuffer

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8686 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2004-04-21 00:19:27 +00:00
parent 0aea071705
commit 3bcf40e96d
13 changed files with 70 additions and 13 deletions

View 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

View 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

View 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

View 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

View 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

View 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;

View 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

View 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

View 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();

View 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;
/**

View 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:

View 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();

View 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;