Compare commits

..
Author SHA1 Message Date
75c647cac7 Combine connection panel with server panel (close #102) 2025-04-13 14:14:00 +02:00
69 changed files with 4136 additions and 4956 deletions

8
.gitignore vendored
View file

@ -1 +1,7 @@
/mcg*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
/build/
/install/

View file

@ -1,4 +0,0 @@
Olli <olli@suruatoel.xyz> <olli@coderkun.de>
Olli <olli@suruatoel.xyz> coderkun <olli@coderkun.de>
Olli <olli@suruatoel.xyz> coderkun <olli@suruatoel.xyz>
Olli <olli@suruatoel.xyz> gotik <olli@coderkun.de>

View file

@ -1,22 +0,0 @@
# Contributing
There are multiple ways to contribute code to this project:
* Submit a Pull Request on [https://codeberg.org/suruatoel/mcg](codeberg.org/suruatoel/mcg)
* Send a git pull request via eMail
* Send a patch via eMail
## Internationalization
Update `.pot` files:
$ xgettext --language=Go --keyword=T --from-code=UTF-8 --package-name=mcg --output=po/mcg-go.pot $(git ls-files '*.go')
$ xgettext --language=Glade --from-code=UTF-8 --output=po/mcg-ui.pot $(git ls-files '*.ui')
$ msgcat --use-first -o po/mcg.pot po/mcg-go.pot po/mcg-ui.pot
Use a tool like [Poedit](https://poedit.net/) to create or update translations in the `locale/` folder.
## AI Policy
This project uses a _No AI policy_. Any code you submit to this project has to be written by yourself. If you put this
project’s code into any AI tool, you will be banned from this project.

22
CONTRIBUTING.textile Normal file
View file

@ -0,0 +1,22 @@
h1. Contributing
There are several ways to participate in this project. This guide covers only the contribution of code (i. e. any change to any file in the repository).
There are basically two ways to contribute code to this project: Either via GitLab or via e‑mail. The first one is probably easier for most people. However
it requires a account at GitLab.com. For people who don’t want to create an account—or have any other reason to not use GitLab—e‑mail is an alternative option.
h2. Contributing via GitLab
Create an account on GitLab.com or use your already existing account. Fork this repository inside GitLab, add changes to your fork and finally create a Merge Request to contribute your changes back to this repository.
h2. Contributing via E‑mail
To contribute via e‑mail, first clone this repository to your local harddrive. After adding changes to your local copy you have two options to send them back to this repository: as patch or as Pull Request
h3. E‑mail Patch
To send a patch with your changes, use git’s @send-email@ option as explained in "Public Project over Email":https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_project_over_email of section "5.2 Distributed Git - Contributing to a Project":https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project of the "Git Pro Book":https://git-scm.com/book/en/v2/. You will find the e‑mail address at "suruatoel.xyz":https://www.suruatoel.xyz.
h3. E‑mail Pull Request
Sending a Pull Request via e‑mail requires to publish your copy of the repository (that includes your changes) at a publicly available URL (it is your responsibility to choose a trusted host). Then use git’s @request-pull@ command to send an e‑mail with your pull request. The e‑mail will contain a link to the public repository which can be used to pull your changes from. You will find the e‑mail address at "suruatoel.xyz":https://www.suruatoel.xyz. For more details, please take a look at "Forked Public Project":https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_public_project of section "5.2 Distributed Git - Contributing to a Project":https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project of the "Git Pro Book":https://git-scm.com/book/en/v2.

View file

@ -1,5 +1,5 @@
CoverGrid (mcg) is a client for the Music Player Daemon, focusing on albums instead of single tracks.
Copyright ® 2013 – 2026 Olli <olli@suruatoel.xyz>
Copyright ® 2013 – 2017 coderkun <olli@suruatoel.xyz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View file

@ -1,52 +1,64 @@
# CoverGrid
CoverGrid (mcg) is a client for the [Music Player Daemon](http://www.musicpd.org) (MPD), focusing on albums instead of
single tracks. It is not intended to be a replacement for your favorite MPD client but an addition to get a better
album-experience.
CoverGrid (mcg) is a client for the [Music Player
Daemon](http://www.musicpd.org) (MPD), focusing on albums instead of single
tracks. It is not intended to be a replacement for your favorite MPD client but
an addition to get a better album-experience.
Website: [https://www.suruatoel.xyz/codes/mcg](www.suruatoel.xyz/codes/mcg)
Website: https://www.suruatoel.xyz/codes/mcg
License: [GPL](http://www.gnu.org/licenses/gpl.html) v3
Dependencies:
* [GTK](http://www.gtk.org) 4 (>= 4.18)
* [Python](http://www.python.org) 3
* [python-dateutil](https://pypi.org/project/python-dateutil/)
* [GTK](http://www.gtk.org) 4 (>= 4.18) ([python-gobject](https://live.gnome.org/PyGObject))
* [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/) (>= 1.2)
* [go](https://go.dev/) (build only)
* [Avahi](http://www.avahi.org) (optional)
* [python-keyring](http://pypi.python.org/pypi/keyring) (optional)
* [meson](https://mesonbuild.com/) and [ninja](https://ninja-build.org/) (building)
Additionally, an [MPD](http://www.musicpd.org) server (version >= 0.21.0) is required at runtime.
Additionally a [MPD](http://www.musicpd.org) server (version >= 0.21.0) is
required at runtime.
## Building
Build the application with _go_:
Build the application with _meson_ and _ninja_:
$ go build .
$ meson build
$ ninja -C build
## Running
## Running/Testing
Run the application for testing purposes:
For testing the application and running it without (system-wide) installation,
donwload/clone the code, build it with the `--prefix` option and install it
with `ninja`:
$ go run .
$ meson setup --prefix $(pwd)/install build
$ ninja -C build
$ ninja -C build install
Run the application:
After that you can run it with _meson’s_ `devenv` command:
$ ./mcg
$ meson devenv -C build src/mcg
## Packaging
## Installing
The suggested package name for this project is “mcg”. To build a production binary, please use the following command:
Install the application system-wide with _meson_ (after building):
$ go build --ldflags="-s -w -X main.Version=$(git describe)" -trimpath ./...
$ ninja -C build install
In the “data/” folder you will find a `.desktop` file and an SVG icon.
Note: _On Linux using the distribution’s package manager is the preferred way
of installing applications system-wide._
## Screenshots
![CoverGrid’s cover panel with album details and track list.](https://www.suruatoel.xyz/images/mcg-cover-s.png "CoverGrid’s cover panel with album details and track list.")
![CoverGrid’s cover panel with album details and track list.](https://suruatoel.xyz/images/mcg-cover-s.png "CoverGrid’s cover panel with album details and track list.")
![CoverGrid’s playlist panel with queued albums.](https://www.suruatoel.xyz/images/mcg-playlist.png "CoverGrid’s playlist panel with queued albums.")
![CoverGrid’s playlist panel with queued albums.](https://suruatoel.xyz/images/mcg-playlist.png "CoverGrid’s playlist panel with queued albums.")
![CoverGrid’s library panel showing the albums middle-sized.](https://www.suruatoel.xyz/images/mcg-library-m.png "CoverGrid’s library panel showing the albums middle-sized.")
![CoverGrid’s library panel showing the albums middle-sized.](https://suruatoel.xyz/images/mcg-library-m.png "CoverGrid’s library panel showing the albums middle-sized.")
![CoverGrid’s library panel showing the albums small-sized.](https://www.suruatoel.xyz/images/mcg-library-s.png "CoverGrid’s library panel showing the albums small-sized.")
![CoverGrid’s library panel showing the albums small-sized.](https://suruatoel.xyz/images/mcg-library-s.png "CoverGrid’s library panel showing the albums small-sized.")

View file

@ -1,43 +0,0 @@
package data
import (
_ "embed"
"encoding/base64"
"strings"
)
//go:embed ui/window.ui
var WindowXML string
//go:embed ui/shortcuts-dialog.ui
var ShortcutsDialogXML string
//go:embed ui/connection-panel.ui
var ConnectionPanelXML string
//go:embed ui/server-panel.ui
var ServerPanelXML string
//go:embed ui/cover-panel.ui
var CoverPanelXML string
//go:embed ui/playlist-panel.ui
var PlaylistPanelXML string
//go:embed ui/album-headerbar.ui
var AlbumHeaderbarXML string
//go:embed ui/library-panel.ui
var LibraryPanelXML string
//go:embed gtk.css
var MainCSS string
//go:embed noise-texture.png
var NoiseTexture []byte
func BuildMainCSS() string {
noiseTextureEncoded := "data:image/png;base64," + base64.StdEncoding.EncodeToString(NoiseTexture)
return strings.ReplaceAll(MainCSS, "@NOISETEXTURE@", noiseTextureEncoded)
}

View file

@ -1,6 +1,6 @@
#content_stack {
box-shadow:inset 4px 4px 10px rgba(0,0,0,0.3);
background-image:url("@NOISETEXTURE@");
background-image:url('noise-texture.png');
}
#port_spinner {
@ -30,6 +30,10 @@
font-weight:bold;
}
window.fullscreen #cover_box {
background: black;
}
#cover_info_revealer {
background-color:alpha(@theme_bg_color, 0.8);
box-shadow:0 0 10px @theme_bg_color;

View file

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

Before After
Before After

7
data/icons/meson.build Normal file
View file

@ -0,0 +1,7 @@
application_id = 'xyz.suruatoel.mcg'
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
)

View file

@ -2,7 +2,7 @@
<interface>
<requires lib="gtk+" version="4.8"/>
<requires lib="adw" version="1.2" />
<object id="McgAlbumHeaderbar" class="AdwBin">
<template class="McgAlbumHeaderbar" parent="AdwBin">
<child>
<object class="GtkHeaderBar">
<child type="title">
@ -25,8 +25,9 @@
</object>
</child>
<child>
<object id="close_button" class="GtkButton">
<object class="GtkButton">
<property name="receives-default">True</property>
<signal name="clicked" handler="on_close_clicked" swapped="no"/>
<child>
<object class="GtkImage">
<property name="icon-name">go-previous-symbolic</property>
@ -36,5 +37,5 @@
</child>
</object>
</child>
</object>
</template>
</interface>

View file

@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="4.8"/>
<requires lib="adw" version="1.2" />
<object class="GtkAdjustment" id="server-port-adjustment">
<property name="lower">1024</property>
<property name="upper">9999</property>
<property name="value">6600</property>
<property name="step-increment">1</property>
<property name="page-increment">100</property>
</object>
<object id="McgConnectionPanel" class="AdwBin">
<child>
<object class="AdwStatusPage">
<property name="title">Connect to MPD</property>
<child>
<object class="GtkListBox">
<property name="hexpand">false</property>
<property name="halign">center</property>
<property name="selection-mode">none</property>
<style>
<class name="boxed-list"/>
</style>
<child>
<object class="AdwEntryRow" id="host_row">
<property name="title" translatable="yes">Host</property>
<property name="show-apply-button">true</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<style>
<class name="header"/>
</style>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Port</property>
<property name="halign">start</property>
<property name="hexpand">false</property>
<style>
<class name="subtitle"/>
</style>
</object>
</child>
<child>
<object class="GtkSpinButton" id="port_spinner">
<property name="name">port_spinner</property>
<property name="value">6600</property>
<property name="adjustment">server-port-adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPasswordEntryRow" id="password_row">
<property name="title" translatable="yes">Password</property>
<property name="show-apply-button">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View file

@ -19,7 +19,7 @@
</object>
</child>
</object>
<object id="McgCoverPanel" class="GtkOverlay">
<template class="McgCoverPanel" parent="GtkOverlay">
<child>
<object class="GtkStack" id="cover_stack">
<property name="visible-child">cover_default</property>
@ -157,5 +157,5 @@
</child>
</object>
</child>
</object>
</template>
</interface>

View file

@ -26,11 +26,13 @@
<property name="round-digits">0</property>
<property name="digits">0</property>
<property name="has-origin">False</property>
<signal name="value-changed" handler="on_grid_scale_changed" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton" id="library-toolbar-update">
<property name="label" translatable="yes">update library</property>
<signal name="clicked" handler="on_update_clicked" swapped="no"/>
</object>
</child>
<child>
@ -51,6 +53,7 @@
<property name="label" translatable="yes">sort by artist</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
</child>
<child>
@ -58,12 +61,14 @@
<property name="label" translatable="yes">sort by title</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckButton" id="sort_year">
<property name="label" translatable="yes">sort by year</property>
<property name="receives-default">False</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
</child>
<child>
@ -71,6 +76,7 @@
<property name="label" translatable="yes">sort by modification</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
</child>
<child>
@ -80,6 +86,7 @@
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<signal name="toggled" handler="on_sort_order_toggled" swapped="no"/>
</object>
</child>
</object>
@ -101,6 +108,9 @@
<property name="icon-name">system-search-symbolic</property>
</object>
</child>
<!--
<accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-->
</object>
</child>
<child>
@ -109,6 +119,7 @@
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Select multiple albums</property>
<signal name="toggled" handler="on_select_toggled" swapped="no"/>
<child>
<object class="GtkImage">
<property name="icon-name">object-select-symbolic</property>
@ -134,7 +145,7 @@
</child>
</object>
<object id="McgLibraryPanel" class="AdwBin">
<template class="McgLibraryPanel" parent="AdwBin">
<child>
<object class="GtkStack" id="library_stack">
<property name="transition-type">slide-left-right</property>
@ -147,6 +158,7 @@
<child>
<object class="GtkSearchEntry" id="filter_entry">
<property name="placeholder-text" translatable="yes">search library</property>
<signal name="search-changed" handler="on_filter_entry_changed" swapped="no"/>
</object>
</child>
</object>
@ -194,9 +206,45 @@
<object class="GtkGridView" id="library_grid">
<property name="orientation">vertical</property>
<property name="single_click_activate">true</property>
<signal name="activate" handler="on_library_grid_clicked"/>
<style>
<class name="no-bg"/>
</style>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="bytes">
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GtkListItem">
<property name="activatable">true</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkPicture">
<property name="content-fit">contain</property>
<property name="can-shrink">false</property>
<binding name="tooltip-markup">
<lookup name="tooltip" type="GridItem">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
<binding name="paintable">
<lookup name="cover" type="GridItem">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</child>
</object>
</property>
</template>
</interface>
]]>
</property>
</object>
</property>
</object>
</child>
<style>
@ -212,15 +260,17 @@
<child>
<object class="GtkActionBar" id="actionbar">
<child type="end">
<object class="GtkButton" id="selection_cancel_button">
<object class="GtkButton">
<property name="label" translatable="yes">cancel</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_cancel_clicked" swapped="no"/>
</object>
</child>
<child type="end">
<object class="GtkButton" id="selection_queue_button">
<object class="GtkButton">
<property name="label" translatable="yes">queue</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_add_clicked" swapped="no"/>
</object>
</child>
</object>
@ -267,15 +317,17 @@
<child>
<object class="GtkActionBar" id="actionbar_standalone">
<child type="end">
<object class="GtkButton" id="standalone_play_button">
<object class="GtkButton">
<property name="label" translatable="yes">play</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_play_clicked" swapped="no"/>
</object>
</child>
<child type="end">
<object class="GtkButton" id="standalone_queue_button">
<object class="GtkButton">
<property name="label" translatable="yes">queue</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_queue_clicked" swapped="no"/>
</object>
</child>
</object>
@ -284,5 +336,5 @@
</child>
</object>
</child>
</object>
</template>
</interface>

View file

@ -12,6 +12,7 @@
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Select multiple albums</property>
<signal name="toggled" handler="on_select_toggled" swapped="no"/>
<child>
<object class="GtkImage">
<property name="icon-name">object-select-symbolic</property>
@ -25,6 +26,7 @@
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Clear the playlist</property>
<signal name="clicked" handler="on_clear_clicked" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
@ -35,7 +37,7 @@
</object>
</child>
</object>
<object id="McgPlaylistPanel" class="AdwBin">
<template class="McgPlaylistPanel" parent="AdwBin">
<child>
<object class="GtkStack" id="playlist_stack">
<property name="transition-type">slide-left-right</property>
@ -49,9 +51,45 @@
<object class="GtkGridView" id="playlist_grid">
<property name="orientation">vertical</property>
<property name="single-click-activate">true</property>
<signal name="activate" handler="on_playlist_grid_clicked"/>
<style>
<class name="no-bg"/>
</style>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="bytes">
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GtkListItem">
<property name="activatable">true</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkPicture">
<property name="content-fit">contain</property>
<property name="can-shrink">false</property>
<binding name="tooltip-markup">
<lookup name="tooltip" type="GridItem">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
<binding name="paintable">
<lookup name="cover" type="GridItem">
<lookup name="item">GtkListItem</lookup>
</lookup>
</binding>
</object>
</child>
</object>
</property>
</template>
</interface>
]]>
</property>
</object>
</property>
</object>
</child>
<style>
@ -65,15 +103,17 @@
<child>
<object class="GtkActionBar" id="actionbar">
<child type="end">
<object class="GtkButton" id="selection_cancel_button">
<object class="GtkButton">
<property name="label" translatable="yes">cancel</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_cancel_clicked" swapped="no"/>
</object>
</child>
<child type="end">
<object class="GtkButton" id="selection_remove_button">
<object class="GtkButton">
<property name="label" translatable="yes">remove</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_remove_clicked" swapped="no"/>
</object>
</child>
</object>
@ -119,15 +159,17 @@
<child>
<object class="GtkActionBar" id="actionbar_standalone">
<child type="end">
<object class="GtkButton" id="standalone_play_button">
<object class="GtkButton">
<property name="label" translatable="yes">play</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_play_clicked" swapped="no"/>
</object>
</child>
<child type="end">
<object class="GtkButton" id="standalone_remove_button">
<object class="GtkButton">
<property name="label" translatable="yes">remove</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_remove_clicked" swapped="no"/>
</object>
</child>
</object>
@ -136,5 +178,5 @@
</child>
</object>
</child>
</object>
</template>
</interface>

View file

@ -2,6 +2,13 @@
<interface>
<requires lib="gtk+" version="4.8"/>
<requires lib="adw" version="1.2" />
<object class="GtkAdjustment" id="server-port-adjustment">
<property name="lower">1024</property>
<property name="upper">9999</property>
<property name="value">6600</property>
<property name="step-increment">1</property>
<property name="page-increment">100</property>
</object>
<object class="GtkBox" id="toolbar">
<property name="orientation">horizontal</property>
<property name="halign">end</property>
@ -13,7 +20,7 @@
</object>
</child>
</object>
<object id="McgServerPanel" class="AdwBin">
<template class="McgServerPanel" parent="AdwBin">
<child>
<object class="AdwFlap" id="server_flap">
<property name="flap-position">end</property>
@ -31,8 +38,84 @@
<object class="GtkStack" id="stack">
<child>
<object class="GtkStackPage">
<property name="name">connection</property>
<property name="title" translatable="yes">Connection</property>
<property name="child">
<object class="AdwStatusPage" id="connection_status_page">
<property name="icon-name">network-wired-symbolic</property>
<child>
<object class="GtkBox">
<property name="hexpand">false</property>
<property name="halign">center</property>
<child>
<object class="GtkListBox" id="zeroconf_list">
<property name="hexpand">true</property>
<child type="placeholder">
<object class="GtkLabel">
<property name="label" translatable="yes">No service found</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBox">
<property name="hexpand">true</property>
<property name="selection-mode">none</property>
<style>
<class name="boxed-list"/>
</style>
<child>
<object class="AdwEntryRow" id="host_row">
<property name="title" translatable="yes">Host</property>
<property name="show-apply-button">true</property>
<signal name="apply" handler="on_host_entry_apply"/>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<style>
<class name="header"/>
</style>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Port</property>
<property name="halign">start</property>
<property name="hexpand">false</property>
<style>
<class name="subtitle"/>
</style>
</object>
</child>
<child>
<object class="GtkSpinButton" id="port_spinner">
<property name="name">port_spinner</property>
<property name="value">6600</property>
<property name="adjustment">server-port-adjustment</property>
<signal name="value-changed" handler="on_port_spinner_value_changed"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPasswordEntryRow" id="password_row">
<property name="title" translatable="yes">Password</property>
<property name="show-apply-button">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage" id="status_page">
<property name="name">status</property>
<property name="title" translatable="yes">Status</property>
<property name="visible">false</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">dialog-information-symbolic</property>
@ -149,9 +232,10 @@
</object>
</child>
<child>
<object class="GtkStackPage">
<object class="GtkStackPage" id="stats_page">
<property name="name">stats</property>
<property name="title" translatable="yes">Statistics</property>
<property name="visible">false</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">starred-symbolic</property>
@ -298,9 +382,10 @@
</object>
</child>
<child>
<object class="GtkStackPage">
<object class="GtkStackPage" id="devices_page">
<property name="name">devices</property>
<property name="title" translatable="yes">Audio Devices</property>
<property name="visible">false</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">audio-speakers-symbolic</property>
@ -322,5 +407,5 @@
</property>
</object>
</child>
</object>
</template>
</interface>

View file

@ -2,7 +2,7 @@
<interface>
<requires lib="gtk+" version="4.8"/>
<requires lib="adw" version="1.2" />
<object id="McgShortcutsDialog" class="GtkShortcutsWindow">
<template class="McgShortcutsDialog" parent="GtkShortcutsWindow">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
@ -103,5 +103,5 @@
</child>
</object>
</child>
</object>
</template>
</interface>

View file

@ -2,8 +2,7 @@
<interface>
<requires lib="gtk+" version="4.8" />
<requires lib="adw" version="1.2" />
<object id="McgAppWindow" class="AdwApplicationWindow">
<property name="title">CoverGrid</property>
<template class="McgAppWindow" parent="AdwApplicationWindow">
<property name="content">
<object class="AdwToolbarView" id="toolbar_view">
<child type="top">
@ -18,12 +17,13 @@
</property>
<child>
<object class="GtkSwitch" id="headerbar_button_connect">
<signal name="state-set" handler="on_headerbar_connection_state_set" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="headerbar_button_playpause">
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Switch between play and pause</property>
<signal name="toggled" handler="on_headerbar_playpause_toggled" swapped="no"/>
<child>
<object class="GtkImage">
<property name="can-focus">False</property>
@ -34,7 +34,7 @@
</child>
<child>
<object class="GtkVolumeButton" id="headerbar_button_volume">
<property name="sensitive">false</property>
<signal name="value-changed" handler="on_headerbar_volume_changed" swapped="no"/>
</object>
</child>
<child type="end">
@ -44,19 +44,14 @@
</object>
</child>
<property name="content">
<object class="GtkBox">
<object class="GtkBox" id="content_box">
<property name="orientation">vertical</property>
<child>
<object class="AdwToastOverlay" id="info_toast">
<child>
<object class="GtkStack" id="content_stack">
<property name="name">content_stack</property>
<object class="AdwViewStack" id="panel_stack">
<property name="vexpand">true</property>
<child>
<object class="AdwViewStack" id="panel_stack">
<property name="vexpand">true</property>
</object>
</child>
<signal name="notify::visible-child" handler="on_stack_switched" swapped="no"/>
</object>
</child>
</object>
@ -69,13 +64,9 @@
</binding>
</object>
</child>
<child>
<object class="GtkDrawingArea" id="resize_helper">
</object>
</child>
</object>
</property>
</object>
</property>
</object>
</template>
</interface>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/xyz/suruatoel/mcg">
<file>gtk.css</file>
<file>noise-texture.png</file>
<file>ui/window.ui</file>
<file>ui/shortcuts-dialog.ui</file>
<file>ui/album-headerbar.ui</file>
<file>ui/server-panel.ui</file>
<file>ui/cover-panel.ui</file>
<file>ui/playlist-panel.ui</file>
<file>ui/library-panel.ui</file>
</gresource>
</gresources>

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="xyz.suruatoel.mcg.SortOrder">
<value nick="artist" value="0" />
<value nick="title" value="1" />
<value nick="year" value="2" />
<value nick="modified" value="3" />
</enum>
<schema path="/xyz/suruatoel/mcg/" id="xyz.suruatoel.mcg" gettext-domain="mcg">
<key type="s" name="host">
<default>'localhost'</default>
<summary>MPD host</summary>
<description>MPD host to connect to</description>
</key>
<key type="i" name="port">
<default>6600</default>
<summary>MPD port</summary>
<description>MPD port to connect to</description>
</key>
<key type="b" name="connected">
<default>false</default>
<summary>Connection state</summary>
<description>State of last connection</description>
</key>
<key type="i" name="width">
<default>800</default>
<summary>Window width</summary>
<description>The window width in pixels.</description>
</key>
<key type="i" name="height">
<default>600</default>
<summary>Window height</summary>
<description>The window height in pixels.</description>
</key>
<key type="b" name="is-maximized">
<default>false</default>
<summary>Window maximized</summary>
<description>Whether or not the window is in maximized state.</description>
</key>
<key type="i" name="panel">
<range min="0" max="3"/>
<default>1</default>
<summary>Last selected panel</summary>
<description>The index of the last selected panel.</description>
</key>
<key type="i" name="item-size">
<range min="100" max="1000" />
<default>150</default>
<summary>Size of library items</summary>
<description>The size of items displayed in the library.</description>
</key>
<key enum="xyz.suruatoel.mcg.SortOrder" name="sort-order">
<default>'year'</default>
<summary>Sort criterium for library items</summary>
<description>The sort criterium of items displayed in the library.</description>
</key>
<key type="b" name="sort-type">
<default>true</default>
<summary>Sort type for library items</summary>
<description>The sort type of items displayed in the library.</description>
</key>
</schema>
</schemalist>

Some files were not shown because too many files have changed in this diff Show more