mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Prompt for category removal
This commit is contained in:
parent
e947bd87ac
commit
4c93edefe8
@ -2609,6 +2609,7 @@ Continue?</RestoreDefaultSettingsMsg>
|
||||
<CategoryName>Category name</CategoryName>
|
||||
<CategorySetDefault>Set as default</CategorySetDefault>
|
||||
<CategoryNote>Note: "Default" styles will be applied to new ASSA files</CategoryNote>
|
||||
<CategoryDelete>Are you sure you want to delete this category?</CategoryDelete>
|
||||
</SubStationAlphaStyles>
|
||||
<PointSync>
|
||||
<Title>Point synchronization</Title>
|
||||
|
@ -1977,10 +1977,14 @@ namespace Nikse.SubtitleEdit.Forms.Styles
|
||||
|
||||
private void buttonStorageCategoryDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
_storageCategories.Remove(_currentCategory);
|
||||
comboboxStorageCategories.Items.Remove(_currentCategory.Name);
|
||||
_currentCategory = _storageCategories.Single(x => x.IsDefault);
|
||||
comboboxStorageCategories.SelectedItem = _currentCategory.Name;
|
||||
var result = MessageBox.Show(LanguageSettings.Current.SubStationAlphaStyles.CategoryDelete, string.Empty, MessageBoxButtons.YesNoCancel);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
_storageCategories.Remove(_currentCategory);
|
||||
comboboxStorageCategories.Items.Remove(_currentCategory.Name);
|
||||
_currentCategory = _storageCategories.Single(x => x.IsDefault);
|
||||
comboboxStorageCategories.SelectedItem = _currentCategory.Name;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonStorageCategorySetDefault_Click(object sender, EventArgs e)
|
||||
|
@ -2947,7 +2947,8 @@ can edit in same subtitle file (collaboration)",
|
||||
NewCategory = "New category",
|
||||
CategoryName = "Category name",
|
||||
CategorySetDefault = "Set as default",
|
||||
CategoryNote = "Note: \"Default\" styles will be applied to new ASSA files"
|
||||
CategoryNote = "Note: \"Default\" styles will be applied to new ASSA files",
|
||||
CategoryDelete = "Are you sure you want to delete this category?"
|
||||
};
|
||||
|
||||
PointSync = new LanguageStructure.PointSync
|
||||
|
@ -7141,6 +7141,9 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "SubStationAlphaStyles/CategoryNote":
|
||||
language.SubStationAlphaStyles.CategoryNote = reader.Value;
|
||||
break;
|
||||
case "SubStationAlphaStyles/CategoryDelete":
|
||||
language.SubStationAlphaStyles.CategoryDelete = reader.Value;
|
||||
break;
|
||||
case "PointSync/Title":
|
||||
language.PointSync.Title = reader.Value;
|
||||
break;
|
||||
|
@ -2804,6 +2804,7 @@
|
||||
public string CategoryName { get; set; }
|
||||
public string CategorySetDefault { get; set; }
|
||||
public string CategoryNote { get; set; }
|
||||
public string CategoryDelete { get; set; }
|
||||
}
|
||||
|
||||
public class PointSync
|
||||
|
Loading…
Reference in New Issue
Block a user