Remove unnecessary g_strdup in GTK callback

This commit is contained in:
Visal Vijay
2026-03-25 21:45:14 +05:30
parent 06c3d4393c
commit e55bff662e

View File

@@ -116,9 +116,8 @@ 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)g_strdup(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) {