diff -r 000000000000 -r 1450b09d0cfd ginebra/chrome/bedrockchrome/contextmenu.snippet/contextmenubg.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ginebra/chrome/bedrockchrome/contextmenu.snippet/contextmenubg.js Tue May 04 12:39:35 2010 +0300 @@ -0,0 +1,63 @@ +function printProp(x) { + window.chrome.alert(x + ":"); + for (property in x) { + window.chrome.alert(property + ": " + x[property]); + } +} + +window.webView.contextEvent.connect( + function(e) { + window.chrome.alert("web context22222222222: " + e + " " + e.pos.x); + window.snippets.ContextMenuBgId.show(); + } +); + +window.historyView.contextEvent.connect( + function(e) { + window.chrome.alert("history context: " + e + " " + e.itemIndex + + " x=" + e.pos.x + " y=" + e.pos.y); + printProp(e); + } +); + +window.chrome.loadComplete.connect( + +); + +function ContextMenuBg() +{ + // attach internal funcs + this.write = writeContextMenuBg; + + // do setup + this.write(); +} + +function goToRecentUrlView () { + window.viewStack.switchView("bookmarkHistoryView", "webView"); + } + +function goToBookmarkView () { + window.viewStack.switchView("bookmarkTreeView", "webView"); + } + +// "Private" methods +function writeContextMenuBg() { + var html = + '