Commit Graph

8406 Commits

Author SHA1 Message Date
Peter Kümmel
a96cb88ccd GuiView.C: recover from silly window positions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15574 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 08:40:08 +00:00
Michael Schmitt
af54be2d01 change tracking:
* src/paragraph_pimpl.C: in method erase(),
	set the character to DELETED if
	a) it was previously unchanged or
	b) it was inserted by a co-author



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15573 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 21:06:55 +00:00
Michael Schmitt
c1dbcb6f06 change tracking:
* src/paragraph_pimpl.C: only reject an inset's content
	if the inset itself is UNCHANGED


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15572 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 20:44:00 +00:00
Michael Schmitt
62b09e3dbd change tracking:
* src/paragraph_pimpl.C: do not propagate changes
        to nested insets of the change type is DELETED


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15571 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 20:19:45 +00:00
Michael Schmitt
ae1346990b change tracking:
Better change time handling. Quote from Changes.C:

  Class Change has a changetime field that specifies the exact time at which
  a specific change was made. The change time is used as a guidance for the
  user while editing his document. Presently, it is not considered for LaTeX
  export. To avoid that every keystroke results in a separate change, a
  tolerance interval of 5 minutes is used. That means if there are two adjacent
  changes that only differ in their change time with abs(ct1 - ct2) < 300 sec,
  they will be merged (and the later change time is preserved).
  Technically, the check for equality (or similarity) is made in
  operator==(...). The merging of similar changes happens in method merge().

Resolve FIXMEs for LyX & LaTeX output.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15569 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 19:00:28 +00:00
Georg Baum
0a48dce7ac Compile fix for older gcc's.
I accidentally used data() which is not yet in the standard.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 15:38:53 +00:00
Georg Baum
fa1856440c Restore inputenc support
* src/encoding.h
	(encoding_table): remove, this is no longer needed with unicode
	(iconvName_): new member: name of the encoding in iconv syntax

	* src/exporter.C
	(Exporter::Export): Use return value of Buffer::makeLaTeXFile

	* src/buffer.[Ch]
	(Buffer::makeLaTeXFile): return whether the file has been created
	successfully

	* src/buffer.C
	(Buffer::makeLaTeXFile): Use a docstream that converts to the correct
	encoding
	Display an error dialog is something went wrong

	* src/bufferparams.C
	(BufferParams::writeLaTeX): Undo the utf8 inputenc hack

	* src/frontends/qt4/QDocumentDialog.C: Add some FIXMEs

	* src/support/unicode.[Ch]
	(eightbit_to_ucs4): New conversion function
	(ucs4_to_eightbit): New conversion function

	* src/support/docstream.[Ch]
	(utf8_codecvt_facet_exception): Move to header and rename to
	iconv_codecvt_facet_exception
	(odocfstream): Take the encoding as argument

	* src/support/docstream.C
	(utf8_codecvt_facet): Generalize to other encodings than utf8 and
	rename to iconv_codecvt_facet

	* src/encoding.C: Remove obsolete tables

	* src/output_latex.C
	(TeXOnePar): Convert the paragraph to different encoding if needed

	* lib/encodings: Remove obsolete tables


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15564 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 15:01:45 +00:00
Abdelrazak Younes
97c3e3f33c paintText(): replace the test on BufferView::buffer() with an assertion as this should not happen anyway.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15557 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 13:36:04 +00:00
Abdelrazak Younes
128a8ef3e8 This commit fixes 3 crashes when reverting a document:
1) crash in GuiWorkArea::paintEvent(), this one is solved by by encapsulating the file loading in LyXView by busy(true)/busy(false) and by disabling/enabling the work area update in GuiView::busy().

2) crash in the cursor blinking because the cursor is timed out at the moment you click on "Revert". So the blinking cursor is now disabled/enabled in GuiView::busy().

3) crash in BufferView::setBuffer() because the current buffer was already closed folling the "revert" command. 
* BufferView::loadLyXFile(): set buffer_ to 0 in case of a reload (when document is reverted)

* LyXView:
  - busy() is not const anymore (work_area_ is modified in GuiView) 
  - loadLyXFile(): encapsulate the file loading with busy(true)/busy(false)
  - setBuffer(): encapsulate the buffer-switching with busy(true)/busy(false)

* GuiView::busy()
  - disable/enable workarea updates.
  - disable/enable blinking cursor.

* WorkArea: new startBlinkingCursor() and stopBlinkingCursor() methods.

* rowpainter.C:
  - paintText(): make sure there is a Buffer from which to paint.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15556 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 13:29:10 +00:00
Peter Kümmel
b6a7dd3aa7 src/frontends/qt4/GuiWorkArea.C:
use position returned by BufferView
src/bufferview_funcs.C: 
    adjust cursor x-position by hand



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15555 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 11:01:34 +00:00
Abdelrazak Younes
e0c193fa92 add some initialization and some assertion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15554 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 08:10:22 +00:00
Abdelrazak Younes
1e3d50b669 Fix (hopefully) gcc warning about initialization order in constructor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15553 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 08:01:48 +00:00
Joost Verburg
8fa888a61a Changed default date formatting string to be compatible with both Windows/UNIX. This solves crashes on Windows systems.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15546 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-25 10:28:29 +00:00
Edwin Leuven
6b20411c6a add fixme for cursor positioning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15544 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-25 09:20:07 +00:00
Abdelrazak Younes
8571d4c0b8 compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15543 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-25 07:48:48 +00:00
Michael Schmitt
d53d4a5c35 change tracking:
* src/*.C:
	* src/insets/*.C: implement rejectChanges() in analogy to
	acceptChanges();
	
	* src/paragraph_pimpl.C: add assertions for pos, start, and 
	end parameters


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15542 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 21:38:47 +00:00
Michael Schmitt
fe2abd3846 * src/frontends/qt4/GuiWorkArea.C: fix cursor positioning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15541 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 21:12:46 +00:00
Edwin Leuven
87b93ca808 add missing lyx::
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15539 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 19:05:26 +00:00
Edwin Leuven
d539ab8282 Layout improvements
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15538 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 17:52:37 +00:00
Abdelrazak Younes
b86a8d09b3 Fix cursor size...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15537 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 16:38:17 +00:00
Abdelrazak Younes
583489bcfe compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15536 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 15:31:22 +00:00
Abdelrazak Younes
55eae1a7f8 * Gui.h: new closeAll() pure virtual method.
* qt4/Alert_pimpl.C: make sure the proper Qt attributes are set.

* GuiApplication::quitLyx(): add the "force" argument to the funcRequest.

* GuiImplementation:
  - GuiImplementation(): remove the signal connection. This was triggered after the LastWindowClosed signal so was not useful.
  - cleanupViews(): renamed to unregisterView() and handle the WorkAreas as well.
  - closeAll(): new method (from LyXView).

* GuiView.C
  - clean up the includes order.
  - closeEvent(): make sure that theBufferList().quitWriteAll() is called if last window closed.

* lyx_main.C / LyX::quit():
  - remove noAsk argument
  - delete bufferList::quitWriteAll() call (this is handled in the frontend).
  - delete Session stuff (ditto)

* LyXFunc::dispatch()
  - LFUN_LYX_EXIT: close all window before exiting from user command (as opposed to last window closed).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15535 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 15:01:07 +00:00
Edwin Leuven
163dcb1210 - implement sizeHint()
- set minimum width of QTreeWidget
- bit of cleanup

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15526 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 11:32:20 +00:00
Abdelrazak Younes
2e56c97bcc fix crash on exit.
* LyXView::setBuffer(): returns early if quitting.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15521 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 07:55:46 +00:00
Michael Schmitt
00ffa3ca7c change tracking:
* src/paragraph.h: rename acceptChange() to acceptChanges()
        * src/insets/insetbase.h:
        * src/insets/insettext.h:
        * src/insets/insettabular.h: add acceptChanges()
        * src/*.C: fix acceptChanges() (& also accept changes in nested
        insets)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15520 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-24 06:11:45 +00:00
Michael Schmitt
048122515d * CutAndPaste.C: fix change tracking in case of
deletion of a selection


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15519 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 20:08:18 +00:00
Joost Verburg
6700802966 read lyxrc.dist a second time to be able to override viewer auto-detection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15515 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 18:01:31 +00:00
Abdelrazak Younes
f4857dab04 new LFUN_WINDOW_CLOSE
* LyXFunc:
  - dispatch(): transfer assertion on lyx_view_ to each LFUN on a case by case basis.
  - dispatch(): new LFUN_WINDOW_CLOSE
  - getStatus(): special treatment for LFUN_LYX_QUIT

* LyX:
  - views_, addLyXView(): deleted
  - quit(): call saveGeometry() on each LyXView before exiting.

* GuiApplication:
  - is now a QObject.
  - quitLyX(): new Qt slot for lastWindowClosed signal.

* Gui.h:
  - destroyView(), destroyWorkArea(): deleted
  - viewIds(): new method

* GuiImplementation:
  - implement above changes.
  - GuiImplementation is now a QObject
  - cleanupViews(): new private slot.
  - buildViewIds(): new helper method
  - views_ and work_areas_ are now maps of raw pointers instead of schared_ptr.

* LyXView
  - now stores its id.
  - dispatch(): special treatment for LFUN_WINDOW_CLOSE.
  - workAreaIds(): new method.
  - close(): new pure virtual method.
  - saveGeometry(): new pure virtual method.

* GuiView:
  - implements above changes.
  - GuiView(): set WA_DeleteOnClose and Qt::WA_QuitOnClose to let Qt manage the destruction on close().
  - closeEvent(): session stuff transfered to saveGeometry()

* WorkArea
  - now store its id.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15514 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 16:29:24 +00:00
Michael Schmitt
dcc3f7f151 * src/lyxfind.C:
* src/paragraph.C: more change tracking cosmetics


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15513 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 16:25:29 +00:00
Michael Schmitt
3ede781c53 * CutAndPaste.C:
* text.C: change tracking cosmetics


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15512 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 16:22:05 +00:00
Michael Schmitt
b08f0d1f39 change tracking:
* paragraph.h: add method isUnchanged(..)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15511 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 16:04:51 +00:00
Michael Schmitt
504fa6f918 * text2.C:
* paragraph.C: change tracking cosmetics


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15510 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 16:03:14 +00:00
Peter Kümmel
fb00129a12 move #endif to the end of the file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15508 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 14:24:04 +00:00
André Pönitz
5c4c5d9b05 cursor cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15504 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 11:34:43 +00:00
André Pönitz
4774536389 cursor is no more damaging the background. L-shaped cursor is broken right now. will fix later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15503 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 11:19:17 +00:00
André Pönitz
387b8a1394 do not draw to intermediate pixmap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15502 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 08:47:27 +00:00
André Pönitz
1852693005 do not draw to intermediate pixmap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15501 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-23 08:46:09 +00:00
Bo Peng
55c10ff2b5 src/coordcache.C: stop compiler complaint for std::min
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15495 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 20:38:10 +00:00
André Pönitz
8a1e6d6759 microoptimization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15493 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 19:33:37 +00:00
Asger Ottar Alstrup
7c595cb763 - We guess Lars smoked something (we didn't see him, but
that's the only explanation)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15492 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 19:09:09 +00:00
Asger Ottar Alstrup
a127d540d3 - LyX is dead slow, so the least we can do is use anti-alised text
- Various micro-optimisations
- Revert Abdel's repaint instead of update for QPainter
- Get rid of unused methods in GuiWorkArea



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15491 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:49:18 +00:00
Lars Gullik Bjønnes
3674a8c003 LFUN_UNICODE_INSERT - unicode-insert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15490 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:47:19 +00:00
Georg Baum
91d244160d Revert faulty floatlist fix (revision 15376) and fix reading of floatlists
correctly.
The floatlist type is now stored in the InsetCommand parameter "type".
Formerly it was stored in the command name, which is not possible anymore
because all command names need to be known.
The file format of .lyx files is still the same.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15489 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:24:41 +00:00
Lars Gullik Bjønnes
8f261b1529 The Gtk removal from trunk.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15488 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:05:16 +00:00
André Pönitz
153c997228 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15487 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 17:58:09 +00:00
Asger Ottar Alstrup
73facfc164 - fix StatusBar update
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15486 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 17:21:00 +00:00
Michael Schmitt
34bca87dd8 change tracking:
* src/paragraph.h: add method isInserted(...)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15485 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 17:02:23 +00:00
Michael Schmitt
21e11e2495 * src/text.C: fix status information output (change tracking)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15482 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 16:47:42 +00:00
Enrico Forestieri
b67c57a333 Compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15480 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 15:38:21 +00:00
André Pönitz
dc94575f2b make macrfos readable again
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15479 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 14:37:32 +00:00