[Spambayes-checkins] spambayes/Outlook2000/dialogs dialog_map.py,
1.6, 1.7
Adam Walker
xenogeist at users.sourceforge.net
Mon Aug 18 08:17:05 EDT 2003
- Previous message: [Spambayes-checkins] spambayes/Outlook2000/dialogs/resources
dialogs.h, 1.3, 1.4 dialogs.rc, 1.4, 1.5
- Next message: [Spambayes-checkins] spambayes/Outlook2000/dialogs dialog_map.py,
1.7, 1.8 dlgcore.py, 1.5, 1.6 opt_processors.py, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv2527/Outlook2000/dialogs
Modified Files:
dialog_map.py
Log Message:
Bug Fix #790406: Allow the timers to be set in half second increments.
Index: dialog_map.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dialog_map.py 18 Aug 2003 13:31:53 -0000 1.6
--- dialog_map.py 18 Aug 2003 14:17:03 -0000 1.7
***************
*** 75,82 ****
def InitSlider(self):
slider = self.GetControl(self.slider_id)
! win32gui.SendMessage(slider, commctrl.TBM_SETRANGE, 0, MAKELONG(0, 10))
win32gui.SendMessage(slider, commctrl.TBM_SETLINESIZE, 0, 1)
win32gui.SendMessage(slider, commctrl.TBM_SETPAGESIZE, 0, 1)
! win32gui.SendMessage(slider, commctrl.TBM_SETTICFREQ, 1, 0)
self.UpdateSlider_FromEdit()
def OnMessage(self, msg, wparam, lparam):
--- 75,82 ----
def InitSlider(self):
slider = self.GetControl(self.slider_id)
! win32gui.SendMessage(slider, commctrl.TBM_SETRANGE, 0, MAKELONG(0, 20))
win32gui.SendMessage(slider, commctrl.TBM_SETLINESIZE, 0, 1)
win32gui.SendMessage(slider, commctrl.TBM_SETPAGESIZE, 0, 1)
! win32gui.SendMessage(slider, commctrl.TBM_SETTICFREQ, 2, 0)
self.UpdateSlider_FromEdit()
def OnMessage(self, msg, wparam, lparam):
***************
*** 84,89 ****
if slider == lparam:
slider_pos = win32gui.SendMessage(slider, commctrl.TBM_GETPOS, 0, 0)
! slider_pos = int(slider_pos)
! str_val = str(slider_pos)
edit = self.GetControl()
win32gui.SendMessage(edit, win32con.WM_SETTEXT, 0, str_val)
--- 84,89 ----
if slider == lparam:
slider_pos = win32gui.SendMessage(slider, commctrl.TBM_GETPOS, 0, 0)
! slider_pos = float(slider_pos)
! str_val = str(slider_pos*.5)
edit = self.GetControl()
win32gui.SendMessage(edit, win32con.WM_SETTEXT, 0, str_val)
***************
*** 93,97 ****
# Get as float so we dont fail should the .0 be there, but
# then convert to int as the slider only works with ints
! val = int(float(self.option.get()/1000))
except ValueError:
return
--- 93,97 ----
# Get as float so we dont fail should the .0 be there, but
# then convert to int as the slider only works with ints
! val = int(float(self.option.get())/500.0)
except ValueError:
return
***************
*** 99,103 ****
def UpdateControl_FromValue(self):
! value = self.option.get()/1000
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0, str(value))
self.UpdateSlider_FromEdit()
--- 99,103 ----
def UpdateControl_FromValue(self):
! value = float(self.option.get())/1000.0
win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0, str(value))
self.UpdateSlider_FromEdit()
***************
*** 108,115 ****
buf_size, buf)
str_val = buf[:nchars]
! val = int(str_val)
! if val < 0 or val > 10:
raise ValueError, "Value must be between 0 and 10"
! self.SetOptionValue(val*1000)
--- 108,115 ----
buf_size, buf)
str_val = buf[:nchars]
! val = float(str_val)
! if val < 0.0 or val > 10.0:
raise ValueError, "Value must be between 0 and 10"
! self.SetOptionValue(int(val*1000.0))
- Previous message: [Spambayes-checkins] spambayes/Outlook2000/dialogs/resources
dialogs.h, 1.3, 1.4 dialogs.rc, 1.4, 1.5
- Next message: [Spambayes-checkins] spambayes/Outlook2000/dialogs dialog_map.py,
1.7, 1.8 dlgcore.py, 1.5, 1.6 opt_processors.py, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Spambayes-checkins
mailing list