"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "fsplugin/FinderSync.mm" between
seafile-client-7.0.4.tar.gz and seafile-client-7.0.5.tar.gz

About: Seafile (client) for the Seafile cloud storage system.

FinderSync.mm  (seafile-client-7.0.4):FinderSync.mm  (seafile-client-7.0.5)
skipping to change at line 386 skipping to change at line 386
// add a menu item for lockFile // add a menu item for lockFile
NSNumber *isDirectory; NSNumber *isDirectory;
bool is_dir = [item getResourceValue:&isDirectory bool is_dir = [item getResourceValue:&isDirectory
forKey:NSURLIsDirectoryKey forKey:NSURLIsDirectoryKey
error:nil] && error:nil] &&
[isDirectory boolValue]; [isDirectory boolValue];
// we don't have a lock-file menuitem for folders // we don't have a lock-file menuitem for folders
// early return // early return
if (is_dir) if (is_dir) {
NSMenuItem *showUploadLinkByMenuItem =
[menu addItemWithTitle:NSLocalizedString(@"Get Seafile Upload Li
nk",
@"Get Seafile Upload Li
nk")
action:@selector(getUploadLinkAction:)
keyEquivalent:@""];
[showUploadLinkByMenuItem setImage:seafileImage];
return menu; return menu;
}
// find where we have it // find where we have it
auto file = file_status_.find(is_dir ? file_path + "/" : file_path); auto file = file_status_.find(is_dir ? file_path + "/" : file_path);
bool shouldShowLockedByMenu = false; bool shouldShowLockedByMenu = false;
if (file != file_status_.end()) { if (file != file_status_.end()) {
NSString *lockFileTitle; NSString *lockFileTitle;
switch (file->second) { switch (file->second) {
case PathStatus::SYNC_STATUS_READONLY: case PathStatus::SYNC_STATUS_READONLY:
break; break;
case PathStatus::SYNC_STATUS_LOCKED_BY_ME: case PathStatus::SYNC_STATUS_LOCKED_BY_ME:
skipping to change at line 623 skipping to change at line 630
// do it in another thread // do it in another thread
std::string path = std::string path =
item.path.precomposedStringWithCanonicalMapping.UTF8String; item.path.precomposedStringWithCanonicalMapping.UTF8String;
dispatch_async(self.client_command_queue_, ^{ dispatch_async(self.client_command_queue_, ^{
client_->doSendCommandWithPath(FinderSyncClient::DoShowFileLockedBy, client_->doSendCommandWithPath(FinderSyncClient::DoShowFileLockedBy,
path.c_str()); path.c_str());
}); });
} }
- (IBAction)getUploadLinkAction:(id)sender {
NSArray *items =
[[FIFinderSyncController defaultController] selectedItemURLs];
if (![items count])
return;
NSURL *item = items.firstObject;
// do it in another thread
std::string path =
item.path.precomposedStringWithCanonicalMapping.UTF8String;
dispatch_async(self.client_command_queue_, ^{
client_->doSendCommandWithPath(FinderSyncClient::DoGetUploadLink,
path.c_str());
});
}
@end @end
 End of changes. 3 change blocks. 
1 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)