Implement copy link location from brade (bug 150827)

This commit is contained in:
pinkerton%netscape.com 2002-06-12 13:47:48 +00:00
Родитель b45bad8884
Коммит 3aee9ab644
4 изменённых файлов: 52 добавлений и 4 удалений

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

@ -57,6 +57,10 @@
#include "nsIWebProgressListener.h"
#include "nsIWebBrowserChrome.h"
#include "nsIClipboardCommands.h"
#include "nsIWebBrowser.h"
#include "nsIInterfaceRequestorUtils.h"
static NSString *BrowserToolbarIdentifier = @"Browser Window Toolbar";
static NSString *BackToolbarItemIdentifier = @"Back Toolbar Item";
static NSString *ForwardToolbarItemIdentifier = @"Forward Toolbar Item";
@ -1059,7 +1063,15 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
- (IBAction)copyLinkLocation:(id)aSender
{
NSLog(@"Copy Link Location not yet implemented");
CHBrowserView* view = [[self getBrowserWrapper] getBrowserView];
if (!view) return;
nsCOMPtr<nsIWebBrowser> webBrowser = getter_AddRefs([view getWebBrowser]);
if (!webBrowser) return;
nsCOMPtr<nsIClipboardCommands> clipboard(do_GetInterface(webBrowser));
if (clipboard)
clipboard->CopyLinkLocation();
}

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

@ -57,6 +57,10 @@
#include "nsIWebProgressListener.h"
#include "nsIWebBrowserChrome.h"
#include "nsIClipboardCommands.h"
#include "nsIWebBrowser.h"
#include "nsIInterfaceRequestorUtils.h"
static NSString *BrowserToolbarIdentifier = @"Browser Window Toolbar";
static NSString *BackToolbarItemIdentifier = @"Back Toolbar Item";
static NSString *ForwardToolbarItemIdentifier = @"Forward Toolbar Item";
@ -1059,7 +1063,15 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
- (IBAction)copyLinkLocation:(id)aSender
{
NSLog(@"Copy Link Location not yet implemented");
CHBrowserView* view = [[self getBrowserWrapper] getBrowserView];
if (!view) return;
nsCOMPtr<nsIWebBrowser> webBrowser = getter_AddRefs([view getWebBrowser]);
if (!webBrowser) return;
nsCOMPtr<nsIClipboardCommands> clipboard(do_GetInterface(webBrowser));
if (clipboard)
clipboard->CopyLinkLocation();
}

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

@ -57,6 +57,10 @@
#include "nsIWebProgressListener.h"
#include "nsIWebBrowserChrome.h"
#include "nsIClipboardCommands.h"
#include "nsIWebBrowser.h"
#include "nsIInterfaceRequestorUtils.h"
static NSString *BrowserToolbarIdentifier = @"Browser Window Toolbar";
static NSString *BackToolbarItemIdentifier = @"Back Toolbar Item";
static NSString *ForwardToolbarItemIdentifier = @"Forward Toolbar Item";
@ -1059,7 +1063,15 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
- (IBAction)copyLinkLocation:(id)aSender
{
NSLog(@"Copy Link Location not yet implemented");
CHBrowserView* view = [[self getBrowserWrapper] getBrowserView];
if (!view) return;
nsCOMPtr<nsIWebBrowser> webBrowser = getter_AddRefs([view getWebBrowser]);
if (!webBrowser) return;
nsCOMPtr<nsIClipboardCommands> clipboard(do_GetInterface(webBrowser));
if (clipboard)
clipboard->CopyLinkLocation();
}

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

@ -57,6 +57,10 @@
#include "nsIWebProgressListener.h"
#include "nsIWebBrowserChrome.h"
#include "nsIClipboardCommands.h"
#include "nsIWebBrowser.h"
#include "nsIInterfaceRequestorUtils.h"
static NSString *BrowserToolbarIdentifier = @"Browser Window Toolbar";
static NSString *BackToolbarItemIdentifier = @"Back Toolbar Item";
static NSString *ForwardToolbarItemIdentifier = @"Forward Toolbar Item";
@ -1059,7 +1063,15 @@ static NSString *PrintToolbarItemIdentifier = @"Print Toolbar Item";
- (IBAction)copyLinkLocation:(id)aSender
{
NSLog(@"Copy Link Location not yet implemented");
CHBrowserView* view = [[self getBrowserWrapper] getBrowserView];
if (!view) return;
nsCOMPtr<nsIWebBrowser> webBrowser = getter_AddRefs([view getWebBrowser]);
if (!webBrowser) return;
nsCOMPtr<nsIClipboardCommands> clipboard(do_GetInterface(webBrowser));
if (clipboard)
clipboard->CopyLinkLocation();
}