Make autocomplete work again. The contract ID was changed from under us, when xpfe revamped its autocomplete impl. sr=pinkerton, b=353421

This commit is contained in:
hwaara%gmail.com 2006-09-21 16:29:20 +00:00
Родитель 7a95915e2c
Коммит 81792ed688
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -49,6 +49,7 @@
#include "nsIAutoCompleteSession.h"
#include "nsIAutoCompleteResults.h"
#include "nsIAutoCompleteListener.h"
#include "nsIBrowserHistory.h"
#include "nsIServiceManager.h"
#include "nsIWebProgressListener.h"
@ -501,7 +502,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
// XXX add aSession to contract id
nsCOMPtr<nsIAutoCompleteSession> session =
do_GetService("@mozilla.org/autocompleteSession;1?type=history");
do_GetService(NS_GLOBALHISTORY_AUTOCOMPLETE_CONTRACTID);
mSession = session;
NS_IF_ADDREF(mSession);
}
@ -1173,7 +1174,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
[self selectRowBy:1];
[self completeSelectedResult];
return YES;
} else if (command == @selector(insertTab:)) {
} else if (command == @selector(insertTab:)) {
if ([mPopupWin isVisible]) {
[self selectRowBy:1];
[self completeSelectedResult];