* src/frontends/controllers/tex_helpers.h: doxyfy comment
* src/frontends/controllers/tex_helpers.C
(rescanTexStyles): Pop up a message box when TeXFiles.py fails
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14488 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/math_factory.C
(createMathInset): Create a MathFracInset of kind OVER for \over
* src/mathed/math_fracinset.C
(MathFracInset::draw): handle kind OVER
(MathFracInset::drawT): ditto
(MathFracInset::write): ditto
(MathFracInset::name): ditto
(MathFracInset::extraBraces): ditto
* src/mathed/math_fracinset.h
(Kind): New kind OVER
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14487 a592a061-630c-0410-9148-cb99ea01b6c8
which are not only used by the former xforms frontend
but also in the menus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14484 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyxfunc.C
(quoteArg): new, quotes arguments for the "log" dialog
(LyXFunc::dispatch): quote log filename
* src/frontends/controllers/ControlLog.C
(ControlLog::initialiseParams): parse \" as " and \\ as \ in filename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14481 a592a061-630c-0410-9148-cb99ea01b6c8
(BufferList::close): Don't ignore unsaved changes if quitting == true
(BufferList::close): Use menuWrite(buf) instead of buf->save(),
because menuWrite tells the user if the file could not be saved and
asks for another name
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14475 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyx_cb.C
(newFile): Only set the new buffer if it is valid
* src/BufferView_pimpl.C
(BufferView::Pimpl::loadLyXFile): Test whether newFile succeeded
* src/lyxfunc.C
(LyXFunc::menuNew): Only set the new buffer if it is valid
(LyXFunc::open): ditto
* src/importer.C
(Importer::Import): ditto
* src/lyx_main.C
(LyX::exec2): Only use the new buffer if newFile succeeded
* src/buffer_funcs.C
(newFile): discard the buffer and return 0 if the template is invalid
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14474 a592a061-630c-0410-9148-cb99ea01b6c8
* src/tex2lyx/tex2lyx.C
(tex2lyx): output an empty paragraph if the document is empty
* src/tex2lyx/context.C
(Context::check_layout): set empty to false
* src/tex2lyx/context.[Ch]
(empty): new flag, tells whether all contexts are empty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14469 a592a061-630c-0410-9148-cb99ea01b6c8
TODO 1: All occurrences of "LyXView::showErrorList()" in the "kernel" should be replaced by a boost signal emission (Buffer::errors()). This signal is already connected to this showErrorList() slot.
TODO 2: The ErrorList mechanism is used wrongly in a number of place, most notably in "Converter.C". Instead of replacing the ErrorList in the "Buffer" class, the "Converter" class should maintain its own list instead and connect directly to the LyXView::showErrorList() slot.
Buffer:
* errorList_: new private member and associated access methods.
* setErrorList(): new accessor method.
* addError(): apend an error to the errorList_.
* error(): deleted.
* errors(): new boost signal, unused for now. Shall be used instead of LyXView::showErrorList().
LyXView:
* getErrorList(), addError(), errorlist_, errorConnection_: deleted.
* errorsConnection_: new boost connection for the Buffer::errors() signal.
lyx_main.C:
* LyX::exec2(): manually print all errors.
BufferView.h: remove unneeded ErrorList forward declaration.
BufferView::pimpl::menuInsertLyXFile(): delete Buffer::error() connection and add a FIXME comment
text.C: Use Buffer::addError() instead of Buffer::error() signal emission.
ControlErrorList.C: get the ErrorList from the Buffer instead of LyXView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14467 a592a061-630c-0410-9148-cb99ea01b6c8
* src/graphics/GraphicsCacheItem.C
(CacheItem::Impl::convertToDisplayFormat): Don't derive the temp
file name from the original file name. This ensures that it is
composed of valid characters only.
* src/graphics/GraphicsConverter.C: remove example script, since it
will get out of date.
(build_script): Copy the original file to a temp file before the
conversion chain starts. This avoids problems with converters that
can't handle ' in filenames.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14459 a592a061-630c-0410-9148-cb99ea01b6c8
With this change, the only difference between BufferView.h and BufferView_pimpl.h is "cursor.h" so I think it is time to merge the two classes at last.
BufferView:
* showErrorList(), getErrorList(): transfered to LyXView.
BufferView::pimpl
* addError(), showReadonly(), connectBuffer(), disconnectBuffer(): transfered to LyXView.
CutAndPaste.C: adapted to API changes
frontends/controllers/ControlErrorList.C: ditto
lyxfunc.C: ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14458 a592a061-630c-0410-9148-cb99ea01b6c8
The performance may suffer a bit because we do the second drawing step in all cases. This could be possibly optimized out by checking the return value of the BufferView::update() method in "lyxfunc.C:1610". But it is maybe better to keep those two parts of the frontend ignorant of each other: the event handling and the drawing.
BufferView:
* needRedra(), need_redraw_: deleted.
* updateMetrics(): now public.
* update(): only do the first drawing step. Returns true if a full updateMetrics is needed before drawing on screen.
WorkArea:
* redraw(): no check on BufferView::needRedraw(), call updateMetrics() unconditionally.
* processKeySim(): uneeded "redraw()" call commented out. When/if the call to LyXView::redrawWorkArea() in "lyxfunc.C:1610" is not needed anymore, this line should be uncommented out.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14456 a592a061-630c-0410-9148-cb99ea01b6c8
movement LFUNs; use LCursor::selHandle consistently (fixes bugs 2119
and 2259, and also a crash related to with dEPM)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14436 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LyXAction.C
(LyXAction::init): handle new LFUN_CLIPBOARD_PASTE
* src/insets/insettabular.C
(InsetTabular::doDispatch): ditto
* src/insets/insetbox.C
(InsetBox::doDispatch): ditto
* src/insets/insetert.C
(InsetERT::doDispatch): ditto
(InsetERT::getStatus): ditto
* src/insets/insetcharstyle.C
(InsetCharStyle::doDispatch): ditto
* src/BufferView_pimpl.C
(BufferView::Pimpl::selectionRequest): stuff selection, not clipboard
* src/mathed/math_nestinset.C
(MathNestInset::lfunMousePress): get stuff selection, not clipboard
(MathNestInset::lfunMouseRelease): clipboard -> selection in
commented code
* src/CutAndPaste.C
(cutSelection): ditto
* src/frontends/{qt3,gtk}/GuiImplementation.C
(GuiImplementation::newWorkArea): create new selection, not clipboard,
since the clipboard is now an object
(GuiImplementation::destroyWorkArea): destroy selection, not clipboard
* src/frontends/{qt4,qt3,gtk}/GuiSelection.h: new, copied from
GuiClipboard.h
* src/frontends/{qt4,qt3,gtk}/GuiSelection.C: new, copied from
GuiClipboard.C
* src/frontends/{qt3,gtk}/GuiImplementation.h
(selection): new accessor for selection_
(selection_): new, the global selection object
* src/frontends/{qt4,qt3,gtk}/Makefile.am: add GuiSelection.C and
GuiSelection.h
* src/frontends/{qt4,qt3,gtk}/GuiClipboard.C
(GuiClipboard::get): return clipboard, not selection
(GuiClipboard::put): stuff clipboard, not selection
* src/frontends/{qt4,qt3,gtk}/GuiClipboard.h
(haveSelection): remove (this is now in GuiSelection)
* src/frontends/{qt3,gtk}/GuiClipboard.h
(old_work_area_): remove, since it is not needed anymore
* src/frontends/gtk/ghelpers.C
(getGTKStockIcon): handle LFUN_CLIPBOARD_PASTE
* src/frontends/Clipboard.h
(haveSelection): remove (this is now in Selection)
* src/frontends/qt4/GuiImplementation.[Ch]
(GuiImplementation::selection): new accessor for selection_
* src/frontends/Gui.h
(selection): New accessor for the global selection object
* src/frontends/Selection.h; new, copied from Clipboard.h
* src/frontends/Makefile.am: add Selection.h
* src/text3.C
(various): s/clipboard().haveSelection/selection().haveSelection/
(LyXText::dispatch): handle LFUN_CLIPBOARD_PASTE
(LyXText::getStatus): ditto
* src/lfuns.h: new lfun LFUN_CLIPBOARD_PASTE
* lib/ui/stdmenus.ui: add new lfun LFUN_CLIPBOARD_PASTE
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14408 a592a061-630c-0410-9148-cb99ea01b6c8