Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
usami-k committed Nov 26, 2014
2 parents 7ea3d53 + 6a92467 commit 55eb824
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
changelog
==========================

2.0.2
--------------------------

### Fixes

- Fix a critical issue that the application hung if either file encoding or line eingings is shown in status bar.



2.0.1
--------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@
<h1>Release Notes</h1>


<article>
<header>
<h1>CotEditor 2.0.2</h1>
<p>release: <time>2014-11-26</time></p>
</header>


<section>
<h3>Fixes</h3>


<ul>
<li>Fix a critical issue that the application hung if either file encoding or line eingings is shown in status bar.</li>
</ul>
</section>
</article>



<article>
<header>
<h1>CotEditor 2.0.1</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@
<h1>リリースノート</h1>


<article>
<header>
<h1>CotEditor 2.0.2</h1>
<p>release: <time>2014-11-26</time></p>
</header>


<section>
<h3>Fixes</h3>


<ul>
<li>ステータスバーに文字コード/改行コードを表示している時にウインドウが開かずアプリケーションがハングする不具合を修正。</li>
</ul>
</section>
</article>


<article>
<header>
<h1>CotEditor 2.0.1</h1>
Expand Down
4 changes: 2 additions & 2 deletions CotEditor/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleSignature</key>
<string>cEd1</string>
<key>CFBundleVersion</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>NSAppleScriptEnabled</key>
Expand Down
4 changes: 2 additions & 2 deletions CotEditor/Sources/CEStatusBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ - (void)updateDocumentStatus
NSMutableArray *status = [NSMutableArray array];

if ([defaults boolForKey:CEDefaultShowStatusBarEncodingKey]) {
[status addObject:[self encodingInfo]];
[status addObject:([self encodingInfo] ?: @"-")];
}
if ([defaults boolForKey:CEDefaultShowStatusBarLineEndingsKey]) {
[status addObject:[self lineEndingsInfo]];
[status addObject:([self lineEndingsInfo] ?: @"-")];
}
if ([defaults boolForKey:CEDefaultShowStatusBarFileSizeKey]) {
[status addObject:([self fileSizeInfo] ?
Expand Down
9 changes: 5 additions & 4 deletions CotEditor/Sources/CEWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,13 @@ - (void)windowDidLoad
// テキストを表示
[[self document] setStringToEditor];

[self updateFileAttributesInfo];

// setup status bar
[[self statusBarController] setShown:[defaults boolForKey:CEDefaultShowStatusBarKey] animate:NO];
[[self statusBarController] setShowsReadOnly:![[self document] isWritable]];

[self updateFileAttributesInfo];
[self updateEncodingAndLineEndingsInfo:YES];

// テキストビューへフォーカスを移動
[[self window] makeFirstResponder:[[self editor] textView]];

Expand Down Expand Up @@ -258,7 +259,7 @@ - (void)updateEditorStatusInfo:(BOOL)needsUpdateDrawer
BOOL updatesStatusBar = [[self statusBarController] isShown];
BOOL updatesDrawer = needsUpdateDrawer ? YES : [self needsInfoDrawerUpdate];

if (!updatesStatusBar && !updatesDrawer) { return; }
if (!needsUpdateDrawer && (!updatesStatusBar && !updatesDrawer)) { return; }

NSString *wholeString = ([[[self document] lineEndingString] length] == 2) ? [[self document] stringForSave] : [[[self editor] string] copy];
NSString *selectedString = [[self editor] substringWithSelection] ? : @"";
Expand Down Expand Up @@ -397,7 +398,7 @@ - (void)updateEncodingAndLineEndingsInfo:(BOOL)needsUpdateDrawer
BOOL shouldUpdateStatusBar = [[self statusBarController] isShown];
BOOL shouldUpdateDrawer = needsUpdateDrawer ? YES : [self needsInfoDrawerUpdate];

if (!shouldUpdateStatusBar && !shouldUpdateDrawer) { return; }
if (!needsUpdateDrawer && !shouldUpdateStatusBar && !shouldUpdateDrawer) { return; }

NSString *lineEndingsInfo = [[self document] lineEndingName];
NSString *encodingInfo = [[self document] currentIANACharSetName];
Expand Down

0 comments on commit 55eb824

Please sign in to comment.