Commit Graph

9452 Commits

Author SHA1 Message Date
Georg Baum
52727f6f96 Improve fix for bug 3305
* src/LaTeX.C
	(insertIfExists): Instead of catching all fs exceptions, test for a
	valid filename before constructing a fs::path. This gets rid of the
	exceptions because of invalid names, but does still allow other
	expcetions to be thrown (e.g. because of file system problems).
	(handleFoundFile): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17424 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 19:38:20 +00:00
Michael Schmitt
5a90cc6871 * src/changes.C: reduce debug output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17423 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 19:03:47 +00:00
Georg Baum
9f75809bc5 Prepare for fixing bug 3235
* src/output_latex.C
	(TeXEnvironment): Rename language variables to make it very clear
	that they denote the paragraph language, not the character language.
	(TeXOnePar): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17422 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 17:19:08 +00:00
Abdelrazak Younes
566d80d064 add some safeguards (while investigating bug 3152).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17421 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 17:03:42 +00:00
Abdelrazak Younes
e69f006911 We don't need a QMainWindow parent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17420 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 15:45:08 +00:00
Jürgen Spitzmüller
c808fc0445 * src/buffer.C (readHeader):
- reset custom bullets initially. Fixes bug 3312.
* src/bufferparams.C: fix typo in comment

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17419 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 15:15:21 +00:00
Jürgen Spitzmüller
d588c13f3f Make r17416 compile.
Abdel, are Windows compiler really that dumb?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17418 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 15:11:18 +00:00
Abdelrazak Younes
51f2d5c064 adjust keyboard shortcuts for buttons.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17417 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 14:49:27 +00:00
Abdelrazak Younes
cb81965b1e * ControlToc:
- initialiseParams(): overload ControlCommand::initialiseParams() so that we can update the model at this point (QToc is the controller _and_ the model).
  - update(): new 
  - updateBackend(): new protected method to update the TocBackend (called for the "Update" button).

* QToc:
  - is now a QObject
  - modelReset: new Qt signal to indicate a model reset to associated dialog(s).
  - QToc(): avoid the duplicate update() call that will be done in the show command anyway.

* Dialogs.C
  - use new TocWidget in a DockView.

* TocWidget.[Ch]: renamed from QTocDialog. This striped down widget is only a widget that connects to the 'QToc' model/controller.

* DockView.h: new template class that encapsulates a given Widget inside a DockWidget and presents a Dialog::View interface.

* QTocUi.ui:
  - now is a simple Widget.
  - rearrange the buttons a bit
  - get rid of the unneeded close button.
  - modify the shortcut to "Promote" to 'r' because of a clash with "Alt-p" number (we really need real, always valid, shortcuts for all outline action!)




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17416 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 14:23:44 +00:00
Abdelrazak Younes
d1d4e6d48f * LyXFunc::menuNew():
- bug correction: don't forget to call updateLabels() to initialize the different backends.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17415 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 11:30:48 +00:00
Abdelrazak Younes
93211e0f3c * frontends/Dialogs::updateBufferDependent()
- update dialogs instead of hiding for dialogs that support that.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17414 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 11:27:47 +00:00
Abdelrazak Younes
bf61ecc2de Support code for advanced Toc management and bug correction.
* buffer.h:
  - structureChanged(): new boost signal. I intend to use that also when a text is changed in a section or caption item.

* buffer_funcs.C:
  - updateLabels(): emit Buffer::structureChanged() after TocBackend is updated.
  - checkBufferStructure(): new method for updating the TocBackend if needed.

* LyXView:
  - updateToc(): new slot for Buffer::structureChanged() signal.

* text.C:
  - call checkBufferStructure() whenever text is added or erased.

* TocBackend.[Ch]:
  - updateItem(): new method to update a specific item (called from checkBufferStructure()).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17413 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 11:23:41 +00:00
Abdelrazak Younes
fe48695577 Fix bug 3303 from Bernhard Roider. Some explanation:
The problem was that pit is a reference to cur.pit() and was set to lastpit() + 1 before calling recordUndo(cur, ...). thus an invalid cursor position was stored in the undo buffer.
A side effect of the attached patch is that now the cursor keeps staying in the moved section header  on undo (which is not the case in current trunk)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17410 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-05 13:16:55 +00:00
Georg Baum
62bb6150ee Fix bug 3305
* src/LaTeX.C
	(insertIfExists): Catch boost::filesystem exceptions, since they
	are not errors in this context
	(handleFoundFile): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17405 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-04 13:22:38 +00:00
Georg Baum
a9266cbdf0 Use only one codeset definition
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17403 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-04 13:04:18 +00:00
Michael Schmitt
f19b1fa09a * src/author.[Ch]: constify AuthorList::get()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17401 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-04 09:37:32 +00:00
Uwe Stöhr
14c356d31e - whitespace for Lars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-04 01:56:58 +00:00
Uwe Stöhr
f84d08a078 - fix bug 2458
http://bugzilla.lyx.org/show_bug.cgi?id=2458
- whitespace

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-02 22:20:32 +00:00
Georg Baum
4f4c5d4954 * src/support/lstrings.C
(lowercase): assert that input is pure ASCII
	(uppercase): ditto

	* src/support/lstrings.h
	(lowercase): document that only ASCII input is allowed
	(uppercase): ditto

	* src/lyxfind.C
	(stringSelected): Use compare_no_case (more efficient)

	* src/MenuBackend.C: remove unused using directive


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17393 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-02 16:52:49 +00:00
Georg Baum
a2ccc6202c remove unneeded namespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17391 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-01 16:35:26 +00:00
Georg Baum
b5285c8b7a Fix bug 3302 (untested): Add missing internal_path
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17390 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-01 16:25:51 +00:00
Jean-Marc Lasgouttes
a7c2c8e3d5 * support/filetools.C (makeDisplayPath): if the file is in the lyx
support directory, return as a relative path (enclosed in brackets)

	* frontends/qt4/GuiView.C (updateTabs): use makeDisplayPath instead
	of onlyFileName. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17384 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 21:48:04 +00:00
Michael Schmitt
136403d64b remove pointless clear() in constructor (reported by Lars)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17383 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 20:58:15 +00:00
Abdelrazak Younes
45747320f0 fix bug 2483:
http://bugzilla.lyx.org/show_bug.cgi?id=2483

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17381 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 14:36:38 +00:00
Georg Baum
13f08c6215 Fix bug 3232
* src/insets/ExternalSupport.C
	(updateExternal): Don't forbid conversions using the default converter


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17380 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 09:12:32 +00:00
Uwe Stöhr
2f76056e6c Fix bug 3292:
http://bugzilla.lyx.org/show_bug.cgi?id=3292
(fix tab order)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17379 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-27 23:48:57 +00:00
Georg Baum
471b4ea315 Fix bug 2937 (from Jean-Baptiste LAMY)
* src/support/filename.C
	(DocFileName::mangledFilenam): Use a whitelist of allowed characters
	instead of an incomplete blacklist of disallowed ones


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17378 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-27 19:01:10 +00:00
Jean-Marc Lasgouttes
e2d91ecfc2 add "Reconfigure" to the LyX menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17377 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-27 15:30:29 +00:00
Jean-Marc Lasgouttes
062c0017a4 Another fix for bug 3081 (related to booktabs this time)
* tabular.C (TeXRow): do not forget to increment the row counter


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17376 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-27 10:42:34 +00:00
Jean-Marc Lasgouttes
b01a9dc187 typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17374 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 22:27:37 +00:00
Jean-Marc Lasgouttes
fa637e5377 * src/frontends/qt4/QLMenubar.C (macxMenuBarInit): use the new support
Qt 4.2 for Mac menus (no merging is done for qt < 4.2 now).
        * src/frontends/qt4/Action.C (Action): initialize menu role to NoRole
	for qt >= 4.2.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17373 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 19:54:41 +00:00
Georg Baum
d1f8c007f0 Get rid of some locale dependant functions
* src/output_plaintext.C
	(writePlaintextParagraph): Use compare_ascii_no_case instead of
	compare_no_case, since the strings to compare are pure ASCII anyway.

	* src/frontends/qt4/QPrefsDialog.C
	(setComboxFont): ditto

	* src/MenuBackend.C
	(Menu::checkShortcuts): ditto

	* src/frontends/qt4/QLImage.C
	(QLImage::loadableFormats): Use ascii_lowercase instead of lowercase
	since the input is pure ASCII anyway.

	* src/tex2lyx/text.C
	(splitLatexLength): ditto

	* src/support/lstrings.[Ch]
	(compare_no_case): Get rid of both std::string variants
	(lowercase): Get rid of std::string variant
	(uppercase): Change std::string variant to docstring

	* src/support/tests/regfiles/lstrings: Add new expected output

	* src/support/tests/lstrings.C: Add tests for docstring functions


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17371 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 18:54:03 +00:00
Abdelrazak Younes
a7d8653a46 Document symbol fonts hack (text from Georg Baum).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17368 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 16:22:54 +00:00
Georg Baum
dca251a0ef remove stray dollar sign
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17365 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:37:48 +00:00
Georg Baum
f503258258 compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17364 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:36:36 +00:00
Georg Baum
e0845a1e53 fix thinko
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17363 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:29:04 +00:00
Abdelrazak Younes
ba62665f96 * support/qstring_helpers.h: erase ucs4_to_qstring() method.
* FontMetrics.h: only one string width() method.

* Painter.h: only one text() method.

* all other files: adapt to above API change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17362 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:13:08 +00:00
Abdelrazak Younes
85f66bcd90 Fix support lib dependency problem.
* docstring.C: Implement utf8ToUcs4() locally.

* all other files: remove utf8ToUcs4().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17361 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 12:46:44 +00:00
Abdelrazak Younes
52eb91c94f add config.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17360 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 11:18:37 +00:00
Georg Baum
8765ab59cd Almost fix 'make check'. The only remaining problem is an undefined
reference to lyx::utf8ToUcs4.
I did not fix this since it is an interface violation that should be fixed
otherwise.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:31:01 +00:00
Georg Baum
2655d46b03 fix 'make check' by removing useless namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17357 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:29:12 +00:00
Georg Baum
56eea075fd forgot this
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17355 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:03:58 +00:00
Georg Baum
0418d14704 Fix character classification functions by using qt (bugs like 3270 and 1247)
* src/support/lstrings.C
	(uppercase): Use qt instead of non working libc/home grown solution
	(lowercase): ditto
	(local_lowercase): Use qt instead of libc tolower for ucs4 chars

	* src/support/qstring_helpers.C
	(qstring_to_ucs4): Use qchar_to_ucs4 because of the assertion

	* src/support/lstrings.h: Add some documentation

	* src/support/qstring_helpers.h
	(is_utf16): New function: Tests whether an ucs4 character is also a
	valid utf16 character
	(qchar_to_ucs4): Assert on is_utf16()
	(ucs4_to_qchar): Replace old assertion with better is_utf16()

	* src/support/textutils.h
	(isLetterChar): Delete non-working implementation
	(isPrintable): Ditto
	(isPrintableNonspace): Ditto
	(isDigit):

	* src/support/textutils.C: New file, contains new implementations
	using qt of the functions in textutils.h

	* src/support/Makefile.am: Add textutils.C

	* development/scons/scons_manifest.py: ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17354 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:03:21 +00:00
Jean-Marc Lasgouttes
cd4b6edc73 typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17351 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 22:18:13 +00:00
Lars Gullik Bjønnes
144e61bc10 Fix-up damage done by overeager script in r15422
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17348 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 21:17:24 +00:00
Jean-Marc Lasgouttes
23b59966c7 * lyx_cb.C (insertPlaintextFile): delete selection before insertion
and handle undo correctly (bug 3204)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17345 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 20:16:45 +00:00
Jean-Marc Lasgouttes
e5a46922e9 * GuiView.C (updateTab): do not update early if current tab has
changed (bug 3254)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17344 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 19:42:48 +00:00
Jean-Marc Lasgouttes
7dd29bb818 Move translated files to their own directory
What I did:

* move xx_foo.ext to xx/foo.ext

* update Makefile.am to make install work

* minimally update scons_manifest.py (I'd be surprised to see it
  work).

* update i18nLibFileSearch to use the new naming scheme, and keep
  temporarily some code that checks the old method.

* update image paths in .lyx files

* update name of files (examples in tutorial, for ex.) in lyx files

What is definitely broken:

* cmake (did not touch it)

* TOC files (I am not sure how the code works)

I would be surprised if nothing else was wrong. 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17343 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 18:12:03 +00:00
Jean-Marc Lasgouttes
07aead5b21 Fix bug 3080
* src/paragraph.C (adjust_row_column): renamed from adjust_column_count;
	add texrow argument and adjust row as needed.
        (startTeXParParams, endTeXParParams, simpleTeXOnePar): adjust to above 
	changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17342 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 13:20:29 +00:00
Michael Schmitt
d6c60193d6 move plaintext() implementation to MathMacroTemplate.C;
support localization


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17338 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 09:27:11 +00:00