Merge branch 'main' into dev/ani/fix-fancy-zones-layout-editor-monitor-accessibility

This commit is contained in:
Ani 2025-01-22 14:51:36 +01:00
Родитель f91c20ce4d ab8df1a906
Коммит ca10fef469
3 изменённых файлов: 29 добавлений и 23 удалений

Просмотреть файл

@ -343,6 +343,21 @@ namespace newplus::utilities
}
}
inline void update_last_write_time(const std::filesystem::path path)
{
const std::filesystem::file_time_type now = std::filesystem::file_time_type::clock::now();
std::filesystem::last_write_time(path, now);
if (std::filesystem::is_directory(path))
{
for (const auto& entry : std::filesystem::recursive_directory_iterator(path))
{
std::filesystem::last_write_time(entry.path(), now);
}
}
}
inline HRESULT copy_template(const template_item* template_entry, const ComPtr<IUnknown> site_of_folder)
{
HRESULT hr = S_OK;
@ -376,6 +391,9 @@ namespace newplus::utilities
// Copy file and determine final filename
std::filesystem::path target_final_fullpath = template_entry->copy_object_to(GetActiveWindow(), target_fullpath);
// Touch all files and set last modified to "now"
update_last_write_time(target_final_fullpath);
// Consider copy completed. If we do tracing after enter_rename_mode, then rename mode won't consistently work
trace.UpdateState(true);
Trace::EventCopyTemplate(target_final_fullpath.extension().c_str());

Просмотреть файл

@ -108,17 +108,11 @@
x:Uid="ImageResizer_EditButton"
Width="40"
Height="36"
AutomationProperties.FullDescription="{x:Bind AccessibleTextHelper, Mode=OneWay, Converter={StaticResource ImageResizerSizeToAccessibleTextConverter}, ConverterParameter='Edit'}"
AutomationProperties.Name="{x:Bind Name, Mode=OneWay, Converter={StaticResource ImageResizerSizeToAccessibleTextConverter}, ConverterParameter='Edit'}"
Content="&#xE70F;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Style="{StaticResource SubtleButtonStyle}"
AutomationProperties.Name="{x:Bind Name,
Mode=OneWay,
Converter={StaticResource ImageResizerSizeToAccessibleTextConverter},
ConverterParameter='Edit'}"
AutomationProperties.FullDescription="{x:Bind AccessibleTextHelper,
Mode=OneWay,
Converter={StaticResource ImageResizerSizeToAccessibleTextConverter},
ConverterParameter='Edit'}">
Style="{StaticResource SubtleButtonStyle}">
<ToolTipService.ToolTip>
<TextBlock x:Uid="EditTooltip" />
</ToolTipService.ToolTip>
@ -176,19 +170,13 @@
x:Uid="ImageResizer_RemoveButton"
Width="40"
Height="36"
AutomationProperties.FullDescription="{x:Bind AccessibleTextHelper, Mode=OneWay, Converter={StaticResource ImageResizerSizeToAccessibleTextConverter}, ConverterParameter='Remove'}"
AutomationProperties.Name="{x:Bind Name, Mode=OneWay, Converter={StaticResource ImageResizerSizeToAccessibleTextConverter}, ConverterParameter='Remove'}"
Click="DeleteCustomSize"
CommandParameter="{Binding Id}"
Content="&#xE74D;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
Style="{StaticResource SubtleButtonStyle}"
AutomationProperties.Name="{x:Bind Name,
Mode=OneWay,
Converter={StaticResource ImageResizerSizeToAccessibleTextConverter},
ConverterParameter='Remove'}"
AutomationProperties.FullDescription="{x:Bind AccessibleTextHelper,
Mode=OneWay,
Converter={StaticResource ImageResizerSizeToAccessibleTextConverter},
ConverterParameter='Remove'}">
Style="{StaticResource SubtleButtonStyle}">
<ToolTipService.ToolTip>
<TextBlock x:Uid="RemoveTooltip" />
</ToolTipService.ToolTip>

Просмотреть файл

@ -879,7 +879,7 @@
<value>Location</value>
</data>
<data name="General_SettingsBackupAndRestore_ButtonBackup.Content" xml:space="preserve">
<value>Backup</value>
<value>Back up</value>
</data>
<data name="General_SettingsBackupInfo_FileNameHeader.Text" xml:space="preserve">
<value>File name:</value>
@ -1104,10 +1104,10 @@
<value>Appearance &amp; behavior</value>
</data>
<data name="General_SettingsBackupAndRestoreTitle.Header" xml:space="preserve">
<value>Backup &amp; restore</value>
<value>Back up &amp; restore</value>
</data>
<data name="General_SettingsBackupAndRestore.Header" xml:space="preserve">
<value>Backup and restore your settings</value>
<value>Back up and restore your settings</value>
</data>
<data name="General_SettingsBackupAndRestore.Description" xml:space="preserve">
<value>PowerToys will restart automatically if needed</value>
@ -3343,7 +3343,7 @@ Activate by holding the key for the character you want to add an accent to, then
<value>There was an error in the settings format. Please check the settings file:</value>
</data>
<data name="General_SettingsBackupAndRestore_BackupComplete" xml:space="preserve">
<value>Backup completed.</value>
<value>Back up completed.</value>
</data>
<data name="General_SettingsBackupAndRestore_NoBackupSyncPath" xml:space="preserve">
<value>No backup location selected.</value>
@ -4388,7 +4388,7 @@ Activate by holding the key for the character you want to add an accent to, then
<comment>Localize product name in accordance with Windows New</comment>
</data>
<data name="NewPlus_TemplatesNotBackupAndRestoreWarning.Title" xml:space="preserve">
<value>PowerToys "Backup and Restore" feature doesn't take templates into account at this moment. If you use that feature, templates will have to be copied manually.</value>
<value>PowerToys "Back up and Restore" feature doesn't take templates into account at this moment. If you use that feature, templates will have to be copied manually.</value>
</data>
<data name="NewPlus_Templates.Header" xml:space="preserve">
<value>Templates</value>