[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] review of possible checkin.
From: |
Ian Haywood |
Subject: |
Re: [Gnumed-devel] review of possible checkin. |
Date: |
Wed, 16 Mar 2005 08:04:58 +1100 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20041012) |
catmat wrote:
I'd like to commit this diff, which gets the PastHistoryPanel loaded
I've added comments as to why the changes.
Index: wxpython/gmDateTimeInput.py
===================================================================
RCS file:
/cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmDateTimeInput.py,v
retrieving revision 1.11
diff -r1.11 gmDateTimeInput.py
25a26
> import sys
188c189,192
< self.SetToolTip(wxToolTip(self.__tooltip))
---
> try:
#this is if there is an character conversion
error, say if the
# the installation is only accepting one kind
of character set
> self.SetToolTip(wxToolTip(self.__tooltip))
> except:
> print sys.exc_info()[0], sys.exc_info()[1]
Use the proper gmLog.LogException
There are plently of examples.
< self.szr_main_panels.Add(5, 0, 0, wxEXPAND)
---
> self.szr_main_panels.Add((5, 0), 0, wxEXPAND)
337c337
< szr_shadow_below_prompts.Add(5, 0, 0, wxEXPAND)
---
> szr_shadow_below_prompts.Add((5,1), 0, 0, wxEXPAND)
349c349
< szr_shadow_rightof_prompts.Add(0,5,0,wxEXPAND)
---
> szr_shadow_rightof_prompts.Add((0,5),0,wxEXPAND)
Looks like 2.4/2.5 issues again. Sigh.
> #plugin_list =
gmPlugin.GetPluginLoadList('terry_layout.plugins', defaults )
> plugin_list =
gmPlugin.GetPluginLoadList('terry_layout.plugins', defaults )
If you want to change something, change it, don't leave old code as comments, it
just clutters things up. Remember with CVS you never lose old code.
113a119
> print "error loading", curr_plugin
124c130,133
Use gmLog.Log
< png_fname =
os.path.join(self.__gb['gnumed_dir'], 'bitmaps', 'default.png')
---
> png_fname =
os.path.join(self.__gb['gnumed_dir'], 'bitmaps', 'serpent.png')
I don't understand why this doesn't work, default.png has always worked fine
for me.
> #<DEBUG>
> print png_fname
> #</DEBUG>
126c135,140
< imagelist.AddIcon (icon)
---
# need to explicitly set the Width() and Height() after loading, in
# later version of wxPython
> if icon.Ok():
> icon.SetWidth(32)
> icon.SetHeight(32)
> imagelist.AddIcon (icon)
> else:
> print "icon for ", png_fname, " is not ok"
128a143
> print "trying to add page", self.plugins[i]
Again, use gmLog
Ian
signature.asc
Description: OpenPGP digital signature