Don't use multiple QPainter::begin on the same QPaintDevice.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14101 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyx_cb.C
(quitLyX): lyx_gui::exit takes now an argument
* src/frontends/{gtk,xforms}/lyx_gui.C
(lyx_gui::parse_init): rename to lyx_gui::exec and call LyX::exec2
(void lyx_gui::exit): add exit status argument
* src/frontends/qt{3,4}/lyx_gui.C
(cleanup): new function for pointer cleanup
(lyx_gui::parse_init): rename to lyx_gui::exec and call LyX::exec2,
turn static variables into automatic variables
(void lyx_gui::exit): add exit status argument
(start): Use cleanup()
(exit): ditto
* src/frontends/lyx_gui.h
(parse_init): remove
(exec): new
(exit): Take exist status argument
* src/lyx_main.[Ch]
(LyX::priv_exec): split into LyX::priv_exec and LyX::exec2
* src/lyx_main.C
(lyx_exit): New, choose the right exit function
(showFileError): call lyx_exit
(LyX::queryUserLyXDir): ditto
(LyX::init): ditto
(LyX::priv_exec): ditto
(LyX::priv_exec): Replace want_gui by lyx_gui::use_gui
(LyX::priv_exec): replace lyx_gui::parse_init by lyx_gui::exec and
exec2
(LyX::init): Replace gui argument by lyx_gui::use_gui
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14036 a592a061-630c-0410-9148-cb99ea01b6c8
a warning.
* src/text.C (readParToken): handle \change_inserted and
\change_deleted tokens with wrong author index (bug 2614).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14028 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/ALLFRONTENDS/lyx_gui.C: use passed width/height/posx/posy in lyx_gui::start
* src/frontends/lyx_gui.h: prototype change for lyx_gui::start
* src/lyx_main.C: determine windows size and position from lyxrc or session.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13953 a592a061-630c-0410-9148-cb99ea01b6c8
TODO: reorganize this code. In particular make sure that this advise from Qt documentation is respected:
Since the QApplication object does so much initialization, it must be created before any other objects related to the user interface are created.
Right now this is not the case. For example, "FontLoader::initFontPath()" is called before the QApplication creation. Moreover, I suspect that a number of global variables contains Qt object that are initialized before the passage through parse_init(). This might also explain the message displayed by Qt that caused the hanging:
QObject::killTimer: timers cannot be stopped from another thread
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13948 a592a061-630c-0410-9148-cb99ea01b6c8
(LyXServerSocket::~LyXServerSocket): Don't try to unregister and
close fd_ if the socket is disabled (avoids crash on win, from Peter
KÃŒmmel)
(LyXServerSocket::~LyXServerSocket): Check the return value of close()
(LyXDataSocket::~LyXDataSocket): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13941 a592a061-630c-0410-9148-cb99ea01b6c8
"Don't view/edit this format", and 'auto' means "Use the default viewer/editor".
* src/format.C
(fixCommand): Change semantics: "none" is equal to "", and "auto"
is removed if canAutoOpenFile returns false.
* src/frontends/xforms/FormPreferences.C
(FormPreferences::SpellOptions::apply): "none" -> ""
* src/lyxrc.C
(LyXRC::read): "none" -> ""
* lib/doc/Customization.lyx: Document the autoopen feature
* lib/configure.py
(checkProg): add optional not_found argument, defaulting to 'none'
(checkViewer): new, equivalent to checkProg with not_found = 'auto'
(checkFormatEntries): call checkViewer instead of checkProg for
viewers and editors
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13929 a592a061-630c-0410-9148-cb99ea01b6c8
qt4/qfont_loader.h: reverted to last version and added comment about pointer reference.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13927 a592a061-630c-0410-9148-cb99ea01b6c8
Disable saving of bookmarks in mathed for it is not yet supported
and makes LyX crash (bug 2597)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13911 a592a061-630c-0410-9148-cb99ea01b6c8
do not mark the cursor undispatched after mouse (button 3) press
(prevents the cursor from leaving the tabular when opening the
dialog).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13906 a592a061-630c-0410-9148-cb99ea01b6c8
fix crash due to invalidated
cursor after insertAciiString (bug 2603).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13905 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetGraphics::prepareFile): Rename file in the temp dir if the
extension does not match the format (bug 2235)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13898 a592a061-630c-0410-9148-cb99ea01b6c8
is changed
* src/cursor.C: remove unused 'using std::swap'
* src/BufferView.C: ditto
* src/CutAndPaste.[Ch]
(switchBetweenClasses): replace ParagraphList argument with InsetText
argument. This avoids an unnecessary swap in lyxfunc.C.
* src/CutAndPaste.C
(pasteSelectionHelper): Adjust to the changes above
(pasteSelectionHelper): Use ParagraphList::swap instead of std::swap.
This fixes the crash.
* src/lyxfunc.C
(LyXFunc::dispatch): Adjust to switchBetweenClasses changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13895 a592a061-630c-0410-9148-cb99ea01b6c8
(document_): new flag, telling whether this is a document format and
we want to show this format in the export and view menus
(documentFormat): accessor for document_
* src/format.h: Add some documentation
* src/frontends/qt3/QPrefsDialog.C
(QPrefsDialog::QPrefsDialog): handle new documentCB checkbox
(QPrefsDialog::switch_format): ditto
(QPrefsDialog::updateFormatsButtons): ditto
(QPrefsDialog::new_format): ditto
(QPrefsDialog::modify_format): ditto
* src/frontends/qt3/ui/QPrefFileformatsModule.ui: Add documentCB checkbox
* src/frontends/qt4/QPrefsDialog.C
(QPrefsDialog::QPrefsDialog): handle new documentCB checkbox
(QPrefsDialog::switch_format): ditto
(QPrefsDialog::updateFormatsButtons): ditto
(QPrefsDialog::new_format): ditto
(QPrefsDialog::modify_format): ditto
* src/frontends/qt4/ui/QPrefFileformatsUi.ui: Add documentCB checkbox
* src/frontends/xforms/FormPreferences.C
(FormPreferences::Formats::build): handle new check_document checkbox
(FormPreferences::Formats::input): ditto
(FormPreferences::Formats::Add): ditto
(FormPreferences::Formats::Browser): ditto
* src/frontends/xforms/forms/form_preferences.fd: Add check_document
checkbox
* src/lyxrc.C
(LyXRC::read): Remove compatibility code for 1.3 \format entries.
Read the new format flags (but don't require them for 1.4
compatibility)
(LyXRC::write): Write the new format flags
* src/MenuBackend.C
(expandFormats): Remove the hardcoded exception for image formats
and use Format::isDocument() instead
* lib/doc/Customization.lyx: Document auto viever/editor and the
"document format" flag
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13887 a592a061-630c-0410-9148-cb99ea01b6c8
* panelstack.C: automatic creation of parent category if not already created.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13886 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/qfontloader.C (initFontPath, ~FontLoader): add fonts in
lyxdir/fonts to system fonts in windows; remove them in destructor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13877 a592a061-630c-0410-9148-cb99ea01b6c8
* CutAndPaste.C
(eraseSelectionHelper): merge (conditionally) only first and last
paragraph of selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13875 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insetinclude.h
(updateBibfilesCache): adjust comment
(getBibfilesCache): ditto
* src/insets/insetinclude.C
(getChildBuffer): new, return the buffer of the child if it exists
(updateBibfilesCache): update the child buffer only if already loaded
(getBibfilesCache): scan the child buffer only if already loaded
* src/buffer.h
(updateBibfilesCache): adjust comment
(getBibfilesCache): ditto
(bibfilesCache_): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13869 a592a061-630c-0410-9148-cb99ea01b6c8
atm this does not work because it depends on the order in which these entries were added.
now the order is alphabetical and things are messed up.
the attached patch adds the nr of the format/converter to the listwidgetitem as a type and uses that to get to the right details
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13864 a592a061-630c-0410-9148-cb99ea01b6c8
Can you move the SUBDIRS var back to the top of the file pleae.
Also EXTRA_DIST should be at the top.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13863 a592a061-630c-0410-9148-cb99ea01b6c8
* configure.ac: removed frontends/qt4/moc compilation.
* frontends/qt4/: moc files (*_moc.cpp) are now included at the end of relevant source file (*.C)
* SConscript: adapted to "moc included in .C file" change.
* frontends/qt4/Makefile.am: adapted to "moc included in .C file" change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13860 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyx_main.C (init): call Formats::setAutoOpen.
* src/lyxrc.C (read): do not reset editor/viewer values of "none".
* src/format.C (fixCommand): helper function: tweak command depending
of the availability of OS viewer/editor.
(setAutoOpen): run fixCommand over all the formats.
* src/support/Makefile.am: under win32, link against shlwapi.dll.
* src/support/os_*.C (canAutoOpenFile, autoOpenFile): new
functions, used to let the OS handle viewers and editors it knows about.
* configure.ac: improve check for shlwapi.
* lib/configure.py: remove check for native windows viewers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13855 a592a061-630c-0410-9148-cb99ea01b6c8
lyxrc.dist, but before reading lyxrc.defaults; add extra_prefix to
the PATH before reconfiguring.
(needsUpdate): new helper function; returns true if file does not
exist or is older than configure.py.
(queryUserLyXDir): check textclass.lst and packages.lst in
addition to lyxrc.defaults.
(reconfigureUserLyXDir): use SystemCall, since system() does not
wait on windows.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13816 a592a061-630c-0410-9148-cb99ea01b6c8
* SConstruct: force the use of g++ under windows, and use the right libraries
* config/qt4.py: check QtGui4 etc as well.
* src/SConscript: link to the right libraries
* src/tex2lyx/SConscript: use the right libraries
* src/frontends/qt3/SConscript: manually moc .h files under windows
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13814 a592a061-630c-0410-9148-cb99ea01b6c8
remove lookupChangeType;
rename setChange to setChangeType;
rename setChangeFull to setChange
src/paragraph_pimpl.h:
remove lookupChange;
rename lookupChangeFull to lookupChange;
rename setChange to setChangeType;
rename setChangeFull to setChange
src/changes.h: remove lookup;
rename lookupFull to lookup;
rename loose_contains to containsOrPrecedes;
adjust the other files accordingly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13812 a592a061-630c-0410-9148-cb99ea01b6c8
adjust some commands according to the LyX naming conventions
(toggle-tooltip => tooltip-toggle, *-change(s) => change(s)-*)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13811 a592a061-630c-0410-9148-cb99ea01b6c8
browsebox is not build anymore and commented out in bulletsmodule
bullets are disabled in documentdialog: wasn't working before either
remove qt3support!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13809 a592a061-630c-0410-9148-cb99ea01b6c8
* SConstruct: pass -Wl, options correctly
* scons_utils.py: find boost libraries with more complex names
* qt4.py: fix a bug regarding the use of pkg_config
* src/SConscript: build a static library for src/*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13808 a592a061-630c-0410-9148-cb99ea01b6c8
Index: src/frontends/qt4/QCitationDialog.C
Index: src/frontends/qt4/QCitationDialog.h
Index: src/frontends/qt4/ui/QCitationFindUi.ui
Index: src/frontends/qt4/QPrefsDialog.C
Index: src/frontends/qt4/QPrefsDialog.h
Index: src/frontends/qt4/ui/QPrefColorsUi.ui
Index: src/frontends/qt4/ui/QPrefCopiersUi.ui
Index: src/frontends/qt4/ui/QPrefFileformatsUi.ui
Index: src/frontends/qt4/ui/QPrefConvertersUi.ui
Index: src/frontends/qt4/QParagraphDialog.C
no more qt3 drag n drop:
Index: src/frontends/qt4/QWorkArea.C
as discussed on list:
Index: src/frontends/qt4/QLyXKeySym.C
Index: src/frontends/qt4/QLyXKeySym.h
bit of repair here:
Index: src/frontends/qt4/ui/QAboutUi.ui
Index: src/frontends/qt4/QAbout.C
bit of cleaning here (no separate color column, but rather icon)
Index: src/frontends/qt4/QBranches.C
got rid of this altogether:
Index: src/frontends/qt4/qcoloritem.C
Index: src/frontends/qt4/qcoloritem.h
Index: src/frontends/qt4/Makefile.am
+ filedialog to qt4 one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13805 a592a061-630c-0410-9148-cb99ea01b6c8
* insetcaption.[Ch]
(InsetCaption::draw): draw label with surrounding-float-sensitive name
and true counter number
cursorPos, metrics, edit, editXY: add
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13797 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt3/ui/moc/Makefile.am: ditto
* src/frontends/qt3/ui/*.ui: Add extra includes to the
implementation rather than the declaration
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13789 a592a061-630c-0410-9148-cb99ea01b6c8
found.
(init): read lyxrc.dist before lyxrc.defaults; remove code to read
lyxrc (LyX 1.1.5 compatibility code).
* src/encoding.C (read):
* src/language.C (read): set debug to the INFO channel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13788 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt3/moc/Makefile.am: Add src/frontends/qt3 to includes
* src/frontends/qt3/ui/moc/Makefile.am: ditto
* src/frontends/qt3/ui/*.ui: Convert to qt3 format, no functional
change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13787 a592a061-630c-0410-9148-cb99ea01b6c8
* src/cursor.C
(LCursor::plainInsert): Move special \bigl stuff from here to
MathNestInset::interpret
(LCursor::macroModeClose): try to intepret the current macro before
it is simply inserted
* src/mathed/math_nestinset.C
(MathNestInset::doDispatch): try to intepret the argument of
LFUN_SELFINSERT also if it is longer than one character
* src/mathed/math_nestinset.[Ch]
(MathNestInset::interpret): new, moved from LCursor::plainInsert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13786 a592a061-630c-0410-9148-cb99ea01b6c8
* src/bufferlist.C: save opened file list here, do not save slave document
* src/lyxfunc.C: not here
* src/session.[nC]: change to single file addition
* src/lyx_main.C: needed change because of single file addition
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13777 a592a061-630c-0410-9148-cb99ea01b6c8
instead of lyxrc.defaults. Simplify the check for
chkconfig.ltx.
* configure.ac: do not run lib/configure.py
* lib/doc/Makefile.am: LaTeXConfig.lyx is not generated anymore.
* lib/configure.py (removeExtraFiles): remove.
* lib/Makefile.am: no files are generated in there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13763 a592a061-630c-0410-9148-cb99ea01b6c8
(infoize2): Implement to show name if the cursor is to the right
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13757 a592a061-630c-0410-9148-cb99ea01b6c8
* src/tex2lyx/text.C
(parse_arguments): Eat space in front of required arguments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13753 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt3/QPrefs.C, QPrefsDialog.C, ui/QPrefUIModule.ui: add two checkboxes
* src/lyxrc.C: turn off load_session by default (since we now can turn it on)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13741 a592a061-630c-0410-9148-cb99ea01b6c8
(LaTeX::scanLogFile): remove \0 characters inserted by MikTeX before
further processing
(LaTeX::deplog): likewise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13737 a592a061-630c-0410-9148-cb99ea01b6c8
* toc.[Ch]:
- rewritten to take advantage of new TocBackend class. The toc
cache is implemented as a static variable:
static map<Buffer const *, lyx::TocBackend> toc_backend_;
* buffer_funcs.C:
updateLabels(Buffer const & buf) now calls
"lyx::toc::updateToc(buf);"
* pariterator.h: added default constructor
ParConstIterator(): DocIterator() {}
* insetfloat.C: added pit parameter to TocItem construction
* insetwrap.C: added pit parameter to TocItem construction
* MenuBackend.C: use a const ref instead of a copy of TocList
* ControlToc.[Ch]: optimisation of the API by using const reference instead of copy.
* qt4/TocPanel.[Ch]:
- optimisation of the API by using const reference instead of
copy
- directly use of TocBackend::TocIterator instead of identification by paragraph contents.
* qt4/QToc.C:
- optimisation of the API by using const reference instead of
copy
- makes use of TocBackend::Item::uid()
* qt2/QToc.C:
- use TocItem::depth() and TocItem::str() instead of public member access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13713 a592a061-630c-0410-9148-cb99ea01b6c8
don't update the screen after saving (avoids scrolling back to
cursor)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13702 a592a061-630c-0410-9148-cb99ea01b6c8
* src/cursor.C
(LCursor::plainInsert): combine the previous math atom with the new
one to a MathBigInset if possible
* src/mathed/math_biginset.[Ch]
(MathBigInset::name): implement
(MathBigInset::isBigInsetDelim): new, test whether a given token is
a valid MathBigInset delimiter
* src/mathed/math_biginset.C
(MathBigInset::size): handle Big, Bigg and Biggg
(MathBigInset::increase): ditto
(MathBigInset::draw): fix deco drawing
(MathBigInset::write): append space if necessary
* src/mathed/math_factory.C
(createMathInset): handle l->inset == "big"
* src/mathed/math_parser.C
(Token::asInput): return a token as input, stolen from tex2lyx
(void Parser::parse1): Create a MathBigInset when needed
* src/mathed/math_support.C:
(deco_table): add lbrace and rbrace
* src/mathed/math_nestinset.C
(MathNestInset::interpret): combine the previous math atom with the
new character to a MathBigInset if possible
* src/ParagraphParameters.C
(findToken): move from here
* src/support/lstrings.[Ch]
(findToken): to here
* lib/symbols: add MathBigInset symbols
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13700 a592a061-630c-0410-9148-cb99ea01b6c8
* src/CutAndPaste.C
(resetOwnerAndChanges): rename to resetParagraph and reset the
language of ERT paragraphs, too
(copySelectionHelper): adapt to changes above
(cutSelection): ditto
(copySelection): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13699 a592a061-630c-0410-9148-cb99ea01b6c8
(BufferView::Pimpl::dispatch): prevent crash with section header
not in the main lyxtext
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13696 a592a061-630c-0410-9148-cb99ea01b6c8
* Toc.[Ch]: new function getCurrentTocItem()
* ControlToc.[Ch]: new function getCurrentTocItem()
* QToc.[Ch]: new function getCurrentIndex()
* QTocDialog.C
- QTocDialog::update() calls QToc::getCurrentIndex()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13695 a592a061-630c-0410-9148-cb99ea01b6c8
- bool ControlToc::canOutline(): new method to test if outline is possible.
* TocModel: new class
* QToc is now the controller (inheriting ControlToc directly) and the model (using TocModel)
* QTocDialog is now only the view (inheriting Dialogs::View directly)
* Dialogs.C: updated toc controller and view correspondingly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13692 a592a061-630c-0410-9148-cb99ea01b6c8
* src/BufferView_pimpl.C
(bool BufferView::Pimpl::dispatch): update bibfiles cache after adding or
deleting a bib database
* src/buffer.C
(bool Buffer::readDocument): update bibfiles cache after the document
was read
* src/buffer.[Ch]
(void Buffer::updateBibfilesCache): new method to build or update a cached
vector with all used bibtex databases.
(void Buffer::getBibfilesCache): new method that returns the actual cache.
(Buffer * Buffer::getMasterBuffer): new (non-const) method to get the buffer
of the master document
* src/insets/insetbibtex.C
(void InsetBibtex::doDispatch): update the bibfiles cache after the inset has
been modified.
* src/insets/insetinclude.C.
(void Insetinclude::doDispatch): update the bibfiles cache after the inset
has Been modified.
* src/insets/insetinclude.[Ch]:
(void Insetinclude::updateBibfilesCache): new method to build or update
a cached vector with all used bibtex databases.
(void Insetinclude::getBibfilesCache): new method that returns the actual
cache.
* src/insets/insetcite.C
(string const getNatbibLabel): store a map of timestamps for all used bibtex
files (buffer's bibfiles cache) and rebuild the list of keys only if the timestamps
or the list of files have changed. This is the actual performance boost.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13681 a592a061-630c-0410-9148-cb99ea01b6c8
indicating if ct is used in the current buffer.
(cleanChanges): pass enum ChangeTracking.
* src/paragraph_pimpl.C (cleanChanges): delete ct marks from
paste content if ct is of in the buffer. Set content INSERTED
if ct is on (bug 2207).
* src/CutAndPaste.C (pasteSelectionHelper): pass information
about the current change tracking state to cleanChanges.
* src/paragraph_pimpl.h (cleanChanges): pass enum ChangeTracking.
* src/paragraph.C (cleanChanges): pass enum ChangeTracking.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13666 a592a061-630c-0410-9148-cb99ea01b6c8
LFUN_PASTESELECTION. Simplifies the code a lot and fixes
wrong language settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13665 a592a061-630c-0410-9148-cb99ea01b6c8
* BufferView_pimpl.h: delete LyXKeySymPtr typedef
* kbmap.h: include LyXKeysym.h and remove forward declaration of LyXKeySym,
and delete LyXKeySymPtr typedef
* kbsequence.h:
* frontends/WorkArea.h: delete LyXKeySymPtr typedef, include LyXKeySym.h
and don't include boost/shared_ptr.hpp, remove forward declaration of
LyXKeySym.
* frontends/LyXKeySym.h: include boost/shared_ptr.hpp, and add typedef
for LyXKeySymPtr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13663 a592a061-630c-0410-9148-cb99ea01b6c8
(MathNestInset::doDispatch): replace recordUndo by recordUndoInset for
LFUN_DELETE, to fix undo behaviour
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13658 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/math_amsarrayinset.C
(metrics): use ArrayChanger to change the style
(draw): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13648 a592a061-630c-0410-9148-cb99ea01b6c8
In frontend/qt4/Dialog.C, we use these class like this:
} else if (name == "citation") {
QCitation * ci = new QCitation(*dialog);
dialog->setController(ci);
dialog->setView(new QCitationDialog(*dialog, ci));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
Now, it should be possible to define another view like this:
} else if (name == "citation-inline") {
QCitation * ci = new QCitation(*dialog);
dialog->setController(ci);
dialog->setView(new QCitationInline(*dialog, ci));
All the citation functionalities are not there yet but the basic ones are there. There are still a few "intelligence" still to be transfered from the view to the dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13635 a592a061-630c-0410-9148-cb99ea01b6c8
* src/text3.C, src/lyxfunc.C: no special treatment of view-source dialog now.
* src/frontends/controllers/ControlViewSource.h, .C:
handle everything (get source type, code) in the controller.
* src/insets/insetbibtex.C, insetexternal.C insetinclude.C:
add dryrun mode to file copying etc.
* src/frontends/qt2/QViewSource.C: small changes when calling the controller.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13627 a592a061-630c-0410-9148-cb99ea01b6c8
Also move reponse to middle mouse from Release to Press
* math_nestinset.C
(MathNestInset::lfunMousePress): Add and convert to editXY
(MathNestInset::lfunMouseRelease): Remove
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13617 a592a061-630c-0410-9148-cb99ea01b6c8
QMathDialog.C: set icon paths
QMathUi.ui: set icon paths to lib/images/math for visual feedback in designer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13614 a592a061-630c-0410-9148-cb99ea01b6c8
layout file in the same directory as .lyx file will be used. .cls can also
be in this directory.
* src/buffer.C, bufferparams.C: move filepath to bufferparams so this
info will be available in getToken()
* src/lyxtextclasslist.h, .C: add addTextClass() that read a .layout file
from filepath.
* src/lyxtextclass.h, .C: pass filepath to LyXTextClass::load(). .layout
file in filepath will be loaded before system ones.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13611 a592a061-630c-0410-9148-cb99ea01b6c8
* paragraph.h: make value_type point at char_type
* other files: change some bald 'char' to 'char_type'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13609 a592a061-630c-0410-9148-cb99ea01b6c8
capitalized to have first letter lowercased.
* Adjust all affected files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605 a592a061-630c-0410-9148-cb99ea01b6c8
letter start with a lower letter.
* All other .C and .h in the cs: adjust for above change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8
* text.C:
- LyXText::breakParagraph(): test if needsUpdateCounters() is enough before a full updateCounter
- LyXText::backspacePos0(): ditto
* text2.C:
- LyXText::deleteEmptyParagraphMechanism(): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13593 a592a061-630c-0410-9148-cb99ea01b6c8
QtView.C: typo in include
QPrefsDialog.C: update after changing color
QPrefsDialog.h: default parent in constructor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13580 a592a061-630c-0410-9148-cb99ea01b6c8
- replaced the sqrt etc QPushButton with QToolButton
- modified the layout
* QMathDialog::QMathDialog
- got rid of the fixed width for function QWidgetList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13571 a592a061-630c-0410-9148-cb99ea01b6c8
session support that
* handle recent opened files (previously lastfile)
* save/load bookmarks when quit lyx
* save/load buffer cursor location whan a file is closed
* save/load windows position and size when a file is closed
* add rc entries load_session, use_lastfilepos,
screen_geometry_height, screen_geometry_width,
screen_geometry_xysaved.
* trigger LFUN_QUIT when Alt-F4 or close-button is used to close lyx.
* remove lastfile.h lastfile.C (merged in session.h, session.C)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13561 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt2/QPrefs.C:
(internal_path_list, external_path_list): Handle the PATH prefix
style according to the user-prefs style.
(QPrefs::apply, QPrefs::update_contents): fix inverted logic of
rc.cygwin_path_fix
* src/support/os.h: New declarations to deal with PATH lists.
* src/support/os_cygwin.C: Major rewrite to account for path style
problems.
* src/support/os_unix.C:
* src/support/os_win32.C: Stub functions for PATH lists.
* src/support/environment.C: fix bug 2344: Wrong path_prefix handling
in cygwin
* src/support/filetools.C (ChangeExtension): fix for the path
style to be written in .tex files (cygwin related).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13558 a592a061-630c-0410-9148-cb99ea01b6c8
* QMathUi.ui: Port to Qt4, icons paths are hacked to point to ../lib/images/
* QMathDialog: Port to qt4
* iconpalette.C: fix cols calculation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13557 a592a061-630c-0410-9148-cb99ea01b6c8
layout upon paste.
* insettext.[Ch]: add forceParagraphsToDefault method
* insettabular.C
(InsetTabular::doDispatch): use it for cell
* insetbox.C
(InsetBox::doDispatch): use it
* insetert.C
(InsetERT::doDispatch): use it
* insetcharstyle.C
(InsetCharStyle::doDispatch): use it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13535 a592a061-630c-0410-9148-cb99ea01b6c8
The Toc dialog is not finished yet, there's some clean-up to do especially in select_adapdator which doesn't seem to work. This makes lyx crash when clicking on the Up, Down, In or Out buttons.
* frontends/qt4/QTocDialog.[Ch]: add automatic slots
* frontends/qt4/QTocDialog.[Ch]: add "enableButtons(bool)"
* frontends/qt4/ui/QTocUi.ui: add pushbuttons
* frontends/qt4/QToc.[Ch]: add move* methods.
The following Qt4 equivalent changes to revision r13521 are not done yet:
* frontends/qt2/QToc.[Ch]: add move* method.
(QToc::updateToc):
(QToc::select): add code for TOC window positioning, and
outlining methods
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13530 a592a061-630c-0410-9148-cb99ea01b6c8
(handleFoundFile): do not add directories to dep table (crashes cygwin)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13529 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LaTeXFeatures.[Ch]: replace nice_ by runparams_
* src/insets/insetexternal.C
(InsetExternal::validate): Use the correct template for the desired
output format
* src/insets/insetgraphics.C
(InsetGraphics::prepareFile): Record the needed files for "latex"
or "pdflatex" format, dependant on the desired output format
* src/insets/insetinclude.C
(InsetInclude::latex): ditto
* src/BufferView_pimpl.C
(BufferView::Pimpl::getStatus): adapt to LaTeXFeatures changes
* src/paragraph_pimpl.C
(Paragraph::Pimpl::simpleTeXSpecialC): ditto
* src/buffer.C
(Buffer::makeLaTeXFile): ditto
(Buffer::makeLinuxDocFile): ditto
(Buffer::makeDocBookFile): ditto
* src/paragraph.C
(Paragraph::simpleTeXOnePar): ditto
* src/exporter.C
(Backends): Add "pdflatex" backend format
(Exporter::Export): set runparams.flavor correctly for "pdflatex" format
* lib/external_templates
(RasterImage): Use "pdflatex" format in PDFLaTeX template
(XFig): ditto
(ChessDiagram): Add PDFLaTeX template
(Date): ditto
* lib/configure.py: Add "pdflatex" format
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13520 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insettabular.C
(InsetTabular::hasPasteBuffer):
(InsetTabular::doDispatch):
(InsetTabular::insertAsciiString): Construct LyXTabulars with a
BufferView
* src/tabular.[Ch]
(cellstruct): Set bv_owner of the text inset
(LyXTabular::fixCellNums):
(LyXTabular::appendRow):
(LyXTabular::deleteRow):
(LyXTabular::appendColumn):
(LyXTabular::read): Construct cellstructs with a BufferView
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13516 a592a061-630c-0410-9148-cb99ea01b6c8
Prevent deletion of file formats if they are used by a converter
and warn the user accordingly.
Fixes crash (bug 2431).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13514 a592a061-630c-0410-9148-cb99ea01b6c8
* QCitationDialog::on_applyPB_clicked(): calls form_->apply
* QCitationDialog::on_oKPB_clicked(): calls form_->apply
TBDone: extract the code from controller&co in order to update the view with a new citation inset (or a modified one).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13499 a592a061-630c-0410-9148-cb99ea01b6c8
- two panes for Selected/Available keys
- find as you search (Regular expression are supported)
- advanced search button
There are a lot of work still:
- selected citations are not inserted in the document
- find does not select the found key
- the graying/un-graying of buttons does not work properly
- the Advanced Search Dialog (which will search inside the citation) is not done yet
- ...
But the good news is that I have used the Model/View separation of Qt4. QCitation contains the list models and QCitationDialog contains the list views. The idea would be to reuse the model for a new dialog, I am thinking of a simple combo box placed on the toolbar which insert citations with default style, etc. Or a context menu insert->citation...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13496 a592a061-630c-0410-9148-cb99ea01b6c8
(bool LyXText::Delete):
move cursor to next par after deleting a paragraph break
in change tracking mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13495 a592a061-630c-0410-9148-cb99ea01b6c8
itemize too readily enter into charstyle insets.
* insetcharstyle.C
(InsetCharStyle::doDispatch): force pasted paragraphs to document
default style
* insetcharstyle.h: add forceDefaultParagraphs to true
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13494 a592a061-630c-0410-9148-cb99ea01b6c8
don't try to go to previous par when in first par
(fix crash in change tracking mode).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13492 a592a061-630c-0410-9148-cb99ea01b6c8
(void QDocumentDialog::apply):
(void QDocumentDialog::update_contents): only take action when there is a ToC structure
* port of preampleUi from Q3MultilineEdit to QTextEdit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13485 a592a061-630c-0410-9148-cb99ea01b6c8
(bruteFind): only iterate over the paragraphs that are
in the CoordCache (bug 2217)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13476 a592a061-630c-0410-9148-cb99ea01b6c8
* src/bufferparams.C
(bool BufferParams::writeLaTeX):
(void BufferParams::useClassDefaults): only take action when there is
a ToC structure
* src/frontends/qt2/QDocument.C
(void QDocument::apply):
(void QDocument::update_contents): only take action when there is
a ToC structure
* src/frontends/xforms/FormDocument.C
(bool FormDocument::language_apply):
(bool FormDocument::options_apply):
(void FormDocument::options_update): only take action when there is
a ToC structure; disable
(void FormDocument::UpdateClassParams): disable the secnumdepth and
tocdepth widgets when there is no ToC structure
* src/frontends/xforms/FormDocument.h
(options_apply): do not return a bool (was not used)
* src/lyxtextclass.C
(hasTocLevels): new method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13471 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/xforms/Color.[Ch]: move to src
* src/Color.[Ch] (getRGBColor): move to src/frontends/*/lyx_gui.C
* src/BranchList.h
(Branch::color_): change type to lyx::RGBColor
* src/BranchList.[Ch]
(Branch): new constrcutor, set color_ to LColor::background
(getColor, setColor): adapt to type change of color_
* src/bufferparams.C
(BufferParams::writeFile): adapt to type change of branch color
* src/frontends/lyx_gui.h
* src/frontends/gtk/lyx_gui.C
* src/frontends/qt2/lyx_gui.C
* src/frontends/qt4/lyx_gui.C
* src/frontends/xforms/lyx_gui.C
(getRGBColor): move from src/Color.[Ch] here
* src/frontends/gtk/lyx_gui.C
* src/frontends/xforms/lyx_gui.C
(hexname): use getRGBColor
* src/frontends/gtk/GDocument.C
(update): adapt to type change of branch color
(apply): add comment about color chooser
* src/frontends/qt2/QDocumentDialog.C
(updateBranchView): adapt to type change of branch color
(toggleBranchColor): ditto
* src/frontends/qt2/lcolorcache.[Ch]
* src/frontends/qt4/lcolorcache.[Ch]
(rgb2qcolor): new utility function
* src/frontends/qt4/QBranches.C
(QBranches::update): adapt to type change of branch color
(QBranches::on_colorPB_clicked): ditto
* src/frontends/xforms/FormDocument.C
(get_current_color): adapt to type change of branch color
(FormDocument::branch_update):
* src/frontends/xforms/FormPreferences.C
(FormPreferences::Colors::LoadBrowse): adapt to RGBColor changes
* src/frontends/xforms/FormPreferences.h: remove unneeded RGBColor
forward declaration
* src/frontends/xforms/XWorkArea.C
(XWorkArea::XWorkArea): adapt to RGBColor changes
* src/frontends/xforms/Makefile.am: remove Color.[Ch]
* src/frontends/xforms/FormColorpicker.[Ch]: adapt to RGBColor changes
* src/frontends/xforms/xformsImage.C: adapt to RGBColor changes
* src/frontends/controllers/ControlDocument.C
(ControlDocument::dispatchParams): adapt to type change of branch color
* src/Makefile.am: add Color.[Ch]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13466 a592a061-630c-0410-9148-cb99ea01b6c8
(LyXFunc::getStatus): enable LFUN_MENUWRITE for a new document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13463 a592a061-630c-0410-9148-cb99ea01b6c8