mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 07:16:38 +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}
|
1) Implement ANSI CSI CU[BDPU] sequences & italic
|
||||||
2) Implement ANSI CSI CU[BDPU] sequences & italic
|
2) Incremental auto{load,save} & {backup,restore}
|
||||||
3) Incremental auto{load,save} & {backup,restore}
|
3) Implement instrumentation & unit tests, document
|
||||||
4) Implement instrumentation & unit tests, document
|
4) Open and toggle a reference image in the background
|
||||||
5) Open and toggle a reference image in the background
|
5) Client-Server or Peer-to-Peer realtime collaboration
|
||||||
6) Client-Server or Peer-to-Peer realtime collaboration
|
6) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
||||||
7) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.)
|
7) Hotkey & graphical interfaces to {composed,parametrised} tools
|
||||||
8) 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) 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) 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) 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:
|
||||||
12) 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)
|
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)
|
b) regions (crop, duplicate, erase, fill, invert, measure, pick, rotate, scale, select, shift, slice, tile, translate)
|
||||||
c) text (edit, Unicode sets)
|
c) text (edit, Unicode sets)
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
try:
|
||||||
|
from ImgurApiKey import ImgurApiKey
|
||||||
|
haveImgurApiKey = True
|
||||||
|
except ImportError:
|
||||||
|
haveImgurApiKey = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import base64, json, requests, urllib.request
|
import base64, json, requests, urllib.request
|
||||||
haveUrllib = True
|
haveUrllib = True
|
||||||
@ -21,7 +27,6 @@ from ToolText import ToolText
|
|||||||
from GuiCanvasColours import Colours
|
from GuiCanvasColours import Colours
|
||||||
from GuiCanvasInterfaceAbout import GuiCanvasInterfaceAbout
|
from GuiCanvasInterfaceAbout import GuiCanvasInterfaceAbout
|
||||||
from GuiFrame import NID_MENU_SEP, NID_TOOLBAR_HSEP
|
from GuiFrame import NID_MENU_SEP, NID_TOOLBAR_HSEP
|
||||||
from ImgurApiKey import ImgurApiKey
|
|
||||||
import io, os, sys, wx
|
import io, os, sys, wx
|
||||||
|
|
||||||
class GuiCanvasInterface():
|
class GuiCanvasInterface():
|
||||||
@ -359,7 +364,7 @@ class GuiCanvasInterface():
|
|||||||
return True
|
return True
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ canvasExportImgur(self, event)
|
# {{{ 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):
|
def canvasExportImgur(self, event):
|
||||||
self.parentCanvas.SetCursor(wx.Cursor(wx.CURSOR_WAIT))
|
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)
|
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):
|
# __init__(self, parentCanvas, parentFrame):
|
||||||
def __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()
|
self._initColourBitmaps()
|
||||||
|
|
||||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=0
|
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=0
|
||||||
|
Loading…
Reference in New Issue
Block a user