+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
# 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
# A Toolbar starts like :
#
-# Toolbar "Name"
+# Toolbar "name" "GUI Name"
#
# Only four commands are allowed inside the begin_toolbar and end_toolbar
# directives:
#
# This is the default toolbar:
-Toolbar "Standard"
+Toolbar "standard" "Standard"
Layouts
Item "New document" "buffer-new"
Item "Open document" "file-open"
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"
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"
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"
Item "Delete column" "tabular-feature delete-column"
End
-Toolbar "Command Buffer"
+Toolbar "minibuffer" "Command Buffer"
Minibuffer
End
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
+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
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;
/// a toolbar
struct Toolbar {
- /// toolbar UI name
+ /// toolbar name
std::string name;
+ /// toolbar GUI name
+ std::string gui_name;
/// toolbar contents
Items items;
/// flags
+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
#include "LyXAction.h"
#include "ToolbarBackend.h"
+using std::string;
+using std::endl;
Toolbar::Toolbar()
: last_textclass_(-1)
}
+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();
/// 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;
/**
+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:
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();
break;
case LFUN_EXEC_COMMAND:
+ owner->getToolbar().display("minibuffer", true);
owner->focus_command_buffer();
break;