summaryrefslogtreecommitdiff
blob: ac040ab0c037089ab1f04ecb71fa4835f58b1c18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
diff --git a/src/Format.cpp b/src/Format.cpp
index 050af14..7d495b7 100644
--- a/src/Format.cpp
+++ b/src/Format.cpp
@@ -260,6 +260,27 @@ void Formats::setEditor(string const & name, string const & command)
 }
 
 
+bool Formats::viewURL(docstring const & url) {
+	Format const * format = getFormat("html");
+	if (!format)
+		return false;
+
+	string command = libScriptSearch(format->viewer());
+
+	if (!contains(command, token_from_format))
+		command += ' ' + token_from_format;
+	command = subst(command, token_from_format, quoteName(to_utf8(url)));
+
+	LYXERR(Debug::FILES, "Executing command: " << command);
+
+	Systemcall one;
+	one.startscript(Systemcall::DontWait, command);
+
+	// we can't report any sort of error, since we aren't waiting
+	return true;
+}
+
+
 bool Formats::view(Buffer const & buffer, FileName const & filename,
 		   string const & format_name) const
 {
diff --git a/src/Format.h b/src/Format.h
index 445c11b..3737f4c 100644
--- a/src/Format.h
+++ b/src/Format.h
@@ -143,6 +143,8 @@ public:
 	void setViewer(std::string const & name, std::string const & command);
 	///
 	void setEditor(std::string const & name, std::string const & command);
+	/// Currently used by hyperlink insets and GuiCitation
+	bool viewURL(docstring const & url);
 	/// View the given file. Buffer used for DVI's paper orientation.
 	bool view(Buffer const & buffer, support::FileName const & filename,
 		  std::string const & format_name) const;
diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp
index 42dd691..7a293ff 100644
--- a/src/insets/InsetHyperlink.cpp
+++ b/src/insets/InsetHyperlink.cpp
@@ -100,7 +100,10 @@ bool InsetHyperlink::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetHyperlink::viewTarget() const
 {
-	if (getParam("type") == "file:") {
+	if (getParam("type").empty()) 
+		formats.viewURL(getParam("target"));
+
+	else if (getParam("type") == "file:") {
 		FileName url = makeAbsPath(to_utf8(getParam("target")), buffer().filePath());
 		string const format = formats.getFormatFromFile(url);
 		formats.view(buffer(), url, format);
diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc
index a8cf62e..8086b7f 100644
--- a/lib/ui/stdcontext.inc
+++ b/lib/ui/stdcontext.inc
@@ -601,6 +601,8 @@ Menuset
 #
 	Menu "context-hyperlink"
 		Item "Settings...|S" "inset-settings"
+		Separator
+		Item "Open Target...|O" "inset-edit"
 	End
 
 End
diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 88d84d2..f2cb35a 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -384,6 +384,7 @@ Menuset
 		Item "Breakable Slash|a" "specialchar-insert slash"
 		Item "Menu Separator|M" "specialchar-insert menu-separator"
 		Item "Phonetic Symbols|P" "command-sequence math-insert \text\textipa ; char-forward ;"
+		Item "Visible Space|V" "unicode-insert 0x2423"
 	End
 
 	Menu "insert_formatting"
diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py
index be242cc..3125006 100644
--- a/lib/scripts/legacy_lyxpreview2ppm.py
+++ b/lib/scripts/legacy_lyxpreview2ppm.py
@@ -172,11 +172,18 @@ def legacy_latex_file(latex_file, fg_color, bg_color, bg_color_gr):
     use_preview_dvi_re = re.compile("(\s*\\\\usepackage\[[^]]+)(dvips\]{preview})")
     use_preview_pdf_re = re.compile("(\s*\\\\usepackage\[[^]]+)(pdftex\]{preview})")
 
+    do_not_color_pictures_re = re.compile("(\\includegraphics)")
+
     tmp = mkstemp()
 
     success = 0
     try:
         for line in open(latex_file, 'r').readlines():
+            match = do_not_color_pictures_re.search(line)
+            if match != None:
+               tmp.write("\colorbox{white}{" + line + "}\n")
+               continue
+
             match = use_preview_dvi_re.match(line)
             if match == None:
                 match = use_preview_pdf_re.match(line)
@@ -192,7 +199,7 @@ def legacy_latex_file(latex_file, fg_color, bg_color, bg_color_gr):
 
             success = 1
             tmp.write("%stightpage,%s\n" \
-                      "  \\AtBeginDocument{\\AtBeginDvi{%%\n" \
+                      "  \\usepackage{color}\n\\AtBeginDocument{\\AtBeginDvi{%%\n" \
                       "  \\special{!userdict begin/bop-hook{//bop-hook exec\n" \
                       "  <%s%s>{255 div}forall setrgbcolor\n" \
                       "  clippath fill setrgbcolor}bind def end}}}\n" \
Index: stdinsets.inc
===================================================================
--- a/lib/layouts/stdinsets.inc	(revision 28602)
+++ a/lib/layouts/stdinsets.inc	(working copy)
@@ -166,7 +166,7 @@
 	  Family              typewriter
 	EndFont
 	LabelFont
-	  Color               foreground
+	  Color               latex
 	  Size                Small
 	EndFont
 	BgColor               listingsbg
diff --git a/lib/ui/default.ui b/lib/ui/default.ui
index 03efe16..32e9efc 100644
--- a/lib/ui/default.ui
+++ b/lib/ui/default.ui
@@ -46,13 +46,13 @@ Include "stdtoolbars.inc"
 #
 Toolbars
 	"standard" "on,top"
-	"view/update" "on,top"
+	"view/update" "off,top"
 	"extra" "on,top,samerow"
 	"review" "auto,review,top"
-	"vcs" "off,top"
+	"vcs" "on,top"
 	"table" "auto,table,bottom"
 	"math_panels" "auto,math,bottom"
 	"math" "auto,math,bottom"
 	"mathmacrotemplate" "auto,mathmacrotemplate,bottom"
-	"minibuffer" "off,bottom"
+	"minibuffer" "on,bottom"
 End
Index: lib/ui/stdtoolbars.inc
===================================================================
--- a/lib/ui/stdtoolbars.inc	(revision 29259)
+++ b/lib/ui/stdtoolbars.inc	(working copy)
@@ -91,6 +91,8 @@
 		Item "Increase depth" "depth-increment"
 		Item "Decrease depth" "depth-decrement"
 		Separator
+		Item "Align center" "paragraph-params \align center"
+		Separator
 		Item "Insert figure float" "float-insert figure"
 		Item "Insert table float" "float-insert table"
 		Item "Insert label" "label-insert"
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index ea08213..e29cc7f 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -1623,9 +1623,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
 
 	case LFUN_BUFFER_RELOAD:
 		enable = doc_buffer && !doc_buffer->isUnnamed()
-			&& doc_buffer->fileName().exists()
-			&& (!doc_buffer->isClean()
-			   || doc_buffer->isExternallyModified(Buffer::timestamp_method));
+			&& doc_buffer->fileName().exists();
 		break;
 
 	case LFUN_BUFFER_CHILD_OPEN:
Index: src/frontends/qt4/GuiApplication.cpp
===================================================================
--- a/src/frontends/qt4/GuiApplication.cpp	(revision 31877)
+++ b/src/frontends/qt4/GuiApplication.cpp	(working copy)
@@ -708,7 +708,8 @@
 	QString app_name = "LyX";
 	QCoreApplication::setOrganizationName(app_name);
 	QCoreApplication::setOrganizationDomain("lyx.org");
-	QCoreApplication::setApplicationName(lyx_package);
+	//make portage build LyX.conf without interefence to devel tweaks...
+	QCoreApplication::setApplicationName("LyX");
 
 	// Install translator for GUI elements.
 	installTranslator(&d->qt_trans_);
diff --git a/src/frontends/qt4/GuiCompleter.cpp b/src/frontends/qt4/GuiCompleter.cpp
index 89a889d..ac5088f 100644
--- a/src/frontends/qt4/GuiCompleter.cpp
+++ b/src/frontends/qt4/GuiCompleter.cpp
@@ -165,7 +165,7 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent)
 	model_ = new GuiCompletionModel(this, 0);
 	setModel(model_);
 	setCompletionMode(QCompleter::PopupCompletion);
-	setCaseSensitivity(Qt::CaseSensitive);
+	setCaseSensitivity(Qt::CaseInsensitive);
 	setWidget(gui_);
 	
 	// create the popup
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 04c5b82..a127b0e 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -29,6 +29,7 @@
 #include "Encoding.h"
 #include "Exporter.h"
 #include "FuncRequest.h"
+#include "LyX.h"
 #include "FuncStatus.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
@@ -1277,6 +1278,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
 		break;
 
 	case LFUN_BREAK_PARAGRAPH:
+		lyx::dispatch(FuncRequest(LFUN_MATH_EXTERN, "maxima"));
 		// just swallow this
 		break;
 
diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp
index bcbf6da..0173a8d 100644
--- a/src/rowpainter.cpp
+++ b/src/rowpainter.cpp
@@ -888,8 +888,8 @@ void RowPainter::paintText()
 
 		// If we reach the end of a change or if the author changes, paint it.
 		// We also don't paint across things like tables
-		if (change_running.changed() && (highly_editable_inset
-			|| !change.changed() || !change_running.isSimilarTo(change))) {
+		if (change_running.changed() && (
+			 !change.changed() || !change_running.isSimilarTo(change))) {
 			// Calculate 1/3 height of the buffer's default font
 			FontMetrics const & fm
 				= theFontMetrics(pi_.base.bv->buffer().params().getFont());
diff --git a/src/frontends/qt4/GuiKeySymbol.cpp b/src/frontends/qt4/GuiKeySymbol.cpp
index b318430..5ec58c4 100644
--- a/src/frontends/qt4/GuiKeySymbol.cpp
+++ b/src/frontends/qt4/GuiKeySymbol.cpp
@@ -341,6 +341,7 @@ static int string_to_qkey(std::string const & str)
 	if (str == "yacute") return Qt::Key_Yacute;
 	if (str == "thorn") return Qt::Key_THORN;
 	if (str == "ydiaeresis") return Qt::Key_ydiaeresis;
+	if (str == "Dead_Caron") return Qt::Key_Dead_Caron;
 
 	// FIXME, correct for all these ?
 	if (str == "Super_L") return Qt::Key_Super_L;
@@ -559,6 +560,7 @@ static std::string const qkey_to_string(int lkey)
 	case Qt::Key_ssharp: return "ssharp";
 	case Qt::Key_ydiaeresis: return "ydiaeresis";
 	case Qt::Key_Bar: return "bar";
+	case Qt::Key_Dead_Caron: return "Dead_Caron";
 
 	// FIXME: these ones I don't know the names of ... help !
 	// what's here is basically guesses ...