Help with Python+Glade
Posted: Sun Jun 03, 2007 8:07 pm
Hi, I've started making an RSS plugin for deluge, since for me that's the killer feature this program is missing. I'm also using the experience to learn python, so it might be slow going - but I'm fairly confident.
I intend it to be similar in look and feel to the RSS downloader in uTorrent, since I'm familiar with that one.
Anyway, I'm just working on setting up the interface atm, and I've run into a stumbling block. I've set up a dialog for adding and removing feeds from a list, modelling it quite closely on the 'Search' plugin. I've set up event handlers in the Glade interface, but for some reason they don't seem to be connecting to their associated functions in plugin.py. Here's what I've got:
I type a little text into one of the entry boxes, then press add (hoping to see the text disappear), but nothing happens. I've attached the py and glade files for a better picture of what I'm talking about. Any help appreciated
Mark
I intend it to be similar in look and feel to the RSS downloader in uTorrent, since I'm familiar with that one.
Anyway, I'm just working on setting up the interface atm, and I've run into a stumbling block. I've set up a dialog for adding and removing feeds from a list, modelling it quite closely on the 'Search' plugin. I've set up event handlers in the Glade interface, but for some reason they don't seem to be connecting to their associated functions in plugin.py. Here's what I've got:
Code: Select all
self.glade = gtk.glade.XML(path + "/rss.glade")
...
self.name_entry = glade.get_widget("name_entry")
self.url_entry = glade.get_widget("url_entry")
...
self.glade.signal_autoconnect({"add_clicked": self.add_clicked,
"del_clicked": self.del_clicked,
"row_clicked": self.row_clicked,
feedtext_changed": self.feedtext_changed })
...
def add_clicked(self, args):
#self.feeds_view.get_model().append([self.name_entry.get_text(),
#self.url_entry.get_text()])
self.name_entry.set_text("")
self.url_entry.set_text("")
Mark