Skip to content

Commit 318b313

Browse files
committed
fix issues with context menu and file dialogs (fix #1240, fix #1235)
1 parent 0011dda commit 318b313

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

wingetui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import win32api
1717
win32api.MessageBox(None, "WingetUI can't be installed in a path containing special characters. Please reinstall WingetUI on a valid location\n\n\nCurrent path: "+os.path.dirname(sys.executable)+"\nInvalid character detected: "+specialCharacter+"\n\n\nPlease run the WingetUI installer and select a different install location. A possible valid path could be C:\Program Files\WingetUI", "WingetUI Crash handler", 0x00000010)
1818
sys.exit(1)
19-
19+
2020
from upgradeAssistant import doTheMagic
2121
# Remove old WingetUI installation
2222
if not "AppData" in sys.executable:

wingetui/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def nativeWindowsShare(text: str, url: str, window: QWidget = None) -> int:
144144
coordinates = ""
145145
if window:
146146
coordinates = f"{window.mapToGlobal(QPoint(0, 0)).x()},{window.mapToGlobal(QPoint(0, 0)).y()},{window.width()},{window.height()}"
147+
clr.AddReference(SHARE_DLL_PATH)
148+
import WingetUIShareComponent
147149
WingetUIShareComponent.Form1(["", text, url, coordinates])
148150

149151
#coordinates = ""
@@ -577,8 +579,6 @@ def ConvertMarkdownToHtml(text: str) -> str:
577579
# Begin Import C#.NET DLLs
578580
#
579581

580-
clr.AddReference(SHARE_DLL_PATH)
581-
import WingetUIShareComponent
582582

583583
#
584584
# End Import C#.NET DLLs

0 commit comments

Comments
 (0)