From b22981cef629576cf777c5b09d2640a47baf9e69 Mon Sep 17 00:00:00 2001 From: dece Date: Mon, 24 May 2021 21:11:58 +0200 Subject: [PATCH] browser: fix minor status bar issues --- BOARD.txt | 3 +++ bebop/browser/gemini.py | 2 -- bebop/fs.py | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BOARD.txt b/BOARD.txt index 545aa92..a45f658 100644 --- a/BOARD.txt +++ b/BOARD.txt @@ -28,6 +28,9 @@ opt. maintain history between sessions history (forward) (useful?) search in page (ugh) remember scroll pos in history +identity management +"previous/next" pages +directory view for file scheme diff --git a/bebop/browser/gemini.py b/bebop/browser/gemini.py index fcae206..e05be8b 100644 --- a/bebop/browser/gemini.py +++ b/bebop/browser/gemini.py @@ -73,7 +73,6 @@ def open_gemini_url( if use_cache and url in browser.cache: browser.load_page(browser.cache[url]) browser.current_url = url - browser.set_status(url) return url logging.info( @@ -232,7 +231,6 @@ def _handle_successful_response(browser: Browser, response: Response, url: str): browser.load_page(page) browser.current_url = url browser.cache[url] = page - browser.set_status(url) return url elif filepath: try: diff --git a/bebop/fs.py b/bebop/fs.py index 6e09c59..af2146e 100644 --- a/bebop/fs.py +++ b/bebop/fs.py @@ -39,12 +39,11 @@ def get_downloads_path() -> Path: if line.startswith("XDG_DOWNLOAD_DIR="): download_path = line.rstrip().split("=", maxsplit=1)[1] download_path = download_path.strip('"') - download_path = download_path.replace("$HOME", expanduser("~")) - break + home = expanduser("~") + download_path = download_path.replace("$HOME", home) + return Path(download_path) except OSError: pass - if download_path: - return Path(download_path) return Path.home()