[arch-commits] Commit in lxmusic/trunk (0001-Use-themed-icon.patch PKGBUILD)

Balló György bgyorgy at archlinux.org
Sun May 2 12:05:17 UTC 2021


    Date: Sunday, May 2, 2021 @ 12:05:16
  Author: bgyorgy
Revision: 926117

upgpkg: lxmusic 0.4.7-5: Use themed icon

Added:
  lxmusic/trunk/0001-Use-themed-icon.patch
Modified:
  lxmusic/trunk/PKGBUILD

----------------------------+
 0001-Use-themed-icon.patch |   49 +++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD                   |   15 ++++++++++---
 2 files changed, 61 insertions(+), 3 deletions(-)

Added: 0001-Use-themed-icon.patch
===================================================================
--- 0001-Use-themed-icon.patch	                        (rev 0)
+++ 0001-Use-themed-icon.patch	2021-05-02 12:05:16 UTC (rev 926117)
@@ -0,0 +1,49 @@
+From f4c172d9c61700aa1f26ccaa154aa0d66093bb8f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at 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
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-02 11:29:33 UTC (rev 926116)
+++ PKGBUILD	2021-05-02 12:05:16 UTC (rev 926117)
@@ -4,7 +4,7 @@
 
 pkgname=lxmusic
 pkgver=0.4.7
-pkgrel=4
+pkgrel=5
 pkgdesc='Lightweight music player (XMMS2 client)'
 arch=('x86_64')
 url='https://lxde.org/'
@@ -14,10 +14,19 @@
 makedepends=('intltool')
 replaces=('lxmusic-gtk3')
 source=("https://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.xz"
-        'lxmusic.appdata.xml')
+        'lxmusic.appdata.xml'
+        '0001-Use-themed-icon.patch')
 sha256sums=('4933987338eb6e8c77d63b14cea5a8886146e75acbc38a21438c6c3f47bc06ba'
-            '0093885fe76bda60a1b319970bd8d148903a3adb674690d3d9cf9262e053b05b')
+            '0093885fe76bda60a1b319970bd8d148903a3adb674690d3d9cf9262e053b05b'
+            '9cd869db22ac71c01e90365d9252b72bde64ec9f0a0bad8fecc32319da0a99fe')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # Use themed icon
+  patch -Np1 -i ../0001-Use-themed-icon.patch
+  autoreconf -fi
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --enable-gtk3



More information about the arch-commits mailing list