1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-20 15:21:30 +02:00

Allow :dpopen/:dpclose to operate on the main service pane.

This commit is contained in:
Doug Kearns
2009-04-03 00:53:09 +11:00
parent a5e62a9bcf
commit 0bbead8d2f
2 changed files with 31 additions and 10 deletions
+22 -1
View File
@@ -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);
+2 -2
View File
@@ -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: