Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm-play-gui
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
Roman Alifanov
eepm-play-gui
Commits
dce5d6e3
Commit
dce5d6e3
authored
Oct 08, 2024
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Some changes See merge request
!1
parents
cd15cdba
bc42a32c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
227 additions
and
169 deletions
+227
-169
.gitignore
.gitignore
+14
-2
ru.eepm.PlayGUI.desktop.in
data/ru.eepm.PlayGUI.desktop.in
+1
-2
ru.eepm.PlayGUI.metainfo.xml.in
data/ru.eepm.PlayGUI.metainfo.xml.in
+6
-6
meson.build
meson.build
+3
-1
POTFILES
po/POTFILES
+1
-0
meson.build
po/meson.build
+1
-1
ru.po
po/ru.po
+46
-28
main.py
src/main.py
+5
-10
meson.build
src/meson.build
+7
-13
window.py
src/window.py
+17
-13
window.ui
src/window.ui
+126
-93
No files found.
.gitignore
View file @
dce5d6e3
.idea
\ No newline at end of file
.idea
# vscode
.vscode
# .po
*.mo
*.pot
# flatpak
.flatpak
# meson
_build
data/ru.eepm.PlayGUI.desktop.in
View file @
dce5d6e3
[Desktop Entry]
Name=eepm play
Exec=eepm-play-gui
Exec=eepm-play-gui
%U
Icon=ru.eepm.PlayGUI
Comment=Install applications from official sites
Comment[ru]=Установка приложений с официальных сайтов
Terminal=false
Type=Application
...
...
data/ru.eepm.PlayGUI.metainfo.xml.in
View file @
dce5d6e3
<?xml version="1.0" encoding="UTF-8"?>
<component
type=
"desktop"
>
<id>
ru.eepm.PlayGUI.desktop
</id>
<metadata_license>
CC0-1.0
</metadata_license>
<project_license>
AGPL-3.0-or-later
</project_license>
<description>
<p>
No description
</p>
</description>
<id>
ru.eepm.PlayGUI.desktop
</id>
<metadata_license>
CC0-1.0
</metadata_license>
<project_license>
AGPL-3.0-or-later
</project_license>
<description>
<p>
No description
</p>
</description>
</component>
meson.build
View file @
dce5d6e3
...
...
@@ -6,8 +6,10 @@ project('eepm-play-gui',
i18n = import('i18n')
gnome = import('gnome')
python = import('python')
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
moduledir = pkgdatadir / 'eepm_play_gui'
subdir('data')
subdir('src')
...
...
po/POTFILES
View file @
dce5d6e3
...
...
@@ -2,5 +2,6 @@ data/ru.eepm.PlayGUI.desktop.in
data/ru.eepm.PlayGUI.metainfo.xml.in
data/ru.eepm.PlayGUI.gschema.xml
src/main.py
src/help-overlay.ui
src/window.py
src/window.ui
po/meson.build
View file @
dce5d6e3
i18n.gettext(
'eepm-play-gui'
, preset: 'glib')
i18n.gettext(
meson.project_name()
, preset: 'glib')
po/ru.po
View file @
dce5d6e3
msgid ""
msgstr ""
"Project-Id-Version: ru.eepm.PlayGUI\n"
"POT-Creation-Date: 2024-10-07 19:12+0300\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-08 12:09+0300\n"
"PO-Revision-Date: 2024-10-07 19:17+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
...
...
@@ -13,60 +14,77 @@ msgstr ""
"X-Poedit-Basepath: ../src\n"
"X-Poedit-SearchPath-0: .\n"
#: gtk/help-overlay.ui:11
#: data/ru.eepm.PlayGUI.desktop.in:3
msgid "eepm play"
msgstr ""
#: data/ru.eepm.PlayGUI.desktop.in:7
#, fuzzy
msgid "Install applications from official sites"
msgstr "Установить программы"
#: data/ru.eepm.PlayGUI.metainfo.xml.in:7
msgid "No description"
msgstr ""
#: data/ui/help-overlay.ui:11
msgctxt "shortcut window"
msgid "General"
msgstr ""
#:
gtk
/help-overlay.ui:14
#:
data/ui
/help-overlay.ui:14
msgctxt "shortcut window"
msgid "Show Shortcuts"
msgstr ""
#:
gtk
/help-overlay.ui:20
#:
data/ui
/help-overlay.ui:20
msgctxt "shortcut window"
msgid "Quit"
msgstr "Выйти"
#: window.py:167
msgid "Remove and install applications"
msgstr "Удалить и установить программы"
#: window.py:168
msgid "Install applications"
msgstr "Установить программы"
#: window.py:169
msgid "Remove applications"
msgstr "Удалить программы"
#: window.py:170 window.ui:100
msgid "Update applications"
msgstr "Обновить программы"
#: data/ui/window.ui:46
msgid "Getting packages list…"
msgstr "Получение списка пакетов…"
#:
window.ui:20
msgid "
Menu
"
msgstr ""
#:
data/ui/window.ui:47
msgid "
It could take a while
"
msgstr "
Это может занять некоторое время
"
#:
window.ui:48
#:
data/ui/window.ui:79
msgid "All"
msgstr "Все"
#:
window.ui:49
#:
data/ui/window.ui:80
msgid "Installed"
msgstr "Установленные"
#:
window.ui:50
#:
data/ui/window.ui:81
msgid "Uninstalled"
msgstr "Неустановленные"
#:
window.ui:51
#:
data/ui/window.ui:82
msgid "Changed"
msgstr "Изменённые"
#: window.ui:122
#: data/ui/window.ui:132 src/window.py:180
msgid "Update applications"
msgstr "Обновить программы"
#: data/ui/window.ui:158
msgid "_About Eepm-play-gui"
msgstr "О программе"
msgstr "_О программе"
#: src/window.py:177
msgid "Remove and install applications"
msgstr "Удалить и установить программы"
#: src/window.py:178
msgid "Install applications"
msgstr "Установить программы"
#: src/window.py:179
msgid "Remove applications"
msgstr "Удалить программы"
#~ msgid "Apply"
#~ msgstr "Применить"
src/main.py
View file @
dce5d6e3
...
...
@@ -36,11 +36,6 @@ class EepmPlayGuiApplication(Adw.Application):
self
.
create_action
(
'quit'
,
lambda
*
_
:
self
.
quit
(),
[
'<primary>q'
])
self
.
create_action
(
'about'
,
self
.
on_about_action
)
provider
=
Gtk
.
CssProvider
()
provider
.
load_from_resource
(
"/ru/eepm/PlayGUI/style.css"
)
display
=
Gdk
.
Display
.
get_default
()
Gtk
.
StyleContext
.
add_provider_for_display
(
display
,
provider
,
Gtk
.
STYLE_PROVIDER_PRIORITY_APPLICATION
)
def
do_activate
(
self
):
"""Called when the application is activated.
...
...
@@ -54,16 +49,16 @@ class EepmPlayGuiApplication(Adw.Application):
def
on_about_action
(
self
,
widget
,
_
):
"""Callback for the app.about action."""
about
=
Adw
.
AboutWindow
(
transient_for
=
self
.
props
.
active_window
,
application_name
=
'eepm-play-gui'
,
about
=
Adw
.
AboutDialog
(
application_name
=
'eepm-play-gui'
,
application_icon
=
'ru.eepm.PlayGUI'
,
developer_name
=
'Etersoft'
,
version
=
'0.2.0'
,
developers
=
[
'Ximper'
],
artists
=
[
'Ximper'
,
"Vladimir Vaskov <rirusha@altlinux.org>"
],
developers
=
[
'Ximper'
,
"Vladimir Vaskov <rirusha@altlinux.org>"
],
designers
=
[
'Ximper'
,
"Vladimir Vaskov <rirusha@altlinux.org>"
],
artists
=
[
'Ximper'
],
license_type
=
Gtk
.
License
.
AGPL_3_0
,
copyright
=
'© 2024 Etersoft'
)
about
.
present
()
about
.
present
(
self
.
props
.
active_window
)
def
create_action
(
self
,
name
,
callback
,
shortcuts
=
None
):
"""Add an application action.
...
...
src/meson.build
View file @
dce5d6e3
pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
moduledir = pkgdatadir / 'eepm_play_gui'
gnome = import('gnome')
gnome.compile_resources('eepm-play-gui',
'eepm-play-gui.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
python = import('python')
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').full_path())
conf.set('VERSION', meson.project_version())
...
...
@@ -26,6 +13,13 @@ configure_file(
install_mode: 'r-xr-xr-x'
)
gnome.compile_resources('eepm-play-gui',
'eepm-play-gui.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
eepm_play_gui_sources = [
'__init__.py',
'main.py',
...
...
src/window.py
View file @
dce5d6e3
...
...
@@ -17,7 +17,7 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from
gi.repository
import
Gtk
,
Adw
from
gi.repository
import
Gtk
,
Adw
,
GObject
import
gettext
gettext
.
textdomain
(
'eepm-play-gui'
)
...
...
@@ -83,10 +83,16 @@ class LogDialog(Adw.Dialog):
@Gtk.Template
(
resource_path
=
'/ru/eepm/PlayGUI/window.ui'
)
class
EepmPlayGuiWindow
(
Adw
.
ApplicationWindow
):
__gtype_name__
=
'EepmPlayGuiWindow'
is_loading
=
GObject
.
Property
(
type
=
bool
,
default
=
True
)
search_entry
=
Gtk
.
Template
.
Child
()
search_bar
=
Gtk
.
Template
.
Child
()
search_toggle_button
=
Gtk
.
Template
.
Child
()
main_stack
=
Gtk
.
Template
.
Child
()
search_dropdown
=
Gtk
.
Template
.
Child
()
loading_spinner
=
Gtk
.
Template
.
Child
()
choice_listbox
=
Gtk
.
Template
.
Child
()
apply_button
=
Gtk
.
Template
.
Child
()
...
...
@@ -96,6 +102,9 @@ class EepmPlayGuiWindow(Adw.ApplicationWindow):
self
.
checkboxes
=
None
self
.
apply_button
.
connect
(
"activated"
,
self
.
on_apply_clicked
)
self
.
connect
(
"notify::is-loading"
,
self
.
on_is_loading_changed
)
self
.
search_bar
.
connect_entry
(
self
.
search_entry
)
self
.
search_entry
.
connect
(
"search-changed"
,
self
.
on_search_changed
)
self
.
search_dropdown
.
connect
(
"notify::selected"
,
self
.
on_filter_changed
)
...
...
@@ -105,14 +114,9 @@ class EepmPlayGuiWindow(Adw.ApplicationWindow):
self
.
dialog
=
LogDialog
(
win
=
self
)
self
.
update_ui
()
def
show_loading_spinner
(
self
):
self
.
loading_spinner
.
set_visible
(
True
)
self
.
choice_listbox
.
set_visible
(
False
)
# Скрыть группу настроек во время загрузки
def
hide_loading_spinner
(
self
):
self
.
loading_spinner
.
set_visible
(
False
)
self
.
choice_listbox
.
set_visible
(
True
)
def
on_is_loading_changed
(
self
,
obj
,
_pspec
):
self
.
main_stack
.
props
.
visible_child_name
=
"loading"
if
self
.
props
.
is_loading
else
"main"
def
on_applications_loaded
(
self
,
applications
,
error
=
None
):
if
error
:
...
...
@@ -124,7 +128,7 @@ class EepmPlayGuiWindow(Adw.ApplicationWindow):
self
.
installed_apps
=
None
self
.
applications
=
None
self
.
show_loading_spinner
()
# Show loading again for installed apps
self
.
props
.
is_loading
=
True
self
.
update_button_status
()
...
...
@@ -143,7 +147,7 @@ class EepmPlayGuiWindow(Adw.ApplicationWindow):
self
.
add_application_row
(
app
)
self
.
choice_listbox
.
invalidate_filter
()
self
.
hide_loading_spinner
()
self
.
props
.
is_loading
=
False
def
clear_choice_listbox
(
self
):
self
.
choice_listbox
.
remove_all
()
...
...
@@ -218,7 +222,7 @@ class EepmPlayGuiWindow(Adw.ApplicationWindow):
def
on_apply_clicked
(
self
,
button
):
commands
=
None
self
.
show_loading_spinner
()
# Показать сообщение о загрузке перед выполнением команды
self
.
props
.
is_loading
=
True
# Показать сообщение о загрузке перед выполнением команды
to_install
,
to_remove
=
self
.
get_install_remove_lists
()
commands
=
self
.
build_commands
(
to_install
,
to_remove
)
...
...
src/window.ui
View file @
dce5d6e3
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.92.0 -->
<?xml version="1.0" encoding="UTF-8"?>
<interface
domain=
"eepm-play-gui"
>
<!-- interface-name window.ui -->
<requires
lib=
"Adw"
version=
"1.0"
/>
<requires
lib=
"gio"
version=
"2.0"
/>
<requires
lib=
"gtk"
version=
"4.0"
/>
<requires
lib=
"libadwaita"
version=
"1.4"
/>
<template
class=
"EepmPlayGuiWindow"
parent=
"AdwApplicationWindow"
>
<property
name=
"content"
>
<property
name=
"default-height"
>
489
</property>
<property
name=
"default-width"
>
300
</property>
<property
name=
"width-request"
>
360
</property>
<property
name=
"height-request"
>
294
</property>
<child>
<object
class=
"AdwToolbarView"
>
<property
name=
"top-bar-style"
>
raised
</property>
<child
type=
"top"
>
<object
class=
"AdwHeaderBar"
id=
"header_bar"
>
<child
type=
"start"
>
<object
class=
"GtkToggleButton"
id=
"search_toggle_button"
>
<property
name=
"sensitive"
bind-source=
"EepmPlayGuiWindow"
bind-property=
"is-loading"
bind-flags=
"sync-create|invert-boolean"
/>
<property
name=
"icon-name"
>
system-search-symbolic
</property>
</object>
</child>
<child
type=
"end"
>
<object
class=
"GtkMenuButton"
>
<property
name=
"icon-name"
>
open-menu-symbolic
</property>
<property
name=
"menu-model"
>
primary_menu
</property>
<property
name=
"primary"
>
True
</property>
<property
name=
"tooltip-text"
translatable=
"yes"
>
Menu
</property>
<object
class=
"GtkButton"
>
<property
name=
"icon-name"
>
help-about-symbolic
</property>
<property
name=
"action-name"
>
app.about
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"AdwClamp"
>
<property
name=
"margin-bottom"
>
12
</property>
<property
name=
"margin-end"
>
12
</property>
<property
name=
"margin-start"
>
12
</property>
<property
name=
"margin-top"
>
12
</property>
<property
name=
"maximum-size"
>
420
</property>
<property
name=
"content"
>
<object
class=
"GtkStack"
id=
"main_stack"
>
<property
name=
"transition-type"
>
crossfade
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
12
</property>
<child>
<object
class=
"GtkBox"
>
<child>
<object
class=
"GtkSearchEntry"
id=
"search_entry"
>
<property
name=
"hexpand"
>
True
</property>
<object
class=
"GtkStackPage"
>
<property
name=
"name"
>
loading
</property>
<property
name=
"child"
>
<object
class=
"AdwStatusPage"
id=
"status_page"
>
<property
name=
"paintable"
>
<object
class=
"AdwSpinnerPaintable"
>
<property
name=
"widget"
>
status_page
</property>
</object>
</child>
<child>
<object
class=
"GtkDropDown"
id=
"search_dropdown"
>
<property
name=
"model"
>
<object
class=
"GtkStringList"
>
<items>
<item
translatable=
"yes"
>
All
</item>
<item
translatable=
"yes"
>
Installed
</item>
<item
translatable=
"yes"
>
Uninstalled
</item>
<item
translatable=
"yes"
>
Changed
</item>
</items>
</property>
<property
name=
"title"
translatable=
"yes"
>
Getting packages list…
</property>
<property
name=
"description"
translatable=
"yes"
>
It could take a while
</property>
</object>
</property>
</object>
</child>
<child>
<object
class=
"GtkStackPage"
>
<property
name=
"name"
>
main
</property>
<property
name=
"child"
>
<object
class=
"AdwToolbarView"
>
<property
name=
"content"
>
<object
class=
"GtkBox"
>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkSearchBar"
id=
"search_bar"
>
<property
name=
"search-mode-enabled"
bind-source=
"search_toggle_button"
bind-property=
"active"
bind-flags=
"sync-create|bidirectional"
/>
<property
name=
"key-capture-widget"
>
EepmPlayGuiWindow
</property>
<child>
<object
class=
"AdwClamp"
>
<property
name=
"maximum-size"
>
480
</property>
<child>
<object
class=
"GtkBox"
>
<style>
<class
name=
"linked"
/>
</style>
<child>
<object
class=
"GtkSearchEntry"
id=
"search_entry"
>
<property
name=
"hexpand"
>
true
</property>
</object>
</child>
<child>
<object
class=
"GtkDropDown"
id=
"search_dropdown"
>
<property
name=
"model"
>
<object
class=
"GtkStringList"
>
<items>
<item
translatable=
"yes"
>
All
</item>
<item
translatable=
"yes"
>
Installed
</item>
<item
translatable=
"yes"
>
Uninstalled
</item>
<item
translatable=
"yes"
>
Changed
</item>
</items>
</object>
</property>
<property
name=
"halign"
>
end
</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
<property
name=
"width-request"
>
170
</property>
</child>
<child>
<object
class=
"GtkScrolledWindow"
>
<property
name=
"propagate-natural-height"
>
true
</property>
<property
name=
"hscrollbar-policy"
>
never
</property>
<child>
<object
class=
"AdwClamp"
>
<property
name=
"margin-bottom"
>
12
</property>
<property
name=
"margin-end"
>
12
</property>
<property
name=
"margin-start"
>
12
</property>
<property
name=
"margin-top"
>
12
</property>
<child>
<object
class=
"GtkListBox"
id=
"choice_listbox"
>
<property
name=
"selection-mode"
>
none
</property>
<style>
<class
name=
"boxed-list-separate"
/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<style>
<class
name=
"linked"
/>
</style>
</object>
</child>
<child>
<object
class=
"AdwSpinner"
id=
"loading_spinner"
>
<property
name=
"halign"
>
center
</property>
<property
name=
"height-request"
>
48
</property>
<property
name=
"valign"
>
center
</property>
<property
name=
"visible"
>
False
</property>
<property
name=
"width-request"
>
48
</property>
</object>
</child>
<child>
<object
class=
"GtkScrolledWindow"
>
<property
name=
"vexpand"
>
True
</property>
<child>
<object
class=
"GtkListBox"
id=
"choice_listbox"
>
<style>
<class
name=
"boxed-list-separate"
/>
</style>
</property>
<child
type=
"bottom"
>
<object
class=
"AdwClamp"
>
<property
name=
"margin-bottom"
>
12
</property>
<property
name=
"margin-end"
>
12
</property>
<property
name=
"margin-start"
>
12
</property>
<property
name=
"margin-top"
>
12
</property>
<property
name=
"maximum-size"
>
360
</property>
<child
type=
"center"
>
<object
class=
"GtkListBox"
>
<property
name=
"selection-mode"
>
none
</property>
<child>
<object
class=
"AdwButtonRow"
id=
"apply_button"
>
<property
name=
"title"
translatable=
"yes"
>
Update applications
</property>
<style>
<class
name=
"suggested-action"
/>
</style>
</object>
</child>
<style>
<class
name=
"boxed-list"
/>
</style>
</object>
</child>
</object>
</child>
</object>
</
child
>
</
property
>
</object>
</child>
</object>
</child>
<child
type=
"bottom"
>
<object
class=
"AdwClamp"
>
<property
name=
"margin-bottom"
>
12
</property>
<property
name=
"margin-end"
>
12
</property>
<property
name=
"margin-start"
>
12
</property>
<property
name=
"margin-top"
>
12
</property>
<property
name=
"maximum-size"
>
360
</property>
<child
type=
"center"
>
<object
class=
"GtkListBox"
>
<child>
<object
class=
"AdwButtonRow"
id=
"apply_button"
>
<property
name=
"margin-start"
>
1
</property>
<property
name=
"title"
translatable=
"yes"
>
Update applications
</property>
<style>
<class
name=
"suggested-action"
/>
</style>
</object>
</child>
<style>
<class
name=
"boxed-list"
/>
</style>
</object>
</child>
</object>
</child>
</property>
</object>
</property>
<property
name=
"default-height"
>
489
</property>
<property
name=
"default-width"
>
300
</property>
</child>
</template>
<menu
id=
"primary_menu"
>
<section>
...
...
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