Hi, folks!

Sorry if this question seems silly, but I am rather new to python and a
total newbie regarding Gtk programming, I googled a lot for a solution to my
problem and couldn't find something that worked for me.

I created a GUI using Glade, which contains a FileChooserButton. On startup,
this FileChooserButton displays the default folder for the application, and
a list of text files contained in this folder is loaded and presented in a
TreeView. My idea is, everytime the user chooses another folder using the
FileChooserButton, the application automatically loads the list of text
files in this new folder and refreshes the TreeView to show this new list.

In order to do this, I connected some code to the "current_folder_changed"
signal of the FileChooserButton, as in

(...)
        self.btnPasta = self.wTree.get_widget( "btnPasta" )
        self.btnPasta.connect( "current_folder_changed", self.mudarPasta )
(...)

However, when I use the FileChooserButton btnPasta to choose another
folder,nothing happens. I made some tests and it seems that the function
mudarPasta is not executed at all. This function is defined inside my class
(as other functions that are executed by other signals of other widgets and
called as self.<function_name>):

    def mudarPasta( filechooser, widget ):
        novaPasta = filechooser.get_current_folder()
        PASTA = novaPasta
        os.chdir( PASTA )
        self.popular()

Can someone help me?

Thanks in advance,
-- 
Marcus Vinicius Eiffle Duarte
[EMAIL PROTECTED]
NiterĂ³i, RJ, Brasil
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to