Commit Graph

9492 Commits

Author SHA1 Message Date
Michael Schmitt
1761baaf24 * src/lyxfind.C: fix change tracking crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17011 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 17:26:29 +00:00
Abdelrazak Younes
cdd8c9e076 As explained in the comments, this is a partial fix for bug 2154:
http://bugzilla.lyx.org/show_bug.cgi?id=2154

This will automatically put the label inset _after_ a numbered section. It is possible to extend the mechanism to any kind of LateX environment.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17010 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 17:21:05 +00:00
Michael Schmitt
3988637488 * src/text3.C: fix comment (now it makes sense)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17009 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 16:23:24 +00:00
Abdelrazak Younes
969ab85d98 A better fix for bug 675:
http://bugzilla.lyx.org/show_bug.cgi?id=675

The former one also disabled cross-reference insertion.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17008 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 14:43:13 +00:00
Abdelrazak Younes
685e90bc49 Really fix bug 675:
http://bugzilla.lyx.org/show_bug.cgi?id=675



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17006 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 14:18:50 +00:00
Abdelrazak Younes
0a1a789c52 Partially fix bug 675, the graphics dialog still opens will disabled button...
http://bugzilla.lyx.org/show_bug.cgi?id=675



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17005 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 13:39:20 +00:00
Michael Schmitt
5ffb6cfbe2 * src/BufferView.C: make accept/reject-all-changes atomic operations (also fixes a crash)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17003 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 13:19:05 +00:00
Georg Baum
b5787f6112 Bug fix of the day: 2963 (print to file overwrites files without warning)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17002 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 12:55:57 +00:00
Abdelrazak Younes
0e0a17ff0a Fix lists of figures and tables. Prepare the code for user defined captions.
* buffer_funcs.C::setCaptionLabels(): set the type as well as the custom label.

* InsetCaption:
  - setType(): new method to set the type of the caption
  - setCustomLabel(): renamed from setLabel, translate if possible.
  - addToToc(): implement.
  - metrics(): use custom_label_ if defined.

* InsetFloat::addToToc(): don't do anything.

* InsetWrap::addToToc(): don't do anything.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17001 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 12:45:14 +00:00
Abdelrazak Younes
42ff801ec9 Add empty paragraphs before and after the caption inset upon float (or wrap) inset creation.
Hopefully fix bug 675:

http://bugzilla.lyx.org/show_bug.cgi?id=675

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16999 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 09:22:03 +00:00
Georg Baum
7a9da2b93a From John C. McCabe-Dansted:
Don't display n copies of the errors if you run chktex n times.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16998 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 08:55:31 +00:00
Enrico Forestieri
bdbe6d3d7d Fix bug 3181.
* src/frontends/qt4/QLPainter.C
	(QLPainter::text): Render the symbol whose codepoint is 0x00ad
	through a one-column QTextLine in order to fool Qt, which displays
	what it thinks is a soft-hyphen only when occurring at a line-break.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16997 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-01 03:56:23 +00:00
Uwe Stöhr
76bac51526 fix bug 895
http://bugzilla.lyx.org/show_bug.cgi?id=895

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16992 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 20:41:28 +00:00
Georg Baum
a980f1bd61 Missing bits of Uwe's file format change from yesterday.
Uwe, please add an exact decsription of the lyxline changes to
development/FORMAT: How did the old version work, and what are the changes
of the new one.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16991 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 20:39:46 +00:00
Abdelrazak Younes
24e8395eb8 Avoid recursive loop and let it crash "normally" (bug 3189).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16982 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 17:59:48 +00:00
Georg Baum
5af543c25e Fix bug 3107
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16981 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 16:07:37 +00:00
Jean-Marc Lasgouttes
6673b00059 * buffer.C (readFile): reword error message when lyx2lyx fails.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16974 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 15:27:05 +00:00
Abdelrazak Younes
e215d6c8f6 Fix bug 3124: always update the Labels after an undo or redo operation.
http://bugzilla.lyx.org/show_bug.cgi?id=3124

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16971 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 14:36:15 +00:00
Abdelrazak Younes
0da3d53269 Fix bug 3148: always update the Labels if a DEPM is triggered.
http://bugzilla.lyx.org/show_bug.cgi?id=3148

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16969 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 14:07:37 +00:00
Abdelrazak Younes
198a1c3976 Add "Senseless!!! " label to non supported caption.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16968 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 13:35:12 +00:00
Abdelrazak Younes
ce7c45bb43 Fix 3188, update the labels at each Caption insertion.
http://bugzilla.lyx.org/show_bug.cgi?id=3188




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 10:54:36 +00:00
Abdelrazak Younes
99b41514b6 Fix bug 3170:
http://bugzilla.lyx.org/show_bug.cgi?id=3170

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16964 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 09:55:12 +00:00
Bo Peng
f189214a89 Session: restore toolbars in the right order and location
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16963 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 02:39:46 +00:00
Uwe Stöhr
9f871ade65 new \lyxline difinition, fixes also bug 1988:
http://bugzilla.lyx.org/show_bug.cgi?id=1988

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16962 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-31 01:15:14 +00:00
Peter Kümmel
056550b311 prepare lyxerr for using
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16952 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-30 20:11:05 +00:00
Bo Peng
aaa544313d Slightly better toolbar session restoration, from Jurgen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-30 15:30:33 +00:00
Abdelrazak Younes
c0fad86431 Fix bug 3177:
http://bugzilla.lyx.org/show_bug.cgi?id=3177


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16949 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-30 13:54:28 +00:00
Abdelrazak Younes
500a5f959f The caption inset patch by Georg, Martin and myself.
* buffer.C: increase LyX format to 257.

* lyxtextclass.C: increase FORMAT format to 3.

* buffer_funcs.C: 
  - setCaptionLabels(): new recursive function
  - setCaptions(): new function
  - updateLabels(): call setCaptions() for each paragraph.

* InsetCaption:
  - add a virtual destructor
  - overload InsetText' getStatus() and wide().
  - setLabel(): only set the new private member label_.
  - metrics(): don't set label here and correct for title metrics.
  - draw(): don't set label here
  - latex(): fix optional argument.
  - plaintext(): implement!

* InsetText:
  - add a virtual destructor
  - add virtual to getStatus() and wide().

*  output_latex.[Ch]: move latexOptArgInsets() out of anon namespace.

* text3.C: enable LFUN_CAPTION_INSERT


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16948 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-30 13:23:21 +00:00
Jean-Marc Lasgouttes
bff9688e4a fix typo reported by John McCabe-Dansted
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16944 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-30 10:42:19 +00:00
Peter Kümmel
2af3ebc903 revert tab patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16942 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 22:07:40 +00:00
José Matox
efa3955204 Fix bug 2841
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16938 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 20:28:44 +00:00
Peter Kümmel
fda173a818 Berhard's tab patch: crash after saving new buffer and change to another new buffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16937 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 20:06:08 +00:00
Peter Kümmel
40bced2e30 Berhard's tab patch: immediatly show saved filename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 20:04:10 +00:00
Georg Baum
04debb8056 Revert unwanted stuff from last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16932 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:37:13 +00:00
Georg Baum
a76050219a Fix LyX paste from system clipboard when the file format does not match
* src/buffer.C
	(Buffer::readString): Tell readFile that we do not have a file
	(Buffer::readString): readFile(name) returns a bool, not an enum


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16931 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:35:56 +00:00
Georg Baum
cc04805782 fix another crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16930 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:08:13 +00:00
Jürgen Spitzmüller
662d9e7d85 * src/frontends/qt4/QLToolbar.C: whitespace only
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16929 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 17:03:21 +00:00
Jürgen Spitzmüller
e36f9947cb * src/frontends/qt4/GuiView.[Ch]:
- fix false toolbar positioning for qt < 4.2.2
	- only add ToolBarBreak if the toolbar exceeds the line
	  (not perfect yet)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16927 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 14:23:05 +00:00
Abdelrazak Younes
b3ced091d2 fix typo in commit 16925
.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16926 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 10:05:41 +00:00
Abdelrazak Younes
aa2300a621 Fix bug 3142 (LyX crashes when using mouse wheel)
http://bugzilla.lyx.org/show_bug.cgi?id=3142

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16925 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 10:04:02 +00:00
Georg Baum
e4bc56a27e Do not attempt to output characters of empty paragraphs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16924 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 09:40:04 +00:00
Jürgen Spitzmüller
f0fa6f4448 * src/encoding.C: add forgotten header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16923 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 08:49:01 +00:00
Georg Baum
9f720aa3bd add forgotten header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16922 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 08:18:21 +00:00
Abdelrazak Younes
4455968d79 Fix this bug:
After saving a new file or "save as.." the filename is not updated in the tab. This patch fixes this.

Credits goes to Bernhard Roider.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16921 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 22:27:26 +00:00
Georg Baum
feb7895965 Add machinery to output arbitrary unicode characters with LaTeX commands
read from a text file.

	* src/encoding.[Ch]

	(Encoding::latexChar): New, output a character to LaTeX
	(Encoding::validate): New, add needed preamble stuff for a character
	(Encodings::read): Read new unicodesymbols file
	(Encodings::isCombiningChar): New, is a character a combining char?

	* src/paragraph_pimpl.C
	(isEncoding): Delete, no longer needed
	(getEncoding): New, get the real encoding of a font
	(Paragraph::Pimpl::latexSurrogatePair): New, output a surrogate pair
	to LaTeX
	(Paragraph::Pimpl::simpleTeXBlanks): Use latexSurrogatePair if needed
	(Paragraph::Pimpl::simpleTeXSpecialChars): Ditto, and replace several
	hardcoded characters with a call of encoding.latexChar()
	(Paragraph::Pimpl::validate): replace several hardcoded characters
	with a call of encoding.validate()

	* src/support/debugstream.h
	(basic_debugstream::disable): New, disable the stream completely
	(basic_debugstream::enable): New, reenable the stream

	* src/lyx_main.[Ch]: Adjust to changes above

	* src/paragraph.C: Ditto

	* lib/unicodesymbols: New file with UCS4 -> LaTeX command mapping.
	It is far from complete yet, but contains most accents on latin
	characters.

	* lib/Makefile.am: add lib/unicodesymbols

	* development/scons/scons_manifest.py: ditto

	* development/tools/unicodesymbols.py: Helper script to update
	lib/unicodesymbols with new symbols


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16920 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 21:27:45 +00:00
Bo Peng
eb495d2e98 Fix Bug3171: update bookmark after saveCursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16919 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 21:12:33 +00:00
Abdelrazak Younes
1e74e516dc Fix focus bug 3153.
http://bugzilla.lyx.org/show_bug.cgi?id=3153

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16912 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 20:10:47 +00:00
Georg Baum
e6b2b34097 Add two FIXMEs for Michael
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16911 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 19:36:30 +00:00
Georg Baum
8b90b75501 * src/text.C
(LyXText::currentState): Unicode debugging aid: Display UCS4 code
	point in devel builds


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16910 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 19:17:59 +00:00
Bo Peng
94408c72a7 Fix confirm overwrite asked twice, from Bernhard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16907 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 15:19:20 +00:00
Georg Baum
fdba3fadfe Small optimization for the unicodesymbols patch
* src/encoding.C
	(LaTeXNamesEqual): Delete comparison class: It is no longer needed
	(Encodings::getFromLaTeXName): Don't use std::find_if since it makes
	copies of the map contents


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16903 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 10:07:17 +00:00
Bo Peng
66b7c7eebf BUG3127 Toolbar display: restore all toolbars to different lines. Not good but better than the current situation. qt > 4.2.2 is required.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16895 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 20:54:17 +00:00
Georg Baum
b15a9ade28 Fix bug 2182: LyX should default unknown classes to article class
* src/bufferparams.C
	(BufferParams::readToken): If the text class is unknown, use the
	same code as in the constructor to set a default


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16888 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 17:22:58 +00:00
Georg Baum
4ad3995b2a Fix bug 3145: not possible to copy stuff from dialogs to document text.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16887 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 16:55:25 +00:00
Michael Schmitt
0522d02d08 * frontends/qt4/GuiView.C: fix localization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16882 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 14:42:45 +00:00
Abdelrazak Younes
c4d317d217 Prepare for advanced mouse click selections.
* WorkArea::dispatch(): add modifiers argument.

* GuiWorkArea::mousePressEvent(): transmit the modifier to WorkArea::dispatch().
 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16878 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 10:41:03 +00:00
Abdelrazak Younes
ecb37d95df Limit the work-around in rev. 16874 to Windows.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16877 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 10:24:15 +00:00
Abdelrazak Younes
a8d01415d1 Fix bug 3138 (http://bugzilla.lyx.org/show_bug.cgi?id=3138).
* BufferView::setCursorFromScrollbar(): Reset the cursor in any case because bv_funcs::status() does not work when the cursor is within mathed.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16876 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-27 09:04:36 +00:00
Abdelrazak Younes
d4f8fe1249 Allows editing when the Prefs dialog is opened; fix bug 3140:
http://bugzilla.lyx.org/show_bug.cgi?id=3140

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16875 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-26 22:38:14 +00:00
Abdelrazak Younes
ca144be319 Work around bug 2859 by Bernhard R.:
http://bugzilla.lyx.org/show_bug.cgi?id=2859



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16874 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-26 22:04:51 +00:00
Abdelrazak Younes
dcbc8a1566 MSVC warning (signed/unsigned).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16869 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-26 12:32:03 +00:00
Bo Peng
ef17f583f3 Fix compiling errors caused by LyXText::ChangeOp::ACCEPT
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16865 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-26 04:08:27 +00:00
Michael Schmitt
89b422b320 * src/text2.C: deleteEmptyParagraphMechanism(): fix a crash in
LyXText::acceptOrRejectChanges() caused by too aggressive deletion
	


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16860 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 22:51:00 +00:00
Michael Schmitt
77427d620a * src/lyxtext.h:
* src/text.C: rename acceptOrRejectChange() to acceptOrRejectChanges() because it can handle many changes within the given selection; add acceptChanges() and rejectChanges()

* src/text3.C:
* src/BufferView.C: adjust

* src/insets/insettext.C: accept/rejectChanges() become wrapper methods that call LyXText::acccept/rejectChanges

* src/text2.C: add assertion

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 22:28:15 +00:00
Michael Schmitt
f4cc84d5a6 * src/lyxtext.h: add enum ChangeOp (ACCEPT/REJECT); add deleteEmptyParagraphMechanism()
* src/text.C:
* src/text3.C:
* src/BufferView.C: adjust

* src/insets/insettext.C: acceptChanges() / rejectChanges(): fix pars_size bug introduced in previous commit; call deleteEmptyParagraphMechanism()

* src/text2.C: track changes in DEPM (I am not sure about whether this is actually useful; time will tell..); add deleteEmptyParagraphMechanism(pit_type, pit_type, bool)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16858 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 21:18:36 +00:00
Georg Baum
27a777ccc6 Real fix from Bernhard Roider
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16857 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 21:12:12 +00:00
Georg Baum
c68f3da771 add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16856 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 21:02:08 +00:00
Abdelrazak Younes
3c1d5a48af Fix bug 3135 by Bernhard Roider:
<http://bugzilla.lyx.org/show_bug.cgi?id=3135> 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16855 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 20:16:30 +00:00
Abdelrazak Younes
d682f36a67 Fix this bug:
1) View->Postscript
2) Export->LaTeX (plain)
 
1) will generate an error. 2) succeeeds (as it should), but the old error list is displayed again.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16850 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 13:10:27 +00:00
Abdelrazak Younes
2a890b4b96 Avoid errorList copy.
* ControlErrorList:
  - error_list_: deleted
  - error_type_: new private member.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16849 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 10:39:40 +00:00
Abdelrazak Younes
2a1da61470 * QErrorList::update_contents(): avoid touching the dialog here.
* QErrorListDialog::showEvent(): new method. Set the error on the first item.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16848 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 10:21:02 +00:00
Enrico Forestieri
cc5b44cb1c Fix compiler warning about multi-character constant
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16845 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 02:06:06 +00:00
Abdelrazak Younes
c347f0467b Remove buggy and redundant BufferView::update() calls.
* BufferView::dispatch() now returns an Update::flags.

* lyx_cb.C::insertPlaintextFile(): delete redundant BufferView::update() call.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16844 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 23:10:03 +00:00
Abdelrazak Younes
e4c489376c Fix screen update after CT bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 23:05:40 +00:00
Georg Baum
0657a91fd0 fix compiler warnings about unused parameter
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16839 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 19:02:41 +00:00
Abdelrazak Younes
024275f069 Small formatting and comment cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16838 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 17:19:56 +00:00
Abdelrazak Younes
3f8fa07c6e get rid of MSVC warning (signed/unsigned comparison)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16837 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 17:05:49 +00:00
Georg Baum
753d2cafa5 compile fix: std::exception does only have a default constructor, the other
constrcutor is non-standard.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16835 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 16:24:47 +00:00
Abdelrazak Younes
801f807063 Display error/warning dialogs if possible.
* ExceptionMessage: new exception based message for errors and warnings.

* package.C.in:
  - replace lyxerr based errors and warning with ExceptionMessage throwing.
  - bail_out(): erased!

* os_win32.C:
  - replace lyxerr based errors and warning with ExceptionMessage throwing.
  - bail_out(): erased!

* tex2lyx.C: catch any exception from Package class.

* lyx_main.C:  catch any exception from Package class and act accordingly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16834 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 15:49:20 +00:00
Georg Baum
9281cd4675 We use char_type, not size_t for storing UCS4 characters.
This may make a difference when char_type is signed.

	* src/frontends/LyXKeySym.h
	(getUCSEncoded): change return type from size_t to char_type

	* src/frontends/qt4/QLyXKeySym.[Ch]
	(getUCSEncoded): ditto

	* src/lyxfunc.C
	(LyXFunc::processKeySym): adjust to the above and add a FIXME since
	this is strange code that looks like it was not intended to do what
	it does.

	* src/lyxfunc.h
	(encoded_last_key): Correct documentation


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16833 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 14:01:34 +00:00
Georg Baum
cb71a1c869 whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16832 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 13:33:13 +00:00
Michael Schmitt
2e09a925a5 * src/lyxtext.h:
* src/BufferView.C:
* src/text3.C:
* src/text.C: merge methods acceptChange() and rejectChange() to acceptOrRejectChange() because they share a lot of tricky code

* src/text.C: yet another revision of acceptOrRejectChange()

* src/paragraph.C:
* src/paragraph.h:
* src/paragraph_pimpl.C:
* src/paragraph_pimpl.h:
* src/insets/insettabular.C:
* src/insets/insettabular.h:
* src/insets/insettext.C:
* src/insets/insettext.h:
* src/insets/insetbase.h: pass BufferParams to acceptChanges() and rejectChanges() (needed for paragraph merging)

* src/insets/insettext.C: handle end-of-par in acceptChanges() and rejectChanges()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16830 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 21:53:16 +00:00
Abdelrazak Younes
0e85d5b1c0 revert last change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16829 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 15:23:59 +00:00
Abdelrazak Younes
2b1740d92d revert last change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16828 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 15:09:00 +00:00
Abdelrazak Younes
278e4a7326 Write the warnings and errors both to lyxerr and to the dialog.
If the mode is nogui don't raise the dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16827 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 14:29:15 +00:00
Abdelrazak Younes
6823d09f6b Replace lyxerr based warnings and errors with Alert::error() and Alert::warning().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16826 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:30:30 +00:00
Michael Schmitt
76ad6628fd * src/text.C: implement rejectChange() as the inverse of acceptChange()
(requires some further testing)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16825 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:25:50 +00:00
Abdelrazak Younes
a8c862dfe9 Replace lyxerr based warnings and errors with Alert::error() and Alert::warning().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16824 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:09:28 +00:00
Abdelrazak Younes
6d7cd27910 With this commit, errors and warnings can use message box even before LyX is properly initialized. This is especially useful for missing sysdir and/or userdir directory.
* Alert.C:
  - error(): calls error_pimpl() in any case.
  - warning(): calls warning_pimpl() in any case.

* Alert_pimpl.C:
  - error_pimpl(): construct a QApplication if LyX is not initialized yet.
  - warning_pimpl(): ditto.

* lyx_main.C:
  - parse_sysdir(): replace lyxerr with Alert::error().
  - parse_userdir(): ditto.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16823 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 12:38:20 +00:00
Abdelrazak Younes
19eb9d6292 Fix inverse DVI search as reported on the french list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16811 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-22 15:00:33 +00:00
Jean-Marc Lasgouttes
e28331ed63 * src/LyXAction.C: mark goto-clear-bookmark as working without buffer
* src/lyxfunc.C (getStatus): move handling of LFUN_LYX_QUIT, 
	LFUN_BOOKMARK_GOTO, LFUN_BOOKMARK_CLEAR and LFUN_TOOLBAR_TOGGLE_STATE
	where they belong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16810 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-22 14:43:45 +00:00
Abdelrazak Younes
f653a9e979 Cleanup Action class: The mother should be the main window (GuiView). This will hopefully fix bug 3107 (Tooltips not showing on main window).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16807 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-22 11:31:42 +00:00
Enrico Forestieri
b9aa557b35 Fix encoding of converters path and arguments
* src/converter.C
	(Converters::convert): Convert command to be executed to the proper
	encoding. Use from_utf8 instead of from_ascii in order to avoid
	assertions when displaying an alert.

	* src/support/docstring.[Ch]
	(to_filesystem8bit): new conversion function.

	* lib/scripts/fig2pstex.py
	* lib/scripts/fig2pdftex.py:
	Modified to reflect the changes above.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16803 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-22 02:58:47 +00:00
Georg Baum
dbfda45b19 Compile fix.
Michael, I guess that you need to retest this code, since the old one did
obviously not do what you intended.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16801 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:52:01 +00:00
Georg Baum
bac837c959 From Bernhard Roider:
* src/insets/insetexternal.C
	(InsetExternalParams::read): Read filenames with spaces correctly


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16800 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:46:33 +00:00
Michael Schmitt
c4a10a953c * src/text.C: acceptChange(): complete rewrite; there should be no crashes any more
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16799 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:20:51 +00:00
Michael Schmitt
1a413a2d98 * src/paragraph.h:
* src/paragraph.C: stripLeadingSpaces(); return boolean indicating
	whether any character has been deleted - either physically or logically


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16798 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 21:11:27 +00:00
Abdelrazak Younes
ccd07a7fb4 add comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16797 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 16:55:41 +00:00
Abdelrazak Younes
02ec2834f1 Fix crash when breaking paragraph and Change tracking is involved.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16796 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 16:43:27 +00:00
Michael Schmitt
e5dbc07931 * src/output_plaintext.C: partially revert r16780
to support RtL languages


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16791 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-21 09:46:15 +00:00
Michael Schmitt
e222e80510 * src/MenuBackend.C: Import plain text: align
labels with menu entries in stdmenus.inc


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16788 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 18:38:06 +00:00
Georg Baum
b3b513167f count correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16785 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 17:21:52 +00:00
Georg Baum
b9d1b797c9 Some renaming (has been discussed a long time ago)
* src/LaTeXFeatures.[Ch]
	(LaTeXFeatures::addExternalPreamble): rename to addPreambleSnippet,
	since this is not specialized for InsetExternal at all

	* src/insets/insetexternal.C
	(InsetExternal::validate): reflect name change above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16784 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 17:08:39 +00:00
Michael Schmitt
fb84e1ca52 * src/text.C: move forward when logically deleting character
(previously broken; the cursor was even moved forward if
	the character was physically removed and the next character was
	marked as deleted)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16783 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 16:59:13 +00:00
Michael Schmitt
14102b6e99 * src/output_plaintext.C: fix line break handling;
don't stop 10 characters before max line length


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16782 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 16:38:58 +00:00
Michael Schmitt
954f6feee7 * src/output_plaintext.C: remove cryptic comment;
do not output deleted characters in plain text output


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16781 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 16:25:52 +00:00
Michael Schmitt
6b39c832ce * src/output_plaintext.C: save two *.po entries;
output label+space only if label is not empty


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16780 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 16:14:39 +00:00
Michael Schmitt
9f74aa4fe2 * src/output_plaintext.C: fix line breaks in plain text output;
add a line break at the end of each paragraph; add a second line break
	if maximum line length is > 0


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16779 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 15:35:39 +00:00
Michael Schmitt
c73e175f04 * src/paragraph_pimpl.C: check for linelen == 0 in LaTeX output;
otherwise, every word in printed on a separate line


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16778 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 15:07:20 +00:00
Michael Schmitt
3092763e2e * output_plaintext.C: cosmetics in comment: line length cannot be < 0
* frontends/qt4/ui/QPrefPlaintextUi.ui:
	* lyxrc.C: align descriptions (saves a message in *.po)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16777 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 14:51:40 +00:00
Georg Baum
e586357ce5 whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16776 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 13:17:40 +00:00
Abdelrazak Younes
240086a1de Fix typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16775 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 08:43:51 +00:00
Abdelrazak Younes
d6cc04e762 Fix cursor navigation in math.
* metricsinfo.h:
  - ScreenUpdateStrategy: new enum describing the screen update strategy (replace singlepar boolean).

* UpdateFlags.h:
  new Update::Decoration flag.

* BufferView.C
  - update(): takes Decoration flag into account (CoordCache is not cleared out). Fills in metrics_info_.update_strategy

* mathed/InsetMathNest.C: adjust the cursor flags to new strategy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16774 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 01:23:07 +00:00
Abdelrazak Younes
5ed7e7a03c PreparePrepare for independent decoration drawing and correct a CoordCache bug: Previously, only the math insets containing the cursor were put in the cache. I believe this was the reason for some of the weird problems with cursors in math (egg: cursor trapped in a fraction).
* insetbase.C
  - drawMarkers(): draw the decoration in any case (but visible only in editing mode). Fill-in the CoordCache in any case.
  - drawMarkers2(): ditto.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16773 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 01:15:05 +00:00
Abdelrazak Younes
5c4844af43 Prepare for independent decoration drawing.
* InsetBase::drawDecoration(): new method.

* all other files: implement drawDecoration().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16772 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 00:55:24 +00:00
Peter Kümmel
e2d14f9023 coding style: fix crash on buffer-switching (2 tabs) + toc-clicking
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16770 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 22:17:01 +00:00
Peter Kümmel
2d0838650c fix crash on buffer-switching (2 tabs) + toc-clicking
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16769 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 22:16:26 +00:00
Jean-Marc Lasgouttes
2de99bed22 * insetbranch.C (textString): implement, so that branches appear
in the ToC.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16767 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 16:23:47 +00:00
Jean-Marc Lasgouttes
b7518c3c95 * insets/insetbase.h (textString): Simplify the signature
* insets/insetquotes.C (textString):
	* insets/insetcharstyle.C (textString):
	* mathed/InsetMathHull.C (textString): adapt.

	* insets/insetquote.C (plaintext, textString): output disString 
	instead of a raw quote.

	* paragraph.C: adapt and remove unused methods.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16766 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 16:23:13 +00:00
Jean-Marc Lasgouttes
76dc838dfe * output_plaintext.C (asciiParagraph): output things in the right
order when there is an inset and runparams.linelen == 0.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16765 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 16:17:39 +00:00
Jean-Marc Lasgouttes
9a600f0e30 * lyx_main.C (readUIFile): when reading an include file which name
ends in .ui, try the .inc version too (support for user ui files)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16762 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 14:30:30 +00:00
Enrico Forestieri
d4041ea53b Fix encoding of bibtex keys and files read from the latex aux file
* src/LaTeX.C
	(LaTeX::scanAuxFile): Convert to utf8 citation keys and filenames.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 00:55:17 +00:00
Michael Schmitt
c5df681fe8 * insets/insetfloatlist.C:
* insets/insettoc.C:
	* TocBackend.C:
	* TocBackend.h: rename 'asciiTocList()' to '.writePlaintextTocList'

	* insets/insettext.C:
	* output_plaintext.C:
	* output_plaintext.h: rename 'asciiParagraph' to 'writePlaintextParagraph'

	* output_plaintext.C:
	* exporter.C:
	* output_plaintext.h: rename 'writeFileAscii' to 'writePlaintextFile'

	* lyxrc.C: change lyxrc section title (ASCII => PLAIN TEXT)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16756 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 22:29:50 +00:00
Michael Schmitt
25079a83c2 * LyXView.C:
* qt4/GuiWorkArea.h:
	* qt4/GuiWorkArea.C:
	* WorkArea.h: fix typos: "shedule" => "schedule"


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16755 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 21:47:27 +00:00
Abdelrazak Younes
fce2821c44 Fix bug 3063, the problem was a recursive call to QRef::gotoRef() (which indirectly call
QRef::updateRefs() which called gotoRef(), etc).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16754 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 21:06:49 +00:00
Georg Baum
77b9dbd557 Fix several filename and environment variable encoding problems
* src/LaTeX.C
	(LaTeX::deplog): Assume that filenames in log files are stored in
	the file system encoding

	* src/frontends/qt4/qt_helpers.[Ch]
	(internal_path): delete

	* src/frontends/qt4/QGraphics.C: Adjust to change above

	* src/frontends/qt4/QPrefsDialog.C: ditto

	* src/frontends/qt4/QExternal.C: ditto

	* src/frontends/qt4/QInclude.C: ditto

	* src/support/os.h: Document the encoding of filename arguments

	* src/support/os_win32.h: ditto

	* src/support/filetools.C
	(findtexfile): Convert filename from file system encoding

	* src/support/os_win32.C: Convert filenames from utf8 to file system
	encoding and vice versa where needed

	* src/support/os_cygwin.C: ditto

	* src/support/getcwd.C
	(getcwd): Use internal_path() with correct encoding

	* src/support/docstring.[Ch]
	(from_filesystem8bit): new conversion function

	* src/support/environment.C
	(getEnv): convert environment variable from local 8bit encoding to utf8
	(setEnv): convert environment variable from utf8 to local 8bit encoding

	* src/support/environment.h: document encoding of function arguments


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16753 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 20:47:27 +00:00
Georg Baum
644f7b46df remove unneeded extra lyx:: namespace qualifier
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16746 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 15:20:33 +00:00
Abdelrazak Younes
200db1541a Partly revert revision 16744. Georg doesn't want to mix string/docstring in there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16745 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 13:35:01 +00:00
Abdelrazak Younes
0c496dc535 Convert internal_path() to unicode (partially). Fix bug 3114:
http://bugzilla.lyx.org/show_bug.cgi?id=3114

* os.h
  - new docstring adapted internal_path()

* qt_helpers.[Ch]:
  - new QString adapted internal_path()

All other files: use that.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16744 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 12:30:07 +00:00
Abdelrazak Younes
3d2184730a * mover.h
- SpecialisedMover(): add virtual destructor (fix bug 2916)
  - Movers: rename iterator to const_iterator.
  - theMovers(), theSystemMovers(), getMover(), setMover(): new extern definitions.

* mover.C: 
  - SpecialisedMover::operator(): get rid of bogus MSVC warning.
  - delete global variable movers and system_movers.

* lyx_main.C:
  - LyX::Singletons: new movers_ ans system_movers members.
  - implement Movers access functions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16743 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 08:42:53 +00:00
Georg Baum
439582ec6d Fix regression to 1.4.x: Additional vertical space if inputenc == auto
* src/output_latex.C
	(TeXOnePar): Postpone the output of newlines after the call of
	switchEncoding(), since we may get additional whitespace otherwise.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16740 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 22:01:08 +00:00
Georg Baum
7202474476 whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16739 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 21:25:17 +00:00
Georg Baum
c727c6db7f * src/insets/insetbase.h
(forceDefaultParagraphs): Fix comment: Not all text classes have a
	"Standard" layout. What was meant here is the default layout of the
	text class.

	* src/paragraph.C
	(Paragraph::simpleTeXOnePar): ditto

	* src/output_latex.C
	(latexParagraphs): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16738 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 21:22:19 +00:00
Georg Baum
08ef9c544e * src/lyxlayout.h
(LyXLayout::is_environment): Document


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16737 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 21:12:14 +00:00
Georg Baum
a8739b8b91 * src/output_latex.C
(TeXOnePar): Remove dead code


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16736 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 20:41:22 +00:00
Jean-Marc Lasgouttes
6f8c2a51f5 * math_hullinset.C (numbered): clear the label when unnumbering
(workaround for bug 2556).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16734 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 16:18:02 +00:00
Jürgen Spitzmüller
798af7d8f3 * src/text3.C (doDispatch):
- record undo on LFUN_BREAKLINE (bug 3111).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16730 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 15:40:55 +00:00
Jean-Marc Lasgouttes
976d38f7b7 * BufferView.C (mouseSetCursor): if the cursor was in an empty
script inset and the new position is in the nucleus of the inset,
	notifyCursorLeaves will kill the script inset itself. So we check
	all the elements of the cursor to make sure that they are correct
	(bug 2933).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16729 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 15:32:43 +00:00
Abdelrazak Younes
5554e9ee28 replace BufferView::reload() uses with LyXFunc::reloadBuffer().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16727 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 14:49:48 +00:00
Abdelrazak Younes
7cc0983ee2 Fix bug 3093:
http://bugzilla.lyx.org/show_bug.cgi?id=3093

* LyXFunc:
  - reloadBuffer(): new method.
  - dispatch(LFUN_VC_REGISTER): use reloadBuffer().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16726 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 14:46:20 +00:00
Abdelrazak Younes
74f3ca3246 Transfer the global converters and system_converters variables to LyX::Singletons class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16725 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 13:18:16 +00:00
Edwin Leuven
3931b65341 * replace many toggled(bool) with changed() signals
the former is also trigged when updating dialogs. we should use toggled(bool) to en/disable widgets and in situations when we are sure that we always want to act on a toggle

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16724 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 13:06:16 +00:00
Abdelrazak Younes
67ae65f430 Fix bug 3101 and 3108
http://bugzilla.lyx.org/show_bug.cgi?id=3101
http://bugzilla.lyx.org/show_bug.cgi?id=3108

* BufferView::setCursor(): delete the call to cursor_.setTargetX(). This is called differently for any LFUN anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16723 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 12:29:18 +00:00
Bo Peng
ba7aa78656 Use getline() to read filenames with space in session.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16721 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 05:35:03 +00:00
Bo Peng
104051c151 Fix inline collapsable inset set focus crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16720 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 02:53:33 +00:00
Michael Schmitt
bdadc8d496 * development/scons/scons_manifest.py:
* src/frontends/qt4/Makefile.dialogs:
* src/frontends/qt4/QPrefsDialog.C:
* src/frontends/qt4/QPrefsDialog.h:
* src/frontends/qt4/ui/compile_uic.sh:
* src/frontends/qt4/ui/QPrefAsciiUi.ui:
* src/frontends/qt4/ui/QPrefPlaintextUi.ui: rename QPrefAsciiUi.ui to QPrefPlaintextUi.ui; 
rename PrefAscii to PrefPlaintext

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16714 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 22:29:33 +00:00
Michael Schmitt
28d94b4c96 * src/paragraph.C: remove unused sgmlLineBreak()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16711 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 22:11:00 +00:00
Enrico Forestieri
581e909b93 Pass input data to a CAS program through a file instead of piping it to stdin
* src/mathed/MathExtern.C:
	(captureOutput): redirect stdin from a file.
	(pipeThroughMaxima, pipeThroughOctave, pipeThroughMathematica): use
	"output:" instead of "out:" in the informational messages in order to
	better match the "input:" message from captureOutput.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16709 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 18:10:10 +00:00
Abdelrazak Younes
2ea1ce7851 * LyXView::updateInset(): schedule a redraw instead of redraw immediately.
* WorkArea::sheduleRedraw(): new pure virtual method.

* GuiWorkArea::showCursor(): handle the scheduled redraw.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16708 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 15:16:09 +00:00
Abdelrazak Younes
323116ac0e Cleanup declaration.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16707 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 14:45:12 +00:00
Abdelrazak Younes
1bc5496257 Fix compilation problem with gcc-3.3.4-11.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16706 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 14:31:07 +00:00
Edwin Leuven
efdc3fee52 * avoid signal triggered by setChecked(bool)
* get rid of suprefluous mailer updates

should get rid of bugs:
http://bugzilla.lyx.org/show_bug.cgi?id=3076
http://bugzilla.lyx.org/show_bug.cgi?id=3077

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16705 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 12:24:49 +00:00
Jürgen Spitzmüller
2af1fccc61 * src/frontends/qt4/ui/QPrefCygwinPathUi.ui:
- fix layout (bug 3103).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16703 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-16 07:29:02 +00:00
Michael Schmitt
1f7a1257f1 * change LFUN file-insert-ascii to file-insert-plaintext
* change LFUN file-insert-ascii-para to file-insert-plaintext-para
* change LyXRC::RC_ASCIIROFF_COMMAND to LyXRC::RC_PLAINTEXT_ROFF_COMMAND
* change LyXRC::RC_ASCII_LINELEN to LyXRC::RC_PLAINTEXT_LINELEN
* replace "ascii" by "plaintext" in method names


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16697 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-15 22:49:14 +00:00
Abdelrazak Younes
e68d69e473 Translate labels based on the paragraph language instead of the Buffer language.
* Buffer:
  - translateLabel(): deleted.

* Paragraph:
  - translateIfPossible(): new method.
  - expandLabel(): new method.

* buffer_funcs.[Ch]
  - expandLabel(): deleted.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16694 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-15 16:58:14 +00:00
Abdelrazak Younes
6cbc6d9624 Fix bug 3058: changes in LyX's preferences aren't taken immediately
http://bugzilla.lyx.org/show_bug.cgi?id=3058

Bug fixed by setting the UpdateFlags correctly in LFUN_LYXRC_APPLY and LFUN_SCREEN_FONT_UPDATE.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16693 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-15 15:51:45 +00:00
Michael Schmitt
ee5aa68acf * src/CutAndPaste.C:
* src/paragraph.C:
* src/paragraph.h:
* src/text2.C: consider change tracking in stripLeadingSpaces()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16684 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 18:27:27 +00:00
Georg Baum
6d400bd294 fix member initialization order (gcc warning)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16682 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 17:53:30 +00:00
Michael Schmitt
baf76100b9 * src/buffer.C: save(): use correct filesystem encoding; check whether backup was successful
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16681 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 17:31:15 +00:00
Peter Kümmel
45cd993a66 The Mac doesn't need a offset for the save/restore window position code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16678 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 17:14:31 +00:00
Abdelrazak Younes
f2c60a584a it seems that queryUserLyXDir needs to have access to the translation...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16674 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 11:31:30 +00:00
Abdelrazak Younes
197ca2420b * messages.h:
- getMessages(), getGuiMessages(): new global function definitions

* lyx_main.C: implementation of getMessages() and getGuiMessages().

* LyX class:
  - getMessages(), getGuiMessages(), setGuiLanguage(): new interface for Messages access.

* LyX::Singletons class:
  - messages_: new container for Messages objects.

* Buffer::Impl::messages is now a pointer to the singleton defined in lyx_main.C.

* gettext.C: _() uses the global getGuiMessages() instead of the local static Messages object.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16673 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 10:37:14 +00:00
Abdelrazak Younes
f55103109e - In order to properly cache <language, Messages> pair I needs to get rid of the pimpl. This was not necessary anyway because minimal header change is needed (<map> is added and <boost/scoped_ptr> is removed).
- I changed (again) the get() interface to return  full copy instead of const reference because the no ENABLE_NLS case was not working.

- I put the C++ example implementation at the end of messages.C.

- I did some header cleanup in messages.C.

This will be the last change to the Messages class.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16672 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-14 09:55:08 +00:00
Abdelrazak Younes
cb158d8a13 fix completely stupid commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16670 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 20:05:48 +00:00
Georg Baum
3500af60ba Fix bug 2138: copy and paste should preserve formatting between different
LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).

	* src/insets/insettabular.C
	(InsetTabular::doDispatch): adjust to clipboard interface change
	(InsetTabular::copySelection): ditto

	* src/mathed/InsetMathGrid.C
	(InsetMathGrid::doDispatch): ditto

	* src/mathed/InsetMathNest.C
	(InsetMathNest::doDispatch): ditto

	* src/buffer.[Ch]
	(Buffer::readString): New method: Read document from a string
	(Buffer::readFile): Change return value from bool to enum (needed
	for readString). Return wrongversion if we are reading from a string
	and the version does not match.
	(Buffer::do_writeFile): make public and rename to write

	* src/CutAndPaste.C
	(putClipboard): New helper, put stuff to the system clipboard
	(void copySelectionHelper): Use putClipboard instead of
	theClipboard().put()
	(void copySelection): ditto
	(void pasteClipboard): new method for pasting in text
	(void pasteParagraphList):

	* src/frontends/Clipboard.h
	(Clipboard::get): Rename to getAsText
	(Clipboard::getAsLyX): New method for getting the system clipboard
	in LyX format
	(Clipboard::hasLyXContents): New method telling whether there is LyX
	contents in the clipboard

	* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods

	* src/text3.C
	(LyXText::dispatch): Use pasteClipboard for pasting the system
	clipboard


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 18:29:50 +00:00
Abdelrazak Younes
e17b39d453 - rename CacheType
- replace static string with private member
- test the success of the cache insertion 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16668 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 17:10:39 +00:00
Georg Baum
0ddb4d5f30 Change lyx2lyx conversion and LaTeX export of documents with
\inputencoding default

	* src/paragraph_pimpl.C
	(isEncoding): Explain why bparams.inputenc == "default" is ignored

	* src/bufferparams.C
	(BufferParams::encoding): Determine the encoding from the language
	for inputenc == "default"

	* src/buffer.h
	(writeLaTeXSource): Mention inputenc == "default" in documentation

	* src/bufferparams.h
	(inputenc): Update documentation of "default"

	* src/output_latex.C
	(switchEncoding): Switch the encoding also for inputenc == "default",
	but don't output \inputencoding commands in that case

	* lib/lyx2lyx/LyX.py
	(get_encoding): Determine the encoding from the language for
	inputencoding == "default"

	* lib/lyx2lyx/lyx_1_5.py
	(convert_multiencoding): ditto

	* development/FORMAT: Update documentation of \inputencoding default


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 14:36:54 +00:00
Jürgen Spitzmüller
f9bb0933fe * src/frontends/qt4/QGraphicsDialog.C:
- allow double values in the bounding box widgets (bug 3055, 3056).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16664 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 10:33:04 +00:00
Abdelrazak Younes
d0515ddc43 Messages:
- cache_: new cache for gettext translated string.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16662 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 09:31:47 +00:00
Abdelrazak Younes
1357910dd2 Add a const. A second const as in:
InsetBase const * const nextinset = = nextInset();

is not possible because InsetBase::asInsetMath() is not const.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16660 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-12 10:19:51 +00:00
Enrico Forestieri
6b513c51f1 Make sure that all inputed filenames are in internal style, and avoid
a bug on Windows due to an unnecessary conversion to external style.

	* src/insets/ExternalSupport.C
	(subst_path): avoid a bug in the external material inset on Windows
	by don't using external_path. The filename will be quoted and thus
	there will be no problems with forward slashes.

	* src/frontends/qt4/QGraphics.C
	* src/frontends/qt4/QExternal.C
	* src/frontends/qt4/QInclude.C:
	(Qxxx::apply): On Windows, the user could input an absolute path in
	native style by hand (without using the file dialog), so make sure
	that no backslashes can slip in by this way.

	* src/frontends/qt4/QPrefsDialog.C
	(internal_path_list, external_path_list): new wrappers for the
	corresponding functions in the os namespace.
	(PrefPaths::apply): make sure that path_prefix is stored in the
	internal style, i.e., without backslashes.
	(PrefPaths::update): make sure that path_prefix is displayed to
	the user in the native style.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16659 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-12 03:19:58 +00:00
Abdelrazak Younes
4a5f2915a7 optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16658 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 22:56:21 +00:00
Abdelrazak Younes
f92c3db951 tiny optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16657 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 22:38:37 +00:00
Abdelrazak Younes
7317e80b1f tiny optimisation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16656 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 22:38:00 +00:00
Enrico Forestieri
fc3a2761de Log:
Move OS dependent code where it belongs.

	* src/lyx_cb.C:
	Remove unused include

	* src/support/os.h
	* src/support/os_unix.C
	* src/support/os_win32.C
	* src/support/os_cygwin.C:
	Move here the code from fontutils.[Ch]

	* src/support/os_cygwin.C
	(external_path, external_path_list): don't differentiate anymore
	on Qt/X11 or Qt/Win builds.

	* src/support/environment.C
	(setEnvPath): get rid of the #ifdef for cygwin.

	* src/lyx_main.C
	(LyX::exec): addFontResources and restoreFontResources are now
	in the os namespace.

	* src/support/Makefile.am
	* src/client/Makefile.am
	* src/tex2lyx/Makefile.am
	* development/scons/scons_manifest.py:
	Updated

	* src/support/fontutils.[Ch]:
	Removed



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16655 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 21:22:18 +00:00
Abdelrazak Younes
186abe83af tiny optimisation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16653 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 18:50:39 +00:00
Abdelrazak Younes
5078b7ab57 tiny optimisation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16652 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 18:25:11 +00:00
Abdelrazak Younes
c7aac5e1c6 revert mistake.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16651 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 18:20:20 +00:00
Abdelrazak Younes
d4c037a427 optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16650 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 18:05:09 +00:00
Abdelrazak Younes
8121036b50 optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16649 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 17:40:23 +00:00
Abdelrazak Younes
92a06e2719 optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16648 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 16:38:08 +00:00
Bo Peng
dbe93457cd Fix bug 3092, use both pit and id to keep track of bookmarks.
* src/session.h/C: save pit instead of id
	* src/lyxfunc.h/C: gotoBookmark function
	* src/BufferView.h/C: proper update of bookmarks


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16647 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 16:01:10 +00:00
Abdelrazak Younes
c61134852e optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16646 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 15:58:26 +00:00
Abdelrazak Younes
8106f1809f Optimize buffer-switch: do first updateLabels() on opening instead of at each buffer switching.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16645 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 08:34:23 +00:00
Georg Baum
1f3a70835d Add more precise comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16642 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 21:06:09 +00:00
Georg Baum
ff9f654e41 remove obsolete comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16641 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 20:59:32 +00:00
Enrico Forestieri
804360cbd9 Fix encoding problem when reading the latex log file
* src/LaTeX.C
	(LaTeX::scanLogFile): use from_local8bit instead of from_utf8.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16640 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 18:12:52 +00:00
Enrico Forestieri
5f7747d6b6 Fix another non-ascii filename related assertion
* src/frontends/qt4/QErrorList.C
	(QErrorList::update_contents): use from_utf8 instead of from_ascii.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16639 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 17:18:41 +00:00
Abdelrazak Younes
31cbae750d fix cursor movements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16638 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 10:59:18 +00:00
Enrico Forestieri
8673c7ef02 Fix problem with non-ascii filenames in include inset
* src/insets/insetinclude.C
	(InsetInclude::getScreenLabel): use from_utf8 instead of from_ascii


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16634 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 00:30:49 +00:00
Georg Baum
bcb1654b15 Make the output of \inputencoding commands (and the change of output
encodings) more fine grained: From paragraph level to individual character
level. The inputenc package supports that since at least 2000.

	* src/insets/insetbase.h
	(latex): Document the differences between output to a string stream
	and a file stream

	* src/buffer.h
	(writeLaTeXSource): ditto

	* src/output_latex.h
	(latexParagraphs): ditto
	(switchEncoding): new function to change the encoding of a stream
	(and output \inputencoding commands)

	* src/paragraph_pimpl.C
	(Paragraph::Pimpl::simpleTeXSpecialC): Adjust to latexWriteEndChanges
	changes

	* src/support/docstream.[Ch]
	(setEncoding, operator<<): New stream modifier that changes the
	encoding of file streams

	* src/lyxfont.[Ch]
	(LyXFont::latexWriteStartChanges): Change stream encoding if needed
	(LyXFont::latexWriteEndChanges): Change stream encoding if needed

	* src/lyxfont.h
	(public:):

	* src/paragraph.C
	(Paragraph::simpleTeXOnePar): Adjust to latexWriteStartChanges and latexWriteEndChanges changes
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):

	* src/output_latex.C
	(TeXOnePar): Remove the ugly hack to for wencoding changes and use
	switchEncoding instead. A nice side effect is that the old hack would
	not work if the main language encoding is latin1 and a character
	would be mapped to a cedilla in the "fake ucs4" encoding, because
	iconv refuses to convert such a character to latin1, although it
	exists in latin1 (it wants to attach it to a base character).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16633 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 19:25:40 +00:00
Georg Baum
6ca4bd03e0 Add some documentation for findtexfile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16632 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 19:10:29 +00:00
Bo Peng
4751f7004c Bookmarks: change from LIFO to FIFO
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16630 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 18:13:29 +00:00
Abdelrazak Younes
2e7b4eafd1 small optimization and code formatting.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16629 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 15:48:04 +00:00
Michael Schmitt
2fc6d44b94 * src/changes.C: two changes of type UNCHANGED are always equals
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16619 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 23:28:41 +00:00
Michael Schmitt
a501ea2ace * src/text.C: replace "[C]" by the more meaningful "[Change tracking]" and support localization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16617 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 22:38:49 +00:00
Michael Schmitt
8b0b3f2909 * src/paragraph_pimpl.C:
* src/paragraph_pimpl.h: lookupChange(): return reference for performance optimization

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16616 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 22:25:59 +00:00
Michael Schmitt
bc7d9340ae * src/paragraph.C:
* src/paragraph.h: lookupChange(): return reference for performance optimization

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16615 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 22:21:57 +00:00
Georg Baum
c3bb45648c include tabulars and math in the "paste recent" stack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16611 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 18:40:37 +00:00
Georg Baum
a683072ea0 Fix enabling of LFUN_PRIMARY_SELECTION_PASTE: It was always disabled, because
we don't set the selection with qApp->clipboard()->put().
Therefore we get the status of the internal selection from the cursor, and
the empty flag for fake selections is not needed anymore.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16610 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 18:37:40 +00:00
Jürgen Spitzmüller
ba57568a72 * src/insets/insetcite.C (getNatbibLabel): correct check for citation key cache.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16609 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 17:38:39 +00:00
Abdelrazak Younes
23326f7770 Forgot this in revision 16606.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16608 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 15:51:43 +00:00
Abdelrazak Younes
a2e981066b properly inline inMathed() and inTexted().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16607 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 15:30:17 +00:00
Abdelrazak Younes
2b378ca3fd Delay bibfileCache first update up until it is used.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16606 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 13:36:01 +00:00
Jürgen Spitzmüller
10917a7b09 * src/frontends/qt4/QGraphicsDialog.C:
- do not focus filename widget for already existing insets (bug 1663).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16604 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 13:22:50 +00:00
Jean-Marc Lasgouttes
f8f59e97fb * support/os_unix.C (canAutoOpen, autoOpenFile): on Mac OS X, use
the role kLSRolesAll for both edito and viewer, since it is what 
	the finder does.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16602 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 13:20:19 +00:00
Abdelrazak Younes
827f20ce1f same performance fix as rev. 16600.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16601 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 11:42:20 +00:00
Abdelrazak Younes
c2dee509d9 performance fix.
* InsetFloat::addToToc(): avoid a string copy, a map lookup and a TocItem construction. Don't complete the loop if item found.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16600 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 11:35:55 +00:00
Abdelrazak Younes
42b83ba362 performance fix, label updating have nothing to do with Buffer contents. 'updateLabels()' is called in BufferView::setBuffer().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16599 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 11:15:50 +00:00
Abdelrazak Younes
f18e41b734 performance fix/cleanup.
* LyXKeySym.h: replace global operator==() with pure virtual method.

* QLyXKeySym: new operator==() method.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 11:01:26 +00:00
Abdelrazak Younes
cf30cf83c6 performance fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16597 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 10:50:15 +00:00
Jürgen Spitzmüller
c2a35af243 Fix rest of bug 3068.
* src/frontends/qt4/QCitationDialog.[Ch]:
	- implement KeyPressEvent, catch ESC key and clear params there as well 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16594 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 06:52:20 +00:00
Enrico Forestieri
19b9427da7 Fix problem with filename encoding in python script for graphics conversion
* src/graphics/GraphicsConverter.C
	(build_script): convert the input filename from utf8 to the default
	locale encoding as it hopefully corresponds to the filesystem encoding.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16592 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 03:03:12 +00:00
Bo Peng
af5d8eabe7 Resolve compiler warning unused parameter nr in src/frontends/qt4/QPrefsDialog.C
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16591 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 23:06:54 +00:00
Bo Peng
57686e9d61 Fix bug 3062, bookmark-goto x crashes lyx for invalid bookmark
* src/session.C: check validity of temp bookmark
	* src/lyxfunc.C: check validity of bookmark in GOTO_BOOKMARK
	* lib/bind/*.bind: remove shortcuts to bookmark-save 2/3/4/5


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16589 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 22:41:54 +00:00
Abdelrazak Younes
000df02671 Add missing call to WorkArea::redraw(). Fix bug 3078
http://bugzilla.lyx.org/show_bug.cgi?id=3078


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16588 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 22:01:50 +00:00
Georg Baum
03f56201d8 Don't calculate outerfont twice
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16587 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 19:06:48 +00:00
Georg Baum
24bb8d72f3 avoid unneeded stream flushes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16586 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 18:53:59 +00:00
Georg Baum
1aebac8d44 more typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16585 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 18:40:06 +00:00
Michael Schmitt
94cbc4468e * src/changes.C:
* src/changes.h: some speed optimizations as the result of profiling

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16584 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 18:13:25 +00:00
Jürgen Spitzmüller
24ba805e2a * src/frontends/qt4/ui/QGraphicsUi.ui:
- fix initial tab.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16582 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 17:59:47 +00:00
Georg Baum
0011cad000 Add some documentation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16581 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 17:58:36 +00:00
Georg Baum
16b2b8e6bc fix typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16580 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 17:54:26 +00:00
Georg Baum
36ada6f267 Correctly enable/disable all paste lfuns
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16576 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 16:43:38 +00:00
Jürgen Spitzmüller
7bd88b5056 * src/frontends/qt4/QTocDialog.C (updateGui):
- disable depth slider when there's no content (prevents crash).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16575 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 16:39:35 +00:00
Georg Baum
5681316341 Add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16573 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 14:54:10 +00:00
Georg Baum
fed31122c4 Tell X the selection status also after it is changed by the keyboard, since
we got a consensus on this on the list.
Some calls of haveSelection are still missing, but we need to decide the
"persistent selection" question before those can be implemented properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16572 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 14:44:44 +00:00
Peter Kümmel
37652b6d7a TOC dialog: fix scrollbar flickering when clicking on items
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16571 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 13:13:40 +00:00
Jürgen Spitzmüller
24e837d390 * src/frontends/qt4/QBibtexDialog.C: sanitize button behaviour (bug 2895)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16570 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 12:46:37 +00:00
Peter Kümmel
b0694a20bc fix: TOC dialog table content is not visible after clicking the combo box
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16569 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 12:10:17 +00:00
Michael Schmitt
ada361536f * src/text.C: fix endless loop in breakParagraph()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16568 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 12:01:26 +00:00
Michael Schmitt
651606f633 * src/paragraph.C: hfillExpansion(): rewrite loop for better understanding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16567 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 10:42:10 +00:00
Michael Schmitt
154ea92de6 * src/paragraph.C: sanitize hfillExpansion()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16566 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 10:25:45 +00:00
Jürgen Spitzmüller
fee8801a6d * src/frontends/qt4/QCharacter.C:
* src/frontends/qt4/QDocumentDialog.C:
* src/frontends/qt4/QPrefsDialog.C:
	- include some information on the resizing bug,

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16565 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 10:24:25 +00:00
Jürgen Spitzmüller
fce84d1224 Fix bug 3068.
* src/frontends/qt4/QCitationDialog.C: 
	- clear params on dialog closing
* src/frontends/qt4/QCitationDialog.[Ch]:
	- implement CloseEvent 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16563 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 09:44:57 +00:00
Enrico Forestieri
4709a0c535 Fix conversion of n-th roots to mathematica and octave syntax.
* src/mathed/MathExtern.C
	(pipeThroughOctave): take into account that the output from octave
	may contain ansi control sequences.

	* src/mathed/InsetMathRoot.[Ch]
	(InsetMathRoot::mathematica): new virtual method to output n-th
	roots in mathematica syntax.

	* src/mathed/InsetMathRoot.C
	(InsetMathRoot::octave): octave has not a root() command.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16559 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-07 03:28:53 +00:00
Abdelrazak Younes
fc86d802ee update comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16558 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 23:24:55 +00:00
Michael Schmitt
332125a35d * src/frontends/qt4/ui/QCharacterUi.ui: fix resize problem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16556 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 18:48:27 +00:00
Georg Baum
1103be3d85 Fix thinko: default paste method for plain text
* src/lyxtext.h
	* src/text3.C
	(pasteString): Change argument to bool

	* src/text3.C
	(LyXText::dispatch): (LFUN_PASTE): Paste plain text as paragraphs,
	not as lines
	(LyXText::dispatch): Adjust to pasteString change

	* lib/bind/cua.bind:
	* lib/bind/sciword.bind:
	* lib/bind/mac.bind: Move shortcuts from "clipboard-paste paragraph"
	and "primary-selection-paste paragraph" to "primary-selection-paste"
	and "clipboard-paste", since the "paragaph" versions are used in
	LFUN_PASTE and middle-mouse-button paste. Now "primary-selection-paste"
	has the same shortcut it always had, and "clipboard-paste" has the
	shortcut that was originally assigned to
	"primary-selection-paste paragraph".


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16553 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 15:33:07 +00:00
Jürgen Spitzmüller
369daf4af4 * src/ParagraphMetrics.C: compile fix (missing include).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16547 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 11:12:24 +00:00
Georg Baum
61c257ad6b fix compile error:
../../../src/mathed/../ParagraphMetrics.h:76: error: extra qualification 'lyx::ParagraphMetrics::' on member 'calculateRowSignature'


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16546 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 10:08:48 +00:00
Abdelrazak Younes
68005ba1ad Add ticks to the slider.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16545 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 09:40:36 +00:00
Abdelrazak Younes
5d1eb92c1b Safeguard: don't do things that could trigger a painting inside the resizeEvent().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16544 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 09:36:40 +00:00
Abdelrazak Younes
063fdd118b This commit fixes the singlePar optimization which was disabled due to the ParagraphMetrics cleanup.
* rowpainter.C::paintPar(): don't calculate row signature here. Use ParagraphMetrics::rowChangeStatus() instead.

* RowList_fwd.h: RowSignature is now a vector.

* ParagraphMetrics
  - rowChangeStatus(), updateRowChangeStatus(), calculateRowSignature(): new methods.
  - row_signature_: new member
  - rowSignature_: renamed to row_signature_

* TextMetrics::redoParagraph(): call ParagraphMetrics::updateRowChangeStatus()

* BufferView::updateMetrics(): simplify the singlePar case.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16543 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-06 09:15:59 +00:00
Bo Peng
f5114ba80d src/support/unlink.C: Fix an #include error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16541 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 22:16:04 +00:00
Georg Baum
31bc611f34 Fix bug 3067: Special column attributes can contain non-ascii characters,
so store them in a docstring.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16537 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 17:11:32 +00:00
Abdelrazak Younes
0b995c888f The bug-fix in revision 16531 introduced another bug. This is the right fix. I did not understood correctly what was anchor_ref_.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16536 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 15:35:10 +00:00
Georg Baum
594a589bc4 Fix and document middle mouse button paste. This is probably the last of
the status quo fixes, I'll send a proposal how to proceed soon.

	* src/CutAndPaste.[Ch]
	(copySelection): Split into copySelection and copySelectionToStack

	* src/text3.C
	(LyXText::dispatch): Use copySelectionToStack instead of LFUN_COPY
	to copy the selection to the cut buffer for two reasons:
	- LFUN_COPY did not work (probably because bv.cursor() was not yet set)
	- If it would work it would put the selection to the system clipboard
	  which is clearly wrong.
	Document why we put the selection to the stack.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16534 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 14:40:49 +00:00
Georg Baum
63280d113f Abdel, get yourself a decent file system!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16533 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 14:38:53 +00:00
Abdelrazak Younes
7d4edd3f79 Fix screen update when deleting insets:
http://bugzilla.lyx.org/show_bug.cgi?id=3071


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16531 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 14:31:59 +00:00
Georg Baum
3c323c1a37 The uncontroversal part of the selection fix: Always set the X selection
after selecting something with the mouse

	* src/insets/insettabular.C
	(InsetTabular::doDispatch): Set the X selection if there is a
	selection after release of the left mouse button

	* src/mathed/InsetMathNest.C
	(InsetMathNest::doDispatch): Set the X selection after double and
	triple click of the left mouse button
	(InsetMathNest::lfunMouseRelease): Set the X selection if there is a
	selection after release of the left mouse button


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16530 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 13:31:37 +00:00
Abdelrazak Younes
325cecdea4 Fix bug bug 3064 and 3065:
http://bugzilla.lyx.org/show_bug.cgi?id=3064
http://bugzilla.lyx.org/show_bug.cgi?id=3065

* LyXView::currentWorkArea(): new access methods.

* ControlSpellchecker::check(): add a WorkArea::redraw() call to update the screen



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16529 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 13:31:34 +00:00
Georg Baum
8b9a33b656 Don't query cur.selection() twice
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16528 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 13:23:43 +00:00
Georg Baum
690a630c5e * src/frontends/qt4/GuiSelection.C
(GuiSelection::haveSelection): Add a big comment what we actually do
	here, and why. It took me quite some time to figure that out.

	* src/frontends/Selection.h
	(haveSelection): Add more detailed documentation


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16527 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 10:32:07 +00:00
Georg Baum
e2da99d6a9 Fix another selection bug
* src/frontends/qt4/GuiApplication.C
	(GuiApplication::x11EventFilter): Only send or clear the selection
	if the X event specified the primary selection. Previously this was
	also done if the event specified the clipboard. We must ignore that,
	because the clipboard is completele handled by qt.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16526 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 10:11:21 +00:00
Georg Baum
9e49efd593 * src/BufferView.C
(BufferView::clearSelection): Trigger a redraw so that the cleared
	selection becomes visible


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16524 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 09:21:30 +00:00
Michael Schmitt
1cdbdc1bdc * src/text.C: check end-of-par BEFORE you accept/reject the rest of the par (I fear this code has to rewritten later)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16521 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 23:10:51 +00:00
Michael Schmitt
895416b103 * src/text.C: first step to sanitize accept/rejectChange
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 23:02:37 +00:00
Michael Schmitt
95643e2450 * src/dociterator.h: fix typo in comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16519 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 22:01:43 +00:00
Michael Schmitt
57609ac606 * src/BufferView.C: fix typo in comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16514 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 19:59:58 +00:00
Michael Schmitt
6152f74317 * src/frontends/qt4/QTocDialog.C: fix formatting of curly brackets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16513 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 19:52:41 +00:00
Peter Kümmel
1f83a88cd6 undo partly 16444/16452
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16512 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 19:46:03 +00:00
Peter Kümmel
ff93befafb undo partly 16441
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16511 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 19:44:49 +00:00
Jean-Marc Lasgouttes
4c1fb15143 Make the shortcuts work correctly with the mac.
* src/frontends/LyXKeySym.h:
	* src/frontends/qt4/QLyXKeySym.h:
	* src/frontends/qt4/QLyXKeySym.C (print): add a forgui boolean that 
	tells whether the string should used localized names and special 
	characters.

	* src/MenuBackend.C (binding): 
	* src/kbmap.C (print): 
	* src/kbsequence.C (print, printOptions): add forgui parameter.

	* src/frontends/qt4/QLPopupMenu.C (addBinding): use a non-localaized 
	binding for Qt/Mac (because it needs to be parsed back) and a 
	localized one for the others (so that it looks good).

	* src/kbmap.C (defkey,printbindings): 
	* src/lyxfunc.C (processKeySym,dispatch,viewStatusMessage): adapt to 
	above changes.

	* src/kbmap.C (printKey): remove.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16510 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 17:10:24 +00:00
Georg Baum
f73fb4a2f4 Add some documentation. Yes I know that some functions are misnamed :-(
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16509 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 16:50:03 +00:00
Georg Baum
da439a4b19 remove declaration of nonexisting function selPaste()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16508 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 16:07:47 +00:00
Georg Baum
62ec304e45 remove declaration of nonexisting function selCut()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16507 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 16:04:50 +00:00
Georg Baum
2f66789cc8 * src/frontends/qt4/GuiApplication.C
(GuiApplication::x11EventFilter): Small optimization: Do not request
	the current BufferView if it is not used


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 15:36:29 +00:00
Georg Baum
f04eabb1cd Don't test twice for selection()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16505 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 15:21:58 +00:00
Abdelrazak Younes
c8be555d58 fix wrong commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16504 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 14:32:37 +00:00
Georg Baum
3772b9f662 reenable assertion
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16503 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 14:28:22 +00:00
Abdelrazak Younes
47fbb72398 comment out assertion in order to compile without warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16502 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 14:13:30 +00:00
Jean-Marc Lasgouttes
bce5521446 * insetcollapsable.C (doDispatch): [LFUN_MOUSE_PRESS] reset selection
when mouse is pressed on the inset button (bug 3060).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16501 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 13:53:16 +00:00
Abdelrazak Younes
89ab910a4f delete unused variables.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16500 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 13:29:35 +00:00
Abdelrazak Younes
4d7795d4d2 Reorganize window resizing so that no painting occurs during a resizeEvent(). This caused the crash on MacOSX because the splash image drawing was not finished before the resizeEvent() occurred because of scrollbar hiding.
* WorkArea::resizeBufferView(): delete redraw() call.

* GuiWorkArea:
  - need_resize_: new private member.
  - expose(): move pixmap painting code to new private updateScreen() method.
  - paintEvent(): resize the backing pixmap  if need be.
  - resizeEvent(): move the resizing code to paintEvent().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16499 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 12:36:17 +00:00
Georg Baum
8f2243819a Let LFUN_PASTE always paste the most recent clipboard (internal or system)
* src/insets/insettabular.C
	(InsetTabular::doDispatch): Only paste the tabular clipboard if the
	system clipboard is not newer, else let the current cell paste the
	system clipboard
	(InsetTabular::getStatus): Only decide whether to enable LFUN_PASTE
	if the tabular clipboard is not empty and the system clipboard is
	not newer, else let the current cell decide.

	* src/mathed/InsetMathGrid.C
	(InsetMathGrid::doDispatch): Use the system clipboard for LFUN_PASTE
	if it is newer.

	* src/mathed/InsetMathNest.C
	(InsetMathNest::doDispatch): Use the system clipboard for LFUN_PASTE
	if it is newer.

	* src/text3.C
	(doInsertInset): Add a "0" argument to LFUN_PASTE, because we always
	want to use the internal clipboard here
	(LyXText::dispatch): ditto (when handling mouse button 2 press)
	(LyXText::dispatch): Use the system clipboard for LFUN_PASTE if it
	is newer.
	(LyXText::getStatus): Also enable LFUN_PASTE if the system clipboard
	is owned by another application


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16498 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 12:05:24 +00:00
Georg Baum
9d1dbb6f61 Remove isInternal() method. We don't use it and should not do so in the
future, we use LCursor::selection() instead.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16497 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 11:12:01 +00:00
Jean-Marc Lasgouttes
3db3cc44dd * GuiApplication.C (GuiApplication): make sure that the Qtranslator
holding the Qt translations is not deleted. Now keyboard shortcuts and
	Qt stock dialogs are properly translated.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16496 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 11:05:57 +00:00
Georg Baum
9479b1323f * src/insets/insettabular.C
(InsetTabular::getStatus): Correctly enable LFUN_PASTE when the
	special tabular clipboard is empty by removing an errornous
	fall-through to LFUN_INSET_MODIFY


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16495 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 11:05:22 +00:00
Georg Baum
129f5b6431 Get rid of InsetTabular::hasPasteBuffer. I verified that it was equivalent
to cap::tabularStackDirty().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16494 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 11:00:09 +00:00
Georg Baum
b7c5197b7e forgot the break
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16493 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:50:25 +00:00
Georg Baum
c9bd56ab18 * src/insets/insettabular.C
(InsetTabular::doDispatch): Don't reset the table paste buffer
	when pasting from the external clipboard or selection, since no
	paste operation should ever change any clipboard.
	At the same time make the code more readable by removing the
	fall-through.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16492 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:48:54 +00:00
Georg Baum
e873e7c0a9 * src/mathed/InsetMathNest.C
(InsetMathNest::lfunMouseRelease): Remove commented call of
	theSelection->put(), since that should never be called from the kernel


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16491 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:35:44 +00:00
Georg Baum
686c5f8364 * src/CutAndPaste.C
(cutSelection): Fill the system clipboard if this is a real cut (only
	if the cursor is in texted, the mathed case is done elsewhere).
	(cutSelection): Remove obsolete comment. Since the separation of
	selection and clipboard the selection is only filled as response
	to an explicit request by the X server, so there is no slowdown.
	The clipboard is only filled on explicit user request, so that does
	not result in slowdown either.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16490 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:26:42 +00:00
Georg Baum
f6bb0d8b3d remove double declaration of cutSelection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16489 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:14:28 +00:00
Georg Baum
1557221505 remove obsolete comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16488 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 09:00:19 +00:00
Georg Baum
22eae5feb9 formatting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16487 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 08:57:55 +00:00
Georg Baum
84763472b8 Fix documentation of Selection::get(): The X selection protocol is asyncronous.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16486 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 08:48:43 +00:00
Bo Peng
a8e914b500 Fix crashes caused by invalid last_inset_ due to keyboard editing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16485 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 23:05:27 +00:00
Michael Schmitt
ac88413021 * src/frontends/qt4/QToc.C: fix formatting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16484 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 22:03:26 +00:00
Michael Schmitt
04b4634213 * src/frontends/qt4/QMathMatrixDialog.C:
* src/kbmap.C:
* src/LaTeXFeatures.C:
* src/text.C: remove superfluous "return" statements

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16483 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 21:51:10 +00:00
Michael Schmitt
79957d0f70 change LYX_USER_DIR_1[234]x to LYX_USER_DIR_15x
change LYX_DIR_1[234]x to LYX_DIR_15x

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16481 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 18:02:26 +00:00
Jean-Marc Lasgouttes
94da7f7c83 * src/MenuBackend.[Ch]: the specialMenu is now a real menu, not a
menu name. 

	* src/frontends/qt4/QLMenubar.C (macxMenuBarInit): hardcode the 
	special menu instead of reading it from ui files. Use labels that will
	trigger Qt menu merging functionality onthe mac. This fixes menu
	merging on LyX/Mac (but the menu names are still in english for now). 

	* lib/ui/stdmenus.ui: delete special menu definition "LyX".


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16479 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 11:59:10 +00:00
Jean-Marc Lasgouttes
b7f2544bc3 * bufferparams.C (writeLaTeX):
* lyx_sty.C: use \setlength{\foo}{bar}, not \setlength\foo{bar}
	(bug 2843)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16478 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 10:40:12 +00:00
Abdelrazak Younes
6fcb3fe6a2 Prepare for external/internal clipboard merging.
* Clipboard.h: new isInternal() pure virtual method
* Selection.h: new isInternal() pure virtual method

* GuiClipboard, GuiSelection: implement new method.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16476 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 08:53:54 +00:00
Abdelrazak Younes
61f7ebd4a9 Factorise external pasting code.
* LyXText::pasteString(): new private method.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16475 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 07:30:50 +00:00
Abdelrazak Younes
04afd7af17 comment out debug statement.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16474 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 07:28:45 +00:00
Georg Baum
9c162a9bc6 Implement more detailed iconv error messages for better tracking of bugs
like 3043
	* src/support/docstream.C
	(iconv_codecvt_facet::do_out): Output the to be converted string and
	the partially converted result in hex notation if an error occurs
	(iconv_codecvt_facet::do_in): ditto
	(iconv_codecvt_facet::do_iconv): remove now obsolete error message


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16469 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-02 20:57:34 +00:00
Georg Baum
bcbd895143 * src/support/unicode.C
(IconvProcessor::convert): Fix hex output of bytes on systems where
	char is signed


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16468 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-02 20:44:06 +00:00
Georg Baum
d96c36e555 Fix bug 3052: Always start a new paragraph after a noweb code chunk
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16467 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-02 12:35:53 +00:00