Skip to content

Commit

Permalink
1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
p1usminus authored May 14, 2019
1 parent 7d3c1ae commit 315f44a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
14 changes: 13 additions & 1 deletion src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ let options = {
let man = `
overlay chrome://browser/content/browser.xul chrome://roomybookmarkstoolbar/content/overlay.xul
overlay chrome://navigator/content/navigator.xul chrome://roomybookmarkstoolbar/content/overlay.xul
style chrome://global/content/customizeToolbar.xul chrome://roomybookmarkstoolbar/skin/css/button.css
`;

function showRestartNotifcation(verb, window) {
Expand Down Expand Up @@ -62,6 +61,17 @@ function startup(data, reason) {
Components.utils.import("chrome://roomybookmarkstoolbar/content/Overlays.jsm");
Components.utils.import("resource:///modules/CustomizableUI.jsm");

// Create toolbar icon here
var button_label = "Show bookmarks toolbar";

CustomizableUI.createWidget(
{ id : "rbtlibbutton",
defaultArea : CustomizableUI.AREA_NAVBAR,
label : button_label,
tooltiptext : button_label,
//onCommand : roomybookmarkstoolbar.hideBookmarksBar();
});

const window = Services.wm.getMostRecentWindow('navigator:browser');
if (reason === ADDON_UPGRADE || reason === ADDON_DOWNGRADE) {
showRestartNotifcation("upgraded", window);
Expand Down Expand Up @@ -110,4 +120,6 @@ function shutdown(data, reason) {
showRestartNotifcation("uninstalled", window);
return;
}

CustomizableUI.destroyWidget("rbtlibbutton");
}
11 changes: 6 additions & 5 deletions src/content/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
roomybookmarkstoolbar.visible = true;
roomybookmarkstoolbar.setVisibly();
}
} else { //Hide bookmarks bar after fast mouse out(event not catched)
} else { //Hide bookmarks bar after fast mouse out (event not caught)
this.timeOutHide = setTimeout(roomybookmarkstoolbar.setVisibly, 700);
}
}
Expand All @@ -95,13 +95,13 @@
if(e.relatedTarget) {
var target = e.relatedTarget;
while(target) { //Get all parents of target element
if(target == toolbox) { //Check parent == toobox, if true- mouse out not happaned
if(target == toolbox) { //Check parent == toolbox, if true - mouse out not happaned
return;
}
if (target.class == 'anonymous-div') {
return;
}
target = target.parentNode; //Get nex parent
target = target.parentNode; //Get next parent
}
}
roomybookmarkstoolbar.hovered = false;
Expand All @@ -124,7 +124,7 @@
roomybookmarkstoolbar.hideHandler();
},

onMouseOverFix: function(e) { //Fix problem with wrong hide, when enabled menu\nav bar\ tabs
onMouseOverFix: function(e) { //Fix problem with wrong hide, when enabled menu\nav bar\tabs
if (this.timeOutHide) {
clearTimeout(this.timeOutHide);
}
Expand Down Expand Up @@ -330,7 +330,7 @@
var opacityTime = this.branch.getIntPref('opacityTime');
var opacityTimeLong = this.branch.getIntPref('opacityTimeLong');
var userWidth = this.branch.getIntPref('userWidth');
if (userWidth < iconSize) { var userWidth = iconSize }; //We not can set 0px as width(bookmarks bar will collapse)
if (userWidth < iconSize) { var userWidth = iconSize }; //We cannot set 0px as width (bookmarks bar will collapse)

if(this.cssStr !== 'null') {
this.styleService('string', this.cssStr, true)
Expand Down Expand Up @@ -460,6 +460,7 @@
}

this.styleService('file', 'main');
this.styleService('file', 'button');

if (hideFoldersNames) { this.styleService('file', 'hideFoldersNames');}
if (hideNoFaviconNames) {this.styleService('file', 'hideNoFaviconNames');}
Expand Down
4 changes: 2 additions & 2 deletions src/content/overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://roomybookmarkstoolbar/content/overlay.js"/>

<toolbarpalette id="BrowserToolbarPalette">
<!--<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="rbtlibbutton"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&roomybookmarkstoolbar.overlay.button.label;"
tooltiptext="&roomybookmarkstoolbar.overlay.button.label;"
oncommand="roomybookmarkstoolbar.hideBookmarksBar();"/>
</toolbarpalette>
<!--<menupopup id="placesContext">
<menupopup id="placesContext">
<menuseparator id="rbtSeparator"
insertafter="placesContext_delete"/>
<menuitem id="rbtChangeColor"
Expand Down
2 changes: 1 addition & 1 deletion src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<em:multiprocessCompatible>true</em:multiprocessCompatible>
<em:name>Roomy Bookmarks Toolbar redux</em:name>
<em:description>Make your bookmarks bar better. Customise your bookmarks bar using one add-on.</em:description>
<em:version>1.5.1</em:version>
<em:version>1.5.2</em:version>
<em:creator>Someone free</em:creator>
<em:contributor>Users, contributors and testers</em:contributor>
<em:contributor>Grzglo</em:contributor>
Expand Down

0 comments on commit 315f44a

Please sign in to comment.