From patchwork Sat Sep 21 13:34:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 68241 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 49D2527BBE2; Sat, 21 Sep 2024 14:36:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D6A7627BBE9 for ; Sat, 21 Sep 2024 14:36:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ss0H2-0006nf-RR; Sat, 21 Sep 2024 09:35:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ss0H0-0006nN-Lx for guix-patches@gnu.org; Sat, 21 Sep 2024 09:35:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ss0H0-0007rt-Cz for guix-patches@gnu.org; Sat, 21 Sep 2024 09:35:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=rwDgmQHwhRKnGV2YgODTC73xEGFbrFSCdKJ9t1Q051Q=; b=lcHmU2k6AzsSp5JRVRi0XiW2fLFnUX+Jqx4QEtxXQe1jQubDL/BHgS052tcwZlxkMPlY46p6z498gJUCcnyc7Szis2kNHvoVP3g6jyhTWjzjdUvqIqYOesAU4UP+ivWegFvJp8rDTgQ/u05oaXbCeR6eZe5403MLHgMV27PU1YdnezebzD9jUCYy2QIDSEqyQFnaBWPcHyY/3UlDpWo8QYSh7cpQaFXaG/DQkEaBU06jR3QqPdPlpWnZm4Bqb5Q/rt6xxRapn3cR6caawX2vO7u/qRwarU+Xf6v8ovSOOvQCxJwtrO+nb6i9OrOROOyHBpcmwFOfVBNSQ71j4MJSXQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ss0HK-00088f-GW for guix-patches@gnu.org; Sat, 21 Sep 2024 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73410] [PATCH] gnu: waybar: Fix missing tray icons on 0.11.0. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 21 Sep 2024 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73410 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73410@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172692571930731 (code B ref -1); Sat, 21 Sep 2024 13:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Sep 2024 13:35:19 +0000 Received: from localhost ([127.0.0.1]:37609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ss0Gc-0007zb-Eb for submit@debbugs.gnu.org; Sat, 21 Sep 2024 09:35:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:55144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ss0Ga-0007zT-D8 for submit@debbugs.gnu.org; Sat, 21 Sep 2024 09:35:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ss0GF-0006dQ-SK for guix-patches@gnu.org; Sat, 21 Sep 2024 09:34:55 -0400 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ss0GD-0007fJ-Rg for guix-patches@gnu.org; Sat, 21 Sep 2024 09:34:55 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 58218185465; Sat, 21 Sep 2024 13:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1726925688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rwDgmQHwhRKnGV2YgODTC73xEGFbrFSCdKJ9t1Q051Q=; b=iR7dvGBWADn5HhmAba0orhT65l0GlgKGxA0wJGdhjjZCw4udlw3iVRMHspF2WX1fc/h77Z BnIZUYghYlKx6cnX8illE5ezSK5Kj9JdkItYCa2ItRAXfEAlYmQ49FmhTkhAV6rN+3Z4O0 j1apw5z4vnaxpIichPU59LDFgOPurpDfQzq1ZxvGphcsp9yavKgIRg7UYyy+JEh6qChTm5 MnV9h/P3iHEfnqjhm7G2S2Odic9RgFEk7YRMAxliHU6y7oB+ceTnyOIv6orPuN39HKQZb6 PEHemaozsM7FKlVOdZrqVxNvHr2nuSCkY46nVcoEqbcScgljjXKC4JhojZDmKw== Date: Sat, 21 Sep 2024 15:34:46 +0200 Message-ID: <3b60148e7bdc1558b19255c2d0065bd7416c2afd.1726925552.git.dev@jpoiret.xyz> MIME-Version: 1.0 X-Spamd-Bar: ++++ Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Josselin Poiret * gnu/packages/patches/waybar-0.11.0-fix-tray-icons.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/wm.scm (waybar): Use it. Change-Id: Ib480b815faf3a331e1fc093dee72bb3099df57c5 --- Hi everyone, This fixes a bug in the newest release that is now fixed on the main branch upstream: tray icons do not appear! Best, gnu/local.mk | 1 + .../waybar-0.11.0-fix-tray-icons.patch | 86 +++++++++++++++++++ gnu/packages/wm.scm | 3 +- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/waybar-0.11.0-fix-tray-icons.patch base-commit: 9d75215a59629ab224154ef6b843043289291f81 diff --git a/gnu/local.mk b/gnu/local.mk index 8e7abc8a47..104fcb01d6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2287,6 +2287,7 @@ dist_patch_DATA = \ %D%/packages/patches/wacomtablet-add-missing-includes.patch \ %D%/packages/patches/wacomtablet-qt5.15.patch \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ + %D%/packages/patches/waybar-0.11.0-fix-tray-icons.patch \ %D%/packages/patches/wcstools-extend-makefiles.patch \ %D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch \ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ diff --git a/gnu/packages/patches/waybar-0.11.0-fix-tray-icons.patch b/gnu/packages/patches/waybar-0.11.0-fix-tray-icons.patch new file mode 100644 index 0000000000..5c8c98a661 --- /dev/null +++ b/gnu/packages/patches/waybar-0.11.0-fix-tray-icons.patch @@ -0,0 +1,86 @@ +Taken from upstream's merged PR #3604 [1]. + +[1] https://github.com/Alexays/Waybar/pull/3604 + +From 0006e4713ae19776528038b3242ded05db884ba5 Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Sat, 14 Sep 2024 07:37:37 -0700 +Subject: [PATCH 2/2] fix(tray): revert ustring formatting changes + +This reverts commit a4d31ab10d1630cb9104c695d7b777ca12468904. +--- + src/modules/sni/item.cpp | 23 +++++++++-------------- + 1 file changed, 9 insertions(+), 14 deletions(-) + +diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp +index 8afb39fb3..6c4ec8c06 100644 +--- a/src/modules/sni/item.cpp ++++ b/src/modules/sni/item.cpp +@@ -104,11 +104,9 @@ void Item::proxyReady(Glib::RefPtr& result) { + this->updateImage(); + + } catch (const Glib::Error& err) { +- spdlog::error("Failed to create DBus Proxy for {} {}: {}", bus_name, object_path, +- std::string(err.what())); ++ spdlog::error("Failed to create DBus Proxy for {} {}: {}", bus_name, object_path, err.what()); + } catch (const std::exception& err) { +- spdlog::error("Failed to create DBus Proxy for {} {}: {}", bus_name, object_path, +- std::string(err.what())); ++ spdlog::error("Failed to create DBus Proxy for {} {}: {}", bus_name, object_path, err.what()); + } + } + +@@ -126,15 +124,14 @@ ToolTip get_variant(const Glib::VariantBase& value) { + result.text = get_variant(container.get_child(2)); + auto description = get_variant(container.get_child(3)); + if (!description.empty()) { +- result.text = fmt::format("{}\n{}", std::string(result.text), std::string(description)); ++ result.text = fmt::format("{}\n{}", result.text, description); + } + return result; + } + + void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) { + try { +- spdlog::trace("Set tray item property: {}.{} = {}", id.empty() ? bus_name : id, +- std::string(name), get_variant(value)); ++ spdlog::trace("Set tray item property: {}.{} = {}", id.empty() ? bus_name : id, name, value); + + if (name == "Category") { + category = get_variant(value); +@@ -179,12 +176,10 @@ void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) { + } + } catch (const Glib::Error& err) { + spdlog::warn("Failed to set tray item property: {}.{}, value = {}, err = {}", +- id.empty() ? bus_name : id, std::string(name), get_variant(value), +- std::string(err.what())); ++ id.empty() ? bus_name : id, name, value, err.what()); + } catch (const std::exception& err) { + spdlog::warn("Failed to set tray item property: {}.{}, value = {}, err = {}", +- id.empty() ? bus_name : id, std::string(name), get_variant(value), +- std::string(err.what())); ++ id.empty() ? bus_name : id, name, value, err.what()); + } + } + +@@ -226,9 +221,9 @@ void Item::processUpdatedProperties(Glib::RefPtr& _result) { + + this->updateImage(); + } catch (const Glib::Error& err) { +- spdlog::warn("Failed to update properties: {}", std::string(err.what())); ++ spdlog::warn("Failed to update properties: {}", err.what()); + } catch (const std::exception& err) { +- spdlog::warn("Failed to update properties: {}", std::string(err.what())); ++ spdlog::warn("Failed to update properties: {}", err.what()); + } + update_pending_.clear(); + } +@@ -250,7 +245,7 @@ static const std::map> signal2props + + void Item::onSignal(const Glib::ustring& sender_name, const Glib::ustring& signal_name, + const Glib::VariantContainerBase& arguments) { +- spdlog::trace("Tray item '{}' got signal {}", id, std::string(signal_name)); ++ spdlog::trace("Tray item '{}' got signal {}", id, signal_name); + auto changed = signal2props.find(signal_name.raw()); + if (changed != signal2props.end()) { + if (update_pending_.empty()) { diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 4b9d116bda..2e00e0df41 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -2233,7 +2233,8 @@ (define-public waybar (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1bw6d3bf8rm4mgrbcprxxljfxbyabbj2lwabk2z19r8lhfz38myy")))) + (base32 "1bw6d3bf8rm4mgrbcprxxljfxbyabbj2lwabk2z19r8lhfz38myy")) + (patches (search-patches "waybar-0.11.0-fix-tray-icons.patch")))) (build-system meson-build-system) (arguments (list #:configure-flags #~(list "--wrap-mode=nodownload")))