mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-21 23:06:38 +00:00
Allow purging MRU list manually & on failure.
assets/text/TODO: updated.
This commit is contained in:
parent
600cecfad1
commit
1d650bd64b
@ -15,16 +15,16 @@
|
|||||||
15) GUI TODO list:
|
15) GUI TODO list:
|
||||||
a) {load,store} LRU {open,save} directory
|
a) {load,store} LRU {open,save} directory
|
||||||
b) replace logo w/ canvas panel in About dialogue
|
b) replace logo w/ canvas panel in About dialogue
|
||||||
c) purge MRU list menu item, remove files from MRU list if inaccessible
|
c) Settings/Settings window (e.g. autosave, hide cursor on leaving window, ...)
|
||||||
d) Settings/Settings window (e.g. autosave, hide cursor on leaving window, ...)
|
d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3)
|
||||||
e) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3)
|
e) {copy,cut,delete,insert from,paste}, {edit asset in new canvas,import from {canvas,object}}
|
||||||
f) {copy,cut,delete,insert from,paste}, {edit asset in new canvas,import from {canvas,object}}
|
|
||||||
|
|
||||||
High-priority list:
|
High-priority list:
|
||||||
1) a) select line tool b) set origin point c) move mouse about d) incr brush size e) set target point d) undo
|
1) bug: a) select line tool b) set origin point c) move mouse about d) incr brush size e) set target point d) undo
|
||||||
a) new canvas/startup b) place rect c) move mouse d) undo status changes
|
bug: a) new canvas/startup b) place rect c) move mouse d) undo status changes
|
||||||
a) text tool b) paste text c) undo
|
bug: a) text tool b) paste text c) undo
|
||||||
2) add hotkeys.txt mIRC art canvas to help menu
|
2) bug: a) start w/ spoke-vxplion.txt b) scroll down c) fix w/ canvas resize
|
||||||
3) tools: erase, pick, unicode block elements
|
3) add hotkeys.txt mIRC art canvas to help menu
|
||||||
|
4) tools: erase, pick, unicode block elements
|
||||||
|
|
||||||
vim:ff=dos tw=0
|
vim:ff=dos tw=0
|
||||||
|
@ -81,7 +81,7 @@ class RoarCanvasCommandsFile():
|
|||||||
if (numLastFiles + 1) > 8:
|
if (numLastFiles + 1) > 8:
|
||||||
self.canvasOpenRecent.attrDict["menu"].Delete(self.lastFiles[0]["menuItemId"])
|
self.canvasOpenRecent.attrDict["menu"].Delete(self.lastFiles[0]["menuItemId"])
|
||||||
del self.lastFiles[0]
|
del self.lastFiles[0]
|
||||||
menuItemWindow = self.canvasOpenRecent.attrDict["menu"].Append(menuItemId, "{}".format(pathName), pathName)
|
menuItemWindow = self.canvasOpenRecent.attrDict["menu"].Insert(self.canvasOpenRecent.attrDict["menu"].GetMenuItemCount() - 2, menuItemId, "{}".format(pathName), pathName)
|
||||||
self.parentFrame.menuItemsById[self.canvasOpenRecent.attrDict["id"]].Enable(True)
|
self.parentFrame.menuItemsById[self.canvasOpenRecent.attrDict["id"]].Enable(True)
|
||||||
self.parentFrame.Bind(wx.EVT_MENU, lambda event: self.canvasOpenRecent(event, pathName), menuItemWindow)
|
self.parentFrame.Bind(wx.EVT_MENU, lambda event: self.canvasOpenRecent(event, pathName), menuItemWindow)
|
||||||
self.lastFiles += [{"menuItemId":menuItemId, "menuItemWindow":menuItemWindow, "pathName":pathName}]
|
self.lastFiles += [{"menuItemId":menuItemId, "menuItemWindow":menuItemWindow, "pathName":pathName}]
|
||||||
@ -91,6 +91,17 @@ class RoarCanvasCommandsFile():
|
|||||||
for lastFile in [l["pathName"] for l in self.lastFiles]:
|
for lastFile in [l["pathName"] for l in self.lastFiles]:
|
||||||
print(lastFile, file=outFile)
|
print(lastFile, file=outFile)
|
||||||
|
|
||||||
|
@GuiCommandDecorator("Clear list", "&Clear list", None, None, False)
|
||||||
|
def canvasClearRecent(self, event):
|
||||||
|
if self.lastFiles != None:
|
||||||
|
for lastFile in self.lastFiles:
|
||||||
|
self.canvasOpenRecent.attrDict["menu"].Delete(lastFile["menuItemId"])
|
||||||
|
self.lastFiles = []
|
||||||
|
localConfFileName = getLocalConfPathName("Recent.lst")
|
||||||
|
if os.path.exists(localConfFileName):
|
||||||
|
os.unlink(localConfFileName)
|
||||||
|
self.parentFrame.menuItemsById[self.canvasOpenRecent.attrDict["id"]].Enable(False)
|
||||||
|
|
||||||
@GuiCommandDecorator("Exit", "E&xit", None, [wx.ACCEL_CTRL, ord("X")], None)
|
@GuiCommandDecorator("Exit", "E&xit", None, [wx.ACCEL_CTRL, ord("X")], None)
|
||||||
def canvasExit(self, event):
|
def canvasExit(self, event):
|
||||||
if self._promptSaveChanges():
|
if self._promptSaveChanges():
|
||||||
@ -213,11 +224,14 @@ class RoarCanvasCommandsFile():
|
|||||||
|
|
||||||
@GuiSubMenuDecorator("Open Recent", "Open &Recent", None, None, False)
|
@GuiSubMenuDecorator("Open Recent", "Open &Recent", None, None, False)
|
||||||
def canvasOpenRecent(self, event, pathName=None):
|
def canvasOpenRecent(self, event, pathName=None):
|
||||||
def canvasImportmIRC(pathName):
|
def canvasImportmIRC(pathName_):
|
||||||
rc, error = self.parentCanvas.canvas.importStore.importTextFile(pathName)
|
rc, error = self.parentCanvas.canvas.importStore.importTextFile(pathName_)
|
||||||
return (rc, error, self.parentCanvas.canvas.importStore.outMap, pathName, self.parentCanvas.canvas.importStore.inSize)
|
return (rc, error, self.parentCanvas.canvas.importStore.outMap, pathName_, self.parentCanvas.canvas.importStore.inSize)
|
||||||
if self._promptSaveChanges():
|
if self._promptSaveChanges():
|
||||||
self._import(canvasImportmIRC, False, pathName)
|
rc, newPathName = self._import(canvasImportmIRC, False, pathName)
|
||||||
|
if not rc:
|
||||||
|
numLastFile = [i for i in range(len(self.lastFiles)) if self.lastFiles[i]["pathName"] == pathName][0]
|
||||||
|
self.canvasOpenRecent.attrDict["menu"].Delete(self.lastFiles[numLastFile]["menuItemId"]); del self.lastFiles[numLastFile];
|
||||||
|
|
||||||
@GuiCommandDecorator("Save", "&Save", ["", wx.ART_FILE_SAVE], [wx.ACCEL_CTRL, ord("S")], None)
|
@GuiCommandDecorator("Save", "&Save", ["", wx.ART_FILE_SAVE], [wx.ACCEL_CTRL, ord("S")], None)
|
||||||
def canvasSave(self, event, newDirty=False):
|
def canvasSave(self, event, newDirty=False):
|
||||||
|
@ -54,5 +54,9 @@ class RoarClient(GuiFrame):
|
|||||||
for menuItem in self.canvasPanel.commands.menus[3][1:]:
|
for menuItem in self.canvasPanel.commands.menus[3][1:]:
|
||||||
menuItemWindow = self.canvasPanel.operatorsMenu.Append(menuItem.attrDict["id"], menuItem.attrDict["label"], menuItem.attrDict["caption"])
|
menuItemWindow = self.canvasPanel.operatorsMenu.Append(menuItem.attrDict["id"], menuItem.attrDict["label"], menuItem.attrDict["caption"])
|
||||||
self.Bind(wx.EVT_MENU, self.onMenu, menuItemWindow)
|
self.Bind(wx.EVT_MENU, self.onMenu, menuItemWindow)
|
||||||
|
self.canvasPanel.commands.canvasOpenRecent.attrDict["menu"].AppendSeparator()
|
||||||
|
self.canvasPanel.commands.canvasClearRecent.attrDict["id"] = wx.NewId()
|
||||||
|
menuItemWindow = self.canvasPanel.commands.canvasOpenRecent.attrDict["menu"].Append(self.canvasPanel.commands.canvasClearRecent.attrDict["id"], self.canvasPanel.commands.canvasClearRecent.attrDict["label"], self.canvasPanel.commands.canvasClearRecent.attrDict["caption"])
|
||||||
|
self.canvasPanel.commands.canvasOpenRecent.attrDict["menu"].Bind(wx.EVT_MENU, self.canvasPanel.commands.canvasClearRecent, menuItemWindow)
|
||||||
|
|
||||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
||||||
|
Loading…
Reference in New Issue
Block a user