[Evolution-hackers] Re: [evolution-patches] new new button, context solution

Actually don't bother Dan, i think i worked it out.

Anyway - i've thought of a solution.  Basically what Dan said originally, and its the quickest/easiest way to do it.

In the New button, if you get a create event which matches the same component as the current new button widget owner, just emit a signal (or even a callback - it really should only have 1 ever ,and enforce that) instead of doing the create call.  Then you just have to have 1 per view (which i think everything does already).

The overhead is that you also need to connect to the signal and have two create calls implemented.

The only other alternative seems to be some nasty stuff done via the shell, i.e. the component tells the shell which view it is using currently so it can update the new button apropriately (for connector esp), and the createControls call also returns a tag used to identify the window.  That all seems more messy and error prone though.

On Mon, 2004-04-19 at 12:36 +0800, Not Zed wrote:
On Thu, 2004-04-08 at 16:50 -0400, Dan Winship wrote:
These patches redo the "New" button (and File->New submenu) to be
created and managed by each component rather than the shell. (This is
needed to get it to work correctly in Connector, and also moves us a
little bit more towards separate components with no shell.)

Can you explain a little why connector needed it to work like this?  Because it re-uses different views for the one component control, and needs to update the current 'new' button, right?

JP has asked me to look at the context issue, and i might look at something that addresses both problems in a cleaner way (if i get really keen, otherwise hack till it works).

Michael Zucchi <notzed ximian com>

Ximian Evolutionand Free Software Developer

Novell, Inc.
Michael Zucchi <notzed ximian com>

Ximian Evolution and Free Software Developer

Novell, Inc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]