Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26250
Modified Files:
debugger.py
Log Message:
Save and restore Visible state of debugger windows
Index: debugger.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** debugger.py 3 Sep 2008 21:23:15 -0000 1.18
--- debugger.py 4 Sep 2008 23:29:16 -0000 1.19
***************
*** 185,188 ****
--- 185,189 ----
self.list.DeleteAllItems()
self.listOK = 0
+ win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Visible", self.IsWindowVisible())
def CreateWindow(self, parent):
style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_BORDER | commctrl.TVS_HASLINES | commctrl.TVS_LINESATROOT | commctrl.TVS_HASBUTTONS
***************
*** 295,299 ****
def SaveState(self):
! pass
def OnListEndLabelEdit(self, std, extra):
--- 296,306 ----
def SaveState(self):
! items = []
! for i in range(self.GetItemCount()):
! items.append(self.GetItemText(i,0))
! items.append(self.GetItemText(i,1))
! win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "BreakpointList", "\t".join(items))
! win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Visible", self.IsWindowVisible())
! return 1
def OnListEndLabelEdit(self, std, extra):
***************
*** 359,362 ****
--- 366,370 ----
items.append(self.GetItemText(i,0))
win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Items", "\t".join(items))
+ win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Visible", self.IsWindowVisible())
return 1
***************
*** 444,448 ****
frame.FloatControlBar(bar, float, afxres.CBRS_ALIGN_ANY)
! frame.ShowControlBar(bar, 0, 1)
--- 452,456 ----
frame.FloatControlBar(bar, float, afxres.CBRS_ALIGN_ANY)
! ## frame.ShowControlBar(bar, 0, 1)
***************
*** 615,619 ****
self.prep_run(cmd)
sys.settrace(self.trace_dispatch)
! if type(cmd) <> types.CodeType:
cmd = cmd+'\n'
try:
--- 623,627 ----
self.prep_run(cmd)
sys.settrace(self.trace_dispatch)
! if type(cmd) != types.CodeType:
cmd = cmd+'\n'
try:
***************
*** 684,690 ****
else:
fname = "??"
! print `name`, fname, frame.f_lineno, frame
else:
! print `name`, "None"
def set_trace(self):
--- 692,698 ----
else:
fname = "??"
! print repr(name), fname, frame.f_lineno, frame
else:
! print repr(name), "None"
def set_trace(self):
***************
*** 776,781 ****
# Ensure the debugger windows are attached to the debugger.
for id, klass, float in DebuggerDialogInfos:
! w = frame.GetControlBar(id).dialog
! w.Init(self)
# ALWAYS show debugging toolbar, regardless of saved state
--- 784,793 ----
# Ensure the debugger windows are attached to the debugger.
for id, klass, float in DebuggerDialogInfos:
! w = frame.GetControlBar(id)
! w.dialog.Init(self)
! # Show toolbar if it was visible during last debug session
! # This would be better done using a CDockState, but that class is not wrapped yet
! if win32ui.GetProfileVal("Debugger Windows\\" + w.dialog.title, "Visible", 0):
! frame.ShowControlBar(w, 1, 1)
# ALWAYS show debugging toolbar, regardless of saved state
|