Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little things #1344

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepCore/QSObject_URLHandling.m
Expand Up @@ -245,8 +245,8 @@ - (id)initWithURL:(NSString *)urlString title:(NSString *)title {
- (void)assignURLTypesWithURL:(NSString *)urlString
{
[[self dataDictionary] setObject:urlString forKey:QSURLType];
// Apple's 'URLWithString' method incorrectly deals with IP addresses, check for @"://" in the string as well
if ([urlString rangeOfString:@"://"].location != NSNotFound && [[NSURL URLWithString:[urlString URLEncoding]] scheme])
// Apple's 'URLWithString' method incorrectly deals with IP addresses, check for "://" and "mailto:" in the string as well
if (([urlString rangeOfString:@"://"].location != NSNotFound || [urlString hasPrefix:@"mailto:"]) && [[NSURL URLWithString:[urlString URLEncoding]] scheme])
{
[self setObject:urlString forType:QSURLType];
} else {
Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSTextProxy.m
Expand Up @@ -6,7 +6,7 @@

@implementation QSObject (TextProxy)
+ (id)textProxyObjectWithDefaultValue:(NSString *)string {
QSObject *object = [self objectWithType:QSTextProxyType value:string name:@""];
QSObject *object = [self objectWithType:QSTextProxyType value:string name:string];
[object setIcon:[[NSWorkspace sharedWorkspace] iconForFileType:@"'clpt'"]];
return object;
}
Expand Down
20 changes: 13 additions & 7 deletions Quicksilver/Code-QuickStepInterface/QSResultController.m
Expand Up @@ -358,6 +358,7 @@ - (IBAction)assignAbbreviation:(id)sender {
- (void)arrayChanged:(NSNotification*)notif {
[self setResultIconLoader:nil];
[self setCurrentResults:[focus resultArray]];
[self updateStatusString];

[resultTable reloadData];

Expand All @@ -376,13 +377,7 @@ - (void)updateSelectionInfo {
if (selectedItem != newSelectedItem) {
[self setSelectedItem:newSelectedItem];
[resultChildTable noteNumberOfRowsChanged];
// HenningJ 20110419 there is no localized version of "%d of %d". Additionally, something goes wrong while trying to localize it.
// NSString *fmt = NSLocalizedStringFromTableInBundle(@"%d of %d", nil, [NSBundle bundleForClass:[self class]], @"");
NSString *status = [NSString stringWithFormat:@"%ld of %ld", (long)selectedResult + 1, (long)[[self currentResults] count]];
if ([resultTable rowHeight] < 34 && [selectedItem details]) {
status = [status stringByAppendingFormat:@" %C %@", (unsigned short)0x25B8, [selectedItem details]];
}
[(NSTextField *)selectionView setStringValue:status];
[self updateStatusString];

if ([[NSApp currentEvent] modifierFlags] & NSFunctionKeyMask && [[NSApp currentEvent] isARepeat]) {
if ([childrenLoadTimer isValid]) {
Expand All @@ -406,6 +401,17 @@ - (void)updateSelectionInfo {
}
}

- (void)updateStatusString
{
// HenningJ 20110419 there is no localized version of "%d of %d". Additionally, something goes wrong while trying to localize it.
// NSString *fmt = NSLocalizedStringFromTableInBundle(@"%d of %d", nil, [NSBundle bundleForClass:[self class]], @"");
NSString *status = [NSString stringWithFormat:@"%ld of %ld", (long)selectedResult + 1, (long)[[self currentResults] count]];
if ([resultTable rowHeight] < 34 && [selectedItem details]) {
status = [status stringByAppendingFormat:@" %C %@", (unsigned short)0x25B8, [selectedItem details]];
}
[(NSTextField *)selectionView setStringValue:status];
}

#pragma mark -
#pragma mark NSResponder
//- (void)scrollWheel:(NSEvent *)theEvent {
Expand Down