GNU bug report logs - #73410
[PATCH] gnu: waybar: Fix missing tray icons on 0.11.0.

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Sat, 21 Sep 2024 13:36:02 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73410 in the body.
You can then email your comments to 73410 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#73410; Package guix-patches. (Sat, 21 Sep 2024 13:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Poiret <dev <at> jpoiret.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 21 Sep 2024 13:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH] gnu: waybar: Fix missing tray icons on 0.11.0.
Date: Sat, 21 Sep 2024 15:34:46 +0200
From: Josselin Poiret <dev <at> jpoiret.xyz>

* 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

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 <alebastr89 <at> gmail.com>
+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<Gio::AsyncResult>& 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<ToolTip>(const Glib::VariantBase& value) {
+   result.text = get_variant<Glib::ustring>(container.get_child(2));
+   auto description = get_variant<Glib::ustring>(container.get_child(3));
+   if (!description.empty()) {
+-    result.text = fmt::format("<b>{}</b>\n{}", std::string(result.text), std::string(description));
++    result.text = fmt::format("<b>{}</b>\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<std::string>(value));
++    spdlog::trace("Set tray item property: {}.{} = {}", id.empty() ? bus_name : id, name, value);
+ 
+     if (name == "Category") {
+       category = get_variant<std::string>(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<std::string>(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<std::string>(value),
+-                 std::string(err.what()));
++                 id.empty() ? bus_name : id, name, value, err.what());
+   }
+ }
+ 
+@@ -226,9 +221,9 @@ void Item::processUpdatedProperties(Glib::RefPtr<Gio::AsyncResult>& _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<std::string_view, std::set<std::string_view>> 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")))

base-commit: 9d75215a59629ab224154ef6b843043289291f81
-- 
2.46.0





Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Fri, 27 Sep 2024 03:40:02 GMT) Full text and rfc822 format available.

Notification sent to Josselin Poiret <dev <at> jpoiret.xyz>:
bug acknowledged by developer. (Fri, 27 Sep 2024 03:40:03 GMT) Full text and rfc822 format available.

Message #10 received at 73410-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 73410-done <at> debbugs.gnu.org
Subject: Re: [bug#73410] [PATCH] gnu: waybar: Fix missing tray icons on 0.11.0.
Date: Fri, 27 Sep 2024 03:38:34 +0000
Hello Josselin!

On Sat, Sep 21, 2024 at 03:34 PM, Josselin Poiret wrote:

> From: Josselin Poiret <dev <at> jpoiret.xyz>
>
> * 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,
>

I updated, saw no tray icons, remembered seeing your patch, tried it
locally, and took the liberty of pushing as
13b6254abc76193c5b021e8dc73a1c4570d4fc41. I only added a "[source]" to
the changelog.

Thanks!
John

> 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
>
> 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 <alebastr89 <at> gmail.com>
> +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<Gio::AsyncResult>& 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<ToolTip>(const Glib::VariantBase& value) {
> +   result.text = get_variant<Glib::ustring>(container.get_child(2));
> +   auto description = get_variant<Glib::ustring>(container.get_child(3));
> +   if (!description.empty()) {
> +-    result.text = fmt::format("<b>{}</b>\n{}", std::string(result.text), std::string(description));
> ++    result.text = fmt::format("<b>{}</b>\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<std::string>(value));
> ++    spdlog::trace("Set tray item property: {}.{} = {}", id.empty() ? bus_name : id, name, value);
> +
> +     if (name == "Category") {
> +       category = get_variant<std::string>(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<std::string>(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<std::string>(value),
> +-                 std::string(err.what()));
> ++                 id.empty() ? bus_name : id, name, value, err.what());
> +   }
> + }
> +
> +@@ -226,9 +221,9 @@ void Item::processUpdatedProperties(Glib::RefPtr<Gio::AsyncResult>& _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<std::string_view, std::set<std::string_view>> 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")))
>
> base-commit: 9d75215a59629ab224154ef6b843043289291f81





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Oct 2024 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.