head 1.2; access; symbols pkgsrc-2026Q1:1.1.0.2 pkgsrc-2026Q1-base:1.1; locks; strict; comment @ * @; 1.2 date 2026.05.01.15.09.32; author ktnb; state dead; branches; next 1.1; commitid 8KbXY4rXV9j6I7EG; 1.1 date 2026.02.12.12.55.00; author ktnb; state Exp; branches; next ; commitid Wqkb4ElExfgkt5uG; desc @@ 1.2 log @kew: update to 4.0.0 New: - Discord RPC integration - kew play \ \ command - Support for macOS media keys - You can now dequeue m3u playlists and they are sorted first - Lyrics page now centers the current lyric once it reaches the center of the screen - Smoother gradient for non default sized spectrum visualizers - Added a Nix Flake - Expandable directories in search view - miniaudio bumped to version 0.11.24. - Hide footer option, hideFooter=1 - Hide time status (elapsed seconds, song length and so on) option, hideTimeStatus=1 - Add option to disable the stripping of track numbers from file names in the library: stripTrackNumbers=0 - Add AIFF support - ClearListClearsAll option, which makes backspace clear the whole playlist including the playing song - Non-square cover art is no longer stretched Bugs: - Do not strip the number from a song title if it's connected to an alphanumeric character, like '10th song - Fixed switching view via mouse leads to wrong view or no view is changed on macOS - Fixed finishing a repeated playlist while in track view puts you back in library view - Last line of lyrics duplicated in landscape mode - Fixed lyrics page not staying at the last line but jumping to the top - Fixed trim() segfaults on NetBSD 11 - Fixed side cover on library view sometimes appearing at the bottom and not centered - Fixed cover not being fetched from files with uppercase extension - Fixed crash when pressing enter on a different song while audio is playing on Termux - Fixed crash on exit in Termux/Android - Improved and more efficient stripping of numbers on filenames - Fixed segfault sometimes when pressing u for update - Fix timestamp calculation in embedded lyrics - Fix playlist not loading in correct order on startup - Fix chinese lyrics characters not printed correctly @ text @$NetBSD: patch-src_sys_mpris.c,v 1.1 2026/02/12 12:55:00 ktnb Exp $ Apply USE_DBUS correctly. https://github.com/ravachol/kew/issues/538 --- src/sys/mpris.c.orig 2026-02-12 02:30:02.240433498 +0000 +++ src/sys/mpris.c @@@@ -23,7 +23,7 @@@@ #include #include -#ifndef __APPLE__ +#ifdef USE_DBUS static guint registration_id; static guint bus_name_id; @@@@ -365,7 +365,7 @@@@ static void handle_set_position(GDBusConnection *conne } #endif -#ifndef __APPLE__ +#ifdef USE_DBUS static void handle_method_call(GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, @@@@ -413,7 +413,7 @@@@ static void handle_method_call(GDBusConnection *connec } #endif -#ifndef __APPLE__ +#ifdef USE_DBUS static void on_bus_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data) { @@@@ -808,7 +808,7 @@@@ static gboolean get_can_control(GDBusConnection *conne } #endif -#ifndef __APPLE__ +#ifdef USE_DBUS static GVariant *get_property_callback(GDBusConnection *connection, const gchar *sender, const gchar *object_path, @@@@ -950,7 +950,7 @@@@ set_property_callback(GDBusConnection *connection, con } #endif -#ifndef __APPLE__ +#ifdef USE_DBUS // MPRIS MediaPlayer2 interface vtable static const GDBusInterfaceVTable media_player_interface_vtable = { .method_call = handle_method_call, // We're using individual method handlers @@@@ -971,7 +971,7 @@@@ void emit_playback_stopped_mpris() void emit_playback_stopped_mpris() { -#ifndef __APPLE__ +#ifdef USE_DBUS if (get_gd_bus_connection()) { g_dbus_connection_call( get_gd_bus_connection(), NULL, "/org/mpris/MediaPlayer2", @@@@ -987,7 +987,7 @@@@ void cleanup_mpris(void) void cleanup_mpris(void) { -#ifndef __APPLE__ +#ifdef USE_DBUS if (registration_id > 0) { g_dbus_connection_unregister_object(get_gd_bus_connection(), registration_id); @@@@ -1019,7 +1019,7 @@@@ void init_mpris(void) void init_mpris(void) { -#ifndef __APPLE__ +#ifdef USE_DBUS AppState *state = get_app_state(); if (get_g_main_context() == NULL) { @@@@ -1080,7 +1080,7 @@@@ void emit_start_playing_mpris() void emit_start_playing_mpris() { -#ifndef __APPLE__ +#ifdef USE_DBUS GVariant *parameters = g_variant_new("(s)", "Playing"); g_dbus_connection_emit_signal( get_gd_bus_connection(), NULL, "/org/mpris/MediaPlayer2", @@@@ -1106,14 +1106,14 @@@@ gchar *sanitize_title(const gchar *title) return sanitized_dup; } -#ifndef __APPLE__ +#ifdef USE_DBUS static guint64 last_emit_time = 0; #endif void emit_properties_changed(GDBusConnection *connection, const gchar *property_name, GVariant *new_value) { -#ifndef __APPLE__ +#ifdef USE_DBUS GVariantBuilder changed_properties_builder; if (connection == NULL || property_name == NULL || new_value == NULL) @@@@ -1151,7 +1151,7 @@@@ void emit_volume_changed(void) void emit_volume_changed(void) { -#ifndef __APPLE__ +#ifdef USE_DBUS gdouble newVolume = (gdouble)get_current_volume() / 100; if (newVolume > 1.0) @@@@ -1165,7 +1165,7 @@@@ void emit_shuffle_changed(void) void emit_shuffle_changed(void) { -#ifndef __APPLE__ +#ifdef USE_DBUS gboolean shuffle_enabled = is_shuffle_enabled(); // Emit the PropertiesChanged signal for the volume property @@@@ -1178,7 +1178,7 @@@@ void emit_metadata_changed(const gchar *title, const g const gchar *album, const gchar *cover_art_path, const gchar *track_id, Node *current_song, gint64 length) { -#ifndef __APPLE__ +#ifdef USE_DBUS guint64 current_time = g_get_monotonic_time(); if (current_time - last_emit_time < 500000) // 0.5 seconds { @ 1.1 log @kew: fixed bug with non-dbus option @ text @d1 1 a1 1 $NetBSD$ @