Commit Graph

17977 Commits

Author SHA1 Message Date
Vincent van Ravesteijn
863e1eb35b * TextMetrics.cpp: Line length.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34372 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-05 16:23:11 +00:00
Enrico Forestieri
cf1f59dd4d Fix bug #6678: Crash when undoing backspace inside math-macro
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34370 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-04 16:16:20 +00:00
Vincent van Ravesteijn
b269eb9117 Fix a crash due to Inset**::mouse_hover_[] containing an invalid pointer to a BufferView.
Clear the mouse_hover state when closing the BufferView. Otherwise, there will be an invalid pointer stored in the Inset and crashing LyX when the Inset's destructor is called.

See also r33908, r34117, r34348, r34353, r34354, r34363 and bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34365 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 23:04:51 +00:00
Vincent van Ravesteijn
351808718d Fix another crash due to BufferView::last_inset_ being an invalid pointer.
Do not clear the mouse_hover state from anywhere else then BufferView, such that the last_inset_ pointer gets nulled. Besides, there is no reason to clear the mouse_hover state on collapsing the Inset.

See also r33908, r34117, r34348, r34353, r34354 and bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34364 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 23:01:47 +00:00
Vincent van Ravesteijn
49920e31d6 Another non-base class with a virtual destructor. Sorry for the spam (trying to learn git, but I seem to forget files :).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34363 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 22:57:28 +00:00
Vincent van Ravesteijn
86eaa6de73 Another base class without a virtual destructor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34362 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 22:55:40 +00:00
Vincent van Ravesteijn
c9e4d6657d These should not raise the impression that children should reimplement these functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34361 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 22:18:00 +00:00
Vincent van Ravesteijn
cea7948698 Make destructors virtual in base classes and only there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34360 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 21:43:46 +00:00
Vincent van Ravesteijn
8c0194ae78 Add comment just as in GuiView.cpp.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34359 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 20:08:31 +00:00
Vincent van Ravesteijn
eb78affda7 We want to check for the new value name instead for the old value cmdName_.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34358 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 17:55:44 +00:00
Vincent van Ravesteijn
9d1f1e285c *List.h: Move the class documentation into the lyx::namespace to be picked up correctly by doxy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34357 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-03 13:36:19 +00:00
Vincent van Ravesteijn
d9fab1ecc6 * lyxfind: Remove unnecessary non-const reference as parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34355 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-02 22:33:36 +00:00
Vincent van Ravesteijn
750620765f Fix another crash due to BufferView::last_inset_ being an invalid pointer.
Now, we only want to let the last_inset_ pointer point at insets that accept the mouse_hover setting. Otherwise, the pointer is not cleared on deletion of the inset.

See also r33908, r34117, r34348, r34353 and bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34354 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-02 19:12:25 +00:00
Vincent van Ravesteijn
9c8e7429fa Fix the assertion assert introduced in r34348 which got fired when eg. deselecting an InsetCommand:
- we have to have a copy constructor in InsetCommand to clear the mouse_hover_ map and not to copy it,
- there is no need to have mouse_hover_() in the initialisation list,
- there is no need to copy the auto_open_ map.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34353 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-01 23:04:08 +00:00
Enrico Forestieri
60466235fe Avoid compiler warning about unused parameter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34352 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-01 11:38:05 +00:00
Enrico Forestieri
7d4ca5033e Implement LFUN_UNICODE_INSERT in mathed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34351 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 22:23:19 +00:00
Vincent van Ravesteijn
b24862e754 Correctly enable/disable the filter label and textfield in the TocWidget. Also, shorten the code a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34350 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 15:56:54 +00:00
Vincent van Ravesteijn
d7b4aacb2e Compile fix for r34348.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34349 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 15:37:19 +00:00
Vincent van Ravesteijn
708b73cab7 Fix bug #3900: Mathed corners displayed without mouse hover.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34348 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:55:37 +00:00
Vincent van Ravesteijn
4c611e5745 Mouse hover property should be dependent on the specific bufferview. If there are 2 views showing the same buffer, an Inset can be shown as hovered in only one view.
This is also in preparation of a decent fix for bug #3900.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34347 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:47:46 +00:00
Vincent van Ravesteijn
0833a4a94c Fix bug #6677: GUI button disappears in external template inset.
Initialize the preview_mode variable.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34346 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 14:11:46 +00:00
Jürgen Spitzmüller
4a4d7a57f2 * GuiSpellchecker.cpp: fix bug 6676.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34345 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 09:52:00 +00:00
Enrico Forestieri
a03faee92d There is no reason for inhibiting the symbols dialog in mathed.
The dialog only offers symbols defined in the unicodesymbols file
and they will be wrapped in \text{} when inserted in math mode,
so there is no risk that an untypesettable symbol gets inserted.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34344 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-30 08:27:03 +00:00
Pavel Sanda
b3870eac50 typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34338 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 21:50:06 +00:00
Pavel Sanda
11510dbfc7 Unify "* space" into "* Space", its just double work for translators.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34337 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 21:48:10 +00:00
Pavel Sanda
11e7cc2344 Unify QQaud strings.
Inside math toolbars we use "Quadratin". Dunno if this difference is intention.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34336 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 21:48:08 +00:00
Pavel Sanda
ea24773537 Unify Inter-word and Interword space strings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34335 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 21:48:03 +00:00
Enrico Forestieri
ba4e75f11c The character dialog was disabled in r30810 for solving an assertion
due to a missing buffer and because the "dialog is only useful in texted".
The problem with the buffer member has been solved since then, and while
it is true that the character dialog is not much useful in mathed, it
is the only way for coloring only parts of equations. Given that this
would also be a regression with respect to 1.6, I am re-enabling it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34327 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 15:49:00 +00:00
Enrico Forestieri
9b3aadbe22 Don't hardcode Color_math, such that decorations and other math
elements can be drawn in the right color on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34326 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 13:19:09 +00:00
Enrico Forestieri
beb3fa70e8 Also account for colors in math macros.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34325 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 11:38:01 +00:00
Vincent van Ravesteijn
6c4de0377c Fix bug #6614: Preview Other Format Button Greys Out After Preview.
getStatus() returns false for LFUN_BUFFER_VIEW when a previewing process is running. So, if this process has finished we should free the menu item. 

P.S. on windows, the item does not get disabled anyway.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34324 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 04:51:05 +00:00
Vincent van Ravesteijn
25a41486d6 Fix bug #6619 : Display (Version Control) in Window Title.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34323 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 04:27:10 +00:00
Enrico Forestieri
d9bcbe5de6 Index: src/mathed/InsetMathEnsureMath.cpp
===================================================================
--- src/mathed/InsetMathEnsureMath.cpp	(revisione 34304)
+++ src/mathed/InsetMathEnsureMath.cpp	(copia locale)
@@ -13,8 +13,9 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathStream.h"
 #include "MathData.h"
+#include "MathStream.h"
+#include "MathSupport.h"
 
 #include <ostream>
 
@@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() con
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-	FontSetChanger dummy(mi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+	FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
 	cell(0).metrics(mi, dim);
 	metricsMarkers(dim);
 }
@@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(Metric
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-	FontSetChanger dummy(pi.base, "mathnormal");
+	bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+	FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
 	cell(0).draw(pi, x, y);
 	drawMarkers(pi, x, y);
 }


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34321 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:58:11 +00:00
Enrico Forestieri
6c33aa2e5b Index: src/mathed/InsetMathHull.cpp
===================================================================
--- src/mathed/InsetMathHull.cpp	(revisione 34304)
+++ src/mathed/InsetMathHull.cpp	(copia locale)
@@ -328,6 +328,23 @@ docstring InsetMathHull::standardFont()
 }
 
 
+docstring InsetMathHull::standardColor() const
+{
+	docstring color;
+	switch (type_) {
+	case hullRegexp:
+		color = from_ascii("foreground");
+		break;
+	case hullNone:
+		color = from_ascii("foreground");
+		break;
+	default:
+		color = from_ascii("math");
+	}
+	return color;
+}
+
+
 bool InsetMathHull::previewState(BufferView * bv) const
 {
 	if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON) {
@@ -417,8 +434,11 @@ void InsetMathHull::draw(PainterInfo & p
 		return;
 	}
 
+	bool const really_change_color = pi.base.font.color() == Color_none;
+	ColorChanger dummy0(pi.base.font, standardColor(), really_change_color);
 	FontSetChanger dummy1(pi.base, standardFont());
 	StyleChanger dummy2(pi.base, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
+
 	InsetMathGrid::draw(pi, x + 1, y);
 
 	if (numberedType()) {
Index: src/mathed/MathSupport.cpp
===================================================================
--- src/mathed/MathSupport.cpp	(revisione 34311)
+++ src/mathed/MathSupport.cpp	(copia locale)
@@ -653,6 +653,13 @@ bool isMathFont(docstring const & name)
 }
 
 
+bool isTextFont(docstring const & name)
+{
+	fontinfo * f = lookupFont(name);
+	return f && f->color_ == Color_foreground;
+}
+
+
 FontInfo getFont(docstring const & name)
 {
 	FontInfo font;
Index: src/mathed/MathSupport.h
===================================================================
--- src/mathed/MathSupport.h	(revisione 34311)
+++ src/mathed/MathSupport.h	(copia locale)
@@ -51,6 +51,8 @@ bool isFontName(docstring const & name);
 
 bool isMathFont(docstring const & name);
 
+bool isTextFont(docstring const & name);
+
 // converts single cell to string
 docstring asString(MathData const & ar);
 // converts single inset to string
Index: src/mathed/InsetMathHull.h
===================================================================
--- src/mathed/InsetMathHull.h	(revisione 34304)
+++ src/mathed/InsetMathHull.h	(copia locale)
@@ -197,6 +197,8 @@ private:
 	void changeCols(col_type);
 	///
 	docstring standardFont() const;
+	///
+	docstring standardColor() const;
 	/// consistency check
 	void check() const;
 	/// can this change its number of rows?
Index: src/MetricsInfo.cpp
===================================================================
--- src/MetricsInfo.cpp	(revisione 34312)
+++ src/MetricsInfo.cpp	(copia locale)
@@ -235,11 +235,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = name;
 		mb.font = sane_font;
 		augmentFont(mb.font, from_ascii(name));
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (string(name) != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -252,11 +256,15 @@ FontSetChanger::FontSetChanger(MetricsBa
 		save_ = mb;
 		FontSize oldsize = save_.font.size();
 		ColorCode oldcolor = save_.font.color();
+		docstring const oldname = from_ascii(save_.fontname);
 		mb.fontname = to_utf8(name);
 		mb.font = sane_font;
 		augmentFont(mb.font, name);
 		mb.font.setSize(oldsize);
-		mb.font.setColor(oldcolor);
+		if (name != "lyxtex"
+		    && ((isTextFont(oldname) && oldcolor != Color_foreground)
+			|| (isMathFont(oldname) && oldcolor != Color_math)))
+			mb.font.setColor(oldcolor);
 	}
 }
 
@@ -294,17 +302,21 @@ WidthChanger::~WidthChanger()
 //
 /////////////////////////////////////////////////////////////////////////
 
-ColorChanger::ColorChanger(FontInfo & font, string const & color)
-	: Changer<FontInfo, string>(font)
+ColorChanger::ColorChanger(FontInfo & font, docstring const & color,
+			   bool really_change_color)
+	: Changer<FontInfo, ColorCode>(font), change_(really_change_color)
 {
-	save_ = lcolor.getFromLyXName(color);
-	font.setColor(lcolor.getFromLyXName(color));
+	if (change_) {
+		save_ = font.color();
+		font.setColor(lcolor.getFromLyXName(to_utf8(color)));
+	}
 }
 
 
 ColorChanger::~ColorChanger()
 {
-	orig_.setColor(lcolor.getFromLyXName(save_));
+	if (change_)
+		orig_.setColor(save_);
 }
 
 
Index: src/MetricsInfo.h
===================================================================
--- src/MetricsInfo.h	(revisione 34312)
+++ src/MetricsInfo.h	(copia locale)
@@ -222,12 +222,16 @@ public:
 
 
 // temporarily change the used color
-class ColorChanger : public Changer<FontInfo, std::string> {
+class ColorChanger : public Changer<FontInfo, ColorCode> {
 public:
 	///
-	ColorChanger(FontInfo & font, std::string const & color);
+	ColorChanger(FontInfo & font, docstring const & color,
+		     bool really_change_color = true);
 	///
 	~ColorChanger();
+private:
+	///
+	bool change_;
 };
 
 } // namespace lyx


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34320 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-28 01:40:11 +00:00
Enrico Forestieri
c88eaf877e Changing only the shape does not always work. For example,
\mathbb{\underbar{a}} is not correctly rendered on screen.
We really have to change the font set, but not always.
This cannot be done using an "if" statement, as when
the FontSetChanger scope ends, everything is restored,
defeating our change. Thus, this has to be done in the
FontSetChanger class itself. This is easily accomplished
by introducing a boolean with a default value of true
for really changing a font set.
This will also be useful in other cases that I am discovering.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34312 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 21:31:28 +00:00
Enrico Forestieri
dbb5ac93ea The check for Color_math would fail if the font color is changed
in mathed, so implement a strategy which is immune to color changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34311 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 19:23:31 +00:00
Enrico Forestieri
26ebe0865c In mathed, also preserve the color when changing a font set,
otherwise symbols and font changes such as \mathit{a} are not
drawn in the selected color on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34310 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-27 18:46:42 +00:00
Enrico Forestieri
17af3ea8f4 Change only the shape and not the whole font, otherwise constructs
such as \mathbf{\hat{a}} would not be correctly rendered on screen.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34297 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 20:20:49 +00:00
Vincent van Ravesteijn
87623ff478 Fix bug #6141: Scrolling error with insets at top of file.
Fix the regression introduced in r28397 while fixing bug #5573.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34296 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 14:57:27 +00:00
Vincent van Ravesteijn
d2cc4a5b92 Tweak for X11.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34294 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 10:26:06 +00:00
Vincent van Ravesteijn
f8d64b4799 Fix bug #3871: Shortcut to switch from TOC to text pane.
M-o now switches to the TOC pane, and Esc always returns from any DockView to the main window.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34293 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 10:03:09 +00:00
Vincent van Ravesteijn
f65f5be6d7 Fix bug #6451 (last part): Crash when interacting with buffer-dependent dialog with no buffer open.
- First, the comment for isBufferDependent is corrected. It seems that the actual use of this function differs from the comment. As the comment said, I decided to close all dialogs that were buffer dependent, but this didn't seem to be correct for the view source pan, the outliner, and find-and-replace.

- Second, the dialogs that are buffer dependent are now closed, but dockviews are not, except for the spellchecker pane, which really depends on an open buffer, but I can't test that. 

So, please test whether the spellchecker dockviewed window behaves as one expects.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34291 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 02:12:10 +00:00
Vincent van Ravesteijn
28b167bfff Make sure the Table of Contents is always on top in the model combobox of the TocWidget.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34290 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 01:36:24 +00:00
Vincent van Ravesteijn
c6c0559be0 Fix bug #6672 (part 2): Add tooltips to the outliner.
At some point we should implement that the tooltips are only shown when they are not completely shown in the outliner. However, this requires extending the QTreeView class. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34287 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 00:43:08 +00:00
Vincent van Ravesteijn
acff67f259 Fix bug #6672 (part 1): Notes, Footnotes, and Marginals are unnecessarily truncated.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34286 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-25 22:18:46 +00:00
Peter Kümmel
7f09a8b58b cmake: remove recursive call, even if it breaks merged builds with GCC, fix linker error on win32
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34283 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 13:20:28 +00:00
Peter Kümmel
7aecb18f56 cmake: remove recursive call, even if it breaks merged builds with GCC, fix linker error on win32
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34280 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 12:58:17 +00:00
Peter Kümmel
be9fdbcad4 cmake: remove recursive call, even if it breaks merged builds with GCC
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34279 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 12:52:39 +00:00
Vincent van Ravesteijn
0f2e47c4ad Fix bug #6664: InsetInfo: lyxrc information broken.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34278 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 11:46:24 +00:00
Peter Kümmel
38628558a6 cmake: more merged build fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34274 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-23 09:10:35 +00:00
Peter Kümmel
5b75a45bc1 don't forget to pack numpunct_lyx_char_type.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34269 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 22:04:21 +00:00
Vincent van Ravesteijn
6ec5776991 Fix bug #5543: InsetInfo gives wrong result for textclasses.
InsetInfo only returned whether a layout file was available for a class, not whether the LaTeX document class was available.

This might be caused by the maybe misleading name of the "LayoutFileList::haveClass()" function.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34268 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 19:36:03 +00:00
Peter Kümmel
ed05787e41 add new files to Makefile.am.
numpunct_lyx_char_type.h is msvc specific.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34265 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 16:01:23 +00:00
Peter Kümmel
5b916eb7c5 don't pollute the global namespace, move bind and shared_ptr into the lyx scope.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34264 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 15:56:20 +00:00
Peter Kümmel
4654a8bf96 build with GCC
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34263 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 14:40:57 +00:00
Peter Kümmel
e948caf637 build with msvc10. Seems there is a bug in their STL code:
// std::numpunct has a hardcoded dllimport in definition, but we wanna it with 32 bit 
// so we can't import it and must define it but then the compiler complains.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34262 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 14:28:52 +00:00
Peter Kümmel
aaf7bfd231 change was committed by accident.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34261 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 12:02:43 +00:00
Peter Kümmel
21514ad512 Seems boost also includes all std headers. Not including boost therefore produces errors.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34260 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:45:34 +00:00
Peter Kümmel
c9b9748cee msvcUsing "using namespace std" with msvc10 makes also std::tr1::shared_ptr visible and generates conflicts with boost::shared_ptr.
Solution: don't use boost::shared_ptr for msvc10 (could also be extended  to several GCC versions)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34259 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:37:32 +00:00
Peter Kümmel
87c6a4679a at least compile with msvc10.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34258 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:19:49 +00:00
Peter Kümmel
61b2bd5e7f Using "using namespace std" with msvc10 makes also std::tr1::bind visible and generates conflicts with boost::bind.
Solution: don't use boost::bind for msvc10 (could also be extended  to several GCC versions)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34257 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-22 11:16:58 +00:00
Richard Heck
d01dec6dfe UI for XHTML options. I removed the xml line from OutputUi.ui
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34251 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 15:20:31 +00:00
Richard Heck
5678dc566f New XHTML math options. Format change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34250 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 15:18:25 +00:00
Vincent van Ravesteijn
b14ef59db8 Remove boundary parameter from BufferView::coordOffset(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34248 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:12:40 +00:00
Vincent van Ravesteijn
63d24ca3c4 Remove boundary parameter from BufferView::getPos(). The first DocIterator parameter already contains this information.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34247 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 13:03:04 +00:00
Uwe Stöhr
3c957e1bb1 Exporter.cpp: revert r34230 because this interferes with Enrico's new LyXVC feature to setup what LyX should do on export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34246 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:54:08 +00:00
Pavel Sanda
e1cabbf70e Last bits.
Trunk should be funcFileName consistent now.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34245 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:36 +00:00
Pavel Sanda
e5ce07206c BranchList:
*FilenameSuffix -> *FileNameSuffix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34244 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:35 +00:00
Pavel Sanda
88635c7e77 Buffer::getAutosaveFilename -> Buffer::getAutosaveFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34243 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:33 +00:00
Pavel Sanda
bb59d0fd0a support:
isLyXFilename -> isLyXFilename
isValidLaTeXFilename -> isValidLaTeXFileName
isSGMLFilename -> isSGMLFileName

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34242 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:31 +00:00
Pavel Sanda
61fa96cbae Dialog::bufferFilepath -> Dialog::bufferFilePath
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34241 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:30 +00:00
Pavel Sanda
72a6c77a51 support:
frontends:
onlyFilename -> onlyFileName

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34240 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:28 +00:00
Pavel Sanda
266ad9501d DocFileName::unzippedFilename -> DocFileName::unzippedFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34239 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:26 +00:00
Pavel Sanda
9d43d32240 DocFileName.outputFilename -> DocFileName.outputFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34238 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:25 +00:00
Pavel Sanda
41b81f09e1 Forgot these two.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34237 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:23 +00:00
Pavel Sanda
b6a764eef3 FileName.mangledFilename -> FileName.mangledFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34236 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:22 +00:00
Pavel Sanda
e5fc2cbdc6 Filename.relFilename -> Filename.relFileName
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34235 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:20 +00:00
Pavel Sanda
62ca7f3ae5 Proper camel case for FileName.absFilename
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34234 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-21 01:19:09 +00:00
Uwe Stöhr
893a4d082b Exporter.cpp: make overwriting file on export the default, as discussed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34230 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-20 23:00:05 +00:00
Enrico Forestieri
3f87d9056d Fix bug #2844: Need option to overwrite without dialog popup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34229 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-20 16:49:49 +00:00
Enrico Forestieri
cb6208f8e5 Coding style
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34228 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-20 11:09:51 +00:00
Jürgen Spitzmüller
85dae058eb * GuiThesaurus: do not show irritating messages if nothing is to be looked up.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34227 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-20 09:59:16 +00:00
Jürgen Spitzmüller
272e7097f2 * Thesaurus.cpp: fix thesaurus (bug #6656)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34226 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-20 07:30:58 +00:00
Enrico Forestieri
b121ac47c6 Introduce a switch for overwriting files during a batch export.
Using "-f all", or simply "-f", all files are silently overwritten.
Using "-f main", only the main file is overwritten.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34224 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 23:53:23 +00:00
Vincent van Ravesteijn
1df3f70ed1 Fix more of bug #5446: Enable to copy the contents of an InsetInfo through the context menu.
This introduces a new LFUN LFUN_INSET_COPY_AS, which copies a certain Inset to the clipboard. For InsetInfo this is the text that is visible, but this could also replace LFUN_LABEL_COPY_AS_REF, by copying the INSET to the clipboard as a reference, and also a Math inset to copy to the clipboard as latex (including $'s or \[..\]).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34223 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 21:36:32 +00:00
Enrico Forestieri
87caf487e1 Extend Alert::prompt such that 4 buttons are possible. Thus, when
exporting, the extra dialog appearing when choosing to overwrite a
file is not necessary anymore.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34222 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 20:44:57 +00:00
Enrico Forestieri
30792f994e QThreadPool was introduced in Qt 4.4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34221 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 19:55:15 +00:00
Vincent van Ravesteijn
0b92e538d9 Use the AtPoint mechanism for the LFUN_INSET_EDIT and LFUN_LABEL_COPY_AS_REF.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34220 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 17:11:43 +00:00
Vincent van Ravesteijn
12a6a0774e Fix bug #6661: Outliner filter bar should not be case sensitive.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34219 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-19 16:05:40 +00:00
Pavel Sanda
baf3cc15e1 Add Skim to hints.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34217 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 23:52:08 +00:00
Vincent van Ravesteijn
ec862d10da Better(?) fix for bug #6659: InsetInfo context menu disabled unless cursor immediately in front.
(see r34215 for the previous fix.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34216 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 23:47:11 +00:00
Vincent van Ravesteijn
ce4d5f22f8 Fix bug #6659: InsetInfo context menu disabled unless cursor immediately in front.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34215 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 23:35:59 +00:00
Richard Heck
2903300277 Add some debugging code so we can try to get information about an
assertion here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34213 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 23:05:12 +00:00
Richard Heck
6d7788fde0 Stupid, stupid, stupid.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34210 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 22:21:21 +00:00
Richard Heck
cde948177b Remove unneeded code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34207 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 21:19:08 +00:00
Richard Heck
287612cfba A final bit of cleanup with the TextClass reading functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34206 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 21:06:38 +00:00
Richard Heck
6d7cffbd71 A little more cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34205 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 20:42:04 +00:00
Richard Heck
d0b52ce0aa Minor fixes to TextClass::read().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34204 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 20:37:07 +00:00
Enrico Forestieri
d356d7d4f7 Add forward search hint for evince.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34202 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 12:44:58 +00:00
Edwin Leuven
5485f39539 new buffer on double click in empty area of the tab bar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34201 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-18 11:30:20 +00:00