Commit Graph

55 Commits

Author SHA1 Message Date
Uwe Stöhr
58135f8b27 support to set the examples folder in the preferences
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21776 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:26:58 +00:00
Abdelrazak Younes
94c0fc55de Getting rid of Application::createView()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21760 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 08:51:11 +00:00
Abdelrazak Younes
d4b02ad711 simplify window creation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21735 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 09:56:33 +00:00
Abdelrazak Younes
37a5647be1 Transfer LyXView::loadLyXFile() to lyxFunc::loadAndViewFile(). This enables to get rid of the flashing tabbar bug and is more correct anyway.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21677 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-19 12:03:38 +00:00
Abdelrazak Younes
1b147f12b0 Spoiling some fun from Andre': put Application on a diet and remove unnecessary string conversions and method indirections.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21665 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 20:36:52 +00:00
André Pönitz
dac06728cb shuffle code around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21653 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 15:32:12 +00:00
André Pönitz
72e3177e3d shuffle some code around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21636 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 22:30:16 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Pavel Sanda
a5449f2b7d Add format hint for command line export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21623 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 12:14:39 +00:00
André Pönitz
f4292fcec7 usr strfwd
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21617 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-14 21:36:01 +00:00
Abdelrazak Younes
e5eabfe067 Transfer geometry related session code from LyX::newLyXView() to GuiView::setGeometry().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21606 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-14 13:56:13 +00:00
André Pönitz
f625dd7ea0 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21593 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 23:50:28 +00:00
Abdelrazak Younes
12ecafd76e Transfer createView() from Application to GuiApplication and get rid of LyXView::setGeometry() pure virtual interface. The goal is to switch to Qt session handling for geometry instead of our own house made one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21585 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 15:29:15 +00:00
André Pönitz
8d06b3049b cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21544 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-10 13:44:50 +00:00
André Pönitz
b55a179d51 more de-boostification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21493 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 20:14:30 +00:00
Bo Peng
7fb4a57ab9 Put bindings in defaultKeyBindings() to site.bind
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21268 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 19:45:43 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
Dov Feldstern
662b58497e Getting rid of LTR bias --- part 1/?
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
2007-10-22 22:18:52 +00:00
André Pönitz
f934b86850 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 10:50:56 +00:00
Bernhard Roider
1a77c867a2 CmdDef.cpp/h: A class that manages command definitions. The definitions are
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
2007-10-20 23:27:03 +00:00
Bo Peng
0755a1c9dc PrefShortcuts: Roughly finish the shortcut configuration panel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21090 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 20:50:56 +00:00
André Pönitz
fbb3abfeac cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21085 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 17:35:27 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
André Pönitz
988f372843 use FileName::isDirectory()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21047 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 21:10:35 +00:00
André Pönitz
0e08bc5e16 start using FileName::exists()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21044 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 19:29:32 +00:00
Bo Peng
e224999ae6 InsetInfo: load bind file and menu backend in batch mode as well. Otherwise, InsetInfo will yield different output in batch mode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20909 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 15:27:24 +00:00
André Pönitz
58ab972f71 last commit was incomplete... not sure how I managed this..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20710 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 20:15:49 +00:00
André Pönitz
df2318f823 move some buffere related stuff from callback.cpp tpo Buffer.cpp.
simpler code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20694 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 11:00:18 +00:00
Martin Vermeer
15b8abe4b8 lyx -> LyX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20529 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-27 06:30:12 +00:00
Martin Vermeer
a80e1981bd src/LyX.cpp: style corrections for trunk
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20528 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-27 01:05:20 +00:00
Bo Peng
b762358eec Lyx now starts and asks for reconfigure if no textclass is found (bug 2829)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20522 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-26 19:36:09 +00:00
Lars Gullik Bjønnes
26f336769a Remove warnings reported with gcc 4.3:
- 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
2007-09-16 10:36:57 +00:00
Abdelrazak Younes
7efb007296 Clear out selection and cut stack buffers on exit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20293 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 17:24:08 +00:00
Enrico Forestieri
92065820e5 Register math fonts with Qt 4.2 or higher. Using Qt 4.1, the old
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
2007-09-07 16:22:05 +00:00
Richard Heck
8a947f63da This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
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
2007-08-29 17:59:49 +00:00
Abdelrazak Younes
2419c80657 Fix crash when session is empty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19716 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-22 08:34:48 +00:00
Abdelrazak Younes
1356543c45 The BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas:
* 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
2007-08-21 07:33:46 +00:00
Abdelrazak Younes
32268e2632 cosmetics + move frontends/* to frontend namespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19553 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-14 09:54:59 +00:00
Jean-Marc Lasgouttes
12dbcf2ee1 [the "translation" patch series] Part 2: fixing document label translations
* 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
2007-08-07 22:24:47 +00:00
Richard Heck
3419382919 Fix bugs 4077 and 4086.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19293 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-03 16:09:42 +00:00
Abdelrazak Younes
a3abe11974 another safe guard.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19134 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-19 09:12:34 +00:00
Abdelrazak Younes
ad91d27c28 Obvious crash-fix introduced by 19094.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19132 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-19 07:24:21 +00:00
Abdelrazak Younes
4863cfdf78 Fix this bug:
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
2007-07-17 09:20:39 +00:00
Richard Heck
d3003c1022 Polish the Toc and labels updating when loading a child document.
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
2007-06-19 14:56:52 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Abdelrazak Younes
1becd845c1 * LyX::addFileToLoad(): new method for double-clicked file icons on MacOS.
* 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
2007-05-04 17:20:53 +00:00
André Pönitz
6add1994c7 rename LyXTextClass* into TextClass*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 19:53:54 +00:00
André Pönitz
d079c908b3 rename LyXServer into Server
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18092 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 16:22:46 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
Bo Peng
e36fba33ab Last (?) batch of renames:
src/frontends/Alert.h src/frontends/alert.h
src/frontends/Alert.cpp src/frontends/alert.cpp
src/frontends/Alert_pimpl.cpp src/frontends/alert_pimpl.cpp
src/frontends/qt4/Alert_pimpl.cpp src/frontends/qt4/alert_pimpl.cpp
src/frontends/controllers/ButtonPolicies.cpp src/frontends/controllers/ButtonPolicy.cpp
src/frontends/controllers/ButtonPolicies.h src/frontends/controllers/ButtonPolicy.h
src/insets/InsetEnv.cpp src/insets/InsetEnvironment.cpp
src/insets/InsetEnv.h src/insets/InsetEnvironment.h
src/mathed/MathMacroTable.h src/mathed/MacroTable.h
src/mathed/MathMacroTable.cpp src/mathed/MacroTable.cpp
src/lyx_cb.h src/callback.h
src/lyx_cb.cpp src/callback.cpp
src/UpdateFlags.h src/update_flags.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18076 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-28 20:44:46 +00:00