In Qt4.5, QFileInfo::operator==() compares the file locations instead of the files themselves. Therefore, an extra check is needed.
see Qt4.5 documentation:
http://doc.trolltech.com/4.5/qfileinfo.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28748 a592a061-630c-0410-9148-cb99ea01b6c8
Japanese char between math insets becomes wrong in TeX output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28732 a592a061-630c-0410-9148-cb99ea01b6c8
Cyrillic formatted text in mathmode
If some other letters from some script need to be typeset in italic,
it will suffice adding the flag "mathalpha" to the unicodesymbols file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28731 a592a061-630c-0410-9148-cb99ea01b6c8
* Buffer.{cpp, h}:
- new method getChildren() that returns included (and sub-included) files
* GuiView.cpp (closeEvent):
- do not just close dirty child documents.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28712 a592a061-630c-0410-9148-cb99ea01b6c8
- correctly set buffer on paste. This fixes a crash on pasting branches
within child documents (bug 5813)
(patch by rgheck)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28711 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=5819.
If no call to setCurrentIndex is made, we should make sure ourselves that the currentWorkArea switches to the clicked TabWorkArea.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28641 a592a061-630c-0410-9148-cb99ea01b6c8
[visual cursor] Crash when cutting a figure caption and moving the cursor.
Avoid negative positions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28629 a592a061-630c-0410-9148-cb99ea01b6c8
[visual cursor] Crash when moving left in table in an RTL document
Avoid negative positions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28626 a592a061-630c-0410-9148-cb99ea01b6c8
Branch names with spaces impossible
Read the whole line to catch the whole branch name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28620 a592a061-630c-0410-9148-cb99ea01b6c8
Synchronizing insets asserts with two views open
This finishes the change of http://www.lyx.org/trac/changeset/28587.
Replace the setButtonLabels functions that need a BufferView by buttonLabel functions. These functions modify the label at drawing time.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28610 a592a061-630c-0410-9148-cb99ea01b6c8
This was due to a thinko in http://www.lyx.org/trac/changeset/26002
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28605 a592a061-630c-0410-9148-cb99ea01b6c8
Crash with completion in mathed.
When deleting an inset, the stored DocIterator might contain a reference to a non-existent Inset and Text. Therefore, if we detect that the depth has changed, we are (for sure) not in the same paragraph, but we should make sure not to ask for the innerParagraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28596 a592a061-630c-0410-9148-cb99ea01b6c8
Copy content vanishes on Quit.
The work-around to clear the clipboard was needed to work around bug 4846. This bug has been resolved by the fix for bug 5472, so the work-around isn't needed anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28589 a592a061-630c-0410-9148-cb99ea01b6c8
GetStatus of an InsetCollapsable asserts for unhandled commands.
When you add a command to the context menu of an InsetCollapsable of which the getStatus method does not handle this command, an assertion will be raised. This happens when getStatus doesn't handle a command it is forwarded to text::getStatus which asserts because cur.text() is the text the inset is in, while this is the text of the inset. So, we only dispatch to text_ if the cursor is inside the text_. This is not the case for e.g. context menus.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28588 a592a061-630c-0410-9148-cb99ea01b6c8
- fix SCons after r28575
- set EOL to native
@ Richard: For new files please always set the EOL flag to native. If possible it would be nice if you can also update SCons manifest file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28576 a592a061-630c-0410-9148-cb99ea01b6c8
Synchronizing insets asserts with two views open
It changes the autoOpen_ member of InsetCollapsable into a map, such that an autoOpen value can be specified for each bufferView. Now, the assertion is avoided and insetCollapsable can be open in one bufferview and be closed in the other in very special cases that the cursor end up in a closed inset.
Compare with the MathMacro::editing_ member.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28573 a592a061-630c-0410-9148-cb99ea01b6c8
- fix thinko that caused tex2lyx to silently drop custom preamble entries in non-LyX-generated tex files.
(bug 5788). Patch from Jean-Marc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28567 a592a061-630c-0410-9148-cb99ea01b6c8
It was still possible to set the label of an included Program Listing to an already existing label (if there was no label specified yet).
See also:
http://www.lyx.org/trac/changeset/28556
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28564 a592a061-630c-0410-9148-cb99ea01b6c8
The problem was that, if the master is not opened, no respective guiDelegate exists, and the functions that update the toc do not trigger. The fix is to update the child's toc backend and toc items directly in such cases.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28551 a592a061-630c-0410-9148-cb99ea01b6c8
Reference dialog update crash for read-only documents.
Comments:
* -1 is a valid return of bufferCO->currentIndex() so we need to test for it.
* set the correct enabling of the button in case no call to updateContents follows.
* remove unneeded call to setFocusProxy. The widget is either disabled or the focus proxy is set in updateRefs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28547 a592a061-630c-0410-9148-cb99ea01b6c8
Don't go into an endless loop if layout2layout cannot produce the desired file format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28529 a592a061-630c-0410-9148-cb99ea01b6c8
- avoid wrong console message while loading a child from a master
that lead me on the wrong track when debugging bug 5699.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28491 a592a061-630c-0410-9148-cb99ea01b6c8
available to tex2lyx. The point is to move the crucial routines that
deal with modules out of BufferParams.cpp, which tex2lyx does not have,
and into TextClass.cpp, which it does.
This is all cleanup that makes a lot of sense independently.
Note that LayoutModuleList will shortly become a real class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28456 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=5666
Check whether an inset is in the coordcache before reading this cache (doh!)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28439 a592a061-630c-0410-9148-cb99ea01b6c8
- improve performance with Outliner open with Qt >= 4.3 by using native methods instead of home-brewn code.
This should especially pay off on the Mac, if the Outliner shows as a drawer (bug 4443).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28432 a592a061-630c-0410-9148-cb99ea01b6c8
Crash when setting caption on a row with a multicolumn.
If there is already a multicolumn on the row, the number of cells is different from column_info.size().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28427 a592a061-630c-0410-9148-cb99ea01b6c8
Add button in Citation dialog grayed out when key matches the start of an already selected key.
One parameter of match() was forgotten, so the MatchFlags were basically ignored, i.e. the standard flags were used always.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28425 a592a061-630c-0410-9148-cb99ea01b6c8
Hard to distinguish between added and deleted text.
* Changes.cpp/h: add a merge_color for deletions and change the return type to Color.
* ColorCode.h/Color.cpp: add a new customizable color that indicates the merge color for deletion.
See:
http://thread.gmane.org/gmane.editors.lyx.devel/114189
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28423 a592a061-630c-0410-9148-cb99ea01b6c8
* rowpainter.cpp: now the color for painting selected text and changed text is set via FontInfo::setColor. However, this color should remain a ColorCode as this color is used in e.g. the GuiCharacter dialog and for LateX output. Therefore I use now the FontInfo::setPaintColor function.
* FontInfo.cpp/h: new members paint_color_ and setPaintColor(). The function realColor is updated to return the paintColor when it is set.
See:
http://thread.gmane.org/gmane.editors.lyx.devel/114189
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28422 a592a061-630c-0410-9148-cb99ea01b6c8
Crash when selecting a row and doing "Delete column" in a table with multicolumns.
The check "column + 1 < column_info.size()" checks whether there is at least one column after this one. However, this check is no longer valid if we remove the column from column_info first.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28419 a592a061-630c-0410-9148-cb99ea01b6c8
Wrong width display of multicolumn cells.
When changing a custom width cell into a multicolumn, the isFixedWidth bool should be set to false. Now, the function setFixedWidth could only set isFixedWidth to true when needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28407 a592a061-630c-0410-9148-cb99ea01b6c8
* allows the selection of a whole cell with shift+key
* shift-movement between empty cells with a single keystroke
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28385 a592a061-630c-0410-9148-cb99ea01b6c8
Later, this can be replaces by a backpointer approach, as proposed at bugzilla (note that there are already similar cases such as InComment or InTableCell, so a backpointer approach would need to adapt the OutputParams methos anyway).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28382 a592a061-630c-0410-9148-cb99ea01b6c8
imperial units in only one place (instead of thousands of slightly different
copies). Functionally equivalent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28380 a592a061-630c-0410-9148-cb99ea01b6c8
- LyXAction.cpp: updates and sorting
- GuiPhantom: a dialog to set the different phantom types (stolen from GuiNote)
The Phantom feature should now be complete. Thanks to all who contributed and helped.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28364 a592a061-630c-0410-9148-cb99ea01b6c8
Implement infrastructure to add translations to layout files and translate one .inc file.
Some others are missing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28356 a592a061-630c-0410-9148-cb99ea01b6c8
If the current TextMetrics does not contain the paragraph the cursor is in, the screen is recentered. Now, the current TextMetrics should be updated to one that does contain the cursor (as we have just recentered)..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28341 a592a061-630c-0410-9148-cb99ea01b6c8
and ForcePlain tags will work not just with InsetFlex but all InsetCollapsables.
Thanks to Jurgen and JMarc for reminding me I'd meant to do this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28340 a592a061-630c-0410-9148-cb99ea01b6c8
This is overridden by any subsequent inputenc command.
The current encoding is also passed down to \input or \included files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28295 a592a061-630c-0410-9148-cb99ea01b6c8
- limit workaround for Qt bug that was fixed in Qt 4.3.4 to previous Qt versions
(related to bug 4513).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28284 a592a061-630c-0410-9148-cb99ea01b6c8
- use the first command in sequence as icon name for command-alternatives.
* lib/ui/stdtoolbars.inc:
- use command-alternatives for the alignment buttons in the tabular toolbar (bug 5709).
* lib/images/tabular-feature_align-*.png:
* lib/images/tabular-feature_valign-*.png:
- rename to tabular-feature_m-[v]align-*.png:
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28280 a592a061-630c-0410-9148-cb99ea01b6c8
* the history is stored in the session file and restored in the next LyX session,
* the lists now disappear when the mouse is released in stead of pressed,
* correct enabling/disabling of the up/down button,
* hide the lists when clicked outside the list. Now using the function event() and check for a mouseButtonPressEvent instead of using mouseReleaseEvent(). The latter is only called when the mouse button is released inside the widget, but we want to use this event to detect a mouseclick outside the list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28250 a592a061-630c-0410-9148-cb99ea01b6c8
- add possibility to count graphics group members.
* GuiGraphics.{cpp, h}:
- warning message if a deserted group is going to be dissolved
* GraphicsUI.ui:
- terminology.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28198 a592a061-630c-0410-9148-cb99ea01b6c8
that search gets messed up, and that files can take forever to load.
A better way to do this in in process.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28189 a592a061-630c-0410-9148-cb99ea01b6c8
* Two new types of menuitems are introduced: Help and Info
* Help messages make sure that the submenu they are in is enabled.
* Empty lists are now represented by a message in brackets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28188 a592a061-630c-0410-9148-cb99ea01b6c8
Introduce new LFUN_MATH_FONT_STYLE which takes one of the font styles as an argument. A dispatch is being redirected to math-insert.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28181 a592a061-630c-0410-9148-cb99ea01b6c8
- fall back to lyx_release_date, if everything else fails.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28173 a592a061-630c-0410-9148-cb99ea01b6c8
- use ISO format for LYX_DATE
* GuiAbout.cpp:
- make release date translatable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28172 a592a061-630c-0410-9148-cb99ea01b6c8
- get rid of function lengthAutoToWidgets, which was only used by GuiGraphics
- new variant of lengthToWidgets that takes a docstring
* Validator.{cpp,h}:
- the auto text in the Auto validators are customizable
* GuiGraphics.cpp:
- make the "auto" string translatable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28165 a592a061-630c-0410-9148-cb99ea01b6c8
* ExternalUi.ui:
- use LengthCombo for width unit.
- use reliable item data, instead of doing manual recounts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28164 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=4741
Create a new LFUN selection-paste (to paste the internal selection), and bind
middle mouse button to
command-alternatives selection-paste ; primary-selection-paste paragraph
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28154 a592a061-630c-0410-9148-cb99ea01b6c8
- remove the useless "none" special length from the combo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28153 a592a061-630c-0410-9148-cb99ea01b6c8
- rename [add|remove]Item(unit) to [add|remove]Unit(unit)
- remove now unnecessary reimplemantations of QComboBox functions
- new member setCurrentItem(QString)
* GuiBox.cpp:
- set ItemData for special lengths, which simplifies the logic a lot.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28152 a592a061-630c-0410-9148-cb99ea01b6c8
- use model/view infrastructure to store reliable data
- use real unit name, not i18n strings, for all comparision purposes
- remove unit "mu" in default contruction (bug 5682)
- add some helpers to add and remove units
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28146 a592a061-630c-0410-9148-cb99ea01b6c8
* InsetSpecialChar.cpp:
- make the menu separator direction-aware [only in LaTeX output] (bug 3560).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28085 a592a061-630c-0410-9148-cb99ea01b6c8
- do not set master buffer and warn if the master does not include child
- issue warning if the master could not be loaded.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28033 a592a061-630c-0410-9148-cb99ea01b6c8
* the menu-item should also be enabled when the buffer is still unnamed (it will be saved anyway), and
* no buffer-reload after user cancel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28028 a592a061-630c-0410-9148-cb99ea01b6c8
- do not set master_file as master buffer if the document s no real child (bug 5653).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28020 a592a061-630c-0410-9148-cb99ea01b6c8
* LyXFunc.cpp:
Note that getStatus() always returned true for LFUN_BOOKMARK_CLEAR. This is because bookmarks().size() is hardcoded in the code to be 9 which is always larger than zero, obviously
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28014 a592a061-630c-0410-9148-cb99ea01b6c8
This occurs frequently when the temporary directory cannot be created because it already exists. The temporary directory can exist as a result of previous crashes of LyX.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27991 a592a061-630c-0410-9148-cb99ea01b6c8
the last name, with the "von" part, even when commas are not used in the
BibTeX file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27989 a592a061-630c-0410-9148-cb99ea01b6c8
Allow users to paste text from e.g. MS Word. This text can be paste from clipboard both as text and as graphics. LyX should prefer to paste it as text.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27988 a592a061-630c-0410-9148-cb99ea01b6c8
- solves some issues related to the dialog set-up
(overlapping of dialog title with upper sub-widget),
by "borrowing" the widget structure from
ViewSource.{h,cpp}
- reduces the default occupation of the dialog (in particular,
it was "colliding" with the ViewSource itself);
- proposes to introduce a tabbed-panel in the F&R
dialog, so as to have a "basic" and "advanced" tabs;
(one option could be to make the dialog even smaller
by moving all of the replace-related stuff into a separate
"Replace" tab)
- recovers the eventFilter functionality back, so as to catch
"Enter" or "Esc" key presses while in the Search Work Area
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27967 a592a061-630c-0410-9148-cb99ea01b6c8
that entries in the unicodesymbols file may not start with '\'.
Maybe the method should be renamed as fromLaTeXCode?
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27957 a592a061-630c-0410-9148-cb99ea01b6c8
The basic idea was to reuse the corresponding text space inset in the same
fashion as is already done for references. The dialog displays a different
selection for math than for text. If wanted, the additional spaces could
also be enabled for text, but that would be a file format change.
Constructs like \hspace{\mylengthvariable} that are not supported are
treated by the math parser as ERT as before.
For reasons I don't know the context menu does not work, but this is not so
important IMHO (since a left click opens the dialog).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27954 a592a061-630c-0410-9148-cb99ea01b6c8
to the method does not match any of the known unicode symbols.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27953 a592a061-630c-0410-9148-cb99ea01b6c8
- unbind existing shortcuts before binding new ones (bug 5444).
Patch submitted and tested by Bennett.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27948 a592a061-630c-0410-9148-cb99ea01b6c8
Instant preview of external material uses scaling from latex settings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27928 a592a061-630c-0410-9148-cb99ea01b6c8