<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Matej Urbas</b> <span dir="ltr"><<a href="mailto:matej.urbas@gmail.com">matej.urbas@gmail.com</a>></span><br>
Date: Tue, Jun 22, 2010 at 1:06 AM<br>Subject: Referencer Plugin: Configuration Dialog<br>To: <a href="mailto:jcspray@icculus.org">jcspray@icculus.org</a><br><br><br>Hi!<br>
<br>
Could I please ask you for advice on how to display a configuration<br>
dialog for a python plugin in Referencer?<br>
<br>
This is my current code (excerpt from file 'ReferencerNotes.py'), which<br>
works as a standalone application but not if invoked from Referencer:<br>
<br>
<br>
<br>
def referencer_config():<br>
dlg = ConfigDialog()<br>
dlg.mainWindow.run()<br>
<br>
class ConfigDialog:<br>
def __init__(self):<br>
# Initialise the UI builder<br>
self.builder = gtk.Builder()<br>
self.builder.add_from_file(CONFIG_DIALOG_GLADE_FILE)<br>
self.builder.connect_signals(self)<br>
<br>
# Fetch all relevant widgets in the dialog<br>
self.mainWindow=self.builder.get_object("dlgConfig")<br>
self.fileChooser=self.builder.get_object("fcbNotesPath")<br>
<br>
# Initialise the currently configured directory...<br>
self.fileChooser.set_filename(NOTES_DIRECTORY)<br>
<br>
def config_ok_click(self, widget, data=None):<br>
set_notes_directory(self.fileChooser.get_filename())<br>
<br>
<br>
Thank you very much for your help!<br>
<br>
<br>
Cheers,<br>
---<br>
<font color="#888888">Matej<br>
</font></div><br>