[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pyatcron-devel-list] New stuff for the upcoming week
From: |
NICOLOVICI Xavier |
Subject: |
[Pyatcron-devel-list] New stuff for the upcoming week |
Date: |
Tue, 27 Apr 2004 17:26:23 +0200 |
Hi everyone,
First of all, Julien, I've applied your latest patch against the CVS tree and
commit changes to it. Result sounds good for me, but I hadn't spent much time
on your changes.
In fact, I've worked on something new in our design. As of today, we were using
a ScheduleList object that was dealing with Cron and At parser to build a list
of Scheduler. Then, this ScheduleList was used to feed a Gtk::ListStore object
attached to the Gtk::TreeView of the main window.
Ok, this approach force us to have a *huge* amount of code for synchronizing
our ScheduleList object and the Gtk::ListStore. This is really not a smart
object oriented approach.
The idea I had is very basic, and I'm sure that you've already understood what
I will explain now; I've made our ScheduleList class a child of the
Gtk::ListStore class, and set it as model to the Gtk::TreeView object of our
main window. The result is a smaller and smarter code to manage events like
delete or add Schedulers.
This new class is named ScheduleListStore and is part of the lib.gui module.
I've attached a patch to add the needed code and a "test.py" file which
demonstrate how the mainwin.py module could be rewritten. Julien, if you agree
with this approach, let me know if you would like to do the work on the
mainwin.py module or if I should.
Julien, one remark about the callback method in the mainwin.py module. Could
you please use the same name for the call back method as the signal name? This
will let us connect signals to callback automatically without managing
dictionnaries.
Thanks everyone for your interest and your feedbacks.
Xavier
PS: note that "test.py" should be run from the "pyatcron/src" folder.
This e-mail contains proprietary information some or all of which may be
legally privileged. It is intended for the recipient only. If an addressing or
a transmission error has misdirected this e-mail, please notify the author by
replying to the e-mail. If you are not the intended recipient you must not use,
disclose, distribute, copy, print, or rely on this e-mail.
We take reasonable precautions to ensure our e-mails are virus free. However,
we cannot accept responsibility for any virus transmitted by us and recommend
that you subject any incoming e-mail to your own virus checking procedures.
<<winmail.dat>>
- [Pyatcron-devel-list] New stuff for the upcoming week,
NICOLOVICI Xavier <=