/pidgin/main: b12e7444a0cb: Facebook XMPP: disable some unsuppor...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed May 7 11:42:48 EDT 2014


Changeset: b12e7444a0cb5af1c844d699cbb7b8e3f38f47d4
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-07 17:42 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/b12e7444a0cb

Description:

Facebook XMPP: disable some unsupported features

diffstat:

 libpurple/protocols/jabber/libfacebook.c |  16 ++++++++--------
 pidgin/gtkaccount.c                      |   2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (60 lines):

diff --git a/libpurple/protocols/jabber/libfacebook.c b/libpurple/protocols/jabber/libfacebook.c
--- a/libpurple/protocols/jabber/libfacebook.c
+++ b/libpurple/protocols/jabber/libfacebook.c
@@ -64,8 +64,12 @@ facebook_login(PurpleAccount *account)
 	jabber_login(account);
 
 	gc = purple_account_get_connection(account);
+	if (!gc)
+		return;
+
+	purple_connection_set_flags(gc, 0);
+
 	js = purple_connection_get_protocol_data(gc);
-
 	if (!js)
 		return;
 
@@ -77,11 +81,7 @@ static PurplePlugin *my_protocol = NULL;
 static PurplePluginProtocolInfo prpl_info =
 {
 	sizeof(PurplePluginProtocolInfo),       /* struct_size */
-	OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_MAIL_CHECK |
-#ifdef HAVE_CYRUS_SASL
-	OPT_PROTO_PASSWORD_OPTIONAL |
-#endif
-	OPT_PROTO_SLASH_COMMANDS_NATIVE,
+	OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME,
 	NULL,							/* user_splits */
 	NULL,							/* protocol_options */
 	{"png", 32, 32, 96, 96, 0, PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */
@@ -96,7 +96,7 @@ static PurplePluginProtocolInfo prpl_inf
 	facebook_login,					/* login */
 	jabber_close,					/* close */
 	jabber_message_send_im,			/* send_im */
-	jabber_set_info,				/* set_info */
+	NULL,				/* set_info */
 	jabber_send_typing,				/* send_typing */
 	jabber_buddy_get_info,			/* get_info */
 	jabber_set_status,				/* set_status */
@@ -196,7 +196,7 @@ static PurplePluginInfo info =
 	NULL,                                           /**< ui_info        */
 	&prpl_info,                                     /**< extra_info     */
 	NULL,                                           /**< prefs_info     */
-	jabber_actions,
+	NULL,                                           /**< actions        */
 
 	/* padding */
 	NULL,
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -1076,7 +1076,7 @@ add_protocol_options(AccountPrefsDialog 
 					gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))),
 					                   str_value);
 				else
-					gtk_entry_set_text(GTK_ENTRY(entry), str_value);
+					gtk_entry_set_text(GTK_ENTRY(entry), str_value ? str_value : "");
 
 				title = g_strdup_printf("_%s:",
 						purple_account_option_get_text(option));



More information about the Commits mailing list