From 4401fae0bfef927b14f3984c8791d097ab187dfb Mon Sep 17 00:00:00 2001 From: Rafael Tosta Santos Date: Fri, 28 Jan 2022 21:55:16 -0300 Subject: [PATCH] revert dbus --- com.rtosta.zapzap.yaml | 10 ---------- share/metainfo/com.rtosta.zapzap.appdata.xml | 6 +----- zapzap/browser.py | 6 +++--- zapzap/dbus_notify.py | 4 ++-- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/com.rtosta.zapzap.yaml b/com.rtosta.zapzap.yaml index c13ce156..f35cb5a0 100644 --- a/com.rtosta.zapzap.yaml +++ b/com.rtosta.zapzap.yaml @@ -26,16 +26,6 @@ modules: - pyqt6.yml - pyqt6-webengine.yml - - name: dbus-python - buildsystem: simple - build-commands: - - pip3 install --no-deps --no-use-pep517 --prefix=$FLATPAK_DEST . - sources: - - type: archive - url: https://files.pythonhosted.org/packages/b1/5c/ccfc167485806c1936f7d3ba97db6c448d0089c5746ba105b6eb22dba60e/dbus-python-1.2.18.tar.gz - sha256: 92bdd1e68b45596c833307a5ff4b217ee6929a1502f5341bae28fd120acf7260 - - - name: zapzap buildsystem: simple build-commands: diff --git a/share/metainfo/com.rtosta.zapzap.appdata.xml b/share/metainfo/com.rtosta.zapzap.appdata.xml index 281a0b5f..0f216f61 100644 --- a/share/metainfo/com.rtosta.zapzap.appdata.xml +++ b/share/metainfo/com.rtosta.zapzap.appdata.xml @@ -33,14 +33,10 @@ -

News

-
    -
  • Shows notifications in the system;
  • -
  • Attention: Does not open the window if it is hidden. Solution soon.
  • -

Updates

  • Focus on the window when clicking on the Tray, if it is already open;
  • +
  • Attention: Does not open the window if it is hidden. Solution soon;
  • UserAgent;
  • Webcam permissions.
diff --git a/zapzap/browser.py b/zapzap/browser.py index ac5eba1b..f47c106b 100644 --- a/zapzap/browser.py +++ b/zapzap/browser.py @@ -16,7 +16,7 @@ def __init__(self, parent): # definição do pergil do usuário, local que será armazenados os cookies e informações sobre os navegadores profile = QWebEngineProfile("storage-whats", self) profile.setHttpUserAgent(USER_AGENT) - profile.setNotificationPresenter(self.show_notification) + #profile.setNotificationPresenter(self.show_notification) # Rotina para download de arquivos profile.downloadRequested.connect(self.download) @@ -64,5 +64,5 @@ def icon_changed(self, icon): self.parent.tray.setIcon(icon) - def show_notification(self,notification: QWebEngineNotification): - zapzap.dbus_notify.show(notification) + """def show_notification(self,notification: QWebEngineNotification): + zapzap.dbus_notify.show(notification)""" diff --git a/zapzap/dbus_notify.py b/zapzap/dbus_notify.py index e0a14208..9757977a 100644 --- a/zapzap/dbus_notify.py +++ b/zapzap/dbus_notify.py @@ -1,4 +1,4 @@ -import dbus +"""import dbus from zapzap.app_info import APPLICATION_NAME @@ -17,7 +17,7 @@ def show(q_notification): notify = dbus.Interface(notif, interface) notify.Notify(app_name, id_num_to_replace, icon, - q_notification.title(), q_notification.message(), actions, hints, time) + q_notification.title(), q_notification.message(), actions, hints, time)""" """ Não funciona, pois a url está dentro do flatpak.