diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2024-04-24 14:47:25 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-04-27 09:28:39 +0700 |
commit | b28a21d276364357409655cb5c05f524c755b027 (patch) | |
tree | de46946aa166df504356e1832717c809b2dcf862 /audio | |
parent | a802619836c65f254468961d04eb7c46818b89aa (diff) |
audio/lxmusic: Switch to gtk+3 by default.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/lxmusic/0001-Use-themed-icon.patch | 49 | ||||
-rw-r--r-- | audio/lxmusic/README | 4 | ||||
-rw-r--r-- | audio/lxmusic/lxmusic.SlackBuild | 14 | ||||
-rw-r--r-- | audio/lxmusic/lxmusic.appdata.xml | 21 |
4 files changed, 84 insertions, 4 deletions
diff --git a/audio/lxmusic/0001-Use-themed-icon.patch b/audio/lxmusic/0001-Use-themed-icon.patch new file mode 100644 index 000000000000..c94db18874fb --- /dev/null +++ b/audio/lxmusic/0001-Use-themed-icon.patch @@ -0,0 +1,49 @@ +From f4c172d9c61700aa1f26ccaa154aa0d66093bb8f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com> +Date: Sun, 2 May 2021 13:50:30 +0200 +Subject: [PATCH] Use themed icon + +Also put the icon under the hicolor icon hierarchy. +--- + data/Makefile.am | 2 +- + src/lxmusic.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/data/Makefile.am b/data/Makefile.am +index c7679de..f612733 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -4,7 +4,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + desktopdir=$(datadir)/applications + + icon_DATA=lxmusic.png +-icondir=$(datadir)/pixmaps ++icondir=$(datadir)/icons/hicolor/128x128/apps + + man_MANS = lxmusic.1 + +diff --git a/src/lxmusic.c b/src/lxmusic.c +index 60efc61..5e55aa4 100644 +--- a/src/lxmusic.c ++++ b/src/lxmusic.c +@@ -265,7 +265,7 @@ void on_about(GtkWidget* mi, gpointer data) + + about = gtk_about_dialog_new(); + gtk_about_dialog_set_program_name( (GtkAboutDialog*)about, "LXMusic" ); +- gtk_about_dialog_set_logo((GtkAboutDialog*)about, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR"/pixmaps/lxmusic.png", NULL)); ++ gtk_about_dialog_set_logo_icon_name((GtkAboutDialog*)about, "lxmusic"); + gtk_about_dialog_set_version( (GtkAboutDialog*)about, VERSION ); + gtk_about_dialog_set_authors( (GtkAboutDialog*)about, authors ); + gtk_about_dialog_set_artists( (GtkAboutDialog*)about, artists ); +@@ -2395,7 +2395,7 @@ static void setup_ui() + gtk_builder_connect_signals(builder, NULL); + + /* window icon */ +- gtk_window_set_icon_from_file(GTK_WINDOW(main_win), PACKAGE_DATA_DIR"/pixmaps/lxmusic.png", NULL ); ++ gtk_window_set_icon_name(GTK_WINDOW(main_win), "lxmusic"); + + gtk_window_set_default_size(GTK_WINDOW(main_win), win_width, win_height); + /* this can trigger signal handler and show or hide the playlist. */ +-- +2.31.1 + diff --git a/audio/lxmusic/README b/audio/lxmusic/README index 7173dd227a71..25bb3cf06305 100644 --- a/audio/lxmusic/README +++ b/audio/lxmusic/README @@ -3,3 +3,7 @@ lxmusic (minimalist music player for LXDE) LXMusic is based on xmms2, which is lightweight and has server/client design. LXMusic has very few features, it can do nothing more than just playing a list of music files. + +if you want to build this for gtk+2 pass to the script the switch + + GTK3=no diff --git a/audio/lxmusic/lxmusic.SlackBuild b/audio/lxmusic/lxmusic.SlackBuild index c888d1f44b85..80e0e10acaef 100644 --- a/audio/lxmusic/lxmusic.SlackBuild +++ b/audio/lxmusic/lxmusic.SlackBuild @@ -29,7 +29,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=lxmusic VERSION=${VERSION:-0.4.7} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -67,6 +67,8 @@ else LIBDIRSUFFIX="" fi +WITHGTK3="--enable-gtk3" ; [ "${GTK3:-yes}" = "no" ] && WITHGTK3="" + set -e rm -rf $PKG @@ -82,7 +84,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -sh autogen.sh || true +patch -p1 < $CWD/0001-Use-themed-icon.patch + +autoreconf -fi CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -93,17 +97,19 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --mandir=/usr/man \ + $WITHGTK3 \ --build=$ARCH-slackware-linux make make install-strip DESTDIR=$PKG +install -m 0644 -D $CWD/$PRGNAM.appdata.xml $PKG/usr/share/metainfo/$PRGNAM.appdata.xml + find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION || true +cp -a COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION || true cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/audio/lxmusic/lxmusic.appdata.xml b/audio/lxmusic/lxmusic.appdata.xml new file mode 100644 index 000000000000..e61040536a07 --- /dev/null +++ b/audio/lxmusic/lxmusic.appdata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop-application"> + <id>org.lxde.lxmusic</id> + <launchable type="desktop-id">lxmusic.desktop</launchable> + <name>LXMusic</name> + <summary>Play your music files easily</summary> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-2.0</project_license> + <developer_name>LXDE team</developer_name> + <description> + <p>LXMusic is the minimalist music player for LXDE. It is a graphical user interface (GUI) for the audio player xmms2, which is lightweight and incorporates a server/client design. LXMusic is simple to operate: the user can build multiple playlists of audio files (and xmms2-supported audio streams), and LXMusic plays a selected playlist. A wide variety of audio formats can be played by LXMusic by installing the appropriate xmms2 plugins.</p> + </description> + <screenshots> + <screenshot type="default"> + <image>https://wiki.lxde.org/en/images/7/73/LXSMusic.png</image> + </screenshot> + </screenshots> + <url type="bugtracker">https://sourceforge.net/p/lxde/bugs/search/?q=labels:lxmusic</url> + <url type="homepage">https://www.lxde.org/</url> + <translation type="gettext">lxmusic</translation> +</component> |