mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-21 04:01:29 +02:00
Allow :dpopen/:dpclose to operate on the main service pane.
This commit is contained in:
@@ -204,7 +204,18 @@ const config = { //{{{
|
||||
liberator.open(pre + newNumberStr + post);
|
||||
}
|
||||
|
||||
function showServicePane(value)
|
||||
{
|
||||
const key = "splitter.servicepane_splitter.was_collapsed";
|
||||
gServicePane.open = value;
|
||||
SBDataSetBoolValue(key, gServicePane.open);
|
||||
}
|
||||
|
||||
function openDisplayPane(id)
|
||||
{
|
||||
if (id == "servicepane")
|
||||
showServicePane(true);
|
||||
else
|
||||
{
|
||||
let pane = document.getElementById(id);
|
||||
let manager = Components.classes['@songbirdnest.com/Songbird/DisplayPane/Manager;1']
|
||||
@@ -216,9 +227,19 @@ const config = { //{{{
|
||||
|
||||
pane.loadContent(paneinfo);
|
||||
}
|
||||
}
|
||||
|
||||
function closeDisplayPane(id)
|
||||
{
|
||||
if (id == "servicepane")
|
||||
showServicePane(false);
|
||||
else
|
||||
document.getElementById(id).hide();
|
||||
}
|
||||
|
||||
// FIXME: best way to format these args? Hyphenated? One word like :dialog?
|
||||
let displayPanes = {
|
||||
"service pane left": "servicepane",
|
||||
"content pane bottom": "displaypane_contentpane_bottom",
|
||||
"service pane bottom": "displaypane_servicepane_bottom",
|
||||
"right sidebar": "displaypane_right_sidebar"
|
||||
@@ -454,7 +475,7 @@ const config = { //{{{
|
||||
let arg = args.literalArg;
|
||||
|
||||
if (arg in displayPanes)
|
||||
document.getElementById(displayPanes[arg]).hide();
|
||||
closeDisplayPane(displayPanes[arg]);
|
||||
else
|
||||
liberator.echoerr("E475: Invalid argument: " + arg);
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ ________________________________________________________________________________
|
||||
|:dpope| |:dpopen| |:dp| |:dpane| |:dislplayp| |:dislplaypane|
|
||||
||:displaypane {pane}|| +
|
||||
________________________________________________________________________________
|
||||
Open the specified display pane. {pane} is any of "content pane bottom",
|
||||
"service pane bottom" or "right sidebar".
|
||||
Open the specified display pane. {pane} is any of "service pane left", "service
|
||||
pane bottom", "content pane bottom" or "right sidebar".
|
||||
________________________________________________________________________________
|
||||
|
||||
// vim: set filetype=asciidoc:
|
||||
|
||||
Reference in New Issue
Block a user