mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 08:07:30 +09:00
Add an Add-ons shortcut in about:preferences
This commit is contained in:
parent
307ed3953e
commit
ea3e76e55c
4 changed files with 35 additions and 2 deletions
|
|
@ -193,6 +193,18 @@ function helpButtonCommand() {
|
||||||
openHelpLink(helpTopic);
|
openHelpLink(helpTopic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openAddonsSidebarLink(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
if (window.top && typeof window.top.BrowserOpenAddonsMgr == "function") {
|
||||||
|
window.top.BrowserOpenAddonsMgr();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
openUILinkIn("about:addons", "tab");
|
||||||
|
}
|
||||||
|
|
||||||
function friendlyPrefCategoryNameToInternalName(aName) {
|
function friendlyPrefCategoryNameToInternalName(aName) {
|
||||||
if (aName.startsWith("pane"))
|
if (aName.startsWith("pane"))
|
||||||
return aName;
|
return aName;
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,8 @@
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
|
|
||||||
<!-- category list -->
|
<!-- category list -->
|
||||||
<richlistbox id="categories">
|
<vbox id="preferences-sidebar">
|
||||||
|
<richlistbox id="categories" flex="1">
|
||||||
<richlistitem id="category-general"
|
<richlistitem id="category-general"
|
||||||
class="category"
|
class="category"
|
||||||
value="paneGeneral"
|
value="paneGeneral"
|
||||||
|
|
@ -176,6 +177,13 @@
|
||||||
<label class="category-name" flex="1">&paneAdvanced.title;</label>
|
<label class="category-name" flex="1">&paneAdvanced.title;</label>
|
||||||
</richlistitem>
|
</richlistitem>
|
||||||
</richlistbox>
|
</richlistbox>
|
||||||
|
<hbox id="preferences-sidebar-footer" align="center">
|
||||||
|
<label id="sidebar-open-addons"
|
||||||
|
class="text-link"
|
||||||
|
value="&openAddonsSidebar.label;"
|
||||||
|
onclick="openAddonsSidebarLink(event);"/>
|
||||||
|
</hbox>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
<keyset>
|
<keyset>
|
||||||
<!-- Disable the findbar because it doesn't work properly.
|
<!-- Disable the findbar because it doesn't work properly.
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
<!ENTITY paneContainers.title "Container Tabs">
|
<!ENTITY paneContainers.title "Container Tabs">
|
||||||
<!ENTITY paneSecurity.title "Security">
|
<!ENTITY paneSecurity.title "Security">
|
||||||
<!ENTITY paneAdvanced.title "Advanced">
|
<!ENTITY paneAdvanced.title "Advanced">
|
||||||
|
<!ENTITY openAddonsSidebar.label "Add-ons">
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (paneSync.title): This should match syncBrand.shortName.label in ../syncBrand.dtd -->
|
<!-- LOCALIZATION NOTE (paneSync.title): This should match syncBrand.shortName.label in ../syncBrand.dtd -->
|
||||||
<!ENTITY paneSync.title "Sync">
|
<!ENTITY paneSync.title "Sync">
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,26 @@ treecol {
|
||||||
|
|
||||||
/* Category List */
|
/* Category List */
|
||||||
|
|
||||||
#categories {
|
#preferences-sidebar {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#categories {
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
#categories > scrollbox {
|
#categories > scrollbox {
|
||||||
overflow-x: hidden !important;
|
overflow-x: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preferences-sidebar-footer {
|
||||||
|
padding: 8px 15px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-open-addons {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We want the last category to always have non-0 getBoundingClientRect().bottom
|
* We want the last category to always have non-0 getBoundingClientRect().bottom
|
||||||
* so we can use the value to figure out the max-height of the list in
|
* so we can use the value to figure out the max-height of the list in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue