Skip to content

Commit

Permalink
[macos] fix bug 31939
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadushkin committed Sep 18, 2024
1 parent 7197402 commit 260d0c7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions macos/ONLYOFFICE/Code/Controls/ASCTabs/ASCTabView.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ @interface ASCTabView()
@implementation ASCTabView

@synthesize isProcessing = _isProcessing;
NSString * originalTitle;

- (id)init {
self = [super init];
Expand Down Expand Up @@ -278,8 +279,10 @@ - (void)setButtonCloseOrigin:(NSRect)rect {
)];
}

- (NSString *)title {
return _changed ? [NSString stringWithFormat:@"%@*", [super title]] : [super title];
- (void)setTitle:(NSString *)title {
[super setTitle:title];

originalTitle = title;
}

- (NSMutableDictionary *)params {
Expand All @@ -298,6 +301,15 @@ - (void)onCloseTabButton:(id)sender {

- (void)setChanged:(BOOL)changed {
_changed = changed;

unichar l = [[super title] characterAtIndex:0];
if ( changed ) {
if ( l != '*' )
[super setTitle:[NSString stringWithFormat:@"*%@", originalTitle]];
} else {
if ( l == '*' )
[super setTitle:originalTitle];
}
}

- (void)drawRect:(NSRect)dirtyRect {
Expand Down

0 comments on commit 260d0c7

Please sign in to comment.