[pygtk] Port of a gtk date entry widget
Fabian Sturm
f at rtfs.org
Sat Dec 3 09:12:09 WST 2005
Hi!
I am currently trying to port the libgnomeui DateEntry widget to python,
since I want to use it both on Linux and Win32.
So far everything worked out nicely.
But due to the lack of a proper custom widget tutorial and my lack of
gtk / gobject knowledge I just cooked something up on my own.
During this I stumbled on some things which I would like to clarify
before I continue the porting.
1. The custom widget uses it's own constants like
(GNOME_DATE_EDIT_SHOW_TIME, and I tried to implement the with the
following:
(GNOME_DATE_EDIT_SHOW_TIME,
GNOME_DATE_EDIT_24_HR,
GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY) = [1 << 0, 1 << 1, 1 << 2]
does this make sense? do I have to register them somewhere?
2. I can't hide any of the widgets. E.g. a call to
self.__cal_label.hide() does not hide the label
3. The c version of the widget had two different constructors, as far as
I understood is this impossible in python, so how do you cope with it.
Thanks a lot! I welcome any comments (style, naming etc.)
Fabian
P.s. I also attached the gnome version I am porting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dateedit.py
Type: text/x-python
Size: 5312 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20051203/a87755ce/dateedit-0001.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnome-dateedit.c
Type: text/x-csrc
Size: 29964 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20051203/a87755ce/gnome-dateedit-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnome-dateedit.h
Type: text/x-chdr
Size: 3502 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20051203/a87755ce/gnome-dateedit-0001.h
More information about the pygtk
mailing list