[Spambayes-checkins] spambayes/Outlook2000/dialogs
FolderSelector.py, 1.20.2.1, 1.20.2.2
Mark Hammond
mhammond at users.sourceforge.net
Tue Aug 5 04:58:42 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv16345
Modified Files:
Tag: outlook-dialog-branch
FolderSelector.py
Log Message:
Bye bye win32ui.
Index: FolderSelector.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/FolderSelector.py,v
retrieving revision 1.20.2.1
retrieving revision 1.20.2.2
diff -C2 -d -r1.20.2.1 -r1.20.2.2
*** FolderSelector.py 5 Aug 2003 08:18:21 -0000 1.20.2.1
--- FolderSelector.py 5 Aug 2003 10:58:39 -0000 1.20.2.2
***************
*** 1,4 ****
--- 1,5 ----
from __future__ import generators
+ import sys, os
import win32con
import commctrl
***************
*** 216,219 ****
--- 217,221 ----
self.item_map = {}
self.timer_id = None
+ self.imageList = None
self.select_desc_noun = desc_noun
***************
*** 382,393 ****
self.list = self.GetDlgItem("IDC_LIST_FOLDERS")
! print "Drop win32ui!!!!!"
! import win32ui
! bitmapID = win32ui.IDB_HIERFOLDERS
bitmapMask = win32api.RGB(0,0,255)
! self.imageList = win32ui.CreateImageList(bitmapID, 16, 0, bitmapMask)
win32gui.SendMessage( self.list,
! commctrl.TVM_SETIMAGELIST,
! commctrl.TVSIL_NORMAL, self.imageList.GetSafeHandle() )
if self.single_select:
# Remove the checkbox style from the list for single-selection
--- 384,397 ----
self.list = self.GetDlgItem("IDC_LIST_FOLDERS")
! fname = os.path.join(os.path.dirname(__file__), "resources/folders.bmp")
bitmapMask = win32api.RGB(0,0,255)
! self.imageList = win32gui.ImageList_LoadImage(0, fname,
! 16, 0,
! bitmapMask,
! win32con.IMAGE_BITMAP,
! win32con.LR_LOADFROMFILE)
win32gui.SendMessage( self.list,
! commctrl.TVM_SETIMAGELIST,
! commctrl.TVSIL_NORMAL, self.imageList )
if self.single_select:
# Remove the checkbox style from the list for single-selection
***************
*** 420,423 ****
--- 424,428 ----
timer.kill_timer(self.timer_id)
self.item_map = None
+ win32gui.ImageList_Destroy(self.imageList)
FolderSelector_Parent.OnDestroy(self, hwnd, msg, wparam, lparam)
More information about the Spambayes-checkins
mailing list