From 0aabe0f3104e997f11d86a1cad76d1f11bb22316 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Sun, 28 Apr 2002 22:07:03 +0000 Subject: [PATCH] Ok, so now it's picking a URL for import. --- camino/MainController.mm | 15 +++++++++++++++ camino/src/application/MainController.mm | 15 +++++++++++++++ chimera/MainController.mm | 15 +++++++++++++++ chimera/src/application/MainController.mm | 15 +++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/camino/MainController.mm b/camino/MainController.mm index 4011ed5ea33a..e3bf63333738 100644 --- a/camino/MainController.mm +++ b/camino/MainController.mm @@ -292,6 +292,21 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; { // IE favorites: ~/Library/Preferences/Explorer/Favorites.html // Omniweb favorites: ~/Library/Application Support/Omniweb/Bookmarks.html + // For now, open the panel to IE's favorites. + NSOpenPanel* openPanel = [[NSOpenPanel alloc] init]; + [openPanel setCanChooseFiles: YES]; + [openPanel setCanChooseDirectories: NO]; + [openPanel setAllowsMultipleSelection: NO]; + NSArray* array = [NSArray arrayWithObjects: @"htm",@"html",@"xml", nil]; + int result = [openPanel runModalForDirectory: @"~/Library/Preferences/Explorer/" + file: @"Favorites.html" + types: array]; + if (result == NSOKButton) { + NSArray* urlArray = [openPanel URLs]; + if ([urlArray count] == 0) + return; + NSURL* url = [urlArray objectAtIndex: 0]; + } } -(IBAction) addBookmark:(id)aSender diff --git a/camino/src/application/MainController.mm b/camino/src/application/MainController.mm index 4011ed5ea33a..e3bf63333738 100644 --- a/camino/src/application/MainController.mm +++ b/camino/src/application/MainController.mm @@ -292,6 +292,21 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; { // IE favorites: ~/Library/Preferences/Explorer/Favorites.html // Omniweb favorites: ~/Library/Application Support/Omniweb/Bookmarks.html + // For now, open the panel to IE's favorites. + NSOpenPanel* openPanel = [[NSOpenPanel alloc] init]; + [openPanel setCanChooseFiles: YES]; + [openPanel setCanChooseDirectories: NO]; + [openPanel setAllowsMultipleSelection: NO]; + NSArray* array = [NSArray arrayWithObjects: @"htm",@"html",@"xml", nil]; + int result = [openPanel runModalForDirectory: @"~/Library/Preferences/Explorer/" + file: @"Favorites.html" + types: array]; + if (result == NSOKButton) { + NSArray* urlArray = [openPanel URLs]; + if ([urlArray count] == 0) + return; + NSURL* url = [urlArray objectAtIndex: 0]; + } } -(IBAction) addBookmark:(id)aSender diff --git a/chimera/MainController.mm b/chimera/MainController.mm index 4011ed5ea33a..e3bf63333738 100644 --- a/chimera/MainController.mm +++ b/chimera/MainController.mm @@ -292,6 +292,21 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; { // IE favorites: ~/Library/Preferences/Explorer/Favorites.html // Omniweb favorites: ~/Library/Application Support/Omniweb/Bookmarks.html + // For now, open the panel to IE's favorites. + NSOpenPanel* openPanel = [[NSOpenPanel alloc] init]; + [openPanel setCanChooseFiles: YES]; + [openPanel setCanChooseDirectories: NO]; + [openPanel setAllowsMultipleSelection: NO]; + NSArray* array = [NSArray arrayWithObjects: @"htm",@"html",@"xml", nil]; + int result = [openPanel runModalForDirectory: @"~/Library/Preferences/Explorer/" + file: @"Favorites.html" + types: array]; + if (result == NSOKButton) { + NSArray* urlArray = [openPanel URLs]; + if ([urlArray count] == 0) + return; + NSURL* url = [urlArray objectAtIndex: 0]; + } } -(IBAction) addBookmark:(id)aSender diff --git a/chimera/src/application/MainController.mm b/chimera/src/application/MainController.mm index 4011ed5ea33a..e3bf63333738 100644 --- a/chimera/src/application/MainController.mm +++ b/chimera/src/application/MainController.mm @@ -292,6 +292,21 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1"; { // IE favorites: ~/Library/Preferences/Explorer/Favorites.html // Omniweb favorites: ~/Library/Application Support/Omniweb/Bookmarks.html + // For now, open the panel to IE's favorites. + NSOpenPanel* openPanel = [[NSOpenPanel alloc] init]; + [openPanel setCanChooseFiles: YES]; + [openPanel setCanChooseDirectories: NO]; + [openPanel setAllowsMultipleSelection: NO]; + NSArray* array = [NSArray arrayWithObjects: @"htm",@"html",@"xml", nil]; + int result = [openPanel runModalForDirectory: @"~/Library/Preferences/Explorer/" + file: @"Favorites.html" + types: array]; + if (result == NSOKButton) { + NSArray* urlArray = [openPanel URLs]; + if ([urlArray count] == 0) + return; + NSURL* url = [urlArray objectAtIndex: 0]; + } } -(IBAction) addBookmark:(id)aSender