Commit Graph

511 Commits

Author SHA1 Message Date
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
Uwe Stöhr
18970a1c69 compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22482 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 20:55:52 +00:00
Richard Heck
795c729776 Remove layout stuff made obsolete by modularization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22471 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 07:24:53 +00:00
Richard Heck
4aea2f6a73 More tweaks, and some fixes for missing files in the makefiles, while we're at it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22469 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 07:19:07 +00:00
Richard Heck
736418751a AMS module tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22468 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 07:13:01 +00:00
Richard Heck
f5a5be4d18 Modularization of the AMS classes, and the theorem environments generally.
This is Part I: The changes to the layout files and modules. Part II, still
to come, will involve lyx2lyx to help people who were using the older classes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22461 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-10 04:58:20 +00:00
Bo Peng
06254d11df Embedding: display a pin at the top left corner of embedded figures
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22439 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 16:22:05 +00:00
Uwe Stöhr
81f48ded87 add a module for typesetting Braille
(entry for the LaTeXConfig.lyx file follows when bug 4460
http://bugzilla.lyx.org/show_bug.cgi?id=4460
is fixed)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22393 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-06 13:39:58 +00:00
Uwe Stöhr
38ed641598 add linguistics module
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22391 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 19:58:47 +00:00
Uwe Stöhr
d915adb996 add linguistics.lyx example file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22390 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 19:47:24 +00:00
Joost Verburg
7b84c4745d compile with MSVC 2008
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22339 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-02 15:15:04 +00:00
Joost Verburg
5a7bae747a fix compile error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22338 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-02 15:09:50 +00:00
Abdelrazak Younes
722329490b Simplify MenuBackend and menubar interactions.
* GuiMenubar: freed from GuiView and QMenuBar, renamed to 'Menus'
* GuiView: just use the standard QMenuBar.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22308 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-26 10:55:43 +00:00
Uwe Stöhr
082428c20a add MSVC build batch files to the SCons folder
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22177 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 19:38:45 +00:00
Uwe Stöhr
2b5d064ff4 textrm_O.png: rename image to what it really is
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22169 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 12:28:03 +00:00
Abdelrazak Younes
efbd1d30cb Sanitize the way we use abort() and exit(). With this commit, we should never crash in release mode, even when assertions are enabled. In debug mode, we crash with abort in order to get a useful backtrace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22165 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 11:34:29 +00:00
Abdelrazak Younes
c66e214724 Transfer getcwd() implementation to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22164 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 10:18:00 +00:00
Abdelrazak Younes
a53bbb6f5d update scons.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22162 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 07:54:14 +00:00
Abdelrazak Younes
c817011cd8 update scons.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22158 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-15 08:20:11 +00:00
Uwe Stöhr
bf903dbbaa update scons/scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22141 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-13 23:17:54 +00:00
Abdelrazak Younes
6d20abb1b1 get rid of lyxlib.h:copy() and rename().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22129 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-13 12:03:55 +00:00
Enrico Forestieri
430a2c1adb Restore scons and autotools support for moc files in src/support
taken out in r22101.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22105 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:37:40 +00:00
Enrico Forestieri
d73f28eec1 Revert qprocess code. Revisions reverted: 22026, 22030, 22044, 22048,
22077, 22078, 22079, 22080, 22081.

Sorry Peter, but this was breaking too many things, see discussions
on lyx-devel.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22101 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:25:53 +00:00
Uwe Stöhr
b3b243a6ca French docs translation updates by Siegfried
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22092 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-11 21:49:58 +00:00
Uwe Stöhr
b89e9516e5 update scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22075 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-11 00:49:41 +00:00
Abdelrazak Younes
5db88b5d56 update scons with DialogView.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22050 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-09 22:37:33 +00:00
Bo Peng
0e2ec55add Fix scons (moc src/support/*.h)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22048 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-09 19:59:39 +00:00
Peter Kümmel
3af56311a7 add progress view of system calls
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22026 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 20:46:03 +00:00
Uwe Stöhr
b618c03d90 scons/SConstruct: disable assertions for stable releases
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21955 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-04 21:05:41 +00:00
Uwe Stöhr
22ae25d8da update scons/scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21900 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-01 22:24:35 +00:00
Uwe Stöhr
7e7bf73c79 update scons/scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21871 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-30 00:03:31 +00:00
Abdelrazak Younes
09ff5016cd Inline qstring_helpers methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21792 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 10:26:03 +00:00
André Pönitz
f5dffff3d6 adjust
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21790 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 23:49:48 +00:00
Uwe Stöhr
5deee5ce07 update scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21761 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 13:30:54 +00:00
Uwe Stöhr
179c95c2c0 update scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21750 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 22:20:07 +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
Abdelrazak Younes
b9d2666b98 Move Dialog.{h,cpp} and ButtonPolicy.{h,cpp} to frontends/qt4/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21714 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-22 08:01:09 +00:00
Uwe Stöhr
79c85e5e95 scons_manifest.py: fix SCons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21673 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-19 00:49:22 +00:00
Bo Peng
7151f3404a fix scons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21621 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 03:28:53 +00:00
André Pönitz
743db92585 adjust
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21592 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 23:37:25 +00:00
Bo Peng
dd17ccef77 fix scons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21587 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 18:06:10 +00:00
Uwe Stöhr
c8d5d2ea83 actualize scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21562 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-12 22:43:15 +00:00
Uwe Stöhr
a145538ba1 big French manual update:
- UserGuide updates
- new translation of the EmbeddedObjects manual
done by Siegfried MEUNIER-GUTTIN-CLUZEL

- remove the file examples/fr/ExemplesTableaux.lyx since we have this now in the EmbeddedObjects.lyx manual (as I did for the other lanuages some weeks ago)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21560 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-12 22:34:10 +00:00
Uwe Stöhr
33b441517e scons_manifest.py: fix SCons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21524 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-08 22:54:41 +00:00
Abdelrazak Younes
62307f7ab5 Add TextClassPtr.h to scons.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21509 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:37:24 +00:00
Abdelrazak Younes
a4d2ae771a Add InsetLayout.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21505 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 22:50:00 +00:00
Bo Peng
6a464422b3 fix scons
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21504 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 22:45:12 +00:00
André Pönitz
16b4f6c373 adjust
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21479 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 20:58:15 +00:00
Uwe Stöhr
d795490816 correct scons_manifest.py
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21346 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 17:09:32 +00:00
Uwe Stöhr
607ebded27 update the build system after r2121337
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21345 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 17:05:29 +00:00