Commit b19f9aa8 authored by Mohammed Sadiq's avatar Mohammed Sadiq
Browse files

Simplify showing a conversation

purple_conversation_present() does all what we need, use that.
Don't repeat them.
parent eb85ddb9
......@@ -49,38 +49,9 @@ chatty_conv_im_with_buddy (PurpleAccount *account,
name);
}
chatty_conv_show_conversation (conv);
}
/**
* chatty_conv_show_conversation:
* @conv: a PurpleConversation
*
* Shows a conversation after a notification
*
* Called from cb_open_message in chatty-notify.c
*
*/
void
chatty_conv_show_conversation (PurpleConversation *conv)
{
ChattyWindow *window;
if (!conv) {
return;
}
window = chatty_application_get_main_window (CHATTY_APPLICATION_DEFAULT ());
purple_conversation_present (conv);
chatty_window_change_view (window, CHATTY_VIEW_MESSAGE_LIST);
gtk_window_present (GTK_WINDOW(window));
}
void
chatty_conv_add_history_since_component (GHashTable *components,
const char *account,
......
......@@ -32,7 +32,6 @@ typedef enum
void chatty_conv_im_with_buddy (PurpleAccount *account, const char *username);
void chatty_conv_show_conversation (PurpleConversation *conv);
void chatty_conv_join_chat (PurpleChat *chat);
void chatty_conv_add_history_since_component(GHashTable *components, const char *account, const char *room);
......
......@@ -24,7 +24,7 @@ cb_open_message (GSimpleAction *action,
gpointer user_data)
{
if (conv_notify) {
chatty_conv_show_conversation (conv_notify);
purple_conversation_present (conv_notify);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment