Revision: 18246
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18246&view=rev
Author: hofman
Date: 2011-11-27 12:46:29 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
use URL path component for missing history item title
Modified Paths:
--------------
trunk/bibdesk/BDSKWebGroupViewController.m
Modified: trunk/bibdesk/BDSKWebGroupViewController.m
===================================================================
--- trunk/bibdesk/BDSKWebGroupViewController.m 2011-11-27 07:35:38 UTC (rev
18245)
+++ trunk/bibdesk/BDSKWebGroupViewController.m 2011-11-27 12:46:29 UTC (rev
18246)
@@ -197,7 +197,12 @@
return;
[menu removeAllItems];
for (WebHistoryItem *item in items) {
- NSMenuItem *menuItem = [menu addItemWithTitle:([item title] ?: @"")
action:@selector(goBackForwardInHistory:) keyEquivalent:@""];
+ NSString *title = [item title];
+ if ([NSString isEmptyString:title]) {
+ NSURL *url = [NSURL URLWithString:[item URLString]];
+ title = [url isFileURL] ? [[url path] lastPathComponent] : [[url
absoluteString] stringByReplacingPercentEscapes];
+ }
+ NSMenuItem *menuItem = [menu addItemWithTitle:title
action:@selector(goBackForwardInHistory:) keyEquivalent:@""];
[menuItem setImageAndSize:[item icon]];
[menuItem setTarget:self];
[menuItem setRepresentedObject:item];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit