mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-12 23:19:29 +08:00
Disable annoying smart quotes
This commit is contained in:
parent
288da8c147
commit
7885718d42
@ -942,6 +942,11 @@ void Run(struct Application *app, int argc, char **argv) {
|
|||||||
CGRect contentViewBounds = GET_BOUNDS(contentView);
|
CGRect contentViewBounds = GET_BOUNDS(contentView);
|
||||||
msg(wkwebview, s("setFrame:"), contentViewBounds );
|
msg(wkwebview, s("setFrame:"), contentViewBounds );
|
||||||
|
|
||||||
|
// Disable damn smart quotes
|
||||||
|
// Credit: https://stackoverflow.com/a/31640511
|
||||||
|
id userDefaults = msg(c("NSUserDefaults"), s("standardUserDefaults"));
|
||||||
|
msg(userDefaults, s("setBool:forKey:"), NO, str("NSAutomaticQuoteSubstitutionEnabled"));
|
||||||
|
|
||||||
// Setup drag message handler
|
// Setup drag message handler
|
||||||
msg(manager, s("addScriptMessageHandler:name:"), app->delegate, str("windowDrag"));
|
msg(manager, s("addScriptMessageHandler:name:"), app->delegate, str("windowDrag"));
|
||||||
// Add mouse event hooks
|
// Add mouse event hooks
|
||||||
|
Loading…
Reference in New Issue
Block a user