Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayer committed Mar 28, 2019
2 parents db5fa6e + 4597b16 commit 0d01153
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ language: objective-c
osx_image: xcode10
script:
- xcodebuild -workspace Nally.xcworkspace -list
- xcodebuild -workspace Nally.xcworkspace -scheme Nally
- xcodebuild -workspace Nally.xcworkspace -scheme Pods-Nally
32 changes: 19 additions & 13 deletions Code/PasteController.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@ - (void)defaultPasteWithPasteboard:(NSPasteboard*) pb {

- (NSString*)tinyurlWithSourceURLString:(NSString*) urlString {
[self setAnotherPasteStillOnGoing:YES];
NSAlert *alert = [[NSAlert new] autorelease];
[alert setMessageText:NSLocalizedString(@"Converting URL to TinyURL...", @"Converting URL to TinyURL...")];
[alert setInformativeText:NSLocalizedString(@"It may take several seconds, please wait", @"It may take several seconds, please wait")];
[alert addButtonWithTitle:@""];
[alert setAlertStyle:NSAlertStyleInformational];
[alert beginSheetModalForWindow:[NSApp mainWindow] completionHandler:nil];
NSAlert *alert = [self alertWithTitle:NSLocalizedString(@"Converting URL to TinyURL...", @"Converting URL to TinyURL...") andDetail:NSLocalizedString(@"It may take several seconds, please wait", @"It may take several seconds, please wait")];
NSString* APIRequestString = [@"http://tinyurl.com/api-create.php?url=" stringByAppendingString:urlString];
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:APIRequestString]];
Expand All @@ -118,17 +113,11 @@ - (NSString*)tinyurlWithSourceURLString:(NSString*) urlString {

- (void)imgurWithData:(NSData*) imgData withCompletionHandler:(void (^)(NSURL *, NSError *))completionHandler; {
[self setAnotherPasteStillOnGoing:YES];
NSAlert *alert = [[NSAlert new] autorelease];
[alert setMessageText:NSLocalizedString(@"Pasting to imgur...", @"Pasting to imgur...")];
[alert setInformativeText:NSLocalizedString(@"It may take several seconds, please wait", @"It may take several seconds, please wait")];
[alert addButtonWithTitle:@""];
[alert setAlertStyle:NSAlertStyleInformational];
[alert beginSheetModalForWindow:[NSApp mainWindow] completionHandler:nil];
NSAlert *alert = [self alertWithTitle:NSLocalizedString(@"Pasting to imgur...", @"Pasting to imgur...") andDetail:NSLocalizedString(@"It may take several seconds, please wait", @"It may take several seconds, please wait")];

[[ImgurAnonymousAPIClient sharedClient] uploadImageData:imgData withFilename:@"nally-uploaded" completionHandler:^(NSURL *imgurURL, NSError *error) {
completionHandler(imgurURL, error);
[[NSApp mainWindow] endSheet:alert.window];
//[NSApp stopModal];
//It will clear contents so it won't be paste again
[[NSPasteboard generalPasteboard] clearContents];
[self setAnotherPasteStillOnGoing:NO];
Expand All @@ -151,4 +140,21 @@ - (void)imgur:(id)sender {
[[controller telnetView] insertText:[imgurURL absoluteString]];
}];
}

-(NSAlert*) alertWithTitle:(NSString*)title andDetail:(NSString*)detail {
NSAlert *alert = [[NSAlert new] autorelease];
[alert setMessageText:title];
[alert setInformativeText:detail];
NSButton* dismissBtn = [alert addButtonWithTitle:NSLocalizedString(@"Dismiss", @"Dismiss alert when it freeze...")];
[dismissBtn setHidden:YES];
NSTimer* timer = [NSTimer timerWithTimeInterval:10 repeats:NO block:^(NSTimer * _Nonnull timer) {
[dismissBtn setHidden:NO];
}];

[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];

[alert setAlertStyle:NSAlertStyleInformational];
[alert beginSheetModalForWindow:[NSApp mainWindow] completionHandler:nil];
return alert;
}
@end
12 changes: 7 additions & 5 deletions Code/YLController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ - (void) observeValueForKeyPath: (NSString *)keyPath ofObject: (id)object change
- (void) loadSites
{
NSArray *dictionaries = [[NSUserDefaults standardUserDefaults] arrayForKey: @"Sites"];
for (NSDictionary *siteDictionay in dictionaries){
NSString *address = [siteDictionay objectForKey:@"address"];

for (NSDictionary *siteDictionaryImm in dictionaries){
NSMutableDictionary* siteDictionary = [siteDictionaryImm mutableCopy];
NSString *address = [siteDictionary objectForKey:@"address"];
if ( address )
{
NSString *account = [[[SSKeychain accountsForService:address]lastObject] objectForKey:@"acct"];
Expand All @@ -225,11 +227,11 @@ - (void) loadSites
{
/* set account and password back to siteDict */
NSLog(@"%@,%@",account,password);
[siteDictionay setValue:account forKey:@"account"];
[siteDictionay setValue:password forKey:@"password"];
[siteDictionary setValue:account forKey:@"account"];
[siteDictionary setValue:password forKey:@"password"];
}
}
[self insertObject: [YLSite siteWithDictionary: siteDictionay] inSitesAtIndex: [self countOfSites]];
[self insertObject: [YLSite siteWithDictionary: siteDictionary] inSitesAtIndex: [self countOfSites]];
}
}

Expand Down
2 changes: 1 addition & 1 deletion Dependencies/DBPrefsWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ - (id)initWithWindow:(NSWindow *)window
[viewAnimation setAnimationCurve:NSAnimationEaseInOut];
[viewAnimation setDelegate:self];

[self setCrossFade:YES];
[self setCrossFade:NO];
[self setShiftSlowsAnimation:YES];
}
return self;
Expand Down
92 changes: 92 additions & 0 deletions Nally.xcodeproj/xcshareddata/xcschemes/Nally-Force_zhTW.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "Nally.app"
BlueprintName = "Nally"
ReferencedContainer = "container:Nally.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "Nally.app"
BlueprintName = "Nally"
ReferencedContainer = "container:Nally.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "zh-Hant"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "Nally.app"
BlueprintName = "Nally"
ReferencedContainer = "container:Nally.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "Nally.app"
BlueprintName = "Nally"
ReferencedContainer = "container:Nally.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,30 @@

Open-Source telnet/ssh BBS client.

Build status :

- ![](https://travis-ci.com/Rayer/nally.svg?branch=develop) Develop Branch

- ![](https://travis-ci.com/Rayer/nally.svg?branch=master) Master Branch

## Issue Tracking

[YouTrack追蹤頁面](https://irisnode.myjetbrains.com/youtrack/)顯示了所有的開發中項目,如果有issue回報或者新功能request,請在GitHub的issue發出,接受後會移到YouTrack。

## History

### 2.0.1

Release Date : 2019.03.28

這個release以bug fix為主,詳細請參考YouTrack追蹤頁面

- [Nally-8](https://irisnode.myjetbrains.com/youtrack/issue/NALLY-8) 修正了Travis CI的問題,現在可以正常顯示build status了
- [Nally-13](https://irisnode.myjetbrains.com/youtrack/issue/NALLY-13) 修正Preference選單中,頁籤切換會鬼影幢幢的問題。
- [Nally-15](https://irisnode.myjetbrains.com/youtrack/issue/NALLY-15) 用一個workaround修正了當視窗焦點切換來切換去的時候,Smart Paste產生的Alert Panel無法正確消失而卡在螢幕上的問題。這個沒有太好的解法,目前是讓這個alert panel在10秒內要是沒消失的話,會有一個Dismiss按鈕讓你把它按掉。
- [Nally-18](https://irisnode.myjetbrains.com/youtrack/issue/NALLY-18) 修正一個當站台列表內有儲存帳號密碼時會造成整個死當的問題。


### 2.0.0

Release Date : 2019.03.18
Expand Down
Binary file modified Resources/English.lproj/Localizable.strings
Binary file not shown.
8 changes: 4 additions & 4 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>2.0.0</string>
<string>2.0.1</string>
<key>CFBundleIconFile</key>
<string>DragonBall.icns</string>
<key>CFBundleIdentifier</key>
Expand All @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.0.1</string>
<key>CFBundleSignature</key>
<string>naly</string>
<key>CFBundleURLTypes</key>
Expand All @@ -44,6 +44,8 @@
</array>
</dict>
</array>
<key>ImgurAnonymousAPIClientID</key>
<string>e4b9b7346da763f</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -66,8 +68,6 @@
</dict>
<key>NSHumanReadableCopyright</key>
<string>© 2010, yllan.org</string>
<key>ImgurAnonymousAPIClientID</key>
<string>e4b9b7346da763f</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 2 additions & 0 deletions Resources/zh_CN.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@

"About SmartPaste" = "Smart Paste(拼貼小幫手)";
"SmartPasteInformation" = "拼貼小幫手已經啟動。\n\n拼貼小幫手將會幫你把你系統剪貼簿的內容(通常來講當你按下⌘+c來拷貝某些文字圖案,以及當你用Mac Style的screenshot(⌘+shift+ctrl+3(or4)將截圖貼入剪貼簿)時,拼貼小幫手會在你貼上Nally的時候(⌘+v)幫你自動轉換資料 : \n\n1. 如果你剪下的是一串網址,而且這網址大於40個字元,拼貼小幫手將幫你TinyURL縮網址。\n2. 如果剪貼了圖片(通常就是Mac風格的screenshot),會自動幫你轉換成Imgur.\n3. 如果剪貼了一個圖形檔案,比方說對著photo或者圖片檔案下⌘+c,也會自動幫你轉換成Imgur.\n4. 其他情況下,你剪下什麼就會按原樣貼上什麼。";

"Dismiss" = "關閉";
2 changes: 2 additions & 0 deletions Resources/zh_TW.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@

"About SmartPaste" = "Smart Paste(拼貼小幫手)";
"SmartPasteInformation" = "拼貼小幫手已經啟動。\n\n拼貼小幫手將會幫你把你系統剪貼簿的內容(通常來講當你按下⌘+c來拷貝某些文字圖案,以及當你用Mac Style的screenshot(⌘+shift+ctrl+3(or4)將截圖貼入剪貼簿)時,拼貼小幫手會在你貼上Nally的時候(⌘+v)幫你自動轉換資料 : \n\n1. 如果你剪下的是一串網址,而且這網址大於40個字元,拼貼小幫手將幫你TinyURL縮網址。\n2. 如果剪貼了圖片(通常就是Mac風格的screenshot),會自動幫你轉換成Imgur.\n3. 如果剪貼了一個圖形檔案,比方說對著photo或者圖片檔案下⌘+c,也會自動幫你轉換成Imgur.\n4. 其他情況下,你剪下什麼就會按原樣貼上什麼。";

"Dismiss" = "關閉";

0 comments on commit 0d01153

Please sign in to comment.