mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-06 13:58:01 +03:00
Keep Xray routing dialog in foreground
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -225,6 +225,16 @@ class XrayPlugin(FuriousPlugin):
|
||||
routingEditor = UserRoutingWindow(parent=parent, **kwargs)
|
||||
assetViewer = XrayAssetViewerWindow(parent=parent)
|
||||
|
||||
def showRoutingDialog():
|
||||
"""Restore and foreground the persistent routing editor window."""
|
||||
if routingEditor.isMinimized():
|
||||
routingEditor.showNormal()
|
||||
else:
|
||||
routingEditor.show()
|
||||
|
||||
routingEditor.raise_()
|
||||
routingEditor.activateWindow()
|
||||
|
||||
useXrayTUNAction = AppQAction(
|
||||
_('Use Xray-core TUN'),
|
||||
checkable=True,
|
||||
@@ -244,7 +254,7 @@ class XrayPlugin(FuriousPlugin):
|
||||
AppQAction(
|
||||
_('Edit Routing...'),
|
||||
icon=bootstrapIcon('signpost.svg'),
|
||||
callback=routingEditor.show,
|
||||
callback=showRoutingDialog,
|
||||
),
|
||||
AppQSeperator(),
|
||||
useXrayTUNAction,
|
||||
|
||||
Reference in New Issue
Block a user