Commit Graph

323 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
8bab525eda revert unintented patch part
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32621 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-23 14:29:13 +00:00
Jean-Marc Lasgouttes
e5376bd800 another bad binding related to ticket #6416 (see r32619)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32620 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-23 14:27:43 +00:00
Vincent van Ravesteijn
7e08a4376e Fix part of bug #6400: Shift+mouse click loses the existing selection instead of extending it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32578 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-18 12:08:32 +00:00
Jean-Marc Lasgouttes
7bf3d5cad0 Rename getLocalStatus to Cursor::getStatus
Move the AtPoint handling into the Cursor dispatch machinery

Note that the call to Cursor::getStatus is in BufferView::getStatus, while
the call to Cursor::dispatch is still in LyXFunc::dispatch. This needs to be
fixed, but the code there is a bit fragile.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31969 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-13 14:32:51 +00:00
Jean-Marc Lasgouttes
b67cd61d3c Avoid undo grouping error when using Undo or Redo. This is because undo grouping has to be done also when putting stuff on the undo/redo stack.
The solution is just to remove special code :)

I think there is a ticket for this, but I cannot find it.

Abdel, could you please validate my thinking?


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31869 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-06 13:32:58 +00:00
Vincent van Ravesteijn
8fd507ccf2 Remove parameter from cur.reset(). All calls had buffer().inset() as parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31795 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-29 22:46:04 +00:00
Vincent van Ravesteijn
5d9fdda299 Move the call to LFUN_SET_COLOR from the handling of LFUN_BRANCH_ADD_INSERT to LFUN_BRANCH_ADD. Now, the sequence "branch-add A" + "branch-insert A" doesn't result in an undefined branch Inset in the document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31792 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-29 22:06:27 +00:00
Vincent van Ravesteijn
d9ab7302a6 Fix bug #6193: Crash when navigating away from an empty super/subscript.
I still don't know why it is that bad that this call is made below, but this seems to fix the problem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31758 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-27 00:11:56 +00:00
Vincent van Ravesteijn
f09a4ac03c Fix bug #6280: Wrong context menu is opened in an auto-opened inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31697 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-24 00:02:41 +00:00
Abdelrazak Younes
d38ca04ff7 Move Undo::beginUndoGroup() and Undo::endUndoGroup() calls to where they are used and necessary, hopefully.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31492 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-03 19:12:21 +00:00
Abdelrazak Younes
da47dc051e Fix gcc4.4 warnings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31485 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-30 13:50:07 +00:00
Abdelrazak Younes
401b223dfb Transfer LFUN_INSET_APPLY from GuiView to BufferView.
The list of dialog edited inset is now stored in BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31472 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-27 10:29:13 +00:00
Abdelrazak Younes
e80a46ba4f Transfer LFUN_CITATION_INSERT to BufferView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31469 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-26 17:30:29 +00:00
Abdelrazak Younes
09f96833bf Transfer LFUN_DIALOG_SHOW_NEW_INSET to BufferView and put InsetCommand related code to new function decodeInsetParam() in InsetCommand.cpp.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31468 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-26 17:19:18 +00:00
Abdelrazak Younes
66dc054c6f * Transfer LFUN_SERVER_GOTO_FILE_ROW to GuiView and clean it up a bit.
* Add a recenter() call to BufferView::setCursorFromRow() in order to get the screen centered around the found position.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31455 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-23 13:45:58 +00:00
Abdelrazak Younes
6e800efcaf Transfer special getStatus() code from LyXFunc to BufferView, GuiView and GuiApplication.
I tested this on Windows and Linux/X11 but not on Mac so...



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31451 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-23 09:07:24 +00:00
Abdelrazak Younes
d5d3ccc0fa Introduce a new LyXAction property 'NoInternal' to take care of LFUNs that should not be applied to internal Buffers and use that in BufferView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31433 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-21 12:36:22 +00:00
Abdelrazak Younes
0edc2c8637 Fix crash with LFUN_PARAGRAPH_GOTO in embedded work area.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31427 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-21 08:21:37 +00:00
Abdelrazak Younes
53797b653a Try to dispatch to document BufferView in case dispatch to current BufferView fails. This is needed for the LFUNs introduced in r31412
URL: http://www.lyx.org/trac/changeset/31412




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31419 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-20 21:41:21 +00:00
Abdelrazak Younes
f10a5043a9 Kornel's gcc compil fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31418 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-20 19:37:26 +00:00
Abdelrazak Younes
16a82d6f97 * Move LFUN_TEXTCLASS_* and LFUN_TEXTCLASS_* to BufferView. This is a bit problematic because we don't check is this is a document BufferView or not for these LFUNs. We probably have to dispatch both to currentBufferView() and, if that fails, to documentBufferView(); same as we do know for current Buffer and document Buffer. Ideally those LFUN should go to Buffer as they operate on the full Buffer and the cursor is only needed either for an Undo record or to restore a cursor position. But we don't know how to do that inside Buffer of course.
* I transferred local function loadLayoutFile() in LyXFunc.cpp to a LayoutFileList::load().

Richard, as I am not into this layout thing, please check that these LFUNs still operate correctly (except from an embedded work area of course).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31412 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-19 20:56:12 +00:00
Abdelrazak Younes
4d7ed2056b move LFUN_BUFFER_PARAMS_APPLY to BufferView. I needed to make LyXFunc::updateLayout() public but this method is misplaced there.
LFUN_BUFFER_PARAMS_APPLY has now a status (disabled if read-only).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31411 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-19 17:56:53 +00:00
Abdelrazak Younes
1d5345289c Move LFUN_KEYMAP_* to BufferView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31410 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-19 16:59:36 +00:00
Vincent van Ravesteijn
d4d8d03153 Move LFUN_WORD_FIND_FORWARD and LFUN_WORD_FIND_BACKWARD to their friends in BufferView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31358 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-09 05:20:30 +00:00
Vincent van Ravesteijn
b67bf24d18 Remove other explicit tests for an internal buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31356 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-09 04:58:48 +00:00
Tommaso Cucinotta
9673d23f08 Fix crash when positioning cursor under some conditions, e.g., when finding in the sample documents attached to #6112.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31339 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-07 23:58:56 +00:00
Vincent van Ravesteijn
e042119cbe * BufferView.cpp: style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31181 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-21 20:09:15 +00:00
Tommaso Cucinotta
1c2d2f8fa4 Does not allow to enter (trivially) regular expression insets in the document under edit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31180 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-21 18:40:37 +00:00
Uwe Stöhr
503844cb4c BufferView.cpp: for the new Search dialog: paint also the range behind the work area with the same color as the work area
This avoids confusion as discussed in this thread: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153997.html
; this patch is from Vincent

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31136 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-19 00:10:09 +00:00
Abdelrazak Younes
2b9e44cb01 Move contents of paragraph_funcs.* to Text.h and Text.cpp.
The goal is to simplify the code afterwards.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30955 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:30:41 +00:00
Abdelrazak Younes
f35561d055 Cleanup: Replace a bunch of Cursor arguments with DocIterators.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30951 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:49:41 +00:00
Jean-Marc Lasgouttes
41003ea0eb remove some explicit tests against ERT_CODE; more to come
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30625 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 10:08:13 +00:00
Pavel Sanda
edb52c37d2 Add LFUN_BRANCH_ADD_INSERT.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg152890.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30467 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-11 09:38:31 +00:00
Jean-Marc Lasgouttes
042c5bf425 Fix bug http://www.lyx.org/trac/ticket/6026
LyX crashes when backward selecting during formula writing

The problem is basically that the anchor is not set (because there is no
selection going on) and BufferView::mouseSetCursor does not handle this.

 * Cursor.cpp (anchor): return immediately when there is no selection.

 * BufferView.cpp (mouseSetCursor): reset anchor before setting cursor



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30245 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-23 14:54:35 +00:00
Vincent van Ravesteijn
9173fe2c5e Fix bug #5944: Scrolling isn't predictable.
The row in editXY is corrected when we're scrolling with PgUp and PgDwn to make sure that the row where the cursor is places, is completely in the view.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29752 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-20 20:28:24 +00:00
Vincent van Ravesteijn
83b1b2c578 Revert unwanted commit (r29683) and some cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29750 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-20 19:54:29 +00:00
Vincent van Ravesteijn
33c44db749 Fix bug #3706: Mathed builtin/macro expansion not performed when clicking away.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29688 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 22:49:20 +00:00
Vincent van Ravesteijn
22e8bd3c3e Partial fix for bug #5465. This will enable scrolling down past a very large inset. With this code, LyX will scroll up everytime you try to scroll past the inset, because the cursor is set on the uppermost row.
see:
http://thread.gmane.org/gmane.editors.lyx.devel/118449


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29683 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 21:24:08 +00:00
Vincent van Ravesteijn
8996be1208 Restore Object.Event order for:
- LFUN_LABEL_COPY_AS_REF,
- LFUN_LABEL_INSERT_AS_REF.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29680 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 21:05:19 +00:00
Vincent van Ravesteijn
3c976db90b Fix bug #5948: Copy as reference for equation labels.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29678 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-15 20:54:15 +00:00
Vincent van Ravesteijn
4c9fe33c83 * Move handling of LFUN_INSET_SETTINGS to Inset,
* Remove the EDITABLE enum,
* add functions hasSettings() for all insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29375 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-22 20:55:13 +00:00
Vincent van Ravesteijn
2d40854a46 Move handling of LFUN_INSET_SETTINGS to Inset.cpp
* Inset
Handle LFUN_INSET_SETTINGS.

* LyXAction
Use the AtPoint command flag.

* BufferView
* Text3
Remove code that handled LFUN_INSET_SETTINGS. The inset/next-inset part is handled by the AtPoint lfun flag. showInsetDialog is called by Inset::doDispatch and getStatus will be handled by all insets themselves.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29171 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-09 23:17:20 +00:00
Vincent van Ravesteijn
81f1aa7597 Where did that go ?
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29128 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 18:29:19 +00:00
Vincent van Ravesteijn
b9aa501051 Fix LFUN_MARK_TOGGLE, which actually did set the mark in stead of toggling it, remove some duplicated code (clearSelection() already calls resetAnchor()), and do some cosmetics.
(Is LFUN_MARK_TOGGLE actually used by anyone ?)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29127 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 18:25:23 +00:00
Richard Heck
4daf7b5dfc The Buffer::dispatch() patch.
This patch enhances the Buffer::dispatch() method to make it a full-fledged
member of the dispatch sequence. The most immediate payoff is that LFUNs that
are handled in Buffer::dispatch() can be used from the command line.

We make better use of the DispatchResult object and return error information 
through it, rather than using return values. (This was JMarc's suggestion.) We 
also introduce a  corresponding Buffer::getStatus() method, and modify 
BufferView::getStatus() to return a flag indicating whether a decision has been 
made, as is already done in some other cases.

Finally, some LFUNs are moved to Buffer::dispatch(), including LFUN_BUFFER_PRINT.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29125 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 12:12:06 +00:00
Vincent van Ravesteijn
58b87df638 Fix bug #2213 (part 4): GuiChanges lacks "Previous Change" button.
Also show the Merge dialog when we are behind the last change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29111 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 19:26:26 +00:00
Vincent van Ravesteijn
03671821d3 Fix bug #2213 (part 1): GuiChanges lacks "Previous Change" button.
Add LFUN_CHANGE_PREVIOUS.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29109 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-05 19:14:37 +00:00
Vincent van Ravesteijn
e207b0250f Make sure that the document is only scrolled to the cursor when the cursor is/was visible before resizing .
Resizing can occur by toggling toolbars (bug 4733), or by creating or closing buffers which causes the tabbar to toggle (e.g. bug 4174, comment 5).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29066 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-03 21:39:06 +00:00
Jean-Marc Lasgouttes
6c422712e1 Extend the branch-(de)activate functions to work without a parameter. In
this case, when the cursor is on a branch inset (using the AtPoint mechanism)
the branch to which the branch inset belongs will be (de)activated.

This functionality can now be used through the branch inset context menu



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28987 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-31 09:38:07 +00:00
Jean-Marc Lasgouttes
30afece93d Kill next-inset-toggle and expand inset-toggle to provide the same functionality
* src/LyXAction.h: introduce new function attribute AtPoint: this is 
	for lfuns that should first look at cursor postion whether there
	is an inset, before dispatching to container inset.
	* src/LyXAction.cpp: remove LFUN_NEXT_INSET_TOGGLE; 
	mark LFUN_INSET_TOGGLE as AtPoint.
	* src/BufferView.cpp (dispatch, getStatus): remove handling of
	LFUN_NEXT_INSET_TOGGLE.
	* src/LyXFunc.cpp (dispatch, getStatus): handle functions marked 
	AtPoint.	
	* lib/*/*: replace next-inset-toggle with inset-toggle.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28980 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-30 13:49:52 +00:00