Commit Graph

400 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
76c98826a2 * lib/lyx2lyx/lyx_1_4.py:
* lib/lyx2lyx/lyx_1_6.py:
	- improve reversion method for floats.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22508 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-12 09:59:37 +00:00
Richard Heck
df4634968a Fix bugs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22506 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-12 06:43:44 +00:00
Richard Heck
d5d665482e This commit changes the way individual LyXModule's are represented, both internally and in the .lyx files. The earlier version represented them by their `descriptive name', e.g., "Endnote" or "Theorems (AMS)", these being the same names used in the UI. This was a mistake, as becomes readily apparent when one starts to think about translating these strings. The modules ought to be represented by their filename, without the extension, just as TextClass's are.
The changes that accomplish this part are in ModuleList.{h,cpp}, configure.py, and the *.module files themselves. This is a format change, and the lyx2lyx is in those files.

By itself, that change would not be major, except for the fact that we do not want the module to be represented in the UI by its filename---e.g., theorems-std---but rather by a descriptive name, such as "Theorems". But that change turns out to be wholly non-trivial. The mechanism for choosing modules was the same as---indeed, was borrowed from---that in GuiCitation: You get a list of modules, and choosing them involves moving strings from one QListView to another. The models underlying these views are just QStringListModels, which means that, when you want to know what modules have been selected, you see what strings are in the "selected" QListView. But these are just the descriptive names, and we can't look up a module by its descriptive name if it's been translated. That, indeed, was the whole point of the change to the new representation.

So, we need a more complicated model underlying the QListView, one that will pair an identifying string---the filename minus the extension, in this case---with each item. This turns out not to be terribly difficult, though it took rather a while for me to understand why it's not difficult. There are two parts:
(i)  GuiSelectionManger gets re-written to use any QAbstractListModel, not just a QStringListModel. This actually seems to improve the code, independently.
(ii) We then subclass QAbstractListModel to get the associated ID string, using the Qt::UserRole slot associated with each item to store its ID. This would be almost completely trivial if QAbstractListItem::itemData() included the QVariant associated with this role, but it doesn't, so there are some additional hoops through which to jump.

The new model, a GuiIdListModel, is defined in the files by that name. The changes in GuiSelectionManger.{h,cpp} make it more abstract; the changes in GuiDocument.{h,cpp} adapt it to the new framework. 

I've also updated the module documenation to accord with this change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22501 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-12 04:28:12 +00:00
Jürgen Spitzmüller
4b799833e7 *** Support for generic sideways floats ***
* src/Buffer.cpp:
	- format is up to 312.
* src/LaTeXFeatures.cpp:
	- add rotfloat.
* src/Insets/InsetFloat.cpp:
	- handle starred and generic sideways floats.
* src/frontends/qt4/FloatPlacement.{cpp,h}:
	- adjust GUI to the new features.
* lib/chkconfig.ltx:
	- add rotfloat
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- add reversion methods for new floats
* lib/lyx2lyx/lyx_1_4.py:
	- add proper reversion method for sideways floats (this was missing).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22495 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-11 18:56:53 +00:00
Richard Heck
a8d2d891ee Wow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22489 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-11 08:03:48 +00:00
Richard Heck
9f8bf4c9da Dummy format change for AMS modularization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22470 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 07:22:43 +00:00
Jürgen Spitzmüller
a229a78dff Support for \nocite* from Berhard Reiter. Increments file format to 210.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22327 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-28 16:56:57 +00:00
Richard Heck
2f22c881ee Routine for adding modules to the list of modules. Preparatory for AMS modularization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22318 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 20:15:31 +00:00
Richard Heck
e285d2a7d8 Support for nocite, provided by Bernhard Reiter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22217 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-20 15:46:14 +00:00
Uwe Stöhr
90c14f8c12 support for Serbian with Latin letters
- fileformat change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22143 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-13 23:29:56 +00:00
José Matox
73655dbbee Add "default" to language list. (fixes a crash).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22066 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-10 18:51:54 +00:00
Jürgen Spitzmüller
4770eb8ae2 * lib/lyx2lyx/lyx_1_1.py (revert_latexcommand_index):
- umlauts must be reverted to escaped forms.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 15:56:19 +00:00
Jürgen Spitzmüller
7feaac16d2 * lib/lyx2lyx/lyx_1_5.py:
- fix bug 4333.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22019 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 15:38:39 +00:00
Jürgen Spitzmüller
61e1643821 Support for \slash and \nobreakdash-
* src/lfuns.h:
* src/Text3.cpp:
* src/insets/InsetMathNest.cpp:
* src/insets/insetCollapsable:
	- new LFUN_SPECIALCHAR_INSERT
	- nuke LFUN_HYPHENATION_POINT_INSERT, 
	  LFUN_LIGATURE_BREAK_INSERT,
	  LFUN_DOTS_INSERT,
               LFUN_END_OF_SENTENCE_PERIOD_INSERT,
	  LFUN_MENU_SEPARATOR_INSERT
	  (functions now handled as arguments of the above)

* src/insets/InsetSpecialChar.{cpp,h}:
	- implement \slash and \nobreakdash-

* src/Buffer.cpp:
	- increment format to 307.
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion methods for SpecialChar \slash{} and
	  SpecialChar \nobreakdash-
* development/FORMAT:
	- document file format change

* lib/ui/stdmenus.inc:
* lib/ui/classic.ui:
	- add new SpecialChars to the menus, adapt lfuns to new scheme

* lib/bind/aqua.bind:
* lib/bind/cua.bind:
* lib/bind/emacs.bind:
* lib/bind/fi/menus.bind:
* lib/bind/mac.bind:
* lib/bind/menus.bind:
* lib/bind/sciword.bind:
* lib/bind/xemacs.bind:
	- add shortcuts for new SpecialChars, adapt lfuns to new scheme

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-06 11:04:56 +00:00
Uwe Stöhr
d21c9a2c07 support for the language Interlingua
- fileformat change

(Interlingua was the last missing language supported by babel)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21976 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-05 22:04:33 +00:00
Uwe Stöhr
fa37b1c4b1 support for the language Bahasa Malaysia
- fileformat change
- rename "Bahasa" to "Bahasa Indonesia"


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21974 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-05 21:42:57 +00:00
Jürgen Spitzmüller
3582be1441 framed.sty goes InsetBox:
* src/insets/InsetBox.{cpp,h}:
* src/frontends/qt4/GuiBox.{cpp,h}:
* src/frontends/qt4/ui/BoxUi.ui:
	- add and handle Framed and Shaded boxes
	- use more descriptive label names
	- implement name() function for Box:Shaded's sake

* src/insets/InsetNote.{cpp,h}:
* src/frontends/qt4/GuiNote.cpp:
* src/frontends/qt4/ui/NoteUi.ui:
	- remove Framed and Shaded.

* lib/layouts/stdinsets.inc:
	- remove Note:Framed and Note:Shaded
	- add Box:Shaded

* Buffer.cpp:
	- bump format to 304.

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- add conversion/reversion of framed/shaded notes to boxes.

* development/FORMAT:
	- document file format change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21945 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-04 09:25:50 +00:00
Uwe Stöhr
bfec9543b3 lyx2lyx/lyx_1_6.py: revert \linebreak and \pagebreak correctly to ERT
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21806 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 22:36:49 +00:00
Uwe Stöhr
0ef6b7c5fe - remove Serbocroatian from the language list because this was a fake. Croatian was used under the hood but we already have Croatian separately.
- implement Serbian

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21786 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 22:39:04 +00:00
Uwe Stöhr
9608e4971b support for the languages Latin and North Sami
- fileformat change

(I wonder why support for them was removed (must be before LyX 1.3), because the old reLyX script listed them as supported)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21783 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 21:09:01 +00:00
Uwe Stöhr
12f7869ac0 support for \linebreak:
- fileformat change
- tex2lyx support
- rename LFUN_BREAK_LINE to LFUN_NEW_LINE because this is what the lfun does and to avoid confusions
- new menu entry
- new shortcut C-S-Return

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21778 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:34:37 +00:00
Uwe Stöhr
97aa558cac support for \pagebreak:
- rename former "pagebreak" to "newpage" since it produces a \newpage
- new LFUN
- menu entry
- tex2lyx support
- fileformat change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21732 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 02:10:00 +00:00
Martin Vermeer
9df0ce8504 Improve conversion/reversion of index strings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21692 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-21 18:18:24 +00:00
Martin Vermeer
4bdd6f7937 Correct conversion of math insets inside Index
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21680 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-19 19:53:54 +00:00
Richard Heck
70055b3422 Change lyx2lyx to conform to new standard URL inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21586 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 15:30:29 +00:00
Uwe Stöhr
a5c7679887 lyx_1_6.py: fix for previous commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21360 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 22:40:31 +00:00
Uwe Stöhr
c750446566 lyx_1_6.py: fix dataloss in URL conversion routine
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21359 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 22:17:54 +00:00
Uwe Stöhr
0a7567ce3b - add entry to FORMATS file for Stefan's format change (Richards to 296 change is still not correctly listed)
- add support for hyerlink targets - fileformat changed
  (For Hyperlink.cpp I still need help to get rid of the strings and chars and use docstrings and char_type instead!)

Can anyone please open the changed Hyperlink.ui with a Qt 4.2 designer or below, save it and commit? Thanks. (Otherwise you cannot compile it.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21347 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 17:37:43 +00:00
Stefan Schimanski
9d9c5959f3 * file format 298 to convert macro definitions with optional parameters into ERT. This is still just an empty convertion, waiting for Uwe to find time to implement it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21326 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:03:51 +00:00
Uwe Stöhr
751fc1dc5e missing lyx2lyx stuff for the fileformat change to 297
(previous fileformat change to 296 by Richard is not yet described in FORMAT)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21302 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-30 22:07:16 +00:00
Uwe Stöhr
68167ee254 lyx_1_6.py: fix copy/paste bug from my previous commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21274 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 22:42:58 +00:00
Uwe Stöhr
bb46fe5f0e fileformat change for my previous commit: Albanian and lower Sorbian support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21273 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 22:38:36 +00:00
Richard Heck
4064d2c468 InsetInclude becomes an InsetCommand.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21149 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 15:02:15 +00:00
Bo Peng
7063b33b1b Remove the manifest section of the .lyx file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 18:06:00 +00:00
Enrico Forestieri
b96754bd88 Fix lyx2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21038 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 16:49:22 +00:00
Richard Heck
bfbf9c14e2 Fix up the HREF inset reversion routine.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21027 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 05:34:00 +00:00
Richard Heck
17fafa7f3d The lyx2lyx for recent work on href inset done by Uwe.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20975 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-15 16:40:47 +00:00
Uwe Stöhr
7075eaadef The huge URL patch:
- rename the lfun to href-insert.png
- rename the files to Hyperlink...
- the former URLUi produces now \href commands (hyperref)

Only missing thing is the lyx2lyx conversion routine - this will be done by Richard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 19:06:09 +00:00
Uwe Stöhr
dfc7fc59c1 lyx_1_6.py: avoid the same name of two different functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20934 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 03:18:51 +00:00
Uwe Stöhr
ed43dea031 fileformat change to 294 for Pavel's PDFOptions cleanup in r20881
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20933 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-12 23:51:56 +00:00
Bo Peng
353aacab4b InsetInfo: lyx2lyx support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20905 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:56:34 +00:00
Uwe Stöhr
d44d755732 lyx2lyx/lyx_1_6.py: forgot to revert the encoding too in my last commit (r20859)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20860 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 00:12:48 +00:00
Uwe Stöhr
a9b5b1ff9a Fileformat incremented to 293 due to yesterdays' support for japanese-plain (r20831)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20859 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-08 23:40:23 +00:00
Bo Peng
b352c78905 Fix indentation (from 2 spaces to 4) in lyx_1_6.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20818 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-07 14:26:16 +00:00
Uwe Stöhr
ae0f514870 support for the Vietnamese languages
fileformat increased to 291

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20738 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-04 23:20:39 +00:00
Uwe Stöhr
d162028a9c lyx2lyx/lyx_1_6.py: fix a comma
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20720 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 22:00:45 +00:00
Uwe Stöhr
e6498670fb lyx2lyx/lyx_1_6.py: remove now obsolete comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20718 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 21:39:32 +00:00
Uwe Stöhr
2492def7da provide wrap tables based on the current wrap float implementation
file format increased to 290


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20713 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 21:07:01 +00:00
Martin Vermeer
d21a3bb445 Index as collapsible, preserving existing feature set
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20699 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 13:38:19 +00:00
Uwe Stöhr
2b16811b46 lyx2lyx/lyx_1_6.py: small code change for better understanding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20689 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 09:55:37 +00:00