Hello wout,
> so what config file reader/writer are we going to use?
IMO, xml is the best way to implement this easily. The only thing that
needs to be looked at, is which type of variables we are going to use
in the program prior to converting it to xml.
The idea is pretty simple :
def __init__(self, blabla):
...
self.xml_var =3D method_to_get_info_from_conf_file()
method_to_parse_watches_written_in_conf_file(self.xml_var)
...
def add_watch(self):
...
self.xml_var.add(watch_name, type, typearg, refresh, updated)
method_to_write_to_conf_file(self.xml_var)
...
> i also changed some things in the watch class.
> when you init() the web_watch it is not started. i think this is better
> so you can still change settings (ex: interval) for the watch and then
> call start_watch() to start the watch.
> if we call it in the notifier class, it will also be much easier to show
> a message in the notifier window.
I thought about that, and I think that the real utility to this, is to
be able to deactivate some watches if we want. Because, if you think
of it, the rest of the settings can be easily set in the init.
ex :
__init__(self, bla_bla, interval =3D 3600):
self.refresh =3D interval
self.bla_bla =3D bla_bla
> i also moved the notify function to the superclass because every time a
> message has to be shown, the result is the same, only a different text
> is used, so it should be very dynamically and know what type, name,
> ...it has so it can generate a special message for the watch.
It is good that the notify method is put in the superclass, but I
think the notification message should be located in the subclass. Like
(it's really an example, not exactly what should be written):
self.notify("The web site %s has changed" % self.url)
> kiddo: nice job changing the color from the trayicon but i think it
> should come in notifier.py because it is more a gui thing than a watch
> thing.
Yeah kiddo good job! =3DP
> i hope everything is clear
After looking at the commit, it is.
Also, I would like to know, how come you take out all the specto references=
?
I think they're handy for sending back info to the trayicon instance,
which command the main functions.
Cheers,
PP
|