NonAutohide v2.14 - Fast Dial
Mafia_Penguin Sat, 11/01/2008 - 20:14
Not exactly a style, but closer than any other area. If this is a bad place to post this, then contact an admin.
This may not work with some themes!
Thanks to PedroMRP for the fix!
How to disable the autohide of the toolbars:
A, Replace overlay.xul (in your profile folder->extensions->fastdial@telega.phpnet.us->chrome->content) with THIS.
Or, if you don't trust me (; then do this:
B, Open overlay.xul (in your profile folder->extensions->fastdial@telega.phpnet.us->chrome->content)
and replace ALL OF IT with this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://fastdial/skin/toolbar.css" type="text/css"?>
currentTime) continue;
FdSnapshot.create(item, items[item.folderId]);
}
setTimeout(Fd.autoRefresh, 60 * 1000);
},
setAsHome: function() {
var menupopup = document.popupNode.firstChild;
if (menupopup._resultNode) {
FdBookmark.setRoot(menupopup._resultNode.itemId);
}
},
populateFoldersMenu: function(menupopup, onCommand) {
FdDom.clear(menupopup);
var bookmarks = FdBookmark.getBookmarks("BOOKMARKS_MENU").concat(
FdBookmark.getBookmarks("TOOLBAR"));
for(var i in bookmarks) {
var bookmark = bookmarks[i];
if (bookmark.isFolder) {
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", bookmark.title);
menuitem.setAttribute("oncommand", onCommand(bookmark));
menupopup.appendChild(menuitem);
}
}
},
populateAddMenu: function() {
var menupopup = FdDom.get("fd-add-menu").firstChild;
Fd.populateFoldersMenu(menupopup,
function(bookmark) {
return "Fd.addPage(" + bookmark.id + ");";
});
},
populateOpenMenu: function() {
var menupopup = FdDom.get("fd-button").firstChild;
Fd.populateFoldersMenu(menupopup,
function(bookmark) {
return "FdUtils.openLink('" + bookmark.url + "');";
});
if (menupopup.childNodes.length > 0) {
var separator = document.createElement("menuseparator");
menupopup.appendChild(separator);
}
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", FdBundle.getString("preferences"));
menuitem.setAttribute("oncommand", "Fd.openPreferences();");
menupopup.appendChild(menuitem);
},
populateLinkMenu: function() {
var menupopup = FdDom.get("fd-add-link").firstChild;
Fd.populateFoldersMenu(menupopup);
},
populateSearchMenu: function() {
var menupopup = FdDom.get("fd-search-menu");
FdDom.clear(menupopup);
var searchService = Components.classes["@mozilla.org/browser/search-service;1"]
.getService(Components.interfaces.nsIBrowserSearchService);
var engines = searchService.getEngines({});
for(var i in engines) {
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("class", "menuitem-iconic");
menuitem.setAttribute("label", engines[i].name);
menuitem.setAttribute("image", engines[i].iconURI.spec);
menupopup.appendChild(menuitem);
}
},
setSearchEngine: function(menuitem) {
var uri = menuitem.getAttribute("image");
var searchService = Components.classes["@mozilla.org/browser/search-service;1"]
.getService(Components.interfaces.nsIBrowserSearchService);
var engines = searchService.getEngines({});
for(var i in engines) {
if (engines[i].iconURI.spec == uri) {
searchService.currentEngine = engines[i];
}
}
var wnd = content.wrappedJSObject;
if (wnd.FdDom) {
var search = wnd.FdDom.get("search");
var searchIcon = wnd.FdDom.child(search, "img");
searchIcon.src = uri;
}
},
addPage: function(folderId) {
var item = {
url: content.location.href,
title: content.document.title,
folderId: folderId,
index: -1
}
FdBookmark.saveBookmark(item);
var message = FdBundle.getString("pageAdded");
FdUtils.popup(message);
},
export: function() {
var file = FdFile.chooseFile("save", ["*.json"]);
if (!file) return;
var menupopup = document.popupNode.firstChild;
if (menupopup._resultNode) {
var rootId = menupopup._resultNode.itemId;
var root = FdStorage.getItem(rootId);
var folder, folders = [ root ];
while(folder = folders.shift()) {
var items = FdStorage.getItems(folder.id);
folder.items = items;
for(var i in items) {
if (items[i].isFolder) folders.push(items[i]);
}
}
FdFile.writeFile(file, FdUtils.toJSON(root), true);
}
},
import: function() {
var file = FdFile.chooseFile("open", ["*.json"]);
if (!file) return;
var data = FdFile.readFile(file);
var root = eval(data.value);
var translatedIds = [];
var folders = [ FdUtils.clone(root) ];
var id = root.id;
var menuitem = document.popupNode;
root.folderId = menuitem.node.parent.itemId;
delete root.id;
delete root.items;
FdStorage.saveItem(root);
translatedIds[id] = root.id;
var folder;
while(folder = folders.shift()) {
var items = folder.items;
for(var i in items) {
var item = items[i];
if (item.isFolder) folders.push(FdUtils.clone(item));
var id = item.id;
item.folderId = translatedIds[folder.id];
delete item.id;
delete item.items;
FdStorage.saveItem(item);
translatedIds[id] = item.id;
}
}
}
}
FdLegacy.migrate();
setTimeout(Fd.autoRefresh, 3 * 1000);
addEventListener("load", Fd.initialize, false);
]]>
To undo this fix, simply reinstall Fast Dial 2.14.
That will not get rid of your logos.
Re: Disable Autohide in v2.14
Submitted by chiaroscuro on Sat, 11/01/2008 - 21:16@Mafia_Penguin
I am a little unclear as to why the settings in your post differ from those recommended in PedroMRP's fix in his post here
showNavBar: function() {
FdDom.get("fd-toolbar").collapsed = true;
FdDom.get("toolbar-menubar").collapsed = false;
FdDom.get("nav-bar").collapsed = true;
},
hideNavBar: function() {
FdDom.get("fd-toolbar").collapsed = true;
FdDom.get("toolbar-menubar").collapsed = false;
FdDom.get("nav-bar").collapsed = true;
},
Re: NonAutohide
Submitted by Mafia_Penguin on Sun, 11/02/2008 - 01:39Here?
showNavBar: function() {
FdDom.get("fd-toolbar").collapsed = true;
FdDom.get("toolbar-menubar").collapsed = false;
FdDom.get("nav-bar").collapsed = false;
},
Notice how the nav-bar is not collapsed...
Let me see if I made a mistake...
-----------------------------------------
Re: NonAutohide
Submitted by chiaroscuro on Sun, 11/02/2008 - 01:41Here?
Yes those lines and the four lines below.
Both are different from PedroMRPs post.
Re: NonAutohide
Submitted by Mafia_Penguin on Sun, 11/02/2008 - 01:45Hmmm....
My navigation bar disappears when I do it pedroMRP's way...
-----------------------------------------
Re: NonAutohide
Submitted by Mafia_Penguin on Sun, 11/02/2008 - 01:49Aha!
It depends on your theme!
Odd....
-----------------------------------------
Re: NonAutohide
Submitted by Mafia_Penguin on Sun, 11/02/2008 - 01:51It simply is not there...
so no, it does not work on the theme I use...
-----------------------------------------
Re: NonAutohide
Submitted by chiaroscuro on Sun, 11/02/2008 - 01:56Mafia_Penguin
If I remember correctly you first made an FD Version using the 2.11 code.
Then PedroMRP came up with a modification of the 2.14 code.
It seems odd that you are now encountering problems.
Did you not try PedroMRPs fix successfully before ?
Re: NonAutohide
Submitted by Mafia_Penguin on Sun, 11/02/2008 - 02:01I edited it before I loaded it....
I'll post PedroMRP's code (for default theme) and post a warning about it not working with some themes.
-----------------------------------------
Re: NonAutohide
Submitted by chiaroscuro on Sun, 11/02/2008 - 02:06I'll post PedroMRP's code (for default theme) and post a warning about it not working with some themes.
Mmm
Sounds like a good idea
Re: NonAutohide
Submitted by chiaroscuro on Sun, 11/02/2008 - 03:58Mafia_Penguin
---
Please look at this post of Mafi0z here
---
This is getting confusing
---
It would seem that Mafi0z and maybe you too Mafia_Penguin, are in fact using a modification to the code that differs from the fix originally suggested by PedroMRP.
---
I wonder from where this other Version originates...
Pages