pidgin/pidgin

Fix warning when selecting Notifications tab

21 months ago, Elliott Sales de Andrade
abadfc227738
Parents e3bd18c1769d
Children 74a04628357f
Fix warning when selecting Notifications tab

The setter doesn't need the `PurpleConversation` and always casting to it causes a warning when clicking the Notifications tab, which naturally is not a conversation.

Also, fix the space alignment.

Testing Done:
Opened and clicked on the Notification tab.

Reviewed at https://reviews.imfreedom.org/r/1575/
--- a/pidgin/pidginconversationwindow.c Mon Aug 08 22:14:37 2022 -0500
+++ b/pidgin/pidginconversationwindow.c Mon Aug 08 23:51:34 2022 -0500
@@ -67,8 +67,7 @@
* Helpers
*****************************************************************************/
static void
-pidgin_conversation_window_actions_set_enabled(PurpleConversation *conversation,
- GActionMap *map,
+pidgin_conversation_window_actions_set_enabled(GActionMap *map,
const gchar **actions,
gboolean enabled)
{
@@ -315,28 +314,25 @@
* actions.
*/
is_conversation = PURPLE_IS_CONVERSATION(obj);
- pidgin_conversation_window_actions_set_enabled(PURPLE_CONVERSATION(obj),
- G_ACTION_MAP(window),
- pidgin_conversation_window_conversation_actions,
- is_conversation);
+ pidgin_conversation_window_actions_set_enabled(G_ACTION_MAP(window),
+ pidgin_conversation_window_conversation_actions,
+ is_conversation);
/* If an IM is selected, enable the IM-specific actions otherwise
* disable them.
*/
im_selected = PURPLE_IS_IM_CONVERSATION(obj);
- pidgin_conversation_window_actions_set_enabled(PURPLE_CONVERSATION(obj),
- G_ACTION_MAP(window),
- pidgin_conversation_window_im_conversation_actions,
- im_selected);
+ pidgin_conversation_window_actions_set_enabled(G_ACTION_MAP(window),
+ pidgin_conversation_window_im_conversation_actions,
+ im_selected);
/* If a chat is selected, enable the chat-specific actions otherwise
* disable them.
*/
chat_selected = PURPLE_IS_CHAT_CONVERSATION(obj);
- pidgin_conversation_window_actions_set_enabled(PURPLE_CONVERSATION(obj),
- G_ACTION_MAP(window),
- pidgin_conversation_window_chat_conversation_actions,
- chat_selected);
+ pidgin_conversation_window_actions_set_enabled(G_ACTION_MAP(window),
+ pidgin_conversation_window_chat_conversation_actions,
+ chat_selected);
g_clear_object(&obj);
}