Mercurial > pidgin.yaz
changeset 29645:602f3b6ddbbf
Removed _ALLOW_ATTENTION from connection flags
Look at the existence of prpl->send_attention to gray out attention button
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Wed, 29 Oct 2008 20:17:21 +0000 |
parents | 0efd688ed086 |
children | 9e07b1c14075 |
files | libpurple/connection.h libpurple/protocols/jabber/jabber.c libpurple/protocols/msn/msn.c libpurple/protocols/myspace/myspace.c libpurple/protocols/yahoo/yahoo.c pidgin/gtkimhtmltoolbar.c |
diffstat | 6 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/connection.h Tue Oct 28 23:08:13 2008 +0000 +++ b/libpurple/connection.h Wed Oct 29 20:17:21 2008 +0000 @@ -45,7 +45,6 @@ PURPLE_CONNECTION_NO_URLDESC = 0x0040, /**< Connection does not support descriptions with links */ PURPLE_CONNECTION_NO_IMAGES = 0x0080, /**< Connection does not support sending of images */ PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY = 0x0100, /**< Connection supports sending and receiving custom smileys */ - PURPLE_CONNECTION_ALLOW_ATTENTION = 0x0200, /**< Connection supports sending attention */ } PurpleConnectionFlags;
--- a/libpurple/protocols/jabber/jabber.c Tue Oct 28 23:08:13 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Oct 29 20:17:21 2008 +0000 @@ -646,8 +646,7 @@ JabberBuddy *my_jb = NULL; gc->flags |= PURPLE_CONNECTION_HTML | - PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY | - PURPLE_CONNECTION_ALLOW_ATTENTION; + PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY; js = gc->proto_data = g_new0(JabberStream, 1); js->gc = gc; js->fd = -1;
--- a/libpurple/protocols/msn/msn.c Tue Oct 28 23:08:13 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Wed Oct 29 20:17:21 2008 +0000 @@ -986,8 +986,7 @@ gc->proto_data = session; gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_FORMATTING_WBFO | PURPLE_CONNECTION_NO_BGCOLOR | - PURPLE_CONNECTION_NO_FONTSIZE | PURPLE_CONNECTION_NO_URLDESC | PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY | - PURPLE_CONNECTION_ALLOW_ATTENTION; + PURPLE_CONNECTION_NO_FONTSIZE | PURPLE_CONNECTION_NO_URLDESC | PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY; msn_session_set_login_step(session, MSN_LOGIN_STEP_START);
--- a/libpurple/protocols/myspace/myspace.c Tue Oct 28 23:08:13 2008 +0000 +++ b/libpurple/protocols/myspace/myspace.c Wed Oct 29 20:17:21 2008 +0000 @@ -289,8 +289,7 @@ gc = purple_account_get_connection(acct); gc->proto_data = msim_session_new(acct); - gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_URLDESC | - PURPLE_CONNECTION_ALLOW_ATTENTION; + gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_URLDESC; /* 1. connect to server */ purple_connection_update_progress(gc, _("Connecting"),
--- a/libpurple/protocols/yahoo/yahoo.c Tue Oct 28 23:08:13 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Oct 29 20:17:21 2008 +0000 @@ -2994,8 +2994,7 @@ PurpleConnection *gc = purple_account_get_connection(account); struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); PurpleStatus *status = purple_account_get_active_status(account); - gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC | - PURPLE_CONNECTION_ALLOW_ATTENTION; + gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC; purple_connection_update_progress(gc, _("Connecting"), 1, 2);
--- a/pidgin/gtkimhtmltoolbar.c Tue Oct 28 23:08:13 2008 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Wed Oct 29 20:17:21 2008 +0000 @@ -1562,11 +1562,16 @@ PurpleConversation *conv) { PurpleConnection *gc = purple_conversation_get_gc(conv); + PurplePlugin *prpl = purple_connection_get_prpl(gc); + purple_debug_info("gtkimhtmltoolbar", "switch active conversation to %p\n", conv); toolbar->active_conv = conv; - gtk_widget_set_sensitive(toolbar->attention, - gc->flags & PURPLE_CONNECTION_ALLOW_ATTENTION); + /* gray out attention button on protocols that don't support it + for the time being it is always disabled for chats */ + gtk_widget_set_sensitive(toolbar->attention, + purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM && + PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention != NULL); }