mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
30eacd6602
commit
28fc2154f7
@ -117,6 +117,11 @@ class MAINUI:
|
||||
class klass(kls):
|
||||
@property
|
||||
def using(self):
|
||||
if 'using_X' in dir(self):
|
||||
try:
|
||||
return self.using_X
|
||||
except:
|
||||
return False
|
||||
return checkpostusing(_name)
|
||||
|
||||
return klass()
|
||||
|
@ -1217,6 +1217,7 @@ class dialog_setting_game_internal(QWidget):
|
||||
visname,
|
||||
getboxlayout(
|
||||
[
|
||||
getsimpleswitch(savehook_new_data[gameuid], name + "_use"),
|
||||
getIconButton(
|
||||
callback=functools.partial(__, setting, self, gameuid),
|
||||
icon="fa.gear",
|
||||
|
@ -154,6 +154,8 @@ def getdefaultsavehook(title=None):
|
||||
"currentvisimage": None,
|
||||
"currentmainimage": "",
|
||||
"noundictconfig": [],
|
||||
"noundict_use":True,
|
||||
"vndbnamemap_use" :True,
|
||||
# 元数据
|
||||
"namemap": {}, # 人名翻译映射,vndb独占,用于优化翻译
|
||||
#
|
||||
|
@ -5,6 +5,7 @@ from traceback import print_exc
|
||||
import gobject
|
||||
from gui.usefulwidget import getQMessageBox, threebuttons
|
||||
from myutils.wrapper import Singleton_close
|
||||
from myutils.utils import checkpostusing
|
||||
|
||||
|
||||
@Singleton_close
|
||||
@ -382,6 +383,22 @@ class Process:
|
||||
),
|
||||
)
|
||||
|
||||
@property
|
||||
def using_X(self):
|
||||
for _ in (0,):
|
||||
try:
|
||||
if not gobject.baseobject.textsource:
|
||||
break
|
||||
gameuid = gobject.baseobject.textsource.gameuid
|
||||
if savehook_new_data[gameuid]["transoptimi_followdefault"]:
|
||||
break
|
||||
return savehook_new_data[gameuid]["noundict_use"]
|
||||
|
||||
except:
|
||||
print_exc()
|
||||
break
|
||||
return checkpostusing("noundict")
|
||||
|
||||
def usewhich(self) -> dict:
|
||||
for _ in (0,):
|
||||
try:
|
||||
|
@ -2,6 +2,7 @@ from myutils.config import savehook_new_data, globalconfig
|
||||
import gobject
|
||||
from traceback import print_exc
|
||||
from gui.inputdialog import postconfigdialog_
|
||||
from myutils.utils import checkpostusing
|
||||
|
||||
|
||||
class Process:
|
||||
@ -28,6 +29,22 @@ class Process:
|
||||
),
|
||||
)
|
||||
|
||||
@property
|
||||
def using_X(self):
|
||||
for _ in (0,):
|
||||
try:
|
||||
if not gobject.baseobject.textsource:
|
||||
break
|
||||
gameuid = gobject.baseobject.textsource.gameuid
|
||||
if savehook_new_data[gameuid]["transoptimi_followdefault"]:
|
||||
break
|
||||
return savehook_new_data[gameuid]["vndbnamemap_use"]
|
||||
|
||||
except:
|
||||
print_exc()
|
||||
break
|
||||
return checkpostusing("vndbnamemap")
|
||||
|
||||
def usewhich(self) -> dict:
|
||||
for _ in (0,):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user