mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 02:17:59 +01:00
removed buffer window
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,6 +1,7 @@
|
|||||||
<pre>
|
<pre>
|
||||||
2008-06-xx:
|
2008-06-xx:
|
||||||
* version 1.2
|
* version 1.2
|
||||||
|
* renamed some :autocmd, mainly BrowserStartup -> Startup and BrowserExit -> Quit
|
||||||
* don't pass any ctrl- or alt- prefixed keys to firefox in insert mode
|
* don't pass any ctrl- or alt- prefixed keys to firefox in insert mode
|
||||||
* keywords in :open <arg> have higher priority than local files now
|
* keywords in :open <arg> have higher priority than local files now
|
||||||
* add :set online to control the "work offline" menu item
|
* add :set online to control the "work offline" menu item
|
||||||
|
|||||||
@@ -873,18 +873,6 @@ liberator.Buffer = function () //{{{
|
|||||||
setTimeout(function () { doc.body.removeChild(indicator); }, 500);
|
setTimeout(function () { doc.body.removeChild(indicator); }, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
// XXX: probably remove this method/functionality
|
|
||||||
// updates the buffer preview in place only if list is visible
|
|
||||||
updateBufferList: function ()
|
|
||||||
{
|
|
||||||
if (!liberator.bufferwindow.visible())
|
|
||||||
return;
|
|
||||||
|
|
||||||
var items = liberator.completion.buffer("")[1];
|
|
||||||
liberator.bufferwindow.show(items);
|
|
||||||
liberator.bufferwindow.selectItem(getBrowser().mTabContainer.selectedIndex);
|
|
||||||
},
|
|
||||||
|
|
||||||
zoomIn: function (steps, fullZoom)
|
zoomIn: function (steps, fullZoom)
|
||||||
{
|
{
|
||||||
bumpZoomLevel(steps, fullZoom);
|
bumpZoomLevel(steps, fullZoom);
|
||||||
|
|||||||
@@ -244,17 +244,14 @@ liberator.Events = function () //{{{
|
|||||||
tabcontainer.addEventListener("TabMove", function (event)
|
tabcontainer.addEventListener("TabMove", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabOpen", function (event)
|
tabcontainer.addEventListener("TabOpen", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabClose", function (event)
|
tabcontainer.addEventListener("TabClose", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabSelect", function (event)
|
tabcontainer.addEventListener("TabSelect", function (event)
|
||||||
{
|
{
|
||||||
@@ -263,7 +260,6 @@ liberator.Events = function () //{{{
|
|||||||
liberator.commandline.clear();
|
liberator.commandline.clear();
|
||||||
liberator.modes.show();
|
liberator.modes.show();
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
|
||||||
liberator.tabs.updateSelectionHistory();
|
liberator.tabs.updateSelectionHistory();
|
||||||
|
|
||||||
setTimeout(function () { liberator.focusContent(true); }, 10); // just make sure, that no widget has focus
|
setTimeout(function () { liberator.focusContent(true); }, 10); // just make sure, that no widget has focus
|
||||||
@@ -449,7 +445,6 @@ liberator.Events = function () //{{{
|
|||||||
if (url && liberator.history)
|
if (url && liberator.history)
|
||||||
liberator.history.add(url, title);
|
liberator.history.add(url, title);
|
||||||
|
|
||||||
liberator.buffer.updateBufferList();
|
|
||||||
liberator.autocommands.trigger("PageLoad", url);
|
liberator.autocommands.trigger("PageLoad", url);
|
||||||
|
|
||||||
// mark the buffer as loaded, we can't use liberator.buffer.loaded
|
// mark the buffer as loaded, we can't use liberator.buffer.loaded
|
||||||
|
|||||||
@@ -810,7 +810,6 @@ const liberator = (function () //{{{
|
|||||||
log("commandline"); liberator.commandline = liberator.CommandLine();
|
log("commandline"); liberator.commandline = liberator.CommandLine();
|
||||||
log("search"); liberator.search = liberator.Search();
|
log("search"); liberator.search = liberator.Search();
|
||||||
log("preview window"); liberator.previewwindow = liberator.InformationList("liberator-previewwindow", { incrementalFill: false, maxItems: 10 });
|
log("preview window"); liberator.previewwindow = liberator.InformationList("liberator-previewwindow", { incrementalFill: false, maxItems: 10 });
|
||||||
log("buffer window"); liberator.bufferwindow = liberator.InformationList("liberator-bufferwindow", { incrementalFill: false, maxItems: 10 });
|
|
||||||
log("statusline"); liberator.statusline = liberator.StatusLine();
|
log("statusline"); liberator.statusline = liberator.StatusLine();
|
||||||
log("buffer"); liberator.buffer = liberator.Buffer();
|
log("buffer"); liberator.buffer = liberator.Buffer();
|
||||||
log("editor"); liberator.editor = liberator.Editor();
|
log("editor"); liberator.editor = liberator.Editor();
|
||||||
|
|||||||
@@ -91,16 +91,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
|||||||
</statusbar>
|
</statusbar>
|
||||||
|
|
||||||
<vbox id="liberator-container" hidden="false">
|
<vbox id="liberator-container" hidden="false">
|
||||||
<listbox id="liberator-bufferwindow" class="plain" rows="10" flex="1" hidden="true"
|
|
||||||
onclick= "liberator.bufferwindow.onEvent(event);"
|
|
||||||
ondblclick="liberator.bufferwindow.onEvent(event);"
|
|
||||||
onkeydown= "liberator.bufferwindow.onEvent(event);">
|
|
||||||
<listcols>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
</listcols>
|
|
||||||
</listbox>
|
|
||||||
|
|
||||||
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
||||||
onclick= "liberator.previewwindow.onEvent(event);"
|
onclick= "liberator.previewwindow.onEvent(event);"
|
||||||
ondblclick="liberator.previewwindow.onEvent(event);"
|
ondblclick="liberator.previewwindow.onEvent(event);"
|
||||||
|
|||||||
@@ -90,16 +90,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
|||||||
</statusbar>
|
</statusbar>
|
||||||
|
|
||||||
<vbox id="liberator-container" hidden="false">
|
<vbox id="liberator-container" hidden="false">
|
||||||
<listbox id="liberator-bufferwindow" class="plain" rows="10" flex="1" hidden="true"
|
|
||||||
onclick= "liberator.bufferwindow.onEvent(event);"
|
|
||||||
ondblclick="liberator.bufferwindow.onEvent(event);"
|
|
||||||
onkeydown= "liberator.bufferwindow.onEvent(event);">
|
|
||||||
<listcols>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
</listcols>
|
|
||||||
</listbox>
|
|
||||||
|
|
||||||
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
||||||
onclick= "liberator.previewwindow.onEvent(event);"
|
onclick= "liberator.previewwindow.onEvent(event);"
|
||||||
ondblclick="liberator.previewwindow.onEvent(event);"
|
ondblclick="liberator.previewwindow.onEvent(event);"
|
||||||
|
|||||||
@@ -515,51 +515,35 @@ liberator.Tabs = function () //{{{
|
|||||||
return getBrowser().mTabContainer.selectedItem;
|
return getBrowser().mTabContainer.selectedItem;
|
||||||
},
|
},
|
||||||
|
|
||||||
list: function (fullmode)
|
// TODO: shouldn't that have a filter argument?
|
||||||
|
list: function ()
|
||||||
{
|
{
|
||||||
if (fullmode)
|
// TODO: move this to liberator.tabs.get()
|
||||||
|
var items = liberator.completion.buffer("")[1];
|
||||||
|
var number, indicator, title, url;
|
||||||
|
|
||||||
|
var list = ":" + (liberator.util.escapeHTML(liberator.commandline.getCommand()) || "buffers") + "<br/>" + "<table>";
|
||||||
|
for (var i = 0; i < items.length; i++)
|
||||||
{
|
{
|
||||||
// toggle the special buffer preview window
|
if (i == liberator.tabs.index())
|
||||||
if (liberator.bufferwindow.visible())
|
indicator = " <span style=\"color: blue\">%</span> ";
|
||||||
{
|
else if (i == liberator.tabs.index(liberator.tabs.alternate))
|
||||||
liberator.bufferwindow.hide();
|
indicator = " <span style=\"color: blue\">#</span> ";
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
indicator = " ";
|
||||||
var items = liberator.completion.buffer("")[1];
|
|
||||||
liberator.bufferwindow.show(items);
|
[number, title] = items[i][0].split(/:\s+/, 2);
|
||||||
liberator.bufferwindow.selectItem(getBrowser().mTabContainer.selectedIndex);
|
url = items[i][1];
|
||||||
}
|
url = liberator.util.escapeHTML(url);
|
||||||
|
title = liberator.util.escapeHTML(title);
|
||||||
|
|
||||||
|
list += "<tr><td align=\"right\"> " + number + "</td><td>" + indicator +
|
||||||
|
"</td><td style=\"width: 250px; max-width: 500px; overflow: hidden;\">" + title +
|
||||||
|
"</td><td><a href=\"#\" class=\"hl-URL buffer-list\">" + url + "</a></td></tr>";
|
||||||
}
|
}
|
||||||
else
|
list += "</table>";
|
||||||
{
|
|
||||||
// TODO: move this to liberator.buffers.get()
|
|
||||||
var items = liberator.completion.buffer("")[1];
|
|
||||||
var number, indicator, title, url;
|
|
||||||
|
|
||||||
var list = ":" + (liberator.util.escapeHTML(liberator.commandline.getCommand()) || "buffers") + "<br/>" + "<table>";
|
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
|
||||||
for (var i = 0; i < items.length; i++)
|
|
||||||
{
|
|
||||||
if (i == liberator.tabs.index())
|
|
||||||
indicator = " <span style=\"color: blue\">%</span> ";
|
|
||||||
else if (i == liberator.tabs.index(liberator.tabs.alternate))
|
|
||||||
indicator = " <span style=\"color: blue\">#</span> ";
|
|
||||||
else
|
|
||||||
indicator = " ";
|
|
||||||
|
|
||||||
[number, title] = items[i][0].split(/:\s+/, 2);
|
|
||||||
url = items[i][1];
|
|
||||||
url = liberator.util.escapeHTML(url);
|
|
||||||
title = liberator.util.escapeHTML(title);
|
|
||||||
|
|
||||||
list += "<tr><td align=\"right\"> " + number + "</td><td>" + indicator +
|
|
||||||
"</td><td style=\"width: 250px; max-width: 500px; overflow: hidden;\">" + title +
|
|
||||||
"</td><td><a href=\"#\" class=\"hl-URL buffer-list\">" + url + "</a></td></tr>";
|
|
||||||
}
|
|
||||||
list += "</table>";
|
|
||||||
|
|
||||||
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// wrap causes the movement to wrap around the start and end of the tab list
|
// wrap causes the movement to wrap around the start and end of the tab list
|
||||||
|
|||||||
@@ -79,16 +79,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
|||||||
oncommandupdate="if (typeof liberator.events != 'undefined') liberator.events.onSelectionChange(event);"/>
|
oncommandupdate="if (typeof liberator.events != 'undefined') liberator.events.onSelectionChange(event);"/>
|
||||||
|
|
||||||
<vbox id="liberator-container" hidden="false">
|
<vbox id="liberator-container" hidden="false">
|
||||||
<listbox id="liberator-bufferwindow" class="plain" rows="10" flex="1" hidden="true"
|
|
||||||
onclick= "liberator.bufferwindow.onEvent(event);"
|
|
||||||
ondblclick="liberator.bufferwindow.onEvent(event);"
|
|
||||||
onkeydown= "liberator.bufferwindow.onEvent(event);">
|
|
||||||
<listcols>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
<listcol flex="1" width="50%"/>
|
|
||||||
</listcols>
|
|
||||||
</listbox>
|
|
||||||
|
|
||||||
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
<listbox id="liberator-previewwindow" class="plain" rows="10" flex="1" hidden="true"
|
||||||
onclick= "liberator.previewwindow.onEvent(event);"
|
onclick= "liberator.previewwindow.onEvent(event);"
|
||||||
ondblclick="liberator.previewwindow.onEvent(event);"
|
ondblclick="liberator.previewwindow.onEvent(event);"
|
||||||
|
|||||||
Reference in New Issue
Block a user