X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Subject: Re: [geda-user] RFC: increment dialog patch From: Stefan Salewski To: geda-user AT delorie DOT com In-Reply-To: <4F729438.6070204@ecosensory.com> References: <20120326204111 DOT GA23076 AT malakian DOT lan> <20120328001558 DOT 40f89de0 AT kwak> <1332892196 DOT 2531 DOT 9 DOT camel AT AMD64X2 DOT fritz DOT box> <4F729438 DOT 6070204 AT ecosensory DOT com> Content-Type: text/plain; charset="us-ascii" Date: Wed, 28 Mar 2012 14:40:37 +0200 Message-ID: <1332938437.2584.40.camel@AMD64X2.fritz.box> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit 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 On Tue, 2012-03-27 at 23:31 -0500, John Griessen wrote: > On 03/27/2012 06:49 PM, Stefan Salewski wrote: > > What do you think about my new grid selector? > > > > http://www.ssalewski.de/PetEd.html.en > > The image of it looks good. Hmm -- I have just used the Stock apply image, looks not to bad, and apply term is not too wrong. I need some indication for what grid is the active snap grid. One toggle button is basically sufficient, but these two symmetrically radio buttons looks nicer for me, and consumes not really much area in the toolbar > Is your code ready for people to test it? > Easy to compile? > > John No compile necessary, it is pure Ruby. Extract the archives and type "ruby peted.rb" in a shell window to start it, if you really want to play with it. But as stated on my page, it is absolutely useless currently. Of course you need Ruby (1.9.x) and GTK/Cairo bindings installed. The coding is very easy, similar as in gtk-demo program shipped with GTK. One trick is, that we connect to the "activate" signal of the entry child of the combobox to detect when user presses 'Enter' key after manual grid input. First I tried the "changed" signal, so I got an signal for each keystroke, which results in grids 7 and 75 when user types "75" -- unwanted redraw with grid 7 first. I had to ask at gtk-list for this. I made a class for this extended widget, because I need two of them. I do not know if or how we can do that in plain C (guess GLIB may support that) but of course we do not need a class. So it should be not really a problem integrating something like that in gschem -- for someone familiar with gschems code base. (The ruby code in in file peted.rb, near the top, only 65 lines.)