Commit Graph

390 Commits

Author SHA1 Message Date
Vincent van Ravesteijn
07924ac300 Remove some unnecessary static_casts and add two FIXMEs about casts that don't look safe.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35856 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 16:45:21 +00:00
Vincent van Ravesteijn
75773f3c22 Use Buffer::ReadStatus as a return value for Buffer::loadLyXFile.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35818 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-25 10:18:42 +00:00
Edwin Leuven
4e5d3469f6 have pointing cursor when hovering something clickable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35806 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-24 21:41:47 +00:00
Vincent van Ravesteijn
152491f916 Some cosmetics (from my local cosmetics branch).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35708 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-18 14:20:03 +00:00
Richard Heck
b1df2bd306 Move the screen redraw call out of the selection-setting routine. This
avoids multiple screen redraws in some cases.

If someone knows how to fix the FIXMEs in GuiErrorList and
GuiSpellcheker, I'd really appreciate it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35651 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-14 15:02:48 +00:00
Richard Heck
03046ddfb0 We only need to set this once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35641 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 18:58:12 +00:00
Richard Heck
d3e4bfb124 Change how some of the updating stuff is handled in lyxfind. I had no
idea what a mess this was.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35639 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-13 18:53:41 +00:00
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