AGW on Phoenix: restore support for HTMLListBox and SimpleHTMLListBox in persist_handlers.py.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2013-03-27 21:25:20 +00:00
parent 0b6e189833
commit f2d130ffc0

View File

@@ -534,13 +534,12 @@ class ListBoxHandler(AbstractHandler):
indices = []
# Not wrapped yet?
# if isinstance(listBox, (wx.HtmlListBox, wx.SimpleHtmlListBox)):
# if listBox.GetSelectedCount() == 0:
# return indices
# else:
if listBox.GetSelectedItemCount() == 0:
return indices
if isinstance(listBox, (wx.HtmlListBox, wx.SimpleHtmlListBox)):
if listBox.GetSelectedCount() == 0:
return indices
else:
if listBox.GetSelectedItemCount() == 0:
return indices
isVirtual = issubclass(listBox.__class__, wx.VListBox)
@@ -607,9 +606,8 @@ class ListBoxHandler(AbstractHandler):
isVirtual = issubclass(listBox.__class__, wx.VListBox) or isinstance(listBox, wx.CheckListBox)
# Not wrapped yet?
# isHtml = isinstance(listBox, wx.HtmlListBox)
if isVirtual: # and not isHtml:
isHtml = isinstance(listBox, wx.HtmlListBox)
if isVirtual and not isHtml:
count = listBox.GetCount()
else:
count = listBox.GetItemCount()
@@ -2509,7 +2507,7 @@ HANDLERS = [
("TreeCtrlHandler", (wx.TreeCtrl, wx.GenericDirCtrl, CT.CustomTreeCtrl)),
("MenuBarHandler", (wx.MenuBar, FM.FlatMenuBar)),
("ToolBarHandler", (AUI.AuiToolBar, )),
("ListBoxHandler", (wx.ListBox, wx.VListBox, # not wrapped yet?? wx.HtmlListBox, wx.SimpleHtmlListBox,
("ListBoxHandler", (wx.ListBox, wx.VListBox, wx.HtmlListBox, wx.SimpleHtmlListBox,
wx.adv.EditableListBox)),
("ListCtrlHandler", (wx.ListCtrl, wx.ListView)), #ULC.UltimateListCtrl (later)
("ChoiceComboHandler", (wx.Choice, wx.ComboBox, wx.adv.OwnerDrawnComboBox)),