Commit Graph

74 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
6f465fc674
Make pylint happy
- fix super-with-arguments
- fix various other issues
- review broad-except and ignore where appropriate
2020-08-23 03:16:19 +02:00
Marta Marczykowska-Górecka
ee5625b65c
Use the new QubesDaemonAccessError
Replaces the old, unified approach.
2020-08-11 01:08:48 +02:00
Marta Marczykowska-Górecka
7cbc7d9db1
Global Settings now can function with partial permissions
Unreadable properties/features will be disabled, the tool will start
even if it can access nothing or almost nothing, and errors on settings
features/properties will now be communicated to the user.
2020-08-07 22:11:14 +02:00
Marta Marczykowska-Górecka
03c04cc93b
Fixed deprecated implicit conversion to int 2020-07-14 22:20:54 +02:00
Marta Marczykowska-Górecka
ab5e3dcfea
Improved Global Settings with more readable widget handling 2020-07-08 22:31:50 +02:00
Marta Marczykowska-Górecka
31eb6f9df7
Added GUI daemon options to global settings
fixes QubesOS/qubes-issues#2304
2020-07-07 21:56:37 +02:00
Marta Marczykowska-Górecka
0a1f12fb27
Fixed bug with Global Settings
Incorrectly named variable caused crash on start.
2019-11-30 13:37:33 +01:00
Frédéric Pierret (fepitre)
4c39d7bfc2
global_settings: copy env instead of global assignment 2019-11-12 22:49:09 +01:00
Frédéric Pierret (fepitre)
51acbde8d5
_run_qrexec_repo: default C local in subprocess call 2019-11-11 17:08:19 +01:00
Frédéric Pierret (fepitre)
0bacf37994
global_settings: make PEP8 happy 2019-11-11 17:05:02 +01:00
Marta Marczykowska-Górecka
b4cb9303bc
Fixed translation for application names 2019-11-09 00:50:44 +01:00
Marta Marczykowska-Górecka
46952ebad2
Added translation support to all untranslated qubesmanager files
references QubesOS/qubes-issues#5410
2019-10-29 12:28:22 +01:00
Marta Marczykowska-Górecka
74eba3bb7f
Removed not needed workaround for check-updates on dom0
And fixed test referring to it.
2019-10-17 00:29:10 +02:00
Marta Marczykowska-Górecka
5d88e5f851
Pylint fixes
Several minor fixes for updated pylint checker.
2019-09-26 22:44:05 +02:00
Marta Marczykowska-Górecka
32078242c9
Code deduplication and cleanup
Moved loop handling, exception handling and program
running methods of the gui tools to the utils file.

fixes QubesOS/qubes-issues#5342
2019-09-26 22:31:39 +02:00
Marek Marczykowski-Górecki
1edf363efe
Merge remote-tracking branch 'origin/pr/172'
* origin/pr/172:
  Say which repository caused the error in warnings
  Only make qrexec calls when necessary
  Squash more PyLint warnings
  Decode stderr in repo qrexec calls
  Fix error handling
  Fix `self` being undefined when showing warnings
  Only apply repo preferences when "OK" is clicked
  Don't use asserts for error handling
  Check that repo management succeeded
  Remove unnecessary assert
  Squash some PyLint warnings
  Add UI for managing Qubes update repositories
  Fix typo

Fixes QubesOS/qubes-issues#4550
2019-08-28 16:42:01 +02:00
AJ Jordan
7245603628
Say which repository caused the error in warnings 2019-07-03 01:48:55 -07:00
AJ Jordan
352c0d0386
Only make qrexec calls when necessary
This helps in situations where the qrexec calls are forbidden; it also
prevents settings from being unintentionally changed and gives a
noticeable performance boost when the "OK" button is clicked.
2019-07-03 01:46:39 -07:00
AJ Jordan
e0919beec1
Squash more PyLint warnings
This definitely worked before, and I haven't touched this code recently
so I have no idea why these errors are just now popping up... but
whatever.
2019-07-02 16:04:04 -07:00
AJ Jordan
6a5823b74a
Decode stderr in repo qrexec calls
Before this change, "foobar\n" on stderr would be rendered (in the
warning dialog) as "b'foobar\n'", which is ugly. Now it'll be rendered
just as "foobar", followed by an actual newline character.
2019-07-02 13:45:21 -07:00
AJ Jordan
4931bf9401
Fix error handling
Apparently Python exceptions don't take **kwargs, so we just pass a
dictionary as the second (regular) argument. While we're at it, we
pretty-print said dictionary when displaying error messages.
2019-07-02 13:37:29 -07:00
AJ Jordan
33ef478626
Fix self being undefined when showing warnings 2019-07-02 13:07:06 -07:00
AJ Jordan
026a844a91
Only apply repo preferences when "OK" is clicked 2019-07-02 12:36:29 -07:00
AJ Jordan
f3305b8288
Don't use asserts for error handling 2019-07-02 12:36:22 -07:00
AJ Jordan
8f9989a61d
Check that repo management succeeded 2019-07-01 17:23:49 -07:00
AJ Jordan
047cfbc407
Remove unnecessary assert
First of all, the method that was being called has asserts of its own,
so it's guaranteed to either succeed or crash the program with
AssertionError. Second, asserts are optimized out by the interpreter
when -O is passed. Therefore, this code is buggy because it sometimes
wouldn't be run, but we need the side effects.
2019-07-01 17:23:48 -07:00
AJ Jordan
df48c749c4
Squash some PyLint warnings 2019-07-01 17:23:46 -07:00
AJ Jordan
fdd06d32a5
Add UI for managing Qubes update repositories
Depends on QubesOS/qubes-core-admin-linux#48

Fixes QubesOS/qubes-issues#4550
2019-07-01 17:23:40 -07:00
AJ Jordan
a8df324b2d
Fix typo 2019-07-01 17:23:31 -07:00
Marta Marczykowska-Górecka
e79724f9db
Update Qt version used in qubesmanager to Qt5
Fixed dependencies, places where obsolete functions stopped working,
code fragments that started throwing warnings and an .ui file that
stopped being readable after the update.
2019-05-30 21:33:49 +02:00
Marta Marczykowska-Górecka
733f00ddf2
Fixed unnecessary property set in Global Settings 2019-05-03 14:41:01 +02:00
Marta Marczykowska-Górecka
b9316bcd62
Fixed bug in Global Settings
Incorrect handling of Check dom0 updates being set to false.

fixes QubesOS/qubes-issues#4988
2019-05-03 14:41:00 +02:00
Marta Marczykowska-Górecka
00ccce4816
Fixed minor errors found when debugging feature settings
the check-updates default was being incorrectly set
2019-03-21 14:47:03 +01:00
M. Vefa Bicakci
7df475e0aa
global_settings: Use MiB, not M as the unit
Prior to this commit, clicking on the "OK" button in the global settings
window would cause the dom0 memory boost and minimum VM memory fields to
be saved incorrectly, due to the fact that the code calculates the
values to be saved using the "MiB" as the units (i.e., factors of
1024), whereas the code would save the corresponding string into the
qmemman configuration file with the "M" suffix (indicating factors of
1000 instead of 1024).

Due to this bug, the aforementioned fields' values would be scaled down
every time the user clicked on the "OK" button in the global settings
window. For example, if the user entered 400 and hit 'OK', opening the
global settings window again would show the value 381.
2019-01-16 21:17:52 -05:00
Marta Marczykowska-Górecka
a4c63cc939
And also fixed problem with setting default template to None
The bug was the same.
2018-07-22 23:57:50 +02:00
Marta Marczykowska-Górecka
6377983f9a
Fixed problem with setting default_dispvm to None in Global Settings
fixes QubesOS/qubes-issues#4114
2018-07-22 23:55:09 +02:00
Marta Marczykowska-Górecka
efa2b2d858
Remove templates from listing in UpdateVM and ClockVm in Global Settings
A user should not be able to set a TemplateVM as an UpdateVM or ClockVM
in Global Settings.

fixes QubesOS/qubes-issues#1831
2018-07-12 21:22:15 +02:00
Marta Marczykowska-Górecka
7ed386985d
Added default_dispvm to Global Settings
Added "default dispvm" to Global Settings.

references QubesOS/qubes-issues#3688
2018-03-14 22:21:33 +01:00
Marta Marczykowska-Górecka
91538f1aaf
Apply changes in global settings only when actual changes occurred
Fixed apply methods to check if there is an actual need to apply
changes.
2018-03-02 14:30:56 +01:00
Marta Marczykowska-Górecka
43520331f2
Fix pylint's critique 2018-03-02 01:04:02 +01:00
Marta Marczykowska-Górecka
b08ce9524f
Replaced single check vm updates checkbox
Now there is a checkbox for the default for new VMs, and two
buttons to either disable checking for updates in all VMs or enable it
in all VMs.
2018-02-22 22:24:34 +01:00
Marta Marczykowska-Górecka
02117b1870
Restored check-dom0-updates functionality in Global Settings
Currently it uses a workaround, manually creating a file in
/var/lib/qubes/updates; once the appropriate attribute will start working
it will be used instead.
2018-02-22 22:22:45 +01:00
Marta Marczykowska-Górecka
0700275586
De-uglify kernel selection in Global Settings
Replaced kernel selection with utils.prepare_kernel; also added option
to utils.prepare_choice to treat empty string as None (applicable to
kernels).
2018-02-22 22:22:42 +01:00
Marta Marczykowska-Górecka
4882013a32
De-uglify default template in Global Settings
Replaced old, manual vm list with a nicer, less disgusting
utils.prepare_vm_choice approach.
2018-02-22 22:21:39 +01:00
Marta Marczykowska-Górecka
84d7e8bf9c
Allow setting default NetVM to None in Global Settings
Replaced old, manual vm list with a nicer, less disgusting
utils.prepare_vm_choice approach.
2018-02-22 22:21:39 +01:00
Marta Marczykowska-Górecka
29a56d9c88
Fixed error in setting Clockvm to None in Global Settings
Replaced old, manual vm list with a nicer, less disgusting
utils.prepare_vm_choice approach.
2018-02-22 22:21:39 +01:00
Marta Marczykowska-Górecka
c1e9074cb9
Fixed error in setting Updatevm to None in Global Settings
Replaced old, manual vm list with a nicer, less disgusting
utils.prepare_vm_choice approach.
2018-02-22 22:21:39 +01:00
Marta Marczykowska-Górecka
5f1e4803fe
Applied corrections from @marmarek 2017-11-17 17:42:19 +01:00
Marta Marczykowska-Górecka
135060dfe7
Final corrections
Errors that my local pylint ignored and travis' pylint didn't.
2017-11-14 15:44:43 +01:00
Marta Marczykowska-Górecka
8cfc93c70c
Misc errors part 2
Renamed variable from 'input' to 'input_string' and moved imports to a
better place (that is, at the beginning of the module and not inside of
a function).
2017-11-09 17:57:21 +01:00