Commit Graph

9192 Commits

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