mirror of https://github.com/ShareX/ShareX.git
Compare commits
4 Commits
490593b5d9
...
6b5cbcb29d
Author | SHA1 | Date |
---|---|---|
Danny | 6b5cbcb29d | |
Jaex | 59e7450b62 | |
Danny | 08abafe83a | |
Danny | d860104a08 |
|
@ -40,6 +40,7 @@ Name: "CreateDesktopIcon"; Description: "Create a desktop shortcut"; GroupDescri
|
|||
Name: "CreateContextMenuButton"; Description: "Show ""Upload with ShareX"" button in Windows Explorer context menu"; GroupDescription: "Additional shortcuts:"; Check: not IsUpdating
|
||||
Name: "CreateSendToIcon"; Description: "Create a send to shortcut"; GroupDescription: "Additional shortcuts:"; Check: not IsUpdating
|
||||
Name: "CreateStartupIcon"; Description: "Run ShareX when Windows starts"; GroupDescription: "Other tasks:"; Check: not IsUpdating
|
||||
Name: "EnableBrowserExtensionSupport"; Description: "Enable browser extension support"; GroupDescription: "Other tasks:"; Check: not IsUpdating
|
||||
Name: "DisablePrintScreenKeyForSnippingTool"; Description: "Disable Print Screen key for Snipping Tool"; GroupDescription: "Other tasks:"; Check: not IsUpdating
|
||||
|
||||
[Files]
|
||||
|
@ -101,6 +102,8 @@ Root: "HKCU"; Subkey: "Software\Classes\ShareX.sxcu"; Flags: dontcreatekey unins
|
|||
Root: "HKCU"; Subkey: "Software\Classes\.sxie"; Flags: dontcreatekey uninsdeletekey
|
||||
Root: "HKCU"; Subkey: "Software\Classes\ShareX.sxie"; Flags: dontcreatekey uninsdeletekey
|
||||
Root: "HKCU"; Subkey: "Software\Classes\SystemFileAssociations\image\shell\ShareXImageEditor"; Flags: dontcreatekey uninsdeletekey
|
||||
Root: "HKCU"; Subkey: "SOFTWARE\Google\Chrome\NativeMessagingHosts\com.getsharex.sharex"; ValueType: string; ValueData: "{app}\host-manifest-chrome.json"; Flags: uninsdeletekey; Tasks: EnableBrowserExtensionSupport
|
||||
Root: "HKCU"; Subkey: "SOFTWARE\Mozilla\NativeMessagingHosts\ShareX"; ValueType: string; ValueData: "{app}\host-manifest-firefox.json"; Flags: uninsdeletekey; Tasks: EnableBrowserExtensionSupport
|
||||
Root: "HKCU"; Subkey: "Control Panel\Keyboard"; ValueType: dword; ValueName: "PrintScreenKeyForSnippingEnabled"; ValueData: "0"; Flags: uninsdeletevalue; Tasks: DisablePrintScreenKeyForSnippingTool
|
||||
|
||||
#include "CodeDependencies.iss"
|
||||
|
|
|
@ -1312,10 +1312,11 @@ namespace ShareX
|
|||
{
|
||||
if (taskSettings == null) taskSettings = TaskSettings.GetDefaultTaskSettings();
|
||||
|
||||
await OCRImage(bmp, taskSettings.CaptureSettingsReference.OCROptions, filePath);
|
||||
bool notificationsEnabled = taskSettings.GeneralSettings.ShowToastNotificationAfterTaskCompleted;
|
||||
await OCRImage(bmp, taskSettings.CaptureSettingsReference.OCROptions, filePath, notificationsEnabled);
|
||||
}
|
||||
|
||||
private static async Task OCRImage(Bitmap bmp, OCROptions options, string filePath = null)
|
||||
private static async Task OCRImage(Bitmap bmp, OCROptions options, string filePath = null, bool notificationsEnabled = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1325,7 +1326,7 @@ namespace ShareX
|
|||
{
|
||||
if (options.Silent)
|
||||
{
|
||||
await AsyncOCRImage(bmp, options, filePath);
|
||||
await AsyncOCRImage(bmp, options, filePath, notificationsEnabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1348,9 +1349,9 @@ namespace ShareX
|
|||
}
|
||||
}
|
||||
|
||||
private static async Task AsyncOCRImage(Bitmap bmp, OCROptions options, string filePath = null)
|
||||
private static async Task AsyncOCRImage(Bitmap bmp, OCROptions options, string filePath = null, bool notificationsEnabled = true)
|
||||
{
|
||||
ShowNotificationTip(Resources.OCRForm_AutoProcessing);
|
||||
if (notificationsEnabled) ShowNotificationTip(Resources.OCRForm_AutoProcessing);
|
||||
|
||||
string result = null;
|
||||
|
||||
|
@ -1372,11 +1373,11 @@ namespace ShareX
|
|||
File.WriteAllText(textFilePath, result, Encoding.UTF8);
|
||||
}
|
||||
|
||||
ShowNotificationTip(Resources.OCRForm_AutoComplete);
|
||||
if (notificationsEnabled) ShowNotificationTip(Resources.OCRForm_AutoComplete);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotificationTip(Resources.OCRForm_AutoCompleteFail);
|
||||
if (notificationsEnabled) ShowNotificationTip(Resources.OCRForm_AutoCompleteFail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2182,4 +2183,4 @@ namespace ShareX
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue