Consider the attached program. Try this:

1. Select a file that is in a directory *with at least one other file*
2. Click "Check" to verify the path
3. Open the file in a text editor, modify it and save it
4. Click "Check" again

When I try this, the path has changed! Have I done something wrong, or
is this a bug?

— Jason

----
import pygtk
import gtk

class FCButtonTest(gtk.Window):

    def __init__(self):
        super(FCButtonTest, self).__init__()
        self.fcb = gtk.FileChooserButton("Go nuts")
        button1 = gtk.Button("Check")

        button1.connect('clicked', self.do_check)

        box1 = gtk.HBox()
        box1.pack_start(self.fcb)
        box1.pack_start(button1, expand=False)

        self.add(box1)

        def do_quit(source):
            gtk.main_quit()

        self.connect('destroy', do_quit)

    def do_check(self, source):
        print self.fcb.get_file().get_path()

if __name__ == "__main__":
    FCButtonTest().show_all()
    gtk.main()
----
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to