Return to repo list

opet

Oblivion Proton .esp Tool
Return to HMagellan.com

commit e94f8b98abbcedccdd90d67d9bdaddbe8ce163a7
parent 9a3ce89faf96f52c974706fabc96ea5094c1b038
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Thu,  7 Jan 2021 15:56:59 -0600

name changes for listctrl

Diffstat:
Msrc/opet.py | 6+-----
Msrc/wxcustom.py | 13++++++++++++-
2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/opet.py b/src/opet.py @@ -97,11 +97,7 @@ class OPETFrame(wx.Frame): #self.load_order = self.manager.esp_tool.get_load_order_list(os.path.join(self.filer.get_environment()["OblivionPrefixAppdata"]) # Construct esp list - self.drag_list_ctrl = wxcustom.EditableListCtrl(self) - self.drag_list_ctrl.InsertColumn(0, "Enabled") - self.drag_list_ctrl.InsertColumn(1, "Order") - self.drag_list_ctrl.InsertColumn(2, "File") - self.drag_list_ctrl.InsertColumn(3, "Comment") + self.esp_list_ctrl = wxcustom.ESPListCtrl(self) index = 0 for e in self.espjson["discovered"]: diff --git a/src/wxcustom.py b/src/wxcustom.py @@ -12,7 +12,12 @@ from wx.lib.mixins import listctrl # Section 1 - Custom wx classes # ################################# -class EditableListCtrl(wx.ListCtrl, listctrl.TextEditMixin): +class ESPListCtrl(wx.ListCtrl, listctrl.TextEditMixin): + """ + ListCtrl object that is used to edit + the list of esp files that should be + enabled and also their load order. + """ def __init__(self, manager): @@ -24,6 +29,12 @@ class EditableListCtrl(wx.ListCtrl, listctrl.TextEditMixin): self.manager = manager self.EnableCheckBoxes(True) + # Columns + self.InsertColumn(0, "Enabled") + self.InsertColumn(1, "Order") + self.InsertColumn(2, "File") + self.InsertColumn(3, "Comment") + # Bind self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit)