Commit Graph

489 Commits

Author SHA1 Message Date
Edwin Leuven
24160975f5 fix signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15909 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 18:52:41 +00:00
Georg Baum
2db7521b70 Add support for the esint package
* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): handle esint and wasysym

	* src/mathed/MathMacroTable.[Ch]
	(requires_): New member: tell the feature this macro requires
	(MacroTable::insert): take new requires arg

	* src/mathed/MathMacroTemplate.C
	(MathMacroTemplate::asMacroData): adjust to change above

	* src/mathed/MathSupport.C
	(fontinfos): add esint10 font

	* src/mathed/InsetMathHull.C
	(InsetMathHull::doDispatch): AMS_ON -> package_on

	* src/mathed/MathMacroTable.h

	* src/mathed/MathFactory.C
	(initSymbols): read and store requires field for symbols

	* src/mathed/InsetMathSymbol.C
	(InsetMathSymbol::metrics): handle esint
	(InsetMathSymbol::takesLimits): ditto

	* src/buffer.C
	(LYX_FORMAT): update format
	(Buffer::validate): handle esint, AMS_ON -> package_on

	* src/bufferparams.C:
	(AMSTranslator): Rename to PackageTranslator
	(BufferParams::readToken): Read \use_esint
	(BufferParams::writeFile): Write \use_esint

	* src/frontends/qt4/QDocumentDialog.C: handle esint

	* src/frontends/qt4/ui/MathsUi.ui : add esint checkboxes

	* src/frontends/qt4/GuiFontLoader.C
	(symbol_fonts: Add esint10 font
	(symbolFamily): handle esint10 font
	(isChosenFont): Add comment

	* src/frontends/controllers/ControlMath.C
	(latex_varsz): Add new integral symbols

	* src/support/fontutils.C
	(win_fonts_truetype): Add esint10 font

	* src/bufferparams.h
	(enum AMS): rename to enum Package
	(use_esint): new parameter

	* src/lyxfont.[Ch]: Add esint font

	* lib/symbols: Add new integral symbols

	* lib/lyx2lyx/LyX.py
	(format_relation): Update format

	* lib/lyx2lyx/lyx_1_5.py: handle new format

	* lib/chkconfig.ltx: Test esint package

	* lib/images/math/oiintop.xpm
	* lib/images/math/sqintop.xpm
	* lib/images/math/sqint.xpm
	* lib/images/math/ointctrclockwiseop.xpm
	* lib/images/math/ointctrclockwise.xpm
	* lib/images/math/iiintop.xpm
	* lib/images/math/iintop.xpm
	* lib/images/math/sqiint.xpm
	* lib/images/math/iiint.xpm
	* lib/images/math/ointclockwiseop.xpm
	* lib/images/math/oiint.xpm
	* lib/images/math/dotsintop.xpm
	* lib/images/math/sqiintop.xpm
	* lib/images/math/ointclockwise.xpm
	* lib/images/math/iiiintop.xpm
	* lib/images/math/dotsint.xpm
	* lib/images/math/iiiint.xpm
	* lib/images/math/iint.xpm: new icons

	* lib/doc/LaTeXConfig.lyx.in: Add docs for esint package

	* lib/doc/UserGuide.lyx: Add short documentation of integral symbols

	* lib/Makefile.am: Add new files

	* development/scons/scons_manifest.py: ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15907 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 17:35:18 +00:00
Abdelrazak Younes
3b91a07daa re-enable opaque widget optimization following Trolltech developer advice (in order to speed up Mac).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15906 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 17:28:37 +00:00
Georg Baum
2734cc1548 Extend the navigate menu to child docs
* src/buffer_funcs.h
	(updateLabels): Add bool childonly argument

	* src/insets/insetbase.h
	(addToToc): New virtual method

	* src/insets/insetinclude.[Ch]
	(addToToc): New virtual method
	(updateLabels): New method

	* src/TocBackend.h: reorganize classes so that we can forward
	declare TocList

	* src/insets/insetfloat.[Ch]
	* src/insets/insetwrap.[Ch]
	(addToToc): Adjust to type changes in TocBackend.h

	* src/frontends/qt4/TocModel.[Ch]: ditto

	* src/frontends/controllers/ControlToc.[Ch]: ditto

	* src/TocBackend.C: ditto
	(TocBackend::update) Remove test for float and wrap inset,
	call virtual method instead

	* src/BufferView.C
	(BufferView::dispatch): make LFUN_PARAGRAPH_GOTO work even if the
	target paragraph is in a different buffer

	* src/MenuBackend.C: Adjust to type changes in TocBackend.h
	(expandToc): Add an entry for the master doc in child docs

	* src/buffer_funcs.C
	(setLabel): Add text class parameter
	(updateLabels): handle included docs if requested by the caller


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15904 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 16:53:49 +00:00
Jürgen Spitzmüller
18e07ec393 * src/frontends/qt4/QBoxDialog.C:
* src/frontends/qt4/QExternalDialog.C:
* src/frontends/qt4/QVSpaceDialog.C:
	- fix signal/slot connection

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15879 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 11:25:20 +00:00
Georg Baum
2c64f84300 Fix translation of ambiguous messages
* src/frontends/qt4/ui/QPrefConvertersUi.ui: Readd translation hint
	to label and remove broken tooltip that somebody created instead

	* src/messages.C
	(Messages::Pimpl::get): reenable stripping of [[..]] from
	untranslated messages


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15872 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 09:36:08 +00:00
Abdelrazak Younes
a988cd6de1 - hum... truly fix the cursor.
- remove unneeded vertical scrollbar policy setting.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15869 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 08:29:05 +00:00
Abdelrazak Younes
7a99d338c6 - Clean up CursorWidget and hopefully fix Mac support.
- restore scrollbar when Buffer available.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15868 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 07:50:18 +00:00
Georg Baum
de38acaef0 unicode: ditch another utf8 roundtrip + some obsolete FIXMEs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15866 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 21:09:51 +00:00
Abdelrazak Younes
e34ad6ade0 - Cleanup splash screen
- fix bug when no Buffer.
- hide scrollbar when no buffer




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15862 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 17:41:55 +00:00
Michael Schmitt
d78c8a0b0b * src/frontends/qt4/ui/QNomenclUi.ui: add shortcuts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15853 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:40:04 +00:00
Abdelrazak Younes
479e9054db * Buffer
- new pimpled TocBackend member and associated accessors.

* toc.[Ch]: delete all toc related methods except outline.

* TocBackend:
  - goTo(): deleted, this gets rid of the LyXView dependency
  - made all accessors const.

* ControlToc: 
  - rework the controller to work exclusively with TocBackend.
  - goTo(): now call LyXView::dispatch() directly

all other files: update with the TocBackend or ControlToc API changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15852 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:35:14 +00:00
Jürgen Spitzmüller
f7252e64c6 * src/frontends/qt4/BulletsModule.C: only whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15841 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-10 17:00:21 +00:00
Edwin Leuven
7a3f9c65f7 ugras baran: correct switching between different TOC types
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15837 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-10 13:13:10 +00:00
Abdelrazak Younes
c0f6f79cb0 Fix for bug 2975 (http://bugzilla.lyx.org/show_bug.cgi?id=2975) from Ozgur Ugras BARAN. Looks like a gcc bug with STL map.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15821 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 13:13:28 +00:00
Edwin Leuven
f27065f936 some cleanup:
* have the modify/new functions in the formats and converter modules share most of their code

* get rid of the pointer to PrefConverters in the
formats module 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15820 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 11:07:42 +00:00
Edwin Leuven
716adc1e48 solve crash (no cleanup):
http://permalink.gmane.org/gmane.editors.lyx.devel/72180

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15818 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 10:15:17 +00:00
Peter Kümmel
d1280565fd scrollbars always on to avoid an additional resize when switching the buffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15815 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 09:15:04 +00:00
Peter Kümmel
e70fa92179 fix drifted position of restored window
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15814 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 09:13:04 +00:00
Peter Kümmel
3ae92a71ed disable toolbar popup menu, this is better than the current state
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15809 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-08 23:10:46 +00:00
Abdelrazak Younes
60cf37471d Fix potential crash. Passing an empty string happens _very_ often.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15803 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-08 11:32:33 +00:00
Michael Schmitt
298c01e167 replace "Notation Entry" by "Glossary Entry" and "Notation List" by "Glossary"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15797 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 22:28:53 +00:00
Asger Ottar Alstrup
977b8d094a - Get rid of manifestly expensive debugging output in the most critical path in LyX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15796 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 22:17:12 +00:00
Georg Baum
d3218b9acb document docstring abuse for symbol font code points
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15791 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 20:46:38 +00:00
Michael Schmitt
94bc110668 * GuiApplication.C: fix compilation (ev => xev)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15787 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 18:17:15 +00:00
Michael Schmitt
c56671cec7 * src/frontends/qt4/qt_helpers.C:
* src/frontends/qt4/qt_helpers.h:
	* src/frontends/qt4/ui/Makefile.am:
	* Status.15x:
	* development/scons/qt4.py: fix localization for qt4 strings


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15786 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 18:09:55 +00:00
Michael Schmitt
e0ae3a1a04 ui/*.ui: <include location="local" >qt_helpers.h</include>
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15784 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 17:56:32 +00:00
Abdelrazak Younes
c2a49b5b0d * Application:
- setBufferView(): deleted
  - currentView(), setCurrentView(): new method to set the current LyXView

* GuiApplication::x11EventFilter(): use currentView().view() to get the current BufferView. This should solves the X11 selection bug.

* WorkArea:
  - dispatch(): redraw only if needRedraw in preparation for the painting optimization patch. Show the cursor immediately on mouse click.
  - setBufferView(): remove call to Application::setBufferView()

* GuiWorkArea:
  - focusInEvent(): update only if we changed LyXView
  - focusInEvent(): stop the cursor only if we changed LyXView.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15783 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 17:19:33 +00:00
Jürgen Spitzmüller
7d4268a5e5 Hit Qt 4.2 with the sledgehammer until the dialog resizing bug is fixed.
* src/frontends/qt4/QDocumentDialog.C:
* src/frontends/qt4/QPrefsDialog.C:
	- force updateGeometry() for Qt >= 4.2 after the panel stack
	   has been built. This is a workaround for a Qt bug. See FIXMEs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15781 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-07 16:20:42 +00:00
Jürgen Spitzmüller
c5499a3da5 Revert from revision 15769:
* src/frontends/qt4/panelstack.C: 
	- fix the preferences and document dialog resizing problem (well, at least 
	  for me -- please verify).

This didn't fix the problem. I'm pretty sure now that this is a bug in Qt 4.2(.1?)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15770 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-06 18:04:51 +00:00
Jürgen Spitzmüller
54cc44fd9a * src/frontends/qt4/panelstack.C:
- fix the preferences and document dialog resizing problem (well, at least 
	  for me -- please verify).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15769 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-06 16:27:31 +00:00
Georg Baum
b60ef50a54 Remove unused symbol encoding
* src/encoding.[Ch]
	(symbol_encoding, symbol_encoding_): remove (unused)

	* src/frontends/qt4/QLPainter.C
	(QLPainter::text): Remove commented code. It was used in pre
	unicode times to get unicode values of the symbol fonts if
	USE_UNICODE_FOR_SYMBOLS was defined, but this was never defined
	anyway, since the code points of the symbol fonts (as written in
	lib/symbols) are directly used.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15758 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 20:13:22 +00:00
Georg Baum
99d066de95 * src/frontends/qt4/GuiFontMetrics.C
(GuiFontMetrics::signedWidth): Micropotimization: Avoid a temporary
	docstring


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15755 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 18:27:50 +00:00
Michael Schmitt
dd44deca01 * src/frontends/qt4/QDelimiterDialog.C: don't use term 'size' in
math delimiter size values
	* Status.15x: kill one bug & add a new one


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15753 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 17:38:58 +00:00
Michael Schmitt
4e9bb0990f * src/frontends/qt4/ui/QCitationUi.ui: cosmetics: capitalize label
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15752 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 17:23:20 +00:00
Abdelrazak Younes
18ec722cf2 Bug Fix: Window title was not updated in new window.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15750 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 15:34:18 +00:00
Jürgen Spitzmüller
691ca4c0a4 * src/frontends/qt4/panelstack.C:
- fix resizing of treeview
	- hide pointless header

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15749 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 12:30:12 +00:00
Georg Baum
7a0f75710d remove faulty FIXMEs. I was confused.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15746 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-05 11:52:45 +00:00
Georg Baum
e35725d5c0 New nomenclature inset from Ugras
* src/LyXAction.C
	(LyXAction::init): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

	* src/insets/insetbase.C
	(build_translator): ditto

	* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): Add nomencl

	* src/insets/insetnomencl.[Ch]: new insets InsetNomencl and
	InsetPrintNomencl

	* src/insets/insetbase.h: Add NOMENCL_CODE and NOMENCL_PRINT_CODE

	* src/insets/insetcommandparams.C
	(InsetCommandParams::findInfo): Add nomenclature and printnomenclature
	(InsetCommandParams::getCommand): Extend end of command protection to
	cover commands with only optional arguments like printnomenclature

	* src/insets/insetert.C
	(InsetERT::getStatus): disable LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT

	* src/insets/Makefile.am: Add new files
	* src/frontends/qt4/Makefile.dialogs: ditto
	* src/frontends/qt4/Makefile.am: ditto

	* src/factory.C
	(createInset): Handle InsetNomencl and InsetPrintNomencl
	(readInset): ditto

	* src/buffer.C
	(LYX_FORMAT): increase

	* src/lyxfunc.C
	(LyXFunc::dispatch): Handle nomenclature

	* src/LaTeX.C
	(LaTeX::deleteFilesOnError): Delete .nls file
	(LaTeX::run): Run makeindex for nomenclature
	(LaTeX::runMakeIndex): handle nomenclature options
	(LaTeX::deplog): Recognize nomenclature file

	* src/frontends/qt4/QNomenclDialog.[Ch]: new
	* src/frontends/qt4/QNomencl.[Ch]: ditto
	* src/frontends/qt4/ui/QNomenclUi.ui: ditto

	* src/frontends/qt4/Dialogs.C
	(Dialogs::build): handle nomenclature dialog

	* src/text3.C
	(LyXText::dispatch): Handle LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT
	(LyXText::getStatus): Ditto

	* src/lfuns.h
	(kb_action): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

	* lib/lyx2lyx/LyX.py
	(format_relation): Update 1.5 format range

	* lib/lyx2lyx/lyx_1_5.py
	(revert_nomenclature): New
	(revert_printnomenclature): ditto

	* lib/chkconfig.ltx: Test for nomencl package

	* lib/doc/LaTeXConfig.lyx.in: Add nomencl package

	* lib/doc/Extended.lyx: Add documentation for nomencl

	* lib/ui/stdtoolbars.ui
	(Toolbar "extra" "Extra"): Add nomencl-insert

	* lib/ui/classic.ui: Add nomencl-insert and nomencl-print
	* lib/ui/stdmenus.ui: ditto

	* development/scons/scons_manifest.py: Add new files

	* development/FORMAT: Describe new format


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15739 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 17:55:36 +00:00
Jürgen Spitzmüller
fd5b78d42b * src/frontends/qt4/QBranches.C:
- fix item selection after update
	- improve gui
* src/frontends/qt4/QBranches.[Ch]: add alterColor method (alter color on double click)
* src/frontends/qt4/QocumentDialog.C: add comment

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15737 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 15:08:53 +00:00
Peter Kümmel
60059d0c08 fix crash in preferences dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15732 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 13:05:07 +00:00
Georg Baum
f2025c20e9 Convert the CREDITS file to utf8 and spell Ugras' name correctly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15731 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 12:46:00 +00:00
Georg Baum
8d9df8bce5 fix gcc warnings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15727 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 09:47:14 +00:00
Abdelrazak Younes
5c57bee5b9 * WorkArea
- hasFocus(): new pure virtual method
  - redraw(): update singlePar only if the Widget has the focusInEvent

* GuiWorkArea.h: implement hasFocus().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15724 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 07:29:25 +00:00
Abdelrazak Younes
f8b75dc40f * QLPainter::text(): Put the debug message in Debug::PAINTING
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15723 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 07:26:45 +00:00
Edwin Leuven
555c1e1cde * update dialog when changing lyx display settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15715 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 16:34:06 +00:00
Georg Baum
49070b4c00 Fix problem with non-ascii branch names by converting more stuff to
docstring.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15713 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 15:16:45 +00:00
José Matox
61849bf291 Add UTF-8 as an option for encoding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15708 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 12:13:57 +00:00
Edwin Leuven
406c793cd8 * reorganisation of graphics dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15707 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 11:24:27 +00:00
Peter Kümmel
77ada344c4 disable scrollbar when it is not needed, especially for the empty start up window
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15700 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 09:23:52 +00:00
Asger Ottar Alstrup
89d5c4ed03 - Sort lyxlex table
- Get rid of setRenderHint for anti-aliasing, because we should respect user windows setting


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15699 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 08:17:26 +00:00
Abdelrazak Younes
352ce035b9 Fix multi-window resize bug:
Use case: Two window share the same buffer. The first window is resize. This modify the inner Buffer structure because Paragraph has a notion of line break and thus line width. When switching to the other window which does not have the same size, LyX crashes because the line break is not adapted the this BufferView width.

This commit fix the crash by resizing the BufferView on a focusInEvent(). That is not a good fix but it is a fix nevertheless. The bad side effect is that when the two BufferView shows the same portion of the Buffer, the second BufferView will show the same line breaks as the first one even though those line breaks are not adapted to the second BufferView width... such is life!



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15697 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-02 23:55:49 +00:00
Abdelrazak Younes
ff3c643f09 - restore a backing pixmap painting strategy: the pixmap is drawn at expose() time.
- the cursor is still a widget, the width is 2-pixel on Windows and 1-pixel on other platforms. The full screen refresh on blinking cursor bug is now gone.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15695 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-02 22:53:10 +00:00
Peter Kümmel
8e54e38c3b enable selection with the mouse for math and tables
Qt doc for QMouseEvent::button(): 
         Note that the returned value is always Qt::NoButton for mouse move events.
    so we must use buttons() instead because later on 
    the code checks for the left button.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15693 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-02 22:23:26 +00:00
Bo Peng
eaa33dca6d Session/Toolbars:
* src/LyXAction.C: LFUN_TOOLBAR_TOGGLE_STATE
	* src/session.h/C: add ToolbarSection class
	* src/lyxfunc.C: handle LFUN_TOOLBAR_TOGGLE_STATE
	* src/frontends/LyXView.h/C: toggleToolbarState(name)
	* src/frontends/Toolbars.h/C: initFlags, toogle and save toolbar, 
	    changed update logic
	* src/frontends/qt4/QLToolbar.h/C: saveInfo. Surprisingly little is 
	    asked from frontend.
	* src/frontends/qt4/GuiView.C: save toolbar when lyx exits
	* src/MenuBackend.h/C: add Toolbars submenu
	* src/lfuns.h: add LFUN_TOOLBAR_TOGGLE_STATE
	* src/ToolbarBackend.h: add AUTO flag
	* lib/ui/stdmenus.ui: add view->Toolbar menu


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15691 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-02 16:01:36 +00:00
Abdelrazak Younes
5cadc33792 This commit initialise correctly the tab bar in a new window.
* GuiView::init(): switch to the first avalaible buffer if any.

* GuiWorkArea::focusInEvent(): update the LyXView tab bar there.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15685 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-01 22:57:32 +00:00
Peter Kümmel
5c92641c4d disable scrollbar when it is not needed, especially for the empty start up window
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15677 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-01 17:51:56 +00:00
Peter Kümmel
1364943414 add link to Qt bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15665 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-01 14:40:02 +00:00
Peter Kümmel
a252679cca add missing header, forgotten because of the Qt precompiled headers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15641 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 14:57:25 +00:00
Peter Kümmel
bc0eb0b97f add missing header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15640 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 14:46:38 +00:00
Peter Kümmel
7ea5cb8d15 enable movable toolbars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15639 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 14:39:16 +00:00
Peter Kümmel
8669b0087e Add tab support
frontends/LyXView.h
	- add tab update function 
	
frontends/qt4/GuiView.h
	- add tab update function
	- add function for setting up the tabs
	- add slot for the tab clicks
	- add pimpl
	
frontends/qt4/GuiImplementation.C
	- don't set the buffer as central widget 
	  but initilize the tabs
	  
frontends/qt4/GuiView.C
	- use QTabBar for switching
	- scan the bufferlist on updates
	
frontends/LyXView.C
	- also update the tabs
	


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15637 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 14:12:46 +00:00
Peter Kümmel
b15b581f57 * frontends/Toolbars.C:
revert first patch http://www.lyx.org/trac/changeset/15597
* frontends/qt4/GuiView.C:
	don't 'break' the toolbar because it doesn't work if 
	the toolbar will be hidden





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15636 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 13:59:22 +00:00
Michael Schmitt
4292f4e9e9 remove references to Qt3/Gtk
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15630 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 21:45:37 +00:00
Abdelrazak Younes
65354d63a7 small cosmetic cleanups:
* delete some comments
* use lyxerr instead of cout in PanelStack
* move PanelStack into lyx::frontend namespace


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15623 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 14:39:05 +00:00
Abdelrazak Younes
e918c00190 small cleanup while looking for a bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15622 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 14:15:05 +00:00
Jürgen Spitzmüller
6eeb83498c * QPrefScreenFontsUi.ui: assing label to the correct (and existing) buddy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15621 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 14:05:06 +00:00
Abdelrazak Younes
fbcc021da6 small cleanup while looking for a bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15620 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 13:49:41 +00:00
Abdelrazak Younes
992fe1dba6 * QLPainter:
- ctor and dtor moved to public:
  - QLPainter(): takes a QPaintdevice instead of a QWidget.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15619 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 13:16:18 +00:00
Abdelrazak Younes
662974406a Forgot that also!
* QLPainter::~QLPainter: add virtual

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15616 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 11:04:37 +00:00
Abdelrazak Younes
73ed0b5203 * Painter.h:
* Painter: new ctor that sets drawing_enabled_ to true.
  * setDrawingEnabled(), isDrawingEnabled(): new methods.

* QLPainter.C: only draw if drawing is enabled.

* nullpainter.h: deleted.

* rawpainter.C::paintPar(): only draw if we are inside the Paragraph.

* InsetTabular::draw(): use new Painter method instead of a NullPainter.

* InsetMathNest::drawSelection(): ditto.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15613 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 10:09:59 +00:00
Bo Peng
b9c604e968 session: rename some functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15607 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-29 20:01:00 +00:00
Peter Kümmel
32e777c786 remove warning, use shorter code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15595 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 17:14:51 +00:00
Michael Schmitt
5d166accfe * qt4/GuiFontMetrics.C: remove qt3 compatibility code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15594 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 16:01:12 +00:00
Abdelrazak Younes
37e8b2c0f4 Compilation fix for Mac and Linux:
* add QWidget header.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15593 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 15:28:18 +00:00
Abdelrazak Younes
3c296efd19 simplify paintText() interface.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15590 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 09:59:43 +00:00
Abdelrazak Younes
54bdecdb48 remove paperHeight() and paperWidth() in Painter and inherited classes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15589 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 09:36:22 +00:00
Abdelrazak Younes
56be946751 delete unused code and comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15588 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 09:19:37 +00:00
Abdelrazak Younes
9b89f1d4ad stop/start the blinking cursor when the WorkArea get a focusInEvent or focusOutEvent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15586 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 23:26:52 +00:00
Abdelrazak Younes
1372f311d3 replace the map based width cache with an array based one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15585 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 22:46:36 +00:00
Abdelrazak Younes
7f94f08bbe * GuiFontMetrics: new metrics(QString) method
* QLPainter::paintText(): use GuiFontMetrics::metrics(QString) to avoid an ucs4 to QString conversion.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15584 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 21:27:03 +00:00
Bo Peng
0fc684e6e6 class session reorganization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15581 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 14:18:03 +00:00
Abdelrazak Younes
d916db37b0 MacOSX optimisation:
* QLPainter::paintText(): use the font width cache instead of the painter metrics.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15580 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 13:36:23 +00:00
Peter Kümmel
fe784fe9d3 when we use QDesktopWidget we should include it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15577 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-27 11:47:59 +00:00
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
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
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
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
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
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
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
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
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