From a3037fbc36a341dd7be8bcb143e233ee0a8a1bb4 Mon Sep 17 00:00:00 2001 From: "steffen.wilberg%web.de" Date: Sun, 15 Aug 2004 13:15:35 +0000 Subject: [PATCH] Bug 250974: dragging a link over the Downloads or Go button should display a statusbar message. r=mconnor --- browser/base/content/browser.js | 12 ++++++++++++ .../locales/en-US/chrome/browser/browser.properties | 2 ++ 2 files changed, 14 insertions(+) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index b5d382e09ede..2f0c8b946e24 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1919,11 +1919,15 @@ function openHomeDialog(aURL) var goButtonObserver = { onDragOver: function(aEvent, aFlavour, aDragSession) { + var statusTextFld = document.getElementById("statusbar-display"); + statusTextFld.label = gNavigatorBundle.getString("dropongobutton"); aEvent.target.setAttribute("dragover", "true"); return true; }, onDragExit: function (aEvent, aDragSession) { + var statusTextFld = document.getElementById("statusbar-display"); + statusTextFld.label = ""; aEvent.target.removeAttribute("dragover"); }, onDrop: function (aEvent, aXferData, aDragSession) @@ -1948,10 +1952,18 @@ var DownloadsButtonDNDObserver = { // nsDragAndDrop onDragOver: function (aEvent, aFlavour, aDragSession) { + var statusTextFld = document.getElementById("statusbar-display"); + statusTextFld.label = gNavigatorBundle.getString("dropondownloadsbutton"); aDragSession.canDrop = (aFlavour.contentType == "text/x-moz-url" || aFlavour.contentType == "text/unicode"); }, + onDragExit: function (aEvent, aDragSession) + { + var statusTextFld = document.getElementById("statusbar-display"); + statusTextFld.label = ""; + }, + onDrop: function (aEvent, aXferData, aDragSession) { var split = aXferData.data.split("\n"); diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index f72cc3271841..ce680e65b39f 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -4,6 +4,8 @@ nv_stopped=Stopped openFile=Open File defaultStatus= +dropondownloadsbutton=Drop a link or file to download it +dropongobutton=Drop a link or file to open it droponhomebutton=Drop a link or file to make it your home page droponhometitle=Set Home Page droponhomemsg=Do you want this document to be your new home page?