Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
- Potfile additions
- Background mode tweaks
- aria2p dependency update
  • Loading branch information
giantpinkrobots committed Feb 26, 2024
1 parent 8fcc9fd commit f811086
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
6 changes: 6 additions & 0 deletions po/Varia.pot
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ msgstr ""
msgid "Exiting Varia..."
msgstr ""

msgid "Background Mode"
msgstr ""

msgid "Continuing the downloads in the background."
msgstr ""

#: src/gtk/help-overlay.ui:11
msgctxt "shortcut window"
msgid "General"
Expand Down
6 changes: 6 additions & 0 deletions po/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ msgstr "Uzak İndirme Dizini"
msgid "Exiting Varia..."
msgstr "Varia'dan çıkılıyor..."

msgid "Background Mode"
msgstr "Arka Plan Modu"

msgid "Continuing the downloads in the background."
msgstr "İndirmeler arka planda devam ediyor."

#: src/gtk/help-overlay.ui:11
msgctxt "shortcut window"
msgid "General"
Expand Down
25 changes: 10 additions & 15 deletions python3-aria2p.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/1b/2e/e1eba62ca72501efa07002f816e065849b4c26cc212f9c623d72e74993a0/aria2p-0.11.3-py3-none-any.whl",
"sha256": "bc0fbe71de360e01e3db4301c89052799e7c4f004ab62fdbaa6bc96d20f476da"
"url": "https://files.pythonhosted.org/packages/9a/56/a1ba3e0fe737b9b20a45c10266ab88a0f44e5779fa751a7484259d8845ea/aria2p-0.12.0-py3-none-any.whl",
"sha256": "476171257cdd8d74d888bcb983ecba5e9db19c2d8ecf9ef22547f88080b7bea8"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/64/62/428ef076be88fa93716b576e4a01f919d25968913e817077a386fcbe4f42/certifi-2023.11.17-py3-none-any.whl",
"sha256": "e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"
"url": "https://files.pythonhosted.org/packages/ba/06/a07f096c664aeb9f01624f858c3add0a4e913d6c96257acb4fce61e7de14/certifi-2024.2.2-py3-none-any.whl",
"sha256": "dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"
},
{
"type": "file",
Expand All @@ -27,8 +27,8 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl",
"sha256": "90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
"url": "https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl",
"sha256": "c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"
},
{
"type": "file",
Expand All @@ -42,18 +42,13 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl",
"sha256": "806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"
"url": "https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl",
"sha256": "450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/96/94/c31f58c7a7f470d5665935262ebd7455c7e4c7782eb525658d3dbf4b9403/urllib3-2.1.0-py3-none-any.whl",
"sha256": "55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/c4/3c/1892ce394828c43d4f65248ebdee3854114266b75d1f5915cb211155ad7b/websocket_client-1.6.4-py3-none-any.whl",
"sha256": "084072e0a7f5f347ef2ac3d8698a5e0b4ffbfcab607628cadabc650fc9a83a24"
"url": "https://files.pythonhosted.org/packages/1e/70/1e88138a9afbed1d37093b85f0bebc3011623c4f47c166431599fe9d6c93/websocket_client-1.7.0-py3-none-any.whl",
"sha256": "f4c3d22fec12a2461427a29957ff07d35098ee2d976d3ba244e688b8b4057588"
}
]
}
10 changes: 6 additions & 4 deletions src/variamain.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def exitProgram(self, app, variaapp, background, show_exit_window):
notification = Gio.Notification.new(_("Background Mode"))
notification.set_body(_("Continuing the downloads in the background."))
variaapp.send_notification(None, notification)
print('Background mode')
else:
self.terminating = True

Expand Down Expand Up @@ -284,7 +285,8 @@ def aria2c_exiting_check(self, app, counter, variaapp, exiting_dialog):
return

def quit_action_received(self, variaapp):
self.exitProgram(variaapp, variaapp, False, False)
if (self.terminating == False):
self.exitProgram(variaapp, variaapp, False, False)

class MyApp(Adw.Application):
def __init__(self, appdir, appconf, aria2c_subprocess, **kwargs):
Expand All @@ -297,11 +299,11 @@ def __init__(self, appdir, appconf, aria2c_subprocess, **kwargs):
def on_activate(self, app, appdir, appconf, aria2c_subprocess):
if not hasattr(self, 'win'):
self.win = MainWindow(application=app, variaapp=self, appdir=appdir, appconf=appconf, aria2c_subprocess=aria2c_subprocess)
self.win.present()
if (self.win.terminating == False):
self.win.present()

def quit_action(self, action, parameter):
if (self.win.self.terminating == False):
self.win.quit_action_received(self)
self.win.quit_action_received(self)

def main(version, aria2cexec):
if "FLATPAK_ID" in os.environ:
Expand Down

0 comments on commit f811086

Please sign in to comment.