mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-29 23:35:23 +08:00
Adding openURL in singleinstance
This commit is contained in:
parent
d67f0696cd
commit
21517c5025
@ -92,7 +92,11 @@ class SingleInstance:
|
||||
|
||||
# Command: Load a model or project file
|
||||
elif command == "open":
|
||||
self._application.callLater(lambda f = payload["filePath"]: self._application._openFile(f))
|
||||
if payload["filePath"].file():
|
||||
self._application.callLater(lambda f = payload["filePath"]: self._application._openFile(f))
|
||||
if payload["filePath"].url():
|
||||
self._application.callLater(lambda f= payload["filepath"]: self._application._openUrl(f))
|
||||
|
||||
|
||||
# Command: Activate the window and bring it to the top.
|
||||
elif command == "focus":
|
||||
|
@ -156,7 +156,7 @@ WriteRegStr HKCR "slicer" "" "URL:slicer"
|
||||
WriteRegStr HKCR "slicer" "URL Protocol" ""
|
||||
WriteRegStr HKCR "slicer\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE},1"
|
||||
WriteRegStr HKCR "slicer\shell" "" "open"
|
||||
WriteRegStr HKCR "slicer\shell\open\command" "" '"$INSTDIR\${MAIN_APP_EXE}" "%1"'
|
||||
WriteRegStr HKCR "slicer\shell\open\command" "" '"$INSTDIR\${MAIN_APP_EXE}" --single-instance "%1"'
|
||||
|
||||
SectionEnd
|
||||
######################################################################
|
||||
|
@ -165,7 +165,7 @@
|
||||
<RegistryValue Type="string" Value="URL:Cura Protocol"/>
|
||||
<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=""[APPLICATIONFOLDER]\{{ main_app }}" "%1""/>
|
||||
<RegistryValue Type="string" Key="shell\open\command" Value=""[APPLICATIONFOLDER]\{{ main_app }}" --single-instance "%1""/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user