[GRASS-SVN] r73472 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 30 19:53:30 PDT 2018
Author: annakrat
Date: 2018-09-30 19:53:30 -0700 (Sun, 30 Sep 2018)
New Revision: 73472
Modified:
grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: fix GListCtrl for wxPython 4
Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py 2018-09-30 17:14:09 UTC (rev 73471)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py 2018-10-01 02:53:30 UTC (rev 73472)
@@ -91,7 +91,7 @@
from core.gcmd import GMessage, GError
from core.debug import Debug
from gui_core.wrap import Button, SearchCtrl, StaticText, StaticBox, \
- TextCtrl, Menu, Rect, EmptyBitmap
+ TextCtrl, Menu, Rect, EmptyBitmap, ListCtrl
class NotebookController:
@@ -935,7 +935,7 @@
self.Refresh()
-class GListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin,
+class GListCtrl(ListCtrl, listmix.ListCtrlAutoWidthMixin,
listmix.CheckListCtrlMixin):
"""Generic ListCtrl with popup menu to select/deselect all
items"""
@@ -943,7 +943,7 @@
def __init__(self, parent):
self.parent = parent
- wx.ListCtrl.__init__(self, parent, id=wx.ID_ANY,
+ ListCtrl.__init__(self, parent, id=wx.ID_ANY,
style=wx.LC_REPORT)
listmix.CheckListCtrlMixin.__init__(self)
@@ -1035,7 +1035,10 @@
idx = 0
for item in data:
- index = self.InsertStringItem(idx, str(item[0]))
+ if wxPythonPhoenix:
+ index = self.InsertItem(idx, str(item[0]))
+ else:
+ index = self.InsertStringItem(idx, str(item[0]))
for i in range(1, self.GetColumnCount()):
self.SetStringItem(index, i, item[i])
idx += 1
More information about the grass-commit
mailing list