diff options
Diffstat (limited to 'macosx/HBLanguagesSelection.m')
-rw-r--r-- | macosx/HBLanguagesSelection.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macosx/HBLanguagesSelection.m b/macosx/HBLanguagesSelection.m index 3bdb8ec61..bdc6ed7ae 100644 --- a/macosx/HBLanguagesSelection.m +++ b/macosx/HBLanguagesSelection.m @@ -20,6 +20,17 @@ return self; } +- (instancetype)copyWithZone:(NSZone *)zone +{ + HBLang *lang = [[self class] allocWithZone:zone]; + + lang->_isSelected = self.isSelected; + lang->_language = [self.language retain]; + lang->_iso639_2 = [self.iso639_2 retain]; + + return lang; +} + - (void)dealloc { [_language release]; @@ -28,10 +39,21 @@ [super dealloc]; } +- (NSString *)description +{ + return self.language; +} + @end @implementation HBLanguagesSelection +- (instancetype)init +{ + self = [self initWithLanguages:nil]; + return self; +} + - (instancetype)initWithLanguages:(NSArray *)languages { self = [super init]; |