Commit Graph

17543 Commits

Author SHA1 Message Date
Martijn van Berkel (Flitskikker)
7c7c314869 Update Dutch translation 2023-07-22 01:02:39 +02:00
niksedk
ac03546766 Fix issue with new time code control -thx darnn :)
Related to #7109
2023-07-21 19:30:25 +02:00
Nikolaj Olsson
a9cf7df0de
Merge pull request #7137 from ivandrofly/feature/patch-5
Refactor SaveWithRetry to take action instead of parameters
2023-07-21 12:54:18 -04:00
Nikolaj Olsson
ecb37a99eb
Merge pull request #7133 from ivandrofly/feature/listview
Optimize WordLists ListView population
2023-07-21 12:53:02 -04:00
Nikolaj Olsson
501877b8db
Merge pull request #7135 from ivandrofly/feature/patch-3
Remove unnecessary usings across various files
2023-07-21 12:52:39 -04:00
Ivandro Jao
40afd1879d Refactor SaveWithRetry to take action instead of parameters
The two existing implementations of SaveWithRetry were similar except for the action taken. This commit eliminates code redundancy by making SaveWithRetry accept a delegate for the save action and handle the retries. This approach makes the code more readable and easier to maintain in the future. It also makes the number of retries and delay between them configurable, opening possibilities for future improvements.
2023-07-21 17:52:25 +01:00
Nikolaj Olsson
ff8d3d2a44
Merge pull request #7136 from ivandrofly/feature/patch-4
Refactor file path resolution in FindVersionNumber
2023-07-21 12:52:12 -04:00
Nikolaj Olsson
934364125c
Merge pull request #7134 from ivandrofly/feature/patch-2
Update method for retrieving installer path
2023-07-21 12:51:24 -04:00
Ivandro Jao
5072fad588 Refactor file path resolution in FindVersionNumber
Removed multiple identical if statements and adjusted it with a while loop to find the template file. The change avoids duplicate code and adds a retry limit to prevent infinite looping if the file is not found.
2023-07-21 17:32:26 +01:00
Ivandro Jao
b0ba5cc07b Remove unused namespaces from certain files
Eliminated extraneous 'using' directives from FixEmptyLines.cs, FixUnneededPeriods.cs, and SplitLongLinesHelper.cs. These namespaces are not utilized in the respective files and thus their removal helps to maintain cleaner, less cluttered code.
2023-07-21 17:25:14 +01:00
Ivandro Jao
633b8e4829 Remove unnecessary usings across various files
Multiple redundant using directives were removed from various files, contributing to the cleaner and more efficient codebase. These were no longer needed due to previous refactoring operations, where dependencies on these namespaces were eliminated.
2023-07-21 17:23:59 +01:00
Ivandro Jao
e7c7c300cf Update method for retrieving installer path
The method 'GetInstallerPath' in 'Configuration.cs' has been updated to check both 32-bit and 64-bit registry paths for the 'SubtitleEdit_is1' uninstall key. This was changed to enhance compatibility with different system architectures, ensuring that the correct path is found in both scenarios. Changes involve replacing separate read commands with an array of paths and a loop to sift through them.
2023-07-21 17:22:46 +01:00
Ivandro Jao
dfbf5eea80 Optimize WordLists ListView population
The ListView population code within WordLists.cs has been optimized. Previously, a new List of ListViewItems was created each time without a predefined size. This diff changes the initialization of 'list' to include a size parameter which equals the count of '_wordListNames'. This change ensures the list has a fixed size upon creation, reducing memory allocation overhead for large '_wordListNames' collections.
2023-07-21 17:21:46 +01:00
Nikolaj Olsson
96b8794b82
Merge pull request #7131 from bovirus/main
Update italian language
2023-07-21 11:22:38 -04:00
niksedk
8671f9a910 Fix "Batch convert" hide logic - thx Jamakmake :) 2023-07-21 17:19:43 +02:00
bovirus
5d7f9c698f
Update italian language 2023-07-21 16:12:18 +02:00
niksedk
b73c01db49 Update translation 2023-07-21 10:19:49 +02:00
niksedk
9f21de3b7b Fix for translation - thx Jamakmake :) 2023-07-21 10:16:30 +02:00
niksedk
734856523f Work on missing translation - thx Jamakmake :) 2023-07-21 10:12:08 +02:00
niksedk
160c2bf086 Update Danish translation 2023-07-21 08:59:32 +02:00
niksedk
c68901b17f Work on combobox 2023-07-21 07:32:38 +02:00
niksedk
5994dd3ccc Work on combo box 2023-07-21 06:40:43 +02:00
Nikolaj Olsson
327831e89c
Merge pull request #7128 from ivandrofly/feature/clean-up
Remove unused IsTagFollowIndex method
2023-07-21 00:24:10 -04:00
Ivandro Jao
9ecf83149c Remove unused IsTagFollowIndex method
Deleted the IsTagFollowIndex method from the EffectKaraoke form. This method was no longer being used in the project, making it redundant. This removal helps to clean up the code base and reduces the overall code complexity.
2023-07-21 00:56:09 +01:00
Nikolaj Olsson
d335939bf7
Merge pull request #7126 from ivandrofly/patch/july
Refactor font presence check in UiUtil
2023-07-20 15:35:41 -04:00
Ivandro Jao
165100f257 Refactor font presence check in UiUtil
The method `IsFontPresent` in `UiUtil` class was refactored. Previously it was catching the exception for each font style individually. Now, we iterate over each font style, try to create a new font with said style, and return false if any fail to be created. This change improves the readability of the code and also makes sure to dispose any created font resources to avoid potential memory leaks.
2023-07-20 15:27:08 +01:00
Nikolaj Olsson
3e7d1f5264
Merge pull request #7124 from ivandrofly/patch/remove-unnededspaces-improve
Several code improvements #2
2023-07-20 09:58:48 -04:00
Nikolaj Olsson
026d6894b1
Merge pull request #7122 from Flitskikker/feature/beautify-timecodes-improvements-20230718
Add "Beautify time codes" to batch converter & much more
2023-07-20 09:55:25 -04:00
niksedk
1d9662b772 Fix possible crash when loading video gfx - thx darnn :)
Related to https://github.com/SubtitleEdit/subtitleedit/issues/7109#issuecomment-1643856450
2023-07-20 15:39:35 +02:00
Ivandro Jao
d43d9a5ed3 Refactor BookmarkPersistence to improve readability and performance
The previous implementation of BookmarkPersistence.cs had redundant null checks and exception handling. The new code has been refactored to improve readability and catch exceptions more effectively. Null checks and the write or delete operation on the file are now within a single try-catch block, simplifying the flow and improving execution speed by reducing unnecessary null check and File.Exists call for file deletion.
2023-07-19 22:29:01 +01:00
Ivandro Jao
404df4476c Remove redundant if-statement in StringExtensions
Removed an unnecessary if-statement in the StringExtensions.cs file that was not executing any actions. This increases readability and maintains the logic of the code by preventing potential confusion caused by having an empty code block.
2023-07-19 22:21:41 +01:00
Ivandro Jao
32a48aa70e Refactor SplitToLines method in StringExtensions
The previous implementation of the SplitToLines method was lengthy and contained redundant code. To improve readability and maintainability, the method was refactored. The same functionality is maintained but the code is cleaner and more understandable now.
2023-07-19 22:20:00 +01:00
niksedk
0b243c0430 Merge branch 'main' of https://github.com/SubtitleEdit/subtitleedit 2023-07-19 20:17:18 +02:00
niksedk
80a2df1a48 Update korean translation 2023-07-19 20:17:12 +02:00
Nikolaj Olsson
3ed5f92610
Merge pull request #7120 from bovirus/main
Update italian language
2023-07-19 14:12:42 -04:00
Martijn van Berkel (Flitskikker)
c07c5d4169 Overlap check is now working 2023-07-19 19:18:26 +02:00
Martijn van Berkel (Flitskikker)
e97a9d816e Revert overlap check for now 2023-07-19 18:45:24 +02:00
Martijn van Berkel (Flitskikker)
02079a41ed Prevent overlap 2023-07-19 18:25:35 +02:00
Martijn van Berkel (Flitskikker)
3e39978c7d Merge branch 'master' into feature/beautify-timecodes-improvements-20230718 2023-07-19 18:08:14 +02:00
Martijn van Berkel (Flitskikker)
05ba89cdda Make sure previous shot change fallback value is far away enough from zero 2023-07-19 17:24:04 +02:00
Martijn van Berkel (Flitskikker)
775ea9cb8d Update casing 2023-07-19 17:15:58 +02:00
Martijn van Berkel (Flitskikker)
8ecfd8a3bc Add "Set in/out cue to minimum distance before/after closest shot change" shortcuts 2023-07-19 17:08:39 +02:00
bovirus
3488fe7078
Update italian language 2023-07-19 16:07:46 +02:00
niksedk
8de5cc3329 More controls 2023-07-19 06:58:53 +02:00
niksedk
948b7318d8 Work on combobox 2023-07-19 06:53:23 +02:00
Martijn van Berkel (Flitskikker)
1583e89e65 Update current frame rate per processed file 2023-07-18 23:02:38 +02:00
Martijn van Berkel (Flitskikker)
42447c965d Maybe better to keep command line the same for compatibility reasons 2023-07-18 22:57:35 +02:00
Martijn van Berkel (Flitskikker)
239bd68588 Add UI and "Check shot changes" to "Apply duration limits" in batch converter and command line 2023-07-18 22:49:38 +02:00
Martijn van Berkel (Flitskikker)
b4e84bd4ab Also add "Beautify time codes" to command line 2023-07-18 22:31:19 +02:00
Martijn van Berkel (Flitskikker)
11e52914a0 Add "Check shot changes" for "Adjust durations" in batch converter 2023-07-18 21:51:56 +02:00