Commit Graph

433 Commits

Author SHA1 Message Date
Richard Heck
07fd1d6b63 The inset DOES know what kind of update is needed, and it is supposed to
be telling us. I'm not sure why this wasn't being used any more.

If we find any missing updates, it may be because the inset dispatch
stuff wasn't doing its job.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35634 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 18:06:01 +00:00
Richard Heck
2e1d9ee944 Clean up a few update things.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35633 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 18:04:44 +00:00
Richard Heck
6a80ce62ca DispatchResult::update() ==> DispatchResult::screenUpdate()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35631 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 17:28:55 +00:00
Richard Heck
35eb1a2405 Fix bug #6316.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35630 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 17:12:25 +00:00
Richard Heck
2291614a6c Introduce a typedef for vector<Buffer *>. No change in behavior
anticipated.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35529 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-29 11:55:10 +00:00
Richard Heck
b05e674e6f Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35526 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-28 18:35:04 +00:00
Abdelrazak Younes
a648c39b70 Get rid of LFUN_LINE_INSERT: we use LFUN_INSET_INSERT "line".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35344 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-12 07:01:24 +00:00
Uwe Stöhr
0e7ab29f49 InsetLine: support for the LaTeX command \rule; kick out the hardcoded \lyxline; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35299 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-07 00:41:00 +00:00
Richard Heck
e992140685 More work toward speeding up the bibfile caching stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35103 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-09 17:01:51 +00:00
Jean-Marc Lasgouttes
f8eda52820 Fix bug #3733: 'undo' does not revert 'changed' status for file
* src/LyXAction.cpp: add ReadOnly flag to LFUN_UNDO and LFUN_REDO, since
  we do not want the dispatch mechanism to mark buffer dirty after them.
* src/BufferView.cpp: handle "by hand" the activation of undo/redo
* src/Undo.cpp: add lyx_clean member to UndoElement and make sure to 
  maintain it with undo operations; add a new markDirty() member for UndoStack
* src/Buffer.cpp: when saving a document, mark the undo and redo stacks 
  elements as dirty.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35068 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-06 23:54:04 +00:00
Richard Heck
35327c0b5b I guess I like this better.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35020 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-29 00:00:37 +00:00
Richard Heck
523056c092 Move the error message out of LayoutFileList::load() and have it be
reported by the caller. Otherwise, you could get the error message the
first time, and then it would succeed the second!!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35019 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-28 21:03:27 +00:00
Richard Heck
5577e877bb Try to move all updateBuffer() calls to a central location. We now use
DispatchResult to store a flag that tells us whether we need a buffer
update or not. 

So: If you find a missing one, go to an appropriate place in the
dispatch and call cur.forceBufferUpdate() or, if you don't have a cursor
but do have a DispatchResult, call dr.forceBufferUpdate().

There is one remaining call I could not move, in
TextMetrics::redoParagraph. But this looks like an emergency call when
the macro context has not been set. There are also a couple calls that
are connected with buffer creation that I commented out, since the same
call is done again almost immediately. But I'm not positive about those.

Now the nice thing would be to do the same for updateMacros().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34826 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-09 14:37:00 +00:00
Richard Heck
0e14f379f3 Rename a couple routines. This will avoid confusion with a forthcoming
patch.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34816 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-08 20:04:35 +00:00
Pavel Sanda
9b1ed66dbe Paragraphs start from 0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34673 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-15 13:54:49 +00:00
Vincent van Ravesteijn
7f593196fc Add an update parameter to BufferView::scrollToCursor and BufferView::scrollDocView. This parameter indicates whether a repaint is requested
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34658 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-14 21:48:23 +00:00
Vincent van Ravesteijn
e1ba93a068 *BufferView: Remove default parameter value.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34657 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-14 21:38:38 +00:00
Jürgen Spitzmüller
c8faa01f4f make branch-add-insert aware of the separator ("|") [bug #6621]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34653 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-14 13:39:08 +00:00
Pavel Sanda
053b905e08 Add output_sync icon to view/update toolbar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34499 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-25 11:36:02 +00:00
Vincent van Ravesteijn
b269eb9117 Fix a crash due to Inset**::mouse_hover_[] containing an invalid pointer to a BufferView.
Clear the mouse_hover state when closing the BufferView. Otherwise, there will be an invalid pointer stored in the Inset and crashing LyX when the Inset's destructor is called.

See also r33908, r34117, r34348, r34353, r34354, r34363 and bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34365 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 23:04:51 +00:00
Vincent van Ravesteijn
750620765f Fix another crash due to BufferView::last_inset_ being an invalid pointer.
Now, we only want to let the last_inset_ pointer point at insets that accept the mouse_hover setting. Otherwise, the pointer is not cleared on deletion of the inset.

See also r33908, r34117, r34348, r34353 and bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34354 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-02 19:12:25 +00:00
Vincent van Ravesteijn
708b73cab7 Fix bug #3900: Mathed corners displayed without mouse hover.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34348 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:55:37 +00:00
Vincent van Ravesteijn
4c611e5745 Mouse hover property should be dependent on the specific bufferview. If there are 2 views showing the same buffer, an Inset can be shown as hovered in only one view.
This is also in preparation of a decent fix for bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34347 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:47:46 +00:00
Vincent van Ravesteijn
87623ff478 Fix bug #6141: Scrolling error with insets at top of file.
Fix the regression introduced in r28397 while fixing bug #5573.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34296 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 14:57:27 +00:00
Vincent van Ravesteijn
b14ef59db8 Remove boundary parameter from BufferView::coordOffset(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34248 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:12:40 +00:00
Vincent van Ravesteijn
63d24ca3c4 Remove boundary parameter from BufferView::getPos(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34247 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:03:04 +00:00
Pavel Sanda
62ca7f3ae5 Proper camel case for FileName.absFilename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34234 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:09 +00:00
Vincent van Ravesteijn
0b92e538d9 Use the AtPoint mechanism for the LFUN_INSET_EDIT and LFUN_LABEL_COPY_AS_REF.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34220 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 17:11:43 +00:00
Vincent van Ravesteijn
eb9fb94214 Do not set the enabling of the status flag if the getStatus() function does not give a decisive answer. As a consequence of removing this call from BufferView, we should disable the flag in the end of GuiApplication::dispatch() if it is not handled by any getStatus() function.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34164 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-16 15:55:37 +00:00
Vincent van Ravesteijn
5a77a063c1 Remove the unclear FuncStatus::operator|=. Without knowing the internals of FuncStatus it is unsafe to use this operator, so let's not use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34161 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-16 12:15:27 +00:00
Vincent van Ravesteijn
108a67ed43 Make Cursor::anchor_ private and make an access function Cursor::realAnchor() to stress the fact that this is thus not the normalAnchor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34146 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 18:16:07 +00:00
Vincent van Ravesteijn
d8db0e8515 Rename anchor() to normalAnchor() as the anchor() function was already returning a normalized anchor in stead of the real one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34145 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 17:49:15 +00:00
Vincent van Ravesteijn
8156884090 Make Cursor::disp_ private as it should be.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34144 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-15 17:34:34 +00:00
Vincent van Ravesteijn
8c5ad7af21 Revert part of r33908.
We need a way to test for the pointer to be valid before using it in updateHoveredInset(). For now, just set it to zero, so that this critical won't find its way into alpha-2.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34117 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-12 08:10:54 +00:00
Richard Heck
b79d8e5e2d Make members of FuncRequest private, per the FIXME there. Again, this is
basically a massive renaming, with no real changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34106 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 19:00:42 +00:00
Richard Heck
4c7a5d0024 This is just a giant renaming of member variables in FuncRequest,
preparatory to making them private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34105 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-09 18:15:17 +00:00
Jean-Marc Lasgouttes
e8529a2ecf Get rid of all-insets-toggle and explain how to replace it with inset-forall.
Change inset-forall so that screen is not repainted at each iteration, since this lead to very slow opeartion on large files. This is not a problem for current uses, but can potentially lead to crashes.

See ticket #6641 for more thoughts and possible solutions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34092 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-08 12:39:41 +00:00
Vincent van Ravesteijn
33f28623e5 * BufferView.cpp: typo again.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34087 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-08 09:17:00 +00:00
Uwe Stöhr
45bffba885 BufferView.cpp: typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34085 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-08 01:23:04 +00:00
Vincent van Ravesteijn
0b450f40e7 Refactorization: I don't like nested ?: constructions. Especially not followed by an if statement which is a special case for the deepest level of the nested ?: construction.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33910 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 15:32:45 +00:00
Vincent van Ravesteijn
6a9f44eaa2 Refactorization: Buffer::changed() can update the metrics as well, so we don't have to do it in scrollToCursor if we call Buffer::changed() anyway.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33909 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 15:29:26 +00:00
Vincent van Ravesteijn
71c1ad3517 Fix bug #3900: Insets painted as hovered without mouse hover.
When updating the screen, moving the mouse, or scrolling the buffer, we check whether the hovering status of the insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33908 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-29 15:21:10 +00:00
Tommaso Cucinotta
3b4bb219d6 No more bookmarks in internal buffers (addresses #6605).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33842 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-23 00:45:37 +00:00
Richard Heck
6f624ab79b Change updateLayout() to updateDocumentClass(), since that is what it
does.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33682 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-08 20:37:11 +00:00
Richard Heck
d65020b293 s/updateLabels/updateBuffer/g, per a suggestion of Abdel's.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33613 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-03 22:13:45 +00:00
Abdelrazak Younes
377cdd5f6c Transfer LyXfunc code to GuiApplication::dispatch() and getStatus(). Now
a lot of simplification is possible. Except some instability period...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 16:11:13 +00:00
Jean-Marc Lasgouttes
668d0f8c3f do not use theLyXFunc()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33385 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 14:26:59 +00:00
Jean-Marc Lasgouttes
b4d588e78a cleanup handling of LFUN_REGEXP_MODE ; cleanup Text::getStatus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33363 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 11:19:48 +00:00
Tommaso Cucinotta
e9e6463de7 Removed obsolete FIXME (the invoked isInternal() method already does that).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33304 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 22:18:21 +00:00
Tommaso Cucinotta
dff3792986 Refactor of r33302 (addressing #6457) according to vfr comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33303 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 22:12:23 +00:00
Tommaso Cucinotta
0881479c48 Inhibits insertion of Regexp insets within InsetERT context (and fixes #6495).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33302 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-31 21:38:18 +00:00
Jean-Marc Lasgouttes
fe9a43f44b Add DispatchResult argument to BufferView::dispatch, and remove explicit updates in there.
Split LyXFunc::dispatch into a wrapper that does the actual screen updates and
a worker method that updates a DispatchResult object.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33226 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-25 15:14:41 +00:00
Jürgen Spitzmüller
ee9a70acbe * BufferView.cpp:
- Fix crash when performing word-replace while the cursor has a selection
	  in mathed (bug 6437)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33204 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-24 17:35:10 +00:00
Jean-Marc Lasgouttes
ceb50a253c get rid of notes-mutate and explain that inset-forall can do the same
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32986 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-12 15:54:33 +00:00
Jean-Marc Lasgouttes
a00fbcd871 get rid of next-inset-modify ; inset-modify does the same now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32965 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-11 15:50:07 +00:00
Jean-Marc Lasgouttes
b692466769 set max number of iterations to 10000 in inset-forall ; try to keep the cursor where it was (I am not sure that the effect of fixIfBroken seems natural though)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32885 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 15:57:25 +00:00
Vincent van Ravesteijn
570f96bc6e Add a boolean to GuiWorkArea::redraw to indicate whether the metrics must be updated. The current test "lyx_view_ != guiApp->currentView() || lyx_view_->currentWorkArea() != this" is not enough, especially not if the buffer is changed and buffer->changed() is called. Moreover, there are a lot of combinations of updateMetrics() followed by buffer->changed(), these can now be replaced by one call to buffer->changed(bool).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32874 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-08 02:03:54 +00:00
Pavel Sanda
e21867818e Fix crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32835 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-07 16:26:52 +00:00
Jean-Marc Lasgouttes
f2e6a5ecf8 Implement new inset-forall lfun. This function iterates over all insets in
current buffer and applies a given function at cursor position before the 
inset. It is actually possible to filter on the type of inset.


Remove all index insets:
inset-forall Index delete-char-forward

Remove all (!!) insets:
inset-forall * delete-char-forward

Close all Notes (also works for a particular branch, for example)
inset-forall Note inset-toggle close

Close only yellow sticky notes
inset-forall Note:Note inset-toggle close

Of course, things may become weird:
Put LyX in an infinite loop if there is at least a Note
inset-forall Note char-backward

In this case, the code will stop after 1000 iterations.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32834 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-07 15:47:58 +00:00
Tommaso Cucinotta
5cc2d6d73c Advanced F&R rework:
- scopes now handled in FindAndReplaceWidget, while lyxfind.cpp only searches within single buffer
- cursor().result().dispatched() now encodes whether a match was found or not, after LFUN_WORD_FINDADV dispatch
- removed a few unneeded functions
- followed a few cosmetic advices


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32760 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-04 12:29:38 +00:00
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