[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
sullivan
sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:57:57 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f69e24f4871c8e1bcf2b1a645e4309a5f657bdc8
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 21 01:11:01 2002 +0000
Added displayTitle field to IFURIEntry. This is intended to hold the string
used in menu items, window titles, etc. Alexander uses this to cache the
center-truncated title for pages with very long titles.
* History.subproj/IFURIEntry.h:
* History.subproj/IFURIEntry.m: (-[IFURIEntry setDisplayTitle:]), (-[IFURIEntry
dictionaryRepresentation]), (-[IFURIEntry initFromDictionaryRepresentation:]):
Made Go, Window, and Debug menus use center-truncated strings for long URLs.
* StringTruncator.h,
* StringTruncator.m:
New class, donated by Albert Dul, that truncates a string to a given width,
inserting an ellipses in the center.
* Defaults.plist,
* PreferenceKeys.h: New (non-UI) user default for maximum menu item width.
* AppController.h:
* AppController.m:
(-[AppController setUpStringTruncator]): set the StringTruncator to use
the menu font at the menu font size.
(-[AppController awakeFromNib]): call setUpStringTruncator.
(_URLMenuTitleMaxWidth): read the max width from prefs and cache it in a variable.
(-[AppController menuTitleForURL:withTitle:]): New method, uses center-truncated
string technology.
(-[AppController _menuTitleForURIEntry:]): Calls menuTitleForURL:withTitle, storing
result using -[IFURIEntry setDisplayTitle] so we never have to measure this entry
again.
(-[AppController insertHistoryEntry:intoMenu:atIndex:]): Use _menuTitleForURIEntry.
(-[AppController _removeHistoryFromMenu]): added leading underscore to name (I gotta
do this more systematically).
(-[AppController _addHistoryToMenu]): broke out into separate method for convenience.
(-[AppController updateHistoryInMenu]): report timing with WebKitDebug
* BrowserDocument.m: (-[BrowserDocument displayName]):
Use center-truncated string technology.
* Debug/DebugUtilities.m:
(+[DebugUtilities addBookmarkToMenu:forURL:keyEquivalent:]),
(+[DebugUtilities loadDebugBookmarks:]):
Use center-truncated string technology for debug bookmarks (not cached).
* WebBrowser.pbproj/project.pbxproj: Updated for new files.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 349aba4..a584519 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2002-03-20 John Sullivan <sullivan at apple.com>
+
+ Added displayTitle field to IFURIEntry. This is intended to hold the string
+ used in menu items, window titles, etc. Alexander uses this to cache the
+ center-truncated title for pages with very long titles.
+
+ * History.subproj/IFURIEntry.h:
+ * History.subproj/IFURIEntry.m: (-[IFURIEntry setDisplayTitle:]), (-[IFURIEntry
+ dictionaryRepresentation]), (-[IFURIEntry initFromDictionaryRepresentation:]):
+
2002-03-19 Richard Williamson <rjw at apple.com>
Fixed IFWebView leak.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 349aba4..a584519 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-03-20 John Sullivan <sullivan at apple.com>
+
+ Added displayTitle field to IFURIEntry. This is intended to hold the string
+ used in menu items, window titles, etc. Alexander uses this to cache the
+ center-truncated title for pages with very long titles.
+
+ * History.subproj/IFURIEntry.h:
+ * History.subproj/IFURIEntry.m: (-[IFURIEntry setDisplayTitle:]), (-[IFURIEntry
+ dictionaryRepresentation]), (-[IFURIEntry initFromDictionaryRepresentation:]):
+
2002-03-19 Richard Williamson <rjw at apple.com>
Fixed IFWebView leak.
diff --git a/WebKit/History.subproj/IFURIEntry.h b/WebKit/History.subproj/IFURIEntry.h
index adfaa45..2137a32 100644
--- a/WebKit/History.subproj/IFURIEntry.h
+++ b/WebKit/History.subproj/IFURIEntry.h
@@ -13,6 +13,7 @@
{
NSURL *_url;
NSString *_title;
+ NSString *_displayTitle;
NSImage *_image;
NSString *_comment;
NSCalendarDate *_creationDate;
@@ -30,6 +31,7 @@
-(NSURL *)url;
-(NSString *)title;
+-(NSString *)displayTitle;
-(NSImage *)image;
-(NSString *)comment;
-(NSCalendarDate *)creationDate;
@@ -38,6 +40,7 @@
-(void)setURL:(NSURL *)url;
-(void)setTitle:(NSString *)title;
+-(void)setDisplayTitle:(NSString *)displayTitle;
-(void)setImage:(NSImage *)image;
-(void)setComment:(NSString *)comment;
-(void)setModificationDate:(NSCalendarDate *)date;
diff --git a/WebKit/History.subproj/IFURIEntry.m b/WebKit/History.subproj/IFURIEntry.m
index 07a52db..9fc96a3 100644
--- a/WebKit/History.subproj/IFURIEntry.m
+++ b/WebKit/History.subproj/IFURIEntry.m
@@ -67,6 +67,11 @@
return _title;
}
+-(NSString *)displayTitle;
+{
+ return _displayTitle;
+}
+
-(NSImage *)image
{
static NSImage *defaultImage = nil;
@@ -124,6 +129,14 @@
}
}
+-(void)setDisplayTitle:(NSString *)displayTitle
+{
+ if (displayTitle != _displayTitle) {
+ [_displayTitle release];
+ _displayTitle = [displayTitle retain];
+ }
+}
+
-(void)setImage:(NSImage *)image
{
if (image != _image) {
@@ -189,6 +202,9 @@
if (_title != nil) {
[dict setObject: _title forKey: @"title"];
}
+ if (_displayTitle != nil) {
+ [dict setObject: _displayTitle forKey: @"displayTitle"];
+ }
if (_comment != nil) {
[dict setObject: _comment forKey: @"comment"];
}
@@ -214,6 +230,7 @@
if ((self = [super init]) != nil) {
_url = [[NSURL URLWithString: [dict objectForKey: @"url"]] retain];
_title = [[dict objectForKey: @"title"] retain];
+ _displayTitle = [[dict objectForKey: @"displayTitle"] retain];
_comment = [[dict objectForKey: @"comment"] retain];
_creationDate = [[[NSCalendarDate alloc] initWithTimeIntervalSinceReferenceDate:
[[dict objectForKey: @"creationDate"] doubleValue]] retain];
diff --git a/WebKit/History.subproj/WebHistoryItem.h b/WebKit/History.subproj/WebHistoryItem.h
index adfaa45..2137a32 100644
--- a/WebKit/History.subproj/WebHistoryItem.h
+++ b/WebKit/History.subproj/WebHistoryItem.h
@@ -13,6 +13,7 @@
{
NSURL *_url;
NSString *_title;
+ NSString *_displayTitle;
NSImage *_image;
NSString *_comment;
NSCalendarDate *_creationDate;
@@ -30,6 +31,7 @@
-(NSURL *)url;
-(NSString *)title;
+-(NSString *)displayTitle;
-(NSImage *)image;
-(NSString *)comment;
-(NSCalendarDate *)creationDate;
@@ -38,6 +40,7 @@
-(void)setURL:(NSURL *)url;
-(void)setTitle:(NSString *)title;
+-(void)setDisplayTitle:(NSString *)displayTitle;
-(void)setImage:(NSImage *)image;
-(void)setComment:(NSString *)comment;
-(void)setModificationDate:(NSCalendarDate *)date;
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index 07a52db..9fc96a3 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -67,6 +67,11 @@
return _title;
}
+-(NSString *)displayTitle;
+{
+ return _displayTitle;
+}
+
-(NSImage *)image
{
static NSImage *defaultImage = nil;
@@ -124,6 +129,14 @@
}
}
+-(void)setDisplayTitle:(NSString *)displayTitle
+{
+ if (displayTitle != _displayTitle) {
+ [_displayTitle release];
+ _displayTitle = [displayTitle retain];
+ }
+}
+
-(void)setImage:(NSImage *)image
{
if (image != _image) {
@@ -189,6 +202,9 @@
if (_title != nil) {
[dict setObject: _title forKey: @"title"];
}
+ if (_displayTitle != nil) {
+ [dict setObject: _displayTitle forKey: @"displayTitle"];
+ }
if (_comment != nil) {
[dict setObject: _comment forKey: @"comment"];
}
@@ -214,6 +230,7 @@
if ((self = [super init]) != nil) {
_url = [[NSURL URLWithString: [dict objectForKey: @"url"]] retain];
_title = [[dict objectForKey: @"title"] retain];
+ _displayTitle = [[dict objectForKey: @"displayTitle"] retain];
_comment = [[dict objectForKey: @"comment"] retain];
_creationDate = [[[NSCalendarDate alloc] initWithTimeIntervalSinceReferenceDate:
[[dict objectForKey: @"creationDate"] doubleValue]] retain];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list