mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-09 15:19:56 +03:00
Separate protocol action and editor titles
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -1789,23 +1789,26 @@ class ServerTableView(
|
||||
"""Show all, manual, or one subscription group's profiles."""
|
||||
self.proxyModel.setSubscriptionFilter(unique)
|
||||
|
||||
def addServerViaGui(
|
||||
self,
|
||||
protocol,
|
||||
windowTitle: str = APPLICATION_NAME,
|
||||
**kwargs,
|
||||
):
|
||||
def addServerViaGui(self, protocol, **kwargs):
|
||||
"""Add server via GUI."""
|
||||
factory = blankProfile(protocol)
|
||||
|
||||
guiEditor = self.getGuiEditorByFactory(factory, **kwargs)
|
||||
windowTitle, translatable = (
|
||||
kwargs.pop('windowTitle', APPLICATION_NAME),
|
||||
kwargs.pop('translatable', True),
|
||||
)
|
||||
|
||||
if translatable is True:
|
||||
windowTitle = _(windowTitle)
|
||||
|
||||
guiEditor = self.getGuiEditorByFactory(
|
||||
factory, windowTitle=windowTitle, translatable=translatable, **kwargs
|
||||
)
|
||||
|
||||
if guiEditor is None:
|
||||
# Unrecognized. Do nothing
|
||||
return
|
||||
|
||||
guiEditor.setWindowTitle(windowTitle)
|
||||
|
||||
try:
|
||||
guiEditor.factoryToInput(factory)
|
||||
except Exception as ex:
|
||||
|
||||
Reference in New Issue
Block a user