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
4d0225a1
Commit
4d0225a1
authored
Jan 20, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init TuneItPanelRow
parent
51a81b8a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
3 deletions
+63
-3
LINGUAS
po/LINGUAS
+2
-0
main.py
src/settings/main.py
+4
-3
panel_row.blp
src/settings/widgets/panel_row.blp
+31
-0
panel_row.py
src/settings/widgets/panel_row.py
+25
-0
tuneit.gresource.xml
src/tuneit.gresource.xml
+1
-0
No files found.
po/LINGUAS
View file @
4d0225a1
# Please keep this file sorted alphabetically.
# Please keep this file sorted alphabetically.
ru_RU
\ No newline at end of file
src/settings/main.py
View file @
4d0225a1
...
@@ -6,6 +6,7 @@ from .daemon_client import dclient
...
@@ -6,6 +6,7 @@ from .daemon_client import dclient
from
.tools.yml_tools
import
load_modules
,
merge_categories_by_name
from
.tools.yml_tools
import
load_modules
,
merge_categories_by_name
from
.tools.gvariant
import
convert_by_gvariant
from
.tools.gvariant
import
convert_by_gvariant
from
.widgets
import
WidgetFactory
from
.widgets
import
WidgetFactory
from
.widgets.panel_row
import
TuneItPanelRow
from
.widgets.service_dialog
import
ServiceNotStartedDialog
from
.widgets.service_dialog
import
ServiceNotStartedDialog
...
@@ -239,11 +240,11 @@ def init_settings_stack(stack, listbox, split_view):
...
@@ -239,11 +240,11 @@ def init_settings_stack(stack, listbox, split_view):
pages
=
stack
.
get_pages
()
pages
=
stack
.
get_pages
()
for
i
in
range
(
pages
.
get_n_items
()):
for
i
in
range
(
pages
.
get_n_items
()):
page
=
pages
.
get_item
(
i
)
page
=
pages
.
get_item
(
i
)
label
=
Gtk
.
Label
(
label
=
page
.
get_title
(),
xalign
=
0
)
row
=
Gtk
.
ListBox
Row
()
row
=
TuneItPanel
Row
()
row
.
set_name
(
page
.
get_name
())
row
.
set_name
(
page
.
get_name
())
row
.
set_child
(
label
)
row
.
set_title
(
page
.
get_title
())
row
.
icon_name
=
"preferences-system"
listbox
.
append
(
row
)
listbox
.
append
(
row
)
...
...
src/settings/widgets/panel_row.blp
0 → 100644
View file @
4d0225a1
using Gtk 4.0;
using Adw 1;
template $TuneItPanelRow: Adw.PreferencesRow {
child: Box {
spacing: 12;
margin-start: 6;
margin-end: 6;
margin-top: 12;
margin-bottom: 12;
Image thumbnail_image {
icon-name: bind template.icon-name;
}
Box {
orientation: vertical;
Label label {
label: bind template.title;
}
// Label sub_label {
// label: bind template.subtitle;
// styles [
// "caption"
// ]
// }
}
};
}
src/settings/widgets/panel_row.py
0 → 100644
View file @
4d0225a1
from
gi.repository
import
GObject
,
Adw
,
Gtk
@Gtk.Template
(
resource_path
=
'/ru.ximperlinux.TuneIt/settings/widgets/panel_row.ui'
)
class
TuneItPanelRow
(
Adw
.
PreferencesRow
):
__gtype_name__
=
"TuneItPanelRow"
def
__init__
(
self
,
**
kwargs
):
super
()
.
__init__
(
**
kwargs
)
@GObject.Property
(
type
=
str
,
default
=
""
)
def
icon_name
(
self
):
return
self
.
_icon_name
@icon_name.setter
def
icon_name
(
self
,
icon_name
):
self
.
_icon_name
=
icon_name
@GObject.Property
(
type
=
str
,
default
=
""
)
def
subtitle
(
self
):
return
self
.
_subtitle
@subtitle.setter
def
subtitle
(
self
,
subtitle
):
self
.
_subtitle
=
subtitle
src/tuneit.gresource.xml
View file @
4d0225a1
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<gresources>
<gresources>
<gresource
prefix=
"/ru.ximperlinux.TuneIt"
>
<gresource
prefix=
"/ru.ximperlinux.TuneIt"
>
<file
preprocess=
"xml-stripblanks"
>
window.ui
</file>
<file
preprocess=
"xml-stripblanks"
>
window.ui
</file>
<file
preprocess=
"xml-stripblanks"
>
settings/widgets/panel_row.ui
</file>
<file
preprocess=
"xml-stripblanks"
>
gtk/help-overlay.ui
</file>
<file
preprocess=
"xml-stripblanks"
>
gtk/help-overlay.ui
</file>
</gresource>
</gresource>
</gresources>
</gresources>
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