From 3cfb62266033f8266f09d861e88845c55ac2777c Mon Sep 17 00:00:00 2001 From: Visal Vijay Date: Mon, 16 Mar 2026 23:45:28 +0530 Subject: [PATCH 1/3] Fix menu-actions GTK callback pointer handling --- src/ALabel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ALabel.cpp b/src/ALabel.cpp index 795f87f1..e6f46d94 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -116,8 +116,9 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st } submenus_[key] = GTK_MENU_ITEM(item); menuActionsMap_[key] = it->asString(); - g_signal_connect(submenus_[key], "activate", G_CALLBACK(handleGtkMenuEvent), - (gpointer)menuActionsMap_[key].c_str()); + g_signal_connect(submenus_[key], "activate", + G_CALLBACK(handleGtkMenuEvent), + (gpointer)menuActionsMap_[key].c_str()); } g_object_unref(builder); } catch (std::runtime_error& e) { From acf6f117eabb92b0e3cba35d7499635ccd36c8a9 Mon Sep 17 00:00:00 2001 From: Visal Vijay <150381094+B2krobbery@users.noreply.github.com> Date: Tue, 17 Mar 2026 01:13:14 +0530 Subject: [PATCH 2/3] Update ALabel.cpp --- src/ALabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ALabel.cpp b/src/ALabel.cpp index e6f46d94..7f34bca3 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -118,7 +118,7 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st menuActionsMap_[key] = it->asString(); g_signal_connect(submenus_[key], "activate", G_CALLBACK(handleGtkMenuEvent), - (gpointer)menuActionsMap_[key].c_str()); + (gpointer)g_strdup(menuActionsMap_[key].c_str())); } g_object_unref(builder); } catch (std::runtime_error& e) { From 196589cf321ef4fdf848d18f1e249199bc7821e9 Mon Sep 17 00:00:00 2001 From: Visal Vijay <150381094+B2krobbery@users.noreply.github.com> Date: Tue, 17 Mar 2026 01:17:08 +0530 Subject: [PATCH 3/3] Update ALabel.cpp --- src/ALabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ALabel.cpp b/src/ALabel.cpp index 7f34bca3..b23926d8 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -118,7 +118,7 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st menuActionsMap_[key] = it->asString(); g_signal_connect(submenus_[key], "activate", G_CALLBACK(handleGtkMenuEvent), - (gpointer)g_strdup(menuActionsMap_[key].c_str())); + (gpointer)g_strdup(menuActionsMap_[key].c_str())); } g_object_unref(builder); } catch (std::runtime_error& e) {