Adding command for opening url

CURA-11596
This commit is contained in:
saumya.jain 2024-02-06 12:17:38 +01:00
parent e554eb264e
commit 9c57627a88
2 changed files with 2 additions and 3 deletions

View file

@ -74,13 +74,10 @@ class SingleInstance:
def _onClientConnected(self) -> None:
Logger.log("i", "New connection received on our single-instance server")
connection = None #type: Optional[QLocalSocket]
Logger.log("i","getting connection")
if self._single_instance_server:
connection = self._single_instance_server.nextPendingConnection()
Logger.log("i", f"here: {connection}")
if connection is not None:
Logger.log("i","here2")
connection.readyRead.connect(lambda c = connection: self.__readCommands(c))
def __readCommands(self, connection: QLocalSocket) -> None:

View file

@ -166,6 +166,8 @@
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
<RegistryValue Type="string" Key="DefaultIcon" Value="[APPLICATIONFOLDER]\{{ main_app }},1"/>
<RegistryValue Type="string" Key="shell\open\command" Value="&quot;[APPLICATIONFOLDER]\{{ main_app }}&quot; --single-instance &quot;%1&quot;"/>
<Verb Id="open_url" Command="Open" Argument='"%1"' />
<MIME Advertise="yes" ContentType="application/url" Default="yes" />
</RegistryKey>
</Component>