Commit Graph

9174 Commits

Author SHA1 Message Date
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