chore: Sync upstream Firefox to version 146.0.1, p=#11658
* chore: Sync upstream to `Firefox 146.0.1` * Update candidate version to 146.0.1 Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> * Update Twilight version to RC 146.0.1 Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com> * feat: Reduce the animation duration for glance, b=no-bug, c=glance --------- Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
|
|||||||
|
|
||||||
### Firefox Versions
|
### Firefox Versions
|
||||||
|
|
||||||
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `146.0`! 🚀
|
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `146.0.1`! 🚀
|
||||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 146.0`!
|
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 146.0.1`!
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
8908c8eb566c64521e2a777ad8a80b62bd6aa193
|
b6f4d18893d4f547f01d5e8aa8a4b364b168c84f
|
||||||
@@ -15,4 +15,4 @@
|
|||||||
value: 'alt' # ctrl, alt, shift
|
value: 'alt' # ctrl, alt, shift
|
||||||
|
|
||||||
- name: zen.glance.animation-duration
|
- name: zen.glance.animation-duration
|
||||||
value: 400 # in milliseconds
|
value: 350 # in milliseconds
|
||||||
|
|||||||
@@ -31,138 +31,138 @@ from Cocoa import NSURL
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Utility to print, set, or "
|
description="Utility to print, set, or "
|
||||||
+ "check the path to image being used as "
|
+ "check the path to image being used as "
|
||||||
+ "the desktop background image. By "
|
+ "the desktop background image. By "
|
||||||
+ "default, prints the path to the "
|
+ "default, prints the path to the "
|
||||||
+ "current desktop background image."
|
+ "current desktop background image."
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"-v",
|
|
||||||
"--verbose",
|
|
||||||
action="store_true",
|
|
||||||
help="print verbose debugging information",
|
|
||||||
default=False,
|
|
||||||
)
|
|
||||||
group = parser.add_mutually_exclusive_group()
|
|
||||||
group.add_argument(
|
|
||||||
"-s",
|
|
||||||
"--set-background-image",
|
|
||||||
dest="newBackgroundImagePath",
|
|
||||||
required=False,
|
|
||||||
help="path to the new background image to set. A zero "
|
|
||||||
+ "exit code indicates no errors occurred.",
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
group.add_argument(
|
|
||||||
"-c",
|
|
||||||
"--check-background-image",
|
|
||||||
dest="checkBackgroundImagePath",
|
|
||||||
required=False,
|
|
||||||
help="check if the provided background image path "
|
|
||||||
+ "matches the provided path. A zero exit code "
|
|
||||||
+ "indicates the paths match.",
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
# Using logging for verbose output
|
|
||||||
if args.verbose:
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
|
||||||
else:
|
|
||||||
logging.basicConfig(level=logging.CRITICAL)
|
|
||||||
logger = logging.getLogger("desktopImage")
|
|
||||||
|
|
||||||
# Print what we're going to do
|
|
||||||
if args.checkBackgroundImagePath is not None:
|
|
||||||
logger.debug(
|
|
||||||
"checking provided desktop image %s matches current "
|
|
||||||
"image" % args.checkBackgroundImagePath
|
|
||||||
)
|
)
|
||||||
elif args.newBackgroundImagePath is not None:
|
parser.add_argument(
|
||||||
logger.debug("setting image to %s " % args.newBackgroundImagePath)
|
"-v",
|
||||||
else:
|
"--verbose",
|
||||||
logger.debug("retrieving desktop image path")
|
action="store_true",
|
||||||
|
help="print verbose debugging information",
|
||||||
focussedScreen = NSScreen.mainScreen()
|
default=False,
|
||||||
if not focussedScreen:
|
|
||||||
raise RuntimeError("mainScreen error")
|
|
||||||
|
|
||||||
ws = NSWorkspace.sharedWorkspace()
|
|
||||||
if not ws:
|
|
||||||
raise RuntimeError("sharedWorkspace error")
|
|
||||||
|
|
||||||
# If we're just checking the image path, check it and then return.
|
|
||||||
# A successful exit code (0) indicates the paths match.
|
|
||||||
if args.checkBackgroundImagePath is not None:
|
|
||||||
# Get existing desktop image path and resolve it
|
|
||||||
existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
|
||||||
existingImagePath = existingImageURL.path()
|
|
||||||
existingImagePathReal = os.path.realpath(existingImagePath)
|
|
||||||
logger.debug("existing desktop image: %s" % existingImagePath)
|
|
||||||
logger.debug("existing desktop image realpath: %s" % existingImagePath)
|
|
||||||
|
|
||||||
# Resolve the path we're going to check
|
|
||||||
checkImagePathReal = os.path.realpath(args.checkBackgroundImagePath)
|
|
||||||
logger.debug("check desktop image: %s" % args.checkBackgroundImagePath)
|
|
||||||
logger.debug("check desktop image realpath: %s" % checkImagePathReal)
|
|
||||||
|
|
||||||
if existingImagePathReal == checkImagePathReal:
|
|
||||||
print("desktop image path matches provided path")
|
|
||||||
return True
|
|
||||||
|
|
||||||
print("desktop image path does NOT match provided path")
|
|
||||||
return False
|
|
||||||
|
|
||||||
# Log the current desktop image
|
|
||||||
if args.verbose:
|
|
||||||
existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
|
||||||
logger.debug("existing desktop image: %s" % existingImageURL.path())
|
|
||||||
|
|
||||||
# Set the desktop image
|
|
||||||
if args.newBackgroundImagePath is not None:
|
|
||||||
newImagePath = args.newBackgroundImagePath
|
|
||||||
if not os.path.exists(newImagePath):
|
|
||||||
logger.critical("%s does not exist" % newImagePath)
|
|
||||||
return False
|
|
||||||
if not os.access(newImagePath, os.R_OK):
|
|
||||||
logger.critical("%s is not readable" % newImagePath)
|
|
||||||
return False
|
|
||||||
|
|
||||||
logger.debug("new desktop image to set: %s" % newImagePath)
|
|
||||||
newImageURL = NSURL.fileURLWithPath_(newImagePath)
|
|
||||||
logger.debug("new desktop image URL to set: %s" % newImageURL)
|
|
||||||
|
|
||||||
status = False
|
|
||||||
(status, error) = ws.setDesktopImageURL_forScreen_options_error_(
|
|
||||||
newImageURL, focussedScreen, None, None
|
|
||||||
)
|
)
|
||||||
if not status:
|
group = parser.add_mutually_exclusive_group()
|
||||||
raise RuntimeError("setDesktopImageURL error")
|
group.add_argument(
|
||||||
|
"-s",
|
||||||
|
"--set-background-image",
|
||||||
|
dest="newBackgroundImagePath",
|
||||||
|
required=False,
|
||||||
|
help="path to the new background image to set. A zero "
|
||||||
|
+ "exit code indicates no errors occurred.",
|
||||||
|
default=None,
|
||||||
|
)
|
||||||
|
group.add_argument(
|
||||||
|
"-c",
|
||||||
|
"--check-background-image",
|
||||||
|
dest="checkBackgroundImagePath",
|
||||||
|
required=False,
|
||||||
|
help="check if the provided background image path "
|
||||||
|
+ "matches the provided path. A zero exit code "
|
||||||
|
+ "indicates the paths match.",
|
||||||
|
default=None,
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Print the current desktop image
|
# Using logging for verbose output
|
||||||
imageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
if args.verbose:
|
||||||
imagePath = imageURL.path()
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
imagePathReal = os.path.realpath(imagePath)
|
else:
|
||||||
logger.debug("updated desktop image URL: %s" % imageURL)
|
logging.basicConfig(level=logging.CRITICAL)
|
||||||
logger.debug("updated desktop image path: %s" % imagePath)
|
logger = logging.getLogger("desktopImage")
|
||||||
logger.debug("updated desktop image path (resolved): %s" % imagePathReal)
|
|
||||||
print(imagePathReal)
|
# Print what we're going to do
|
||||||
return True
|
if args.checkBackgroundImagePath is not None:
|
||||||
|
logger.debug(
|
||||||
|
"checking provided desktop image %s matches current "
|
||||||
|
"image" % args.checkBackgroundImagePath
|
||||||
|
)
|
||||||
|
elif args.newBackgroundImagePath is not None:
|
||||||
|
logger.debug("setting image to %s " % args.newBackgroundImagePath)
|
||||||
|
else:
|
||||||
|
logger.debug("retrieving desktop image path")
|
||||||
|
|
||||||
|
focussedScreen = NSScreen.mainScreen()
|
||||||
|
if not focussedScreen:
|
||||||
|
raise RuntimeError("mainScreen error")
|
||||||
|
|
||||||
|
ws = NSWorkspace.sharedWorkspace()
|
||||||
|
if not ws:
|
||||||
|
raise RuntimeError("sharedWorkspace error")
|
||||||
|
|
||||||
|
# If we're just checking the image path, check it and then return.
|
||||||
|
# A successful exit code (0) indicates the paths match.
|
||||||
|
if args.checkBackgroundImagePath is not None:
|
||||||
|
# Get existing desktop image path and resolve it
|
||||||
|
existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
||||||
|
existingImagePath = existingImageURL.path()
|
||||||
|
existingImagePathReal = os.path.realpath(existingImagePath)
|
||||||
|
logger.debug("existing desktop image: %s" % existingImagePath)
|
||||||
|
logger.debug("existing desktop image realpath: %s" % existingImagePath)
|
||||||
|
|
||||||
|
# Resolve the path we're going to check
|
||||||
|
checkImagePathReal = os.path.realpath(args.checkBackgroundImagePath)
|
||||||
|
logger.debug("check desktop image: %s" % args.checkBackgroundImagePath)
|
||||||
|
logger.debug("check desktop image realpath: %s" % checkImagePathReal)
|
||||||
|
|
||||||
|
if existingImagePathReal == checkImagePathReal:
|
||||||
|
print("desktop image path matches provided path")
|
||||||
|
return True
|
||||||
|
|
||||||
|
print("desktop image path does NOT match provided path")
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Log the current desktop image
|
||||||
|
if args.verbose:
|
||||||
|
existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
||||||
|
logger.debug("existing desktop image: %s" % existingImageURL.path())
|
||||||
|
|
||||||
|
# Set the desktop image
|
||||||
|
if args.newBackgroundImagePath is not None:
|
||||||
|
newImagePath = args.newBackgroundImagePath
|
||||||
|
if not os.path.exists(newImagePath):
|
||||||
|
logger.critical("%s does not exist" % newImagePath)
|
||||||
|
return False
|
||||||
|
if not os.access(newImagePath, os.R_OK):
|
||||||
|
logger.critical("%s is not readable" % newImagePath)
|
||||||
|
return False
|
||||||
|
|
||||||
|
logger.debug("new desktop image to set: %s" % newImagePath)
|
||||||
|
newImageURL = NSURL.fileURLWithPath_(newImagePath)
|
||||||
|
logger.debug("new desktop image URL to set: %s" % newImageURL)
|
||||||
|
|
||||||
|
status = False
|
||||||
|
(status, error) = ws.setDesktopImageURL_forScreen_options_error_(
|
||||||
|
newImageURL, focussedScreen, None, None
|
||||||
|
)
|
||||||
|
if not status:
|
||||||
|
raise RuntimeError("setDesktopImageURL error")
|
||||||
|
|
||||||
|
# Print the current desktop image
|
||||||
|
imageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger)
|
||||||
|
imagePath = imageURL.path()
|
||||||
|
imagePathReal = os.path.realpath(imagePath)
|
||||||
|
logger.debug("updated desktop image URL: %s" % imageURL)
|
||||||
|
logger.debug("updated desktop image path: %s" % imagePath)
|
||||||
|
logger.debug("updated desktop image path (resolved): %s" % imagePathReal)
|
||||||
|
print(imagePathReal)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def getCurrentDesktopImageURL(focussedScreen, workspace, logger):
|
def getCurrentDesktopImageURL(focussedScreen, workspace, logger):
|
||||||
imageURL = workspace.desktopImageURLForScreen_(focussedScreen)
|
imageURL = workspace.desktopImageURLForScreen_(focussedScreen)
|
||||||
if not imageURL:
|
if not imageURL:
|
||||||
raise RuntimeError("desktopImageURLForScreen returned invalid URL")
|
raise RuntimeError("desktopImageURLForScreen returned invalid URL")
|
||||||
if not imageURL.isFileURL():
|
if not imageURL.isFileURL():
|
||||||
logger.warning("desktop image URL is not a file URL")
|
logger.warning("desktop image URL is not a file URL")
|
||||||
return imageURL
|
return imageURL
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if not main():
|
if not main():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"binaryName": "zen",
|
"binaryName": "zen",
|
||||||
"version": {
|
"version": {
|
||||||
"product": "firefox",
|
"product": "firefox",
|
||||||
"version": "146.0",
|
"version": "146.0.1",
|
||||||
"candidate": "146.0"
|
"candidate": "146.0.1"
|
||||||
},
|
},
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"generateBranding": true
|
"generateBranding": true
|
||||||
@@ -53,4 +53,4 @@
|
|||||||
"licenseType": "MPL-2.0"
|
"licenseType": "MPL-2.0"
|
||||||
},
|
},
|
||||||
"updateHostname": "updates.zen-browser.app"
|
"updateHostname": "updates.zen-browser.app"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user