* src/LaTeXFeatures.[Ch]
(LaTeXFeatures::addExternalPreamble): rename to addPreambleSnippet,
since this is not specialized for InsetExternal at all
* src/insets/insetexternal.C
(InsetExternal::validate): reflect name change above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16784 a592a061-630c-0410-9148-cb99ea01b6c8
(previously broken; the cursor was even moved forward if
the character was physically removed and the next character was
marked as deleted)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16783 a592a061-630c-0410-9148-cb99ea01b6c8
add a line break at the end of each paragraph; add a second line break
if maximum line length is > 0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16779 a592a061-630c-0410-9148-cb99ea01b6c8
* metricsinfo.h:
- ScreenUpdateStrategy: new enum describing the screen update strategy (replace singlepar boolean).
* UpdateFlags.h:
new Update::Decoration flag.
* BufferView.C
- update(): takes Decoration flag into account (CoordCache is not cleared out). Fills in metrics_info_.update_strategy
* mathed/InsetMathNest.C: adjust the cursor flags to new strategy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16774 a592a061-630c-0410-9148-cb99ea01b6c8
* insetbase.C
- drawMarkers(): draw the decoration in any case (but visible only in editing mode). Fill-in the CoordCache in any case.
- drawMarkers2(): ditto.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16773 a592a061-630c-0410-9148-cb99ea01b6c8
* InsetBase::drawDecoration(): new method.
* all other files: implement drawDecoration().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16772 a592a061-630c-0410-9148-cb99ea01b6c8
ends in .ui, try the .inc version too (support for user ui files)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16762 a592a061-630c-0410-9148-cb99ea01b6c8
* src/LaTeX.C
(LaTeX::deplog): Assume that filenames in log files are stored in
the file system encoding
* src/frontends/qt4/qt_helpers.[Ch]
(internal_path): delete
* src/frontends/qt4/QGraphics.C: Adjust to change above
* src/frontends/qt4/QPrefsDialog.C: ditto
* src/frontends/qt4/QExternal.C: ditto
* src/frontends/qt4/QInclude.C: ditto
* src/support/os.h: Document the encoding of filename arguments
* src/support/os_win32.h: ditto
* src/support/filetools.C
(findtexfile): Convert filename from file system encoding
* src/support/os_win32.C: Convert filenames from utf8 to file system
encoding and vice versa where needed
* src/support/os_cygwin.C: ditto
* src/support/getcwd.C
(getcwd): Use internal_path() with correct encoding
* src/support/docstring.[Ch]
(from_filesystem8bit): new conversion function
* src/support/environment.C
(getEnv): convert environment variable from local 8bit encoding to utf8
(setEnv): convert environment variable from utf8 to local 8bit encoding
* src/support/environment.h: document encoding of function arguments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16753 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3114
* os.h
- new docstring adapted internal_path()
* qt_helpers.[Ch]:
- new QString adapted internal_path()
All other files: use that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16744 a592a061-630c-0410-9148-cb99ea01b6c8
* src/output_latex.C
(TeXOnePar): Postpone the output of newlines after the call of
switchEncoding(), since we may get additional whitespace otherwise.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16740 a592a061-630c-0410-9148-cb99ea01b6c8
(forceDefaultParagraphs): Fix comment: Not all text classes have a
"Standard" layout. What was meant here is the default layout of the
text class.
* src/paragraph.C
(Paragraph::simpleTeXOnePar): ditto
* src/output_latex.C
(latexParagraphs): ditto
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16738 a592a061-630c-0410-9148-cb99ea01b6c8
script inset and the new position is in the nucleus of the inset,
notifyCursorLeaves will kill the script inset itself. So we check
all the elements of the cursor to make sure that they are correct
(bug 2933).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16729 a592a061-630c-0410-9148-cb99ea01b6c8
the former is also trigged when updating dialogs. we should use toggled(bool) to en/disable widgets and in situations when we are sure that we always want to act on a toggle
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16724 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/MathExtern.C:
(captureOutput): redirect stdin from a file.
(pipeThroughMaxima, pipeThroughOctave, pipeThroughMathematica): use
"output:" instead of "out:" in the informational messages in order to
better match the "input:" message from captureOutput.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16709 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea::sheduleRedraw(): new pure virtual method.
* GuiWorkArea::showCursor(): handle the scheduled redraw.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16708 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=3058
Bug fixed by setting the UpdateFlags correctly in LFUN_LYXRC_APPLY and LFUN_SCREEN_FONT_UPDATE.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16693 a592a061-630c-0410-9148-cb99ea01b6c8
- getMessages(), getGuiMessages(): new global function definitions
* lyx_main.C: implementation of getMessages() and getGuiMessages().
* LyX class:
- getMessages(), getGuiMessages(), setGuiLanguage(): new interface for Messages access.
* LyX::Singletons class:
- messages_: new container for Messages objects.
* Buffer::Impl::messages is now a pointer to the singleton defined in lyx_main.C.
* gettext.C: _() uses the global getGuiMessages() instead of the local static Messages object.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16673 a592a061-630c-0410-9148-cb99ea01b6c8
- I changed (again) the get() interface to return full copy instead of const reference because the no ENABLE_NLS case was not working.
- I put the C++ example implementation at the end of messages.C.
- I did some header cleanup in messages.C.
This will be the last change to the Messages class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16672 a592a061-630c-0410-9148-cb99ea01b6c8
LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).
* src/insets/insettabular.C
(InsetTabular::doDispatch): adjust to clipboard interface change
(InsetTabular::copySelection): ditto
* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): ditto
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): ditto
* src/buffer.[Ch]
(Buffer::readString): New method: Read document from a string
(Buffer::readFile): Change return value from bool to enum (needed
for readString). Return wrongversion if we are reading from a string
and the version does not match.
(Buffer::do_writeFile): make public and rename to write
* src/CutAndPaste.C
(putClipboard): New helper, put stuff to the system clipboard
(void copySelectionHelper): Use putClipboard instead of
theClipboard().put()
(void copySelection): ditto
(void pasteClipboard): new method for pasting in text
(void pasteParagraphList):
* src/frontends/Clipboard.h
(Clipboard::get): Rename to getAsText
(Clipboard::getAsLyX): New method for getting the system clipboard
in LyX format
(Clipboard::hasLyXContents): New method telling whether there is LyX
contents in the clipboard
* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods
* src/text3.C
(LyXText::dispatch): Use pasteClipboard for pasting the system
clipboard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
- replace static string with private member
- test the success of the cache insertion
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16668 a592a061-630c-0410-9148-cb99ea01b6c8
\inputencoding default
* src/paragraph_pimpl.C
(isEncoding): Explain why bparams.inputenc == "default" is ignored
* src/bufferparams.C
(BufferParams::encoding): Determine the encoding from the language
for inputenc == "default"
* src/buffer.h
(writeLaTeXSource): Mention inputenc == "default" in documentation
* src/bufferparams.h
(inputenc): Update documentation of "default"
* src/output_latex.C
(switchEncoding): Switch the encoding also for inputenc == "default",
but don't output \inputencoding commands in that case
* lib/lyx2lyx/LyX.py
(get_encoding): Determine the encoding from the language for
inputencoding == "default"
* lib/lyx2lyx/lyx_1_5.py
(convert_multiencoding): ditto
* development/FORMAT: Update documentation of \inputencoding default
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16667 a592a061-630c-0410-9148-cb99ea01b6c8
InsetBase const * const nextinset = = nextInset();
is not possible because InsetBase::asInsetMath() is not const.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16660 a592a061-630c-0410-9148-cb99ea01b6c8
a bug on Windows due to an unnecessary conversion to external style.
* src/insets/ExternalSupport.C
(subst_path): avoid a bug in the external material inset on Windows
by don't using external_path. The filename will be quoted and thus
there will be no problems with forward slashes.
* src/frontends/qt4/QGraphics.C
* src/frontends/qt4/QExternal.C
* src/frontends/qt4/QInclude.C:
(Qxxx::apply): On Windows, the user could input an absolute path in
native style by hand (without using the file dialog), so make sure
that no backslashes can slip in by this way.
* src/frontends/qt4/QPrefsDialog.C
(internal_path_list, external_path_list): new wrappers for the
corresponding functions in the os namespace.
(PrefPaths::apply): make sure that path_prefix is stored in the
internal style, i.e., without backslashes.
(PrefPaths::update): make sure that path_prefix is displayed to
the user in the native style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16659 a592a061-630c-0410-9148-cb99ea01b6c8
Move OS dependent code where it belongs.
* src/lyx_cb.C:
Remove unused include
* src/support/os.h
* src/support/os_unix.C
* src/support/os_win32.C
* src/support/os_cygwin.C:
Move here the code from fontutils.[Ch]
* src/support/os_cygwin.C
(external_path, external_path_list): don't differentiate anymore
on Qt/X11 or Qt/Win builds.
* src/support/environment.C
(setEnvPath): get rid of the #ifdef for cygwin.
* src/lyx_main.C
(LyX::exec): addFontResources and restoreFontResources are now
in the os namespace.
* src/support/Makefile.am
* src/client/Makefile.am
* src/tex2lyx/Makefile.am
* development/scons/scons_manifest.py:
Updated
* src/support/fontutils.[Ch]:
Removed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16655 a592a061-630c-0410-9148-cb99ea01b6c8
* src/session.h/C: save pit instead of id
* src/lyxfunc.h/C: gotoBookmark function
* src/BufferView.h/C: proper update of bookmarks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16647 a592a061-630c-0410-9148-cb99ea01b6c8
encodings) more fine grained: From paragraph level to individual character
level. The inputenc package supports that since at least 2000.
* src/insets/insetbase.h
(latex): Document the differences between output to a string stream
and a file stream
* src/buffer.h
(writeLaTeXSource): ditto
* src/output_latex.h
(latexParagraphs): ditto
(switchEncoding): new function to change the encoding of a stream
(and output \inputencoding commands)
* src/paragraph_pimpl.C
(Paragraph::Pimpl::simpleTeXSpecialC): Adjust to latexWriteEndChanges
changes
* src/support/docstream.[Ch]
(setEncoding, operator<<): New stream modifier that changes the
encoding of file streams
* src/lyxfont.[Ch]
(LyXFont::latexWriteStartChanges): Change stream encoding if needed
(LyXFont::latexWriteEndChanges): Change stream encoding if needed
* src/lyxfont.h
(public:):
* src/paragraph.C
(Paragraph::simpleTeXOnePar): Adjust to latexWriteStartChanges and latexWriteEndChanges changes
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
* src/output_latex.C
(TeXOnePar): Remove the ugly hack to for wencoding changes and use
switchEncoding instead. A nice side effect is that the old hack would
not work if the main language encoding is latin1 and a character
would be mapped to a cedilla in the "fake ucs4" encoding, because
iconv refuses to convert such a character to latin1, although it
exists in latin1 (it wants to attach it to a base character).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16633 a592a061-630c-0410-9148-cb99ea01b6c8
we don't set the selection with qApp->clipboard()->put().
Therefore we get the status of the internal selection from the cursor, and
the empty flag for fake selections is not needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16610 a592a061-630c-0410-9148-cb99ea01b6c8
- do not focus filename widget for already existing insets (bug 1663).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16604 a592a061-630c-0410-9148-cb99ea01b6c8
the role kLSRolesAll for both edito and viewer, since it is what
the finder does.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16602 a592a061-630c-0410-9148-cb99ea01b6c8
* InsetFloat::addToToc(): avoid a string copy, a map lookup and a TocItem construction. Don't complete the loop if item found.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16600 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXKeySym.h: replace global operator==() with pure virtual method.
* QLyXKeySym: new operator==() method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16598 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QCitationDialog.[Ch]:
- implement KeyPressEvent, catch ESC key and clear params there as well
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16594 a592a061-630c-0410-9148-cb99ea01b6c8
* src/graphics/GraphicsConverter.C
(build_script): convert the input filename from utf8 to the default
locale encoding as it hopefully corresponds to the filesystem encoding.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16592 a592a061-630c-0410-9148-cb99ea01b6c8
* src/changes.h: some speed optimizations as the result of profiling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16584 a592a061-630c-0410-9148-cb99ea01b6c8
we got a consensus on this on the list.
Some calls of haveSelection are still missing, but we need to decide the
"persistent selection" question before those can be implemented properly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16572 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/QDocumentDialog.C:
* src/frontends/qt4/QPrefsDialog.C:
- include some information on the resizing bug,
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16565 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/MathExtern.C
(pipeThroughOctave): take into account that the output from octave
may contain ansi control sequences.
* src/mathed/InsetMathRoot.[Ch]
(InsetMathRoot::mathematica): new virtual method to output n-th
roots in mathematica syntax.
* src/mathed/InsetMathRoot.C
(InsetMathRoot::octave): octave has not a root() command.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16559 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyxtext.h
* src/text3.C
(pasteString): Change argument to bool
* src/text3.C
(LyXText::dispatch): (LFUN_PASTE): Paste plain text as paragraphs,
not as lines
(LyXText::dispatch): Adjust to pasteString change
* lib/bind/cua.bind:
* lib/bind/sciword.bind:
* lib/bind/mac.bind: Move shortcuts from "clipboard-paste paragraph"
and "primary-selection-paste paragraph" to "primary-selection-paste"
and "clipboard-paste", since the "paragaph" versions are used in
LFUN_PASTE and middle-mouse-button paste. Now "primary-selection-paste"
has the same shortcut it always had, and "clipboard-paste" has the
shortcut that was originally assigned to
"primary-selection-paste paragraph".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16553 a592a061-630c-0410-9148-cb99ea01b6c8
../../../src/mathed/../ParagraphMetrics.h:76: error: extra qualification 'lyx::ParagraphMetrics::' on member 'calculateRowSignature'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16546 a592a061-630c-0410-9148-cb99ea01b6c8
the status quo fixes, I'll send a proposal how to proceed soon.
* src/CutAndPaste.[Ch]
(copySelection): Split into copySelection and copySelectionToStack
* src/text3.C
(LyXText::dispatch): Use copySelectionToStack instead of LFUN_COPY
to copy the selection to the cut buffer for two reasons:
- LFUN_COPY did not work (probably because bv.cursor() was not yet set)
- If it would work it would put the selection to the system clipboard
which is clearly wrong.
Document why we put the selection to the stack.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16534 a592a061-630c-0410-9148-cb99ea01b6c8
after selecting something with the mouse
* src/insets/insettabular.C
(InsetTabular::doDispatch): Set the X selection if there is a
selection after release of the left mouse button
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): Set the X selection after double and
triple click of the left mouse button
(InsetMathNest::lfunMouseRelease): Set the X selection if there is a
selection after release of the left mouse button
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16530 a592a061-630c-0410-9148-cb99ea01b6c8
(GuiSelection::haveSelection): Add a big comment what we actually do
here, and why. It took me quite some time to figure that out.
* src/frontends/Selection.h
(haveSelection): Add more detailed documentation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16527 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiApplication.C
(GuiApplication::x11EventFilter): Only send or clear the selection
if the X event specified the primary selection. Previously this was
also done if the event specified the clipboard. We must ignore that,
because the clipboard is completele handled by qt.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16526 a592a061-630c-0410-9148-cb99ea01b6c8
(BufferView::clearSelection): Trigger a redraw so that the cleared
selection becomes visible
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16524 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/LyXKeySym.h:
* src/frontends/qt4/QLyXKeySym.h:
* src/frontends/qt4/QLyXKeySym.C (print): add a forgui boolean that
tells whether the string should used localized names and special
characters.
* src/MenuBackend.C (binding):
* src/kbmap.C (print):
* src/kbsequence.C (print, printOptions): add forgui parameter.
* src/frontends/qt4/QLPopupMenu.C (addBinding): use a non-localaized
binding for Qt/Mac (because it needs to be parsed back) and a
localized one for the others (so that it looks good).
* src/kbmap.C (defkey,printbindings):
* src/lyxfunc.C (processKeySym,dispatch,viewStatusMessage): adapt to
above changes.
* src/kbmap.C (printKey): remove.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16510 a592a061-630c-0410-9148-cb99ea01b6c8
(GuiApplication::x11EventFilter): Small optimization: Do not request
the current BufferView if it is not used
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16506 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea::resizeBufferView(): delete redraw() call.
* GuiWorkArea:
- need_resize_: new private member.
- expose(): move pixmap painting code to new private updateScreen() method.
- paintEvent(): resize the backing pixmap if need be.
- resizeEvent(): move the resizing code to paintEvent().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16499 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insettabular.C
(InsetTabular::doDispatch): Only paste the tabular clipboard if the
system clipboard is not newer, else let the current cell paste the
system clipboard
(InsetTabular::getStatus): Only decide whether to enable LFUN_PASTE
if the tabular clipboard is not empty and the system clipboard is
not newer, else let the current cell decide.
* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): Use the system clipboard for LFUN_PASTE
if it is newer.
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): Use the system clipboard for LFUN_PASTE
if it is newer.
* src/text3.C
(doInsertInset): Add a "0" argument to LFUN_PASTE, because we always
want to use the internal clipboard here
(LyXText::dispatch): ditto (when handling mouse button 2 press)
(LyXText::dispatch): Use the system clipboard for LFUN_PASTE if it
is newer.
(LyXText::getStatus): Also enable LFUN_PASTE if the system clipboard
is owned by another application
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16498 a592a061-630c-0410-9148-cb99ea01b6c8
holding the Qt translations is not deleted. Now keyboard shortcuts and
Qt stock dialogs are properly translated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16496 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetTabular::getStatus): Correctly enable LFUN_PASTE when the
special tabular clipboard is empty by removing an errornous
fall-through to LFUN_INSET_MODIFY
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16495 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetTabular::doDispatch): Don't reset the table paste buffer
when pasting from the external clipboard or selection, since no
paste operation should ever change any clipboard.
At the same time make the code more readable by removing the
fall-through.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16492 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetMathNest::lfunMouseRelease): Remove commented call of
theSelection->put(), since that should never be called from the kernel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16491 a592a061-630c-0410-9148-cb99ea01b6c8
(cutSelection): Fill the system clipboard if this is a real cut (only
if the cursor is in texted, the mathed case is done elsewhere).
(cutSelection): Remove obsolete comment. Since the separation of
selection and clipboard the selection is only filled as response
to an explicit request by the X server, so there is no slowdown.
The clipboard is only filled on explicit user request, so that does
not result in slowdown either.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16490 a592a061-630c-0410-9148-cb99ea01b6c8
menu name.
* src/frontends/qt4/QLMenubar.C (macxMenuBarInit): hardcode the
special menu instead of reading it from ui files. Use labels that will
trigger Qt menu merging functionality onthe mac. This fixes menu
merging on LyX/Mac (but the menu names are still in english for now).
* lib/ui/stdmenus.ui: delete special menu definition "LyX".
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16479 a592a061-630c-0410-9148-cb99ea01b6c8
* Clipboard.h: new isInternal() pure virtual method
* Selection.h: new isInternal() pure virtual method
* GuiClipboard, GuiSelection: implement new method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16476 a592a061-630c-0410-9148-cb99ea01b6c8
like 3043
* src/support/docstream.C
(iconv_codecvt_facet::do_out): Output the to be converted string and
the partially converted result in hex notation if an error occurs
(iconv_codecvt_facet::do_in): ditto
(iconv_codecvt_facet::do_iconv): remove now obsolete error message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16469 a592a061-630c-0410-9148-cb99ea01b6c8
(IconvProcessor::convert): Fix hex output of bytes on systems where
char is signed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16468 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/InsetMathNest.C :
unreachable code
* src/aspell_local.h :
aspell is a Clibrary, no class keyword available
* src/texrow.h :
could not generate standard constructor
* development/cmake/CMakeLists.txt :
- disable same warnings
- all size_t/int related warnings are disabled
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16446 a592a061-630c-0410-9148-cb99ea01b6c8
* BufferView:
- checkDepm(): new method for DEPM mechanism.
- mouseSetCursor(): use checkDepm().
* text2.C:
- use BufferView::checkDepm() instead of using LyXText::deleteEmptyParagraphMechanism() directly.
- deleteEmptyParagraphMechanism(): prepare for conversion to DocIterator (code transferred to BufferView::checkDepm()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16442 a592a061-630c-0410-9148-cb99ea01b6c8
notifyCursorLeaves may have killed the inset and put its contents
at lower level (bug 2908)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16430 a592a061-630c-0410-9148-cb99ea01b6c8
false by default.
(metrics): do not set to openinlined if
hasFixedWidth is true.
* insetbox.C (hasFixedWidth): returns true if the box has a fixed
width.
(metrics): use hasFixedWidth.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16426 a592a061-630c-0410-9148-cb99ea01b6c8
encodings in the preferences dialog
* src/LaTeXFeatures.C: special treatment for tis620-0 encoding
* src/bufferparams.C: ditto
* src/output_latex.C: ditto
* src/encoding.[Ch]: Add the possibility to iterate over all encodings
* src/paragraph_pimpl.C: Add latin10 and cp858 to Euro treatment
* src/buffer.C: Update format number
* src/frontends/qt4/QDocumentDialog.C: Don't hardcode available
encodings
* lib/lyx2lyx/LyX.py,
lib/lyx2lyx/lyx_1_5.py: implement conversion from 256 to 255
* lib/encodings: Add some encodings, fix all "unknown" entries
* development/FORMAT: Document file format change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16418 a592a061-630c-0410-9148-cb99ea01b6c8
(iconv_convert): Fix a crash: Don't try to create a vector from two
pointers where end is before begin.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16408 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insetcollapsable.C: test if inset is open before editing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16406 a592a061-630c-0410-9148-cb99ea01b6c8
instead of std::string
* src/support/lyxlib.h
* src/support/getcwd.C
(getcwd): return a FileName, not a std::string in filesystem encoding
* src/support/filetools.[Ch]
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* src/support/lyxlib.h
* src/support/tempName.C
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* many other files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16399 a592a061-630c-0410-9148-cb99ea01b6c8
(LColor::getFromGUIName): delete, since it is unused, broken and
not easy to implement correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16378 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/controllers/ControlBibtex.C
(ControlBibtex::getStylefile): get the correct parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16374 a592a061-630c-0410-9148-cb99ea01b6c8
* focusInEvent(): start the blinking cursor after the resize.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16366 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/filetools.h
(fileSearch): change return value type to vector<FileName>
* src/support/filetools.C
(dirList): Convert filenames from the file system encoding
* src/converter.C
(Converters::move): Adjust to dirList interface change
* src/support/filename.[Ch]
(FileName::fromFilesystemEncoding): New static method
* src/client/client.C: Add comments about filename encoding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16362 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/filetools.[Ch]
(fileOpenSearch): comment out since it is unused
(fileSearch): Use addExtension instead of changeExtension, since we
are always called without extesnion, or with the correct one.
(addExtension): new function
* src/lyx_main.C
(LyX::init): tell fileSearch that we are also interested in the name
if the file does not exist
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16361 a592a061-630c-0410-9148-cb99ea01b6c8
(Converters::move): Use removeExtension and reuse variable 'path'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16358 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiWorkArea.C
(GuiWorkArea::doGreyOut): don't use LyXFont::SIZE_XXXX directly as
a font size as these are enum values and not the actual sizes.
Move the version number slightly to the right to make it more
readable against the splash screen.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16353 a592a061-630c-0410-9148-cb99ea01b6c8
* WorkArea.h: processKeySym() is now public
* GuiView:
* event(): new method to intercept Tab key press.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16352 a592a061-630c-0410-9148-cb99ea01b6c8
with Qt/Mac. Still does not work in non-default locale.
* QLPopupMenu.C (specialMacXmenuHack): remove, not needed anymore.
* GuiView.C (init): remove Mac hack, not needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16349 a592a061-630c-0410-9148-cb99ea01b6c8
The use of top-level lyx::dispatch() ensure that the CoordCache is OK at each step.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16348 a592a061-630c-0410-9148-cb99ea01b6c8
- ParagraphMetrics: new class gathering everything related to metrics.
- Paragraph: now derives from ParagraphMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16335 a592a061-630c-0410-9148-cb99ea01b6c8
* src/mathed/InsetMathGrid.C: Don't declare mathed_parse_normal,
include MathParser.h instead
(InsetMathGrid::doDispatch): remove to_utf8, mathed_parse_normal
takes now a docstring
* src/mathed/MathMacroTemplate.C
(MathMacroTemplate::read): restore the version of 1.4.x, since
the new one did only work for macros without whitespace
* src/mathed/MathParser.[Ch]
(Parser): Add constructor from a docstring
(mathed_parse_cell): Create the parser directly from the string,
since the istream variant of tokenize() does only work if reading
from the .lyx file
(mathed_parse_normal): ditto
(mathed_parse_normal): Delete the istream variant (unused)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16334 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyxfunc.C
(LyXFunc::dispatch): Use default include type if no type is given
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16324 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/package.h
(Package::system_temp_dir): new, return the system temp dir.
* src/support/package.C.in
(Package::Package): record the system temp dir.
* src/lyx_main.C
(LyX::prepareExit): don't remove the temporary directory if it
is the same as the system temp dir, meaning that the lyx_tmpdir
has not yet been created.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16318 a592a061-630c-0410-9148-cb99ea01b6c8
ControlMath.C: cleanup order of symbols in math panel
iconpalette.C: 6 cols since many symbols come in pairs
Rrightarrow.xpm: was missing
searrow.xpm: was north east
swarrow.xpm: was north west
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16316 a592a061-630c-0410-9148-cb99ea01b6c8
new doc
type: foo bar
put cursor after foo: foo| bar
enter space: foo | bar
click somewhere else -> CRASH
The problem is that the paragraph breaking needs to be redone after the empty space is deleted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16295 a592a061-630c-0410-9148-cb99ea01b6c8
with the correct Qt4 signal QComboBox::editTextChanged.
* src/frontends/qt4/QSearchDialog.C
(QSearchDialog::QSearchDialog): use QComboBox::editTextChanged instead
of QComboBox::textChanged.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16270 a592a061-630c-0410-9148-cb99ea01b6c8
in the right place.
* src/lyx_main.C
(LyX::exec): create the lyxsocket in the temporary directory.
(LyX::prepareExit): remove the temporary directory only if it
has been created.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16262 a592a061-630c-0410-9148-cb99ea01b6c8
from/to the local 8bit encoding with it.
Only the autotools build system is updated, scons and cmake users need to
add qt4 cpp flags when compiling libsupport, and link libsupport against
libQtCore.
* src/frontends/qt4/qt_helpers.[Ch]
(toqstr, qchar_to_ucs4, ucs4_to_qchar, ucs4_to_qstring,
qstring_to_ucs4, fromqstr): Move these qstring conversion functions
from here ...
* src/support/qstring_helpers.[Ch] ... to these new files
* src/support/docstring.[Ch]
(from_local8bit): new conversion function from local 8bit encoding
to ucs4
(to_local8bit): new conversion function from ucs4 to local 8bit
encoding to ucs4
(to_local8bit_failure): exception that is thrown by to_local8bit if
the argument cannot be converted to the local encoding
* src/support/filename.C
(FileName::toFilesystemEncoding): implement with the help of QFile
* src/support/Makefile.am: Add new files, qt4 cpp flags and link
against libQtCore
* src/client/client.C: Convert commandline input from local encoding
to ucs4. Convert stuff that is sent to to the server to utf8,
because LyX interprets it as utf8 on the other end of the pipe.
* src/lyx_main.C
(LyX::exec): convert commandline input from local encoding to utf8
(LyX::init): ditto
(LyX::easyParse): ditto
* development/scons/scons_manifest.py: Add new files
* config/qt4.m4: Define new variables QT4_CORE_INCLUDES,
QT4_CORE_LDFLAGS and QT4_CORE_LIB
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16257 a592a061-630c-0410-9148-cb99ea01b6c8
* src/lyxfunc.C
(LyXFunc::dispatch): Move to GuiView::closeEvent the session code
for lastpos in LFUN_LYX_QUIT. Check for unsaved changes before
initiating the quit procedure in LFUN_LYX_QUIT and LFUN_WINDOW_CLOSE.
* src/frontends/qt4/GuiView.h
(class GuiView): New boolean member quitting_by_menu_.
* src/frontends/qt4/GuiView.C
(GuiView::GuiView): Initialize quitting_by_menu_.
(GuiView::close): Set to true quitting_by_menu_ before calling
the quit procedure and reset it afterwards.
(GuiView::closeEvent): Account for the close window button.
Save last positions to the session file. Remove wrongly placed
call to quitWriteAll.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16248 a592a061-630c-0410-9148-cb99ea01b6c8
change default for latin1-languages to latin9 (bug 845)
* src/paragraph_pimpl.C:
add support for the subset of symbols that is only covered by
latin1 (not latin9) to make the above switch painless.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16239 a592a061-630c-0410-9148-cb99ea01b6c8
to the documentation of pspell 0.12.2 (the latest version before it became
aspell). Since pspell.C did not even compile from Denmark till yesterday and
nobody noticed I am not willing to spend more time with this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16234 a592a061-630c-0410-9148-cb99ea01b6c8
* src/buffer.C
(Buffer::makeLaTeXFile): move code from here ...
* src/bufferparams.[Ch]
(BufferParams::encoding): .. to this new method
* src/ispell.C
(to_iconv_encoding): new, convert from ucs4 to the encoding used by
ispell
(from_iconv_encoding): new, convert from the encoding used by ispell
to ucs4
(ISpell::ISpell): store buffer encoding
(ISpell::nextMiss): use from_iconv_encoding instead of from_utf8
(ISpell::check): use to_iconv_encoding instead of to_utf8
(ISpell::insert): ditto
(ISpell::accept): ditto
* src/ispell.h
(encoding): new member, store the buffer encoding
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16230 a592a061-630c-0410-9148-cb99ea01b6c8
src/frontends/qt4/QDelimiterDialog.C: cosmetics: change text "Variable size" to just "Variable", because "size" is already given by the label
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16227 a592a061-630c-0410-9148-cb99ea01b6c8
Fix a conversion char -> char_type without encoding conversion in
cap::replaceSelectionWithString().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16212 a592a061-630c-0410-9148-cb99ea01b6c8
(LyX::init): Remove obsolete test for arguments starting with '-'.
The frontend did already parse these arguments before LyX::init is
called, and therefore any remaining ones are reported as error
earlier in LyX::init, so the removed code does never trigger.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16206 a592a061-630c-0410-9148-cb99ea01b6c8
- update(): return bool only, and cleanup of the DOX comments.
- workAreaDispatch(): return bool only, cleanup of the DOX comments, change update() call to updateMetrics() and add some FIXMEs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16197 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/GuiFontLoader.C
(QLFontInfo): use font.family() instead of font.rawName()
as the latter always returns "Multi" on *nix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16195 a592a061-630c-0410-9148-cb99ea01b6c8
* lib/chkconfig.ltx:
check for the textcomp package
* lib/doc/LaTeXConfig.lyx.in:
document textcomp
* src/LaTeXFeatures.C (simplefeatures):
add textcomp
* src/paragraph_pimpl.C (simpleTeXSpecialChar):
support the Euro sign (via textcomp command)
* src/paragraph_pimpl.C (validate):
require textcomp if we have a Euro symbol
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16193 a592a061-630c-0410-9148-cb99ea01b6c8
font is available. This is now possible because the old bug needing a
workaround has been solved in Qt4. This also solves the problem of missing
integral symbols in mathed on Windows when the esint10 font is not available.
* src/frontends/qt4/GuiFontLoader.C
(isSymbolFamily): directly check the family name in QFontInfo.
(getSymbolFont): add some debugging info.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16191 a592a061-630c-0410-9148-cb99ea01b6c8
needsUpdate() in src/lyx_main.C).
toFilesystemEncoding() is now used in all places where it is needed if I did
not forget anything.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16184 a592a061-630c-0410-9148-cb99ea01b6c8
mouse_hover_ is copied with copied collapsable insets. Should be false for
newly copied insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16182 a592a061-630c-0410-9148-cb99ea01b6c8
* src/frontends/qt4/qt_helpers.[Ch]
(toqstr): Use QString::fromUcs4 if the qt version is at
least 4.2.
(qstring_to_ucs4): Use QString::toUcs4 if the qt version is at
least 4.2
(ucs4_to_qstring): Delete to avoid confusion, since it was only
used in one place
* src/frontends/qt4/panelstack.C
(PanelStack::addCategory): Use toqstr instead of ucs4_to_qstring
* src/support/unicode.[Ch]
(ucs2_to_ucs4): Replace with utf16_to_ucs4
(ucs4_to_ucs2): Replace with ucs4_to_utf16
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16169 a592a061-630c-0410-9148-cb99ea01b6c8
created by the default constrcutor anyway.
This prevents an assert in findtexfiles.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16168 a592a061-630c-0410-9148-cb99ea01b6c8
* other files: use FontMetrics::dimension() method instead of old Dimension interface.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16167 a592a061-630c-0410-9148-cb99ea01b6c8
* introduce defaultDimension() and dimension() in preparation of Dimension class cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16165 a592a061-630c-0410-9148-cb99ea01b6c8
- writeout \begin and \end alignment tags on their own lines (bug 3010).
(patch from Gregor Gorjanc and me).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16164 a592a061-630c-0410-9148-cb99ea01b6c8
- ucs4_to_qchar(): add a FIXME and an assertion
* GuiFontMetrics: replace the table based cache with two QHash based cache. With this change, the speed overhead is not negligible (exact same score with the UserGuide test) and the required additional memory is minimal (maybe one or two megabytes).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16132 a592a061-630c-0410-9148-cb99ea01b6c8