mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
.
This commit is contained in:
parent
e05c29e205
commit
80c691a578
@ -48,15 +48,9 @@ def grabwindow(app="PNG", callback_origin=None, tocliponly=False):
|
|||||||
os.makedirs(dirname, exist_ok=True)
|
os.makedirs(dirname, exist_ok=True)
|
||||||
fname = os.path.join(dirname, tmsp)
|
fname = os.path.join(dirname, tmsp)
|
||||||
except:
|
except:
|
||||||
fnamebase = "cache/screenshot"
|
fname = gobject.getcachedir(
|
||||||
if not os.path.exists(fnamebase):
|
"screenshot/{}/{}".format(exename, tmsp), abspath=False
|
||||||
fnamebase = windows.SHGetFolderPathW(windows.CSIDL_MYPICTURES)
|
)
|
||||||
if not (fnamebase and os.path.exists(fnamebase)):
|
|
||||||
fnamebase = "cache/screenshot"
|
|
||||||
else:
|
|
||||||
fnamebase = os.path.join(fnamebase, "LunaTranslator")
|
|
||||||
fname = os.path.join(fnamebase, exename, tmsp)
|
|
||||||
os.makedirs(os.path.join(fnamebase, exename), exist_ok=True)
|
|
||||||
|
|
||||||
def callback_1(callback_origin, uid, tocliponly, p: QPixmap, fn):
|
def callback_1(callback_origin, uid, tocliponly, p: QPixmap, fn):
|
||||||
if p.isNull():
|
if p.isNull():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user