Alfredo Braunstein | 1 Dec 2004 03:31
Favicon

[patch] autoclose collapsables

This is quick implementation of a long-standing feature request:
autoopening/closing collapsables. This is really easy with the new scheme
(most of this patch is a replace of status_ -> status())

On a side note, we should keep the following tree bools of
insetcollapsable.h inside a "metrics cache" so they can be different in
different bufferviews (and so one can open an inset in one of them and
close it in another). 

How will these heterogeneous type caches (among different insets) would be
best handled? What comes obviously to mind is a 

static map<BufferView *, something>

in insetcollapsable.C. Or would it be better to have a more general
mechanism somehow/where?

///
mutable CollapseStatus status_;
/// a substatus of the Open status, determined automatically in metrics
mutable bool openinlined_;
/// the inset will automatically open when the cursor is inside
mutable bool autoOpen_;

Opinions?

Alfredo
Attachment (autoopen.diff): text/x-diff, 5670 bytes
Alfredo Braunstein | 1 Dec 2004 04:26
Favicon

Re: [PATCH] Re: commands disabled

Jean-Marc Lasgouttes wrote:

> LyXText::getStatus returns a bool which is always true, and disables
> lfuns when it does not know about them. This is wrong.

Ok.

> Patch attached. I'll commit it soon, and hope it does not create any
> other problem... The semantics of these dispatch functions is supposed
> to be that the return true if they know something, and false otherwise.

Thanks for the quick solution. ;-)

Alfredo

Lars Gullik Bjønnes | 1 Dec 2004 09:23

Re: [patch] autoclose collapsables

Alfredo Braunstein <abraunst@...> writes:

| This is quick implementation of a long-standing feature request:
| autoopening/closing collapsables. This is really easy with the new scheme
| (most of this patch is a replace of status_ -> status())

No no no :-)

We had that and we removed it...

We had some flak that led us to add this feature... then we removed it
again and then heard nothing...

I do not think we should add this feature, and most of all not now.

New features -> 1.5

--

-- 
	Lgb

Alfredo Braunstein | 1 Dec 2004 12:31
Favicon

Re: [patch] autoclose collapsables

Lars Gullik Bjønnes wrote:

> Alfredo Braunstein <abraunst@...> writes:
> 
> | This is quick implementation of a long-standing feature request:
> | autoopening/closing collapsables. This is really easy with the new
> | scheme (most of this patch is a replace of status_ -> status())
> 
> No no no :-)

Well, you won't oppose to the status_ -> status() change alone, right? Then
we can discuss of the remaining 5 liner ;-)

> We had that and we removed it...
> 
> We had some flak that led us to add this feature... then we removed it

That was the problem. Why was it removed if I may ask? 

> again and then heard nothing...

Nothing? Have a look at

http://marc.theaimsgroup.com/?l=lyx-users&m=108022966209863&w=2

http://marc.theaimsgroup.com/?l=lyx-devel&m=106812211414453&w=2

> I do not think we should add this feature, and most of all not now.
> 
> New features -> 1.5
(Continue reading)

Juergen Spitzmueller | 1 Dec 2004 15:40
Picon
Picon

Re: [patch] autoclose collapsables

Alfredo Braunstein wrote:

> This is quick implementation of a long-standing feature request:
> autoopening/closing collapsables.

What is the difference to the LFUN ALL_INSETS_TOGGLE, which Angus has
implemented?
If it would be that insets would be closed again after f&r or spellchecking,
I'm all for it.

Jürgen

Jean-Marc Lasgouttes | 1 Dec 2004 15:56
Picon
Picon
Favicon

Re: [patch] autoclose collapsables

>>>>> "Juergen" == Juergen Spitzmueller <j.spitzmueller@...> writes:

Juergen> Alfredo Braunstein wrote:
>> This is quick implementation of a long-standing feature request:
>> autoopening/closing collapsables.

Juergen> What is the difference to the LFUN ALL_INSETS_TOGGLE, which
Juergen> Angus has implemented? If it would be that insets would be
Juergen> closed again after f&r or spellchecking, I'm all for it.

Could a dociterator or a cursor remember how it found an inset and put
it back in the same state when leaving it?

JMarc

Jean-Marc Lasgouttes | 1 Dec 2004 15:57
Picon
Picon
Favicon

Re: [patch] restore TABULAR::UNSET_ALL_LINES

>>>>> "Jose'" == Jose' Matos <jamatos@...> writes:

Jose'>   The only documents where this piece of code is relevant are
Jose'> those made with 0.10.7 and before. I will thus add this code to
Jose'> the 0.10.7 convertion code and remove this code.

Good.

Jose'>   Believe it or not I like to remove those 0.13 types of
Jose'> comment. ;-) -- José Abílio

I believe you...

JMarc

Alfredo Braunstein | 1 Dec 2004 17:07
Favicon

Re: [patch] autoclose collapsables

Jean-Marc Lasgouttes wrote:

>>>>>> "Juergen" == Juergen Spitzmueller
>>>>>> <j.spitzmueller@...> writes:
> 
> Juergen> Alfredo Braunstein wrote:
>>> This is quick implementation of a long-standing feature request:
>>> autoopening/closing collapsables.
> 
> Juergen> What is the difference to the LFUN ALL_INSETS_TOGGLE, which
> Juergen> Angus has implemented? If it would be that insets would be
> Juergen> closed again after f&r or spellchecking, I'm all for it.
> 
> Could a dociterator or a cursor remember how it found an inset and put
> it back in the same state when leaving it?

Is much better than that (and cleaner), look at the patch (or try it). We
just draw it open if the cursor is inside (despite the current status). 

Regads, Alfredo

Kayvan A. Sylvan | 2 Dec 2004 08:05
Favicon

Latest LyX CVS: undo (C-z) is disabled.

This is very strange. Is anyone else seeing this?

In the latest LyX CVS, undo (C-z) is disabled.

			---Kayvan
--

-- 
Kayvan A. Sylvan          | Proud husband of       | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)

Jean-Marc Lasgouttes | 2 Dec 2004 11:02
Picon
Picon
Favicon

Re: [PATCH] Re: commands disabled

>>>>> "Georg" == Georg Baum <Georg.Baum@...> writes:

Georg> And I know now why: the statement

Georg> flag = view()->getStatus(cmd);

Georg> in LyXFunc::getStatus() cleared the message. 

Indeed. The right solution is to use |= instead of =.

Georg> I added it a second time (not very elegant, but I know no
Georg> better solution). Is the attached patch ok?

Actually, setting the default error message at the end rather than the
beginning is better in my opinion. I planned to do it after the
problem is really solved, since I was afraid it would hide real
problem.

The following patch merges your patch with my earlier patch. It seems
to work here, but I have not been very imaginative in my testing.

JMarc

Attachment (getStatus2.diff): text/x-patch, 5576 bytes

Gmane