Compare commits

..
79 changed files with 6355 additions and 5956 deletions

10
.gitignore vendored
View file

@ -1 +1,9 @@
/mcg* # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Files created by setuptools
build/
dist/
*.egg-info/

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. 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 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 it under the terms of the GNU General Public License as published by

View file

@ -1,52 +0,0 @@
# 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.
Website: [https://www.suruatoel.xyz/codes/mcg](www.suruatoel.xyz/codes/mcg)
License: [GPL](http://www.gnu.org/licenses/gpl.html) v3
Dependencies:
* [GTK](http://www.gtk.org) 4 (>= 4.18)
* [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/) (>= 1.2)
* [go](https://go.dev/) (build only)
Additionally, an [MPD](http://www.musicpd.org) server (version >= 0.21.0) is required at runtime.
## Building
Build the application with _go_:
$ go build .
## Running
Run the application for testing purposes:
$ go run .
Run the application:
$ ./mcg
## Packaging
The suggested package name for this project is “mcg”. To build a production binary, please use the following command:
$ go build --ldflags="-s -w -X main.Version=$(git describe)" -trimpath ./...
In the “data/” folder you will find a `.desktop` file and an SVG icon.
## 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 playlist panel with queued albums.](https://www.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 small-sized.](https://www.suruatoel.xyz/images/mcg-library-s.png "CoverGrid’s library panel showing the albums small-sized.")

80
README.textile Normal file
View file

@ -0,0 +1,80 @@
h1. 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.
Website: https://www.suruatoel.xyz/codes/mcg
License: "GPL":http://www.gnu.org/licenses/gpl.html v3
Dependencies:
* "Python":http://www.python.org 3
* "GTK":http://www.gtk.org 3 ("python-gobject":https://live.gnome.org/PyGObject)
* "Avahi":http://www.avahi.org (optional)
* "python-keyring":http://pypi.python.org/pypi/keyring (optional)
* "python-setuptools":https://pypi.python.org/pypi/setuptools (building)
h2. Building
Build the application with _setuptools_:
bc. $ python3 setup.py build
h2. Running/Testing
For testing the application and running it without (system-wide) installation, donwload/clone the code, build it as described above and then use _setuptools_ to install it for the current user:
bc. $ python3 setup.py develop --user
After that you can run it with
bc. $ ~/.local/bin/mcg
or if _~/.local/bin/_ is on your PATH
bc. $ mcg
h2. Installing
Install the application system-wide with _setuptools_:
bc. # python3 setup.py install
Note: _On Linux using the distribution’s package manager is the preferred way of installing applications system-wide._
h2. Packaging
Create a distribution package with _setuptools_:
bc. $ python3 setup.py sdist
h2. Cover/image configuration
Since MPD itself does not provide the cover/image/album art binaries, yet, _mcg_ has to look for them itself. In order to find the images a base folder has to be configured on the Connection tab as “Image Directory”. This value can either be a local (absolute) folder (e. g. /home/user/music/) or an http URL (e. g. http://localhost/music/). _mcg_ then adds the (relative) folder of the audio file to this paths and tries different names for the actual file:
# the album name
# “cover”
# “folder”
The following file extensions are used:
# png
# jpg
The first combination that results in an existing file is used as cover image. If no matching file exists, _mcg_ will try to traverse the directory for any image file as fallback—this is done for local paths only though, not for http URLs.
h2. Screenshots
!https://suruatoel.xyz/images/mcg-cover-s.png(CoverGrid\u2019s cover panel with album details and track list.)!
!https://suruatoel.xyz/images/mcg-playlist.png(CoverGrid\u2019s playlist panel with queued albums.)!
!https://suruatoel.xyz/images/mcg-library-m.png(CoverGrid\u2019s library panel showing the albums middle-sized.)!
!https://suruatoel.xyz/images/mcg-library-s.png(CoverGrid\u2019s 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,18 +1,6 @@
#content_stack { .bg-texture {
box-shadow:inset 4px 4px 10px rgba(0,0,0,0.3); box-shadow:inset 4px 4px 10px rgba(0,0,0,0.3);
background-image:url("@NOISETEXTURE@"); background-image:url('noise-texture.png');
}
#port_spinner {
background:none;
margin-top:-13px;
}
#port_spinner text {
padding-left: 0;
}
#server_stack_sidebar {
background-color:alpha(@theme_bg_color, 1);
} }
.no-bg { .no-bg {
@ -30,13 +18,13 @@
font-weight:bold; font-weight:bold;
} }
#cover_info_revealer { revealer.sidebar > * {
background-color:alpha(@theme_bg_color, 0.8); background-color:alpha(@theme_bg_color, 0.8);
box-shadow:0 0 10px @theme_bg_color; box-shadow:0 0 10px @theme_bg_color;
margin-left:20px; margin-left:20px
} }
#cover_info_revealer scale mark indicator { revealer.sidebar scale mark indicator {
margin-right:5px; margin-right:5px;
} }
@ -44,13 +32,24 @@ actionbar {
background-color:@theme_unfocused_bg_color; background-color:@theme_unfocused_bg_color;
} }
gridview child { /* Icon View in regular mode */
padding: 1px; iconview.view:selected,
iconview.view:selected:focus {
background-color:@theme_selected_bg_color;
} }
gridview.selection child { iconview.view:hover {
opacity: 0.5; -gtk-icon-effect:highlight;
} }
gridview.selection child:hover,
gridview.selection child:selected { /* Icon View in selection mode */
opacity: 1; iconview.view.selection {
-gtk-icon-effect:dim;
}
iconview.view.selection:selected,
iconview.view.selection:selected:focus {
background-color:@theme_selected_bg_color;
-gtk-icon-effect:highlight;
}
iconview.view.selection:hover {
-gtk-icon-effect:none;
} }

213
data/icons/mcg.svg Normal file
View file

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="mcg.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 67.733333 67.733335"
height="256"
width="256">
<title
id="title4619">CoverGrid (mcg)</title>
<defs
id="defs2">
<filter
id="filter4516"
inkscape:label="Drop Shadow"
style="color-interpolation-filters:sRGB">
<feFlood
id="feFlood4506"
result="flood"
flood-color="rgb(255,255,255)"
flood-opacity="0.498039" />
<feComposite
id="feComposite4508"
result="composite1"
operator="in"
in2="SourceGraphic"
in="flood" />
<feGaussianBlur
id="feGaussianBlur4510"
result="blur"
stdDeviation="7"
in="composite1" />
<feOffset
id="feOffset4512"
result="offset"
dy="6"
dx="6" />
<feComposite
id="feComposite4514"
result="composite2"
operator="over"
in2="offset"
in="SourceGraphic" />
</filter>
</defs>
<sodipodi:namedview
inkscape:document-rotation="0"
inkscape:snap-to-guides="true"
inkscape:snap-grids="true"
inkscape:showpageshadow="false"
showborder="true"
inkscape:pagecheckerboard="true"
units="px"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:window-height="1030"
inkscape:window-width="1916"
inkscape:guide-bbox="true"
showguides="true"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="490.36801"
inkscape:cx="311.30244"
inkscape:zoom="0.7"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base">
<sodipodi:guide
inkscape:locked="false"
id="guide4676"
orientation="0,1"
position="319.76785,-21.166667" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>CoverGrid (mcg)</dc:title>
<dc:date>2017</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>coderkun</dc:title>
</cc:Agent>
</dc:creator>
<dc:description>https://www.suruatoel.xyz/codes/mcg</dc:description>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-nd/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-nd/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" />
</cc:License>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-26.06665)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Ebene 1">
<g
transform="matrix(0.253073,0,0,0.25346533,-0.4687123,18.990219)"
id="g4504">
<rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487"
width="87.841667"
height="87.841667"
x="91.54583"
y="117.61248" />
<rect
style="fill:#5f3262;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-1"
width="87.841667"
height="87.841667"
x="91.54583"
y="27.918732" />
<rect
style="fill:#9ba38f;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-8"
width="87.841667"
height="87.841667"
x="181.23958"
y="-115.7604"
transform="scale(1,-1)" />
<rect
style="fill:#9aa0af;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-19"
width="87.841667"
height="87.841667"
x="181.23958"
y="207.30624" />
<rect
style="fill:#e62a7c;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-7"
width="87.841667"
height="87.841667"
x="181.23958"
y="117.61248" />
<rect
style="fill:#c5d0f2;fill-opacity:1;stroke:none;stroke-width:1.05833;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-2"
width="87.841667"
height="87.841667"
x="1.8520833"
y="27.918732" />
<rect
style="fill:#9a0c98;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-23"
width="87.841667"
height="87.841667"
x="91.54583"
y="207.30623" />
<rect
style="fill:#e4cec8;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-66"
width="87.841667"
height="87.841667"
x="1.8520833"
y="207.30623" />
<rect
style="fill:#fd6bfc;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4487-4"
width="87.841667"
height="87.841667"
x="1.8520833"
y="117.61248" />
</g>
<path
transform="matrix(0.30742717,0,0,0.30790377,0,18.04063)"
inkscape:transform-center-y="-0.54802213"
inkscape:transform-center-x="5.196062"
d="M 204.82033,136.72273 50.691586,224.82232 51.459481,47.293117 Z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.051523"
sodipodi:arg1="0.0043254268"
sodipodi:r2="97.404572"
sodipodi:r1="102.49749"
sodipodi:cy="136.27939"
sodipodi:cx="102.3238"
sodipodi:sides="3"
id="path4661"
style="opacity:0.58;fill:#000000;fill-opacity:1;stroke-width:0.980952;filter:url(#filter4516)"
sodipodi:type="star" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -4,7 +4,7 @@ Name=CoverGrid (mcg)
Comment=CoverGrid for the Music Player Daemon Comment=CoverGrid for the Music Player Daemon
Keywords=mpd; Keywords=mpd;
Type=Application Type=Application
Icon=xyz.suruatoel.mcg Icon=mcg.svg
Exec=mcg Exec=mcg
Categories=AudioVideo; Categories=AudioVideo;
StartupNotify=true StartupNotify=true

View file

@ -1,34 +0,0 @@
i18n = import('i18n')
desktop_file = i18n.merge_file(
input: 'mcg.desktop',
output: 'mcg.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file]
)
endif
gnome = import('gnome')
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
gnome.compile_resources('mcg',
'xyz.suruatoel.mcg.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
install_data('xyz.suruatoel.mcg.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)
gnome.compile_schemas(depend_files: files('xyz.suruatoel.mcg.gschema.xml'))
subdir('icons')

View file

@ -1,40 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="4.8"/> <requires lib="gtk+" version="3.10"/>
<requires lib="adw" version="1.2" /> <template class="McgAlbumHeaderbar" parent="GtkHeaderBar">
<object id="McgAlbumHeaderbar" class="AdwBin"> <property name="visible">True</property>
<child> <property name="can-focus">False</property>
<object class="GtkHeaderBar"> <child type="title">
<child type="title"> <object class="GtkBox">
<object class="GtkBox"> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="can-focus">False</property>
<child> <property name="orientation">vertical</property>
<object class="GtkLabel" id="standalone_title"> <child>
<property name="selectable">True</property> <object class="GtkLabel" id="standalone_title">
<attributes> <property name="visible">True</property>
<attribute name="weight" value="bold"/> <property name="can-focus">False</property>
<attribute name="scale" value="1"/> <property name="label" translatable="yes">Title</property>
</attributes> <property name="selectable">True</property>
</object> <attributes>
</child> <attribute name="weight" value="bold"/>
<child> <attribute name="scale" value="1"/>
<object class="GtkLabel" id="standalone_artist"> </attributes>
<property name="selectable">True</property>
</object>
</child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child>
<object id="close_button" class="GtkButton"> <object class="GtkLabel" id="standalone_artist">
<property name="receives-default">True</property> <property name="visible">True</property>
<child> <property name="can-focus">False</property>
<object class="GtkImage"> <property name="label" translatable="yes">Artist</property>
<property name="icon-name">go-previous-symbolic</property> <property name="selectable">True</property>
</object> </object>
</child> <packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_close_clicked" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">go-previous-symbolic</property>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
</object> </template>
</interface> </interface>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="4.8"/> <requires lib="gtk+" version="3.12"/>
<requires lib="adw" version="1.2" />
<object class="GtkAdjustment" id="server-port-adjustment"> <object class="GtkAdjustment" id="server-port-adjustment">
<property name="lower">1024</property> <property name="lower">1024</property>
<property name="upper">9999</property> <property name="upper">9999</property>
@ -9,58 +9,174 @@
<property name="step-increment">1</property> <property name="step-increment">1</property>
<property name="page-increment">100</property> <property name="page-increment">100</property>
</object> </object>
<object id="McgConnectionPanel" class="AdwBin"> <template class="McgConnectionPanel" parent="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child> <child>
<object class="AdwStatusPage"> <object class="GtkBox">
<property name="title">Connect to MPD</property> <property name="visible">True</property>
<property name="can-focus">False</property>
<child> <child>
<object class="GtkListBox"> <!-- n-columns=3 n-rows=6 -->
<property name="hexpand">false</property> <object class="GtkGrid">
<property name="halign">center</property> <property name="width-request">500</property>
<property name="selection-mode">none</property> <property name="visible">True</property>
<style> <property name="can-focus">False</property>
<class name="boxed-list"/> <property name="column-spacing">5</property>
</style> <property name="row-homogeneous">True</property>
<child> <property name="column-homogeneous">True</property>
<object class="AdwEntryRow" id="host_row">
<property name="title" translatable="yes">Host</property>
<property name="show-apply-button">true</property>
</object>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="orientation">vertical</property> <property name="visible">True</property>
<style> <property name="can-focus">False</property>
<class name="header"/>
</style>
<child> <child>
<object class="GtkLabel"> <object class="GtkTreeView" id="zeroconf_list">
<property name="label" translatable="yes">Port</property> <property name="visible">True</property>
<property name="halign">start</property> <property name="can-focus">True</property>
<property name="hexpand">false</property> <signal name="focus-out-event" handler="on_zeroconf_list_outfocused" swapped="no"/>
<style> <child internal-child="selection">
<class name="subtitle"/> <object class="GtkTreeSelection">
</style> <signal name="changed" handler="on_service_selected" swapped="no"/>
</object>
</child>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="port_spinner"> <object class="GtkSeparator">
<property name="name">port_spinner</property> <property name="visible">True</property>
<property name="value">6600</property> <property name="can-focus">False</property>
<property name="adjustment">server-port-adjustment</property> <property name="margin-start">5</property>
<property name="orientation">vertical</property>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="height">6</property>
</packing>
</child> </child>
<child> <child>
<object class="AdwPasswordEntryRow" id="password_row"> <object class="GtkEntry" id="host_entry">
<property name="title" translatable="yes">Password</property> <property name="visible">True</property>
<property name="show-apply-button">true</property> <property name="can-focus">True</property>
<property name="text">localhost</property>
<property name="placeholder-text" translatable="yes">Enter hostname or IP address</property>
<signal name="focus-out-event" handler="on_host_entry_outfocused" swapped="no"/>
</object> </object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="password_entry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="visibility">False</property>
<property name="placeholder-text" translatable="yes">Enter password or leave blank</property>
<property name="input-purpose">password</property>
<signal name="focus-out-event" handler="on_password_entry_outfocused" swapped="no"/>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="port_spinner">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="text">6600</property>
<property name="input-purpose">number</property>
<property name="adjustment">server-port-adjustment</property>
<property name="value">6600</property>
<signal name="value-changed" handler="on_port_spinner_value_changed" swapped="no"/>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Host:</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Port:</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Password:</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child> </child>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child> </child>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child> </child>
</object> </template>
</interface> </interface>

View file

@ -1,153 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="4.8"/> <requires lib="gtk+" version="3.22"/>
<requires lib="adw" version="1.2" /> <template class="McgCoverPanel" parent="GtkOverlay">
<object class="GtkBox" id="toolbar"> <property name="visible">True</property>
<property name="orientation">horizontal</property> <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="fullscreen_button">
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Show the cover in fullscreen mode</property>
<property name="action-name">win.toggle-fullscreen</property>
<child>
<object class="GtkImage">
<property name="icon-name">view-fullscreen-symbolic</property>
</object>
</child>
</object>
</child>
</object>
<object id="McgCoverPanel" class="GtkOverlay">
<child> <child>
<object class="GtkStack" id="cover_stack"> <object class="GtkStack" id="cover_stack">
<property name="visible-child">cover_default</property> <property name="visible">True</property>
<property name="can-focus">False</property>
<child> <child>
<object class="GtkSpinner" id="cover_spinner"> <object class="GtkSpinner" id="cover_spinner">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object> </object>
</child> <packing>
<child> <property name="name">cover-spinner</property>
<object class="GtkImage" id="cover_default"> </packing>
<property name="icon-name">image-x-generic-symbolic</property>
<property name="icon-size">large</property>
</object>
</child> </child>
<child> <child>
<object class="GtkScrolledWindow" id="cover_scroll"> <object class="GtkScrolledWindow" id="cover_scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="kinetic-scrolling">False</property> <property name="kinetic-scrolling">False</property>
<property name="overlay-scrolling">False</property> <property name="overlay-scrolling">False</property>
<property name="hexpand">true</property> <signal name="size-allocate" handler="on_cover_size_allocate" swapped="no"/>
<property name="halign">fill</property>
<property name="vexpand">true</property>
<property name="valign">fill</property>
<child> <child>
<object class="GtkViewport" id="cover_box"> <object class="GtkViewport">
<property name="name">cover_box</property> <property name="visible">True</property>
<property name="hexpand">true</property> <property name="can-focus">False</property>
<property name="halign">fill</property>
<property name="vexpand">true</property>
<property name="valign">fill</property>
<child> <child>
<object class="GtkImage" id="cover_image"> <object class="GtkEventBox" id="cover_box">
<property name="hexpand">true</property> <property name="visible">True</property>
<property name="halign">fill</property> <property name="can-focus">False</property>
<property name="vexpand">true</property> <signal name="button-press-event" handler="on_cover_box_pressed" swapped="no"/>
<property name="valign">fill</property> <child>
<property name="icon-name">image-x-generic-symbolic</property> <object class="GtkImage" id="cover_image">
<property name="icon-size">large</property> <property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon_size">0</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
</object> </object>
<packing>
<property name="name">cover-scroll</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing>
<property name="index">-1</property>
</packing>
</child> </child>
<child type="overlay"> <child type="overlay">
<object class="GtkRevealer" id="info_revealer"> <object class="GtkRevealer" id="info_revealer">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property> <property name="halign">end</property>
<property name="transition-type">slide-right</property> <property name="transition-type">slide-right</property>
<property name="name">cover_info_revealer</property>
<style>
<class name="background"/>
</style>
<child> <child>
<object class="GtkScrolledWindow" id="cover_info_scroll"> <object class="GtkScrolledWindow" id="cover_info_scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="vscrollbar-policy">never</property> <property name="vscrollbar-policy">never</property>
<property name="max-content-width">200</property> <property name="max-content-width">200</property>
<property name="propagate-natural-width">True</property> <property name="propagate-natural-width">True</property>
<property name="name">cover_info_scroll</property>
<child> <child>
<object class="GtkViewport"> <object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="shadow-type">none</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="orientation">vertical</property> <property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="valign">fill</property>
<property name="vexpand">true</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">5</property> <property name="margin-top">5</property>
<property name="margin-bottom">5</property> <property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<child> <child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-bottom">5</property> <property name="margin-bottom">5</property>
<property name="row-spacing">5</property> <property name="row-spacing">5</property>
<property name="column-homogeneous">True</property> <property name="column-homogeneous">True</property>
<style>
<class name="cover-labels"/>
</style>
<child> <child>
<object class="GtkLabel" id="album_title_label"> <object class="GtkLabel" id="album_title_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="label">Album</property> <property name="label">Album</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object> </object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="album_date_label"> <object class="GtkLabel" id="album_date_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="label">Date</property> <property name="label">Date</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object> </object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="album_artist_label"> <object class="GtkLabel" id="album_artist_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
<property name="label">Artist</property> <property name="label">Artist</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object> </object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<style>
<class name="cover-labels"/>
</style>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child>
<object class="GtkScale" id="songs_scale"> <object class="GtkScale" id="songs_scale">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="halign">start</property>
<property name="valign">fill</property>
<property name="vexpand">true</property>
<property name="restrict-to-fill-level">False</property> <property name="restrict-to-fill-level">False</property>
<property name="digits">0</property> <property name="digits">0</property>
<property name="draw-value">False</property> <property name="draw-value">False</property>
<signal name="button-press-event" handler="on_songs_start_change" swapped="no"/>
<signal name="button-release-event" handler="on_songs_change" swapped="no"/>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
</child> </child>
@ -155,7 +189,11 @@
</child> </child>
</object> </object>
</child> </child>
<style>
<class name="sidebar"/>
<class name="background"/>
</style>
</object> </object>
</child> </child>
</object> </template>
</interface> </interface>

33
data/ui/cover-toolbar.ui Normal file
View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<template class="McgCoverToolbar" parent="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">6</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="fullscreen_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Show the cover in fullscreen mode</property>
<property name="action-name">win.toggle-fullscreen</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">view-fullscreen-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</template>
</interface>

75
data/ui/gtk.menu.ui Normal file
View file

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="app-menu">
<section>
<item>
<attribute name="action">win.connect</attribute>
<attribute name="label" translatable="yes">Connect</attribute>
<attribute name="accel">&lt;Primary&gt;c</attribute>
</item>
<item>
<attribute name="action">win.play</attribute>
<attribute name="label" translatable="yes">Play</attribute>
<attribute name="accel">&lt;Primary&gt;p</attribute>
</item>
<item>
<attribute name="action">win.clear-playlist</attribute>
<attribute name="label" translatable="yes">Clear Playlist</attribute>
<attribute name="accel">&lt;Primary&gt;r</attribute>
</item>
<item>
<attribute name="action">win.toggle-fullscreen</attribute>
<attribute name="label" translatable="yes">Toggle Fullscreen</attribute>
<attribute name="accel">F11</attribute>
</item>
<item>
<attribute name="action">win.search-library</attribute>
<attribute name="label" translatable="yes">Search Library</attribute>
<attribute name="accel">&lt;Primary&gt;f</attribute>
</item>
</section>
<section>
<item>
<attribute name="action">win.panel</attribute>
<attribute name="label" translatable="yes">Connection</attribute>
<attribute name="target">0</attribute>
<attribute name="accel">&lt;Primary&gt;KP_1</attribute>
</item>
<item>
<attribute name="action">win.panel</attribute>
<attribute name="label" translatable="yes">Cover</attribute>
<attribute name="target">1</attribute>
<attribute name="accel">&lt;Primary&gt;KP_2</attribute>
</item>
<item>
<attribute name="action">win.panel</attribute>
<attribute name="label" translatable="yes">Playlist</attribute>
<attribute name="target">2</attribute>
<attribute name="accel">&lt;Primary&gt;KP_3</attribute>
</item>
<item>
<attribute name="action">win.panel</attribute>
<attribute name="label" translatable="yes">Library</attribute>
<attribute name="target">3</attribute>
<attribute name="accel">&lt;Primary&gt;KP_4</attribute>
</item>
</section>
<section>
<item>
<attribute name="action">win.show-help-overlay</attribute>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
<attribute name="accel">&lt;Primary&gt;k</attribute>
</item>
<item>
<attribute name="action">app.info</attribute>
<attribute name="label" translatable="yes">Info</attribute>
<attribute name="accel">&lt;Primary&gt;i</attribute>
</item>
<item>
<attribute name="action">app.quit</attribute>
<attribute name="label" translatable="yes">Quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
</interface>

46
data/ui/info-dialog.ui Normal file
View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<template class="McgInfoDialog" parent="GtkAboutDialog">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center</property>
<property name="type-hint">dialog</property>
<property name="gravity">center</property>
<property name="program-name">CoverGrid</property>
<property name="version">3.0.1</property>
<property name="comments" translatable="yes">CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks.</property>
<property name="website">http://www.suruatoel.xyz/codes/mcg</property>
<property name="logo-icon-name"/>
<property name="license-type">gpl-3-0</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</template>
</interface>

View file

@ -1,288 +1,303 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="4.8"/> <requires lib="gtk+" version="3.16"/>
<requires lib="adw" version="1.2" /> <template class="McgLibraryPanel" parent="GtkStack">
<object class="GtkAdjustment" id="grid_adjustment"> <property name="visible">True</property>
<property name="lower">100</property>
<property name="upper">1000</property>
<property name="value">150</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkPopover" id="toolbar_popover">
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="transition-type">slide-left-right</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="panel_normal">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="halign">end</property>
<child> <child>
<object class="GtkScale" id="grid_scale"> <object class="GtkSearchBar" id="filter_bar">
<property name="width-request">350</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="app-paintable">True</property>
<property name="adjustment">grid_adjustment</property> <property name="can-focus">False</property>
<property name="restrict-to-fill-level">False</property> <signal name="notify" handler="on_filter_bar_notify" swapped="no"/>
<property name="fill-level">-1</property>
<property name="round-digits">0</property>
<property name="digits">0</property>
<property name="has-origin">False</property>
</object>
</child>
<child>
<object class="GtkButton" id="library-toolbar-update">
<property name="label" translatable="yes">update library</property>
</object>
</child>
<child>
<object class="GtkBox" id="library-toolbar-sort">
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkSeparator"> <object class="GtkSearchEntry" id="filter_entry">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Sort</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="sort_artist">
<property name="label" translatable="yes">sort by artist</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="sort_title">
<property name="label" translatable="yes">sort by title</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="sort_year">
<property name="label" translatable="yes">sort by year</property>
<property name="receives-default">False</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="sort_modified">
<property name="label" translatable="yes">sort by modification</property>
<property name="receives-default">False</property>
<property name="group">sort_year</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="toolbar_sort_order_button">
<property name="label" translatable="yes">sort library descending</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property> <property name="primary-icon-name">edit-find-symbolic</property>
<property name="active">True</property> <property name="primary-icon-activatable">False</property>
<property name="primary-icon-sensitive">False</property>
<property name="placeholder-text" translatable="yes">search library</property>
<signal name="search-changed" handler="on_filter_entry_changed" swapped="no"/>
</object> </object>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
</object>
</child>
</object>
<object class="GtkBox" id="toolbar">
<property name="orientation">horizontal</property>
<property name="halign">end</property>
<property name="spacing">6</property>
<child>
<object class="GtkToggleButton" id="toolbar_search_bar">
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Search the library</property>
<child> <child>
<object class="GtkImage"> <placeholder/>
<property name="icon-name">system-search-symbolic</property>
</object>
</child> </child>
</object>
</child>
<child>
<object class="GtkToggleButton" id="select_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Select multiple albums</property>
<child> <child>
<object class="GtkImage"> <object class="GtkStack" id="stack">
<property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Settings and actions</property>
<property name="popover">toolbar_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">open-menu-symbolic</property> <property name="transition-type">crossfade</property>
</object>
</child>
</object>
</child>
</object>
<object id="McgLibraryPanel" class="AdwBin">
<child>
<object class="GtkStack" id="library_stack">
<property name="transition-type">slide-left-right</property>
<child>
<object class="GtkBox" id="panel_normal">
<property name="orientation">vertical</property>
<child> <child>
<object class="GtkSearchBar" id="filter_bar"> <object class="GtkBox" id="progress_box">
<property name="search-mode-enabled" bind-source="toolbar_search_bar" bind-property="active" bind-flags="sync-create"/> <property name="visible">True</property>
<child> <property name="can-focus">False</property>
<object class="GtkSearchEntry" id="filter_entry"> <property name="orientation">vertical</property>
<property name="placeholder-text" translatable="yes">search library</property> <child type="center">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child type="center">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage" id="progress_image">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progress_bar">
<property name="width-request">200</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pulse-step">0</property>
<property name="show-text">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="title">page1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkIconView" id="library_grid">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin">0</property>
<property name="item-orientation">horizontal</property>
<property name="row-spacing">0</property>
<property name="column-spacing">0</property>
<property name="tooltip-column">1</property>
<property name="item-padding">0</property>
<property name="activate-on-single-click">True</property>
<signal name="item-activated" handler="on_library_grid_clicked" swapped="no"/>
<signal name="selection-changed" handler="on_library_grid_selection_changed" swapped="no"/>
<signal name="size-allocate" handler="on_resize" swapped="no"/>
<style>
<class name="no-bg"/>
</style>
</object>
</child>
<style>
<class name="no-bg"/>
</style>
</object>
<packing>
<property name="name">page0</property>
<property name="title">page0</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRevealer" id="actionbar_revealer">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="transition-type">none</property>
<child>
<object class="GtkActionBar" id="library-actionbar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">queue</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_selection_add_clicked" swapped="no"/>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child> </child>
</object> </object>
</child> </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="name">page0</property>
<property name="title">page0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="panel_standalone">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkStack" id="standalone_stack">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="transition-type">crossfade</property>
<child> <child>
<object class="GtkStack" id="stack"> <object class="GtkSpinner" id="standalone_spinner">
<property name="transition-type">crossfade</property> <property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="name">standalone-spinne</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="standalone_scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="kinetic-scrolling">False</property>
<property name="overlay-scrolling">False</property>
<signal name="size-allocate" handler="on_standalone_scroll_size_allocate" swapped="no"/>
<child> <child>
<object class="GtkBox" id="progress_box"> <object class="GtkViewport">
<property name="orientation">vertical</property> <property name="visible">True</property>
<property name="valign">center</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkBox"> <object class="GtkImage" id="standalone_image">
<property name="orientation">vertical</property> <property name="visible">True</property>
<child> <property name="can-focus">False</property>
<object class="GtkBox"> <property name="icon-name">gtk-missing-image</property>
<property name="halign">center</property> <property name="icon_size">6</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkImage" id="progress_image">
<property name="icon-size">large</property>
<property name="icon-name">image-x-generic-symbolic</property>
</object>
</child>
<child>
<object class="GtkProgressBar" id="progress_bar">
<property name="width-request">200</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pulse-step">0</property>
<property name="show-text">True</property>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
<child> </object>
<object class="GtkScrolledWindow" id="scroll"> <packing>
<property name="vexpand">true</property> <property name="name">standalone-scroll</property>
<child> <property name="position">1</property>
<object class="GtkGridView" id="library_grid"> </packing>
<property name="orientation">vertical</property>
<property name="single_click_activate">true</property>
<style>
<class name="no-bg"/>
</style>
</object>
</child>
<style>
<class name="no-bg"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkRevealer" id="actionbar_revealer">
<property name="transition-type">slide-up</property>
<child>
<object class="GtkActionBar" id="actionbar">
<child type="end">
<object class="GtkButton" id="selection_cancel_button">
<property name="label" translatable="yes">cancel</property>
<property name="receives-default">True</property>
</object>
</child>
<child type="end">
<object class="GtkButton" id="selection_queue_button">
<property name="label" translatable="yes">queue</property>
<property name="receives-default">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="panel_standalone">
<property name="orientation">vertical</property>
<child>
<object class="GtkStack" id="standalone_stack">
<property name="vexpand">true</property>
<property name="transition-type">crossfade</property>
<child>
<object class="GtkSpinner" id="standalone_spinner">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="standalone_scroll">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="kinetic-scrolling">False</property>
<property name="overlay-scrolling">False</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="standalone_image">
<property name="icon-name">gtk-missing-image</property>
<property name="icon-size">large</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkActionBar" id="actionbar_standalone">
<child type="end">
<object class="GtkButton" id="standalone_play_button">
<property name="label" translatable="yes">play</property>
<property name="receives-default">True</property>
</object>
</child>
<child type="end">
<object class="GtkButton" id="standalone_queue_button">
<property name="label" translatable="yes">queue</property>
<property name="receives-default">True</property>
</object>
</child>
</object>
</child> </child>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkActionBar" id="library-standalone-actionbar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">queue</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_queue_clicked" swapped="no"/>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">play</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_standalone_play_clicked" swapped="no"/>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing>
<property name="name">page1</property>
<property name="title">page1</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </template>
</interface> </interface>

232
data/ui/library-toolbar.ui Normal file
View file

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="grid_adjustment">
<property name="lower">100</property>
<property name="upper">1000</property>
<property name="value">150</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkPopover" id="toolbar_popover">
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScale" id="grid_scale">
<property name="width-request">350</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">grid_adjustment</property>
<property name="restrict-to-fill-level">False</property>
<property name="fill-level">-1</property>
<property name="round-digits">0</property>
<property name="digits">0</property>
<property name="has-origin">False</property>
<signal name="button-release-event" handler="on_grid_scale_changed" swapped="no"/>
<signal name="change-value" handler="on_grid_scale_change" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="library-toolbar-update">
<property name="label">gtk-refresh</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="use-stock">True</property>
<signal name="clicked" handler="on_update_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="library-toolbar-sort">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Sort</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="sort_artist">
<property name="label" translatable="yes">sort by artist</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="sort_title">
<property name="label" translatable="yes">sort by title</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">sort_year</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="sort_year">
<property name="label" translatable="yes">sort by year</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="on_sort_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="toolbar_sort_order_button">
<property name="label">gtk-sort-descending</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="use-stock">True</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="on_sort_order_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<template class="McgLibraryToolbar" parent="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">6</property>
<property name="layout-style">end</property>
<child>
<object class="GtkToggleButton" id="toolbar_search_bar">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Search the library</property>
<signal name="toggled" handler="on_search_toggled" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">system-search-symbolic</property>
</object>
</child>
<accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="select_button">
<property name="visible">True</property>
<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="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">object-select-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Settings and actions</property>
<property name="popover">toolbar_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">open-menu-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</template>
</interface>

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