Andre Poenitz wrote:
On Mon, Sep 03, 2007 at 08:11:29PM -0500, Bo Peng wrote:
I need a good signal handling mechanism to update the embedding
dialog. Because addition/removal of embedding files only happens to
certain insets, it should be easier than the Toc dialog. This patch
emits the embeddingChanged signal along with structureChanged, and
does not update the dialog *accurately*. For example, if you remove a
figure from a paragraph, the embedding dialog is not updated because
there is no structure change.

I am not quite sure what to do: emit the signal with buffer edition,
or in the constructor/destructor of some insets. If there is no good
suggestion, I will submit the current patch and revisit this problem
later.

Would making the dialog modal be an acceptable solution? This way the
buffer is less likely to change behind the dialog's back...

That's a good solution indeed.

I also don't like the hijacking of updateLabels(). So, if you go for a signal solution, then emit this signal when the embedding status is effectively changed and not every time you update the labels. In theory, when edited, a lyx document should not know if a graphics or a child document is embedded or not; at least that's what I understand in this stuff. If for normal operation, the document has to know this information then there is something wrong in your implementation IMHO.

Sorry, I haven't followed very closely the discussion, just thought I'd share my initial insight...

Abdel.

Reply via email to