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
1
Merge Requests
1
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
e56b697c
Commit
e56b697c
authored
Jan 22, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
ca2b7a56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
main.py
src/settings/main.py
+1
-1
yml_tools.py
src/settings/tools/yml_tools.py
+0
-12
No files found.
src/settings/main.py
View file @
e56b697c
...
...
@@ -3,7 +3,7 @@ from gi.repository import Adw, Gtk
from
.backends
import
backend_factory
from
.daemon_client
import
dclient
from
.tools.yml_tools
import
load_modules
,
merge_categories_by_name
from
.tools.yml_tools
import
load_modules
from
.tools.gvariant
import
convert_by_gvariant
from
.widgets
import
WidgetFactory
from
.widgets.panel_row
import
TuneItPanelRow
...
...
src/settings/tools/yml_tools.py
View file @
e56b697c
...
...
@@ -43,15 +43,3 @@ def load_yaml_files_from_directory(directory):
except
yaml
.
YAMLError
as
e
:
print
(
f
"Ошибка при чтении файла {file_path}: {e}"
)
return
yaml_data
def
merge_categories_by_name
(
categories_data
):
categories_dict
=
{}
for
category_data
in
categories_data
:
category_name
=
category_data
[
'name'
]
if
category_name
not
in
categories_dict
:
categories_dict
[
category_name
]
=
category_data
else
:
categories_dict
[
category_name
][
'sections'
]
.
extend
(
category_data
[
'sections'
])
return
list
(
categories_dict
.
values
())
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