mirror of
https://github.com/lalbornoz/roar.git
synced 2024-12-22 12:26:37 +00:00
libgui/GuiCanvasInterface.py: soft-fail importing ImgurApiKey.
assets/text/TODO: updated.
This commit is contained in:
parent
52672796c6
commit
e54429e29e
@ -1,15 +1,14 @@
|
||||
1) General {cleanup,refactor}
|
||||
2) Implement ANSI CSI CU[BDPU] sequences & italic
|
||||
3) Incremental auto{load,save} & {backup,restore}
|
||||
4) Implement instrumentation & unit tests, document
|
||||
5) Open and toggle a reference image in the background
|
||||
6) Client-Server or Peer-to-Peer realtime collaboration
|
||||
7) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
||||
8) Hotkey & graphical interfaces to {composed,parametrised} tools
|
||||
9) GUI: a) scrollbar b) {de,in}crease cell size c) revisit About dialogue d) Settings panel e) switch from wxPython to GTK
|
||||
10) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking}
|
||||
11) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||
12) Composition and parametrisation of tools from higher-order operators (brushes, filters, outlines, patterns & shaders) and unit tools; unit tools:
|
||||
1) Implement ANSI CSI CU[BDPU] sequences & italic
|
||||
2) Incremental auto{load,save} & {backup,restore}
|
||||
3) Implement instrumentation & unit tests, document
|
||||
4) Open and toggle a reference image in the background
|
||||
5) Client-Server or Peer-to-Peer realtime collaboration
|
||||
6) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
||||
7) Hotkey & graphical interfaces to {composed,parametrised} tools
|
||||
8) GUI: a) scrollbar b) {de,in}crease cell size c) revisit About dialogue d) Settings panel e) switch from wxPython to GTK
|
||||
9) Layers, layout (e.g. for comics, zines, etc.) & asset management (e.g. kade, lion, etc.) & traits w/ {inserting,merging,linking}
|
||||
10) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||
11) Composition and parametrisation of tools from higher-order operators (brushes, filters, outlines, patterns & shaders) and unit tools; unit tools:
|
||||
a) geometric primitives (arrow, circle, cloud/speech bubble, curve, heart, hexagon, line, pentagon, polygon, rhombus, triangle, square, star)
|
||||
b) regions (crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate)
|
||||
c) text (edit, Unicode sets)
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
||||
#
|
||||
|
||||
try:
|
||||
from ImgurApiKey import ImgurApiKey
|
||||
haveImgurApiKey = True
|
||||
except ImportError:
|
||||
haveImgurApiKey = False
|
||||
|
||||
try:
|
||||
import base64, json, requests, urllib.request
|
||||
haveUrllib = True
|
||||
@ -21,7 +27,6 @@ from ToolText import ToolText
|
||||
from GuiCanvasColours import Colours
|
||||
from GuiCanvasInterfaceAbout import GuiCanvasInterfaceAbout
|
||||
from GuiFrame import NID_MENU_SEP, NID_TOOLBAR_HSEP
|
||||
from ImgurApiKey import ImgurApiKey
|
||||
import io, os, sys, wx
|
||||
|
||||
class GuiCanvasInterface():
|
||||
@ -359,7 +364,7 @@ class GuiCanvasInterface():
|
||||
return True
|
||||
# }}}
|
||||
# {{{ canvasExportImgur(self, event)
|
||||
@CommandDecorator("Export to Imgur...", "Export to I&mgur...", None, None, haveUrllib)
|
||||
@CommandDecorator("Export to Imgur...", "Export to I&mgur...", None, None, haveImgurApiKey and haveUrllib)
|
||||
def canvasExportImgur(self, event):
|
||||
self.parentCanvas.SetCursor(wx.Cursor(wx.CURSOR_WAIT))
|
||||
rc, status, result = self.parentCanvas.canvas.exportStore.exportBitmapToImgur(self.imgurApiKey, self.parentCanvas.backend.canvasBitmap, "", "", wx.BITMAP_TYPE_PNG)
|
||||
@ -530,7 +535,8 @@ class GuiCanvasInterface():
|
||||
#
|
||||
# __init__(self, parentCanvas, parentFrame):
|
||||
def __init__(self, parentCanvas, parentFrame):
|
||||
self.canvasPathName, self.imgurApiKey, self.lastPanelState, self.parentCanvas, self.parentFrame = None, ImgurApiKey.imgurApiKey, {}, parentCanvas, parentFrame
|
||||
self.canvasPathName, self.lastPanelState, self.parentCanvas, self.parentFrame = None, {}, parentCanvas, parentFrame
|
||||
self.imgurApiKey = ImgurApiKey.imgurApiKey if haveImgurApiKey else None
|
||||
self._initColourBitmaps()
|
||||
|
||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=0
|
||||
|
Loading…
Reference in New Issue
Block a user