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
e71e0247
Commit
e71e0247
authored
Jan 13, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-build' into 'master'
Fix build See merge request
!1
parents
06d878a9
629b819a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
9 deletions
+64
-9
meson.build
meson.build
+1
-1
ru.ximperlinux.TuteIt.json
ru.ximperlinux.TuteIt.json
+41
-1
meson.build
src/meson.build
+1
-1
__init__.py
src/settings/__init__.py
+2
-5
yml_tools.py
src/settings/tools/yml_tools.py
+19
-1
No files found.
meson.build
View file @
e71e0247
project('
ximper-
tuneit',
project('tuneit',
version: '0.1.0',
version: '0.1.0',
meson_version: '>= 1.0.0',
meson_version: '>= 1.0.0',
default_options: [ 'warning_level=2', 'werror=false', ],
default_options: [ 'warning_level=2', 'werror=false', ],
...
...
ru.ximperlinux.TuteIt.json
View file @
e71e0247
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
"--share=ipc"
,
"--share=ipc"
,
"--socket=fallback-x11"
,
"--socket=fallback-x11"
,
"--device=dri"
,
"--device=dri"
,
"--socket=wayland"
"--socket=wayland"
,
"--filesystem=home"
],
],
"cleanup"
:
[
"cleanup"
:
[
"/include"
,
"/include"
,
...
@@ -24,6 +25,45 @@
...
@@ -24,6 +25,45 @@
],
],
"modules"
:
[
"modules"
:
[
{
{
"name"
:
"blueprint-compiler"
,
"buildsystem"
:
"meson"
,
"sources"
:
[
{
"type"
:
"git"
,
"url"
:
"https://gitlab.gnome.org/jwestman/blueprint-compiler"
,
"branch"
:
"main"
}
]
},
{
"name"
:
"python3-docutils"
,
"buildsystem"
:
"simple"
,
"build-commands"
:
[
"pip3 install --verbose --exists-action=i --no-index --find-links=
\"
file://${PWD}
\"
--prefix=${FLATPAK_DEST}
\"
docutils
\"
--no-build-isolation"
],
"sources"
:
[
{
"type"
:
"file"
,
"url"
:
"https://files.pythonhosted.org/packages/26/87/f238c0670b94533ac0353a4e2a1a771a0cc73277b88bff23d3ae35a256c1/docutils-0.20.1-py3-none-any.whl"
,
"sha256"
:
"96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"
}
]
},
{
"name"
:
"python3-PyYAML"
,
"buildsystem"
:
"simple"
,
"build-commands"
:
[
"pip3 install --verbose --exists-action=i --no-index --find-links=
\"
file://${PWD}
\"
--prefix=${FLATPAK_DEST}
\"
PyYAML
\"
--no-build-isolation"
],
"sources"
:
[
{
"type"
:
"file"
,
"url"
:
"https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"
,
"sha512"
:
"a675e0056bb6af9119c7f2796e349ced05afca64118a5b444d66dafcb6a774cf274eeba7eab044b86eb6c12a9d7c785c654f6cf229e1d190340dd06ea76e25ec"
}
]
},
{
"name"
:
"tuneit"
,
"name"
:
"tuneit"
,
"builddir"
:
true
,
"builddir"
:
true
,
"buildsystem"
:
"meson"
,
"buildsystem"
:
"meson"
,
...
...
src/meson.build
View file @
e71e0247
...
@@ -28,7 +28,7 @@ conf.set('pkgdatadir', pkgdatadir)
...
@@ -28,7 +28,7 @@ conf.set('pkgdatadir', pkgdatadir)
configure_file(
configure_file(
input: 'tuneit.in',
input: 'tuneit.in',
output: '
ximper-
tuneit',
output: 'tuneit',
configuration: conf,
configuration: conf,
install: true,
install: true,
install_dir: get_option('bindir'),
install_dir: get_option('bindir'),
...
...
src/settings/__init__.py
View file @
e71e0247
from
gi.repository
import
Adw
,
Gtk
from
gi.repository
import
Adw
,
Gtk
from
.backends
import
backend_factory
from
.backends
import
backend_factory
from
.tools.yml_tools
import
load_
yaml_files_from_directory
,
merge_categories_by_name
from
.tools.yml_tools
import
load_
modules
,
merge_categories_by_name
from
.widgets
import
WidgetFactory
from
.widgets
import
WidgetFactory
...
@@ -166,11 +166,8 @@ class Category:
...
@@ -166,11 +166,8 @@ class Category:
stack_page
.
set_title
(
self
.
name
)
stack_page
.
set_title
(
self
.
name
)
stack_page
.
set_name
(
self
.
name
)
stack_page
.
set_name
(
self
.
name
)
def
init_settings_stack
(
stack
,
listbox
,
split_view
):
def
init_settings_stack
(
stack
,
listbox
,
split_view
):
yaml_files_directory
=
"/usr/share/ximper-tuneit/modules"
# Укажите путь к папке с YAML файлами
yaml_data
=
load_modules
()
yaml_data
=
load_yaml_files_from_directory
(
yaml_files_directory
)
merged_data
=
merge_categories_by_name
(
yaml_data
)
merged_data
=
merge_categories_by_name
(
yaml_data
)
section_factory
=
SectionFactory
()
section_factory
=
SectionFactory
()
...
...
src/settings/tools/yml_tools.py
View file @
e71e0247
...
@@ -2,6 +2,23 @@ import os
...
@@ -2,6 +2,23 @@ import os
import
yaml
import
yaml
def
get_local_share_directory
():
home_directory
=
os
.
path
.
expanduser
(
"~"
)
local_share_directory
=
os
.
path
.
join
(
home_directory
,
".local"
,
"share"
,
"tuneit"
)
return
local_share_directory
def
load_modules
():
modules
=
[]
local_share_directory
=
get_local_share_directory
()
modules_directory
=
os
.
path
.
join
(
local_share_directory
,
"modules"
)
if
not
os
.
path
.
exists
(
modules_directory
):
print
(
f
"Директория {modules_directory} не существует"
)
return
modules
modules
=
load_yaml_files_from_directory
(
modules_directory
)
return
modules
def
load_yaml_files_from_directory
(
directory
):
def
load_yaml_files_from_directory
(
directory
):
yaml_data
=
[]
yaml_data
=
[]
...
@@ -26,6 +43,7 @@ def merge_categories_by_name(categories_data):
...
@@ -26,6 +43,7 @@ def merge_categories_by_name(categories_data):
if
category_name
not
in
categories_dict
:
if
category_name
not
in
categories_dict
:
categories_dict
[
category_name
]
=
category_data
categories_dict
[
category_name
]
=
category_data
else
:
else
:
categories_dict
[
category_name
][
'sections'
]
.
extend
(
category_data
[
'sections'
])
categories_dict
[
category_name
][
'sections'
]
.
extend
(
category_data
[
'sections'
])
return
list
(
categories_dict
.
values
())
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