- Modifier on return type ignored
- Ambigous else
- Ambigous logical operators
- Semi-colon instead of empty block
- Missing header files
- Missing using std::XX
- Initialization out of order
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20304 a592a061-630c-0410-9148-cb99ea01b6c8
xft-fonts package is still required. However, on *nix there seem
to be no way to tell fontconfig to prefer our fonts instead of
others matching the requirements, so, in case of conflict, the
fontconfig files should be manually adjusted, or some existing
font package used (note that the quality of the bakoma fonts is
better than that of the xft ones). There is no such problem on
Windows where our private fonts are always preferred over the
installed ones (and I hope the same holds true for Mac).
* src/LyX.cpp
(LyX::exec): don't call addFontResources() and restoreFontResources()
anymore, as the frontend code will do the job.
* src/frontends/qt4/GuiFontLoader.{cpp,h}
(GuiFontLoader::GuiFontLoader): register math fonts with Qt.
(GuiFontLoader::~GuiFontLoader): unregister math fonts.
* src/support/os.h
* src/support/os_unix.cpp
* src/support/os_win32.cpp
* src/support/os_cygwin.cpp:
remove code dealing with fonts.
* configure.ac: don't check for fontconfig headers anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20128 a592a061-630c-0410-9148-cb99ea01b6c8
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.
This patch adds the backend. The ModuleList class holds a list of the available modules, which are retrieved from lyxmodules.lst, itself generated by configure.py. There are two LFUNs available: modules-clear and module-add, which do the obvious thing; you can test by typing these into the minibuffer, along with the name of one of the available modules: URL (a CharStyle), Endnote (a Custom Inset), and---with the spaces---End To Foot (View>LaTeX and look at the user preamble), which are themselves in lib/layouts. There are some others, too, that allow theorems to be added to classes like article and book.
The GUI will come next.
Issues: (i) The configure.py script could be improved. It'd be nice, for example, if it tested for the presence of the LaTeX packages a particular module needs. But this would mean re-working the LaTeX script, and I don't know how to do that. Note that at present, the packages are ignored. This will change shortly. (ii) I've used std::string in LyXModule, following what seemed to be a precedent in TextClass. If some of these should be docstrings, please let me know, and I'll change them. (iii) There is at present no distinction between LaTeX and DocBook modules. Should there be? That is: Should there be modules that are available when the document class is a LaTeX class and others that are available only when it is DocBook? Or should there just be one set of modules? Each module can of course indicate for what it is suitable in its description.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19893 a592a061-630c-0410-9148-cb99ea01b6c8
* Buffer:
- get rid of cursor_ and anchor_
- ~Buffer(): update the labels of its master buffer before closing
- closing(): pass the Buffer address.
* BufferView():
- BufferView(): needs a valid Buffer (should be const in the future.
- most of the change is about removing all test of buffer_ nullity.
- resize(): deleted.
- setBuffer(): deleted.
* Application:
- newLyXView(): simplification
- updated design description in Application.h
* Gui/GuiImplementation: remove all WorkAreas and BufferView creation/Deletion. Workareas are directly handled by LyXView/GuiView and BufferView is created/delete by WorkArea.
* LyXView/GuiView: implement the new design
What is not working yet:
- the close tab button: it is implemented but does not show up.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19686 a592a061-630c-0410-9148-cb99ea01b6c8
* src/gettext.cpp (locale_init): factor some code; call Messages::init().
* LyX.cpp (exec): call Messages::init() after initializing package().
* Messages.cpp (init): new method, factor some code from get().
(get): change the method used to set the locale. Should be much more robust
than it was (and simpler too).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19360 a592a061-630c-0410-9148-cb99ea01b6c8
1) create a doc
2) insert an ert inset
3) right-click the inset
4) new window
5) delete the ert inset: BOOM!
This commit replace the static hideDialog signal which was in effect shared by all views with a direct call to Dialog::hide().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19094 a592a061-630c-0410-9148-cb99ea01b6c8
Fix Bug 3860: Toc crash when loading a child documents.
* BufferView::loadLyXFile(): simplify, transfer last part to
LyXView::loadLyXFile().
Change return value to Buffer created by load (or 0 if none).
Ultimately, this should all be moved to buffer_funcs.cpp, as it is no
longer needed here.
* Buffer::setParentName(): small fix to avoid recursive includes.
* LyXView:
- setBuffer(): properly update the labels and the Toc if this is [LOAD Child
Document] command. Move buffer connection and disconnection, simplifying
earlier code.
- loadLyXFile(): get some code from BufferView::loadLyXFile() and from
LyXFunc::LFUN_BUFFER_CHILD_OPEN, properly handle the child document case.
There's a lot of overlap with setBuffer() here. This needs cleaning.
* LyXFunc: add optional argument to LFUN_BUFFER_CHILD_OPEN to indicate if
the document is being opened by LyX itself rather than the user (as on
View>DVI, for example).
* LyX: adapt to loadLyXFile() API changes.
* insets/InsetInclude: use LFUN_BUFFER_CHILD_OPEN rather than calling
loadLyXFile() directly. Make use of new optional argument.
With this in place, the only thing missing for proper multipart document support is to automatically update the parent Buffer when switching from the parent Buffer. This would be very useful when you work with multiple document sharing the same child documents (as I often do).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18825 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiApplication::event():
special case for FileOpen events: memorize the filenames if LyX is not properly started yet.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18201 a592a061-630c-0410-9148-cb99ea01b6c8