Commit Graph

85 Commits

Author SHA1 Message Date
André Pönitz
848c89564f remove lyxrc dependence from support/*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19441 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-11 22:37:09 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Jean-Marc Lasgouttes
35fa399edd Syncronize with 1.5. This stuff was uncommitted in y tree actually.
* src/BufferView.cpp (workAreaDispatch): set selection status here

	* src/Text3.cpp (dispatch):
	* src/InsetTabular.cpp (doDispatch): and not here


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 10:21:09 +00:00
Jean-Marc Lasgouttes
1c7d395197 * CutAndPaste.cpp (pasteSelection): do not set the selection after
pasting.

	* Text3.cpp (doDispatch/LFUN_MOUSE_PRESS): reorganize the code to make 
	sure that mouseSetCursor gets called (and therefore persistent selection
	stored as needed).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19252 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-31 13:34:09 +00:00
Jürgen Spitzmüller
6b87509156 * src/Text3.cpp (doDispatch):
- always replace selected text when inserting an inset (bug 672)
	- inset selected text in inserted URL inset (bug 683)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19231 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-30 10:33:43 +00:00
Bo Peng
3ac3578e2d Fix Bug 4053: Update other controls allows invalid listings parameters to be passed in listings-related dialogs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19224 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-27 18:17:00 +00:00
Bo Peng
afdf83f235 quick fix for bug: "select, select, middle-button paste" pastes the first selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19199 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-25 05:12:52 +00:00
Jürgen Spitzmüller
bf1af7e3c2 * src/Text3.cpp:
- quick fix for bug 4055 (with FIXME comments)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19185 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-24 15:18:21 +00:00
Abdelrazak Younes
1f70aa50d4 Fix assertion when using paragraph-up/down. This code was wrongly erased in revision 19040.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19069 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-13 16:12:44 +00:00
Abdelrazak Younes
4a53fa6e01 Allow unicode in Layout names.
* Layout.h:
  - name_, obsoleted_by_, depends_on_ are now docstrings.

All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:39:08 +00:00
Abdelrazak Younes
f1a6378d72 Fix bug 3719: TOC skip-to points out of sync with document
http://bugzilla.lyx.org/show_bug.cgi?id=3719

The problem is that the full toc is not regenerated when creating standard (i.e unnembered) paragraph. As the TocBackEnd use ParIterator for in buffer jumps, this can get out of sync. The partial updateLabel() is my doing and comes before the TocBackend stuf. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:20:19 +00:00
Jean-Marc Lasgouttes
f4b65f4e96 * Text3.cpp (doDispatch): fix the behaviour of word-delete-forward,
word-delete-backward and line-delete when there is a selection.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19025 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-10 12:20:00 +00:00
Abdelrazak Younes
e567f1aff2 Fix 3992: Screen update problem in change tracking mode
http://bugzilla.lyx.org/show_bug.cgi?id=3992 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19010 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-09 10:32:28 +00:00
Bo Peng
252ec84acd Remove all saveSelection calls and unify theSelection().setSelection. This is the common, housekeeping part of JMarc's and my patches. Fixes of bug 3877 will come later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19003 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-06 17:03:45 +00:00
Jürgen Spitzmüller
646fe23a4a * src/Text3.cpp (getStatus):
- enable LFUN_MATH_INSERT (fix bug 3557).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18874 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-24 15:35:45 +00:00
Jürgen Spitzmüller
1a25140a94 * src/Text3.cpp: don't reset current_layout too early (fix bug 3727).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18855 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 16:36:30 +00:00
André Pönitz
7a58f8a1d9 allow unicode-insert 0x20
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18854 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 16:27:37 +00:00
Stefan Schimanski
65b5de645b * compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18777 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 05:31:11 +00:00
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
Dov Feldstern
6742e42e79 KeyMap is now switched (if necessary) only just before it is actually used
for translating keystrokes. Up until now, the switching was done in advance
in all kinds of situations, but not just before translating was actually done
--- which resulted in the KeyMap not always being switched on time...

This solves bug #3811 (http://bugzilla.lyx.org/show_bug.cgi?id=3811)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18744 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 22:05:44 +00:00
Stefan Schimanski
7b0e35b933 * cursor forward's behavior depends on bidi level in paragraph. So it's not
appropiate for entering a math inset. The "crash" in #2446 was due to 
  the dispatch not doing anything. Hence the cursor was still in text and
  the assertion was triggered.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18737 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 10:24:20 +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
Stefan Schimanski
ff8fcc268a * no_bidi_isboundary.patch: added isRTLBoundary as a replacement to several references to the Text::bidi object.
(fixes #3790, #3801, #3809)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18704 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 19:50:02 +00:00
Richard Heck
2dbfe820d8 Fix bug 3821: Put cursor where the mouse is before pasting external text.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18702 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 18:13:10 +00:00
Stefan Schimanski
de15c267e3 * Added another isRTL variant which takes a CursorSlice
* Use the isRTL information to compute the cursor position correctly around
  insets in RTL text. Those insets are positioned to the right of the cursor position
  in the text.
  (fixes issue (3) of bug 3551: Cursor movement in and around insets in RTL paragraphs)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-04 18:40:06 +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
Stefan Schimanski
6569cfc81e * avoid redraw if possible (OK by Abdel and Dov)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18580 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-30 19:38:22 +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
eaeea178ea LFUN_MATH_foo: Add assertion to prevent recursive loop in RTL mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18400 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 09:48:26 +00:00
Jürgen Spitzmüller
4976f50634 * src/Text3.cpp: record undo in specialChar.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18379 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-17 08:38:41 +00:00
Abdelrazak Younes
55a26d72d4 Fix cursor movement inside insets by Dov Feldstern.
* Bidi.[h,cpp]: new helper function reverseDirectionNeeded()

* Cursor::isRTL(): delete unused method



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18350 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 17:19:05 +00:00
Jürgen Spitzmüller
a8010a4dc6 fix bug 2758:
* src/Paragraph.cpp:
	- make sure removed bibitems (inside a par) are restored correctly
	  (in pos 0).
* src/Text.{cpp,h} (handleBibitems):
	- new member, used by erase and backspace.
* src/Text3.cpp (getStatus):
	- allow inserting of bibitems only in pos 0.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18304 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 09:24:17 +00:00
Bo Peng
4ce743a0a7 Add support for listings package. Two listings command \lstinline, \lstinputlisting and an environment \lstlisting are supported, along with preamble \lstset. \lstinputlisting is implemented through Include dialog, and the other two are implemented with a new inset listings, along with its dialog.
* src/LyXAction.cpp: listing-insert action
	* src/insets/Inset.h,cpp: LISTINGS_CODE
	* src/insets/InsetInclude.cpp: handle \lstinputlisting
	* src/insets/InsetListings.h,cpp: new listings inset
	* src/insets/InsetListingsParams.h,cpp: parameters from listings package
	* src/insets/InsetCommandParams.h,cpp: handle lstinputlisting option
	* src/Bidi.cpp: handle LISTINGS_CODE
	* src/frontends/qt4/ui/TextLayoutUi.ui: update UI
	* src/frontends/qt4/ui/ListingsUi.ui: new dialog
	* src/frontends/qt4/ui/IncludeUi.ui: update UI
	* src/frontends/qt4/QInclude.h,cpp: add lstinputlisting
	* src/frontends/qt4/QDocument.h,cpp: add textedit for preamble listings_params
	* src/frontends/qt4/QListings.h,cpp: new listings inset
	* src/frontends/qt4/Dialogs.cpp: new listings dialog
	* src/frontends/controllers/ControlInclude.h,cpp: add lstinputlisting
	* src/frontends/controllers/ControlListings.h,cpp: new listings inset
	* src/LyXFunc.cpp: handle LISTING_CODE
	* src/Paragraph.cpp: handle LISTING_CODE
	* src/factory.cpp: new listings inset
	* src/CutAndPaste.cpp: handle LISTINGS_CODE
	* src/LaTeXFeatures.cpp: require listings
	* src/Text3.cpp: Handle LISTINGS_CODE
	* src/lfuns.h: add LFUN_LISTING_INSERT
	* src/Buffer.cpp: change lyx file format to 269
	* src/BufferParams.h,cpp: add listings_params to preamble
	* lib/lyx2lyx/LyX.py: lyx2lyx 
	* lib/lyx2lyx/lyx_1_5.py: lyx2lyx
	* lib/ui/stdmenus.inc: new menu item (no shortcut!)
	* src/insets/Makefile.am: update autotools
	* src/frontends/controllers/Makefile.am
	* src/frontends/qt4/Makefile.dialogs
	* src/frontends/qt4/Makefile.am
	* po/POTFILES.in: a few more translatable files.
	* development/scons/scons_manifest.py: scons build system
	* development/FORMAT: document format changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18243 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 19:11:42 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00