Skip to content

Commit

Permalink
v2024.2.29
Browse files Browse the repository at this point in the history
  • Loading branch information
giantpinkrobots committed Feb 29, 2024
1 parent 51fb79a commit 0b06ca2
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 10 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ You can get Varia via the [AUR](https://aur.archlinux.org/packages/varia) as wel
### Windows (experimental)
You can find a *highly experimental* build of Varia in the releases section. But keep in mind, it will have bugs.

## Browser Extension
Download it for [Firefox](https://addons.mozilla.org/firefox/addon/varia-integrator/) or [Chrome](https://chrome.google.com/webstore/detail/dacakhfljjhgdfdlgjpabkkjhbpcmiff).

## Building

There are two branches here: 'main' and 'next'. 'next' is where the feature developments for the next version happen.
Expand Down Expand Up @@ -102,7 +105,8 @@ pip install pyinstaller
```
pacman -S mingw-w64-x86_64-python-pillow
```
- Copy variamain.py, varia.spec and icon.ico to the home directory of your MSYS2 install. variamain.py is in /src, varia.spec and icon.ico is in /windows.
- Copy the contents of the /src folder to the home directory of your MSYS2 install.
- Copy varia.spec and icon.ico from the /windows directory to the home directory of your MSYS2 install.
- Run the pyinstaller command:
```
pyinstaller varia.spec
Expand Down
9 changes: 5 additions & 4 deletions data/io.github.giantpinkrobots.varia.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ Varia utilizes GTK4 and Libadwaita to provide a easy to use interface that integ
</screenshots>

<releases>
<release version="v2024.2.6" date="2024-02-06">
<release version="v2024.2.29" date="2024-02-29">
<description translatable="yes">
<p>- Varia now has a brand new icon.</p>
<p>- The sidebar now hosts buttons for all downloads, downloads in progress and completed downloads.</p>
<p>- A setting for adjusting the simultaneous download amount was added.</p>
<p>- Support for Firefox and Chromium extension.</p>
<p>- Initial torrenting support.</p>
<p>- Remote mode that allows connection to a remote aria2 instance.</p>
<p>- Background mode that allows the window to be hidden while still downloading.</p>
<p>- Bug fixes and adjustments.</p>
</description>
</release>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ <h2>Quick and efficient download manager</h2>
</div>

<div id='windows-instructions' class='linux-instructions hidden'>
<div style="display: inline-block"><a href="https://github.com/giantpinkrobots/varia/releases/download/v2024.2.6/varia-windows-setup-amd64.exe" class="pill-button pill-button-ltblue"><img src="downloadIcon.png" class="button-icon" style="filter: brightness(10%);">&nbsp;&nbsp;&nbsp;&nbsp;Installer</a></div>
<div style="display: inline-block"><a href="https://github.com/giantpinkrobots/varia/releases/download/v2024.2.29/varia-windows-setup-amd64.exe" class="pill-button pill-button-ltblue"><img src="downloadIcon.png" class="button-icon" style="filter: brightness(10%);">&nbsp;&nbsp;&nbsp;&nbsp;Installer</a></div>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<div style="display: inline-block"><a href="https://github.com/giantpinkrobots/varia/releases/download/v2024.2.6/varia-windows-portable-amd64.exe" class="pill-button pill-button-ltblue"><img src="downloadIcon.png" class="button-icon" style="filter: brightness(10%);">&nbsp;&nbsp;&nbsp;&nbsp;Portable version</a></div>
<div style="display: inline-block"><a href="https://github.com/giantpinkrobots/varia/releases/download/v2024.2.29/varia-windows-portable-amd64.exe" class="pill-button pill-button-ltblue"><img src="downloadIcon.png" class="button-icon" style="filter: brightness(10%);">&nbsp;&nbsp;&nbsp;&nbsp;Portable version</a></div>

<br>
<br>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('varia',
version: 'v2024.2.6',
version: 'v2024.2.29',
meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)
Expand Down
3 changes: 3 additions & 0 deletions po/Varia.pot
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ msgstr ""
msgid "Continuing the downloads in the background."
msgstr ""

msgid "Browser Extension"
msgstr ""

#: src/gtk/help-overlay.ui:11
msgctxt "shortcut window"
msgid "General"
Expand Down
3 changes: 3 additions & 0 deletions po/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ msgstr "Arka Plan Modu"
msgid "Continuing the downloads in the background."
msgstr "İndirmeler arka planda devam ediyor."

msgid "Browser Extension"
msgstr "Tarayıcı Uzantısı"

#: src/gtk/help-overlay.ui:11
msgctxt "shortcut window"
msgid "General"
Expand Down
Binary file modified screenshots/Screenshot-Varia-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/download/actionrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw
from gettext import gettext as _

def on_download_clicked(button, self, entry, DownloadThread):
url = entry.get_text()
Expand Down
1 change: 1 addition & 0 deletions src/download/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import time
import os
import json
from gettext import gettext as _

class DownloadThread(threading.Thread):
def __init__(self, app, url, progress_bar, speed_label, pause_button, actionrow, filename_label, download, downloadname):
Expand Down
1 change: 1 addition & 0 deletions src/initiate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, GLib
from gettext import gettext as _

def initiate(self):
self.downloaddir = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DOWNLOAD)
Expand Down
2 changes: 1 addition & 1 deletion src/variamain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variaVersion = "v2024.2.6"
variaVersion = "v2024.2.29"

import gi
import sys
Expand Down
1 change: 1 addition & 0 deletions src/window/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, GLib, Gio
from gettext import gettext as _

def window_create_content(self, threading):
content_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
Expand Down
33 changes: 33 additions & 0 deletions src/window/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, GLib, Gio
from gettext import gettext as _

from download.communicate import set_speed_limit, set_aria2c_download_directory, set_aria2c_download_simultaneous_amount

Expand All @@ -11,11 +12,36 @@ def show_preferences(button, self, app):

page = Adw.PreferencesPage(title=_("Preferences"))
preferences.add(page)
group_extensions = Adw.PreferencesGroup()
page.add(group_extensions)
group_1 = Adw.PreferencesGroup()
page.add(group_1)
group_2 = Adw.PreferencesGroup()
page.add(group_2)

# Browser extensions section:

browser_extension_actionrow = Adw.ActionRow()
browser_extension_actionrow.set_title(_("Browser Extension"))

browser_extension_firefox_button = Gtk.Button(label="Firefox")
browser_extension_firefox_button.set_halign(Gtk.Align.START)
browser_extension_firefox_button.set_valign(Gtk.Align.CENTER)
browser_extension_chrome_button = Gtk.Button(label="Chrome")
browser_extension_chrome_button.set_halign(Gtk.Align.START)
browser_extension_chrome_button.set_valign(Gtk.Align.CENTER)

browser_extension_firefox_button.connect("clicked", lambda clicked: on_extension_selected(self, preferences, 'firefox'))
browser_extension_chrome_button.connect("clicked", lambda clicked: on_extension_selected(self, preferences, 'chrome'))

browser_extension_buttons_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=4)
browser_extension_buttons_box.append(browser_extension_firefox_button)
browser_extension_buttons_box.append(browser_extension_chrome_button)

browser_extension_actionrow.add_suffix(browser_extension_buttons_box)

group_extensions.add(browser_extension_actionrow)

# Basic settings:

download_directory_actionrow = Adw.ActionRow()
Expand Down Expand Up @@ -234,6 +260,13 @@ def speed_limit_text_filter(entry, self):
GLib.idle_add(entry.set_text, new_text)
GLib.idle_add(entry.set_position, -1)

def on_extension_selected(self, prefswindow, browser):
if (browser == 'firefox'):
link = 'https://addons.mozilla.org/firefox/addon/varia-integrator/'
else:
link = 'https://chrome.google.com/webstore/detail/dacakhfljjhgdfdlgjpabkkjhbpcmiff'
Gio.AppInfo.launch_default_for_uri(link)

def on_download_directory_change(self, prefswindow, actionrow):
Gtk.FileDialog().select_folder(None, None, on_download_directory_selected, self, prefswindow, actionrow)

Expand Down
4 changes: 3 additions & 1 deletion src/window/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Adw, GLib, Gio
from gettext import gettext as _

from window.preferences import show_preferences
from download.actionrow import on_download_clicked
Expand Down Expand Up @@ -41,7 +42,8 @@ def window_create_sidebar(self, variaapp, DownloadThread, variaVersion):
variaapp.add_action(downloads_folder_action)

hamburger_menu_item_background = Gio.MenuItem.new(_("Background Mode"), "app.background_mode")
hamburger_menu_model.append_item(hamburger_menu_item_background)
if (os.name != 'nt'):
hamburger_menu_model.append_item(hamburger_menu_item_background)

hamburger_menu_item_cancel_all = Gio.MenuItem.new(_("Cancel All"), "app.cancel_all_downloads")
hamburger_menu_model.append_item(hamburger_menu_item_cancel_all)
Expand Down

0 comments on commit 0b06ca2

Please sign in to comment.