Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
tuneit
Commits
4ec846c6
Commit
4ec846c6
authored
Feb 27, 2026
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preferences: add skip root modules setting
parent
6bcf27a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
ru.ximperlinux.TuneIt.gschema.xml
data/ru.ximperlinux.TuneIt.gschema.xml
+1
-1
preferences.py
src/preferences.py
+17
-0
setting.py
src/settings/setting/setting.py
+6
-0
No files found.
data/ru.ximperlinux.TuneIt.gschema.xml
View file @
4ec846c6
...
...
@@ -2,7 +2,7 @@
<schemalist
gettext-domain=
"tuneit"
>
<schema
id=
"ru.ximperlinux.TuneIt"
path=
"/ru.ximperlinux.TuneIt/"
>
<key
name=
"show-root-modules"
type=
"b"
>
<default>
fals
e
</default>
<default>
tru
e
</default>
<description>
Show modules that require root permissions
</description>
</key>
<key
name=
"disabled-modules"
type=
"as"
>
...
...
src/preferences.py
View file @
4ec846c6
...
...
@@ -12,6 +12,20 @@ class PreferencesDialog(Adw.PreferencesDialog):
icon_name
=
"application-x-addon-symbolic"
)
general_group
=
Adw
.
PreferencesGroup
(
title
=
_
(
"General"
),
)
show_root_row
=
Adw
.
SwitchRow
(
title
=
_
(
"Show modules that require root permissions"
),
subtitle
=
_
(
"You need root rights to read and modify system configs."
),
active
=
self
.
settings
.
get_boolean
(
"show-root-modules"
)
)
show_root_row
.
connect
(
"notify::active"
,
self
.
_on_show_root_toggled
)
general_group
.
add
(
show_root_row
)
page
.
add
(
general_group
)
group
=
Adw
.
PreferencesGroup
(
title
=
_
(
"Available Modules"
),
description
=
_
(
"Restart the application to apply changes"
)
...
...
@@ -32,6 +46,9 @@ class PreferencesDialog(Adw.PreferencesDialog):
page
.
add
(
group
)
self
.
add
(
page
)
def
_on_show_root_toggled
(
self
,
row
,
pspec
):
self
.
settings
.
set_boolean
(
"show-root-modules"
,
row
.
get_active
())
def
_on_switch_toggled
(
self
,
row
,
pspec
,
module_name
):
disabled
=
list
(
self
.
settings
.
get_strv
(
"disabled-modules"
))
if
row
.
get_active
():
...
...
src/settings/setting/setting.py
View file @
4ec846c6
from
gi.repository
import
Gio
from
.base
import
BaseSetting
from
.widgets
import
WidgetFactory
from
..backends
import
backend_factory
...
...
@@ -18,6 +20,10 @@ class Setting(BaseSetting):
def
create_row
(
self
):
if
self
.
root
is
True
:
self
.
logger
.
info
(
"Root is true"
)
settings
=
Gio
.
Settings
.
new
(
"ru.ximperlinux.TuneIt"
)
if
not
settings
.
get_boolean
(
"show-root-modules"
):
self
.
logger
.
info
(
"Root modules are hidden, skipping"
)
return
None
if
dclient
is
not
None
:
self
.
widget
=
WidgetFactory
.
create_widget
(
self
)
if
not
self
.
widget
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment