Commit Graph

62 Commits

Author SHA1 Message Date
Matthias Hagmann 7ef3059b69 clean up: Remove editor specific marks
Related #2273
2024-02-29 10:10:46 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Peter F. Patel-Schneider 6f633efac5 ui: implement setting_changed callback and pass in to new devices and receivers 2024-02-20 06:19:23 -05:00
Peter F. Patel-Schneider ab9e06829a ui: move ui_async to common.py 2024-02-18 08:09:34 -05:00
Peter F. Patel-Schneider d1c899d6da solaar: improve imports and guard Gtk, etc imports with correct version
solaar: move imports to top of files

solaar: move more imports to top of files

solaar: guard Gtk, etc imports with correct version
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider 17e6463950 ui: improve imports in ui
ui: move imports in about.py to top of file

ui: move imports to top of notify.py

ui: move imports to top of window.py

ui: reorder imports at beginning of __init__.py

ui: move imports to top of tray.py

ui: move common code out of __init__.py to common.py

ui: move imports to top of __init___.py
2024-02-18 06:21:35 -05:00
MattHag 87658fb189
logging: Simplify logger instantiation
* logging: Simplify logger instantiation

Relates #2254

* logging: Remove aliases

Relates #2254

* logging: Replace deprecated warn with warning

Related #2254

* logging: Fix mistake

Related #2257
2024-02-10 13:55:27 -05:00
Peter F. Patel-Schneider 7215022089 ui: improve error pop-up for errors when creating devices 2022-12-17 13:28:11 -05:00
ejsc1 5656f90cdb
misc: update yapf version
* misc: update yapf version v2

* Update .pre-commit-config.yaml

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2022-11-26 22:37:32 -05:00
Peter F. Patel-Schneider 80c09002a8 ui: print message when there is another Solaar process running 2022-04-15 09:21:08 -04:00
Bastien Nocera b3cfd0f762 Make APP_ID match real application ID
The application advertises itself as io.github.pwr_solaar.solaar through
its appdata file, so name the application this way too.

This fixes this warning in Flatpak:
Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
2022-04-05 06:39:25 -04:00
Peter F. Patel-Schneider e628298c0a cli: make solaar config changes also take effect in solaar ui if running 2022-03-16 09:20:12 -04:00
Vinícius 6022c37325 ui: add device selector to Set rule editor 2022-01-24 11:12:04 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Hugo Osvaldo Barrera b96d16672b Drop obsolete encoding declaration
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Peter F. Patel-Schneider 9842972d8b receiver: handle exception when device is not available while being added 2021-04-04 22:33:38 -04:00
Antony Kellermann 98b4aff33d Fix warning 2020-10-25 14:02:25 -04:00
Peter F. Patel-Schneider 7908a4f5a4 ui: ensure that Gtk 3.0 is the version loaded 2020-10-01 17:45:49 -04:00
Peter F. Patel-Schneider 2654b6bbe0 ui: add forced-refresh argument to window update 2020-09-28 12:59:04 -04:00
Filipe Laíns 27c90fa736 yapf: adjust style to not indent closing brackets
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 8e89aa0038 yapf: set max line lenght to 127
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 627185079f flake8: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 33521558ed pre-commit: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns e6369e0c3c isort: intial import fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 72a8d311bc yapf: change code style to yapf
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Peter F. Patel-Schneider 4afe8c893b ui: add option to show the main window or run solaar without tray 2020-02-17 08:35:47 +00:00
Peter F. Patel-Schneider 1bc189e2fe ui: add --tray option to start without window visible 2020-01-22 22:22:14 +00:00
Jason Tibbitts d021d87656 Python 3.7 compatibility fixes
This fixes the python 3.7 incompatibilities arising from 'async'
becoming a reserved word.

The file lib/solaar/async.py is renamed to asks.py.  I picked the name
because it defines the TaskRunner class and it's the best I could come
up in fifteen seconds.

The async function in solar/ui/__init__.py is renamed to ui_async, and
the various imports of that function are changed to match.

Without this patch it doesn't build at all.  I am running with this
patch applied and everything appears to work as expected.

Signed-off-by: Jason Tibbitts <tibbs@math.uh.edu>
2018-08-07 12:51:32 -04:00
Hugo Osvaldo Barrera 63a98819a6 Don't open a main window when battery is critical
The main window suddenly opening when a battery is critical is very
disruptive. It can pop up on all sort of undesirable scenarios.

Rather than catch users of guard, merely show a notification that the
battery is critical.
2016-02-19 03:25:55 -03:00
Daniel Pavel db48fe1b40 re-formatted translation files 2013-08-08 22:41:57 +02:00
Daniel Pavel 22656d5b82 use Gtk.Application properly 2013-08-08 21:49:35 +02:00
Daniel Pavel 3d4570cd1f check the Gtk bindings version at start-up 2013-07-20 06:22:15 +02:00
Daniel Pavel 5d5f97a776 Gtk.Application.get_dbus_object_path my be missing 2013-07-18 14:06:51 +02:00
Daniel Pavel 38c76393b1 added copyright notices to all source files 2013-07-15 17:54:42 +02:00
Daniel Pavel ce9b10dc2d started i18n support 2013-07-15 17:16:44 +02:00
Daniel Pavel 16af3a9acc version 0.9.1 2013-07-13 11:24:41 +02:00
Daniel Pavel 43ab629a26 moved logitech.unifying_receiver package to logitech_receiver 2013-07-12 22:48:09 +02:00
Daniel Pavel 85efe92d30 replaced appinstance with GtkApplication 2013-07-09 17:52:07 +02:00
Daniel Pavel 0d89d1e6c8 formatting fix in unpairing error dialog 2013-07-07 01:31:22 +02:00
Daniel Pavel faa6de3b75 more explicit error dialogs, when possible 2013-07-06 14:20:50 +02:00
Daniel Pavel bd3198f6f0 correctly handle out-of-process pairing and unpairing 2013-07-05 16:06:38 +02:00
Daniel Pavel 47bcd4478c prettier error message if unpair fails 2013-07-05 14:35:06 +02:00
Daniel Pavel edce56cd20 use a single separate thread for all possibly long-running stuff in GUI 2013-07-04 13:23:25 +02:00
Daniel Pavel b1e9480f5a minor logging tweaks 2013-07-01 15:00:21 +02:00
Daniel Pavel fd35f23af7 one a separate flag to check if the device is active 2013-06-21 15:17:14 +02:00
Daniel Pavel 4bc525f250 minor clean-ups 2013-06-20 11:02:45 +02:00
Daniel Pavel cd44cc6396 new single-window UI 2013-06-19 15:28:13 +02:00
Daniel Pavel 03e20842fb cleaned-up gtk ui initialization 2013-06-12 14:29:34 +02:00
Daniel Pavel b98e27e464 fix permissions error popup 2013-06-08 21:04:32 +02:00
Daniel Pavel 46544e1cbe listen for udev events on the GLib main loop 2013-06-07 14:39:04 +02:00