Commit Graph

401 Commits

Author SHA1 Message Date
Stephan Witt
f361c26a05 suppress the misspelled marker only when typing in a word the first time
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37463 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-03 17:27:13 +00:00
Jean-Marc Lasgouttes
370044551c Unify handling of pass thru insets and paragraphs by introducing Paragraph::isPassThru. Many lfuns are now disabled in sweave chunks.
Also, fix #7175 (do not output \noindent in passthru pars)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37328 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-26 11:04:42 +00:00
Abdelrazak Younes
9cf9f86b8f Move buffer dispatching code from GuiView::dispatchToBufferView() to BufferView::dispatch().
The execution order bv -> doc_bv -> buffer -> doc_buffer was artificial and not important AFAIU.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36734 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-05 01:18:32 +00:00
Enrico Forestieri
eb2600483a Fix bug #7068 (Crash when pressing down arrow in an equation when there is a suggestion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36617 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-30 03:54:29 +00:00
Tommaso Cucinotta
d5eb8c0968 (finishing patch -- question was restored, but there were still problems)
Restore the wrap-around question when no more hits found while searching with Advanced Search.
The dispatched() flag is used currently in FindAndReplace.cpp in order to discriminate between
match found and not found and, in the latter case, pop-up the wrap-around question dialog.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36279 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-13 12:02:04 +00:00
Tommaso Cucinotta
112246ae9f Restore the wrap-around question when no more hits found while searching with Advanced Search.
The dispatched() flag is used currently in FindAndReplace.cpp in order to discriminate between
match found and not found and, in the latter case, pop-up the wrap-around question dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36277 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-13 11:35:37 +00:00
Vincent van Ravesteijn
afa873dc5f Remove the FileName parameter of Buffer::loadLyXFile and friends. Now, getAutosaveFileNameFor and getEmergencyFileNamefor can be removed too. Last, the call to lyxvc.file_found_hook can now be centralized and can be given the correct parameter (d->filename instead of the name of the emergency/autosave file).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36145 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 21:21:01 +00:00
Vincent van Ravesteijn
eff06951a9 Centralize preview generation/deletion code to Buffer::updatePreviews and Buffer::removePreviews.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35922 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 20:00:51 +00:00
Vincent van Ravesteijn
ef7ecea2b3 Move the call to Buffer::errors("Parse") from BufferView::insertLyXFile to GuiView::insertLyXFile.
Buffer::errors("Parse") is called 7 times in the whole project. 4 times from GuiView and three times from functions in other classes, but which are (almost) only called from the GuiView. 

Buffer::errors is used to signal the GUI that there might be an error occuring, but what sense does it make if it is only called from the Gui ?

Isn't it better to let the function return wether it succeeded or not and let the GuiView take action in doing something with the possible errors.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35911 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 16:51:50 +00:00
Vincent van Ravesteijn
c5b9664476 Remove the name parameter from string2params and params2string. We can always derive the name with insetName(params.code()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35891 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-29 00:25:28 +00:00
Vincent van Ravesteijn
faab3618ae Fix two potential crashes due to invalid static_casts.
An example of a fatal function call is "gotoInset(this, NOTE_CODE, true)". Luckily we don't check for the contents in LFUN_NOTE_NEXT.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35860 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-27 00:42:43 +00:00
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