* Add dependency for pyobjc-CoreWLAN on darwin
* Rename existing implementation with Android
The current implementation was tested with Android, but does not work
with iOS.
Move the existing implementation and include android in the name to make
room for adding a new iOS metered connection detection strategy.
* get_current_wifi works with objc
Switch from using command line tools to using the Objective-C Cocoa API
to get the Wi-Fi status information.
Cocoa has an API to specifically check whether a Wi-Fi connection is
using a Personal Hotspot on iOS.
I'm using a private method to get the Wi-Fi interface object in Cocoa.
The reason for this is that cleaning up mocks on PyObjC/ObjC objects is
much harder than mocking out methods on objects in our control. Using
test doubles also let's me check for different states the Wi-Fi network
could be in.
* get_known_wifis works on darwin
Use the networksetup command on macOS to get the list of the user's
Wi-Fi networks.
networksetup -listpreferredwirelessnetworks bsd_device
It looks like this command and option has existed on macOS since at
least 2013.
Also add some type annotations around the PyObjC return values to help
the reader know what they're dealing with at each step.
* Add test for get_current_wifi when wifi is off
The user might have Wi-Fi turned off. Account for that use case.
* Add iOS Personal Hotspot support to is_network_metered
The DarwinNetworkManager can now determine if the user is connected to
a Personal Hotspot Wi-Fi network from iOS.
Account for whether the user has Wi-Fi turned on and off.
* Refactor to avoid deprecated API in Cocoa
According to Apple's developer documentation, creating CWInterface
objects directly are discouraged. Instead, they prefer to use
CWInterface objects created by CWWiFiClient.
This also happens to be more compliant with Apple's application sandbox.
Creating CWInterface objects directly accesses raw BSD sockets which is
not allowed in the sandbox.
More details here:
https://developer.apple.com/documentation/corewlan/cwinterface
* Add test case for blank Wi-Fi network name
I have one of these in my list of networks in Vorta. And this also
covers a missing branch in get_known_wifis.
* Move private method below public methods
This is to provide a little more clarity. Especially since this class is
subclassing another one.
* Account for when there is no wifi interface
When a Mac does not have a Wi-Fi interface, CWWiFiClient.interface() can
return None.
Update the type annotation to mark it as Optional, and account for the
null condition in the other methods.
* Fix type annotation error
The CI tests failed on python 3.8.
I used the wrong type annotation to describe a list of SystemWifiInfo's.
The tests now pass for me when I run 'make test-unit' using a python 3.8
interpreter.
* Fix linter issue with imports
This puts Vorta on PyQt6 and starts a new main branch 0.9.
---------
Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Fixes#1610. Replace deprecated `appdirs` with fork `platformdirs`. Use the new `*_path` api of set fork. This changes the type of the constants defined in `vorta.config` holding locations to `pathlib.Path`.
* setup.cfg : Replace dep `appdirs` with `platformdirs`.
* src/vorta/config.py : Migrate. Simplify code for ensuring that the directories exist.
* src/vorta/log.py
* src/vorta/autostart.py
* src/vorta/application.py
* src/vorta/__main__.py
* Add QTimer to ensure background jobs are scheduled correctly.
* Exclude from App Nap to keep timer enabled.
* Remove notifications for schedule changes, since we do it very often now.
* Add error message when Borg binary is missing. Fixes#333
* Test failures. Stick with PyQt 5.14 for now.
* Clarify exclude file placeholder text. Fixes#314
* Remove qtdarkstyle and custom fusion style.
* Support instant changes from light to dark style
* Adjust SVG icon colors on-the-fly, adjust to dark theme in real time (macOS)
* Add OS-independent dark mode detection. Fix QToolbox style after theme changes.
* Remove some unnecessary style options, like `uses_light_icon` and `use_dark_style`.
* Add helper class to manage Borg version and supported features. Fixes#205
* Add setuptools as dependency to ensure pkg_resources is available.
* Review fixes, check for ZStd support, refactor some relative imports.
* Repo-add dialog: Disable Blake2 options if not available.
* When disabling compression algos, select by value, not index.