mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 19:37:15 +00:00
Changed bookmarks set and get item title to use user titles instead of page titles. bug=320453 r=bryner keywords=fixed1.8.1
This commit is contained in:
parent
3673fdffdd
commit
fa710b069c
@ -1011,7 +1011,7 @@ nsNavBookmarks::GetChildFolder(PRInt64 aFolder, const nsAString& aSubFolder,
|
||||
NS_IMETHODIMP
|
||||
nsNavBookmarks::SetItemTitle(nsIURI *aURI, const nsAString &aTitle)
|
||||
{
|
||||
return History()->SetPageTitle(aURI, aTitle);
|
||||
return History()->SetPageUserTitle(aURI, aTitle);
|
||||
}
|
||||
|
||||
|
||||
@ -1032,7 +1032,15 @@ nsNavBookmarks::GetItemTitle(nsIURI *aURI, nsAString &aTitle)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return statement->GetString(nsNavHistory::kGetInfoIndex_Title, aTitle);
|
||||
// First check for a user title
|
||||
if (!statement->IsNull(nsNavHistory::kGetInfoIndex_UserTitle))
|
||||
return statement->GetString(nsNavHistory::kGetInfoIndex_UserTitle, aTitle);
|
||||
|
||||
// If there is no user title, check for a history title.
|
||||
rv = statement->GetString(nsNavHistory::kGetInfoIndex_Title, aTitle);
|
||||
if (statement->IsNull(nsNavHistory::kGetInfoIndex_Title))
|
||||
aTitle.SetIsVoid(PR_TRUE);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user