Commit Graph

2274 Commits

Author SHA1 Message Date
Stefan Schimanski
98fb638d61 * the old cursor is stored before dispatch and then used after moving
up/down to tell the insets that the cursor left them. The
  notifyCursorLeaves methods can set updateFlags to trigger a redraw.
* leave mathed with cursor up/down and get the math redrawn for the
  decorations



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18773 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-14 20:32:28 +00:00
Bo Peng
985ba3b296 Add bypass validation checkboxes to listings related dialogs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18751 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 17:10:28 +00:00
Jean-Marc Lasgouttes
4ba4d701f7 Remove background_color_ in Insets: it takes a lot of unnecessary memory,
especially in math where each equation has many insets.

	* src/Insets.cpp: remove background_color_ member
	(setBackgroundColor): remove
	(backgroundColor): make virtual

	* insets/InsetBranch.cpp:
	* insets/InsetNote.cpp: move color setting code from setButtonLabel to 
	backgroundColor.

	* insets/InsetBox.cpp (setButtonLabel): remove call to setBackgroundColor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18750 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 13:45:49 +00:00
Stefan Schimanski
82c2fbf81a * they are conceptionally the same and should be merged
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18743 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 18:29:11 +00:00
Jürgen Spitzmüller
5d8e1d7dc5 * src/insets/insetBranch.cpp (doDispatch):
- remove wrong check, fix bug 3835.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18734 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 05:12:10 +00:00
Bo Peng
c20baf584c Revert rev18728, which is not a good idea
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18729 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 18:06:11 +00:00
Bo Peng
05439b953b Allow prefixing a listings parameter with @ to bypass validation, useful when new parameters are added in a new listings version
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18728 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 13:34:17 +00:00
Abdelrazak Younes
f8ee89093d Fix warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18726 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 13:18:54 +00:00
Abdelrazak Younes
bb8df6cc00 following rev. 18724 boost/signal is not needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18725 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 13:12:23 +00:00
Abdelrazak Younes
8f65acf693 Following revision 18723, Inset::destroyed() signal is not needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18724 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-09 13:08:44 +00:00
Bo Peng
3a5c55e30d Fix bug3782, crash with selection of table cells, joint work with JMarc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18709 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 21:55:55 +00:00
Bo Peng
358e7136f2 Fix compiling errors caused by r18701 (moving drawMarkers and drawMarkers2 back to Inset)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18708 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 21:36:42 +00:00
Bo Peng
8153ea8fa7 Show corners of mathed with mouse hover, details see bug 3825
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18701 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 18:08:03 +00:00
Bo Peng
7350639361 Update Toc when navigation menu is trigged.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18693 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-06 21:19:15 +00:00
Bo Peng
3175ee9c0d Add listings parameter linerange, new in listings 1.4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18688 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-06 02:03:16 +00:00
Bo Peng
276f6fcde5 ?xxx show all parameters containing xxx in InsetListingsParams, remove all_param_names_ from ParValidator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18687 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-05 22:08:43 +00:00
Bo Peng
8aa6a50e69 remove pit from addToToc definition in Inset.h, as reminded by Andre
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18683 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-05 18:58:07 +00:00
Bo Peng
d3e30f8d9b addToToc, pass parent ParConstIterator, fix bug 3711
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18680 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-05 17:24:11 +00:00
Michael Schmitt
70dce83dee * src/insets/InsetListingsParams.cpp: fix user message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18635 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-03 06:30:08 +00:00
Bo Peng
9506a284d1 Fix bug 3363: mark buffer dirty after middle button paste in plain text and table; set cursor at the end of pasted text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18632 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-02 13:34:06 +00:00
Bo Peng
fc82d491ab InsetListingsParams: allow key=value,key=value1 in listings parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18604 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-31 22:02:55 +00:00
José Matox
35eb5ddb22 Add support for Farsi (thanks to Mostafa Vahedi).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18599 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-31 18:53:01 +00:00
Abdelrazak Younes
d075cb25b8 This patch transfer Inset::destroyed signal to InsetText and InsetMathNest thus freeing some memory as normal math chars and symbols won't have it.
It also solve a crash with non disconnect boost::signal and gcc-3.3 or 3.4.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18592 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-31 12:30:17 +00:00
Michael Schmitt
4cdd8f3428 * src/insets/InsetListingsParams.cpp: fix/improve message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18589 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-31 11:51:23 +00:00
Michael Schmitt
6acdda13e9 * src/insets/InsetListingsParams.cpp: fix message: "latex" => "LaTeX"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18581 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-30 20:57:17 +00:00
Michael Schmitt
78b71f9863 replace "Listings" by "Listing" (plural => singular)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18570 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-29 21:23:23 +00:00
Stefan Schimanski
880b6c4d6e 1. switch LFUN_UP/DOWN handling to a structural approach, i.e. the
dispatchers in mathed and text only do local work, i.e. only try to
move the cursor with their local knowledge, not globally as before in
the Cursor::goUpDown function before. The old approach used one of
brutefind functions as a last way out to really move the cursor up or
down. The result was some strange behavior that the nearest inset was
selected when jumping from math to text, not one in the next line. 
2. removed LFUN_FINISHED_UP/DOWN, as there seem to be no effect and it
seems to be obsolete.
3. target_x is working again, mainly by adding a textTargetOffset_
member to the Cursor which keeps the difference between the target_x
and the actual position of the cursor on screen. As long as
pos+offset=target is fulfilled the target_x is not touched and the
cursor keep the column while going up/down.
4. moved the text cursor up/down code to the Cursor class, in analogy
to the mathed code.
5. For 1 it is necessary to know the cursor position before the
dispatch. So this data is added to the Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18569 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-29 20:53:32 +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
Abdelrazak Younes
2dca49b74a * ListingsParam::ListingsParam(): use const ref.
* add some doxygen comments and FIXME.

* white space.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18536 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-27 22:46:09 +00:00
Abdelrazak Younes
e73f79e33e * InsetListingsParams.cpp: Code reorganization. Should fix bug 3639 and open the way to more advanced gui controls.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18533 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-27 11:55:46 +00:00
Bo Peng
aa31866501 Do not use \&@#^_~$ as lstinline delimiter, as suggested by Herbert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18529 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 20:45:24 +00:00
Richard Heck
df99a5c933 Change related to 18445: buffer.fileName() uses .absFilename().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18524 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 17:33:52 +00:00
Richard Heck
c0b5fb6a80 Make logic clearer, with help from Lars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18523 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 17:26:58 +00:00
Abdelrazak Younes
b49194c645 add some const.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18522 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 15:03:19 +00:00
Abdelrazak Younes
5cfe249522 - white space
- replace an occurrence of from_ascii() to _() for translation


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18521 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 14:53:12 +00:00
Abdelrazak Younes
398c24b8f2 - Convert char * to string and docstring for the hints, thus fixing the translation.
- cleanup the header.
- encapsulate local code in local namespace.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 14:45:38 +00:00
Michael Schmitt
de35c25d8d * src/insets/InsetInclude.cpp: formatting (in response to r18445)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18517 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-26 11:25:41 +00:00
Abdelrazak Younes
3fdbf5b9c4 Sanitize cursor saving/restoring in a multi-view context.
* Inset: new destroyed signal (copy ctor and operator= needed because of a signal is not copiable)

* CursorSlice:
 - connect to inset destructor wherever possible
 - invalidate(), isValid(): new method.
 - inset_: now private

* DocIterator::fixIfBroken(): new method for properly fixing cursors.

* StableDocIterator::asDocIterator(): verify cursor sanity before creating it.

* Cursor::fixIfBroken(): now a simple wrapper around DocIterator::fixIfBroken()

* BufferView::setBuffer(): verify cursor sanity before restoring it.

* WorkArea::redraw(): verify cursor sanity of concurrent BufferView display.


 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18516 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 23:17:24 +00:00
Bo Peng
093b9452a4 Choose a delimiter for lstinline (braces can not be used for some listings version)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18513 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 16:15:02 +00:00
Bo Peng
5b731aa6a5 InsetListings: use float for placements because of the handling differences between float and floatplacement
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18508 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 14:38:22 +00:00
Bo Peng
1d99202d88 Minor fixes, in response to Lar's email
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18504 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-25 01:02:38 +00:00
Bo Peng
e5bf150a0c Use a new internal structure for InsetListingsParams, fix bugs 3713 and 3718
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18501 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 22:19:58 +00:00
Richard Heck
b28458129d Forgot to restore this before committing 18494. This fixes bug 3725.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18500 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 22:17:04 +00:00
Richard Heck
5fed0e44ed Fix stupid use of "or".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18496 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 19:19:23 +00:00
Richard Heck
d2fb80eec7 Fix for bugs 2199 and 3667. Most of the changes were to the logic. Buffers
that were opened for possible included LyX files need to be closed if those
files cannot be loaded, for example. A bit more work was needed to allow a
LyX file to include itself as a verbatim or listings without trying to load
itself and without relying upon loadIfNeeded() to report the problem.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18494 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 17:17:04 +00:00
Bo Peng
1561aef0b5 Increase listings counter for InsetInclude with lstinputlisting and a caption, fix bug 3708
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18486 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 14:10:35 +00:00
Bo Peng
f8b1ce4ada Allow listing the lyx file itself, fix bug 3707
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18477 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-23 19:24:06 +00:00
Jean-Marc Lasgouttes
e499a5428e Fix bug 3301 (selecting buttons (e.g. a citation) with the mouse opens dialog)
* insets/InsetExternal.cpp (doDispatch):
	* insets/InsetGraphics.cpp (doDispatch):
	* insets/InsetInclude.cpp (doDispatch):
	* insets/InsetCommand.cpp (doDispatch):
	* insets/InsetVSpace.cpp (doDispatch): do not open dialog if a 
	selection is set.

	* insets/InsetRef.cpp (doDispatch):
	* insets/InsetCharStyle.cpp (doDispatch): act on mouse release, not
	mouse press.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18473 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-23 10:35:57 +00:00
Abdelrazak Younes
5112e0f821 Fix crash with collapsable insets and multiple views
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18471 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-23 07:43:16 +00:00
Bo Peng
b78c1db290 Make listings dialog translatable (mostly strings from InsetListingsParams), fix bug 3645
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18468 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-23 02:09:58 +00:00