Skip to content

Commit

Permalink
fix issues with context menu and file dialogs (fix #1240, fix #1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Jul 31, 2023
1 parent 0011dda commit 318b313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wingetui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import win32api
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)
sys.exit(1)

from upgradeAssistant import doTheMagic
# Remove old WingetUI installation
if not "AppData" in sys.executable:
Expand Down
4 changes: 2 additions & 2 deletions wingetui/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def nativeWindowsShare(text: str, url: str, window: QWidget = None) -> int:
coordinates = ""
if window:
coordinates = f"{window.mapToGlobal(QPoint(0, 0)).x()},{window.mapToGlobal(QPoint(0, 0)).y()},{window.width()},{window.height()}"
clr.AddReference(SHARE_DLL_PATH)
import WingetUIShareComponent
WingetUIShareComponent.Form1(["", text, url, coordinates])

#coordinates = ""
Expand Down Expand Up @@ -577,8 +579,6 @@ def ConvertMarkdownToHtml(text: str) -> str:
# Begin Import C#.NET DLLs
#

clr.AddReference(SHARE_DLL_PATH)
import WingetUIShareComponent

#
# End Import C#.NET DLLs
Expand Down

0 comments on commit 318b313

Please sign in to comment.