[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] review of possible checkin.
From: |
catmat |
Subject: |
[Gnumed-devel] review of possible checkin. |
Date: |
Wed, 16 Mar 2005 08:17:28 +1100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 |
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]
Index: wxpython/gmEditArea.py
===================================================================
# this was due to wxPython version error in accepting the arguments for
the first #2 args to wxWidget.Add(..)
RCS file: /cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmEditArea.py,v
retrieving revision 1.83
diff -r1.83 gmEditArea.py
305c305
< 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)
373c373,379
< vszr.Add(self.field_line_szr[line],
self.prompts[line][2], flag = wxEXPAND) # use same lineweight as prompts
---
# catch an error if no element found for the value of index line, and
continue
> try:
> vszr.Add(self.field_line_szr[line],
self.prompts[line][2], flag = wxEXPAND) # use same lineweight as prompts
> except:
> _log.Log( gmLog.lErr, "Error with
line=%s , self.field_line_szr has key:%s; self.prompts has key: %s" %(
line, self.field_line_szr.has_key(line), self.prompts.has_key(line) ) )
> import sys, traceback
> print sys.exc_info()[0], sys.exc_info()[1]
>
382c388
< szr_shadow_below_edit_fields.Add(5, 0, 0, wxEXPAND)
---
> szr_shadow_below_edit_fields.Add((5,0), 0, 0, wxEXPAND)
394c400
< szr_shadow_rightof_edit_fields.Add(0, 5, 0, wxEXPAND)
---
> szr_shadow_rightof_edit_fields.Add((0, 5), 0, wxEXPAND)
457c463,464
< szr_buttons.Add(5, 0, 0)
---
>
> szr_buttons.Add((5,1), 0, 0)
1006c1013
< return
---
> #return
1008,1009c1015,1018
< EVT_KILL_FOCUS( self.fld_age_noted, self._ageKillFocus)
< EVT_KILL_FOCUS( self.fld_date_noted, self._yearKillFocus)
---
# disable temporarily the date processing kill focus event listener
# connect btn_OK press to method self.btnOkPressed
> #EVT_KILL_FOCUS( self.fld_age_noted, self._ageKillFocus)
> #EVT_KILL_FOCUS( self.fld_date_noted, self._yearKillFocus)
> EVT_BUTTON( self.btn_OK, self.btn_OK.GetId(),
self.btnOkPressed)
> print "Button connected to ", self
1064c1073,1075
<
---
# connect the event receiving method btnOkPressed() to the generic
_save_data()
> def btnOkPressed(self, event):
> self._save_data()
>
1066c1077,1083
# needs further debugging to get past history to connect to business object
< clinical =
self._patient.get_clinical_record().get_past_history()
---
> print "_save_data"
> #clinical =
self._patient.get_clinical_record().get_past_history()
> print "id = ", self._patient.getId()
> clinical = self._patient.get_clinical_record()
>
> print "patient", self._patient
> print "clinical = ", clinical
Index: wxpython/gmGuiMain.py
===================================================================
# the config object is returning a value with trailing whitespace that
# won't test properly for values "terry" "status_quo"
RCS file: /cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmGuiMain.py,v
retrieving revision 1.183
diff -r1.183 gmGuiMain.py
115a116,119
>
> if self.layout_style:
> self.layout_style =
self.layout_style.strip()
>
122a127
> #print "set1=", set1, "self.layout_style",
self.layout_style
129a135
> #print "loading Richard Terry's layout
manager"
131a138,141
# need a default path when both if and elif fail, because the retrieved
value
# is not what's expected.
> else:
> #need a default layoutMgr
> self.LayoutMgr =
gmHorstSpace.cHorstSpaceLayoutMgr(self, -1)
>
Index: wxpython/gmListCtrlMapper.py
===================================================================
RCS file:
/cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmListCtrlMapper.py,v
retrieving revision 1.3
diff -r1.3 gmListCtrlMapper.py
2,6c2,3
< try:
< import gmLog
< except:
< sys.path.append('../pycommon')
< import gmLog
---
>
> import Gnumed.pycommon.gmLog
Index: wxpython/gmRichardSpace.py
===================================================================
RCS file: /cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmRichardSpace.py,v
retrieving revision 1.2
diff -r1.2 gmRichardSpace.py
85c85,90
< plugin_list =
gmPlugin.GetPluginLoadList('terry_layout.plugins', defaults =
['Gnumed.wxpython.gmDemographics.Demographics'])
---
# add the unwrapped PastHistoryPanel into the RichardSpace defaults.
> defaults = ['Gnumed.wxpython.gmDemographics.Demographics',
>
'Gnumed.wxpython.patient.gm_PastHistory.PastHistoryPanel']
> print defaults
>
> #plugin_list =
gmPlugin.GetPluginLoadList('terry_layout.plugins', defaults )
> plugin_list =
gmPlugin.GetPluginLoadList('terry_layout.plugins', defaults )
113a119
> print "error loading", curr_plugin
124c130,133
< png_fname =
os.path.join(self.__gb['gnumed_dir'], 'bitmaps', 'default.png')
---
> png_fname =
os.path.join(self.__gb['gnumed_dir'], 'bitmaps', 'serpent.png')
> #<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]
Index: wxpython/gmTerryGuiParts.py
===================================================================
RCS file: /cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmTerryGuiParts.py,v
retrieving revision 1.2
diff -r1.2 gmTerryGuiParts.py
48c48
< sizer.Add(0,9,6)
---
> sizer.Add((0,1),9,6)
cvs diff: Diffing wxpython/bitmaps
cvs diff: Diffing wxpython/gui
cvs diff: Diffing wxpython/gui-de
cvs diff: Diffing wxpython/patient
Index: wxpython/patient/gmGP_PastHistory.py
===================================================================
# fix the way imports were added .
RCS file:
/cvsroot/gnumed/gnumed/gnumed/client/wxpython/patient/gmGP_PastHistory.py,v
retrieving revision 1.13
diff -r1.13 gmGP_PastHistory.py
29,33c29,32
< import gmGuiElement_HeadingCaptionPanel #panel class to
display top headings
< import gmGuiElement_DividerCaptionPanel #panel class to
display sub-headings or divider headings
< import gmGuiElement_AlertCaptionPanel #panel to hold flashing
alert messages
< import gmEditArea #panel
class holding editing prompts and text boxes
< import gmPlugin_Patient, gmLog
---
> from Gnumed.wxpython.gmTerryGuiParts import *
> import Gnumed.wxpython.gmEditArea as
gmEditArea #panel class holding
editing prompts and text boxes
> import Gnumed.wxpython.gmPlugin_Patient as gmPlugin_Patient
> import Gnumed.pycommon.gmLog
35c34,36
< import gmDispatcher, gmSignals
---
> import Gnumed.pycommon.gmSignals as gmSignals
>
> import Gnumed.pycommon.gmDispatcher as gmDispatcher
37,38c38
< from gmPatientHolder import PatientHolder
< import gmPatientHolder
---
> from Gnumed.wxpython.gmPatientHolder import PatientHolder
40c40
< from gmListCtrlMapper import gmListCtrlMapper
---
> from Gnumed.wxpython.gmListCtrlMapper import gmListCtrlMapper
42c42,43
< import gmMultiColumnList
---
> from Gnumed.wxpython.gmMultiColumnList import MultiColumnList
> import sys
78c79
< def __init__(self, parent,id):
---
> def __init__(self, parent,id =wxNewId()):
85c86
< self.pasthistorypanelheading =
gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1, " PAST
HISTORY ")
---
> self.pasthistorypanelheading = cHeadingCaption(self,-1,
" PAST HISTORY ")
101c102
< self.significant_history_heading =
gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Significant
Past Problems"))
---
> self.significant_history_heading =
cDividerCaption(self,-1,_("Significant Past Problems"))
114c115
< self.significant_problem_list =
gmMultiColumnList.MultiColumnList(self, -1)
---
> self.significant_problem_list = MultiColumnList(self, -1)
117c118
< self.active_problem_list =
gmMultiColumnList.MultiColumnList(self, -1)
---
> self.active_problem_list = MultiColumnList(self, -1)
170c171
< self.active_problems_heading =
gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Active
Problems"))
---
> self.active_problems_heading =
cDividerCaption(self,-1,_("Active Problems"))
174c175
< self.alertpanel =
gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1," Alerts ")
---
> self.alertpanel = cAlertCaption(self,-1," Alerts ")
- [Gnumed-devel] review of possible checkin.,
catmat <=