Re: r28340 for branch?

2009-03-16 Thread Jürgen Spitzmüller
rgheck wrote:
 I think this one got approved a long time ago and held for 1.6.3, but I
 thought I'd better ask again.

OK.

Jürgen


Re: LyX 1.6.2

2009-03-16 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
 They just fixed the problem.

Thanks, I reset the links.

Jürgen


Re: r28773 - in /lyx-devel/branches/BRANCH_1_6_X: configure.a...

2009-03-16 Thread Jürgen Spitzmüller
Vincent van Ravesteijn wrote:
 Err, see below/attached.

Oh ... Yes, OK.

 Ready for the rest ;-)... ?

Give me some time to breathe...

Jürgen


Branches UI

2009-03-16 Thread Pavel Sanda
hi,

i started to use branches lately and i found out that our UI for them
is bit annoying since every other change needs tobe done through
preferences dislog.

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.
- introduce actvation/deactivation through the context menu
  (2 JMarc - i tried your proposal through branch-activate lfun, but
  when i come to thepoint when i needed to copy the whole code from
  next-inset-toggle lfun i returned to the idea of enhancing
  our own inset-toggle.)
- fix already presesnt bug for update status of branch inset.

objections?

pavel
commit 21e518027cae7a242b0b1bbc54766120d9f9a49e
Author: Pavel Sanda p...@twin.jikos.cz
Date:   Sat Mar 14 11:51:57 2009 +0100

Add LFUN_BRANCH_ADD, add new branch command to ui.

diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 12638f8..28fb43f 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -443,6 +443,8 @@ Menuset
End
 
Menu insert_branches
+   Item Add New Branch|A branch-add branch_inset_insert
+   Separator
Branches
End

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 3b31fd5..18fbeec 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -909,6 +909,7 @@ FuncStatus BufferView::getStatus(FuncRequest const  cmd)
case LFUN_NOTES_MUTATE:
case LFUN_ALL_INSETS_TOGGLE:
case LFUN_STATISTICS:
+   case LFUN_BRANCH_ADD:
flag.setEnabled(true);
break;
 
@@ -1536,6 +1537,35 @@ bool BufferView::dispatch(FuncRequest const  cmd)
break;
}
 
+   case LFUN_BRANCH_ADD: {
+   BranchList  branch_list = buffer_.params().branchlist();
+   docstring branch_name = from_utf8(cmd.getArg(0));
+   bool branch_insert = false;
+   if (branch_name == branch_inset_insert) {
+   branch_insert = true;
+   branch_name = from_utf8(cmd.getArg(1));
+   }
+   if (branch_name.empty())
+   if (!Alert::askForText(branch_name, _(Branch name)) ||
+   branch_name.empty())
+   return false;
+
+   if (!branch_list.add(branch_name)) {
+   cur.message(from_utf8(N_(Branch already exists.)));
+   return false;
+   }
+   Branch const * branch = branch_list.find(branch_name);
+   string const x11hexname = X11hexname(branch-color());
+   docstring const str = branch_name + ' ' + 
from_ascii(x11hexname);
+   lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
+
+   if (branch_insert)
+   lyx::dispatch(FuncRequest(LFUN_BRANCH_INSERT, 
branch_name));
+
+   cur.message(branch_name +   + from_utf8(N_(branch added.)));
+   break;
+   }
+
default:
return false;
}
diff --git a/src/FuncCode.h b/src/FuncCode.h
index 503f30f..c0d39a4 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -418,6 +418,7 @@ enum FuncCode
LFUN_VC_COMMAND,
LFUN_MATH_FONT_STYLE,
LFUN_PHANTOM_INSERT,// uwestoehr, 20090130
+   LFUN_BRANCH_ADD,
 
LFUN_LASTACTION // end of the table
 };
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 137f760..c8755bb 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -3158,6 +3158,17 @@ void LyXAction::init()
  * \endvar
  */
{ LFUN_BRANCH_DEACTIVATE, branch-deactivate, Argument, Buffer 
},
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BRANCH_ADD
+ * \li Action: Add new branch into the document
+ * \li Syntax: branch-add [OPT] BRANCH
+ * \li Params: OPT: branch_inset_insert - inserts branch inset at the 
current cursor position \n
+   BRANCH: The new branch name
+ * \li Origin: sanda, 6 March, 2009
+ * \endvar
+ */
+   { LFUN_BRANCH_ADD, branch-add, Argument, Buffer },
+
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_COPY_LABEL_AS_REF

commit f50a1e07e3a25445a8f3e5d73582dde8c0d055f6
Author: Pavel Sanda p...@twin.jikos.cz
Date:   Fri Mar 13 00:15:00 2009 +0100

Context-branch menu uselessly shows both open/close items.

diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 468933b..2501a40 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -178,8 +178,11 @@ bool InsetBranch::getStatus(Cursor  cur, FuncRequest 
const  cmd,
break;
 
case LFUN_INSET_TOGGLE:
-   if (cmd.argument() == open || cmd.argument() == close ||
-   cmd.argument() == toggle)
+   if (cmd.argument() == open)
+   flag.setEnabled(status_ != Open);
+   else if (cmd.argument() == close)
+   

Re: Branches UI

2009-03-16 Thread Guenter Milde
On 2009-03-16, Pavel Sanda wrote:

 the attached patches:
 - introduce new menu item for defining new branch, so you can directly
   put new branch into the document.

Great.

 - introduce actvation/deactivation through the context menu

Great as well. 

How does it behave in a parent/child setting? 

  (De-) activation via a context menu is only helpful, if it is also
  considered in the output. Currently (1.6.2), there is no effect if I
  change the activation in the child's DocumentSettings Branches
  dialogue (bug # 5851).

There are some more related bugs:

2311add a color option for branches
4128Branches cannot be renamed
4462Pasting content with a branch don't add branch to settings 

Thanks

Günter



Re: eLyXer logo

2009-03-16 Thread Guenter Milde
On 2009-03-15, Uwe Stöhr wrote:
  I wonder though if ELyXer should not be integrated into LyX proper.
  We distribute a number of python scripts already, IMHO adding yours
  which is clearly a LyX spin off would just be natural.

 I think we'll of course distribute ELyXer with LyX when it is stable
 enough. 

I am impressed on the speed ELyXer developed and hope for an inclusion
into LyX (at least as a recognize and add to converters configure
option).

But I believe for a better long-time integration, ELyXer should
definitely use the lyx2lyx parsing scripts, so that it automatically
keeps up with file format changes.

I had a look at lyx2lyx (considering to write a reStructuredText
exporter) but badly miss some documentation.

Is there documentation on lyx2lyx or where should I ask my questions?

Günter



Re: eLyXer logo

2009-03-16 Thread Abdelrazak Younes

Guenter Milde wrote:

On 2009-03-15, Uwe Stöhr wrote:
  

I wonder though if ELyXer should not be integrated into LyX proper.
We distribute a number of python scripts already, IMHO adding yours
which is clearly a LyX spin off would just be natural.
  


  

I think we'll of course distribute ELyXer with LyX when it is stable
enough. 



I am impressed on the speed ELyXer developed and hope for an inclusion
into LyX (at least as a recognize and add to converters configure
option).

But I believe for a better long-time integration, ELyXer should
definitely use the lyx2lyx parsing scripts, so that it automatically
keeps up with file format changes.

I had a look at lyx2lyx (considering to write a reStructuredText
exporter) but badly miss some documentation.

Is there documentation on lyx2lyx or where should I ask my questions?
  


Here and to Jose :-)

Once you have an answer, you can add some comments to the source code. 
Do we have something like doxygen for python by the way? If yes, is it used?


Jose, I seem to remember you worked a lot on lyx2lyx during last meeting 
but you did not commit anything, did you?


Abdel.



Re: eLyXer logo

2009-03-16 Thread José Matos
On Monday 16 March 2009 10:35:31 Guenter Milde wrote:
 I had a look at lyx2lyx (considering to write a reStructuredText
 exporter) but badly miss some documentation.

 Is there documentation on lyx2lyx or where should I ask my questions?

This list is the best place to ask questions about lyx2lyx. :-)

The fact that documentation is not there is my fault. :-(

 Günter

-- 
José Abílio


Re: eLyXer logo

2009-03-16 Thread Kornel Benko
Am 2009-03-16 schrieb Guenter Milde:
 On 2009-03-15, Uwe Stöhr wrote:
   I wonder though if ELyXer should not be integrated into LyX proper.
   We distribute a number of python scripts already, IMHO adding yours
   which is clearly a LyX spin off would just be natural.
 
  I think we'll of course distribute ELyXer with LyX when it is stable
  enough. 
 
 I am impressed on the speed ELyXer developed and hope for an inclusion
 into LyX (at least as a recognize and add to converters configure
 option).
 
 But I believe for a better long-time integration, ELyXer should
 definitely use the lyx2lyx parsing scripts, so that it automatically
 keeps up with file format changes.

I think, we can use lyx itself for it.
This is what I have done, (and is now working)
1. Define new html format, say HTML2 (extension html)
Check: documentformat
Viewer: firefox
2.) define new converter form lyx1.5.X to HTML2 with
command: elyxer --quiet $$i $$o
options: originaldir


Kornel



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


Re: Stats in site?

2009-03-16 Thread Pavel Sanda
Piero Faustini wrote:
 e.g. some stats about program download,

this can't be measured in any reasonable way, since most of downloads
won't go from lyx.org site.

where are those 
 visitors from, and so on?

this has been done last years and its the results are in the wiki.
pavel


[PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Jean-Marc Lasgouttes

I committed the following patch which implements inset-begin/end which
do not exactly do what you think they do ;) For example, for
buffer-begin
- if cursor is in the middle go to the beginning of the inset
- if it is already at the beginning, go at the beginning of the
enclosing inset

This is intended to be a quick way to move in nested insets (which
happen a lot for me with branches and minipages).

I am open to comments about the behaviour and possible bindings for
emacs and mac. For cua, I chose C-M-Home/End.

This is something that could go to branch after some polish.

JMarc

svndiff

Index: src/LyXAction.cpp
===
--- src/LyXAction.cpp	(révision 28813)
+++ src/LyXAction.cpp	(copie de travail)
@@ -1010,6 +1010,49 @@ void LyXAction::init()
 		{ LFUN_BUFFER_END_SELECT, buffer-end-select, ReadOnly, Edit },
 
 /*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN
+ * \li Action: Move the cursor to the beginning of the current inset 
+   if it is not already there, or at the beginning of the 
+   enclosing inset otherwise
+ * \li Syntax: inset-begin
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_BEGIN, inset-begin, ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN_SELECT
+ * \li Action: Move the cursor to the beginning of the current inset 
+   if it is not already there, or at the beginning of the 
+   enclosing inset otherwise (adding the
+   traversed text to the selection).
+ * \li Syntax: inset-begin-select
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_BEGIN_SELECT, inset-begin-select, ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_END
+ * \li Action: Move the cursor to the end of the current inset 
+   if it is not already there, or at the end of the 
+   enclosing inset otherwise
+ * \li Syntax: inset-end
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_END, inset-end, ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_END_SELECT
+ * \li Action: Move the cursor to the end of the current inset 
+   if it is not already there, or at the end of the 
+   enclosing inset otherwise (adding the
+   traversed text to the selection).
+ * \li Syntax: inset-end-select
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_END_SELECT, inset-end-select, ReadOnly, Edit },
+
+/*!
  * \var lyx::FuncCode lyx::LFUN_LINE_BEGIN
  * \li Action: Move the cursor to the begining of the (screen) line.
  * \li Syntax: line-begin
Index: src/Text3.cpp
===
--- src/Text3.cpp	(révision 28813)
+++ src/Text3.cpp	(copie de travail)
@@ -561,6 +561,26 @@ void Text::dispatch(Cursor  cur, FuncRe
 		cur.updateFlags(Update::FitCursor);
 		break;
 
+	case LFUN_INSET_BEGIN:
+	case LFUN_INSET_BEGIN_SELECT:
+		needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT);
+		if (cur.depth() == 1 || cur.pos()  0)
+			needsUpdate |= cursorTop(cur);
+		else
+			cur.undispatched();
+		cur.updateFlags(Update::FitCursor);
+		break;
+
+	case LFUN_INSET_END:
+	case LFUN_INSET_END_SELECT:
+		needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT);
+		if (cur.depth() == 1 || cur.pos()  cur.lastpos())
+			needsUpdate |= cursorBottom(cur);
+		else
+			cur.undispatched();
+		cur.updateFlags(Update::FitCursor);
+		break;
+
 	case LFUN_CHAR_FORWARD:
 	case LFUN_CHAR_FORWARD_SELECT:
 		//LYXERR0( LFUN_CHAR_FORWARD[SEL]:\n  cur);
@@ -2378,10 +2398,14 @@ bool Text::getStatus(Cursor  cur, FuncR
 	case LFUN_PARAGRAPH_PARAMS_APPLY:
 	case LFUN_PARAGRAPH_PARAMS:
 	case LFUN_ESCAPE:
-	case LFUN_BUFFER_END:
 	case LFUN_BUFFER_BEGIN:
+	case LFUN_BUFFER_END:
 	case LFUN_BUFFER_BEGIN_SELECT:
 	case LFUN_BUFFER_END_SELECT:
+	case LFUN_INSET_BEGIN:
+	case LFUN_INSET_END:
+	case LFUN_INSET_BEGIN_SELECT:
+	case LFUN_INSET_END_SELECT:
 	case LFUN_UNICODE_INSERT:
 		// these are handled in our dispatch()
 		enable = true;
Index: src/FuncCode.h
===
--- src/FuncCode.h	(révision 28813)
+++ src/FuncCode.h	(copie de travail)
@@ -418,6 +418,12 @@ enum FuncCode
 	LFUN_VC_COMMAND,
 	LFUN_MATH_FONT_STYLE,
 	LFUN_PHANTOM_INSERT,// uwestoehr, 20090130
+	LFUN_INSET_BEGIN,   // JMarc, 20090316
+	// 325
+	LFUN_INSET_END, // JMarc, 20090316
+	LFUN_INSET_BEGIN_SELECT,// JMarc, 20090316
+	LFUN_INSET_END_SELECT,  // JMarc, 20090316
+
 
 	LFUN_LASTACTION // end of the table
 };
Index: lib/bind/cua.bind
===
--- lib/bind/cua.bind	(révision 28813)
+++ lib/bind/cua.bind	(copie de travail)
@@ -128,6 +128,8 @@
 \bind C-Down			paragraph-down
 \bind C-Home			buffer-begin
 \bind C-End			buffer-end
+\bind M-C-Home		inset-begin
+\bind M-C

Quotes and document settings

2009-03-16 Thread Vincent van Ravesteijn - TNW
If I use (double) quotes in my document, and I change the quote style in
the document settings later on, I would expect that the quotes that are
already in my document would adapt to this new document default ? 
 
That is what I expect from a document setting. Is this a correct
assumption and is it a bug that newly entered quotes are different from
the older ones ? 
 
Or is it just a missing feature that would enable the user to specify a
quote style per quote (and then choose between the document default or
override this default) ?
 
Vincent


Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
Vincent van Ravesteijn - TNW wrote:
 Or is it just a missing feature that would enable the user to specify a
 quote style per quote (and then choose between the document default or
 override this default) ?

http://bugzilla.lyx.org/show_bug.cgi?id=1499

(btw have a look at the csquotes package, and you'll never want to use LyX's 
quote inset again).

Jürgen


RE: [PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Edwin Leuven
jean-marc wrote:
 the following patch [...] implements inset-begin/end which
 do not exactly do what you think they do ;) 

perhaps they need different names then? inset-goto-begin/end ...

Re: New Language Testing

2009-03-16 Thread Waluyo Adi Siswanto

 
 What you have to do is to add 'id' to the file po/LINGUAS and put id.po
 in po/. Then compile and install. After that, you can just run 'make
 install' in po/ directory when you have made a modification.
 
 JMarc

I did successfully compile the svn and set the language to ID language
and it looks as what I expected. 

After I did make some modification of id.po, then sent a command sudo
make install from po/ directory. But I cannot see any changes in LyX
svn. I tried to reconfigure, from LyX and restarted. I did not see the
changes..Did I miss something,why I did not see the changes.

Regards
was



Re: [PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Jean-Marc Lasgouttes
Edwin Leuven edwin.leu...@ensae.fr writes:

 jean-marc wrote:
 the following patch [...] implements inset-begin/end which
 do not exactly do what you think they do ;) 

 perhaps they need different names then? inset-goto-begin/end ...

Well, they look like buffer-begin or line-begin. The only difference is
that they may escape the inset. If people do not like this escape
functionality I can make it conditional to an argument. My view is:
- this escape functionality is great in interactive use
- it may suck in scripted use.

What I'd like to implement too is a inset-select (like select all) lfun
that grows outside when used repeatedly (does this make sense??).

JMarc


Re: New Language Testing

2009-03-16 Thread Jean-Marc Lasgouttes
Waluyo Adi Siswanto was.u...@gmail.com writes:
 I did successfully compile the svn and set the language to ID language
 and it looks as what I expected. 

 After I did make some modification of id.po, then sent a command sudo
 make install from po/ directory. But I cannot see any changes in LyX
 svn. I tried to reconfigure, from LyX and restarted. I did not see the
 changes..Did I miss something,why I did not see the changes.

You need to restart LyX when installing a new translation. Reconfigure
should not be needed.

JMarc


Re: New Language Testing

2009-03-16 Thread Waluyo Adi Siswanto
On Mon, 2009-03-16 at 16:58 +0100, Jean-Marc Lasgouttes wrote:
 Waluyo Adi Siswanto was.u...@gmail.com writes:
  I did successfully compile the svn and set the language to ID language
  and it looks as what I expected. 
 
  After I did make some modification of id.po, then sent a command sudo
  make install from po/ directory. But I cannot see any changes in LyX
  svn. I tried to reconfigure, from LyX and restarted. I did not see the
  changes..Did I miss something,why I did not see the changes.
 
 You need to restart LyX when installing a new translation. Reconfigure
 should not be needed.
 
 JMarc

I did restart (close and run lyx again), did not recognise the
modification of the id.po by 'sudo make install' from this po/ folder.
I checked the locale directory.. it looks it creates mo the latest time.

was



Re: Branches UI

2009-03-16 Thread Richard Heck

Guenter Milde wrote:

On 2009-03-16, Pavel Sanda wrote:

  

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.



Great.

  

- introduce actvation/deactivation through the context menu



Great as well. 

How does it behave in a parent/child setting? 


  (De-) activation via a context menu is only helpful, if it is also
  considered in the output. Currently (1.6.2), there is no effect if I
  change the activation in the child's DocumentSettings Branches
  dialogue (bug # 5851).

  
I think what this is likely to do is affect the setting for the current 
buffer. We should check that, and I'm not sure myself how we would want 
it to behave. As for 5851, I'll have another look, with the test docs 
you uploaded, later today, I hope, or tomorrow.


rh



Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda sa...@lyx.org writes:
 - introduce actvation/deactivation through the context menu
   (2 JMarc - i tried your proposal through branch-activate lfun, but
   when i come to thepoint when i needed to copy the whole code from
   next-inset-toggle lfun i returned to the idea of enhancing
   our own inset-toggle.)

With the following patch, which _seems_ to work with inset-toggle and
already simplifies stuff, it would be trivial to implement. This patch
should also be extended to encompass INSET_MODIFY if the approach is
considered to be sound.

What shall I do if I remove next-inset-toggle? Just indicate it in
release notes? 

A version of this could go to branch (but keeping next-inset-toggle and
friends as synomims of inset-xxx)

JMarc

svndiff

Index: src/LyXAction.cpp
===
--- src/LyXAction.cpp	(révision 28814)
+++ src/LyXAction.cpp	(copie de travail)
@@ -2254,7 +2254,7 @@ void LyXAction::init()
  * \li Origin: lasgouttes, 19 Jul 2001
  * \endvar
  */
-		{ LFUN_INSET_TOGGLE, inset-toggle, ReadOnly, Hidden },
+		{ LFUN_INSET_TOGGLE, inset-toggle, ReadOnly | AtPoint, Hidden },
 /*!
  * \var lyx::FuncCode lyx::LFUN_ALL_INSETS_TOGGLE
  * \li Action: Toggles (open/closes) all collapsable insets (of a given type) in the document.
Index: src/BufferView.cpp
===
--- src/BufferView.cpp	(révision 28813)
+++ src/BufferView.cpp	(copie de travail)
@@ -926,12 +926,10 @@ FuncStatus BufferView::getStatus(FuncReq
 		break;
 	}
 
-	case LFUN_NEXT_INSET_TOGGLE: 
 	case LFUN_NEXT_INSET_MODIFY: {
 		// this is the real function we want to invoke
 		FuncRequest tmpcmd = cmd;
-		tmpcmd.action = (cmd.action == LFUN_NEXT_INSET_TOGGLE) 
-			? LFUN_INSET_TOGGLE : LFUN_INSET_MODIFY;
+		tmpcmd.action = LFUN_INSET_MODIFY;
 		// if there is an inset at cursor, see whether it
 		// handles the lfun, other start from scratch
 		Inset * inset = cur.nextInset();
@@ -1380,35 +1378,6 @@ bool BufferView::dispatch(FuncRequest co
 		processUpdateFlags(Update::SinglePar | Update::FitCursor);
 		break;
 	}
-	case LFUN_NEXT_INSET_TOGGLE: {
-		// create the the real function we want to invoke
-		FuncRequest tmpcmd = cmd;
-		tmpcmd.action = LFUN_INSET_TOGGLE;
-		// if there is an inset at cursor, see whether it
-		// wants to toggle.
-		Inset * inset = cur.nextInset();
-		if (inset) {
-			if (inset-isActive()) {
-Cursor tmpcur = cur;
-tmpcur.pushBackward(*inset);
-inset-dispatch(tmpcur, tmpcmd);
-if (tmpcur.result().dispatched())
-	cur.dispatched();
-			} else 
-inset-dispatch(cur, tmpcmd);
-		}
-		// if it did not work, try the underlying inset.
-		if (!inset || !cur.result().dispatched())
-			cur.dispatch(tmpcmd);
-
-		if (!cur.result().dispatched())
-			// It did not work too; no action needed.
-			break;
-		cur.clearSelection();
-		processUpdateFlags(Update::SinglePar | Update::FitCursor);
-		break;
-	}
-
 	case LFUN_NEXT_INSET_MODIFY: {
 		// create the the real function we want to invoke
 		FuncRequest tmpcmd = cmd;
Index: src/LyXAction.h
===
--- src/LyXAction.h	(révision 28813)
+++ src/LyXAction.h	(copie de travail)
@@ -68,7 +68,8 @@ public:
 		NoBuffer = 2, // Can be used when there is no document open
 		Argument = 4, // Requires argument
 		NoUpdate = 8, // Does not (usually) require update
-		SingleParUpdate = 16 // Usually only requires this par updated
+		SingleParUpdate = 16, // Usually only requires this par updated
+		AtPoint = 32, // dispatch first to inset at cursor if there is one
 	};
 
 	LyXAction();
Index: src/LyXFunc.cpp
===
--- src/LyXFunc.cpp	(révision 28813)
+++ src/LyXFunc.cpp	(copie de travail)
@@ -659,6 +659,13 @@ FuncStatus LyXFunc::getStatus(FuncReques
 			enable = false;
 			break;
 		}
+
+		// Is this a function that acts on inset at point?
+		Inset * inset = view()-cursor().nextInset();
+		if (lyxaction.funcHasFlag(cmd.action, LyXAction::AtPoint)
+		 inset  inset-getStatus(view()-cursor(), cmd, flag))
+			break;
+
 		if (!getLocalStatus(view()-cursor(), cmd, flag))
 			flag = view()-getStatus(cmd);
 	}
@@ -1705,6 +1712,20 @@ void LyXFunc::dispatch(FuncRequest const
 break;
 			}
 
+			// Is this a function that acts on inset at point?
+			Inset * inset = view()-cursor().nextInset();
+			if (lyxaction.funcHasFlag(action, LyXAction::AtPoint)
+			 inset) {
+view()-cursor().result().dispatched(true);
+view()-cursor().result().update(Update::FitCursor | Update::Force);
+FuncRequest tmpcmd = cmd;
+inset-dispatch(view()-cursor(), tmpcmd);
+if (view()-cursor().result().dispatched()) {
+	updateFlags = view()-cursor().result().update();
+	break;
+}
+			}
+
 			// Let the current Cursor dispatch its own actions.
 			Cursor old = view()-cursor();
 			view()-cursor().getPos(cursorPosBeforeDispatchX_,

Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda sa...@lyx.org writes:
 i started to use branches lately and i found out that our UI for them
 is bit annoying since every other change needs tobe done through
 preferences dislog.

 the attached patches:
 - introduce new menu item for defining new branch, so you can directly
   put new branch into the document.

What is this branch_inset_insert thing. It looks kind of wrong.

 - introduce actvation/deactivation through the context menu

Good idea (but as I said I do not like the implementation)

 - fix already presesnt bug for update status of branch inset.

What is that?

JMarc



Re: Quotes and document settings

2009-03-16 Thread Richard Heck

Jürgen Spitzmüller wrote:

Vincent van Ravesteijn - TNW wrote:
  

Or is it just a missing feature that would enable the user to specify a
quote style per quote (and then choose between the document default or
override this default) ?



http://bugzilla.lyx.org/show_bug.cgi?id=1499

(btw have a look at the csquotes package, and you'll never want to use LyX's 
quote inset again).


  
Should we try to get rid of the quote inset and replace it with a 
csquote inset? You could ALMOST do it as an InsetFlex, though not quite, 
due to drawing issues. But surely it wouldn't be that hard.


Of course, if we did do that, then we have another reason to address 
3-box thing...


rh



Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
Richard Heck wrote:
 Should we try to get rid of the quote inset and replace it with a
 csquote inset? You could ALMOST do it as an InsetFlex, though not quite,
 due to drawing issues. But surely it wouldn't be that hard.

I don't think so. Hard-coded quotation marks are valuable in itself (sometimes 
I prefer them). Apart from that, we have to consider docbook.

 Of course, if we did do that, then we have another reason to address
 3-box thing...

I'd implement it in the InsetQuote rather.

Jürgen


Re: Quotes and document settings

2009-03-16 Thread rgheck

Jürgen Spitzmüller wrote:

Richard Heck wrote:
  

Should we try to get rid of the quote inset and replace it with a
csquote inset? You could ALMOST do it as an InsetFlex, though not quite,
due to drawing issues. But surely it wouldn't be that hard.



I don't think so. Hard-coded quotation marks are valuable in itself (sometimes 
I prefer them). Apart from that, we have to consider docbook.


  

OK, so don't replace it. But having native csquote support would be nice.


Of course, if we did do that, then we have another reason to address
3-box thing...



I'd implement it in the InsetQuote rather.

  
That seems hard (i.e., nearly impossible), since csquotes provides 
commands, with a beginning and an end, whereas InsetQuote is a 
standalone thing. You could certainly have InsetQuote sometimes output 
\enquote{ and sometimes output }, but I'm not sure how you'd keep 
them sync'd.


rh



Re: [Cvslog] r28721 - /lyx-devel/trunk/lib/ui/stdcontext.inc

2009-03-16 Thread Pavel Sanda
sa...@lyx.org wrote:
 Author: sanda
 Date: Sat Mar  7 22:44:21 2009
 New Revision: 28721
 
 URL: http://www.lyx.org/trac/changeset/28721
 Log:
 Add open/close to context menus, solve some shortcut conflicts

Juergen?

 
 Modified:
 lyx-devel/trunk/lib/ui/stdcontext.inc
 
 Modified: lyx-devel/trunk/lib/ui/stdcontext.inc
 URL: 
 http://www.lyx.org/trac/file/lyx-devel/trunk/lib/ui/stdcontext.inc?rev=28721
 ==
 --- lyx-devel/trunk/lib/ui/stdcontext.inc (original)
 +++ lyx-devel/trunk/lib/ui/stdcontext.inc Sat Mar  7 22:44:21 2009
 @@ -142,11 +142,14 @@
   Item Frameless|l next-inset-modify changetype Frameless
   Item Simple frame|f next-inset-modify changetype Boxed
   Item Simple frame, page breaks|p next-inset-modify 
 changetype Framed
 - Item Oval, thin|O next-inset-modify changetype ovalbox
 + Item Oval, thin|a next-inset-modify changetype ovalbox
   Item Oval, thick|v next-inset-modify changetype Ovalbox
   Item Drop Shadow|w next-inset-modify changetype Shadowbox
   Item Shaded background|b next-inset-modify changetype Shaded
 - Item Double frame|D next-inset-modify changetype Doublebox
 + Item Double frame|u next-inset-modify changetype Doublebox
 + Separator
 + OptItem Open Inset|O next-inset-toggle open
 + OptItem Close Inset|C next-inset-toggle close
   Separator
   Item Dissolve Inset|D inset-dissolve
   Item Settings...|S inset-settings box
 @@ -158,8 +161,11 @@
  
   Menu context-note
   Item LyX Note|N next-inset-modify note Note Note
 - Item Comment|C next-inset-modify note Note Comment
 + Item Comment|m next-inset-modify note Note Comment
   Item Greyed Out|G next-inset-modify note Note Greyedout
 + Separator
 + OptItem Open Inset|O next-inset-toggle open
 + OptItem Close Inset|C next-inset-toggle close
   Separator
   Item Dissolve Inset|D inset-dissolve
   End
 
 
 ___
 Cvslog mailing list
 cvs...@lyx.org
 http://www.lyx.org/mailman/listinfo/cvslog


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote:
  i started to use branches lately and i found out that our UI for them
  is bit annoying since every other change needs tobe done through
  preferences dislog.
 
  the attached patches:
  - introduce new menu item for defining new branch, so you can directly
put new branch into the document.
 
 What is this branch_inset_insert thing. It looks kind of wrong.

the purpose is to automatically insert the branch inset after establishing
new branch. bit hackish, yes, but i didn't find better way how to do it.
perhaps you have some idea?
 
  - fix already presesnt bug for update status of branch inset.
 
 What is that?

as the commit message says:
Context-branch menu uselessly shows both open/close items.

pavel


[PATCH] Bug 1492

2009-03-16 Thread rgheck


So this seems to fix this old bug. But I'm thinking there's some reason 
it's too easy. Someone want to tell me why?


rh

Index: frontends/qt4/GuiDocument.cpp
===
--- frontends/qt4/GuiDocument.cpp	(revision 28820)
+++ frontends/qt4/GuiDocument.cpp	(working copy)
@@ -168,10 +168,11 @@
 		//   2. Description (lexicographic)
 		LayoutFile const  tc1 = LayoutFileList::get()[lhs];
 		LayoutFile const  tc2 = LayoutFileList::get()[rhs];
+		int const rel = compare_no_case(
+			translateIfPossible(from_utf8(tc1.description())),
+			translateIfPossible(from_utf8(tc2.description(;
 		return (tc1.isTeXClassAvailable()  !tc2.isTeXClassAvailable()) ||
-			(tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable() 
-			 translateIfPossible(from_utf8(tc1.description()))
-			  translateIfPossible(from_utf8(tc2.description(;
+			(tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable()  rel  0);
 	}
 };
 


Re: Branches UI

2009-03-16 Thread rgheck

Pavel Sanda wrote:

Jean-Marc Lasgouttes wrote:
  

i started to use branches lately and i found out that our UI for them
is bit annoying since every other change needs tobe done through
preferences dislog.

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.
  

What is this branch_inset_insert thing. It looks kind of wrong.



the purpose is to automatically insert the branch inset after establishing
new branch. bit hackish, yes, but i didn't find better way how to do it.
perhaps you have some idea?

  
What does one already do to insert a branch inset? Can't we just use 
that, and if the name given isn't already known, add it to the branch list?


rh



Re: Keyboard Shortcuts (fwd)

2009-03-16 Thread Rich Shepard

On Fri, 13 Mar 2009, Rich Shepard wrote:


 I copied /usr/local/share/lyx/bind/emacs.bind to ~/.lyx/bind/my.bind and
tested the key bindings against a document. No difference: when I press
[Del] I get the spade playing card symbol to the left of the point rather
than deleting the character to the right of the point.

 When I grepped my.bind for 'Del' and 'Delete' I found no binding for that
key by itself. There is a C-Delete bound to word-delete-forward, and a
S-KP_Delete bound to cut, but no Delete by itself. As a matter of fact, the
[Del] key is not bound to anything in cua.bind, emacs.bind, or user.bind.
For what it's worth, in the latter file it's explicitly unbound from
char-delete-forward.

 I find this stange. I tend to use the [Del] key and my mini-keyboard
doesn't have a numeric keypad in any case. From my user perspective, this is
a bug.

 How can I make the [Del] key delete the character immediately to the
right?


  Well, I guess all I can do is not use the Delete key since no one seems to
know why it won't work since the upgrade to 1.6.1. So, I'll unsubscribe from
this list.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Richard Heck wrote:
 What does one already do to insert a branch inset? Can't we just use that, 
 and if the name given isn't already known, add it to the branch list?

the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel


Re: Branches UI

2009-03-16 Thread Vincent van Ravesteijn

Pavel Sanda schreef:

Richard Heck wrote:
  
What does one already do to insert a branch inset? Can't we just use that, 
and if the name given isn't already known, add it to the branch list?



the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel
  

Why not branch-new-insert ? This one can fire branch-new.

I don't like the branch-add, because it looks too much like 
branch-insert. And I don't like the Add new branch menuitem, because I 
wouldn't expect that that would insert something into my document (yes, 
I know it is in the Insert menu), so I'd prefer (Insert) New branch.


+
+#
+# InsetCollapsable context menu
+#
+   


I think you mean InsetBranch context menu.

Vincent


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Vincent van Ravesteijn wrote:
 Pavel Sanda schreef:
 Richard Heck wrote:
   
 What does one already do to insert a branch inset? Can't we just use 
 that, and if the name given isn't already known, add it to the branch 
 list?
 

 the problem here that we dont know the name user has given to us,
 so command-sequence etc can't be used.

 pavel
   
 Why not branch-new-insert ? This one can fire branch-new.

now you are talking about lfun or parameter name?

 Insert menu), so I'd prefer (Insert) New branch.

no problem with me

 +
 +#
 +# InsetCollapsable context menu
 +#
 +   
 I think you mean InsetBranch context menu.

yes thats cutpaste bug.
pavel


Re: Branches UI

2009-03-16 Thread Vincent van Ravesteijn

Pavel Sanda schreef:

Vincent van Ravesteijn wrote:
  

Pavel Sanda schreef:


Richard Heck wrote:
  
  
What does one already do to insert a branch inset? Can't we just use 
that, and if the name given isn't already known, add it to the branch 
list?



the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel
  
  

Why not branch-new-insert ? This one can fire branch-new.



now you are talking about lfun or parameter name?
  

LFUNs yes.
  

Insert menu), so I'd prefer (Insert) New branch.



no problem with me

  

I mean Insert new branch _or_  New branch, just to be sure.

Vincent


Re: Keyboard Shortcuts (fwd)

2009-03-16 Thread Bo Peng
  Well, I guess all I can do is not use the Delete key since no one seems to
 know why it won't work since the upgrade to 1.6.1. So, I'll unsubscribe from
 this list.

I experienced something like this when I developed the new shortcut
dialog with certain combination of os/qt/lyx but I could not repeat it
now. If you could PM me your bind file, and tell me you os and lyx
version, I might be able to help.

Cheers,
Bo, retired lyx developer.


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Vincent van Ravesteijn wrote:
 Why not branch-new-insert ? This one can fire branch-new.
 

 now you are talking about lfun or parameter name?
   
 LFUNs yes.

hmm i somehow didn't like the overpopulation - we would have
branch-insert, branch-new-insert, branch-new.

pavel

ps: i have limited access to net now, so i wont be much responsive
in the days around.


Re: eLyXer logo

2009-03-16 Thread Alex Fernandez
On Mon, Mar 16, 2009 at 4:03 AM, Uwe Stöhr uwesto...@web.de wrote:
 What do you mean with won't display right? When compiling the file to a
 PDF using pdflatex, it is correctly shown. (See the PDF here:
 http://wiki.lyx.org/LyX/DocumentationDevelopment#Math )
 Withing LyX it also looks correct - there's the command \mathclap as
 TeX-Code, because LyX's math editor doesn't have native support for such a
 special feature.

The LyX code looked weird to me:
\begin_inset Formula \[
\sum_{\mathclap{\substack{0k1000\\
\\k\,\in\,\mathbb{N}}
}}^{n}k^{-2}\]

What with the double slash in \\k. But if you confirm it is correct
then it must be a parsing error.

Thanks,

Alex.


Re: Keyboard Shortcuts

2009-03-16 Thread rgheck

Rich Shepard wrote:

On Fri, 13 Mar 2009, Rich Shepard wrote:
When I grepped my.bind for 'Del' and 'Delete' I found no binding for 
that

key by itself. There is a C-Delete bound to word-delete-forward, and a
S-KP_Delete bound to cut, but no Delete by itself. As a matter of 
fact, the
[Del] key is not bound to anything in cua.bind, emacs.bind, or 
user.bind.

For what it's worth, in the latter file it's explicitly unbound from
char-delete-forward.

That is very likely the problem. The file user.bind normally holds the 
changes the user has made in the shortcuts dialog, and it's read last, 
so the key is being unbound when that file is loaded. Try deleting the 
offending line, and all (hopefully) will be well. Or you can go into the 
shortcuts dialog and search for char-delete-forward, and then restore it.


As for why it got unbound, that's a mystery. Maybe you did it by 
accident somehow. But it probably doesn't actually have anything to do 
with 1.6.2, in the end.



I find this stange. I tend to use the [Del] key and my mini-keyboard
doesn't have a numeric keypad in any case. From my user perspective, 
this is

a bug.

How can I make the [Del] key delete the character immediately to the
right?


The binding is in site.bind, which sets system-wide bindings that are 
independent of specific platforms.


rh



Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda sa...@lyx.org writes:
 What is this branch_inset_insert thing. It looks kind of wrong.

 the purpose is to automatically insert the branch inset after establishing
 new branch. bit hackish, yes, but i didn't find better way how to do it.
 perhaps you have some idea?

I am not so sure that this is helpful enough to deserve this combined
function.

  
  - fix already presesnt bug for update status of branch inset.
 
 What is that?

 as the commit message says:
 Context-branch menu uselessly shows both open/close items.

Thanks, I'll have  alook.

JMarc


Re: Update on aussie phaseout and new server

2009-03-16 Thread Jean-Marc Lasgouttes
Lars Gullik Bjønnes lar...@lyx.org writes:

 We (I) and agreed deadline with trolltech/nokie that aussie will be turned
 off the 23. This is in one week.

 Before then all services running on aussie must be moved to other places. So
 far mail for lyx developers have been moved.

OK

 We have got a new (virtual) server at the University of Bonn. The server can
 be reached at lyx.lyx.org. This server is running debian,
 and I am having some problems adjusting, nothing major, but debian is a
 novel experience to me.

Question: how is this server maintained? Do we have good reasons to be
confident that it will stay afloat better than aussie did?

 So far I have got subversion and trac up and going. Subversion read-only for
 now.

I can confirm that trac is here :)

 I know a bit too little about the new scheme you are using for the web
 pages, so if you one of you have
 a better grip give me a holler and we can work together at getting that up
 and working. Chr has said that we will
 help out with the wiki.

The web site _is_ the wiki. Part of the configuration files are under
svn (www-user). I am not 100% sure of the details, but this has to be on
the wiki!

 Bugzilla is what worries me the most, our installation on aussie is old and
 I have no idea how easy it will be to domp that db
 and reload/upgrade in a different location. So if any of you really know
 bugzilla installation/administratiion give a holler.

And could it be possible to migrate buzilla to the trac that is on
aussie and from there to upgrade to the new trac.

Sorry I can't be more helpful.

 Anyhow... since the deadline is looming we have to concentrate efforts, and
 perhaps, in a couple of cases (wiki and bugzilla)
 live with a inferiour solution for a short time.

Agreed.

 Short after aussie is turned off I will move it to my place, first to have a
 place for the old stuff that we can use to get the new server up
 and going, second as a backup server for later. (non-public, but accesible
 for lyx devvies)

Good.

 On the agenda now is to move the official svn server over to lyx.lyx.org,
 the work has been done (only requires an update every day, to keep it in
 sync).

Perfect. So this mean that we abandon sourceforge completely, right?

So far, the plan looks good.

JMarc


Re: Update on aussie phaseout and new server

2009-03-16 Thread rgheck

Lars Gullik Bjønnes wrote:

This is to give you an update on what is happening.

  
Lars, just a word of thanks for doing all of this. Must be a real pain 
in the ())(!


rh



Re: Update on aussie phaseout and new server

2009-03-16 Thread Bo Peng
 Perfect. So this mean that we abandon sourceforge completely, right?

 So far, the plan looks good.

Right, after all the debates, Lars dictates.

Bo


Re: eLyXer logo

2009-03-16 Thread Uwe Stöhr

Alex Fernandez schrieb:


The LyX code looked weird to me:
\begin_inset Formula \[
\sum_{\mathclap{\substack{0k1000\\
\\k\,\in\,\mathbb{N}}
}}^{n}k^{-2}\]

What with the double slash in \\k. But if you confirm it is correct
then it must be a parsing error.


The \\ starts a new line. Therefore one correctly gets:


0k1000

k \in \mathbb{N}


(three rows, one is empty)

regards Uwe


Re: [Cvslog] r28721 - /lyx-devel/trunk/lib/ui/stdcontext.inc

2009-03-16 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
 Juergen?

OK.

Jürgen


Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
rgheck wrote:
  I'd implement it in the InsetQuote rather.
 
   

 That seems hard (i.e., nearly impossible), since csquotes provides
 commands, with a beginning and an end, whereas InsetQuote is a
 standalone thing. You could certainly have InsetQuote sometimes output
 \enquote{ and sometimes output }, but I'm not sure how you'd keep
 them sync'd.

You can use f. ex.

\MakeAutoQuote{»}{«}
\MakeInnerQuote{¶}

and then

This is »quoted and »sub-quoted« text« and some ¶single-quoted¶ text.

As for syncing, Im thinking of some kind of syntax highlighting.

Jürgen


Re: [patch] bug 5709: multicolumn alignment cannot be changed via toolbar

2009-03-16 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
 http://bugzilla.lyx.org/show_bug.cgi?id=5709

 This long standing bug is now easy to fix by means of command-alternatives.
 However, the toolbar is not yet prepared to command-alternatives. The
 attached patch implements a simple solution: just use the icon for the
 first of the alternative commands in the sequence. This works well for the
 case in question (the icons just need to be renamed to their m-*
 counterparts).

 Objections?

So what shall we do with this? It's already in trunk (r28280).

Jürgen


Re: r28340 for branch?

2009-03-16 Thread Jürgen Spitzmüller
rgheck wrote:
> I think this one got approved a long time ago and held for 1.6.3, but I
> thought I'd better ask again.

OK.

Jürgen


Re: LyX 1.6.2

2009-03-16 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
> They just fixed the problem.

Thanks, I reset the links.

Jürgen


Re: r28773 - in /lyx-devel/branches/BRANCH_1_6_X: configure.a...

2009-03-16 Thread Jürgen Spitzmüller
Vincent van Ravesteijn wrote:
> Err, see below/attached.

Oh ... Yes, OK.

> Ready for the rest ;-)... ?

Give me some time to breathe...

Jürgen


Branches UI

2009-03-16 Thread Pavel Sanda
hi,

i started to use branches lately and i found out that our UI for them
is bit annoying since every other change needs tobe done through
preferences dislog.

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.
- introduce actvation/deactivation through the context menu
  (2 JMarc - i tried your proposal through branch-activate lfun, but
  when i come to thepoint when i needed to copy the whole code from
  next-inset-toggle lfun i returned to the idea of enhancing
  our own inset-toggle.)
- fix already presesnt bug for update status of branch inset.

objections?

pavel
commit 21e518027cae7a242b0b1bbc54766120d9f9a49e
Author: Pavel Sanda 
Date:   Sat Mar 14 11:51:57 2009 +0100

Add LFUN_BRANCH_ADD, add new branch command to ui.

diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 12638f8..28fb43f 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -443,6 +443,8 @@ Menuset
End
 
Menu "insert_branches"
+   Item "Add New Branch|A" "branch-add branch_inset_insert"
+   Separator
Branches
End

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 3b31fd5..18fbeec 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -909,6 +909,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
case LFUN_NOTES_MUTATE:
case LFUN_ALL_INSETS_TOGGLE:
case LFUN_STATISTICS:
+   case LFUN_BRANCH_ADD:
flag.setEnabled(true);
break;
 
@@ -1536,6 +1537,35 @@ bool BufferView::dispatch(FuncRequest const & cmd)
break;
}
 
+   case LFUN_BRANCH_ADD: {
+   BranchList & branch_list = buffer_.params().branchlist();
+   docstring branch_name = from_utf8(cmd.getArg(0));
+   bool branch_insert = false;
+   if (branch_name == "branch_inset_insert") {
+   branch_insert = true;
+   branch_name = from_utf8(cmd.getArg(1));
+   }
+   if (branch_name.empty())
+   if (!Alert::askForText(branch_name, _("Branch name")) ||
+   branch_name.empty())
+   return false;
+
+   if (!branch_list.add(branch_name)) {
+   cur.message(from_utf8(N_("Branch already exists.")));
+   return false;
+   }
+   Branch const * branch = branch_list.find(branch_name);
+   string const x11hexname = X11hexname(branch->color());
+   docstring const str = branch_name + ' ' + 
from_ascii(x11hexname);
+   lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
+
+   if (branch_insert)
+   lyx::dispatch(FuncRequest(LFUN_BRANCH_INSERT, 
branch_name));
+
+   cur.message(branch_name + " " + from_utf8(N_("branch added.")));
+   break;
+   }
+
default:
return false;
}
diff --git a/src/FuncCode.h b/src/FuncCode.h
index 503f30f..c0d39a4 100644
--- a/src/FuncCode.h
+++ b/src/FuncCode.h
@@ -418,6 +418,7 @@ enum FuncCode
LFUN_VC_COMMAND,
LFUN_MATH_FONT_STYLE,
LFUN_PHANTOM_INSERT,// uwestoehr, 20090130
+   LFUN_BRANCH_ADD,
 
LFUN_LASTACTION // end of the table
 };
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 137f760..c8755bb 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -3158,6 +3158,17 @@ void LyXAction::init()
  * \endvar
  */
{ LFUN_BRANCH_DEACTIVATE, "branch-deactivate", Argument, Buffer 
},
+/*!
+ * \var lyx::FuncCode lyx::LFUN_BRANCH_ADD
+ * \li Action: Add new branch into the document
+ * \li Syntax: branch-add [] 
+ * \li Params: : branch_inset_insert - inserts branch inset at the 
current cursor position \n
+   : The new branch name
+ * \li Origin: sanda, 6 March, 2009
+ * \endvar
+ */
+   { LFUN_BRANCH_ADD, "branch-add", Argument, Buffer },
+
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_COPY_LABEL_AS_REF

commit f50a1e07e3a25445a8f3e5d73582dde8c0d055f6
Author: Pavel Sanda 
Date:   Fri Mar 13 00:15:00 2009 +0100

Context-branch menu uselessly shows both open/close items.

diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 468933b..2501a40 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -178,8 +178,11 @@ bool InsetBranch::getStatus(Cursor & cur, FuncRequest 
const & cmd,
break;
 
case LFUN_INSET_TOGGLE:
-   if (cmd.argument() == "open" || cmd.argument() == "close" ||
-   cmd.argument() == "toggle")
+   if (cmd.argument() == "open")
+   flag.setEnabled(status_ != Open);
+   else if (cmd.argument() == "close")
+

Re: Branches UI

2009-03-16 Thread Guenter Milde
On 2009-03-16, Pavel Sanda wrote:

> the attached patches:
> - introduce new menu item for defining new branch, so you can directly
>   put new branch into the document.

Great.

> - introduce actvation/deactivation through the context menu

Great as well. 

How does it behave in a parent/child setting? 

  (De-) activation via a context menu is only helpful, if it is also
  considered in the output. Currently (1.6.2), there is no effect if I
  change the activation in the child's Document>Settings Branches
  dialogue (bug # 5851).

There are some more related bugs:

2311add a color option for branches
4128Branches cannot be renamed
4462Pasting content with a branch don't add branch to settings 

Thanks

Günter



Re: eLyXer logo

2009-03-16 Thread Guenter Milde
On 2009-03-15, Uwe Stöhr wrote:
> > I wonder though if ELyXer should not be integrated into LyX proper.
> > We distribute a number of python scripts already, IMHO adding yours
> > which is clearly a LyX spin off would just be natural.

> I think we'll of course distribute ELyXer with LyX when it is stable
> enough. 

I am impressed on the speed ELyXer developed and hope for an inclusion
into LyX (at least as a "recognize and add to converters" configure
option).

But I believe for a better long-time integration, ELyXer should
definitely use the lyx2lyx parsing scripts, so that it automatically
keeps up with file format changes.

I had a look at lyx2lyx (considering to write a reStructuredText
exporter) but badly miss some documentation.

Is there documentation on lyx2lyx or where should I ask my questions?

Günter



Re: eLyXer logo

2009-03-16 Thread Abdelrazak Younes

Guenter Milde wrote:

On 2009-03-15, Uwe Stöhr wrote:
  

I wonder though if ELyXer should not be integrated into LyX proper.
We distribute a number of python scripts already, IMHO adding yours
which is clearly a LyX spin off would just be natural.
  


  

I think we'll of course distribute ELyXer with LyX when it is stable
enough. 



I am impressed on the speed ELyXer developed and hope for an inclusion
into LyX (at least as a "recognize and add to converters" configure
option).

But I believe for a better long-time integration, ELyXer should
definitely use the lyx2lyx parsing scripts, so that it automatically
keeps up with file format changes.

I had a look at lyx2lyx (considering to write a reStructuredText
exporter) but badly miss some documentation.

Is there documentation on lyx2lyx or where should I ask my questions?
  


Here and to Jose :-)

Once you have an answer, you can add some comments to the source code. 
Do we have something like doxygen for python by the way? If yes, is it used?


Jose, I seem to remember you worked a lot on lyx2lyx during last meeting 
but you did not commit anything, did you?


Abdel.



Re: eLyXer logo

2009-03-16 Thread José Matos
On Monday 16 March 2009 10:35:31 Guenter Milde wrote:
> I had a look at lyx2lyx (considering to write a reStructuredText
> exporter) but badly miss some documentation.
>
> Is there documentation on lyx2lyx or where should I ask my questions?

This list is the best place to ask questions about lyx2lyx. :-)

The fact that documentation is not there is my fault. :-(

> Günter

-- 
José Abílio


Re: eLyXer logo

2009-03-16 Thread Kornel Benko
Am 2009-03-16 schrieb Guenter Milde:
> On 2009-03-15, Uwe Stöhr wrote:
> > > I wonder though if ELyXer should not be integrated into LyX proper.
> > > We distribute a number of python scripts already, IMHO adding yours
> > > which is clearly a LyX spin off would just be natural.
> 
> > I think we'll of course distribute ELyXer with LyX when it is stable
> > enough. 
> 
> I am impressed on the speed ELyXer developed and hope for an inclusion
> into LyX (at least as a "recognize and add to converters" configure
> option).
> 
> But I believe for a better long-time integration, ELyXer should
> definitely use the lyx2lyx parsing scripts, so that it automatically
> keeps up with file format changes.

I think, we can use lyx itself for it.
This is what I have done, (and is now working)
1. Define new html format, say HTML2 (extension html)
Check: documentformat
Viewer: firefox
2.) define new converter form lyx1.5.X to HTML2 with
command: elyxer --quiet $$i $$o
options: originaldir


Kornel



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


Re: Stats in site?

2009-03-16 Thread Pavel Sanda
Piero Faustini wrote:
> e.g. some stats about program download,

this can't be measured in any reasonable way, since most of downloads
won't go from lyx.org site.

>where are those 
> visitors from, and so on?

this has been done last years and its the results are in the wiki.
pavel


[PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Jean-Marc Lasgouttes

I committed the following patch which implements inset-begin/end which
do not exactly do what you think they do ;) For example, for
buffer-begin
- if cursor is in the middle go to the beginning of the inset
- if it is already at the beginning, go at the beginning of the
enclosing inset

This is intended to be a quick way to move in nested insets (which
happen a lot for me with branches and minipages).

I am open to comments about the behaviour and possible bindings for
emacs and mac. For cua, I chose C-M-Home/End.

This is something that could go to branch after some polish.

JMarc

svndiff

Index: src/LyXAction.cpp
===
--- src/LyXAction.cpp	(révision 28813)
+++ src/LyXAction.cpp	(copie de travail)
@@ -1010,6 +1010,49 @@ void LyXAction::init()
 		{ LFUN_BUFFER_END_SELECT, "buffer-end-select", ReadOnly, Edit },
 
 /*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN
+ * \li Action: Move the cursor to the beginning of the current inset 
+   if it is not already there, or at the beginning of the 
+   enclosing inset otherwise
+ * \li Syntax: inset-begin
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_BEGIN, "inset-begin", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_BEGIN_SELECT
+ * \li Action: Move the cursor to the beginning of the current inset 
+   if it is not already there, or at the beginning of the 
+   enclosing inset otherwise (adding the
+   traversed text to the selection).
+ * \li Syntax: inset-begin-select
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_BEGIN_SELECT, "inset-begin-select", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_END
+ * \li Action: Move the cursor to the end of the current inset 
+   if it is not already there, or at the end of the 
+   enclosing inset otherwise
+ * \li Syntax: inset-end
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_END, "inset-end", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_END_SELECT
+ * \li Action: Move the cursor to the end of the current inset 
+   if it is not already there, or at the end of the 
+   enclosing inset otherwise (adding the
+   traversed text to the selection).
+ * \li Syntax: inset-end-select
+ * \li Origin: JMarc, 2009/03/16
+ * \endvar
+ */
+		{ LFUN_INSET_END_SELECT, "inset-end-select", ReadOnly, Edit },
+
+/*!
  * \var lyx::FuncCode lyx::LFUN_LINE_BEGIN
  * \li Action: Move the cursor to the begining of the (screen) line.
  * \li Syntax: line-begin
Index: src/Text3.cpp
===
--- src/Text3.cpp	(révision 28813)
+++ src/Text3.cpp	(copie de travail)
@@ -561,6 +561,26 @@ void Text::dispatch(Cursor & cur, FuncRe
 		cur.updateFlags(Update::FitCursor);
 		break;
 
+	case LFUN_INSET_BEGIN:
+	case LFUN_INSET_BEGIN_SELECT:
+		needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT);
+		if (cur.depth() == 1 || cur.pos() > 0)
+			needsUpdate |= cursorTop(cur);
+		else
+			cur.undispatched();
+		cur.updateFlags(Update::FitCursor);
+		break;
+
+	case LFUN_INSET_END:
+	case LFUN_INSET_END_SELECT:
+		needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT);
+		if (cur.depth() == 1 || cur.pos() < cur.lastpos())
+			needsUpdate |= cursorBottom(cur);
+		else
+			cur.undispatched();
+		cur.updateFlags(Update::FitCursor);
+		break;
+
 	case LFUN_CHAR_FORWARD:
 	case LFUN_CHAR_FORWARD_SELECT:
 		//LYXERR0(" LFUN_CHAR_FORWARD[SEL]:\n" << cur);
@@ -2378,10 +2398,14 @@ bool Text::getStatus(Cursor & cur, FuncR
 	case LFUN_PARAGRAPH_PARAMS_APPLY:
 	case LFUN_PARAGRAPH_PARAMS:
 	case LFUN_ESCAPE:
-	case LFUN_BUFFER_END:
 	case LFUN_BUFFER_BEGIN:
+	case LFUN_BUFFER_END:
 	case LFUN_BUFFER_BEGIN_SELECT:
 	case LFUN_BUFFER_END_SELECT:
+	case LFUN_INSET_BEGIN:
+	case LFUN_INSET_END:
+	case LFUN_INSET_BEGIN_SELECT:
+	case LFUN_INSET_END_SELECT:
 	case LFUN_UNICODE_INSERT:
 		// these are handled in our dispatch()
 		enable = true;
Index: src/FuncCode.h
===
--- src/FuncCode.h	(révision 28813)
+++ src/FuncCode.h	(copie de travail)
@@ -418,6 +418,12 @@ enum FuncCode
 	LFUN_VC_COMMAND,
 	LFUN_MATH_FONT_STYLE,
 	LFUN_PHANTOM_INSERT,    // uwestoehr, 20090130
+	LFUN_INSET_BEGIN,   // JMarc, 20090316
+	// 325
+	LFUN_INSET_END, // JMarc, 20090316
+	LFUN_INSET_BEGIN_SELECT,// JMarc, 20090316
+	LFUN_INSET_END_SELECT,  // JMarc, 20090316
+
 
 	LFUN_LASTACTION // end of the table
 };
Index: lib/bind/cua.bind
===
--- lib/bind/cua.bind	(révision 28813)
+++ lib/bind/cua.bind	(copie de travail)
@@ -128,6 +128,8 @@
 \bind "C-Down"		

Quotes and document settings

2009-03-16 Thread Vincent van Ravesteijn - TNW
If I use (double) quotes in my document, and I change the quote style in
the document settings later on, I would expect that the quotes that are
already in my document would adapt to this new document default ? 
 
That is what I expect from a document setting. Is this a correct
assumption and is it a bug that newly entered quotes are different from
the older ones ? 
 
Or is it just a missing feature that would enable the user to specify a
quote style per quote (and then choose between the document default or
override this default) ?
 
Vincent


Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
Vincent van Ravesteijn - TNW wrote:
> Or is it just a missing feature that would enable the user to specify a
> quote style per quote (and then choose between the document default or
> override this default) ?

http://bugzilla.lyx.org/show_bug.cgi?id=1499

(btw have a look at the csquotes package, and you'll never want to use LyX's 
quote inset again).

Jürgen


RE: [PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Edwin Leuven
jean-marc wrote:
> the following patch [...] implements inset-begin/end which
> do not exactly do what you think they do ;) 

perhaps they need different names then? inset-goto-begin/end ...

Re: New Language Testing

2009-03-16 Thread Waluyo Adi Siswanto

> 
> What you have to do is to add 'id' to the file po/LINGUAS and put id.po
> in po/. Then compile and install. After that, you can just run 'make
> install' in po/ directory when you have made a modification.
> 
> JMarc

I did successfully compile the svn and set the language to ID language
and it looks as what I expected. 

After I did make some modification of id.po, then sent a command "sudo
make install" from po/ directory. But I cannot see any changes in LyX
svn. I tried to reconfigure, from LyX and restarted. I did not see the
changes..Did I miss something,why I did not see the changes.

Regards
was



Re: [PATCH] r28814: inset-begin/end lfuns

2009-03-16 Thread Jean-Marc Lasgouttes
Edwin Leuven  writes:

> jean-marc wrote:
>> the following patch [...] implements inset-begin/end which
>> do not exactly do what you think they do ;) 
>
> perhaps they need different names then? inset-goto-begin/end ...

Well, they look like buffer-begin or line-begin. The only difference is
that they may escape the inset. If people do not like this escape
functionality I can make it conditional to an argument. My view is:
- this escape functionality is great in interactive use
- it may suck in scripted use.

What I'd like to implement too is a inset-select (like select all) lfun
that grows outside when used repeatedly (does this make sense??).

JMarc


Re: New Language Testing

2009-03-16 Thread Jean-Marc Lasgouttes
Waluyo Adi Siswanto  writes:
> I did successfully compile the svn and set the language to ID language
> and it looks as what I expected. 
>
> After I did make some modification of id.po, then sent a command "sudo
> make install" from po/ directory. But I cannot see any changes in LyX
> svn. I tried to reconfigure, from LyX and restarted. I did not see the
> changes..Did I miss something,why I did not see the changes.

You need to restart LyX when installing a new translation. Reconfigure
should not be needed.

JMarc


Re: New Language Testing

2009-03-16 Thread Waluyo Adi Siswanto
On Mon, 2009-03-16 at 16:58 +0100, Jean-Marc Lasgouttes wrote:
> Waluyo Adi Siswanto  writes:
> > I did successfully compile the svn and set the language to ID language
> > and it looks as what I expected. 
> >
> > After I did make some modification of id.po, then sent a command "sudo
> > make install" from po/ directory. But I cannot see any changes in LyX
> > svn. I tried to reconfigure, from LyX and restarted. I did not see the
> > changes..Did I miss something,why I did not see the changes.
> 
> You need to restart LyX when installing a new translation. Reconfigure
> should not be needed.
> 
> JMarc

I did restart (close and run lyx again), did not recognise the
modification of the id.po by 'sudo make install' from this po/ folder.
I checked the locale directory.. it looks it creates mo the latest time.

was



Re: Branches UI

2009-03-16 Thread Richard Heck

Guenter Milde wrote:

On 2009-03-16, Pavel Sanda wrote:

  

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.



Great.

  

- introduce actvation/deactivation through the context menu



Great as well. 

How does it behave in a parent/child setting? 


  (De-) activation via a context menu is only helpful, if it is also
  considered in the output. Currently (1.6.2), there is no effect if I
  change the activation in the child's Document>Settings Branches
  dialogue (bug # 5851).

  
I think what this is likely to do is affect the setting for the current 
buffer. We should check that, and I'm not sure myself how we would want 
it to behave. As for 5851, I'll have another look, with the test docs 
you uploaded, later today, I hope, or tomorrow.


rh



Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda  writes:
> - introduce actvation/deactivation through the context menu
>   (2 JMarc - i tried your proposal through branch-activate lfun, but
>   when i come to thepoint when i needed to copy the whole code from
>   next-inset-toggle lfun i returned to the idea of enhancing
>   our own inset-toggle.)

With the following patch, which _seems_ to work with inset-toggle and
already simplifies stuff, it would be trivial to implement. This patch
should also be extended to encompass INSET_MODIFY if the approach is
considered to be sound.

What shall I do if I remove next-inset-toggle? Just indicate it in
release notes? 

A version of this could go to branch (but keeping next-inset-toggle and
friends as synomims of inset-xxx)

JMarc

svndiff

Index: src/LyXAction.cpp
===
--- src/LyXAction.cpp	(révision 28814)
+++ src/LyXAction.cpp	(copie de travail)
@@ -2254,7 +2254,7 @@ void LyXAction::init()
  * \li Origin: lasgouttes, 19 Jul 2001
  * \endvar
  */
-		{ LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly, Hidden },
+		{ LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly | AtPoint, Hidden },
 /*!
  * \var lyx::FuncCode lyx::LFUN_ALL_INSETS_TOGGLE
  * \li Action: Toggles (open/closes) all collapsable insets (of a given type) in the document.
Index: src/BufferView.cpp
===
--- src/BufferView.cpp	(révision 28813)
+++ src/BufferView.cpp	(copie de travail)
@@ -926,12 +926,10 @@ FuncStatus BufferView::getStatus(FuncReq
 		break;
 	}
 
-	case LFUN_NEXT_INSET_TOGGLE: 
 	case LFUN_NEXT_INSET_MODIFY: {
 		// this is the real function we want to invoke
 		FuncRequest tmpcmd = cmd;
-		tmpcmd.action = (cmd.action == LFUN_NEXT_INSET_TOGGLE) 
-			? LFUN_INSET_TOGGLE : LFUN_INSET_MODIFY;
+		tmpcmd.action = LFUN_INSET_MODIFY;
 		// if there is an inset at cursor, see whether it
 		// handles the lfun, other start from scratch
 		Inset * inset = cur.nextInset();
@@ -1380,35 +1378,6 @@ bool BufferView::dispatch(FuncRequest co
 		processUpdateFlags(Update::SinglePar | Update::FitCursor);
 		break;
 	}
-	case LFUN_NEXT_INSET_TOGGLE: {
-		// create the the real function we want to invoke
-		FuncRequest tmpcmd = cmd;
-		tmpcmd.action = LFUN_INSET_TOGGLE;
-		// if there is an inset at cursor, see whether it
-		// wants to toggle.
-		Inset * inset = cur.nextInset();
-		if (inset) {
-			if (inset->isActive()) {
-Cursor tmpcur = cur;
-tmpcur.pushBackward(*inset);
-inset->dispatch(tmpcur, tmpcmd);
-if (tmpcur.result().dispatched())
-	cur.dispatched();
-			} else 
-inset->dispatch(cur, tmpcmd);
-		}
-		// if it did not work, try the underlying inset.
-		if (!inset || !cur.result().dispatched())
-			cur.dispatch(tmpcmd);
-
-		if (!cur.result().dispatched())
-			// It did not work too; no action needed.
-			break;
-		cur.clearSelection();
-		processUpdateFlags(Update::SinglePar | Update::FitCursor);
-		break;
-	}
-
 	case LFUN_NEXT_INSET_MODIFY: {
 		// create the the real function we want to invoke
 		FuncRequest tmpcmd = cmd;
Index: src/LyXAction.h
===
--- src/LyXAction.h	(révision 28813)
+++ src/LyXAction.h	(copie de travail)
@@ -68,7 +68,8 @@ public:
 		NoBuffer = 2, //< Can be used when there is no document open
 		Argument = 4, //< Requires argument
 		NoUpdate = 8, //< Does not (usually) require update
-		SingleParUpdate = 16 //< Usually only requires this par updated
+		SingleParUpdate = 16, //< Usually only requires this par updated
+		AtPoint = 32, //< dispatch first to inset at cursor if there is one
 	};
 
 	LyXAction();
Index: src/LyXFunc.cpp
===
--- src/LyXFunc.cpp	(révision 28813)
+++ src/LyXFunc.cpp	(copie de travail)
@@ -659,6 +659,13 @@ FuncStatus LyXFunc::getStatus(FuncReques
 			enable = false;
 			break;
 		}
+
+		// Is this a function that acts on inset at point?
+		Inset * inset = view()->cursor().nextInset();
+		if (lyxaction.funcHasFlag(cmd.action, LyXAction::AtPoint)
+		&& inset && inset->getStatus(view()->cursor(), cmd, flag))
+			break;
+
 		if (!getLocalStatus(view()->cursor(), cmd, flag))
 			flag = view()->getStatus(cmd);
 	}
@@ -1705,6 +1712,20 @@ void LyXFunc::dispatch(FuncRequest const
 break;
 			}
 
+			// Is this a function that acts on inset at point?
+			Inset * inset = view()->cursor().nextInset();
+			if (lyxaction.funcHasFlag(action, LyXAction::AtPoint)
+			&& inset) {
+view()->cursor().result().dispatched(true);
+view()->cursor().result().update(Update::FitCursor | Update::Force);
+FuncRequest tmpcmd = cmd;
+inset->dispatch(view()->cursor(), tmpcmd);
+if (view()->cursor().result().dispatched()) {
+	updateFlags = view()->cursor().result().update();
+	break;
+}
+			}
+
 			// Let the current Cursor dispatch its own actions.
 			Cursor old = view()->cursor();
 			

Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda  writes:
> i started to use branches lately and i found out that our UI for them
> is bit annoying since every other change needs tobe done through
> preferences dislog.
>
> the attached patches:
> - introduce new menu item for defining new branch, so you can directly
>   put new branch into the document.

What is this branch_inset_insert thing. It looks kind of wrong.

> - introduce actvation/deactivation through the context menu

Good idea (but as I said I do not like the implementation)

> - fix already presesnt bug for update status of branch inset.

What is that?

JMarc



Re: Quotes and document settings

2009-03-16 Thread Richard Heck

Jürgen Spitzmüller wrote:

Vincent van Ravesteijn - TNW wrote:
  

Or is it just a missing feature that would enable the user to specify a
quote style per quote (and then choose between the document default or
override this default) ?



http://bugzilla.lyx.org/show_bug.cgi?id=1499

(btw have a look at the csquotes package, and you'll never want to use LyX's 
quote inset again).


  
Should we try to get rid of the quote inset and replace it with a 
csquote inset? You could ALMOST do it as an InsetFlex, though not quite, 
due to drawing issues. But surely it wouldn't be that hard.


Of course, if we did do that, then we have another reason to address 
3-box thing...


rh



Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
Richard Heck wrote:
> Should we try to get rid of the quote inset and replace it with a
> csquote inset? You could ALMOST do it as an InsetFlex, though not quite,
> due to drawing issues. But surely it wouldn't be that hard.

I don't think so. Hard-coded quotation marks are valuable in itself (sometimes 
I prefer them). Apart from that, we have to consider docbook.

> Of course, if we did do that, then we have another reason to address
> 3-box thing...

I'd implement it in the InsetQuote rather.

Jürgen


Re: Quotes and document settings

2009-03-16 Thread rgheck

Jürgen Spitzmüller wrote:

Richard Heck wrote:
  

Should we try to get rid of the quote inset and replace it with a
csquote inset? You could ALMOST do it as an InsetFlex, though not quite,
due to drawing issues. But surely it wouldn't be that hard.



I don't think so. Hard-coded quotation marks are valuable in itself (sometimes 
I prefer them). Apart from that, we have to consider docbook.


  

OK, so don't replace it. But having native csquote support would be nice.


Of course, if we did do that, then we have another reason to address
3-box thing...



I'd implement it in the InsetQuote rather.

  
That seems hard (i.e., nearly impossible), since csquotes provides 
commands, with a beginning and an end, whereas InsetQuote is a 
standalone thing. You could certainly have InsetQuote sometimes output 
"\enquote{" and sometimes output "}", but I'm not sure how you'd keep 
them sync'd.


rh



Re: [Cvslog] r28721 - /lyx-devel/trunk/lib/ui/stdcontext.inc

2009-03-16 Thread Pavel Sanda
sa...@lyx.org wrote:
> Author: sanda
> Date: Sat Mar  7 22:44:21 2009
> New Revision: 28721
> 
> URL: http://www.lyx.org/trac/changeset/28721
> Log:
> Add open/close to context menus, solve some shortcut conflicts

Juergen?

> 
> Modified:
> lyx-devel/trunk/lib/ui/stdcontext.inc
> 
> Modified: lyx-devel/trunk/lib/ui/stdcontext.inc
> URL: 
> http://www.lyx.org/trac/file/lyx-devel/trunk/lib/ui/stdcontext.inc?rev=28721
> ==
> --- lyx-devel/trunk/lib/ui/stdcontext.inc (original)
> +++ lyx-devel/trunk/lib/ui/stdcontext.inc Sat Mar  7 22:44:21 2009
> @@ -142,11 +142,14 @@
>   Item "Frameless|l" "next-inset-modify changetype Frameless"
>   Item "Simple frame|f" "next-inset-modify changetype Boxed"
>   Item "Simple frame, page breaks|p" "next-inset-modify 
> changetype Framed"
> - Item "Oval, thin|O" "next-inset-modify changetype ovalbox"
> + Item "Oval, thin|a" "next-inset-modify changetype ovalbox"
>   Item "Oval, thick|v" "next-inset-modify changetype Ovalbox"
>   Item "Drop Shadow|w" "next-inset-modify changetype Shadowbox"
>   Item "Shaded background|b" "next-inset-modify changetype Shaded"
> - Item "Double frame|D" "next-inset-modify changetype Doublebox"
> + Item "Double frame|u" "next-inset-modify changetype Doublebox"
> + Separator
> + OptItem "Open Inset|O" "next-inset-toggle open"
> + OptItem "Close Inset|C" "next-inset-toggle close"
>   Separator
>   Item "Dissolve Inset|D" "inset-dissolve"
>   Item "Settings...|S" "inset-settings box"
> @@ -158,8 +161,11 @@
>  
>   Menu "context-note"
>   Item "LyX Note|N" "next-inset-modify note Note Note"
> - Item "Comment|C" "next-inset-modify note Note Comment"
> + Item "Comment|m" "next-inset-modify note Note Comment"
>   Item "Greyed Out|G" "next-inset-modify note Note Greyedout"
> + Separator
> + OptItem "Open Inset|O" "next-inset-toggle open"
> + OptItem "Close Inset|C" "next-inset-toggle close"
>   Separator
>   Item "Dissolve Inset|D" "inset-dissolve"
>   End
> 
> 
> ___
> Cvslog mailing list
> cvs...@lyx.org
> http://www.lyx.org/mailman/listinfo/cvslog


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote:
> > i started to use branches lately and i found out that our UI for them
> > is bit annoying since every other change needs tobe done through
> > preferences dislog.
> >
> > the attached patches:
> > - introduce new menu item for defining new branch, so you can directly
> >   put new branch into the document.
> 
> What is this branch_inset_insert thing. It looks kind of wrong.

the purpose is to automatically insert the branch inset after establishing
new branch. bit hackish, yes, but i didn't find better way how to do it.
perhaps you have some idea?
 
> > - fix already presesnt bug for update status of branch inset.
> 
> What is that?

as the commit message says:
Context-branch menu uselessly shows both open/close items.

pavel


[PATCH] Bug 1492

2009-03-16 Thread rgheck


So this seems to fix this old bug. But I'm thinking there's some reason 
it's too easy. Someone want to tell me why?


rh

Index: frontends/qt4/GuiDocument.cpp
===
--- frontends/qt4/GuiDocument.cpp	(revision 28820)
+++ frontends/qt4/GuiDocument.cpp	(working copy)
@@ -168,10 +168,11 @@
 		//   2. Description (lexicographic)
 		LayoutFile const & tc1 = LayoutFileList::get()[lhs];
 		LayoutFile const & tc2 = LayoutFileList::get()[rhs];
+		int const rel = compare_no_case(
+			translateIfPossible(from_utf8(tc1.description())),
+			translateIfPossible(from_utf8(tc2.description(;
 		return (tc1.isTeXClassAvailable() && !tc2.isTeXClassAvailable()) ||
-			(tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable() &&
-			 translateIfPossible(from_utf8(tc1.description()))
-			 < translateIfPossible(from_utf8(tc2.description(;
+			(tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable() && rel < 0);
 	}
 };
 


Re: Branches UI

2009-03-16 Thread rgheck

Pavel Sanda wrote:

Jean-Marc Lasgouttes wrote:
  

i started to use branches lately and i found out that our UI for them
is bit annoying since every other change needs tobe done through
preferences dislog.

the attached patches:
- introduce new menu item for defining new branch, so you can directly
  put new branch into the document.
  

What is this branch_inset_insert thing. It looks kind of wrong.



the purpose is to automatically insert the branch inset after establishing
new branch. bit hackish, yes, but i didn't find better way how to do it.
perhaps you have some idea?

  
What does one already do to insert a branch inset? Can't we just use 
that, and if the name given isn't already known, add it to the branch list?


rh



Re: Keyboard Shortcuts (fwd)

2009-03-16 Thread Rich Shepard

On Fri, 13 Mar 2009, Rich Shepard wrote:


 I copied /usr/local/share/lyx/bind/emacs.bind to ~/.lyx/bind/my.bind and
tested the key bindings against a document. No difference: when I press
[Del] I get the spade playing card symbol to the left of the point rather
than deleting the character to the right of the point.

 When I grepped my.bind for 'Del' and 'Delete' I found no binding for that
key by itself. There is a C-Delete bound to word-delete-forward, and a
S-KP_Delete bound to cut, but no Delete by itself. As a matter of fact, the
[Del] key is not bound to anything in cua.bind, emacs.bind, or user.bind.
For what it's worth, in the latter file it's explicitly unbound from
char-delete-forward.

 I find this stange. I tend to use the [Del] key and my mini-keyboard
doesn't have a numeric keypad in any case. From my user perspective, this is
a bug.

 How can I make the [Del] key delete the character immediately to the
right?


  Well, I guess all I can do is not use the Delete key since no one seems to
know why it won't work since the upgrade to 1.6.1. So, I'll unsubscribe from
this list.

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Richard Heck wrote:
> What does one already do to insert a branch inset? Can't we just use that, 
> and if the name given isn't already known, add it to the branch list?

the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel


Re: Branches UI

2009-03-16 Thread Vincent van Ravesteijn

Pavel Sanda schreef:

Richard Heck wrote:
  
What does one already do to insert a branch inset? Can't we just use that, 
and if the name given isn't already known, add it to the branch list?



the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel
  

Why not branch-new-insert ? This one can fire branch-new.

I don't like the branch-add, because it looks too much like 
branch-insert. And I don't like the "Add new branch" menuitem, because I 
wouldn't expect that that would insert something into my document (yes, 
I know it is in the Insert menu), so I'd prefer "(Insert) New branch".


+
+#
+# InsetCollapsable context menu
+#
+   


I think you mean InsetBranch context menu.

Vincent


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Vincent van Ravesteijn wrote:
> Pavel Sanda schreef:
>> Richard Heck wrote:
>>   
>>> What does one already do to insert a branch inset? Can't we just use 
>>> that, and if the name given isn't already known, add it to the branch 
>>> list?
>>> 
>>
>> the problem here that we dont know the name user has given to us,
>> so command-sequence etc can't be used.
>>
>> pavel
>>   
> Why not branch-new-insert ? This one can fire branch-new.

now you are talking about lfun or parameter name?

> Insert menu), so I'd prefer "(Insert) New branch".

no problem with me

> +
> +#
> +# InsetCollapsable context menu
> +#
> +   
> I think you mean InsetBranch context menu.

yes thats cut bug.
pavel


Re: Branches UI

2009-03-16 Thread Vincent van Ravesteijn

Pavel Sanda schreef:

Vincent van Ravesteijn wrote:
  

Pavel Sanda schreef:


Richard Heck wrote:
  
  
What does one already do to insert a branch inset? Can't we just use 
that, and if the name given isn't already known, add it to the branch 
list?



the problem here that we dont know the name user has given to us,
so command-sequence etc can't be used.

pavel
  
  

Why not branch-new-insert ? This one can fire branch-new.



now you are talking about lfun or parameter name?
  

LFUNs yes.
  

Insert menu), so I'd prefer "(Insert) New branch".



no problem with me

  

I mean "Insert new branch" _or_ " New branch", just to be sure.

Vincent


Re: Keyboard Shortcuts (fwd)

2009-03-16 Thread Bo Peng
>  Well, I guess all I can do is not use the Delete key since no one seems to
> know why it won't work since the upgrade to 1.6.1. So, I'll unsubscribe from
> this list.

I experienced something like this when I developed the new shortcut
dialog with certain combination of os/qt/lyx but I could not repeat it
now. If you could PM me your bind file, and tell me you os and lyx
version, I might be able to help.

Cheers,
Bo, retired lyx developer.


Re: Branches UI

2009-03-16 Thread Pavel Sanda
Vincent van Ravesteijn wrote:
>>> Why not branch-new-insert ? This one can fire branch-new.
>>> 
>>
>> now you are talking about lfun or parameter name?
>>   
> LFUNs yes.

hmm i somehow didn't like the overpopulation - we would have
branch-insert, branch-new-insert, branch-new.

pavel

ps: i have limited access to net now, so i wont be much responsive
in the days around.


Re: eLyXer logo

2009-03-16 Thread Alex Fernandez
On Mon, Mar 16, 2009 at 4:03 AM, Uwe Stöhr  wrote:
> What do you mean with "won't display right"? When compiling the file to a
> PDF using pdflatex, it is correctly shown. (See the PDF here:
> http://wiki.lyx.org/LyX/DocumentationDevelopment#Math )
> Withing LyX it also looks correct - there's the command \mathclap as
> TeX-Code, because LyX's math editor doesn't have native support for such a
> special feature.

The LyX code looked weird to me:
\begin_inset Formula \[
\sum_{\mathclap{\substack{0

Re: Keyboard Shortcuts

2009-03-16 Thread rgheck

Rich Shepard wrote:

On Fri, 13 Mar 2009, Rich Shepard wrote:
When I grepped my.bind for 'Del' and 'Delete' I found no binding for 
that

key by itself. There is a C-Delete bound to word-delete-forward, and a
S-KP_Delete bound to cut, but no Delete by itself. As a matter of 
fact, the
[Del] key is not bound to anything in cua.bind, emacs.bind, or 
user.bind.

For what it's worth, in the latter file it's explicitly unbound from
char-delete-forward.

That is very likely the problem. The file user.bind normally holds the 
changes the user has made in the shortcuts dialog, and it's read last, 
so the key is being unbound when that file is loaded. Try deleting the 
offending line, and all (hopefully) will be well. Or you can go into the 
shortcuts dialog and search for char-delete-forward, and then restore it.


As for why it got unbound, that's a mystery. Maybe you did it by 
accident somehow. But it probably doesn't actually have anything to do 
with 1.6.2, in the end.



I find this stange. I tend to use the [Del] key and my mini-keyboard
doesn't have a numeric keypad in any case. From my user perspective, 
this is

a bug.

How can I make the [Del] key delete the character immediately to the
right?


The binding is in site.bind, which sets "system-wide" bindings that are 
independent of specific platforms.


rh



Re: Branches UI

2009-03-16 Thread Jean-Marc Lasgouttes
Pavel Sanda  writes:
>> What is this branch_inset_insert thing. It looks kind of wrong.
>
> the purpose is to automatically insert the branch inset after establishing
> new branch. bit hackish, yes, but i didn't find better way how to do it.
> perhaps you have some idea?

I am not so sure that this is helpful enough to deserve this combined
function.

>  
>> > - fix already presesnt bug for update status of branch inset.
>> 
>> What is that?
>
> as the commit message says:
> Context-branch menu uselessly shows both open/close items.

Thanks, I'll have  alook.

JMarc


Re: Update on aussie phaseout and new server

2009-03-16 Thread Jean-Marc Lasgouttes
Lars Gullik Bjønnes  writes:

> We (I) and agreed deadline with trolltech/nokie that aussie will be turned
> off the 23. This is in one week.
>
> Before then all services running on aussie must be moved to other places. So
> far mail for lyx developers have been moved.

OK

> We have got a new (virtual) server at the University of Bonn. The server can
> be reached at lyx.lyx.org. This server is running debian,
> and I am having some problems adjusting, nothing major, but debian is a
> novel experience to me.

Question: how is this server maintained? Do we have good reasons to be
confident that it will stay afloat better than aussie did?

> So far I have got subversion and trac up and going. Subversion read-only for
> now.

I can confirm that trac is here :)

> I know a bit too little about the new scheme you are using for the web
> pages, so if you one of you have
> a better grip give me a holler and we can work together at getting that up
> and working. Chr has said that we will
> help out with the wiki.

The web site _is_ the wiki. Part of the configuration files are under
svn (www-user). I am not 100% sure of the details, but this has to be on
the wiki!

> Bugzilla is what worries me the most, our installation on aussie is old and
> I have no idea how easy it will be to domp that db
> and reload/upgrade in a different location. So if any of you really know
> bugzilla installation/administratiion give a holler.

And could it be possible to migrate buzilla to the trac that is on
aussie and from there to upgrade to the new trac.

Sorry I can't be more helpful.

> Anyhow... since the deadline is looming we have to concentrate efforts, and
> perhaps, in a couple of cases (wiki and bugzilla)
> live with a inferiour solution for a short time.

Agreed.

> Short after aussie is turned off I will move it to my place, first to have a
> place for the old stuff that we can use to get the new server up
> and going, second as a backup server for later. (non-public, but accesible
> for lyx devvies)

Good.

> On the agenda now is to move the official svn server over to lyx.lyx.org,
> the work has been done (only requires an update every day, to keep it in
> sync).

Perfect. So this mean that we abandon sourceforge completely, right?

So far, the plan looks good.

JMarc


Re: Update on aussie phaseout and new server

2009-03-16 Thread rgheck

Lars Gullik Bjønnes wrote:

This is to give you an update on what is happening.

  
Lars, just a word of thanks for doing all of this. Must be a real pain 
in the ()&)(!


rh



Re: Update on aussie phaseout and new server

2009-03-16 Thread Bo Peng
> Perfect. So this mean that we abandon sourceforge completely, right?
>
> So far, the plan looks good.

Right, after all the debates, Lars dictates.

Bo


Re: eLyXer logo

2009-03-16 Thread Uwe Stöhr

Alex Fernandez schrieb:


The LyX code looked weird to me:
\begin_inset Formula \[
\sum_{\mathclap{\substack{0

Re: [Cvslog] r28721 - /lyx-devel/trunk/lib/ui/stdcontext.inc

2009-03-16 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
> Juergen?

OK.

Jürgen


Re: Quotes and document settings

2009-03-16 Thread Jürgen Spitzmüller
rgheck wrote:
> > I'd implement it in the InsetQuote rather.
> >
> >  
>
> That seems hard (i.e., nearly impossible), since csquotes provides
> commands, with a beginning and an end, whereas InsetQuote is a
> standalone thing. You could certainly have InsetQuote sometimes output
> "\enquote{" and sometimes output "}", but I'm not sure how you'd keep
> them sync'd.

You can use f. ex.

\MakeAutoQuote{»}{«}
\MakeInnerQuote{¶}

and then

This is »quoted and »sub-quoted« text« and some ¶single-quoted¶ text.

As for syncing, Im thinking of some kind of syntax highlighting.

Jürgen


Re: [patch] bug 5709: multicolumn alignment cannot be changed via toolbar

2009-03-16 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
> http://bugzilla.lyx.org/show_bug.cgi?id=5709
>
> This long standing bug is now easy to fix by means of command-alternatives.
> However, the toolbar is not yet prepared to command-alternatives. The
> attached patch implements a simple solution: just use the icon for the
> first of the alternative commands in the sequence. This works well for the
> case in question (the icons just need to be renamed to their "m-*"
> counterparts).
>
> Objections?

So what shall we do with this? It's already in trunk (r28280).

Jürgen