Skip to content

Commit 5fce21e

Browse files
committed
Version 2.24
1 parent 8530b15 commit 5fce21e

File tree

17 files changed

+426
-146
lines changed

17 files changed

+426
-146
lines changed

ScreenToGif/App.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ private void Application_Startup(object sender, StartupEventArgs e)
4646
//Increases the duration of the tooltip display.
4747
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(int.MaxValue));
4848

49+
if (UserSettings.All.WorkaroundQuota)
50+
BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailure = BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailureOptions.Reset;
51+
4952
#region Set network connection properties
5053

5154
try

ScreenToGif/Controls/TextPath.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,25 @@ protected override void OnRender(DrawingContext drawingContext)
136136

137137
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
138138
{
139-
_textGeometry = new FormattedText(Text ?? "", Thread.CurrentThread.CurrentUICulture, FlowDirection.LeftToRight,
140-
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize, Brushes.Black).BuildGeometry(Origin);
139+
try
140+
{
141+
_textGeometry = new FormattedText(Text ?? "", Thread.CurrentThread.CurrentUICulture, FlowDirection.LeftToRight,
142+
new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize, Brushes.Black, VisualTreeHelper.GetDpi(this).PixelsPerDip).BuildGeometry(Origin);
143+
}
144+
catch (Exception ex)
145+
{
146+
LogWriter.Log(ex, "Impossible to build text geometry.");
147+
148+
try
149+
{
150+
_textGeometry = new FormattedText(Text ?? "", Thread.CurrentThread.CurrentUICulture, FlowDirection.LeftToRight,
151+
new Typeface(new FontFamily("Arial"), FontStyle, FontWeight, FontStretch), FontSize, Brushes.Black, VisualTreeHelper.GetDpi(this).PixelsPerDip).BuildGeometry(Origin);
152+
}
153+
catch (Exception ex2)
154+
{
155+
LogWriter.Log(ex2, "Impossible to build text geometry with default font.");
156+
}
157+
}
141158

142159
_pen = new Pen(Stroke, StrokeThickness)
143160
{

ScreenToGif/Model/ApplicationViewModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,9 @@ internal bool InstallUpdate(bool wasPromptedManually = false)
10421042
var isRelative = !string.IsNullOrWhiteSpace(Global.UpdateAvailable.InstallerPath) && !Path.IsPathRooted(Global.UpdateAvailable.InstallerPath);
10431043
var nonRoot = isRelative ? Path.GetFullPath(Global.UpdateAvailable.InstallerPath) : Global.UpdateAvailable.InstallerPath;
10441044

1045+
//msiexec /i PATH INSTALLDIR="" INSTALLAUTOMATICALLY=yes INSTALLPORTABLE=No ADDLOCAL=Binary
1046+
//msiexec /a PATH TARGETDIR="" INSTALLAUTOMATICALLY=yes INSTALLPORTABLE=yes ADDLOCAL=Binary
1047+
10451048
var startInfo = new ProcessStartInfo
10461049
{
10471050
FileName = "msiexec",
@@ -1050,7 +1053,7 @@ internal bool InstallUpdate(bool wasPromptedManually = false)
10501053
$" ADDLOCAL=Binary{(isInstaller ? ",Auxiliar" : "")}{(hasSharpDx ? ",SharpDX" : "")}{(hasGifski ? ",Gifski" : "")}" +
10511054
$" {(wasPromptedManually ? "RUNAFTER=yes" : "")}" +
10521055
(isInstaller ? $" INSTALLDESKTOPSHORTCUT={(hasDesktopShortcut ? "yes" : "no")} INSTALLSHORTCUT={(hasMenuShortcut ? "yes" : "no")}" : ""),
1053-
Verb = "runas"
1056+
Verb = UserSettings.All.ForceUpdateAsAdmin ? "runas" : ""
10541057
};
10551058

10561059
using (var process = new Process { StartInfo = startInfo })

ScreenToGif/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
// You can specify all the values or you can default the Build and Revision Numbers
5151
// by using the '*' as shown below:
5252
// [assembly: AssemblyVersion("1.0.*")]
53-
[assembly: AssemblyVersion("2.23.2.0")]
54-
[assembly: AssemblyFileVersion("2.23.2.0")]
53+
[assembly: AssemblyVersion("2.24.0.0")]
54+
[assembly: AssemblyFileVersion("2.24.0.0")]

ScreenToGif/Readme.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ This is the current project of ScreenToGif.
55
_VS 2019 and .Net 4.8 or newer required._
66

77

8-
## What's new? (Version 2.23.2)
8+
## What's new? (Version 2.24)
99

10-
• Updated the Japanese and French translations.
10+
[Installer] Added the option to install the shortcut to all users.
11+
[Installer] When installing, the UAC prompt will only appear if necessary (for example, when installing the shortcut to all users).
12+
• Added the option to force the update to run with elevated privileges.
13+
• Updated the default parameters for exporting with FFmpeg (click on the reset button to load the new ones).
1114

1215
### Fixed:
1316

14-
♦ The settings were getting erased because of an empty value.
15-
♦ When limiting the Undo stack, the app could crash when trying to undo.
17+
♦ When trying to insert an image with a different DPI than the project, it would import it with the incorrect size.
18+
♦ Added a warning when trying to import multiple images with different DPIs.
19+
♦ The app could crash when rendering a character which had a broken glyph (while using the caption feature).
20+
♦ The app was crashing when applying the 'Reduce Frame Count' while selecting the last frames.
21+
♦ It was not allowed to add a preset with a name already in use in a preset from another video type.
22+
♦ (Experimental) Added a workaround for the 'Not enough quota...' crash. It can be disabled on Options > Application.
1623

1724
### Known Bugs:
1825

ScreenToGif/Resources/Localization/StringResources.en.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,16 @@
206206
<s:String x:Key="S.Options.App.Tray.Interactions.Window">Window:</s:String>
207207
<s:String x:Key="S.Options.App.Tray.Interactions.Else">Or else, opens:</s:String>
208208
<s:String x:Key="S.Options.App.General">General</s:String>
209+
<s:String x:Key="S.Options.App.General.WorkaroundQuota">Workaround for the 'Not enough quota...' crash.</s:String>
210+
<s:String x:Key="S.Options.App.General.WorkaroundQuota.Info">(Experimental)</s:String>
209211
<s:String x:Key="S.Options.App.General.NotifyWhileClosingApp">Ask me before closing the app (via the 'Exit' command).</s:String>
210212
<s:String x:Key="S.Options.App.General.DisableHardwareAcceleration">Disable hardware acceleration.</s:String>
211213
<s:String x:Key="S.Options.App.General.DisableHardwareAcceleration.Info">(The user interface will be rendered via software mode)</s:String>
212214
<s:String x:Key="S.Options.App.General.CheckForTranslationUpdates">Check for translation updates.</s:String>
213215
<s:String x:Key="S.Options.App.General.CheckForTranslationUpdates.Info">(Updated translations will be downloaded and installed automatically)</s:String>
214216
<s:String x:Key="S.Options.App.General.CheckForUpdates">Check for updates on startup.</s:String>
215217
<s:String x:Key="S.Options.App.General.UpdateOnClose">Automatically install updates after closing the app.</s:String>
218+
<s:String x:Key="S.Options.App.General.ForceUpdateAsAdmin">Force the update to run with elevated privileges.</s:String>
216219
<s:String x:Key="S.Options.App.General.PromptToInstall">Prompt me before the installation starts.</s:String>
217220

218221
<!--Options • Recorder-->
@@ -551,6 +554,7 @@
551554
<s:String x:Key="S.FfmpegPreset.Title">FFmpeg Preset</s:String>
552555
<s:String x:Key="S.FfmpegPreset.Name">Name</s:String>
553556
<s:String x:Key="S.FfmpegPreset.Parameters">Parameters</s:String>
557+
<s:String x:Key="S.FfmpegPreset.Info.SecondPass">To encode with 2-pass, simply add '-pass 2' to the command.</s:String>
554558
<s:String x:Key="S.FfmpegPreset.Warning.Name">You must give a name to this preset.</s:String>
555559
<s:String x:Key="S.FfmpegPreset.Warning.Parameter">You must type some parameters for this preset.</s:String>
556560
<s:String x:Key="S.FfmpegPreset.Warning.SameName">There's already a preset with the same name.</s:String>
@@ -611,8 +615,10 @@
611615
<s:String x:Key="Encoder.Uploading">Uploading</s:String>
612616
<s:String x:Key="Encoder.Executing">Executing commmands</s:String>
613617
<s:String x:Key="Encoder.Processing">Processing {0}</s:String>
618+
<s:String x:Key="S.Encoder.Analyzing.Second">Preparing for second pass</s:String>
619+
<s:String x:Key="S.Encoder.Processing.Second">Processing {0} - 2nd pass</s:String>
614620
<s:String x:Key="Encoder.CreatingFile">Creating file</s:String>
615-
<s:String x:Key="Encoder.Analyzing">Analyzing Unchanged Pixels</s:String>
621+
<s:String x:Key="Encoder.Analyzing">Analyzing unchanged pixels</s:String>
616622
<s:String x:Key="Encoder.OpenFile">Open file</s:String>
617623
<s:String x:Key="Encoder.ExploreFolder">Explore folder</s:String>
618624
<s:String x:Key="Encoder.Remove">Remove from the list</s:String>
@@ -884,6 +890,7 @@
884890
<s:String x:Key="Editor.Warning.Ffmpeg">FFmpeg not present. Add it to the Path environment variables or click here to open Options > Extras to set the location.</s:String>
885891
<s:String x:Key="Editor.Warning.Gifski">Gifski not present. Add it to the Path environment variables or click here to open Options > Extras to set the location.</s:String>
886892
<s:String x:Key="Editor.Warning.LowSpace">There's not enough space left on the drive where this app stores its cache ({0}% left). Click here to open Options > Temporary Files to free some space.</s:String>
893+
<s:String x:Key="S.Editor.Warning.DifferentDpi">You tried to import multiple images with different DPIs, which is not supported. Some of them got imported, the others need to be imported separately.</s:String>
887894

888895
<!--Hints-->
889896
<s:String x:Key="S.Hint.NewRecording">New recording created</s:String>

ScreenToGif/Resources/Localization/StringResources.pt.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,16 @@
206206
<s:String x:Key="S.Options.App.Tray.Interactions.Window">Janela:</s:String>
207207
<s:String x:Key="S.Options.App.Tray.Interactions.Else">Senão, abra:</s:String>
208208
<s:String x:Key="S.Options.App.General">Geral</s:String>
209+
<s:String x:Key="S.Options.App.General.WorkaroundQuota">Tentar corrigir o erro de 'Sem quota suficiente...'.</s:String>
210+
<s:String x:Key="S.Options.App.General.WorkaroundQuota.Info">(Experimental)</s:String>
209211
<s:String x:Key="S.Options.App.General.NotifyWhileClosingApp">Me pergunte antes de fechar o aplicativo (via o comando 'Sair').</s:String>
210212
<s:String x:Key="S.Options.App.General.DisableHardwareAcceleration">Disabilite a aceleração por hardware.</s:String>
211213
<s:String x:Key="S.Options.App.General.DisableHardwareAcceleration.Info">(A interface será renderizada via software)</s:String>
212214
<s:String x:Key="S.Options.App.General.CheckForTranslationUpdates">Buscar atualizações das traduções.</s:String>
213215
<s:String x:Key="S.Options.App.General.CheckForTranslationUpdates.Info">(Traduções atualizadas serão baixadas e instaladas automaticamente)</s:String>
214216
<s:String x:Key="S.Options.App.General.CheckForUpdates">Buscar atualizações ao iniciar o aplicativo.</s:String>
215217
<s:String x:Key="S.Options.App.General.UpdateOnClose">Baixar e instalar atualizações automaticamente ao fechar o aplicativo.</s:String>
218+
<s:String x:Key="S.Options.App.General.ForceUpdateAsAdmin">Force a atualização para executar com privilégios de adiministrador.</s:String>
216219
<s:String x:Key="S.Options.App.General.PromptToInstall">Avisar-me antes do início da instalação.</s:String>
217220

218221
<!--Options • Recorder-->
@@ -551,6 +554,7 @@
551554
<s:String x:Key="S.FfmpegPreset.Title">Perfis do FFmpeg</s:String>
552555
<s:String x:Key="S.FfmpegPreset.Name">Nome</s:String>
553556
<s:String x:Key="S.FfmpegPreset.Parameters">Parâmetros</s:String>
557+
<s:String x:Key="S.FfmpegPreset.Info.SecondPass">Para codificar com 2 passes, adicione '-pass 2' no comando.</s:String>
554558
<s:String x:Key="S.FfmpegPreset.Warning.Name">Você deve escrever o nome do perfil.</s:String>
555559
<s:String x:Key="S.FfmpegPreset.Warning.Parameter">Você deve escrever algum parâmetro para esse perfil.</s:String>
556560
<s:String x:Key="S.FfmpegPreset.Warning.SameName">Já existe um perfil com o mesmo nome.</s:String>
@@ -611,8 +615,10 @@
611615
<s:String x:Key="Encoder.Uploading">Enviando</s:String>
612616
<s:String x:Key="Encoder.Executing">Executando comandos</s:String>
613617
<s:String x:Key="Encoder.Processing">Processando {0}</s:String>
618+
<s:String x:Key="S.Encoder.Analyzing.Second">Preparando para 2º passe</s:String>
619+
<s:String x:Key="S.Encoder.Processing.Second">Processando {0} - 2º passe</s:String>
614620
<s:String x:Key="Encoder.CreatingFile">Criando arquivo</s:String>
615-
<s:String x:Key="Encoder.Analyzing">Analisando Pixels Não Modificados</s:String>
621+
<s:String x:Key="Encoder.Analyzing">Analisando pixels não modificados</s:String>
616622
<s:String x:Key="Encoder.OpenFile">Abrir arquivo</s:String>
617623
<s:String x:Key="Encoder.ExploreFolder">Explorar pasta</s:String>
618624
<s:String x:Key="Encoder.Remove">Remover da lista</s:String>
@@ -884,6 +890,7 @@
884890
<s:String x:Key="Editor.Warning.Ffmpeg">FFmpeg não está presente no seu sistema ou não foi encontrado. Adicione-o para as variáveis do sistema (Path) ou clique aqui para abrir Opções > Extras para configurar a localização.</s:String>
885891
<s:String x:Key="Editor.Warning.Gifski">Gifski não está presente no seu sistema ou não foi encontrado. Adicione-o para as variáveis do sistema (Path) ou clique aqui para abrir Opções > Extras para configurar a localização.</s:String>
886892
<s:String x:Key="Editor.Warning.LowSpace">Não há espaço suficiente na unidade de armazenamento em que este aplicativo guarda seu cache ({0}% restantes). Clique aqui para abrir Opções > Arquivos Temporarios para liberar algum espaço.</s:String>
893+
<s:String x:Key="S.Editor.Warning.DifferentDpi">Você tentou importar múltiplas imagens com DPIs diferentes, o que não é suportado. Algumas delas foram importadas, outras precisam ser importadas separadamente.</s:String>
887894

888895
<!--Hints-->
889896
<s:String x:Key="S.Hint.NewRecording">Nova gravação criada</s:String>

ScreenToGif/Resources/Settings.xaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
<s:Boolean x:Key="DisableHardwareAcceleration">False</s:Boolean>
5757
<s:Boolean x:Key="CheckForTranslationUpdates">True</s:Boolean>
5858
<s:Boolean x:Key="CheckForUpdates">True</s:Boolean>
59+
<s:Boolean x:Key="ForceUpdateAsAdmin">False</s:Boolean>
5960
<s:Boolean x:Key="InstallUpdates">True</s:Boolean>
6061
<s:Boolean x:Key="PromptToInstall">True</s:Boolean>
6162
<s:Boolean x:Key="ShowNotificationIcon">True</s:Boolean>
@@ -66,11 +67,13 @@
6667
<s:Int32 x:Key="DoubleLeftOpenWindow">2</s:Int32>
6768
<s:Int32 x:Key="MiddleClickAction">3</s:Int32>
6869
<s:Int32 x:Key="MiddleOpenWindow">0</s:Int32>
69-
70+
<s:Boolean x:Key="WorkaroundQuota">True</s:Boolean>
71+
7072
<!--Options • Recorder-->
7173
<s:Boolean x:Key="NewRecorder">False</s:Boolean>
7274
<s:Boolean x:Key="RecorderThinMode">False</s:Boolean>
7375
<s:Boolean x:Key="Magnifier">True</s:Boolean>
76+
<s:Boolean x:Key="FallThroughOtherScreens">False</s:Boolean>
7477
<s:Boolean x:Key="UseDesktopDuplication">False</s:Boolean>
7578
<s:Boolean x:Key="UseMemoryCache">False</s:Boolean>
7679
<i:CompressionLevel x:Key="CaptureCompression">Optimal</i:CompressionLevel>

ScreenToGif/Util/Parameters.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public class Parameters
6666
public uint VideoQuality { get; set; }
6767

6868
public string Command { get; set; }
69+
70+
public string SecondPassCommand { get; set; }
6971

7072
public string ExtraParameters { get; set; }
7173

ScreenToGif/Util/UserSettings.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,12 @@ public bool CheckForUpdates
514514
set => SetValue(value);
515515
}
516516

517+
public bool ForceUpdateAsAdmin
518+
{
519+
get => (bool)GetValue();
520+
set => SetValue(value);
521+
}
522+
517523
public bool InstallUpdates
518524
{
519525
get => (bool)GetValue();
@@ -589,6 +595,14 @@ public int MiddleOpenWindow
589595
set => SetValue(value);
590596
}
591597

598+
//Workarounds.
599+
600+
public bool WorkaroundQuota
601+
{
602+
get => (bool)GetValue();
603+
set => SetValue(value);
604+
}
605+
592606
#endregion
593607

594608
#region Options • Recorder
@@ -611,6 +625,12 @@ public bool Magnifier
611625
set => SetValue(value);
612626
}
613627

628+
public bool FallThroughOtherScreens
629+
{
630+
get => (bool)GetValue();
631+
set => SetValue(value);
632+
}
633+
614634
public bool UseDesktopDuplication
615635
{
616636
get => (bool)GetValue();

0 commit comments

Comments
 (0)