mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-01 17:35:49 +01:00
GNU make 3.80 can't parse "else ifeq"
This commit is contained in:
4
Makefile
4
Makefile
@@ -41,12 +41,14 @@ SED = sed
|
|||||||
|
|
||||||
ifeq (${OS},Darwin)
|
ifeq (${OS},Darwin)
|
||||||
FIREFOX_DEFAULT = $(wildcard ${HOME}/Library/Application\ Support/Firefox/Profiles/*default)
|
FIREFOX_DEFAULT = $(wildcard ${HOME}/Library/Application\ Support/Firefox/Profiles/*default)
|
||||||
else ifeq ($(findstring CYGWIN,${OS}),CYGWIN)
|
else
|
||||||
|
ifeq ($(findstring CYGWIN,${OS}),CYGWIN)
|
||||||
HOME = $(shell cygpath -sm "${USERPROFILE}")
|
HOME = $(shell cygpath -sm "${USERPROFILE}")
|
||||||
FIREFOX_DEFAULT = $(wildcard ${HOME}/Application\ Data/Mozilla/Firefox/Profiles/*default)
|
FIREFOX_DEFAULT = $(wildcard ${HOME}/Application\ Data/Mozilla/Firefox/Profiles/*default)
|
||||||
else
|
else
|
||||||
FIREFOX_DEFAULT = $(wildcard ${HOME}/.mozilla/firefox/*.default)
|
FIREFOX_DEFAULT = $(wildcard ${HOME}/.mozilla/firefox/*.default)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
VIMPERATOR_CHROME_EMAIL = ${FIREFOX_DEFAULT}/extensions/vimperator@mozdev.org/chrome/
|
VIMPERATOR_CHROME_EMAIL = ${FIREFOX_DEFAULT}/extensions/vimperator@mozdev.org/chrome/
|
||||||
FOUND_CHROME_UUID = $(dir $(wildcard ${FIREFOX_DEFAULT}/extensions/{*-*-*-*-*}/chrome/vimperator.jar))
|
FOUND_CHROME_UUID = $(dir $(wildcard ${FIREFOX_DEFAULT}/extensions/{*-*-*-*-*}/chrome/vimperator.jar))
|
||||||
|
|||||||
@@ -72,14 +72,40 @@ function Events() //{{{
|
|||||||
vimperator.setMode(); // trick to reshow the mode in the command line
|
vimperator.setMode(); // trick to reshow the mode in the command line
|
||||||
}, null);
|
}, null);
|
||||||
|
|
||||||
// Code for keeping track if a popup is currently active
|
// track if a popup is open or the menubar is active
|
||||||
// XXX: does currently not handle submenus
|
|
||||||
this.openPopupCount = 0;
|
this.openPopupCount = 0;
|
||||||
this.menuBarActive = 100;
|
this.menuBarActive = false;
|
||||||
window.addEventListener("popupshown", function() { vimperator.log(++vimperator.events.openPopupCount); vimperator.addMode(null, vimperator.modes.MENU); }, true);
|
|
||||||
window.addEventListener("popuphidden", function() { vimperator.log(--vimperator.events.openPopupCount); vimperator.removeMode(null, vimperator.modes.MENU); }, true);
|
function enterPopupMode()
|
||||||
window.addEventListener("DOMMenuBarActive", function() { vimperator.log(++vimperator.events.menuBarActive);vimperator.addMode(null, vimperator.modes.MENU); }, true);
|
{
|
||||||
window.addEventListener("DOMMenuBarInactive", function() { vimperator.log(--vimperator.events.menuBarActive); vimperator.removeMode(null, vimperator.modes.MENU); }, true);
|
vimperator.events.openPopupCount++;
|
||||||
|
//vimperator.log("Open popup window count: " + vimperator.events.openPopupCount, 9);
|
||||||
|
vimperator.addMode(null, vimperator.modes.MENU);
|
||||||
|
}
|
||||||
|
function exitPopupMode()
|
||||||
|
{
|
||||||
|
vimperator.events.openPopupCount--;
|
||||||
|
//vimperator.log("Open popup window count: " + vimperator.events.openPopupCount, 9);
|
||||||
|
if (vimperator.events.openPopupCount == 0)
|
||||||
|
vimperator.removeMode(null, vimperator.modes.MENU);
|
||||||
|
}
|
||||||
|
function enterMenuMode()
|
||||||
|
{
|
||||||
|
this.menuBarActive = true;
|
||||||
|
//vimperator.log("Menubar is active", 9);
|
||||||
|
vimperator.addMode(null, vimperator.modes.MENU)
|
||||||
|
}
|
||||||
|
function exitMenuMode()
|
||||||
|
{
|
||||||
|
this.menuBarActive = false;
|
||||||
|
//vimperator.log("Menubar is inactive", 9);
|
||||||
|
vimperator.removeMode(null, vimperator.modes.MENU);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("popupshown", enterPopupMode, true);
|
||||||
|
window.addEventListener("popuphidden", exitPopupMode, true);
|
||||||
|
window.addEventListener("DOMMenuBarActive", enterMenuMode, true);
|
||||||
|
window.addEventListener("DOMMenuBarInactive", exitMenuMode, true);
|
||||||
|
|
||||||
window.document.addEventListener("DOMTitleChanged", function(event)
|
window.document.addEventListener("DOMTitleChanged", function(event)
|
||||||
{
|
{
|
||||||
@@ -219,10 +245,10 @@ function Events() //{{{
|
|||||||
|
|
||||||
getBrowser().removeProgressListener(this.progressListener);
|
getBrowser().removeProgressListener(this.progressListener);
|
||||||
|
|
||||||
window.removeEventListener("popupshowing");
|
window.removeEventListener("popupshowing", enterPopupMode(), true);
|
||||||
window.removeEventListener("popuphidden");
|
window.removeEventListener("popuphidden", exitPopupMode(), true);
|
||||||
window.removeEventListener("DOMMenuBarActive");
|
window.removeEventListener("DOMMenuBarActive", enterMenuMode(), true);
|
||||||
window.removeEventListener("DOMMenuBarInactive");
|
window.removeEventListener("DOMMenuBarInactive", exitMenuMode(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method pushes keys into the event queue from vimperator
|
// This method pushes keys into the event queue from vimperator
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const vimperator = (function() //{{{
|
|||||||
mode_messages[modes.QUICK_HINT] = "quick";
|
mode_messages[modes.QUICK_HINT] = "quick";
|
||||||
mode_messages[modes.EXTENDED_HINT] = "extended";
|
mode_messages[modes.EXTENDED_HINT] = "extended";
|
||||||
mode_messages[modes.ALWAYS_HINT] = "always";
|
mode_messages[modes.ALWAYS_HINT] = "always";
|
||||||
|
mode_messages[modes.MENU] = "menu";
|
||||||
|
|
||||||
var mode = modes.NORMAL;
|
var mode = modes.NORMAL;
|
||||||
var extended_mode = modes.NONE;
|
var extended_mode = modes.NONE;
|
||||||
|
|||||||
Reference in New Issue
Block a user