зеркало из https://github.com/mozilla/gecko-dev.git
The auto complete session successfully instantiates now in response to user input.
This commit is contained in:
Родитель
4d2baf8913
Коммит
eb72a00520
|
@ -22,9 +22,12 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "nsIAutoCompleteSession.h"
|
||||
|
||||
@interface CHAutoCompleteDataSource : NSObject {
|
||||
|
||||
nsIAutoCompleteSession* mAutoComplete;
|
||||
}
|
||||
|
||||
-(void)initialize;
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,9 +23,29 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mAutoComplete = nsnull;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initialize
|
||||
{
|
||||
if (!mAutoComplete) {
|
||||
nsCOMPtr<nsIAutoCompleteSession> session =
|
||||
do_GetService("@mozilla.org/autocompleteSession;1?type=history");
|
||||
mAutoComplete = session;
|
||||
if (!mAutoComplete)
|
||||
printf("CRAP CRAP!\n");
|
||||
}
|
||||
}
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -31,4 +31,6 @@
|
|||
CHAutoCompleteDataSource* mDataSource;
|
||||
}
|
||||
|
||||
- (BOOL)isShowing;
|
||||
|
||||
@end
|
||||
|
|
|
@ -48,14 +48,21 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
-(BOOL)isShowing
|
||||
{
|
||||
return ([self superview] != nil);
|
||||
}
|
||||
|
||||
-(void)controlTextDidChange:(NSNotification*)aNotification
|
||||
{
|
||||
// Ensure that our data source is initialized.
|
||||
[mDataSource initialize];
|
||||
|
||||
// [[[[mWindowController window] contentView] superview] addSubview: self];
|
||||
}
|
||||
|
||||
-(void)controlTextDidEndEditing:(NSNotification*)aNotification
|
||||
{
|
||||
printf("Editing finished.\n");
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -257,7 +257,7 @@
|
|||
buildSettings = {
|
||||
DEBUGGING_SYMBOLS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = ../embedding/browser/cocoa/src/build;
|
||||
HEADER_SEARCH_PATHS = "../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/xpcom";
|
||||
HEADER_SEARCH_PATHS = "../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/xpcom";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util ../modules/zlib/src";
|
||||
OPTIMIZATION_CFLAGS = "-O2";
|
||||
|
|
|
@ -22,9 +22,12 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "nsIAutoCompleteSession.h"
|
||||
|
||||
@interface CHAutoCompleteDataSource : NSObject {
|
||||
|
||||
nsIAutoCompleteSession* mAutoComplete;
|
||||
}
|
||||
|
||||
-(void)initialize;
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,9 +23,29 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mAutoComplete = nsnull;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initialize
|
||||
{
|
||||
if (!mAutoComplete) {
|
||||
nsCOMPtr<nsIAutoCompleteSession> session =
|
||||
do_GetService("@mozilla.org/autocompleteSession;1?type=history");
|
||||
mAutoComplete = session;
|
||||
if (!mAutoComplete)
|
||||
printf("CRAP CRAP!\n");
|
||||
}
|
||||
}
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -22,9 +22,12 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "nsIAutoCompleteSession.h"
|
||||
|
||||
@interface CHAutoCompleteDataSource : NSObject {
|
||||
|
||||
nsIAutoCompleteSession* mAutoComplete;
|
||||
}
|
||||
|
||||
-(void)initialize;
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,9 +23,29 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mAutoComplete = nsnull;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initialize
|
||||
{
|
||||
if (!mAutoComplete) {
|
||||
nsCOMPtr<nsIAutoCompleteSession> session =
|
||||
do_GetService("@mozilla.org/autocompleteSession;1?type=history");
|
||||
mAutoComplete = session;
|
||||
if (!mAutoComplete)
|
||||
printf("CRAP CRAP!\n");
|
||||
}
|
||||
}
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -31,4 +31,6 @@
|
|||
CHAutoCompleteDataSource* mDataSource;
|
||||
}
|
||||
|
||||
- (BOOL)isShowing;
|
||||
|
||||
@end
|
||||
|
|
|
@ -48,14 +48,21 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
-(BOOL)isShowing
|
||||
{
|
||||
return ([self superview] != nil);
|
||||
}
|
||||
|
||||
-(void)controlTextDidChange:(NSNotification*)aNotification
|
||||
{
|
||||
// Ensure that our data source is initialized.
|
||||
[mDataSource initialize];
|
||||
|
||||
// [[[[mWindowController window] contentView] superview] addSubview: self];
|
||||
}
|
||||
|
||||
-(void)controlTextDidEndEditing:(NSNotification*)aNotification
|
||||
{
|
||||
printf("Editing finished.\n");
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,9 +22,12 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "nsIAutoCompleteSession.h"
|
||||
|
||||
@interface CHAutoCompleteDataSource : NSObject {
|
||||
|
||||
nsIAutoCompleteSession* mAutoComplete;
|
||||
}
|
||||
|
||||
-(void)initialize;
|
||||
|
||||
@end
|
||||
|
|
|
@ -23,9 +23,29 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
mAutoComplete = nsnull;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initialize
|
||||
{
|
||||
if (!mAutoComplete) {
|
||||
nsCOMPtr<nsIAutoCompleteSession> session =
|
||||
do_GetService("@mozilla.org/autocompleteSession;1?type=history");
|
||||
mAutoComplete = session;
|
||||
if (!mAutoComplete)
|
||||
printf("CRAP CRAP!\n");
|
||||
}
|
||||
}
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче