X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MAxonG6KxjGB47mxzZj30K5RBtGhjIqnxjTuf2MI0xI=; b=NQafAZJ5hd5/Saz8wDZgS2Xd3/OrWXnX1JP3r48475JBqnpFC/mMVvCaPTiWAEOFhl VpzAFv4XE+DFu5metG83xmMSQxebpr3PnL4lqEj7p3xqFarvPII1LlD68WLEP4Z5aIyB 7AbBBdGNHGAucGCqQMb+kFYHjGZyNobGK9lPPxKfFWs2mWekZPD8GJtz3CHsb94lQGhZ cXrnB5SNg503ZASssYirrSeSuOGdC54Y9dZ50BlHToZ95Y6D6lwgO5yCXhBQfTWG28pd h5Zxjcy5ul4YhH1T9r8U4sROcq+UxXS1usH0l+nI8HS8vhG225L9sKBnPC40MH2MRxg7 TqVw== MIME-Version: 1.0 X-Received: by 10.42.80.9 with SMTP id t9mr18328083ick.14.1374516060348; Mon, 22 Jul 2013 11:01:00 -0700 (PDT) In-Reply-To: <1374513797.3124.12.camel@AMD64X2.fritz.box> References: <2174C2C2-6FAF-4544-A4C0-5FDBD564A6FB AT sbcglobal DOT net> <1374513797 DOT 3124 DOT 12 DOT camel AT AMD64X2 DOT fritz DOT box> Date: Mon, 22 Jul 2013 19:01:00 +0100 Message-ID: Subject: Re: [geda-user] Non-modal Dialogs From: Luis de Arquer To: geda-user AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk I still have little experience with libgeda/gschem code, but in case it may be useful, here it goes: I have been working for a few weeks now on a side display which shows a list of current nets and components while you work on gschem -it may well be a useless feature for many, but I found it helpful in other eda software (eg PADS), especially when doing digital stuff with many nets. What I have done so far, is to include an "Update button" on the panel, triggering a callback which goes through the whole toplevel structure updating the list. However, I would also like to be able to select a whole net by clicking its name on the list. The problem I have is, if any of the nets (segments) has been removed, a will try to access a non-existing object. So I was thinking of using the weak refs to get a notification of its destruction So my suggestion is, why not use the weak refs to implement Stefan's idea? Right now, it only notifies destruction of the object -correct me if I am wrong-, but it could well notify a change in the object. So, in the case of the properties dialog, on creation it would create a weak ref to the object, with a notification callback. And everytime an object is modified, the list of weak refs is checked, calling any existing callback. Luis On Mon, Jul 22, 2013 at 6:23 PM, Stefan Salewski wrote: > On Sun, 2013-07-21 at 18:02 -0700, Edward Hennessy wrote: >> Implementation of non-modal dialogs requires some form of property >> change notification. This way, if an object property gets changed, >> either through the GUI or scripting, the dialog box widgets stay in >> sync with the value of the property. How should property change >> notification be implemented in gschem/libgeda? >> >> Cheers, >> Ed >> > > An interesting question. > > I think my idea last year was: > > We have only one property dialog window or area, which can be visible or > not. (I prefer an area for my peted clone, instead of overlapping > windows, but that is a matter of taste.) If the user clicks on an > element (symbol, text, net...) the property display update its content > when it is open/visible -- some values may be displayed always like > color, other like font or footprint only for some elements. A double > click on an element may open that property display. Updating elements by > other means (scripts, menu...) should simple gray out that property > display, or maybe ask that display to update after all is done. It makes > no sense to update that property display hundred times when a script > changes textsize for all refdes. > > Clicking on elements with right mouse button may open a context menu for > basic properties, i.e increase font size. >