Return to repo list

opet

Oblivion Proton .esp Tool
Return to HMagellan.com

commit 9a3ce89faf96f52c974706fabc96ea5094c1b038
parent f32c4f453ef57429fe9e25cfcfc9402e8224d3cf
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Thu,  7 Jan 2021 15:51:40 -0600

Actual functioning checkboxes

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

diff --git a/environment.json b/environment.json @@ -2,6 +2,6 @@ "OblivionPath" : "~/.steam/steamapps/common/Oblivion", "OblivionDataPath" : "~/.steam/steamapps/common/Oblivion/Data", "OblivionPrefixPath" : "~/.steam/steamapps/compatdata/22330/pfx", - "OblivionPrefixAppdata" : "~/.steam/steamapps/compatdata/22330/pfx/drive_c/users/steamuser/Local\ Settings/Application\ Data/Oblivion", + "OblivionPrefixAppdata" : "~/.steam/steamapps/compatdata/22330/pfx/drive_c/users/steamuser/Local\\ Settings/Application\\ Data/Oblivion", "StoragePath" : "~/.local/share/opet" } diff --git a/src/opet.py b/src/opet.py @@ -105,7 +105,7 @@ class OPETFrame(wx.Frame): index = 0 for e in self.espjson["discovered"]: - entry = ["0", index, e, self.espjson["comments"][e] if e in self.espjson["comments"] else ""] + entry = ["", index, e, self.espjson["comments"][e] if e in self.espjson["comments"] else ""] self.drag_list_ctrl.Append(entry) index += 1 diff --git a/src/wxcustom.py b/src/wxcustom.py @@ -12,14 +12,23 @@ from wx.lib.mixins import listctrl # Section 1 - Custom wx classes # ################################# -class EditableListCtrl(wx.ListCtrl, listctrl.CheckListCtrlMixin, listctrl.TextEditMixin): +class EditableListCtrl(wx.ListCtrl, listctrl.TextEditMixin): def __init__(self, manager): # Parent initialization wx.ListCtrl.__init__(self, manager, style = wx.LC_REPORT) - listctrl.CheckListCtrlMixin.__init__(self) listctrl.TextEditMixin.__init__(self) # Set values self.manager = manager + self.EnableCheckBoxes(True) + + # Bind + self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit) + + def OnBeginLabelEdit(self, event): + if event.GetColumn() == 0: + event.Veto() + else: + event.Skip()