Commit Graph

8210 Commits

Author SHA1 Message Date
Georg Baum
1cbc3b6e54 Fix filter filter regex
Now the external material file dialog shows the file types defined in the
template again. Before this fix it did only show "All files (*)".
I don't know what the old syntax was supposed to do or whether it ever worked
with boost::regex, but with std::regex the new one is correct.
2016-09-08 20:54:40 +02:00
Jean-Marc Lasgouttes
9e44cd672a Simplify menus when there is only one caption type
This removes the submenu indirection in Insert and the type changer in
contextual menu. Interestingly, the code was there, but it did not
work at all.

(cherry picked from commit e7a33cacf1
and made compatible with C++98)
2016-08-29 13:49:50 +02:00
Guillaume Munch
1dc8278fef LaTeX highlighter: make at a letter in the user preamble
Syntax highlighting now provides the appropriate cue that the user preamble is
inside \makeatletter…\makeatother.

(cherry picked from commit 10f6eb2e7e)
2016-08-28 02:38:02 +01:00
Guillaume Munch
c8381f7873 LyXToolBox: a QToolBox with minimum size management
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.

(cherry picked from commits 576cb5df77
                            7e9d0a938b
                            efbc297b95)
2016-08-28 01:43:46 +01:00
Guillaume Munch
2da2f6c00c Basic implementation of QSignalBlocker for qt4
(cherry picked from commit bc8eb059db)
2016-08-26 20:42:52 +01:00
Guillaume Munch
49ce94f636 Fix "scroll here" feature of scrollbar (#10311)
Prevent setRange() from causing a recursive call to scrollTo(). Reduces three
calls of scrollTo() to one call for all scrolling functions of the scroll bar
(e.g. clicking on the arrow, dragging, or clicking somewhere on the scrollbar).

(cherry picked from commit 4d7b912ca1)
2016-08-26 20:41:08 +01:00
Juergen Spitzmueller
010284dbe5 Implement proper dialog titles in InsetParamsDialogs
Fixes: #10329
2016-08-26 18:51:01 +02:00
Jean-Marc Lasgouttes
e2489c1c31 Let M-x give focus to minibuffer when it is already open
(cherry picked from commit 65b0e84b54)
2016-08-23 12:25:16 +02:00
Richard Heck
46a16b0ca7 Merge branch '2.2.x' into 2.2.2-staging 2016-07-25 14:55:16 -04:00
Jean-Marc Lasgouttes
6633e7aa3e Add feedback in status bar when zooming
Moreover enforce better the lower limit of 10 and avoid overflow due
to unsigned int.

Fixes bug #10212.

(cherry picked from commit 8884c4044d)
2016-07-20 00:58:30 +02:00
Richard Heck
32b56ee8f7 Do not crash is release mode if we stumble across an unrealized font.
(cherry picked from commit 3203fb1c5f)
2016-07-18 13:03:47 -04:00
Stephan Witt
ab1dd332e1 Remove special code for Qt5 to manage HiDPI. It's not needed anymore and leads to strange icon scaling problems in mixed resolution environment.
For reference see the screen shots in bug tracker ticket #10114.

(cherry picked from commit d5fb80ed87)
2016-07-15 07:20:50 +02:00
Guillaume Munch
030f4c6d1e Revert the change of "Output" into "Format"
(Partial revert of commit 141d9d34dfb5ee5b642438f76945ee51ab931800.)
2016-07-13 17:47:27 +01:00
Guillaume Munch
4089153770 Add line breaks
2.2 still requires those
2016-07-12 14:55:20 +01:00
Guillaume Munch
141d9d34df UI for save_transient_properties
Add a new checkbox "Save transient properties" to the "Output" panel in the
document properties dialog (now renamed as "Format").

This provides the front-end for the change at 5c2d04999.

(cherry picked from commit 5d292fce2d)
2016-07-12 14:50:51 +01:00
Juergen Spitzmueller
cd68c6afdf Clarify some comments wrt XeTeX/LuaTeX (see bug #10013) 2016-07-11 10:16:56 +02:00
Juergen Spitzmueller
90e337c84d Generate a proper error dialog title for XeTeX/LuaTeX
(see bug #10013)

Candidate for stable
2016-07-10 16:04:24 +02:00
Guillaume Munch
bca4965dd8 Accessibility of document class combo box (#10035)
* Access it with tab

* Access it with the accelerator from the title of the group

(cherry picked from commit 3e6df97963)
2016-07-08 17:36:32 +01:00
Enrico Forestieri
ebb1941143 Bring window to front only for single-instance mode
A window manager could be configured such that to maintain a certain
stack order for the windows. It would be annoying that opening a new
file through menu brings up the window, so do this only if we are
loading a file through the lyx-server.

This commit amends f5f8c6fd, so no status line is needed.
2016-07-05 23:19:59 +02:00
Enrico Forestieri
f5f8c6fd38 Bring window to front after loading a document
Fixes #7875.
2016-07-04 20:44:13 +02:00
Enrico Forestieri
7b423a4eb3 Make command buffer icons same size as QLineEdit height
Part of bug #10125

(cherry picked from commit 458d2015dc)
2016-06-27 18:44:50 -04:00
Enrico Forestieri
7d759dccbb Make oultliner icons same size as the toolbar icons
Part of bug #10125

(cherry picked from commit f56ee1875c)
2016-06-27 18:44:08 -04:00
Richard Heck
180f1d5497 Fix for previous commit: We come right back through here from
exportBufferAs, so we need to make sure we haven't been given
an export location.
2016-06-25 00:41:23 -04:00
Richard Heck
1207d93951 Fix bug #8814: Ask where to export file if it is not
yet saved.
2016-06-25 03:29:30 +01:00
Guillaume Munch
4668e6eceb TocWidget: fix part of #9825
(cherry picked from commit 78a5c87781)
2016-06-23 14:19:14 +01:00
Richard Heck
bfcd8a3991 Fix typo, and also check, if string is null. 2016-06-18 18:34:30 -04:00
Richard Heck
c503804eeb Be a bit more careful about setting and restoring the last reference
when we go to and return from labels.

(cherry picked from commit 68b60ec529)
2016-06-18 18:28:48 -04:00
Guillaume Munch
0ba875add1 TocWidget: fix an erroneous collapse and optimise updates based on profiling
TocModels::reset() in GuiView::structureChanged() collapses the TocWidget, and
therefore requires an update right after, which was missing.

In fact, profiling TocWidget::updateView() shows that delaying the update is
good only for fast keypresses (essentially movement). It costs 5% of a
char-forward operation in a document with approx. 100 table of contents
items. The update optimisation has been rewritten to take this data into
account.

This also fixes #9826: Outline disclosure of subsection content disappears one
second after doubleclicking content item.
2016-06-15 22:32:53 +01:00
Richard Heck
adcdf22042 Restore last selected label when using the "go to label" feature
of the reference dialog.

(cherry picked from commit 9d5ffa8e75)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
aa522e7071 Fix drawing of buttonText (enforce same left/right spacing)
The computation of the width of the button was wrong. If <--> stands
for TEXT_TO_INSET_OFFSET/2 spacing, and if `[]' marks the button's
limits, then the intent is
  <-->[<-->button text<-->]<-->

Therefore the physical grey rectangle width is
   width - Inset::TEXT_TO_INSET_OFFSET

With this change, the spacing on the right of the button is not larger
than the left one.

Fixes bug #10147.
(cherry picked from commit 516d5d29dc)
2016-06-15 22:32:53 +01:00
Guillaume Munch
108cb35b64 Show review toolbar when outputting changes
"Output changes" alters the preamble even in the absence of tracked
changes. Therefore, not being able to notice when it is activated can possibly
yield hard-to-debug compilation failures.
2016-06-15 22:32:53 +01:00
Guillaume Munch
73dd3f4ecb GuiChanges: provide feedback when there are no more changes
Remove FIXMEs: date and time localisation
2016-06-15 22:32:53 +01:00
Guillaume Munch
c137ae4c43 Automatically show the review toolbar if the document has tracked changes
(#8738)

For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
2016-06-15 22:32:53 +01:00
Guillaume Munch
b90435ac72 TocWidget: clean-up the timer logic
The timer logic introduced to solve bug #7138 was not entirely reliable; in
particular it resulted in spurious updates (noticeable by the treeview
collapsing just after one opens a branch, in particular).

This commit cleans up the timer logic. I followed the original design decision
of having an immediate update followed by a delayed update. Now the updates are
appropriately compressed and done after a delay of 2s (as can be noticed with
the treeview still collapsing, unfortunately, but after a more predictable
delay...).
2016-06-15 22:32:53 +01:00
Guillaume Munch
009dc75fef TocWidget: Fix perf regression
4d1ad336 fixed #9754 but caused perf issues by cancelling the gains of having a
timer (introduced after #7138). This introduces in GuiToc::enableView() a
lightweight check of whether the widget should be updated. The logic is inspired
from GuiViewSource::enableView().
2016-06-15 22:32:53 +01:00
Guillaume Munch
8149d4fc0b Whitespace 2016-06-15 22:32:52 +01:00
Guillaume Munch
3b1068af62 Improvements to the shortcuts preference dialog (#9174)
Ask the user for removing bindings when using the "restore" button (#9174).

Fix the already-bound-key detection logic.

Don't forget to trigger the search when initializing the search LineEdit with
its former value.
2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
9fc27f6bb7 Make monolithic build code portable to Mac OS
"echo -e" is definitely not portable. Use a plain loop instead.

Also use the automake silent rule mechanism to make the generation of monolithic source files visible.
2016-06-15 22:32:52 +01:00
Guillaume Munch
5c13007d92 Make latex highlighter colors compatible with dark theme
Partial fix for #8325
2016-06-15 19:51:45 +01:00
Guillaume Munch
203136d287 ShortcutOverride again
Re: fix for #9218 (not #10119)

Now it matches the example given in the docs. This time tested on qt4.
2016-06-13 08:50:06 +01:00
Guillaume Munch
210f97c67b Fix bug #9218
This makes Qt 5.4 as usable as Qt 5.5.1 in my experience. Otherwise, fix again
INSTALL.
2016-06-12 23:12:24 +01:00
Guillaume Munch
e6d28aad0a Fix compilation with Qt < 4.7
Thanks to jkulesza
2016-06-12 23:12:24 +01:00
Jean-Marc Lasgouttes
7855c0c1fc Allow automatic text direction in Painter::text()
It is wrong to assume that direction is left-to-right when no indication exist.

Add a new enum with values LtR, RtL and Auto to be used as argument of
the private text() methods. When direction is Auto, let Qt decide how
the string shall be layed out.

This is reimplementation of 51ee267c. A direct cherry-pick was not possible.

Fixes bug #10169.
2016-06-01 13:48:15 +02:00
Uwe Stöhr
13af7aa426 ErrorListUi.ui: correct an expression 2016-05-31 23:16:32 +02:00
Scott Kostyshak
594748374b Fix using system theme icons with Qt 5 (#10052)
With Qt 5, our code did not correctly detect when icons were
available and thus tried to use nonexistent icons.

QIcon::hasThemeIcon(theme_icon) returns true when theme_icon is
empty. We now rely on the behavior that QIcon::isNull() returns true
if the icon is empty.

The same code is used with Qt 4 and Qt 5.
2016-05-22 20:56:12 -04:00
Stephan Witt
1719fa6c6a Handle activateWindow in LFUN_BUFFER_SWITCH like in saveBufferIfNeeded() and doShowDialog() methods.
This is a requirement on Mac to get the current buffer view topmost after buffer switch.
2016-05-21 22:17:03 -04:00
Guillaume Munch
9a1afbf3ff Do not float the outliner in OSX (#9825)
There are focus issues in qt5 when the outliner is floating.
2016-05-21 18:54:38 +01:00
Guillaume Munch
a70f053a62 Use bilinear filtering when resizing graphics
This is used when scaling graphics previews. It is also used on a rare occasion
to scale instant previews when the user's configuration mixes low-dpi and
high-dpi monitors (#10114).
2016-05-20 21:19:31 +01:00
Guillaume Munch
791ef98016 GuiDelimiter: Workaround symbols alignment problem #10118 2016-05-20 19:32:35 +01:00
Guillaume Munch
a645d7f4e5 ShortcutWidget: override shortcuts in the way they are meant to be (#10075)
I would say "by the books" but the documentation was not really clear.

Problems with the logic of the previous implementation were exposed in Qt 5.6 by
commit <https://codereview.qt-project.org/125142>.

<http://mid.gmane.org/20160510070413.wzjpk4w4turnx6pr@cotopaxi>

Note that ShortcutOverride events are used elsewhere in the code where they may
need to be corrected in the same way.
2016-05-20 19:14:35 +01:00