Commit Graph

257 Commits

Author SHA1 Message Date
Pavel Sanda
824ac5f2c8 Add checkbox to fullscreen menu entry.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23793 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-17 14:22:30 +00:00
Jürgen Spitzmüller
f2e8cd3cd9 *** File Format Change: UI and enhancement for InsetSpace ***
* src/insets/InsetSpace.{cpp,h}:
	- merge in HFill inset, add support for dotfill, hrulefill,
	  hspace and hspace*
* src/insets/InsetHFill.{cpp,h}:
	- remove

* src/frontends/qt4/GuiHSpace.{cpp,h}:
* src/frontends/qt4/ui/HSpaceUi.ui:
* src/frontends/qt4/GuiView:
	- new GUI for Space insets.

* src/insets/Inset.{cpp,h}:
* src/insets/InsetCode.h:
* src/insets/InsetCollapsable.cpp:
* src/insets/InsetCommandParams.cpp:
	- remove HFILL_CODE and LFUN_HFILL_INSERT, add SPACE_CODE where necessary,
	  new Inset member isStretchableSpace() to indicate HFill and friends.

* Buffer.cpp: 
	- increase format to 319
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion/reversion routines
* development/FORMAT:
	- document file format change

* src/Makefile.am:
* src/frontends/qt4/Makefile.am:
* development/scons/scons_manifest.py:
	- deal with UI changes.

* src/LyXAction.cpp:
	- remove LFUN_HFILL_INSERT

* src/LyXFunc.cpp:
	- handle space dialog.

* src/factory.cpp:
* src/Paragraph.cpp (isHFill):
* src/Text.cpp:
* src/Text3.cpp:
* src/TextMetrics.cpp:
	- adapt to changes

* lib/ui/classic.ui:
* lib/ui/stdmenus.ui:
	- add HSpace dialog, remove HFill.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23787 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-17 09:23:43 +00:00
Stefan Schimanski
9e499117e3 * possibility to disable the completion cursor in text. All those
"*supported" methods maybe should be merged with a bit-enum as return value.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23776 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-16 17:07:10 +00:00
Pavel Sanda
1e53ac960a Change translation strings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23772 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-16 13:05:42 +00:00
André Pönitz
a98f82c292 s/kb_action/FuncCode/g
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23749 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 01:20:36 +00:00
Stefan Schimanski
25e0113c9c * Use open_buffers_in_tabs instead of single_window. The latter even confused me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23737 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 23:27:31 +00:00
Stefan Schimanski
40144c3f78 * dialog can only be shown via a GuiView up to now. This shouldn't be
the case for GuiView independent dialogs like about or prefs. But
  for now it is.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23735 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 23:26:22 +00:00
Stefan Schimanski
0ba2a1e6f8 * preference option to open buffers in tabs or new windows
* moved the open/new file dispatches into GuiApplication to make them GuiView independent


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23729 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 23:24:45 +00:00
Stefan Schimanski
6688fc1f1e * cosmetic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23719 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 16:35:44 +00:00
Stefan Schimanski
5d112c185c * remove the need of an active GuiView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23718 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-14 16:33:16 +00:00
Bo Peng
48f9225e27 Embed: allow the use of embedded layout and class (.cls, .sty) files.
* src/EmbeddedFiles.h|cpp: add validate() function to validate loaded .lyx file.
	* src/LayoutFile.h|cpp: add Layout_Type parameter to addLayoutFile to load an embedded layout.
	* src/BufferParams.h|cpp: read layout from temp directory, then local directory.
	* src/frontends/qt4/GuiDocument.cpp: handle embedded layout type
	* src/LyXFunc.cpp: handle embedded layout when a layout is re-read.
	* src/Buffer.cpp: validate after a buffer is read. handle exceptions properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23667 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-11 18:31:38 +00:00
Stefan Schimanski
9d2654311a * restart cursor not only after mouse- and keyboard events, but also after those from the toolbar, menus, etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23648 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-10 19:08:03 +00:00
Pavel Sanda
63e712c8a4 LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR -> LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23605 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 21:23:37 +00:00
Richard Heck
6edb3984bf BaseClassList --> LayoutFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23532 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:53:21 +00:00
Abdelrazak Younes
9931b0155e typos.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23421 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 06:56:13 +00:00
Abdelrazak Younes
cbb7b9a0a4 remove unused variables.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23419 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-03 18:16:11 +00:00
Abdelrazak Younes
c084b71a9b get rid of LFUN_INSET_REFRESH
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23418 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-03 18:06:27 +00:00
Stefan Schimanski
8c4b08920e * bug fix to only do paragraph redraws, not fullscreen
* avoid an extra redraw due to completion when typing


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23349 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 09:18:46 +00:00
Richard Heck
2b3bd7b5f4 This is the last of the commits that hopes to enforce the distinction between "layout files" and "document classes" that was introduced by the modules code. For the most part, these changes just refactor code from TextClass between: (a) a TextClass base class; (b) a LayoutFile subclass, which represents the information in a .layout file; and (c) a DocumentClass subclass, which represents the layout information associated with a Buffer---a LayoutFile plus Modules. Methods from TextClass have been apportioned between the three classes depending upon what is needed where, and signatures have been changed where necessary so that the right kind of class is required.
At this point, there are no simple TextClass objects in the main LyX code, and it is impossible to create them, since the TextClass constructor is protected. Only LayoutFile and DocumentClass objects can be constructed, and for the most part these are constructed only by their respective containers: BaseClassList and DocumentClassBundle. There is an exception: LayoutFile does have a public default constructor, but if anyone knows how to make it go away, please do.

There will be one or two more commits along these lines, but these will be simple renamings. For example, BaseClassList should be LayoutFileList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23343 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 02:45:33 +00:00
Richard Heck
2c382f2f47 More work towards type safety regarding TextClass's. A couple bugs have been fixed here, too, discovered along the way.
Note that we no longer rely upon BaseClassList to be sorted. This would allow layout descriptions---such as "article (AMS)"---to be translated, and the ordering of the list in Document>Settings will then follow the translations.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23334 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 21:04:55 +00:00
Richard Heck
224e6ad0a3 baseclasslist --> BaseClassList singleton. Prep for further type safety.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23322 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 14:49:01 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
Abdelrazak Younes
8c8ff137da Get rid of 'quitting' global variable. It is not needed anymore because all windows are closed in order now and the frontend/core is properly separated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23280 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 12:30:41 +00:00
Abdelrazak Younes
8446d3dbfc Get rid of LyXFunc::closeBuffer()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23274 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 11:05:58 +00:00
Richard Heck
b2475f6625 Replace boost::shared_ptr<TextClass> with a global cache of sorts of the TextClass's used by Buffers---or, more strictly, constructed by BufferParams::makeTextClass(). The action is in TextClass.{h,cpp}.
I've left the typedef in TextClassPtr.h. At the moment, it's kind of silly. But I've left it mostly because it helps to identify where the TextClass's stored in the TextClassBundle are used, and maybe it'd be worth having some sort of strong typedef like the one for BaseClassIndex here.

I need to check whether the textClass_ member of InsetCollapsable is needed now. I think not.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23232 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 19:31:31 +00:00
Abdelrazak Younes
0655e4d78f Should Fix crash on exit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23218 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 07:32:02 +00:00
Richard Heck
4c6180d209 Try to make the distinction between base classes and text classes clearer in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23198 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:59:49 +00:00
Richard Heck
69de04feac Restore Andre's TextClassIndex, but now in the form of BaseClassIndex. It seems worth distinguishing more clearly than we do at the moment between TextClass's and BaseClass's. The latter correspond to *.layout files; the former are based upon *.layout files but may be modified by modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23197 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:29:40 +00:00
Richard Heck
ebd4f002af Andre's s/getBaseClass/baseClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23191 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:12:41 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
Bo Peng
1aaa96e6f1 Load local textclass in addTextClass(), reload local layout correctly in LFUN_TEXTCLASS_APPLY and LFUN_TEXTCLASS_LOAD
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23175 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 06:14:48 +00:00
Abdelrazak Younes
ee4dcf105a fix crash on quit with Ctr-Q. Patch by Horst Schirmeier (see http://bugzilla.lyx.org/show_bug.cgi?id=4572)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23162 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 18:10:52 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Stefan Schimanski
8527a08903 * simplify notifyCursorLeaves logic: We now only call it from strategic
places, i.e.
  - BufferView::setMouseCursor,
  - BufferView::mouseEventDispatch
  - LyXFunc::dispatch
  Before it was called from several dispatch handlers in the middle of the
  dispatch process. Because the cursor might get invalidated, this is
  not a good idea. We had plenty of crashes and odd behaviours because
  of this as nobody really understood those cases.

  This fixes (at least) #2069 and #4163.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 20:45:18 +00:00
Stefan Schimanski
f5fdd7cdab * cosmetic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23133 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 15:38:26 +00:00
Stefan Schimanski
1bf7b59d60 * completion infrastructure
* completion support for mathed
* experimental completion support for text


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23104 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 19:42:34 +00:00
Abdelrazak Younes
2a725d7c23 Introduce LFUN_CLOSE_TAB_GROUP.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23097 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 14:53:09 +00:00
Pavel Sanda
3d87d2f724 Squash RC warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23096 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-21 14:34:41 +00:00
Abdelrazak Younes
9d40f89b58 Introducing LFUN_SPLIT_VIEW
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23084 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-20 21:46:49 +00:00
Abdelrazak Younes
f0b51ef8c9 Various small cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23064 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 09:10:59 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Pavel Sanda
10426cb833 Wrong status of ui-toggle. Spotted by Bennett.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22986 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 00:06:39 +00:00
Pavel Sanda
c6161cfdc6 Remove LFUN_FILE_NEW.
Obsoleted by LFUN_BUFFER_NEW, moreover its was currently buggy.

See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135371.html .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22977 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 14:07:50 +00:00
Pavel Sanda
b9cf09838f Improve fullscreen capabilities ( http://bugzilla.lyx.org/show_bug.cgi?id=4146 ).
- adding frames, adding fullscreen switch.
- LFUN_MENUBAR_TOGGLE, LFUN_STATUSBAR_TOGGLE -> LFUN_UI_TOGGLE.

There are still limitations wrt Outlining in MAC OS - someone could check, 
see http://www.nabble.com/Fullscreen-mode-to15314676.html#a15367830 .




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22893 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 11:58:01 +00:00
Abdelrazak Younes
28826a461c header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22826 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-07 08:58:35 +00:00
Abdelrazak Younes
e6519eb5f6 Transfer some GUI oriented code from core to frontend.
* 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
2008-02-06 23:54:13 +00:00
Abdelrazak Younes
8d99df0c93 Transfer some GUI oriented code from core to frontend.
* 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
2008-02-06 23:02:57 +00:00
Pavel Sanda
c2e397cdee Add LFUN_MENUBAR_TOGGLE and LFUN_STATUSBAR_TOGGLE.
This partly solves the bug http://bugzilla.lyx.org/show_bug.cgi?id=4146 .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22809 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 17:54:04 +00:00
Abdelrazak Younes
4b2c2f3578 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22750 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-02 15:48:58 +00:00
Stefan Schimanski
dd3842505b * a configuration value for the mouse wheel scrolling speed:
lyxrc.mouse_wheel_speed 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22717 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-30 21:20:29 +00:00
Richard Heck
5bef46157c Add some comments, and change enum terminology to reflect actual purpose.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22685 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:25:25 +00:00
Richard Heck
20a5e94a86 Fix bug 4517.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22681 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:02:30 +00:00
Stefan Schimanski
8e212b98b4 * optional old-style editing mode for macros with a parameter list.
* combobox in the preferences dialog to choose the macro editing mode of choice.

The reason for the three choices (inline box, inline without box,
list) is that it seems that there are at least these three groups of
people, and each of them is very strong about their opinion what that
the best mode is. So here there are all of them, pick your favourite.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22670 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-25 22:02:38 +00:00
Stefan Schimanski
0a701fb254 * Option to make macro editing less "noisy" by hiding the grey box with the
macro name when the cursor is inside. The downside of the coin is that
you have to look into the statusbar to see which macro is used. But
some people prefer that than having the slight size change of macros
when the cursor enters.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22650 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-22 21:23:41 +00:00
Richard Heck
9a7cd29f5b Rationalize the handling of makeTextClass().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22388 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 17:04:56 +00:00
Richard Heck
d4dbefc749 Tiny comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-28 17:11:39 +00:00
Abdelrazak Younes
33eb188fb6 Add an RC setting to disable/enable the tooltips in the work area.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22313 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 13:52:56 +00:00
Stefan Schimanski
5caf1bb4de * Some dialogs are independent of the lyxview. Moreover it seems that
the Qt Mac application menu is handled differently such that no
  getStatus() is issued anymore later when opening it. Hence we have
  to return the correct (i.e. enable==true) value for those lfuns from
  the beginning.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22286 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 19:07:46 +00:00
Abdelrazak Younes
2b9153b8bc Fix navigation and bookmarks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22255 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-22 10:19:26 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Abdelrazak Younes
ddda272512 bug fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22228 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 11:22:17 +00:00
Abdelrazak Younes
96d2d6fc50 * LyXFunc::dispatch(): invert BufferView::dispatch() and cursor::dispatch() calling.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22227 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 10:42:59 +00:00
Jürgen Spitzmüller
8672364e1e * fix bug 4055, overdue patch from Stefan Schimanski:
"The idea of the beforeDispX/Y_ variables in the Cursor is to hold the position
of the cursor on screen before the lyxfunc is dispatched. But to get this the
metrics must be valid. It's updated in Cursor::dispatch before the dispatch
loop.
After inserting/deleting stuff (like when deleting the selected text before
inserting the alpha) the metrics are invalid. But the handler for the alpha
calls Cursor::dispatch after the deletion and hence the crash with your second
patch.

Here is a patch fixing that:

The beforeDispatchXY variable do not belong into the Cursor::dispatch because
Cursor::dispatch is often called "manually" by many handlers to some followup
action. So this logic must go somewhere else where it is sure that is not
updated after the metrics got invalidated."

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22193 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 18:13:02 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Abdelrazak Younes
b95a68d476 Revert 22023 and really fix bug 4410 (http://bugzilla.lyx.org/show_bug.cgi?id=4410).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22024 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 16:36:56 +00:00
Abdelrazak Younes
acbb1c9b8c Split LyXFunc::menuNew() into LyXView::newDocument() and buffer_funcs::newUnnamedFile().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22002 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-07 11:57:13 +00:00
Abdelrazak Younes
23aff36f7e Avoid a second confirmation when reverting a Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21963 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-04 23:07:14 +00:00
Abdelrazak Younes
ac08e89095 Sanitize the way Buffers are saved, renamed and closed.
* LyXFunc: Transfer and simplify LFUN_BUFFER_WRITE, LFUN_BUFFER_WRITE_AS  and LFUN_BUFFER_WRITE_ALL to GuiView.

* BufferList: Transfer quitWriteAll() and close() to GuiView.

* Buffer: Transfer writeAs() and menuWrite() functionalities to GuiView.

* LyXView::closeBuffer(): new pure virtual method.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21960 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-04 22:21:25 +00:00
Abdelrazak Younes
b1db731a98 * FileName::fileContents(): new argument to define the file encoding.
* BufferView:
- insertPlaintextString(): now accept a FileName.
- contentsOfPlaintextFile(): ditto and use FileName::fileContents().
 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21915 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 11:55:25 +00:00
Abdelrazak Younes
f8b7c56580 * Buffer:
- tocBackend(), errorList(), texrow(), etc: now const.
- masterBuffer(): get rid of non const access.
- setParent(): set parent Buffer, replace setParentName()
- parent(), resetChildDocuments(): new.

* InsetInclude.{h,cpp}: new resetParentBuffer() method.





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21879 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-30 17:41:27 +00:00
Uwe Stöhr
6cfb3e1344 LyXFunc.cpp: add missing case
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21872 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-30 00:04:44 +00:00
André Pönitz
2506e0d643 assimilate BOOST_CURRENT_FUNCTION
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21867 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 21:10:35 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
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
2007-11-29 07:04:28 +00:00
André Pönitz
150cf11651 hand-crafted LyXErr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21849 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 22:12:03 +00:00
Abdelrazak Younes
1060f922f0 Please JMarc: Make sure we always pass through LyXFunc::dispatch() even if this is a waste of CPU.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21807 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 22:45:17 +00:00
Abdelrazak Younes
1133419a59 Cleanup LyXFunc::dispatch() following JMarc advice.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21797 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 14:36:50 +00:00
André Pönitz
d95451ae5c s/isFileReadable/isReadableFile;
introduce isReadableDirectory
replace isReadable by either isReadableFile or isReadableDirectory
remove isReadable


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21769 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 11:18:16 +00:00
Abdelrazak Younes
662b5dba03 Introducing Application::getStatus() and Application::dispatch(). Transferring some LFUNs to those.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21759 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 07:58:12 +00:00
Abdelrazak Younes
b8cd772329 some more LFUN transfer from LyXFunc to GuiView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21741 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 12:37:09 +00:00
Abdelrazak Younes
47f54dd68b get rid of LyXView::errors(). This was redundant with GuiBufferDelegate::errors().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21740 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 11:53:10 +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
42015a8ebd Transfer some more dialog related code from core to frontend:
- LFUN_INSET_APPLY handling goes to GuiView.
- Dialog needs a GuiView instead of a LyXView.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21734 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 09:44:02 +00:00
Abdelrazak Younes
a3315920a2 Some more cleanup of LyXView:
- transfer GuiBufferDelegate and GuiBufferViewDelegate to GuiView
- delete showDialog() and use LFUN_DIALOG_SHOW in LyXFunc::dispatch().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21702 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-21 22:48:13 +00:00
Abdelrazak Younes
8460c9a072 Introducing Application::resetGui() that will reset all dialogs in all lyx windows (including toolbars and menubars).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21689 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-21 15:12:47 +00:00
Abdelrazak Younes
ba3fa9bd03 - Cleanup and simplify the layout list GUI handling.
- Transfer toolbar, statusbar and layoutlist handling to the frontend.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21684 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-20 22:03:56 +00:00
Abdelrazak Younes
359ced5e65 Transfer some LFUNs from LyXFunc to GuiView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21681 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-19 20:56:05 +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
7d209e5c32 Fix long standing initialisation FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21669 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 22:51:58 +00:00
André Pönitz
d5fc2425a9 consolidate showDialog() incarnations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21662 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 00:39:15 +00:00
André Pönitz
55b4fbcf21 merge GuiView/Dialogs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21661 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 00:01:14 +00:00
André Pönitz
12f435035a move view_ids from Application to GuiApplication
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21658 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 22:25:42 +00:00
André Pönitz
1005c166c2 merge frontend::Gui and frontend::Application
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21656 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 20:47:50 +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
Abdelrazak Younes
e73f8040fe Use QSettings for session management of windows geometry. This commit also removes the possibility to fix the window dimensions in the RC file. Instead we have now a single check box for enabling/disabling geometry session management.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21625 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 12:58:44 +00:00