Re: Updates to gitolite progress

2012-03-06 Thread Lars Gullik Bjønnes
Vincent van Ravesteijn v...@lyx.org writes:

| Op 5-3-2012 1:03, Lars Gullik Bjønnes schreef:
 I have added some more gitolite functionality.
 (only viewable for the people that has sent me their ssh public key.)

 ssh g...@git.lyx.org help

 You will not be able to fork anything yet, but as you can see at

 http://git.lyx.org/

| Browsing the repos seems to be broken right now.

I have not seen that.



 this is basically what it will look like.

 The plan forward is:

 1. Get the required hooks in place
- This is mostly the post-commit (post-receive really) hook that
 sends messages to lyx-...@lists.lyx.org

 2. See if we can get the trac connection setup.
- Should just be config, and a another hook to get updates to
 the repo signaled to trac.

 3. Cleanup and verify the svn-git conversion that I already have in place.
- Unless I have to redo anything this will be quite easy.

 4. Make the subversion repo read-only

 5. Enable the new lyx-devel git repo at git.lyx.org.

 I might be able to do this within the week.

 Comments or objections to the plan forward?

| We need to agree on how the workflow will be in the future.

I'll answer this in more detail later, but as a starting point I want to
say:

Be very wary of changing the process too much from what we have now.

-- 
   Lgb



Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Richard Heck wrote:
 All you need to do is produce something similar for IPA. Probably for 
 IPA you would use unicode-insert, followed by the codepoint. E.g.:
 unicode-insert 0x0251
 gets you: ɑ.

Something like this can be done inside the new IPA inset (and indeed also 
inside the old math-tipa with 2.0). However, currently the output will be 
flawed with this method (same as if your insert unicode IPA symbols outside 
the inset, with the improvement that the ascii glyphs will be taken from the 
IPA font not the main text font). You'll get something like

\textipa{\textepsilon{}kspl\textschwa{}ne\textsci{}\textesh{}\textschwa{}n}

which is not only hardly readable (due to the macros), but also the kerning is 
broken by the {} which are appended after each macro.

I plan to convert the unicode glyphs to TIPA shortcut notation inside the IPA 
inset (in latex output), i.e. you'll get for the above

\textipa{Ekspl@neIS@n}

Vice versa, this shortcut notation will be converted to unicode for text and 
XHTML output.

As for the toolbar, the plan is to display it automatically when the cursor is 
inside the IPA inset. Carlos, if you can provide icons for the IPA symbols 
(similar to the icons you'll find in lib/images/math), it would help a lot. 
I'll be utterly short of time during the next months.

Jürgen


Re: #8069: View other format button greys out

2012-03-06 Thread Eric Weir

On Mar 6, 2012, at 8:41 AM, LyX Ticket Tracker wrote:

 #8069: View other format button greys out
 ---+-
 Reporter:  Eric Weir  |   Owner:  lasgouttes
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:
 Component:  general| Version:  2.0.3
 Severity:  normal |  Resolution:
 Keywords: |
 ---+-
 
 Comment (by sanda):
 
 can't reproduce (linux here)

Not sure if this is the way to respond/update. Didn't see a way on the website.

iIn any case, my OS is OS X 10.5.6.

--
Eric Weir
Decatur, GA
eew...@bellsouth.net

A man should be in the world as though he were not in it 
so that it will be no worse because of his life. 

- Wendell Berry 



[RFC] [patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
 I plan to convert the unicode glyphs to TIPA shortcut notation inside the
 IPA  inset (in latex output), i.e. you'll get for the above
 
 \textipa{Ekspl@neIS@n}

Attached is an approach for this. I think it is best to record the TIPA 
shortcuts in the unicodesymbols file to prevent code duplication. Since adding 
another column would be overkill for this, I propose to record the shortcut 
via a flag.

Opinions?

Jürgen
Index: lib/unicodesymbols
===
--- lib/unicodesymbols	(Revision 40866)
+++ lib/unicodesymbols	(Arbeitskopie)
@@ -34,6 +34,7 @@
 # - combining This is a combining char that will get combined with a base char
 # - force Always output replacement command
 # - mathalpha This character is considered as a math variable in mathmode
+# - tipashortcut=shortcut Shortcut notation for TIPA
 
 0x00a0 ~  ~  # NO-BREAK SPACE
 0x00a1 \\textexclamdown   # INVERTED EXCLAMATION MARK
@@ -472,7 +473,7 @@
 #
 # IPA extensions
 #
-0x0250 \\textturna  tipa force # LATIN SMALL LETTER TURNED A
+0x0250 \\textturna  tipa force,tipashortcut=5 # LATIN SMALL LETTER TURNED A
 0x0251 \\textscriptatipa force # LATIN SMALL LETTER ALPHA
 0x0252 \\textturnscriptatipa force # LATIN SMALL LETTER TURNED ALPHA
 0x0253 \\texthtbtipa force # LATIN SMALL LETTER B WITH HOOK
Index: src/insets/InsetIPA.cpp
===
--- src/insets/InsetIPA.cpp	(Revision 40874)
+++ src/insets/InsetIPA.cpp	(Arbeitskopie)
@@ -194,8 +194,10 @@
 }
 
 
-void InsetIPA::latex(otexstream  os, OutputParams const  runparams) const
+void InsetIPA::latex(otexstream  os, OutputParams const  runparams_in) const
 {
+	OutputParams runparams(runparams_in);
+	runparams.inIPA = true;
 	bool const multipar = (text().paragraphs().size()  1);
 	// fontspec knows \textipa, but not the IPA environment
 	bool const nontexfonts = buffer_-params().useNonTeXFonts;
Index: src/OutputParams.h
===
--- src/OutputParams.h	(Revision 40866)
+++ src/OutputParams.h	(Arbeitskopie)
@@ -198,6 +198,11 @@
 	 */
 	bool inIndexEntry;
 
+	/** Whether we are inside an IPA inset.
+	 *  Needed for proper IPA output.
+	 */
+	bool inIPA;
+
 	/** Whether we are inside an inset that is logically deleted.
 	 *  A value  0 indicates a deleted inset.
  */
Index: src/Paragraph.cpp
===
--- src/Paragraph.cpp	(Revision 40866)
+++ src/Paragraph.cpp	(Arbeitskopie)
@@ -1262,13 +1262,21 @@
 			}
 		}
 		string script;
-		docstring const latex = encoding.latexChar(c);
+		docstring latex = encoding.latexChar(c);
+		bool tipas = false;
+		if (runparams.inIPA) {
+			string const tipashortcut = Encodings::TIPAShortcut(c);
+			if (!tipashortcut.empty()) {
+latex = from_ascii(tipashortcut);
+tipas = true;
+			}
+		}
 		if (Encodings::isKnownScriptChar(c, script)
 		 prefixIs(latex, from_ascii(\\ + script)))
 			column += writeScriptChars(os, latex,
 	running_change, encoding, i) - 1;
 		else if (latex.length()  1  latex[latex.length() - 1] != '}' 
-		 latex[latex.length() - 1] != '-') {
+			 latex[latex.length() - 1] != '-'  !tipas) {
 			// Prevent eating of a following
 			// space or command corruption by
 			// following characters
Index: src/OutputParams.cpp
===
--- src/OutputParams.cpp	(Revision 40866)
+++ src/OutputParams.cpp	(Arbeitskopie)
@@ -25,7 +25,7 @@
 	  use_indices(false), use_japanese(false), linelen(0), depth(0),
 	  exportdata(new ExportData),
 	  inComment(false), inTableCell(NO), inFloat(NONFLOAT),
-	  inIndexEntry(false), inDeletedInset(0),
+	  inIndexEntry(false), inIPA(false), inDeletedInset(0),
 	  changeOfDeletedInset(Change::UNCHANGED),
 	  par_begin(0), par_end(0), lastid(-1), lastpos(-1), isLastPar(false),
 	  dryrun(false), pass_thru(false), 
Index: src/Encoding.cpp
===
--- src/Encoding.cpp	(Revision 40866)
+++ src/Encoding.cpp	(Arbeitskopie)
@@ -249,6 +249,8 @@
 	/// Always force the LaTeX command, even if the encoding contains
 	/// this character?
 	bool force;
+	/// TIPA shortcut
+	string tipashortcut;
 };
 
 
@@ -685,6 +687,15 @@
 }
 
 
+string const Encodings::TIPAShortcut(char_type c)
+{
+	CharInfoMap::const_iterator const it = unicodesymbols.find(c);
+	if (it != unicodesymbols.end())
+		return it-second.tipashortcut;
+	return string();
+}
+
+
 bool Encodings::isKnownScriptChar(char_type const c, string  preamble)
 {
 	CharInfoMap::const_iterator const it = unicodesymbols.find(c);
@@ -797,6 +808,8 @@
 forced.insert(symbol);
 			} else if (flag == mathalpha) {
 mathalpha.insert(symbol);
+			} else if (contains(flag, tipashortcut=)) {
+info.tipashortcut = 

Re: r40873 - in lyx-devel/trunk: po src

2012-03-06 Thread Julien Rioux
On Tue, Mar 6, 2012 at 4:41 AM, kor...@lyx.org wrote:

 Author: kornel
 Date: Tue Mar  6 10:41:41 2012
 New Revision: 40873
 URL: http://www.lyx.org/trac/changeset/40873

 Log:
 Handling of libmagic for some mime-types leads to incorrect value
 'text/plain'.

 Modified:
   lyx-devel/trunk/po/diff_po.pl
   lyx-devel/trunk/src/Format.cpp

 Modified: lyx-devel/trunk/po/diff_po.pl


Are the changes to diff_po.pl really intended?

--
Julien


[another patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
 \textipa{\textepsilon{}kspl\textschwa{}ne\textsci{}\textesh{}\textschwa{}n}
 
 which is not only hardly readable (due to the macros), but also the kerning
 is  broken by the {} which are appended after each macro.

The kerning problem is addressed by the attached patch (which is on top of the 
other, as you can see). It assures the '{}' are only appended when needed (if 
a space follows). If a normal character follows, a blank is appended, if a 
macro follows, nothing is appended. So you get:

\textipa{\textepsilon kspl\textschwa ne\textsci\textesh\textschwa n}

which is the correct output.

JürgenIndex: src/Paragraph.cpp
===
--- src/Paragraph.cpp	(Revision 40866)
+++ src/Paragraph.cpp	(Arbeitskopie)
@@ -1253,8 +1253,9 @@
 			return;
 
 		Encoding const  encoding = *(runparams.encoding);
+		char_type next = '\0';
 		if (i + 1  int(text_.size())) {
-			char_type next = text_[i + 1];
+			next = text_[i + 1];
 			if (Encodings::isCombiningChar(next)) {
 column += latexSurrogatePair(os, c, next, runparams) - 1;
 ++i;
@@ -1262,18 +1263,31 @@
 			}
 		}
 		string script;
-		docstring const latex = encoding.latexChar(c);
+		docstring latex = encoding.latexChar(c);
+		docstring nextlatex = (next == '\0') ? docstring(): encoding.latexChar(next);
+		bool tipas = false;
+		if (runparams.inIPA) {
+			string const tipashortcut = Encodings::TIPAShortcut(c);
+			if (!tipashortcut.empty()) {
+latex = from_ascii(tipashortcut);
+tipas = true;
+			}
+		}
 		if (Encodings::isKnownScriptChar(c, script)
 		 prefixIs(latex, from_ascii(\\ + script)))
 			column += writeScriptChars(os, latex,
 	running_change, encoding, i) - 1;
-		else if (latex.length()  1  latex[latex.length() - 1] != '}' 
-		 latex[latex.length() - 1] != '-') {
+		else if (!prefixIs(nextlatex, from_ascii(\\))
+			  latex.length()  1  latex[latex.length() - 1] != '}'
+			  latex[latex.length() - 1] != '-'  !tipas) {
 			// Prevent eating of a following
 			// space or command corruption by
 			// following characters
 			column += latex.length() + 1;
-			os  latex  {};
+			if (next == ' ' || next == '\0')
+os  latex  {};
+			else
+os  latex   ;
 		} else {
 			column += latex.length() - 1;
 			os  latex;


Re: lists subscriber only?

2012-03-06 Thread Jean-Marc Lasgouttes

Le 06/03/2012 18:15, Wierdl Máté a écrit :

Dear developers!

What do the developers say, if I made the users subscribers only,
meaning only subscribers would post? The post below went to the users'
list, and got caught in a junkmailfilter.  Stuff like this is a
problem for the University here.  They are talking about asking me to
host the lists on their servers using their list manager.


Having the list subscriber only is a bit annoying. I thought we had 
TDMA, isn't it efficient?


Also, I see that the message is flagged by SpamAssasin, isn't there a 
way to filter it as spam?


I understand however your concerns with respect to the university.

JMarc


Re: Re: r40873 - in lyx-devel/trunk: po src

2012-03-06 Thread Kornel Benko
Am Dienstag, 6. März 2012 um 12:00:42, schrieb Julien Rioux jri...@lyx.org
 On Tue, Mar 6, 2012 at 4:41 AM, kor...@lyx.org wrote:

  Author: kornel
  Date: Tue Mar  6 10:41:41 2012
  New Revision: 40873
  URL: http://www.lyx.org/trac/changeset/40873
 
  Log:
  Handling of libmagic for some mime-types leads to incorrect value
  'text/plain'.
 
  Modified:
lyx-devel/trunk/po/diff_po.pl
lyx-devel/trunk/src/Format.cpp
 
  Modified: lyx-devel/trunk/po/diff_po.pl
 
 
 Are the changes to diff_po.pl really intended?

 --
 Julien

No, they came in by accident :(
OTOH, it helps me to commit only minimal changes on the po, although I am 
manipulating re-merged version.

Kornel

signature.asc
Description: This is a digitally signed message part.


Import/Export Error Information (word2lyx)

2012-03-06 Thread Rob Oakes
Dear Developers,

I'm getting ready to publish the source for Word2LyX, but ran into one
last problem. I created an input filter/filetype to completely automate
the conversion of Word documents.

However, when run, I'm getting an error:

An error occurred while running:

python inputfile.docx outputfile.lyx

Is there any way to look at the debug output to try and track what might
be causing the error.

Cheers,

Rob


Re: Import/Export Error Information (word2lyx)

2012-03-06 Thread Richard Heck

On 03/06/2012 01:23 PM, Rob Oakes wrote:

Dear Developers,

I'm getting ready to publish the source for Word2LyX, but ran into one
last problem. I created an input filter/filetype to completely automate
the conversion of Word documents.

However, when run, I'm getting an error:

An error occurred while running:

python inputfile.docx outputfile.lyx

Is there any way to look at the debug output to try and track what might
be causing the error.

If that's the error, then the problem looks to be a missing command. 
You're asking python to run the docx file. I'd check the definition of 
the converter.


The file format and the definition of the converter should probably 
happen within LyX, anyway. I'll be happy to add this to 2.0.4.


Richard



ESC cancels long Find operations (was: Re: #7217: performance issue with advanced find and replace dialog)

2012-03-06 Thread Tommaso Cucinotta

Il 10/05/2011 13:30, LyX Ticket Tracker ha scritto:

I think that the possibility to cancel the search with ESC is a
  good feature. Please send it to the lyx-devel list for discussion.


I made a quick update of the patch on the current branch, and here it 
is, just in case you like having it in for 2.0.4.


Among issues that might be related to the lack of this feature, we have:
-) http://www.lyx.org/trac/ticket/7965
-) http://www.lyx.org/trac/ticket/7217
(just replaced the patch attached to the ticket with this one I'm 
sending)


Bye,

Tommaso
Index: src/lyxfind.cpp
===
--- src/lyxfind.cpp	(revisione 40874)
+++ src/lyxfind.cpp	(copia locale)
@@ -1133,12 +1133,12 @@
 {
 	if (!cur)
 		return 0;
-	while (cur) {
+	while (!theApp()-longOperationCancelled()  cur) {
 		LYXERR(Debug::FIND, findForwardAdv() cur:   cur);
 		int match_len = match(cur, -1, false);
 		LYXERR(Debug::FIND, match_len:   match_len);
 		if (match_len) {
-			for (; cur; cur.forwardPos()) {
+			for (; !theApp()-longOperationCancelled()  cur; cur.forwardPos()) {
 LYXERR(Debug::FIND, Advancing cur:   cur);
 int match_len = match(cur);
 LYXERR(Debug::FIND, match_len:   match_len);
@@ -1235,7 +1235,7 @@
 		else
 			cur.backwardPos();
 		pit_changed = true;
-	} while (true);
+	} while (!theApp()-longOperationCancelled());
 	return 0;
 }
 
Index: src/frontends/Application.h
===
--- src/frontends/Application.h	(revisione 40874)
+++ src/frontends/Application.h	(copia locale)
@@ -239,6 +239,14 @@
 	/// Handle a accented char key sequence
 	/// FIXME: this is only needed for LFUN_ACCENT_* in Text::dispatch()
 	virtual void handleKeyFunc(FuncCode action) = 0;
+
+	/// Start a long operation with some cancel possibility (button or ESC)
+	virtual void startLongOperation() = 0;
+	/// This needs to be periodically called to avoid freezing the GUI
+	virtual bool longOperationCancelled() = 0;
+	/// Stop the long operation mode (i.e., release the GUI)
+	virtual void stopLongOperation() = 0;
+
 };
 
 /// Return the list of loadable formats.
Index: src/frontends/qt4/GuiApplication.cpp
===
--- src/frontends/qt4/GuiApplication.cpp	(revisione 40874)
+++ src/frontends/qt4/GuiApplication.cpp	(copia locale)
@@ -80,12 +80,14 @@
 #include QClipboard
 #include QDateTime
 #include QDir
+#include QEvent
 #include QEventLoop
 #include QFileOpenEvent
 #include QFileInfo
 #include QHash
 #include QIcon
 #include QImageReader
+#include QKeyEvent
 #include QLocale
 #include QLibraryInfo
 #include QList
@@ -98,6 +100,7 @@
 #include QRegExp
 #include QSessionManager
 #include QSettings
+#include QShowEvent
 #include QSocketNotifier
 #include QSortFilterProxyModel
 #include QStandardItemModel
@@ -675,6 +678,43 @@
 
 #endif // Q_WS_WIN
 
+
+/// Allows to check whether ESC was pressed during a long operation
+class KeyChecker : public QObject {
+private:
+	bool pressed_;
+public:
+	KeyChecker() {
+		pressed_ = false;
+	}
+	void start() {
+		QCoreApplication::instance()-installEventFilter(this);
+		pressed_ = false;
+	}
+	void stop() {
+		QCoreApplication::instance()-removeEventFilter(this);
+	}
+	bool pressed() {
+		QCoreApplication::processEvents();
+		return pressed_;
+	}
+	bool eventFilter(QObject *obj, QEvent *event) {
+		LYXERR(Debug::ACTION, Event Type:   event-type());
+		switch (event-type()) {
+		case QEvent::Show:
+		case QEvent::Hide:
+		case QEvent::Resize:
+			return QObject::eventFilter(obj, event);
+		default:
+			QKeyEvent *keyEvent = dynamic_castQKeyEvent*(event);
+			if (keyEvent  keyEvent-key() == Qt::Key_Escape)
+pressed_ = true;
+			return true;
+		}
+	}
+};
+
+
 
 // GuiApplication::Private definition and implementation.
 
@@ -752,6 +792,9 @@
 	/// WMF Mime handler for Windows clipboard.
 	QWindowsMimeMetafile * wmf_mime_;
 #endif
+
+	/// Allows to check whether ESC was pressed during a long operation
+	KeyChecker key_checker_;
 };
 
 
@@ -2529,6 +2572,21 @@
 }
 
 
+void GuiApplication::startLongOperation() {
+	d-key_checker_.start();
+}
+
+
+bool GuiApplication::longOperationCancelled() {
+	return d-key_checker_.pressed();
+}
+
+
+void GuiApplication::stopLongOperation() {
+	d-key_checker_.stop();
+}
+
+
 
 //
 // X11 specific stuff goes here...
Index: src/frontends/qt4/FindAndReplace.cpp
===
--- src/frontends/qt4/FindAndReplace.cpp	(revisione 40874)
+++ src/frontends/qt4/FindAndReplace.cpp	(copia locale)
@@ -294,6 +294,8 @@
 	oss  opt;
 	FuncRequest cmd(LFUN_WORD_FINDADV, from_utf8(oss.str()));
 
+	view_.message(_(Advanced search started: please wait . . .));
+	

Re: LyX 2.0.3 Released

2012-03-06 Thread stefano franchi
On Mon, Mar 5, 2012 at 7:34 PM, Richard Heck rgh...@comcast.net wrote:
 On 03/05/2012 06:50 PM, stefano franchi wrote:

 Speaking of endnotes, what I haven't been able to find out, instead,
 is how to have two have features often found in Humanities books:

 1. Running headers for the endnotes that says (automatically, of
 course) Notes for pages nnn-mmm where nnn and mmm are the page
 numbers of the page of text in which the first (respectively, last)
 endnote of the current spread appears.

 This kind of thing is going to be tricky. Have you asked on comp.text.tex?
 Someone there
 will almost certainly know how to do it. Whatever the solution, it will
 involve the \addtoendnotes command, that one can use to write page
 information to the endnotes file. The hard part will be how to figure out
 what page the LAST endnote on the page is for.



I haven't really looked into it. It is just something I'll like to
learn sooner or later, because I can tell I will eventually need it. I
do agree that the tex gurus on comp.text.tex would probably know how
to handle it.


 2. unnumbered endnotes, where the marker of the note is invisible in
 the text (i.e. there is no marker), and is made up of the last 3 or 4
 words before the endnote marker in the endnote itself. For instance,
 you may have a sentence such as:

 This is a sentence I just made up to illustrate some
 Humanities-specific way of using endnotes without using markers in the
 text itself

 And the endnote could be something like:

 iwithout using markers/i  Some Humanities publishers really
 dislike endnotes and footnotes and will only accept them if the text
 appears not to have any. See, for instance, the following books...

 This one looks bad. I doubt it's possible to recover the previous text. But
 one could mark it more or less like this:
    way of using endnotes \enote{without using markers}{Some Humanities...}
 in the text itself
 and get that to do the right thing, I think. But it would probably involve
 rewriting a lot of the endnote code.


In fact, I guess this one is easier than the previous one. I think
memoir allows pretty much any latex code to serve as endnote marker,
so it is should be possible to work something out. Again, this has
just been in the back of my mind so far.



Cheers,

Stefano





-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas AM University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Re: r40858 - lyx-devel/trunk/lib

2012-03-06 Thread Enrico Forestieri
On Mon, Mar 05, 2012 at 04:45:05PM -0500, Richard Heck wrote:
 On 03/05/2012 12:14 PM, for...@lyx.org wrote:
 Author: forenr
 Date: Mon Mar  5 18:14:09 2012
 New Revision: 40858
 URL: http://www.lyx.org/trac/changeset/40858
 
 Log:
 On Windows, properly account for the encoding of the temporary directory.
 I assume branch needs this too

Backported. What about r40828?

-- 
Enrico


Re: ESC cancels long Find operations

2012-03-06 Thread Richard Heck

On 03/06/2012 03:54 PM, Tommaso Cucinotta wrote:

Il 10/05/2011 13:30, LyX Ticket Tracker ha scritto:

I think that the possibility to cancel the search with ESC is a
  good feature. Please send it to the lyx-devel list for discussion.


I made a quick update of the patch on the current branch, and here it 
is, just in case you like having it in for 2.0.4.


Among issues that might be related to the lack of this feature, we have:
-) http://www.lyx.org/trac/ticket/7965
-) http://www.lyx.org/trac/ticket/7217
(just replaced the patch attached to the ticket with this one I'm 
sending)


I didn't look at it in detail, since I don't understand this stuff very 
well, but it'll be a great thing to have.


Richard



Re: [RFC] [patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Richard Heck

On 03/06/2012 10:18 AM, Jürgen Spitzmüller wrote:

Jürgen Spitzmüller wrote:

I plan to convert the unicode glyphs to TIPA shortcut notation inside the
IPA  inset (in latex output), i.e. you'll get for the above

\textipa{Ekspl@neIS@n}

Attached is an approach for this. I think it is best to record the TIPA
shortcuts in the unicodesymbols file to prevent code duplication. Since adding 
another column would be overkill for this, I propose to record the shortcut via 
a flag.

Opinions?

Looks fine to me. I assume there are lots of other shortcuts that will 
go into that file?


Richard



Extra lines when exporting as plain text

2012-03-06 Thread Andrew Parsloe

Suppose you have a simple LyX document like:

First line.
Second line.
Third line.

and export this as plain text. When viewed in a text editor, it looks like:

First line.

Second line.

Third line.

which seems wrong to me. If I had exported to LaTeX or TeX then the 
blank lines would correctly mark the ends of paragraphs, but in a plain 
text document they are artifacts which shouldn't be there.


When looking at the list of converters in ToolsPreferencesFile 
HandlingConverters I couldn't see a converter producing simply plain 
text. Does that mean the export with the extra lines is part of the LyX 
code base?


Andrew


Re: Extra lines when exporting as plain text

2012-03-06 Thread Richard Heck

On 03/06/2012 05:41 PM, Andrew Parsloe wrote:

Suppose you have a simple LyX document like:

First line.
Second line.
Third line.

and export this as plain text. When viewed in a text editor, it looks 
like:


First line.

Second line.

Third line.

which seems wrong to me. If I had exported to LaTeX or TeX then the 
blank lines would correctly mark the ends of paragraphs, but in a 
plain text document they are artifacts which shouldn't be there.


Plain text export breaks paragraphs with newlines, to keep the lines to 
the right sort of length.

So paragraphs are separated by double newlines.

When looking at the list of converters in ToolsPreferencesFile 
HandlingConverters I couldn't see a converter producing simply plain 
text. Does that mean the export with the extra lines is part of the 
LyX code base?



Yes. It's a backend, like LaTeX or XHTML or DocBook.

Richard



Branch monolithic build no more works

2012-03-06 Thread Pavel Sanda
  CXXliblyxqt4.o
  In file included from liblyxqt4.cpp:23:0:
  GuiBranches.cpp: In member function 'virtual bool 
lyx::frontend::GuiBranches::eventFilter(QObject*, QEvent*)':
  GuiBranches.cpp:83:23: error: expected unqualified-id before numeric constant
  GuiBranches.cpp:83:23: error: expected ')' before numeric constant




Re: Branch monolithic build no more works

2012-03-06 Thread Pavel Sanda
Pavel Sanda wrote:
   CXXliblyxqt4.o
   In file included from liblyxqt4.cpp:23:0:
   GuiBranches.cpp: In member function 'virtual bool 
 lyx::frontend::GuiBranches::eventFilter(QObject*, QEvent*)':
   GuiBranches.cpp:83:23: error: expected unqualified-id before numeric 
 constant
   GuiBranches.cpp:83:23: error: expected ')' before numeric constant
 

QEvent::KeyPress - KeyPress helps, but then fails normal build...


configure conundrum

2012-03-06 Thread Andrew Parsloe
(Most of my posts should really go to a tinkerers' list -- 
lyx-tin...@lists.org? -- for matters lying between the developers' list 
and the users' list.)


When I reconfigure LyX and then look at the configure log, I find LyX 
has, among others, checked for and not found inkscape, gnumeric, 
firefox, mozilla, ghostview, acrobat, acroreader, abiword, oowriter, yet 
all these programs are installed on my computer. As far as I'm aware 
there's no special permissions or access restrictions that might make 
them invisible.


Windows Vista, LyX 2.0.3, but this state of affairs has existed through 
a great many versions of LyX. It doesn't seem to interfere with LyX's 
functioning, but what is LyX doing if it can't find programs that are there?


LyX does find programs in the MiKTeX bin folder, and also notepad.

Andrew


Re: google summer of code is starting

2012-03-06 Thread Alessandro Di Federico
On Thu, 2012-03-01 at 01:17 +0100, Alessandro Di Federico wrote:
 On Wed, 2012-02-22 at 11:25 +, Tommaso Cucinotta wrote:
  I also have to admit that I suspect this feature might be considered 
  competitor of Google Docs, so I'd not expect it to be supported by
  GSoC too easily. 
 
 Google Docs is more web-oriented, and available everywhere. LyX will
 always be a desktop application.
 
 I think it's time to write down the ideas, the deadline is getting near
 (March 9th [1]).
 
 I've added the python thing:
 http://wiki.lyx.org/Devel/SummerOfCode2012Ideas
 
 Mentors wanted :)

Guys, last chance to take action:

Org Application Deadline:
March 09 at 23:00 UTC
2 days, 16 hours remaining

https://google-melange.appspot.com/gsoc/homepage/google/gsoc2012

Ale




Re: google summer of code is starting

2012-03-06 Thread Vincent van Ravesteijn

Op 7-3-2012 7:45, Alessandro Di Federico schreef:

On Thu, 2012-03-01 at 01:17 +0100, Alessandro Di Federico wrote:

On Wed, 2012-02-22 at 11:25 +, Tommaso Cucinotta wrote:

I also have to admit that I suspect this feature might be considered
competitor of Google Docs, so I'd not expect it to be supported by
GSoC too easily.

Google Docs is more web-oriented, and available everywhere. LyX will
always be a desktop application.

I think it's time to write down the ideas, the deadline is getting near
(March 9th [1]).

I've added the python thing:
http://wiki.lyx.org/Devel/SummerOfCode2012Ideas

Mentors wanted :)

Guys, last chance to take action:

Org Application Deadline:
March 09 at 23:00 UTC
2 days, 16 hours remaining

https://google-melange.appspot.com/gsoc/homepage/google/gsoc2012

Ale




Argh.. time is flying.

Is there anyone who wants to step up (next to me) ?

Vincent


Re: Updates to gitolite progress

2012-03-06 Thread Lars Gullik Bjønnes
Vincent van Ravesteijn  writes:

| Op 5-3-2012 1:03, Lars Gullik Bjønnes schreef:
>> I have added some more gitolite functionality.
>> (only viewable for the people that has sent me their ssh public key.)
>>
>> ssh g...@git.lyx.org help
>>
>> You will not be able to fork anything yet, but as you can see at
>>
>> http://git.lyx.org/
>
| Browsing the repos seems to be broken right now.

I have not seen that.

>
>>
>> this is basically what it will look like.
>>
>> The plan forward is:
>>
>> 1. Get the required hooks in place
>>- This is mostly the post-commit (post-receive really) hook that
>> sends messages to lyx-...@lists.lyx.org
>>
>> 2. See if we can get the trac connection setup.
>>- Should just be config, and a another hook to get updates to
>> the repo signaled to trac.
>>
>> 3. Cleanup and verify the svn->git conversion that I already have in place.
>>- Unless I have to redo anything this will be quite easy.
>>
>> 4. Make the subversion repo read-only
>>
>> 5. Enable the new lyx-devel git repo at git.lyx.org.
>>
>> I might be able to do this within the week.
>>
>> Comments or objections to the plan forward?
>
| We need to agree on how the workflow will be in the future.

I'll answer this in more detail later, but as a starting point I want to
say:

Be very wary of changing the process too much from what we have now.

-- 
   Lgb



Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Richard Heck wrote:
> All you need to do is produce something similar for IPA. Probably for 
> IPA you would use unicode-insert, followed by the codepoint. E.g.:
> unicode-insert 0x0251
> gets you: ɑ.

Something like this can be done inside the new IPA inset (and indeed also 
inside the old math-tipa with 2.0). However, currently the output will be 
flawed with this method (same as if your insert unicode IPA symbols outside 
the inset, with the improvement that the ascii glyphs will be taken from the 
IPA font not the main text font). You'll get something like

\textipa{\textepsilon{}kspl\textschwa{}ne\textsci{}\textesh{}\textschwa{}n}

which is not only hardly readable (due to the macros), but also the kerning is 
broken by the {} which are appended after each macro.

I plan to convert the unicode glyphs to TIPA shortcut notation inside the IPA 
inset (in latex output), i.e. you'll get for the above

\textipa{Ekspl@neIS@n}

Vice versa, this shortcut notation will be converted to unicode for text and 
XHTML output.

As for the toolbar, the plan is to display it automatically when the cursor is 
inside the IPA inset. Carlos, if you can provide icons for the IPA symbols 
(similar to the icons you'll find in lib/images/math), it would help a lot. 
I'll be utterly short of time during the next months.

Jürgen


Re: #8069: View other format button greys out

2012-03-06 Thread Eric Weir

On Mar 6, 2012, at 8:41 AM, LyX Ticket Tracker wrote:

> #8069: View other format button greys out
> ---+-
> Reporter:  Eric Weir  |   Owner:  lasgouttes
> Type:  defect |  Status:  new
> Priority:  normal |   Milestone:
> Component:  general| Version:  2.0.3
> Severity:  normal |  Resolution:
> Keywords: |
> ---+-
> 
> Comment (by sanda):
> 
> can't reproduce (linux here)

Not sure if this is the way to respond/update. Didn't see a way on the website.

iIn any case, my OS is OS X 10.5.6.

--
Eric Weir
Decatur, GA
eew...@bellsouth.net

"A man should be in the world as though he were not in it 
so that it will be no worse because of his life." 

- Wendell Berry 



[RFC] [patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
> I plan to convert the unicode glyphs to TIPA shortcut notation inside the
> IPA  inset (in latex output), i.e. you'll get for the above
> 
> \textipa{Ekspl@neIS@n}

Attached is an approach for this. I think it is best to record the TIPA 
shortcuts in the unicodesymbols file to prevent code duplication. Since adding 
another column would be overkill for this, I propose to record the shortcut 
via a flag.

Opinions?

Jürgen
Index: lib/unicodesymbols
===
--- lib/unicodesymbols	(Revision 40866)
+++ lib/unicodesymbols	(Arbeitskopie)
@@ -34,6 +34,7 @@
 # - combining This is a combining char that will get combined with a base char
 # - force Always output replacement command
 # - mathalpha This character is considered as a math variable in mathmode
+# - tipashortcut= Shortcut notation for TIPA
 
 0x00a0 "~""" "" "~" "" # NO-BREAK SPACE
 0x00a1 "\\textexclamdown" "" "" # INVERTED EXCLAMATION MARK
@@ -472,7 +473,7 @@
 #
 # IPA extensions
 #
-0x0250 "\\textturna"  "tipa" "force" # LATIN SMALL LETTER TURNED A
+0x0250 "\\textturna"  "tipa" "force,tipashortcut=5" # LATIN SMALL LETTER TURNED A
 0x0251 "\\textscripta""tipa" "force" # LATIN SMALL LETTER ALPHA
 0x0252 "\\textturnscripta""tipa" "force" # LATIN SMALL LETTER TURNED ALPHA
 0x0253 "\\texthtb""tipa" "force" # LATIN SMALL LETTER B WITH HOOK
Index: src/insets/InsetIPA.cpp
===
--- src/insets/InsetIPA.cpp	(Revision 40874)
+++ src/insets/InsetIPA.cpp	(Arbeitskopie)
@@ -194,8 +194,10 @@
 }
 
 
-void InsetIPA::latex(otexstream & os, OutputParams const & runparams) const
+void InsetIPA::latex(otexstream & os, OutputParams const & runparams_in) const
 {
+	OutputParams runparams(runparams_in);
+	runparams.inIPA = true;
 	bool const multipar = (text().paragraphs().size() > 1);
 	// fontspec knows \textipa, but not the IPA environment
 	bool const nontexfonts = buffer_->params().useNonTeXFonts;
Index: src/OutputParams.h
===
--- src/OutputParams.h	(Revision 40866)
+++ src/OutputParams.h	(Arbeitskopie)
@@ -198,6 +198,11 @@
 	 */
 	bool inIndexEntry;
 
+	/** Whether we are inside an IPA inset.
+	 *  Needed for proper IPA output.
+	 */
+	bool inIPA;
+
 	/** Whether we are inside an inset that is logically deleted.
 	 *  A value > 0 indicates a deleted inset.
  */
Index: src/Paragraph.cpp
===
--- src/Paragraph.cpp	(Revision 40866)
+++ src/Paragraph.cpp	(Arbeitskopie)
@@ -1262,13 +1262,21 @@
 			}
 		}
 		string script;
-		docstring const latex = encoding.latexChar(c);
+		docstring latex = encoding.latexChar(c);
+		bool tipas = false;
+		if (runparams.inIPA) {
+			string const tipashortcut = Encodings::TIPAShortcut(c);
+			if (!tipashortcut.empty()) {
+latex = from_ascii(tipashortcut);
+tipas = true;
+			}
+		}
 		if (Encodings::isKnownScriptChar(c, script)
 		&& prefixIs(latex, from_ascii("\\" + script)))
 			column += writeScriptChars(os, latex,
 	running_change, encoding, i) - 1;
 		else if (latex.length() > 1 && latex[latex.length() - 1] != '}' &&
-		 latex[latex.length() - 1] != '-') {
+			 latex[latex.length() - 1] != '-' && !tipas) {
 			// Prevent eating of a following
 			// space or command corruption by
 			// following characters
Index: src/OutputParams.cpp
===
--- src/OutputParams.cpp	(Revision 40866)
+++ src/OutputParams.cpp	(Arbeitskopie)
@@ -25,7 +25,7 @@
 	  use_indices(false), use_japanese(false), linelen(0), depth(0),
 	  exportdata(new ExportData),
 	  inComment(false), inTableCell(NO), inFloat(NONFLOAT),
-	  inIndexEntry(false), inDeletedInset(0),
+	  inIndexEntry(false), inIPA(false), inDeletedInset(0),
 	  changeOfDeletedInset(Change::UNCHANGED),
 	  par_begin(0), par_end(0), lastid(-1), lastpos(-1), isLastPar(false),
 	  dryrun(false), pass_thru(false), 
Index: src/Encoding.cpp
===
--- src/Encoding.cpp	(Revision 40866)
+++ src/Encoding.cpp	(Arbeitskopie)
@@ -249,6 +249,8 @@
 	/// Always force the LaTeX command, even if the encoding contains
 	/// this character?
 	bool force;
+	/// TIPA shortcut
+	string tipashortcut;
 };
 
 
@@ -685,6 +687,15 @@
 }
 
 
+string const Encodings::TIPAShortcut(char_type c)
+{
+	CharInfoMap::const_iterator const it = unicodesymbols.find(c);
+	if (it != unicodesymbols.end())
+		return it->second.tipashortcut;
+	return string();
+}
+
+
 bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
 {
 	CharInfoMap::const_iterator const it = unicodesymbols.find(c);
@@ -797,6 +808,8 @@
 forced.insert(symbol);
 			} else if (flag == "mathalpha") {
 mathalpha.insert(symbol);
+			} 

Re: r40873 - in lyx-devel/trunk: po src

2012-03-06 Thread Julien Rioux
On Tue, Mar 6, 2012 at 4:41 AM,  wrote:

> Author: kornel
> Date: Tue Mar  6 10:41:41 2012
> New Revision: 40873
> URL: http://www.lyx.org/trac/changeset/40873
>
> Log:
> Handling of libmagic for some mime-types leads to incorrect value
> 'text/plain'.
>
> Modified:
>   lyx-devel/trunk/po/diff_po.pl
>   lyx-devel/trunk/src/Format.cpp
>
> Modified: lyx-devel/trunk/po/diff_po.pl
>
>
Are the changes to diff_po.pl really intended?

--
Julien


[another patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
> \textipa{\textepsilon{}kspl\textschwa{}ne\textsci{}\textesh{}\textschwa{}n}
> 
> which is not only hardly readable (due to the macros), but also the kerning
> is  broken by the {} which are appended after each macro.

The kerning problem is addressed by the attached patch (which is on top of the 
other, as you can see). It assures the '{}' are only appended when needed (if 
a space follows). If a normal character follows, a blank is appended, if a 
macro follows, nothing is appended. So you get:

\textipa{\textepsilon kspl\textschwa ne\textsci\textesh\textschwa n}

which is the correct output.

JürgenIndex: src/Paragraph.cpp
===
--- src/Paragraph.cpp	(Revision 40866)
+++ src/Paragraph.cpp	(Arbeitskopie)
@@ -1253,8 +1253,9 @@
 			return;
 
 		Encoding const & encoding = *(runparams.encoding);
+		char_type next = '\0';
 		if (i + 1 < int(text_.size())) {
-			char_type next = text_[i + 1];
+			next = text_[i + 1];
 			if (Encodings::isCombiningChar(next)) {
 column += latexSurrogatePair(os, c, next, runparams) - 1;
 ++i;
@@ -1262,18 +1263,31 @@
 			}
 		}
 		string script;
-		docstring const latex = encoding.latexChar(c);
+		docstring latex = encoding.latexChar(c);
+		docstring nextlatex = (next == '\0') ? docstring(): encoding.latexChar(next);
+		bool tipas = false;
+		if (runparams.inIPA) {
+			string const tipashortcut = Encodings::TIPAShortcut(c);
+			if (!tipashortcut.empty()) {
+latex = from_ascii(tipashortcut);
+tipas = true;
+			}
+		}
 		if (Encodings::isKnownScriptChar(c, script)
 		&& prefixIs(latex, from_ascii("\\" + script)))
 			column += writeScriptChars(os, latex,
 	running_change, encoding, i) - 1;
-		else if (latex.length() > 1 && latex[latex.length() - 1] != '}' &&
-		 latex[latex.length() - 1] != '-') {
+		else if (!prefixIs(nextlatex, from_ascii("\\"))
+			 && latex.length() > 1 && latex[latex.length() - 1] != '}'
+			 && latex[latex.length() - 1] != '-' && !tipas) {
 			// Prevent eating of a following
 			// space or command corruption by
 			// following characters
 			column += latex.length() + 1;
-			os << latex << "{}";
+			if (next == ' ' || next == '\0')
+os << latex << "{}";
+			else
+os << latex << " ";
 		} else {
 			column += latex.length() - 1;
 			os << latex;


Re: lists subscriber only?

2012-03-06 Thread Jean-Marc Lasgouttes

Le 06/03/2012 18:15, Wierdl Máté a écrit :

Dear developers!

What do the developers say, if I made the users subscribers only,
meaning only subscribers would post? The post below went to the users'
list, and got caught in a junkmailfilter.  Stuff like this is a
problem for the University here.  They are talking about asking me to
host the lists on their servers using their list manager.


Having the list subscriber only is a bit annoying. I thought we had 
TDMA, isn't it efficient?


Also, I see that the message is flagged by SpamAssasin, isn't there a 
way to filter it as spam?


I understand however your concerns with respect to the university.

JMarc


Re: Re: r40873 - in lyx-devel/trunk: po src

2012-03-06 Thread Kornel Benko
Am Dienstag, 6. März 2012 um 12:00:42, schrieb Julien Rioux 
> On Tue, Mar 6, 2012 at 4:41 AM,  wrote:
>
> > Author: kornel
> > Date: Tue Mar  6 10:41:41 2012
> > New Revision: 40873
> > URL: http://www.lyx.org/trac/changeset/40873
> >
> > Log:
> > Handling of libmagic for some mime-types leads to incorrect value
> > 'text/plain'.
> >
> > Modified:
> >   lyx-devel/trunk/po/diff_po.pl
> >   lyx-devel/trunk/src/Format.cpp
> >
> > Modified: lyx-devel/trunk/po/diff_po.pl
> >
> >
> Are the changes to diff_po.pl really intended?
>
> --
> Julien

No, they came in by accident :(
OTOH, it helps me to commit only minimal changes on the po, although I am 
manipulating re-merged version.

Kornel

signature.asc
Description: This is a digitally signed message part.


Import/Export Error Information (word2lyx)

2012-03-06 Thread Rob Oakes
Dear Developers,

I'm getting ready to publish the source for Word2LyX, but ran into one
last problem. I created an input filter/filetype to completely automate
the conversion of Word documents.

However, when run, I'm getting an error:

An error occurred while running:

python "inputfile.docx" "outputfile.lyx"

Is there any way to look at the debug output to try and track what might
be causing the error.

Cheers,

Rob


Re: Import/Export Error Information (word2lyx)

2012-03-06 Thread Richard Heck

On 03/06/2012 01:23 PM, Rob Oakes wrote:

Dear Developers,

I'm getting ready to publish the source for Word2LyX, but ran into one
last problem. I created an input filter/filetype to completely automate
the conversion of Word documents.

However, when run, I'm getting an error:

An error occurred while running:

python "inputfile.docx" "outputfile.lyx"

Is there any way to look at the debug output to try and track what might
be causing the error.

If that's the error, then the problem looks to be a missing command. 
You're asking python to run the docx file. I'd check the definition of 
the converter.


The file format and the definition of the converter should probably 
happen within LyX, anyway. I'll be happy to add this to 2.0.4.


Richard



ESC cancels long Find operations (was: Re: #7217: performance issue with advanced find and replace dialog)

2012-03-06 Thread Tommaso Cucinotta

Il 10/05/2011 13:30, LyX Ticket Tracker ha scritto:

I think that the possibility to cancel the search with ESC is a
  good feature. Please send it to the lyx-devel list for discussion.


I made a quick update of the patch on the current branch, and here it 
is, just in case you like having it in for 2.0.4.


Among issues that might be related to the lack of this feature, we have:
-) http://www.lyx.org/trac/ticket/7965
-) http://www.lyx.org/trac/ticket/7217
(just replaced the patch attached to the ticket with this one I'm 
sending)


Bye,

Tommaso
Index: src/lyxfind.cpp
===
--- src/lyxfind.cpp	(revisione 40874)
+++ src/lyxfind.cpp	(copia locale)
@@ -1133,12 +1133,12 @@
 {
 	if (!cur)
 		return 0;
-	while (cur) {
+	while (!theApp()->longOperationCancelled() && cur) {
 		LYXERR(Debug::FIND, "findForwardAdv() cur: " << cur);
 		int match_len = match(cur, -1, false);
 		LYXERR(Debug::FIND, "match_len: " << match_len);
 		if (match_len) {
-			for (; cur; cur.forwardPos()) {
+			for (; !theApp()->longOperationCancelled() && cur; cur.forwardPos()) {
 LYXERR(Debug::FIND, "Advancing cur: " << cur);
 int match_len = match(cur);
 LYXERR(Debug::FIND, "match_len: " << match_len);
@@ -1235,7 +1235,7 @@
 		else
 			cur.backwardPos();
 		pit_changed = true;
-	} while (true);
+	} while (!theApp()->longOperationCancelled());
 	return 0;
 }
 
Index: src/frontends/Application.h
===
--- src/frontends/Application.h	(revisione 40874)
+++ src/frontends/Application.h	(copia locale)
@@ -239,6 +239,14 @@
 	/// Handle a accented char key sequence
 	/// FIXME: this is only needed for LFUN_ACCENT_* in Text::dispatch()
 	virtual void handleKeyFunc(FuncCode action) = 0;
+
+	/// Start a long operation with some cancel possibility (button or ESC)
+	virtual void startLongOperation() = 0;
+	/// This needs to be periodically called to avoid freezing the GUI
+	virtual bool longOperationCancelled() = 0;
+	/// Stop the long operation mode (i.e., release the GUI)
+	virtual void stopLongOperation() = 0;
+
 };
 
 /// Return the list of loadable formats.
Index: src/frontends/qt4/GuiApplication.cpp
===
--- src/frontends/qt4/GuiApplication.cpp	(revisione 40874)
+++ src/frontends/qt4/GuiApplication.cpp	(copia locale)
@@ -80,12 +80,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -98,6 +100,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -675,6 +678,43 @@
 
 #endif // Q_WS_WIN
 
+
+/// Allows to check whether ESC was pressed during a long operation
+class KeyChecker : public QObject {
+private:
+	bool pressed_;
+public:
+	KeyChecker() {
+		pressed_ = false;
+	}
+	void start() {
+		QCoreApplication::instance()->installEventFilter(this);
+		pressed_ = false;
+	}
+	void stop() {
+		QCoreApplication::instance()->removeEventFilter(this);
+	}
+	bool pressed() {
+		QCoreApplication::processEvents();
+		return pressed_;
+	}
+	bool eventFilter(QObject *obj, QEvent *event) {
+		LYXERR(Debug::ACTION, "Event Type: " << event->type());
+		switch (event->type()) {
+		case QEvent::Show:
+		case QEvent::Hide:
+		case QEvent::Resize:
+			return QObject::eventFilter(obj, event);
+		default:
+			QKeyEvent *keyEvent = dynamic_cast(event);
+			if (keyEvent && keyEvent->key() == Qt::Key_Escape)
+pressed_ = true;
+			return true;
+		}
+	}
+};
+
+
 
 // GuiApplication::Private definition and implementation.
 
@@ -752,6 +792,9 @@
 	/// WMF Mime handler for Windows clipboard.
 	QWindowsMimeMetafile * wmf_mime_;
 #endif
+
+	/// Allows to check whether ESC was pressed during a long operation
+	KeyChecker key_checker_;
 };
 
 
@@ -2529,6 +2572,21 @@
 }
 
 
+void GuiApplication::startLongOperation() {
+	d->key_checker_.start();
+}
+
+
+bool GuiApplication::longOperationCancelled() {
+	return d->key_checker_.pressed();
+}
+
+
+void GuiApplication::stopLongOperation() {
+	d->key_checker_.stop();
+}
+
+
 
 //
 // X11 specific stuff goes here...
Index: src/frontends/qt4/FindAndReplace.cpp
===
--- src/frontends/qt4/FindAndReplace.cpp	(revisione 40874)
+++ src/frontends/qt4/FindAndReplace.cpp	(copia locale)
@@ -294,6 +294,8 @@
 	oss << opt;
 	FuncRequest cmd(LFUN_WORD_FINDADV, from_utf8(oss.str()));
 
+	view_.message(_("Advanced search started: please wait . . ."));
+	theApp()->startLongOperation();
 	view_.setBusy(true);
 	if (opt.scope == FindAndReplaceOptions::S_ALL_MANUALS) {
 		vector const & v = allManualsFiles();
@@ -301,7 +303,9 @@
 

Re: LyX 2.0.3 Released

2012-03-06 Thread stefano franchi
On Mon, Mar 5, 2012 at 7:34 PM, Richard Heck  wrote:
> On 03/05/2012 06:50 PM, stefano franchi wrote:
>>
>> Speaking of endnotes, what I haven't been able to find out, instead,
>> is how to have two have features often found in Humanities books:
>>
>> 1. Running headers for the endnotes that says (automatically, of
>> course) "Notes for pages nnn-mmm" where nnn and mmm are the page
>> numbers of the page of text in which the first (respectively, last)
>> endnote of the current spread appears.
>>
> This kind of thing is going to be tricky. Have you asked on comp.text.tex?
> Someone there
> will almost certainly know how to do it. Whatever the solution, it will
> involve the \addtoendnotes command, that one can use to write page
> information to the endnotes file. The hard part will be how to figure out
> what page the LAST endnote on the page is for.
>
>

I haven't really looked into it. It is just something I'll like to
learn sooner or later, because I can tell I will eventually need it. I
do agree that the tex gurus on comp.text.tex would probably know how
to handle it.


>> 2. "unnumbered endnotes", where the marker of the note is invisible in
>> the text (i.e. there is no marker), and is made up of the last 3 or 4
>> words before the endnote marker in the endnote itself. For instance,
>> you may have a sentence such as:
>>
>> "This is a sentence I just made up to illustrate some
>> Humanities-specific way of using endnotes without using markers in the
>> text itself"
>>
>> And the endnote could be something like:
>>
>> "without using markers  Some Humanities publishers really
>> dislike endnotes and footnotes and will only accept them if the text
>> appears not to have any. See, for instance, the following books..."
>>
> This one looks bad. I doubt it's possible to recover the previous text. But
> one could mark it more or less like this:
>    way of using endnotes \enote{without using markers}{Some Humanities...}
> in the text itself
> and get that to do the right thing, I think. But it would probably involve
> rewriting a lot of the endnote code.
>

In fact, I guess this one is easier than the previous one. I think
memoir allows pretty much any latex code to serve as endnote marker,
so it is should be possible to work something out. Again, this has
just been in the back of my mind so far.



Cheers,

Stefano





-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Re: r40858 - lyx-devel/trunk/lib

2012-03-06 Thread Enrico Forestieri
On Mon, Mar 05, 2012 at 04:45:05PM -0500, Richard Heck wrote:
> On 03/05/2012 12:14 PM, for...@lyx.org wrote:
> >Author: forenr
> >Date: Mon Mar  5 18:14:09 2012
> >New Revision: 40858
> >URL: http://www.lyx.org/trac/changeset/40858
> >
> >Log:
> >On Windows, properly account for the encoding of the temporary directory.
> I assume branch needs this too

Backported. What about r40828?

-- 
Enrico


Re: ESC cancels long Find operations

2012-03-06 Thread Richard Heck

On 03/06/2012 03:54 PM, Tommaso Cucinotta wrote:

Il 10/05/2011 13:30, LyX Ticket Tracker ha scritto:

I think that the possibility to cancel the search with ESC is a
  good feature. Please send it to the lyx-devel list for discussion.


I made a quick update of the patch on the current branch, and here it 
is, just in case you like having it in for 2.0.4.


Among issues that might be related to the lack of this feature, we have:
-) http://www.lyx.org/trac/ticket/7965
-) http://www.lyx.org/trac/ticket/7217
(just replaced the patch attached to the ticket with this one I'm 
sending)


I didn't look at it in detail, since I don't understand this stuff very 
well, but it'll be a great thing to have.


Richard



Re: [RFC] [patch] Re: Feature Request: toolbar for phonetic symbols (IPA)

2012-03-06 Thread Richard Heck

On 03/06/2012 10:18 AM, Jürgen Spitzmüller wrote:

Jürgen Spitzmüller wrote:

I plan to convert the unicode glyphs to TIPA shortcut notation inside the
IPA  inset (in latex output), i.e. you'll get for the above

\textipa{Ekspl@neIS@n}

Attached is an approach for this. I think it is best to record the TIPA
shortcuts in the unicodesymbols file to prevent code duplication. Since adding 
another column would be overkill for this, I propose to record the shortcut via 
a flag.

Opinions?

Looks fine to me. I assume there are lots of other shortcuts that will 
go into that file?


Richard



Extra lines when exporting as plain text

2012-03-06 Thread Andrew Parsloe

Suppose you have a simple LyX document like:

First line.
Second line.
Third line.

and export this as plain text. When viewed in a text editor, it looks like:

First line.

Second line.

Third line.

which seems wrong to me. If I had exported to LaTeX or TeX then the 
blank lines would correctly mark the ends of paragraphs, but in a plain 
text document they are artifacts which shouldn't be there.


When looking at the list of converters in Tools>Preferences>File 
Handling>Converters I couldn't see a converter producing simply plain 
text. Does that mean the export with the extra lines is part of the LyX 
code base?


Andrew


Re: Extra lines when exporting as plain text

2012-03-06 Thread Richard Heck

On 03/06/2012 05:41 PM, Andrew Parsloe wrote:

Suppose you have a simple LyX document like:

First line.
Second line.
Third line.

and export this as plain text. When viewed in a text editor, it looks 
like:


First line.

Second line.

Third line.

which seems wrong to me. If I had exported to LaTeX or TeX then the 
blank lines would correctly mark the ends of paragraphs, but in a 
plain text document they are artifacts which shouldn't be there.


Plain text export breaks paragraphs with newlines, to keep the lines to 
the right sort of length.

So paragraphs are separated by double newlines.

When looking at the list of converters in Tools>Preferences>File 
Handling>Converters I couldn't see a converter producing simply plain 
text. Does that mean the export with the extra lines is part of the 
LyX code base?



Yes. It's a "backend", like LaTeX or XHTML or DocBook.

Richard



Branch monolithic build no more works

2012-03-06 Thread Pavel Sanda
  CXXliblyxqt4.o
  In file included from liblyxqt4.cpp:23:0:
  GuiBranches.cpp: In member function 'virtual bool 
lyx::frontend::GuiBranches::eventFilter(QObject*, QEvent*)':
  GuiBranches.cpp:83:23: error: expected unqualified-id before numeric constant
  GuiBranches.cpp:83:23: error: expected ')' before numeric constant




Re: Branch monolithic build no more works

2012-03-06 Thread Pavel Sanda
Pavel Sanda wrote:
>   CXXliblyxqt4.o
>   In file included from liblyxqt4.cpp:23:0:
>   GuiBranches.cpp: In member function 'virtual bool 
> lyx::frontend::GuiBranches::eventFilter(QObject*, QEvent*)':
>   GuiBranches.cpp:83:23: error: expected unqualified-id before numeric 
> constant
>   GuiBranches.cpp:83:23: error: expected ')' before numeric constant
> 

QEvent::KeyPress -> KeyPress helps, but then fails normal build...


configure conundrum

2012-03-06 Thread Andrew Parsloe
(Most of my posts should really go to a tinkerers' list -- 
lyx-tin...@lists.org? -- for matters lying between the developers' list 
and the users' list.)


When I reconfigure LyX and then look at the configure log, I find LyX 
has, among others, checked for and not found inkscape, gnumeric, 
firefox, mozilla, ghostview, acrobat, acroreader, abiword, oowriter, yet 
all these programs are installed on my computer. As far as I'm aware 
there's no special permissions or access restrictions that might make 
them invisible.


Windows Vista, LyX 2.0.3, but this state of affairs has existed through 
a great many versions of LyX. It doesn't seem to interfere with LyX's 
functioning, but what is LyX doing if it can't find programs that are there?


LyX does find programs in the MiKTeX bin folder, and also notepad.

Andrew


Re: google summer of code is starting

2012-03-06 Thread Alessandro Di Federico
On Thu, 2012-03-01 at 01:17 +0100, Alessandro Di Federico wrote:
> On Wed, 2012-02-22 at 11:25 +, Tommaso Cucinotta wrote:
> > I also have to admit that I suspect this feature might be considered 
> > competitor of Google Docs, so I'd not expect it to be supported by
> > GSoC too easily. 
> 
> Google Docs is more web-oriented, and available everywhere. LyX will
> always be a desktop application.
> 
> I think it's time to write down the ideas, the deadline is getting near
> (March 9th [1]).
> 
> I've added the python thing:
> http://wiki.lyx.org/Devel/SummerOfCode2012Ideas
> 
> Mentors wanted :)

Guys, last chance to take action:

Org Application Deadline:
March 09 at 23:00 UTC
2 days, 16 hours remaining

https://google-melange.appspot.com/gsoc/homepage/google/gsoc2012

Ale




Re: google summer of code is starting

2012-03-06 Thread Vincent van Ravesteijn

Op 7-3-2012 7:45, Alessandro Di Federico schreef:

On Thu, 2012-03-01 at 01:17 +0100, Alessandro Di Federico wrote:

On Wed, 2012-02-22 at 11:25 +, Tommaso Cucinotta wrote:

I also have to admit that I suspect this feature might be considered
competitor of Google Docs, so I'd not expect it to be supported by
GSoC too easily.

Google Docs is more web-oriented, and available everywhere. LyX will
always be a desktop application.

I think it's time to write down the ideas, the deadline is getting near
(March 9th [1]).

I've added the python thing:
http://wiki.lyx.org/Devel/SummerOfCode2012Ideas

Mentors wanted :)

Guys, last chance to take action:

Org Application Deadline:
March 09 at 23:00 UTC
2 days, 16 hours remaining

https://google-melange.appspot.com/gsoc/homepage/google/gsoc2012

Ale




Argh.. time is flying.

Is there anyone who wants to step up (next to me) ?

Vincent