Move the special handling of -geometry command option from LyX to GuiApplication,
where it belongs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26823 a592a061-630c-0410-9148-cb99ea01b6c8
* GuiApplication: delay locale loading until setGuiLanguage() is called.
* Messages: memorize default locale for current environment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25930 a592a061-630c-0410-9148-cb99ea01b6c8
- move Previews singleton to LyX
- LyX.cpp: set singleton to zero at destruction.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25594 a592a061-630c-0410-9148-cb99ea01b6c8
Merge env_gui_language into gui_language. "auto" now means that the language will be retrieved from the environment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25380 a592a061-630c-0410-9148-cb99ea01b6c8
- env_gui_language: set to true (default) if the language is to be retrieved from current environment variable.
- gui_language: specify language for GUI strings. Only used if env_gui_language is false
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25379 a592a061-630c-0410-9148-cb99ea01b6c8
Prevent deletion of LyX temporary directory is this is not a LyX created directory.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25199 a592a061-630c-0410-9148-cb99ea01b6c8
These have been added to BufferView::dispatch() and BufferView::getStatus() for now. Shortly, we'll be making wider use of Buffer::dispatch() and introducing Buffer::getStatus() and moving these and some other LFUNs there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24979 a592a061-630c-0410-9148-cb99ea01b6c8
* fill global menubar with the normal actions
* capture the keyboard on the menubar if no GuiView exists. This
enables the shortcuts on Mac in those cases.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23731 a592a061-630c-0410-9148-cb99ea01b6c8
* lyxFunc:
- doImport(): transfered to GuiView::inportDocument() together with LFUN_BUFFER_IMPORT
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22820 a592a061-630c-0410-9148-cb99ea01b6c8
* Application/GuiApplication:
- restoreGuiSession(): new method for session restoration.
* LyXView/GuiView
- loadDocument(): new pure virtual interface
* lyxFunc:
- loadAndViewFile(): transfered to GuiView::loadDocument()
- openDocument(): transfered to GuiView.
* LyX.h
- Impl::files_to_load_ : now a simple vector<string>.
- restoreGuiSession(): removed.
- execBatchCommands(): simplified and make use of Application::restoreGuiSession().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22816 a592a061-630c-0410-9148-cb99ea01b6c8
Now support/* should have no dependencies on src/* anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
This is the first patch in a series meant to remove LTR bias from the code.
Currently, there are many places in the code where "right" and "left" are used,
but where we actually mean "forward" and "backwards" --- which is the same
thing in LTR text, but not in RTL/Bidi text.
See full details in http://permalink.gmane.org/gmane.editors.lyx.devel/97550.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21128 a592a061-630c-0410-9148-cb99ea01b6c8
by default read from lib/commands/default.def
A .def file allows to define a command with
\define "Name" "lfun"
where Name is the name of the new command and lfun is the code
to be executed.
\def_file "FileName"
allows to include another .def file.
The implementation of CmdDef is similar to KeyMap, i.e. there is
one instance created in the LyX.cpp that reads the .def file, holds
a list containing all definitions, and supplies access methods.
LFUN_CALL: The new lfun is used to execute a command definition, e.g.
call Name
If a toolbar item has the associated action "call Name" then the image
lib/images/commands/Name.png is used for the button.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21093 a592a061-630c-0410-9148-cb99ea01b6c8
- 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