summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <malu@pidgin.im>2009-11-16 21:04:49 +0000
committerMarcus Lundblad <malu@pidgin.im>2009-11-16 21:04:49 +0000
commit266fbba4a0b10788e96672926c76314dfd2a8aed (patch)
tree3f5b300c3e470f2cf800821a689637abfbc61262
parent4a4dba1891a491deeb171e50deef42d0044764a9 (diff)
downloadpidgin-266fbba4a0b10788e96672926c76314dfd2a8aed.tar.gz
Remove purple_conversation_attention (also let prpl_send_attention handle
the signalling)
-rw-r--r--libpurple/conversation.c10
-rw-r--r--libpurple/conversation.h15
-rw-r--r--libpurple/protocols/jabber/jabber.c1
-rw-r--r--libpurple/protocols/msn/msn.c2
-rw-r--r--libpurple/protocols/yahoo/libymsg.c1
-rw-r--r--libpurple/prpl.c13
-rw-r--r--pidgin/gtkconv.c2
-rw-r--r--pidgin/gtkimhtmltoolbar.c3
8 files changed, 12 insertions, 35 deletions
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
index 1d0f702b42..3292abb9e4 100644
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -1017,16 +1017,6 @@ purple_conversation_write(PurpleConversation *conv, const char *who,
g_free(displayed);
}
-void
-purple_conversation_attention(PurpleConversation *conv, const char *who,
- guint type, PurpleMessageFlags flags, time_t mtime)
-{
- PurpleAccount *account = purple_conversation_get_account(conv);
- purple_signal_emit(purple_conversations_get_handle(),
- flags == PURPLE_MESSAGE_SEND ? "sent-attention" : "got-attention",
- account, who, conv, type);
-}
-
gboolean
purple_conversation_has_focus(PurpleConversation *conv)
{
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
index 1159e80147..4c5c5ad457 100644
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -646,21 +646,6 @@ void purple_conversation_write(PurpleConversation *conv, const char *who,
time_t mtime);
/**
- * Sends an attention to a conversation window.
- *
- * This is to be called by prpls to tell UIs to set off the action for
- * an attention message
- *
- * @param conv The conversation
- * @param who The user who sent the attention
- * @param type The attention type (will be 0 for protocols that only have 1 type)
- * @param flags The message flags (send, receive)
- * @param mtime The time the attentsion was sent
- */
-void purple_conversation_attention(PurpleConversation *conv, const char *who,
- guint attention_type, PurpleMessageFlags flags, time_t mtime);
-
-/**
Set the features as supported for the given conversation.
@param conv The conversation
@param features Bitset defining supported features
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index ebbd025913..96e2d120d9 100644
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -2890,7 +2890,6 @@ static PurpleCmdRet jabber_cmd_buzz(PurpleConversation *conv,
description =
g_strdup_printf(purple_attention_type_get_outgoing_desc(attn), alias);
- purple_conversation_attention(conv, who, 0, PURPLE_MESSAGE_SEND, time(NULL));
purple_conversation_write(conv, NULL, description,
PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(description);
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
index 5801398c28..7a8fd179de 100644
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -193,8 +193,6 @@ msn_cmd_nudge(PurpleConversation *conv, const gchar *cmd, gchar **args, gchar **
username = purple_conversation_get_name(conv);
purple_prpl_send_attention(gc, username, MSN_NUDGE);
- purple_conversation_attention(conv, username, 0, PURPLE_MESSAGE_SEND,
- time(NULL));
return PURPLE_CMD_RET_OK;
}
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
index d900ab9926..61a23a8624 100644
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -5048,7 +5048,6 @@ yahoopurple_cmd_buzz(PurpleConversation *c, const gchar *cmd, gchar **args, gcha
return PURPLE_CMD_RET_FAILED;
purple_prpl_send_attention(account->gc, c->name, YAHOO_BUZZ);
- purple_conversation_attention(c, c->name, 0, PURPLE_MESSAGE_SEND, time(NULL));
return PURPLE_CMD_RET_OK;
}
diff --git a/libpurple/prpl.c b/libpurple/prpl.c
index 7ebfca0a31..43c31d9a0e 100644
--- a/libpurple/prpl.c
+++ b/libpurple/prpl.c
@@ -407,6 +407,16 @@ purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence)
return statuses;
}
+static void
+purple_prpl_attention(PurpleConversation *conv, const char *who,
+ guint type, PurpleMessageFlags flags, time_t mtime)
+{
+ PurpleAccount *account = purple_conversation_get_account(conv);
+ purple_signal_emit(purple_conversations_get_handle(),
+ flags == PURPLE_MESSAGE_SEND ? "sent-attention" : "got-attention",
+ account, who, conv, type);
+}
+
void
purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code)
{
@@ -452,6 +462,7 @@ purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_cod
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, gc->account, who);
purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, description, flags, mtime);
+ purple_prpl_attention(conv, who, type_code, PURPLE_MESSAGE_SEND, time(NULL));
g_free(description);
}
@@ -510,7 +521,7 @@ purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code
conv =
purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, account);
if (conv)
- purple_conversation_attention(conv, who, type_code, PURPLE_MESSAGE_RECV,
+ purple_prpl_attention(conv, who, type_code, PURPLE_MESSAGE_RECV,
time(NULL));
}
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index 29a2003e57..cc6becb826 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -1265,8 +1265,6 @@ menu_get_attention_cb(gpointer data, guint action, GtkWidget *widget)
if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
purple_prpl_send_attention(purple_conversation_get_gc(conv),
purple_conversation_get_name(conv), 0);
- purple_conversation_attention(conv, purple_conversation_get_name(conv),
- 0, PURPLE_MESSAGE_SEND, time(NULL));
}
}
diff --git a/pidgin/gtkimhtmltoolbar.c b/pidgin/gtkimhtmltoolbar.c
index 412f9c2ebc..b6a9cc9552 100644
--- a/pidgin/gtkimhtmltoolbar.c
+++ b/pidgin/gtkimhtmltoolbar.c
@@ -930,9 +930,6 @@ static void send_attention_cb(GtkWidget *attention, GtkIMHtmlToolbar *toolbar)
PurpleConnection *gc = purple_conversation_get_gc(conv);
toggle_button_set_active_block(GTK_TOGGLE_BUTTON(attention), FALSE, toolbar);
- /*toggle_button_set_active_block(GTK_TOGGLE_BUTTON(
- g_object_get_data(G_OBJECT(toolbar->imhtml), "attention")), FALSE, toolbar);*/
- purple_conversation_attention(conv, who, 0, PURPLE_MESSAGE_SEND, time(NULL));
purple_prpl_send_attention(gc, who, 0);
}