On Thursday 12 July 2001 16:04, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> >> I will also need a way of toggling or, alternatively, to know
> >> whether an inset is open or closed. Is that possible?
> >> 
> >> JMarc
> 
> Angus> Does this cover it? Angus
> 
> Hmm,  what happens if, while an inset is open, I open another one? Won't
> the isDialogOpen_ flags get mixed up?
> 
> JMarc

Don't think so. If you click on an inset you call it's edit() mathod which 
inturn emits a signal 
        bv->owner()->getDialogs()->showSomeInsetDialog(this);

This signal is connected in the Dialog controller's c-tor to
        ControlInset<Inset, Params>::showInset(Inset * inset)

In turn, this method calls
        ControlInset<Inset, Params>::connectInset(inset)

void ControlInset<Inset, Params>::connectInset(Inset * inset)
{
        // If connected to another inset, disconnect from it.
        if (inset_) {
                ih_.disconnect();
                inset_ = 0;
        }

        if (inset) {
                inset_ = inset;
                ih_ = inset->hideDialog.connect(
                        SigC::slot(this, &ControlInset::hide));
        }
        connect();
}

So you see that Inset::hideDialog is connected to the dialog appropriately. 
This just needs to be changed to Inset::collapsed() or whatever name Jürgen 
has chosen for this.

Incidentally, I think that collapsed is NOT a very good name. How about 
active, inactive?

Angus

Reply via email to