Commit Graph

7556 Commits

Author SHA1 Message Date
Stephan Witt
44b3278006 Fix bug #8238: correct the forward argument of replace2string() in on_replacePB_clicked(). 2012-07-27 00:34:17 +02:00
Jean-Marc Lasgouttes
6774176aab Implement new LFUN buffer-forall [<BUFFER-TYPE>] <LFUN-COMMAND>
This is a patch from Scott Kostyshak. See the thread here for some
background info:
http://thread.gmane.org/gmane.editors.lyx.devel/142300/focus=142362
2012-07-20 10:50:29 +02:00
Jean-Marc Lasgouttes
467422f9df Do not kill the undo stack when doing a Save As...
The code does a reload on the buffer to avoid loose pointers if the
file changes directory. This commit adds a bool parameter to
Buffer::reload to allow for keeping the undo stack intact. This is of
couse only wanted in this case, not when reloading an earlier version
of the file.
2012-07-18 10:31:47 +02:00
Jean-Marc Lasgouttes
02ce050fb8 Make the toolbar code less noisy when the session file is not found 2012-07-16 23:11:26 +02:00
Jean-Marc Lasgouttes
16fd47ad8f Fix bug #7741: incorrect locale when starting R from LyX?
The goal here is to get rid of the old code that modified variables
LANGUAGE and LC_ALL, therefore creating the problems mentionned
in the ticket.

In the new system, there is no explicit "GUI" message handler, that
needs to be reset at each language change. Instead, getGuiMessages
calls getMessages with the correct parameter. This allows to simplify
greatly the code and to remove a lot of old cruft.
2012-07-15 22:22:10 +02:00
Richard Heck
a0afcdb391 LFUN_CLOSE_TAB_GROUP does exactly the same thing as
LFUN_BUFFER_CLOSE_ALL if there's only one tab group open, so there's
no need to enable it in that case.
2012-07-14 22:13:40 -04:00
Juergen Spitzmueller
11f7efe2eb Set the appropriate quote style when switching the main language 2012-07-01 11:27:42 +02:00
Jean-Marc Lasgouttes
bbbc2b6541 Fix to #8159: Undo doesn't restore environment depth correctly
The idea is to record undo at the place where the document is modified:

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used (because updateBuffer is const but
   modifies the document, go figure).

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-29 15:25:47 +02:00
Pavel Sanda
e43f9d3bbd Revert a6e42e5079.
Removing debug.h makes debugging via lyxerr<< twice as hard.
2012-06-28 20:52:20 +02:00
Uwe Stöhr
4ab764c845 BoxUi.ui: revert unintended commit [a6e42e50/lyxgit] 2012-06-26 22:46:06 +02:00
Uwe Stöhr
a6e42e5079 removed unused includes
these files don't use the debug.h and also don't contain commented out debug code
2012-06-26 22:41:53 +02:00
Pavel Sanda
369e697352 Add hint for backward search (cf #8054) 2012-06-23 04:12:08 +02:00
Pavel Sanda
35e4c1c9a6 Allow dead caron to be recognized in our key bindings.
This allows to workaround the problem in #8198 - on some systems
we get dead caron as a single character instead of whole combined
character. I suppose this has rather something to do with X settings
than LyX per se.
2012-06-14 12:44:16 +02:00
Juergen Spitzmueller
785332f305 re-add change_adapter triggering 2012-06-08 19:21:30 +02:00
Juergen Spitzmueller
040fb73b9c Do not hardcode polyglossia-only languages 2012-06-08 12:54:57 +02:00
Uwe Stöhr
ceb180cebd GuiDocument.cpp: some languages only work with polyglossia, therefore enable non-TeX fonts when one of them is used as document language 2012-06-08 05:39:00 +02:00
Juergen Spitzmueller
a4ea17e0e9 Restore default output format after tex fonts switch (#8191) 2012-06-07 21:27:01 +02:00
Richard Heck
b7ac2d69e7 Allow LyX format to be written to View>Source window. 2012-06-05 10:24:15 -04:00
Jean-Marc Lasgouttes
9a3b6733c0 Revert "Second tentative fix to #8159: Undo doesn't restore environment depth correctly"
Did not mean to commit that.

This reverts commit 8f01556236.
2012-06-05 12:55:37 +02:00
Jean-Marc Lasgouttes
8f01556236 Second tentative fix to #8159: Undo doesn't restore environment depth correctly
In this version, the idea is to record undo at the place where the document is modified, which is definitely cleaner.

1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
   const_cast has to be used

2/ in GuiApplication::dispatch, add an extra undo group that
   encompasses the updateBuffer call. Some other undo groups may be
   redundant now, but it is not a problem since they do not cost
   anything.
2012-06-05 11:32:56 +02:00
Richard Heck
7ef8df460a Fix crash reported by Tommaso:
http://marc.info/?l=lyx-devel&m=133876924408431&w=2
The problem here is that the copy_params() routine in FindAndReplace.cpp
created a new DocumentClass, but it never updated its Buffer to reflect
that new DocumentClass. So its Paragraphs still contained points to the
Layouts in the old DocumentClass which, since ead697d4b6, gets garbage
collected once it is no longer needed. So the Layout doesn't exist, and
we crash.
2012-06-04 13:39:24 -04:00
Richard Heck
1078dba130 Fix crash reported by Scott. Forgot to change some pointers to
shared_ptr.
2012-06-04 13:04:26 -04:00
Pavel Sanda
262c2e95a9 Tabular.ui: Moving Latex argument field to column section.
Forgotten patch from John Tapsell.

Documentation moved from UI to User Guide.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg173987.html

This was here for ages, no need to rush into branch.
2012-05-31 15:36:33 +02:00
Pavel Sanda
f692181917 Fix #8180: Page break on current row can't be unchecked.
Patch from John Tapsell
2012-05-31 13:56:07 +02:00
Juergen Spitzmueller
ab3491adef Fix crash when removing last converter (bug 8178) 2012-05-29 14:21:29 +02:00
Jean-Marc Lasgouttes
a756403301 "Performance" fixes suggested by cppcheck
While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
2012-05-28 22:42:44 +02:00
Pavel Sanda
1b1f9d05d9 compile fix 2012-05-26 10:16:20 +02:00
Vincent van Ravesteijn
655a4f5515 Fix painting of hidden tabbar on gtk
When there is a single document open, the tabbar gets hidden. The only and selected tab is still visible though as a break in the line delining the tabwidget. To fix this we paint the tabwidget ourselves and remove the presence of the hidden tab.
2012-05-25 19:17:48 +02:00
Richard Heck
9d983562fe Style. 2012-05-23 08:53:14 -04:00
Vincent van Ravesteijn
30475664d3 Allow an unnamed buffer to be saved with the same name
The check whether fname != oldname does not work for unnamed buffers.
Therefore, we check explicitly whether the Buffer that already exists with
the same name isn't really the buffer we are trying to save.
2012-05-14 15:26:51 +02:00
Vincent van Ravesteijn
6cf1847b31 New function BufferList::newInternalBuffer
This solves the problem that newBuffer() already use Buffer::isInternal
but there was no chance to set it yet.
2012-05-12 14:36:13 +02:00
Richard Heck
f2fc334cd5 Whitespace. 2012-05-10 15:44:25 -04:00
Pavel Sanda
f78d74f40d Fix buddies in tabular dialog, patch from John Tapsell. 2012-05-09 12:22:40 +02:00
Pavel Sanda
ba88f39624 GuiViewSource - prevent null-pointer crash if backend format is not found.
Patch from John Tapsell.
2012-05-09 09:14:55 +02:00
Georg Baum
b86c984bf4 Disentangle amsmath and amssymb loading.
This is needed if you load a font package incompatible to amssymb manually
(see bug #5058).
2012-05-06 20:49:49 +02:00
Vincent van Ravesteijn
5279d5a8a5 Properly mark a buffer as internal
Checking the extension of the temporary filename doesn't work anymore
since the naming of temporary files was corrected.
2012-05-06 20:12:17 +02:00
Vincent van Ravesteijn
5e4e4b674c Always require a mask to get a temporary filename
If no mask is supplied or the mask is attached to the end of the filename, we end up with unexpected names like
  <system-temp-dir>\lyx_tmpdir.qHp780.vcr780_<mask>
instead of a temporary file in the lyx temporary directory like
  <system-temp-dir>\lyx_tmpdir.qHp780\<mask>.vcr780.
2012-05-03 16:14:37 +02:00
Vincent van Ravesteijn
53b75399e7 Factor out painting of text decorations 2012-05-02 18:02:17 +02:00
Richard Heck
e90cd4180e Constness, etc. 2012-05-01 13:02:10 -04:00
Richard Heck
d2acacedf9 We don't need to rescan everything from the BibTeX dialog, just
the bib and bst files.
2012-05-01 12:54:17 -04:00
Vincent van Ravesteijn
6327993867 Fix bug #7667: Pixmap cache and CT lead to random colors
The signature of the character in cache should take into account the
change tracking baseColor (author) and mergeColor (added/deleted). If not,
we will mixup different cached pixmaps.
2012-04-29 14:59:19 +02:00
Pavel Sanda
217ef5bf39 Thesaurus keyword combo completion (bug #8138). 2012-04-25 16:40:51 +02:00
Pavel Sanda
8ea66efe16 Attempt to fix #8137 (arrived at r40862).
1) Revert to designer compilable by older Qt's
2) Remove spacer in right part of dialog
3) Decrease height.
2012-04-24 02:02:25 +02:00
Richard Heck
94b9da328b Rename is_valid_ as validated_, which is a bit more informative. 2012-04-21 16:25:38 -04:00
Richard Heck
afee2488cb Optimize a bit the handling of local layout validation. This handles
empty cases better than what was before.

Patch from Scott Kostyshak.
2012-04-21 16:22:28 -04:00
Georg Baum
27733452f7 Native support for \lstlistoflistings 2012-04-16 21:40:59 +02:00
Enrico Forestieri
ea31541848 Fix bugs #6871 and #8119.
Both bugs above were due to a missing screen update. This patch
updates the current view after dispatching a lyxserver command
and thus solves both.

The patch is quite strightforward and the only difficulty was due
to the fact that the lyxserver needs the result of the dispatched
command. Now, GuiApplication::dispatch(FuncRequest const &) does
right this, but does not return the result, while
GuiApplication::dispatch(FuncRequest const &, DispatchResult &)
is called by the former but does not return the result. So, I
split the first one, isolating the code performing the update,
such that the second one can also update the current view when
the caller is the lyx server. When the action is initiated by
anything different from the lyx server, the behavior is unchanged.
2012-04-13 02:57:25 +02:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Vincent van Ravesteijn
7fbf23d916 Fix monolithic build (bug #8079) 2012-03-24 15:25:30 +01:00
Lars Gullik Bjønnes
c7bb190fd3 Setup .gitignore for generated files
Setting up .gitignore or .git/info/excludes is something that should
be done. Not doing it makes it a lot harder to see actual new files
that should be added.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-03-22 02:16:12 +01:00