Re: [pygtk] Hiding and showing dialogs using libglade
On Wed, Nov 13, 2002 at 07:53:25PM +0100, Åsmund Skjæveland wrote: > I'm writing an offliner (like a newsreader, only for BBS use) using > pygtk and libglade. I'm trying to find the right way to show and hide > a file selection dialog after a "load file" buton has been > clicked. Should I use a direct widget approach (i.e. create a separate > XML tree, use selectFile = SelectFileTree.get_widget('SelectFile') and > selectFile.show()), or is there a more automatic way to do this > (i.e. call the widget's show() and hide()) with libglade, without > pulling out the widget from the XML tree? I would go about getting the widget and manipulating it; signal_autoconnect is a bit pokey and inflexible in my experience. Of course, if you use Kiwi, this is done for you automatically :-) Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Hiding and showing dialogs using libglade
On Thu, 2002-11-14 at 07:53, Åsmund Skjæveland wrote: > I'm writing an offliner (like a newsreader, only for BBS use) using > pygtk and libglade. I'm trying to find the right way to show and hide > a file selection dialog after a "load file" buton has been > clicked. Should I use a direct widget approach (i.e. create a separate > XML tree, use selectFile = SelectFileTree.get_widget('SelectFile') and > selectFile.show()), or is there a more automatic way to do this > (i.e. call the widget's show() and hide()) with libglade, without > pulling out the widget from the XML tree? I normally create the file-selector using GTK without bothering with GLADE; it is easier that way. For example this is the code (GTK 1.2) that I use to create a directory-selector. fs = GtkFileSelection('Select Fetch Directory') fs.file_list.set_sensitive(0) fs.hide_fileop_buttons() fs.set_filename(self.homeDir + '/') fs.ok_button.connect('clicked', self.browseOk_cb, fs) fs.cancel_button.connect('clicked', self.browseCancel_cb, fs) The rest of the program uses GLADE, except for other "small" windows such as error messages. -- Michael JasonSmith http://www.cosc.canterbury.ac.nz/~mpj17/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Hiding and showing dialogs using libglade
I'm writing an offliner (like a newsreader, only for BBS use) using pygtk and libglade. I'm trying to find the right way to show and hide a file selection dialog after a "load file" buton has been clicked. Should I use a direct widget approach (i.e. create a separate XML tree, use selectFile = SelectFileTree.get_widget('SelectFile') and selectFile.show()), or is there a more automatic way to do this (i.e. call the widget's show() and hide()) with libglade, without pulling out the widget from the XML tree? -- Åsmund Skjæveland (OpenPGP keyid 54B975CE) msg04806/pgp0.pgp Description: PGP signature