Skip to content

Commit

Permalink
Version 2.25
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeManarin committed Jun 7, 2020
1 parent 989094e commit cdfbc88
Show file tree
Hide file tree
Showing 45 changed files with 1,676 additions and 172 deletions.
1 change: 1 addition & 0 deletions ScreenToGif/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<ResourceDictionary Source="/Resources/Localization/StringResources.es.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.fr.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.ja.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.hu.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.ko.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.it.xaml"/>
<ResourceDictionary Source="/Resources/Localization/StringResources.nl.xaml"/>
Expand Down
15 changes: 13 additions & 2 deletions ScreenToGif/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,19 @@ private void Application_Startup(object sender, StartupEventArgs e)
//Increases the duration of the tooltip display.
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(int.MaxValue));

if (UserSettings.All.WorkaroundQuota)
BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailure = BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailureOptions.Reset;
#region Set the workaround

try
{
if (UserSettings.All.WorkaroundQuota)
BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailure = BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailureOptions.Reset;
}
catch (Exception ex)
{
LogWriter.Log(ex, "Impossible to set the workaround for the quota crash");
}

#endregion

#region Set network connection properties

Expand Down
2 changes: 1 addition & 1 deletion ScreenToGif/Cloud/Imgur/Imgur.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async Task<UploadedFile> UploadFileAsync(string path, CancellationToken c
if ((IsAnonymous && UserSettings.All.ImgurAnonymousUseDirectLinks) || (!IsAnonymous && UserSettings.All.ImgurUseDirectLinks))
{
if ((IsAnonymous && UserSettings.All.ImgurAnonymousUseGifvLink) || (!IsAnonymous && UserSettings.All.ImgurUseGifvLink) && !string.IsNullOrEmpty(responseAux.Data.Gifv))
url = responseAux.Data.Gifv;
url = responseAux.Data.Gifv ?? responseAux.Data.Link;
else
url = responseAux.Data.Link;
}
Expand Down
4 changes: 4 additions & 0 deletions ScreenToGif/Controls/ElementAdorner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,12 @@ void RaiseRemovedEvent()
private void BuildAdornerBorder()
{
var resetMenu = new ImageMenuItem { Header = "Reset rotation", Image = TryFindResource("Vector.Repeat") as Canvas };
resetMenu.SetResourceReference(HeaderedItemsControl.HeaderProperty, "S.Shapes.Shapes.ResetRotatio");

//var duplicateMenu = new ImageMenuItem { Header = "Duplicate", Image = TryFindResource("Vector.Copy") as Canvas };

var removeMenu = new ImageMenuItem { Header = "Remove", Image = TryFindResource("Vector.Cancel") as Canvas };
removeMenu.SetResourceReference(HeaderedItemsControl.HeaderProperty, "S.Shapes.Shapes.Remove");

resetMenu.Click += (sender, args) => RaiseRotationResetRequestedEvent();
//duplicateMenu.Click += (sender, args) => RaiseDuplicatedEvent();
Expand Down
10 changes: 0 additions & 10 deletions ScreenToGif/Controls/SplitButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ public string Text
set => SetCurrentValue(TextProperty, value);
}

/// <summary>
/// The TextWrapping property controls whether or not text wraps
/// when it reaches the flow edge of its containing block box.
/// </summary>
public TextWrapping TextWrapping
{
get => (TextWrapping)GetValue(TextWrappingProperty);
set => SetValue(TextWrappingProperty, value);
}

#endregion

static SplitButton()
Expand Down
9 changes: 7 additions & 2 deletions ScreenToGif/ImageUtil/Psd/LayerInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ public byte[] Content
using (var stream = new MemoryStream())
{
var layers = LayerList.SelectMany(s => s.Content).ToArray();
var channels = ImageChannelDataList.SelectMany(s => s.Content).ToArray();
//var channels = ImageChannelDataList.SelectMany(s => s.Content).ToArray();

stream.WriteInt16(BitHelper.ConvertEndian((short)(LayerList.Count))); //Number of channels of this layer, 2 bytes. Negative if absolute alpha.

stream.WriteBytes(layers); //Layer records, XX bytes.
stream.WriteBytes(channels); //List of channel data, XX bytes.
//stream.WriteBytes(channels); //List of channel data, XX bytes.

//List of channel data, XX bytes. Use this to avoid airthmetic overflows.
foreach (var channel in ImageChannelDataList)
stream.WriteBytes(channel.Content);

stream.WritePadding(4); //Pad to multiple of 4 bytes.

return stream.ToArray();
Expand Down
9 changes: 8 additions & 1 deletion ScreenToGif/Model/DefaultTaskModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public enum TaskTypeEnum
}

private TaskTypeEnum _taskType = TaskTypeEnum.NotDeclared;
private bool _isEnabled = true;
private string _image = null;

#endregion
Expand Down Expand Up @@ -58,6 +59,12 @@ public string Kind
}
}

public bool IsEnabled
{
get => _isEnabled;
set => SetProperty(ref _isEnabled, value);
}

public string Details => ToString();

[IgnoreDataMember] //This attribute is getting ignored.
Expand All @@ -71,7 +78,7 @@ public string Image

public DefaultTaskModel ShallowCopy()
{
return (DefaultTaskModel)MemberwiseClone();
return (DefaultTaskModel) MemberwiseClone();
}
}
}
15 changes: 12 additions & 3 deletions ScreenToGif/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ _VS 2019 and .Net 4.8 or newer required._

## What's new? (Version 2.24.2)

• Updated the Spanish localization.
• Added the Swahili localization.
• You can disable tasks without having to remove them.
• Added the option to upload APNGs too.
• Added a new parameter to the post encoding commands (URL).
• Updated the Japanese, Chinese (Simplified), Dutch and Russian localizations.
• The options window will adjust its width to its contents when opening.

### Fixed:

♦ Replaced the download link of FFmpeg to download v4.2.2. If you are still unable to export using FFmpeg, download it again.
♦ The screen capture (BitBlt + cursor) over a remote desktop connection was not working properly (thanks to Luis for the help).
♦ The editor window chrome (title bar) was not getting extended when needed.
♦ The app could crash before warning of the missing .Net 4.8 when having .Net 4.6.2 or older versions.
♦ If the project was too big (too many frames or frames too big), the PSD exporter could fail.
♦ Several texts where not translatable (thanks to László for the help).
♦ Copy and pasting a frame, then doing it again multiple times, could exceed the filename limit (thanks to Riku for the help).
♦ The 'duplicated filename' warning was not getting hidden when unticking the option to save the file to a selected folder.

### Known Bugs:

Expand Down
6 changes: 6 additions & 0 deletions ScreenToGif/Resources/Flags.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,10 @@
<Path StrokeThickness="0.1" Stroke="#ff000000" StrokeMiterLimit="1.0" Fill="#ffff0000" Data="F1 M 20.220,11.830 C 20.220,11.830 20.220,11.831 20.220,11.831 C 20.220,11.831 20.221,11.831 20.221,11.831 C 20.221,11.831 20.221,11.830 20.221,11.830 C 20.221,11.830 20.220,11.830 20.220,11.830 Z M 19.787,8.632 C 19.787,8.632 19.787,8.633 19.787,8.633 C 19.787,8.633 19.788,8.633 19.788,8.633 C 19.788,8.633 19.788,8.632 19.788,8.632 C 19.788,8.632 19.787,8.632 19.787,8.632 Z M 19.909,8.618 C 19.871,8.621 19.832,8.627 19.794,8.632 C 19.753,8.720 19.654,8.807 19.521,8.861 C 19.513,8.864 19.504,8.867 19.495,8.870 C 19.352,8.922 19.210,8.923 19.117,8.881 C 19.007,8.953 18.907,9.038 18.818,9.134 C 18.818,9.134 18.818,9.135 18.818,9.135 C 18.842,9.228 18.821,9.358 18.755,9.484 C 18.751,9.492 18.746,9.499 18.742,9.507 C 18.665,9.640 18.556,9.732 18.457,9.760 C 18.456,9.760 18.456,9.760 18.456,9.760 C 18.417,9.885 18.395,10.017 18.388,10.153 C 18.467,10.209 18.534,10.322 18.564,10.461 C 18.566,10.470 18.568,10.478 18.570,10.487 C 18.596,10.638 18.572,10.778 18.514,10.863 C 18.566,10.985 18.632,11.099 18.710,11.203 C 18.710,11.203 18.711,11.203 18.711,11.203 C 18.807,11.197 18.930,11.239 19.041,11.325 C 19.048,11.331 19.054,11.337 19.061,11.343 C 19.178,11.441 19.250,11.564 19.260,11.666 C 19.378,11.727 19.505,11.774 19.638,11.805 C 19.707,11.736 19.831,11.689 19.973,11.683 C 19.982,11.683 19.991,11.683 20.000,11.683 C 20.154,11.683 20.289,11.732 20.362,11.805 C 20.495,11.774 20.621,11.727 20.740,11.666 C 20.749,11.570 20.813,11.454 20.918,11.359 C 20.925,11.353 20.932,11.348 20.939,11.342 C 21.055,11.245 21.187,11.196 21.289,11.202 C 21.289,11.202 21.290,11.202 21.290,11.202 C 21.367,11.100 21.432,10.988 21.483,10.869 C 21.430,10.789 21.406,10.661 21.425,10.522 C 21.426,10.513 21.428,10.505 21.429,10.496 C 21.456,10.344 21.528,10.219 21.612,10.160 C 21.606,10.023 21.583,9.891 21.545,9.766 C 21.452,9.740 21.350,9.657 21.275,9.537 C 21.270,9.530 21.266,9.521 21.262,9.513 C 21.185,9.380 21.160,9.239 21.186,9.139 C 21.094,9.039 20.989,8.950 20.874,8.875 C 20.786,8.916 20.653,8.918 20.518,8.874 C 20.509,8.872 20.501,8.868 20.493,8.865 C 20.349,8.813 20.239,8.723 20.194,8.630 C 20.131,8.622 20.066,8.618 20.000,8.618 C 19.990,8.618 19.979,8.618 19.969,8.618 C 19.963,8.618 19.958,8.618 19.953,8.618 C 19.949,8.618 19.945,8.618 19.942,8.618 C 19.939,8.618 19.936,8.618 19.932,8.618 C 19.930,8.618 19.927,8.618 19.924,8.618 C 19.924,8.618 19.923,8.618 19.923,8.618 C 19.923,8.618 19.922,8.618 19.921,8.618 C 19.921,8.618 19.920,8.618 19.920,8.618 C 19.920,8.618 19.920,8.618 19.919,8.618 C 19.919,8.618 19.918,8.618 19.918,8.618 C 19.917,8.618 19.917,8.618 19.917,8.618 C 19.917,8.618 19.916,8.618 19.916,8.618 C 19.915,8.618 19.915,8.618 19.914,8.618 C 19.914,8.618 19.913,8.618 19.913,8.618 C 19.912,8.618 19.911,8.618 19.909,8.618 Z"/>
<Path StrokeThickness="0.1" Stroke="#ff000000" StrokeMiterLimit="1.0" Fill="#fffaef13" Data="F1 M 21.378,10.224 C 21.378,10.985 20.761,11.602 20.000,11.602 C 19.239,11.602 18.622,10.985 18.622,10.224 C 18.622,9.464 19.239,8.846 20.000,8.846 C 20.761,8.846 21.378,9.464 21.378,10.224 Z"/>
</Canvas>

<Canvas x:Shared="False" x:Key="Flag.Hungary" HorizontalAlignment="Center" UseLayoutRounding="False" VerticalAlignment="Center" Width="40" Height="26.6">
<Path Fill="#ffed1b2d" Data="F1 M 40.000,8.889 L 0.000,8.889 L 0.000,0.000 L 40.000,0.000 L 40.000,8.889 Z"/>
<Path Fill="#ff23923b" Data="F1 M 40.000,26.667 L 0.000,26.667 L 0.000,17.778 L 40.000,17.778 L 40.000,26.667 Z"/>
<Path Fill="#ffffffff" Data="F1 M 40.000,17.778 L 0.000,17.778 L 0.000,8.889 L 40.000,8.889 L 40.000,17.778 Z"/>
</Canvas>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion ScreenToGif/Resources/Localization/StringResources.ar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link">الارتباط</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link.Info">نسخ الارتباط الذي تم انشاؤه بواسطة خدمه التحميل في الحافظة.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands">تنفيذ اوامر نشر الترميز.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">اكتب الاوامر التي سيتم تنفيذها بعد الترميز. &#x0d; لتنفيذ اوامر متعددة ، اكتب كل واحد على سطر مفصول. &#x0d; وحدات الماكرو: &#x0d; {p} = اخراج مسار الملف. &#x0d; {f} = اخراج مسار المجلد.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">اكتب الاوامر التي سيتم تنفيذها بعد الترميز. &#x0d; لتنفيذ اوامر متعددة ، اكتب كل واحد على سطر مفصول. &#x0d; وحدات الماكرو: &#x0d; {p} = اخراج مسار الملف. &#x0d; {f} = اخراج مسار المجلد. &#x0d; {u} = URL of the uploaded file.</s:String>

<!--Save As • File-->
<s:String x:Key="S.SaveAs.File">ملف</s:String>
Expand Down
2 changes: 1 addition & 1 deletion ScreenToGif/Resources/Localization/StringResources.cs.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link">Odkaz</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link.Info">Zkopírovat odkaz vygenerovaný službou pro přenos do schránky.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands">Po kódování provést zapsané příkazy.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Zadejte příkazy, které mají být provedeny po kódování.&#x0d;Po spuštění více příkazů, zadejte každý na samostatný řádek.&#x0d;Makra:&#x0d;{p} = Cesta výstupního souboru.&#x0d;{f} = Cesta výstupní složky.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Zadejte příkazy, které mají být provedeny po kódování.&#x0d;Po spuštění více příkazů, zadejte každý na samostatný řádek.&#x0d;Makra:&#x0d;{p} = Cesta výstupního souboru.&#x0d;{f} = Cesta výstupní složky.&#x0d;{u} = URL of the uploaded file.</s:String>

<!--Save As • File-->
<s:String x:Key="S.SaveAs.File">Soubor</s:String>
Expand Down
2 changes: 1 addition & 1 deletion ScreenToGif/Resources/Localization/StringResources.da.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link">Link</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link.Info">Kopierer upload link til udklipsholder.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands">Kør efterfølgende kommando.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Skriv kommando der udføres efter kodningen&#10;Flere kommandoer skrives på seperate linier&#10;Macroer:&#10;{p} = Resultatfilens placering.&#10;{f} = Resultatmappens placering.</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Skriv kommando der udføres efter kodningen&#10;Flere kommandoer skrives på seperate linier&#10;Macroer:&#10;{p} = Resultatfilens placering.&#10;{f} = Resultatmappens placering.&#x0d;{u} = URL of the uploaded file.</s:String>

<!--Save As • File-->
<s:String x:Key="S.SaveAs.File">Fil</s:String>
Expand Down
2 changes: 1 addition & 1 deletion ScreenToGif/Resources/Localization/StringResources.de.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link">Link</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.CopyToClipboard.Link.Info">Kopiert den durch Upload-Service erzeugten Link in Zwischenablage</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands">Weitere Kodierungs-Befehle ausführen</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Befehle eingeben, die nach dem Kodieren ausgeführt werden sollen.&#x0a;Falls mehrere Befehle ausgeführt werden sollen, bitte einen Befehl pro Zeile eingeben.&#x0a;Makros:&#x0a;{p} = Dateiausgabepfad&#x0a;{f} = Verzeichnisausgabepfad</s:String>
<s:String x:Key="S.SaveAs.SaveOptions.ExecuteCommands.Info">Befehle eingeben, die nach dem Kodieren ausgeführt werden sollen.&#x0a;Falls mehrere Befehle ausgeführt werden sollen, bitte einen Befehl pro Zeile eingeben.&#x0a;Makros:&#x0a;{p} = Dateiausgabepfad&#x0a;{f} = Verzeichnisausgabepfad&#x0d;{u} = URL of the uploaded file</s:String>

<!--Save As • File-->
<s:String x:Key="S.SaveAs.File">Speicherort und Dateiname</s:String>
Expand Down
Loading

0 comments on commit cdfbc88

Please sign in to comment.