Commit Graph

125 Commits

Author SHA1 Message Date
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
623389fdcc Move inclusion of "frontends/Delegates.h" to qt4/GuiView.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21815 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-27 08:24:56 +00:00
Abdelrazak Younes
c06f45a66f Adjust comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21808 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 23:04:01 +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
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
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
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
c61ff2e0b8 cleanup and reorder initialisation code of GuiView and GuiToolbars. Move some things to GuiView::Private.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21670 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 23:30:41 +00:00
Abdelrazak Younes
01470ddcb7 Remove unused methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 22:27:04 +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
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
Abdelrazak Younes
f8490161bd Transfer some LFUNs from LyXFunc to GuiView and get rid of GuiView methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21583 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 14:49:50 +00:00
Abdelrazak Younes
fcdc4f8a6b Some more cosmetics and removal of unused methods in GuiView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21582 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 14:04:32 +00:00
Abdelrazak Younes
f111a8e322 Some cosmetics and a gcc compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21581 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 13:23:44 +00:00
Abdelrazak Younes
4eb2740a0d Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21577 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 10:20:55 +00:00
Abdelrazak Younes
c4db1d0f5a Push latest Andre's changes toward their true direction:
* WorkArea.h and LyXView.h: remove unneeded pure virtual interface.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21575 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 09:52:28 +00:00
André Pönitz
c256661047 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21568 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-12 23:37:34 +00:00
André Pönitz
309232d26b make LyXView almost pure virtual. Merge implementation with GuiView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21566 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-12 23:23:19 +00:00
André Pönitz
36136efb78 de-boostification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21561 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-12 22:35:43 +00:00
Abdelrazak Younes
fe8bce6676 Transfer readOnly() and updateWindowTitle() from Delegates to WorkArea/WorkAreaManager. This permits to automatically update Windows and Tabs titles (thanks to Qt signal/slot connections).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21551 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-11 22:30:21 +00:00
Pavel Sanda
87bd0e79ad Fix bug 2739: Option for alphabetical sorting of environments in the toolbar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21536 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-10 00:21:42 +00:00
André Pönitz
b99433e73b cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21157 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 21:41:17 +00:00
Bo Peng
f8836d8b12 Embedding: remove the embeddingChanged signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21105 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 19:08:53 +00:00
Abdelrazak Younes
52cb6e770b Remove unneeded changed() and closing() delegates.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20668 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 19:42:14 +00:00
André Pönitz
b847b8c7df the delegate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 18:27:20 +00:00
Abdelrazak Younes
3ca9ddb6ed Move most of the Gui specific code in Toolbars to its new qt4 specialization GuiToolbars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20644 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-01 20:45:50 +00:00
André Pönitz
fad47c0fe0 boost/utility -> boost/noncopyable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20608 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-30 15:47:00 +00:00
André Pönitz
978f65391e reduce #includes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20363 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-19 22:37:22 +00:00
André Pönitz
72fe3d9fc1 One more second..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20362 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-19 21:28:11 +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
Bo Peng
3611b0ff33 Embedding patch 4: interaction between buffer and the embedding dialog. Emit embeddingChanged signal to update the embedding dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20038 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 14:34:42 +00:00
Abdelrazak Younes
24a36d01a0 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19755 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 16:31:58 +00:00
Abdelrazak Younes
c7d83abbac Put LyXView on a diet, step 2: Transfer ControlCommandBuffer handling from LyXView to QCommandBuffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19753 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 13:20:01 +00:00
Abdelrazak Younes
77d4d1256d Put LyXView on a diet, step 2: get rid of menubar direct access from the core. Menubar handling is a frontend thing.
* LyXView:
- getMenubars(): deleted.
- menubar_: transfered to GuiView::private.
- updateMenubar(): deleted, QLMenubar::update() is a void method anyway (to be deleted soon).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19750 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 12:44:21 +00:00
Abdelrazak Younes
674632104f Put LyXView on a diet, step 1: get rid of toolbars direct access from the core. Toolbar handling is a frontend thing; the goal is to progressively transfer that to the frontend.
* LyXView:
- getToolbars(): deleted.
- toolbars_: now protected. The goal is to transfer that to GuiView.
- openLayoutList(): new method. The core should not know how this list is displayed.
- showMiniBuffer(): new pure virtual method to show the mini-buffer.
- focus_command_buffer: deleted.

* GuiView:
- focus_command_widget(): deleted.
- showMiniBuffer(): implemented.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19748 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 12:21:47 +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
Richard Heck
eacbcb3f3a Fix bug 4096. Don't disconnect the buffer until we're ready to connect again.
Also, clean up the code a little.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19287 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-03 14:07:39 +00:00
Michael Schmitt
39cf8bcf16 * src/frontends/LyXView.h:
* src/frontends/Toolbars.cpp:
	* src/frontends/qt4/QLToolbar.cpp:
	* src/frontends/LyXView.cpp:
	* src/frontends/Toolbars.h:
	* src/LyXFunc.cpp:
	* src/ToolbarBackend.cpp:
	* src/ToolbarBackend.h: fix toolbar issues: translate toolbar name
	in user message; check for ill-formed toolbars in UI files; output
	reasonable error messages in case of erroneous toolbar names


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-09 20:33:32 +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
Jean-Marc Lasgouttes
36481c2744 Fix bug 3799.
* src/LyXAction.cpp:
	* src/lfuns.h: remove LFUN_TOOLBAR_TOGGLE_STATE.

	* src/LyXFunc.cpp (getStatus, dispatch): merge LFUN_TOOLBAR_TOGGLE
	and LFUN_TOOLBAR_TOGGLE_STATE. Add an informational message after 
	dispatch.

	* src/frontends/LyXView.cpp (toggleToolbarState):
	* src/frontends/Toolbars.cpp (toggleToolbarState): add allowauto 
	parameter. 

	* src/MenuBackend.cpp (expandToolbars): adapt.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18690 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-06 13:52:31 +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
André Pönitz
fc6ce7cd08 rename LyXFont to Font except in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18095 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:17:15 +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
00e305c9d9 Rename .C ==> .cpp for files in src, part one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:41:58 +00:00