mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 18:24:11 +01:00
Don't use a popuppanel for the visual bell if possible.
Update issue #125 This should no longer be a problem after tonight's nightly on Firefox 4.
This commit is contained in:
@@ -38,7 +38,7 @@ const Bookmarks = Module("bookmarks", {
|
||||
|
||||
try {
|
||||
let uri = util.createURI(url);
|
||||
if (!force && bookmarks.isBookmarked(uri.spec))
|
||||
if (!force && this.isBookmarked(uri.spec))
|
||||
for (let bmark in bookmarkcache)
|
||||
if (bmark.url == uri.spec) {
|
||||
var id = bmark.id;
|
||||
|
||||
@@ -139,16 +139,24 @@ const Dactyl = Module("dactyl", {
|
||||
beep: requiresMainThread(function () {
|
||||
if (options["visualbell"]) {
|
||||
// flash the visual bell
|
||||
let popup = document.getElementById("dactyl-visualbell");
|
||||
let win = config.visualbellWindow;
|
||||
let rect = win.getBoundingClientRect();
|
||||
let width = rect.right - rect.left;
|
||||
let height = rect.bottom - rect.top;
|
||||
let popup = document.getElementById("dactyl-deck-bell");
|
||||
if (popup) {
|
||||
let restore = popup.parentNode.selectedPanel;
|
||||
popup.parentNode.selectedPanel = popup;
|
||||
util.timeout(function () { popup.parentNode.selectedPanel = restore; }, 20);
|
||||
}
|
||||
else {
|
||||
popup = document.getElementById("dactyl-popup-bell");
|
||||
let win = config.visualbellWindow;
|
||||
let rect = win.getBoundingClientRect();
|
||||
let width = rect.right - rect.left;
|
||||
let height = rect.bottom - rect.top;
|
||||
|
||||
// NOTE: this doesn't seem to work in FF3 with full box dimensions
|
||||
popup.openPopup(win, "overlap", 1, 1, false, false);
|
||||
popup.sizeTo(width - 2, height - 2);
|
||||
util.timeout(function () { popup.hidePopup(); }, 20);
|
||||
// NOTE: this doesn't seem to work in FF3 with full box dimensions
|
||||
popup.openPopup(win, "overlap", 1, 1, false, false);
|
||||
popup.sizeTo(width - 2, height - 2);
|
||||
util.timeout(function () { popup.hidePopup(); }, 20);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<window id="&dactyl.mainWindow;">
|
||||
|
||||
<popupset>
|
||||
<panel id="dactyl-visualbell" dactyl:highlight="Bell"
|
||||
<panel id="dactyl-popup-bell" dactyl:highlight="Bell"
|
||||
noautohide="true" noautofocus="true"/>
|
||||
|
||||
<menupopup id="dactyl-contextmenu"
|
||||
@@ -54,6 +54,10 @@
|
||||
oncommandupdate="&events;.onSelectionChange(event);"/>
|
||||
</window>
|
||||
|
||||
<deck id="tab-view-deck">
|
||||
<vbox id="dactyl-deck-bell" dactyl:highlight="Bell"/>
|
||||
</deck>
|
||||
|
||||
<vbox id="&dactyl.commandContainer;">
|
||||
|
||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||
|
||||
Reference in New Issue
Block a user