Commit Graph

4837 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
5c32dc85d5 Fix various warnings issued by clang++.
* remove unused class TexStream.

* remove unused virtual method Inset::cellXOffset

* remove second argument of FileDialog constructor, which was actually
  not used

* remove some dead local code

* remove some unused private members of classes

* in InsetMathNest::updateBuffer, fix the logic of a test
2014-04-22 00:04:04 +02:00
Richard Heck
065db68067 Fix a bunch of minor issues discovered by the cppcheck script. 2014-04-21 11:52:00 -04:00
Uwe Stöhr
658aa3f026 PrefLanguageUi.ui: change a string
to have uniform uppercases in this dialog
2014-04-21 11:51:59 -04:00
Uwe Stöhr
9776519cc5 PrefCompletionUi.ui: port commit 1a137950 2014-04-21 11:51:58 -04:00
Juergen Spitzmueller
df1dbe28ce Do not allow the manual insertion of a directory (without filename) into the import dialog and thus prevent an assertion.
Fixes: #7437
2014-04-21 11:51:58 -04:00
Juergen Spitzmueller
da196ed5b2 Fix corrupted PrefCompletionUI.ui 2014-04-21 11:51:58 -04:00
Richard Heck
f00104d222 Revert "Tooltip for completion word length."
This reverts commit 2aadcec1fc9ae784e6029b56790753ce82b9f055.

Conflicts:
	src/frontends/qt4/ui/PrefCompletionUi.ui
2014-04-21 11:51:58 -04:00
Juergen Spitzmueller
a70571258d Fix assertion when ChkTeX hit math.
The problem here was that we used texted-only methods (via paragraph()), which triggered the assertion as soon as we were inside math.

Fixes: #8798
2014-04-21 11:51:57 -04:00
Scott Kostyshak
abc4c663ca Focus on buffer after section select in Outliner 2014-04-21 11:51:57 -04:00
Richard Heck
d53cf7f575 Typo. 2014-04-21 11:51:57 -04:00
Richard Heck
fdbe775b9f This is the result of an audit of all static variables, looking
for possible thread conflicts, of the sort Georg resolved at
6a30211f. I have made static variables const where possible,
and marked cases that looked potentially problematic with the
comment:
	// FIXME THREAD
Many of these definitely are vulnerable to concurrent access, such
as the static variables declared at the start of output_latex.cpp.
Suppose, e.g., we were outputting latex and also displaying the
source of a different document.

I'd appreciate it if others could grep for "FIXME THREAD" and see
if some of these are harmless, or what.
2014-04-21 11:51:57 -04:00
Richard Heck
3d6790607e Tooltip for completion word length. 2014-04-21 11:51:57 -04:00
Benjamin Piwowarski
54a534c81f Really use qstr to convert a string in a QString 2014-04-21 11:51:57 -04:00
Benjamin Piwowarski
91980ebfc5 Use qstr to convert string to a QString 2014-04-21 11:51:56 -04:00
Juergen Spitzmueller
8913031faf Fix section-select when issued from outliner
Fixes: #8936
2014-04-21 11:51:56 -04:00
Benjamin Piwowarski
382b42d6c2 OS X: Title bar can be clicked to access file path 2014-04-21 11:51:28 -04:00
Benjamin Piwowarski
2da0d32771 CMake: specific modules for Qt5 2014-04-21 11:51:04 -04:00
Richard Heck
130c375174 Remove obsolete formats from file dialog
It is confusing for the users to see the formats 1.3--1.6 in the file-open
dialog and not the 2.0 format. The exotic extensions were only used when
e.g., LyX 1.6.x exported to LyX 1.5.x format.
2014-04-01 21:53:50 +02:00
Richard Heck
717d19d3c3 Fix for bug #8939: Don't just close if the user enters a shortcut
that is already assigned.

From new contributor Roy Xia.
2014-03-15 23:05:48 -04:00
Vincent van Ravesteijn
3dec25e5a7 Revert "Return an error if file-open is called with a non-absolute path"
Reverted because of
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181795.html.

This reverts commit 9c4461deea.
2014-03-10 20:05:28 +01:00
Vincent van Ravesteijn
2db3f50186 Revert "Return an error on file-open only when a filename is given"
Reverted because of
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181795.html.

This reverts commit a4d881c58e.
2014-03-10 20:05:18 +01:00
Juergen Spitzmueller
656586d9fc Unblock some more internal qt events while doing advanced f&r. This fixes #9009 and some remaining drawing problems for me. 2014-03-10 09:07:36 +01:00
Tommaso Cucinotta
eef602cc9e Prevent LyX from freezing in additional common cases where it would
try to show dialogs or ask for user input while doing advanced find
and replace. In many of these cases we should simply find a way for
avoiding lyx to show a dialog, however an extra info/warning dialog
is better than the GUI freezing and having to kill the process.
2014-03-09 15:43:58 +00:00
Richard Heck
80b058cb18 Fix some shortcut conflicts (bug 9008). 2014-03-08 17:25:57 -05:00
Stephan Witt
d39eae0a88 #6902: Enable About and similar menu items without view and create a new view if needed 2014-03-08 12:51:02 +01:00
Stephan Witt
0e7eaef349 * fix bug 8925: create a temporary action to avoid a menu with any action. Otherwise it will not shown on Mac OS X 10.9 with Cocoa 2014-03-08 12:49:40 +01:00
Georg Baum
be0cd47559 Work around broken math symbol display (bug 7954)
This extends the already existing math symbol fallback mechanism in two ways:
1) When considering the availability of the math font, also take broken
   code points into account. These are currently 0x0009 and 0x00ad, depending
   on the platform.
2) If the fallback symbol in the standard "Symbol" font is not given, or if
   the "Symbol" font is not available, or the fallback symbol is one of the
   broken ones, try to use a generic unicode symbol as second fallback instead.
   If this is available, we rely on Qt to find a font which has it. Only if
   this is not available, display the symbol as ERT.
This ensures that we do never get a symbol which is not displayed: Either
it can be displayed, with or without fallback, or it will be shown as ERT.
2014-03-08 11:13:39 +01:00
Juergen Spitzmueller
0c447db0ca Adjust FIXME 2014-03-05 12:16:57 +01:00
Jean-Marc Lasgouttes
ad56bded03 Bug #9005: various things that do not work as intended in passthru paragraphs
* disable branch-add-insert in pass thru paragraphs

* when it is not possible to input a quote inset, insert a single
  ascii quote when argument to quote-insert is "single"

* handle "mathspace" dialog in Text::getStatus

* disable insertion of newline inset in pass thru paragraphs

* handle "mathdelimiter" and "mathmatrix" dialogs in GuiView::getStatus.
2014-03-04 11:56:03 +01:00
Jean-Marc Lasgouttes
8f8e8ed43c Fix bug #8998: changed document setting is recoded twice as undo
The general trick to avoid this kind of problems is to use undo groups.
2014-03-03 18:28:23 +01:00
Juergen Spitzmueller
5c4acd6bc0 Add FIXME 2014-03-03 10:45:40 +01:00
Prannoy Pilligundla
214f7ed262 Allow statusbar to be set on or off in full screen mode as a
preference.
2014-02-25 20:48:56 -05:00
Richard Heck
e5ea535952 If the selection is some sort of URL, then make it the target, not
the name, in the hyperlink. Fixes bug #8792.

This also fixes a bug discovered while working on this code: The
params passed to GuiHyperlink were never used.
2014-02-23 11:36:54 -05:00
Juergen Spitzmueller
5c1731b060 Fix #8657 on Linux.
On windows, there is apparently some more work to do.
2014-02-23 13:33:04 +01:00
Pavel Sanda
02bde93d2a Allow statusbar toggling in fullscreen (part of #8816). 2014-02-22 00:21:17 -08:00
Richard Heck
7220f1459e Fix bug #8540 by not resetting the GUI if the request came from
the minibuffer. As the comments explain, this leaves a different
bug, but (a) it isn't a crash and (b) it probably won't affect
many users, if *any* users.
2014-02-18 10:42:52 -05:00
Richard Heck
0a5b33bcad Rename a routine. 2014-02-18 10:42:52 -05:00
Jean-Marc Lasgouttes
e7a1cce551 Rename some LFUN names to match their text name
Also, rename copy-label-as-reference to label-copy-as-reference and update LFUNs.lyx accordingly.
2014-02-13 13:50:33 +01:00
Juergen Spitzmueller
fa6b388cb3 Do not issue module warnings when just cloning a buffer (#8864) 2014-02-09 11:16:20 +01:00
Juergen Spitzmueller
6837345209 Fix crash 2014-02-06 13:07:00 +01:00
Juergen Spitzmueller
b13f5dee53 Fix assertion in editing math (bug #8946) 2014-02-06 11:09:02 +01:00
Juergen Spitzmueller
5a669fa62b Style 2014-02-04 10:37:29 +01:00
Juergen Spitzmueller
ef5d702325 Harmonize naming 2014-01-27 12:04:58 +01:00
Juergen Spitzmueller
e6c5f9a17c Whitespace 2014-01-27 11:14:24 +01:00
Juergen Spitzmueller
5a3f1a731f Extend environment-split to an 'outer' split function
This fixes a major beamer UI flaw reported by several users.
2014-01-27 08:01:24 +01:00
Scott Kostyshak
27131e655a Shortcut box now stays open if bad input (#8703)
This allows the user to correct the bad input without
having to enter the other fields again in a new dialog.

Patch from Martin Hoffmann.
2014-01-14 08:04:05 -05:00
Stephan Witt
358e9ab31b fix Symbols dialog box grid size in case of broken QFontMetrics::maxWidth() 2014-01-04 20:14:06 +01:00
Enrico Forestieri
581400937d Fix file dialogs with Qt 5.2.0 and later.
See https://bugreports.qt-project.org/browse/QTBUG-34132

   * [QTBUG-34132] QFileDialog does no longer instantiate widgets if a
     native dialog will be used instead.  Therefore some accessors
     which previously returned unused objects will now return null.
     As before, you can set the DontUseNativeDialog option to ensure
     that widgets will be created and used instead.

Seemingly, Qt uses native dialogs by default starting from version 5.2.0.
When trying to open a file dialog, LyX segfaults in release mode, whereas
Qt asserts in debug mode:
ASSERT failure in QList<T>::at: "index out of range",
file /usr/local/qt/5.2.0/include/QtCore/qlist.h, line 472

This is avoided by explicitly setting the DontUseNativeDialog option
in the code path selected by *not* setting USE_NATIVE_FILEDIALOG.
This option was introduced in Qt 4.5, which is the minimum required
for compiling LyX. So, it is not protected by a preprocessor macro.
2013-12-24 17:21:56 +01:00
Juergen Spitzmueller
49d3557d0c Correct \file statement 2013-12-21 12:58:23 +01:00
Vincent van Ravesteijn
a4d881c58e Return an error on file-open only when a filename is given
Fixes: 9c4461de
2013-12-03 06:37:27 +01:00
Vincent van Ravesteijn
9c4461deea Return an error if file-open is called with a non-absolute path 2013-12-02 21:04:46 +01:00
Juergen Spitzmueller
44df37ab2a Check if string holds absolute file name before passing to FileName
See http://comments.gmane.org/gmane.editors.lyx.cvs/38213http://comments.gmane.org/gmane.editors.lyx.cvs/38213
2013-12-02 09:50:21 +01:00
Juergen Spitzmueller
766e8b1e33 Also when not using tabs, do not open a file twice if already opened (part of #8787) 2013-11-26 16:12:52 +01:00
Pavel Sanda
105f9bb5d9 Get rid of one useless translation.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181106.html
2013-11-17 10:41:18 -08:00
Juergen Spitzmueller
c89ae3b517 Add missing widget update 2013-11-15 19:29:15 +01:00
Juergen Spitzmueller
e014f3fabf Some fixes to the SaveAs dialog
LFUN_BUFFER_SAVE_AS has an optional argument where an initial format can be preset

This fixes:

* The remainder of bug #3402: Open Export As dialog when attempting to export to read-only directories
* Bug #8886: 'export as' should default to the default document output format
2013-11-15 09:20:07 +01:00
Juergen Spitzmueller
ed268ac9f7 Clarify description 2013-11-15 08:57:11 +01:00
Juergen Spitzmueller
ab96df492a List all exportable document formats in the Save As dialog, not only the selection from the export menu 2013-11-15 08:56:13 +01:00
Scott Kostyshak
1e365fe315 Focus on custom line edit when custom is selected
Do so for the horizontal and vertical space dialogs.
2013-11-15 01:03:14 -05:00
Juergen Spitzmueller
68a4a53b36 Do not try to validate custom value in VSpace dialog if it is disabled 2013-11-14 10:42:24 +01:00
Juergen Spitzmueller
70b0298fe2 Fix shortcut clash (bug #8878)
Patch by charley
2013-11-12 16:27:32 +01:00
Juergen Spitzmueller
7e22abec5d Fix bug 8880: do not try to validate custom value if it is disabled 2013-11-12 15:48:34 +01:00
Juergen Spitzmueller
ce8ec78783 Fix crash when using context menu in empty outliner
Fixes: #8885
2013-11-10 15:31:27 +01:00
Tommaso Cucinotta
275f269cb7 Advanced F&R dialog does not need to be restored at start-up. 2013-10-26 18:37:25 +01:00
Vincent van Ravesteijn
514aef937a Revert "Fix make distcheck for monolithic build"
This was committed by accident.

This reverts commit 9734ab7e34.
2013-10-12 02:41:36 +02:00
Vincent van Ravesteijn
9734ab7e34 Fix make distcheck for monolithic build 2013-10-12 02:38:15 +02:00
Tommaso Cucinotta
acbba50a65 Added tooltip to new math-only checkbox in advanced options of advanced find & replace. 2013-10-13 11:36:38 +01:00
Tommaso Cucinotta
b93f2c20d3 Added restrict-search-to-maths-only checkbox to advanced pane of Advanced F&R. 2013-10-13 00:59:46 +01:00
Jean-Marc Lasgouttes
b89ef8a5b3 Revert "Do not kill the undo stack when doing a Save As..."
This commit was causing bug #8821.

This reverts commit 467422f9df.
2013-10-04 15:01:42 +02:00
Juergen Spitzmueller
5686ad11f3 Fix loop when trying to export a read-only document 2013-09-16 10:13:16 +02:00
Juergen Spitzmueller
b7c1bbfb0b Export as: Further cleanup 2013-09-14 17:53:57 +02:00
Juergen Spitzmueller
2535f2f271 Further localization fixes 2013-09-14 15:40:57 +02:00
Juergen Spitzmueller
e100536d59 Fix 'Export As...' in non-English localizations
It is always a bad idea to compare a localized string. I think the whole method Formats::getFormatFromPrettyName (which is now unused) should be ditched. This is bound to fail.
2013-09-14 13:11:47 +02:00
Juergen Spitzmueller
53445f7b99 Localize 'Export As...' dialog 2013-09-14 12:36:58 +02:00
Juergen Spitzmueller
151158f191 Fix string (patch by Jean-Pierre Chretien) 2013-09-14 11:39:33 +02:00
Jean-Marc Lasgouttes
78780e7b38 Allow master view/update when current buffer is the master 2013-09-01 20:14:44 +02:00
Tommaso Cucinotta
cd84a3024d Now an attempt to export into a folder without write permission causes LyX to automatically pop-up the "Export As" dialog (addressing #3402). 2013-08-26 11:28:07 +01:00
Juergen Spitzmueller
138bb4d14f Fix the fix to the decimal separator problem with Qt5 2013-07-27 11:18:16 +02:00
Enrico Forestieri
92863de517 Fix Qt5 decimal separator bug
Always use '.' as the decimal separator in the GUI, because we
call setlocale(LC_NUMERIC, "C") in setLocale() (GuiApplication.cpp).
2013-07-26 20:52:44 +02:00
Tommaso Cucinotta
b32ce2cf08 When agreeing to wrap-around, but nothing is found, keep the cursor where it originally was.
Now this is coherent with Advanced F&R.
2013-07-22 23:55:43 +01:00
Juergen Spitzmueller
2f2841a016 Establish missing connections to change_adaptor 2013-07-21 19:27:57 +02:00
Tommaso Cucinotta
2a86379ea7 Adding wrap-around pop-up question to simple find and replace dialog (fixing enhancement request #1262). 2013-07-21 17:51:53 +01:00
Juergen Spitzmueller
6445cd9df4 Bug in 'Use non-tex fonts' checkbox auto-toggling (#8717) 2013-07-20 16:15:47 +02:00
Juergen Spitzmueller
d788d497aa Trivial fix: escape ampersands in file names before pushing to tab header (#8757) 2013-07-19 15:55:56 +02:00
Juergen Spitzmueller
6f9a272ca3 Fix toggling of 'misc' font options (bug #8764) 2013-07-17 08:30:42 +02:00
Jean-Marc Lasgouttes
deb6e16e79 Move a Qt workaround to the Qt frontend. 2013-06-04 12:08:36 +02:00
Vincent van Ravesteijn
9a6c402a82 Make sure numeric conversions are not locale dependent
In [19024f72\lyxgit] this line was removed. Later this caused that floats were converted to strings using ','s instead of '.'s. Readding this line fixes this.
2013-06-03 17:58:06 +02:00
Vincent van Ravesteijn
83399dcb7a PrefsUi: Remove unneeded widths 2013-06-02 23:30:06 +02:00
Juergen Spitzmueller
8f287f5ffa Implement option to set a global default output format for dics with non-tex fonts (#8706) 2013-06-01 16:58:34 +02:00
Juergen Spitzmueller
1e42af6c44 Windows compilation fix 2013-05-31 14:27:39 +02:00
Juergen Spitzmueller
a2b34f66ea revert unintended commit 2013-05-31 11:07:48 +02:00
Juergen Spitzmueller
2c1679e958 Small UI polishment 2013-05-31 10:45:21 +02:00
Jean-Marc Lasgouttes
19024f7255 Implement native reading of mo files.
Get the default language by a mix of QLocale and LyXRC::gui_language

Known limitations:
   * encoding is supposed to be UTF-8 (the charset parameter is checked);
   * context is not handled (implemented differently in LyX);
   * plural forms not implemented (not used for now in LyX);.
   * tThe byte endianness of the machine on which the .mo file have been
     built is expected to be the same as the one of the machine where this
     code is run.
2013-05-30 22:10:01 +02:00
Juergen Spitzmueller
bfaa84d97f Attempt to fix #8702 2013-05-28 11:45:42 +02:00
Juergen Spitzmueller
9992348223 Add FIXME 2013-05-27 18:48:46 +02:00
Juergen Spitzmueller
83a6107392 Recognize biber warnings/errors/info messages 2013-05-26 16:06:13 +02:00
Stephan Witt
75c631df7f On Mac, moving down a paragraph should place the cursor at the end of the current paragraph
(unless it's already there, in which case it should move to the end of the next paragraph).
Change the preference setting name (mac_like_word_movement to mac_like_cursor_movement)
to better reflect its function.

Patch and description from Bennett Helm
2013-05-25 18:02:21 +02:00
Uwe Stöhr
427aeff90f GuiBox.cpp, InsetBox.cpp: fix some wrong logic
- InsetBox.cpp:
 a framebox without inner box and without a width is \fbox
 a framebox with inner box is also \fbox
 a framebox without inner box and with width is \framebox

- GuiBox.cpp: the width checkbox must be checked if there is width
2013-05-25 15:07:17 +02:00
Uwe Stöhr
472732f92d GuiBox.cpp: addendum to [f04c7711/lyxgit]
- this was forgotten to commit;
(without this we would get invalid LaTeX code when changing in the box dialog a makebox without a width to a minipage and press apply - a makebox required to specify a width, at least an invisible one like "0cm")
2013-05-25 13:52:09 +02:00
Jean-Marc Lasgouttes
f04c7711b0 Fix empty width support for Box inset
* InsetBox and GuiBox: Use proper empty length instead of the broken -9.99col% trick
* some slight changes to the logic of GuiBox to make sure that values are set as needed.
* lengthToWidget(): handle properly the empty length case. All the other related Qt helpers did it already, it was probably an oversight. Also set the default_unit parameter as optional (not needed in this patch actually, but I got carried away :)
* allow generating LaTeX code for an empty length, since some broken code does that.
2013-05-24 15:44:59 +02:00