diff --git a/gnoemoe/mcp/gm-mcp-icecrew-serverinfo.c b/gnoemoe/mcp/gm-mcp-icecrew-serverinfo.c index ffbae40..200252a 100644 --- a/gnoemoe/mcp/gm-mcp-icecrew-serverinfo.c +++ b/gnoemoe/mcp/gm-mcp-icecrew-serverinfo.c @@ -324,7 +324,9 @@ gm_mcp_icecrew_serverinfo_view_set_sensitive(GmMcpIcecrewServerinfoView *view, void on_gm_mcp_icecrew_serverinfo_view_active_changed(GmWorld *world, - gboolean active, GmMcpIcecrewServerinfoView *view) { + GParamSpec *pspec, GmMcpIcecrewServerinfoView *view) { + gboolean active = gm_world_active(world); + if (active && gm_mcp_icecrew_serverinfo_has_info(view->package)) { gm_mcp_icecrew_serverinfo_view_set_sensitive(view, TRUE); } else if (!active) { @@ -377,7 +379,7 @@ gm_mcp_icecrew_serverinfo_create_view(GmMcpPackage *package, GObject *parent) { // Connect to active_changed signal of the world to alter the sensitivity // of the info menu item g_signal_connect(GM_MCP_SESSION_WORLD(GM_MCP_PACKAGE_SESSION(package)), - "active_changed", + "notify::active", G_CALLBACK(on_gm_mcp_icecrew_serverinfo_view_active_changed), view);