Re: [Emc-users] GladeVCP / File Selector Button

2012-04-26 Thread andy pugh
On 26 April 2012 17:25, Daniel Rogge wrote: > I don't think there's much more you can do to make it neater. If I may be forgiven for mentioning it, in VB the format would be something like def __init__(self, halcomp, builder, useropts): fb = builder.get_object('filechooserbutton1')

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-26 Thread Daniel Rogge
ent: Wednesday, April 25, 2012 6:11 PM To: Enhanced Machine Controller (EMC) Subject: Re: [Emc-users] GladeVCP / File Selector Button On 25 April 2012 17:10, Daniel Rogge wrote: > I don't know about the filter, but the filechooser button works fine. Thanks for the help, I seem to h

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread andy pugh
On 25 April 2012 17:10, Daniel Rogge wrote: > I don't know about the filter, but the filechooser button works fine. Thanks for the help, I seem to have what I want now. def __init__(self, halcomp, builder, useropts): self.fb = builder.get_object('filechooserbutton1') self.fi

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Daniel Rogge
Andy, > Those are the docs for a different object, I think. Those docs are for the gtk.Filechooser interface that is implemented by the gtk.FilechooserButton. You can use any of the methods or properties associated with the gtk.Filechooser in the callback. > OK, I will try that. I didn't see

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread andy pugh
On 25 April 2012 14:52, Daniel Rogge wrote: > You must define a callback associated for the gtk.filechooser's file-set > signal. Yes, I have that as a callback for the filechooserbutton. So far it simply prints "Yippee!" >  In the call back, use widget.get_filename() to return the file name a

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Schooner
Hi Andy >> I_think_ that uses a generic button which calls hal_action_open, >> which in turn opens hal_filechooser.py, which seems to open a G-code >> file in LinuxCNC. Unfortunately that is not what I want to do. Looks like all you have to do to change the default action in hal_filechooser.p

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Daniel Rogge
Andy, You must define a callback associated for the gtk.filechooser's file-set signal. In the call back, use widget.get_filename() to return the file name as a string. As far as the file filter goes, I've not personally used one but it looks like you'd create a gtk.filter object and add the p

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread andy pugh
On 25 April 2012 13:32, Michael Haberler wrote: >>> Can you look at the Gscreen python file to see how Chris did that? > http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/gscreen_master I _think_ that uses a generic button which calls hal_action_open, which in turn opens hal_filech

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Dave
On 4/25/2012 7:04 AM, andy pugh wrote: > On 25 April 2012 02:29, Dave wrote: > > >> Can you look at the Gscreen python file to see how Chris did that? >> > Not at the moment. I thought it was one of the heads at > http://git.mah.priv.at/gitweb/emc2-dev.git but I can't see it there. > >

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Alex Joni
nhanced Machine Controller (EMC)" Sent: Wednesday, April 25, 2012 2:04 PM Subject: Re: [Emc-users] GladeVCP / File Selector Button > On 25 April 2012 02:29, Dave wrote: > >> Can you look at the Gscreen python file to see how Chris did that? > > Not at the moment. I tho

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread Michael Haberler
Am 25.04.2012 um 13:04 schrieb andy pugh: > On 25 April 2012 02:29, Dave wrote: > >> Can you look at the Gscreen python file to see how Chris did that? > > Not at the moment. I thought it was one of the heads at > http://git.mah.priv.at/gitweb/emc2-dev.git but I can't see it there. http://git

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread andy pugh
On 25 April 2012 02:29, Dave wrote: > Can you look at the Gscreen python file to see how Chris did that? Not at the moment. I thought it was one of the heads at http://git.mah.priv.at/gitweb/emc2-dev.git but I can't see it there. -- atp The idea that there is no such thing as objective truth i

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-25 Thread andy pugh
On 25 April 2012 02:38, Chris Morley wrote: >> I am struggling with the file selector button Glade widget. >> >> I don't seem to be able to figure out how to extract the selected >> filename as a string into code, or how to set up a file filter. > What language? c or python? Python. Which I now

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-24 Thread Chris Morley
> I am struggling with the file selector button Glade widget. > > I don't seem to be able to figure out how to extract the selected > filename as a string into code, or how to set up a file filter. > > Has anyone managed to do that? > > I have a feeling I might have to attach a file select di

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-24 Thread Dave
On 4/24/2012 8:23 PM, andy pugh wrote: > I am struggling with the file selector button Glade widget. > > I don't seem to be able to figure out how to extract the selected > filename as a string into code, or how to set up a file filter. > > Has anyone managed to do that? > > I have a feeling I migh

Re: [Emc-users] GladeVCP / File Selector Button

2012-04-24 Thread Dave
On 4/24/2012 8:23 PM, andy pugh wrote: > I am struggling with the file selector button Glade widget. > > I don't seem to be able to figure out how to extract the selected > filename as a string into code, or how to set up a file filter. > > Has anyone managed to do that? > > I have a feeling I migh

[Emc-users] GladeVCP / File Selector Button

2012-04-24 Thread andy pugh
I am struggling with the file selector button Glade widget. I don't seem to be able to figure out how to extract the selected filename as a string into code, or how to set up a file filter. Has anyone managed to do that? I have a feeling I might have to attach a file select dialogue, and get the