diff --git a/.gitignore b/.gitignore index 8a28ddc..f42fdfe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,7 @@ -/mcg* +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +/build/ +/install/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 8ab042c..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing - -There are three ways to contribute code to this project: - -* Submit a Pull Request on -[https://git.suruatoel.xyz/coderkun/mcgo](git.suruatoel.xyz/coderkun/mcgo) or -[https://codeberg.org/leotaurus/mcgo](codeberg.org/leotaurus/mcgo) -* 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. diff --git a/CONTRIBUTING.textile b/CONTRIBUTING.textile new file mode 100644 index 0000000..f5b11fb --- /dev/null +++ b/CONTRIBUTING.textile @@ -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. \ No newline at end of file diff --git a/LICENSE b/LICENSE index 1f5cef4..bb13eb5 100644 --- a/LICENSE +++ b/LICENSE @@ -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 +Copyright ® 2013 – 2017 coderkun 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 diff --git a/README.md b/README.md index c65ad22..f37f2db 100644 --- a/README.md +++ b/README.md @@ -5,51 +5,60 @@ 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 +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.") diff --git a/data/data.go b/data/data.go deleted file mode 100644 index 5076620..0000000 --- a/data/data.go +++ /dev/null @@ -1,32 +0,0 @@ -package data - -import ( - _ "embed" -) - -//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 diff --git a/data/gtk.css b/data/gtk.css index aa3357b..1b361de 100644 --- a/data/gtk.css +++ b/data/gtk.css @@ -1,5 +1,6 @@ #content_stack { box-shadow:inset 4px 4px 10px rgba(0,0,0,0.3); + background-image:url('noise-texture.png'); } #port_spinner { @@ -29,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; diff --git a/data/xyz.suruatoel.mcg.svg b/data/icons/hicolor/scalable/apps/xyz.suruatoel.mcg.svg similarity index 100% rename from data/xyz.suruatoel.mcg.svg rename to data/icons/hicolor/scalable/apps/xyz.suruatoel.mcg.svg diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..20bdb7c --- /dev/null +++ b/data/icons/meson.build @@ -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) +) diff --git a/data/ui/album-headerbar.ui b/data/ui/album-headerbar.ui index 8a1be95..bda26a8 100644 --- a/data/ui/album-headerbar.ui +++ b/data/ui/album-headerbar.ui @@ -2,7 +2,7 @@ - + diff --git a/data/ui/connection-panel.ui b/data/ui/connection-panel.ui index 42a280c..d9e7364 100644 --- a/data/ui/connection-panel.ui +++ b/data/ui/connection-panel.ui @@ -9,58 +9,79 @@ 1 100 - + + horizontal + 6 + + diff --git a/data/ui/cover-panel.ui b/data/ui/cover-panel.ui index f42cfe7..d869e76 100644 --- a/data/ui/cover-panel.ui +++ b/data/ui/cover-panel.ui @@ -19,7 +19,7 @@ - + diff --git a/data/ui/library-panel.ui b/data/ui/library-panel.ui index 2ef262d..b835e3f 100644 --- a/data/ui/library-panel.ui +++ b/data/ui/library-panel.ui @@ -26,11 +26,13 @@ 0 0 False + update library + @@ -51,6 +53,7 @@ sort by artist False sort_year + @@ -58,12 +61,14 @@ sort by title False sort_year + sort by year False + @@ -71,6 +76,7 @@ sort by modification False sort_year + @@ -80,6 +86,7 @@ True False True + @@ -101,6 +108,9 @@ system-search-symbolic + @@ -109,6 +119,7 @@ True True Select multiple albums + object-select-symbolic @@ -134,7 +145,7 @@ - +