Commit Graph

9174 Commits

Author SHA1 Message Date
Abdelrazak Younes
d682f36a67 Fix this bug:
1) View->Postscript
2) Export->LaTeX (plain)
 
1) will generate an error. 2) succeeeds (as it should), but the old error list is displayed again.

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


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


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

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


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


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

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

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

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

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


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

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

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

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

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


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

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

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

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

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

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


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

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

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


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


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

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

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



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


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


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


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


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


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

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


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


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


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


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


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


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


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


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

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

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

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


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




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

* all other files: implement drawDecoration().


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



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16767 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 16:23:47 +00:00