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