Hello community, here is the log from the commit of package pidgin-facebookchat for openSUSE:Factory checked in at Tue Mar 2 01:43:36 CET 2010. -------- --- GNOME/pidgin-facebookchat/pidgin-facebookchat.changes 2009-12-28 20:42:12.000000000 +0100 +++ /mounts/work_src_done/STABLE/pidgin-facebookchat/pidgin-facebookchat.changes 2010-03-01 15:45:50.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Mar 1 12:23:50 CET 2010 - dimstar@opensuse.org + +- Update to version 1.65: + + Fix for new buddy icons being too small + + Download all buddies at startup, not just online ones +- Fix our Makefile to actually build a working result with + -Wl,-as-needed. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- pidgin-facebookchat-source-1.64.tar.bz2 New: ---- pidgin-facebookchat-source-1.65.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pidgin-facebookchat.spec ++++++ --- /var/tmp/diff_new_pack.pG7c8J/_old 2010-03-02 01:43:12.000000000 +0100 +++ /var/tmp/diff_new_pack.pG7c8J/_new 2010-03-02 01:43:12.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package pidgin-facebookchat (Version 1.64) +# spec file for package pidgin-facebookchat (Version 1.65) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,8 +19,8 @@ Name: pidgin-facebookchat %define _name pidgin-facebookchat-source -Version: 1.64 -Release: 2 +Version: 1.65 +Release: 1 License: GPLv3+ Summary: Pidgin plugin for Facebook Chat Url: http://code.google.com/p/pidgin-facebookchat/ ++++++ pidgin-facebookchat-makefile ++++++ --- /var/tmp/diff_new_pack.pG7c8J/_old 2010-03-02 01:43:12.000000000 +0100 +++ /var/tmp/diff_new_pack.pG7c8J/_new 2010-03-02 01:43:12.000000000 +0100 @@ -46,7 +46,7 @@ rm -f *.so *~ libfacebook.so: ${SOURCES} - ${CC} ${PURPLE_CFLAGS} -I. -I/usr/include/json-glib-1.0 -ljson-glib-1.0 -pipe ${SOURCES} -o libfacebook.so + ${CC} ${PURPLE_CFLAGS} -I. -I/usr/include/json-glib-1.0 -pipe ${SOURCES} -ljson-glib-1.0 -o libfacebook.so sourcepackage: *.c *.h Makefile facebook16.png facebook22.png facebook48.png COPYING facebook.nsi tar --bzip2 -cf pidgin-facebookchat-source.tar.bz2 $^ ++++++ pidgin-facebookchat-source-1.64.tar.bz2 -> pidgin-facebookchat-source-1.65.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/Makefile new/pidgin-facebookchat/Makefile --- old/pidgin-facebookchat/Makefile 2009-12-04 06:59:38.000000000 +0100 +++ new/pidgin-facebookchat/Makefile 2010-02-23 23:52:25.000000000 +0100 @@ -7,7 +7,7 @@ LINUX_ARM_COMPILER = arm-none-linux-gnueabi-gcc LINUX_PPC_COMPILER = powerpc-unknown-linux-gnu-gcc FREEBSD60_COMPILER = i686-pc-freebsd6.0-gcc -MACPORT_COMPILER = i686-apple-darwin9-gcc-4.0.1 +MACPORT_COMPILER = i686-apple-darwin10-gcc-4.0.1 LIBPURPLE_CFLAGS = -I/usr/include/libpurple -I/usr/local/include/libpurple -DPURPLE_PLUGINS -DENABLE_NLS -DHAVE_ZLIB GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/include/json-glib-1.0 -ljson-glib-1.0 @@ -65,6 +65,9 @@ rm -f libfacebook.so libfacebook.dll libfacebook64.so libfacebookarm.so libfacebookppc.so pidgin-facebookchat.exe pidgin-facebookchat.deb pidgin-facebookchat.tar.bz2 pidgin-facebookchat-source.tar.bz2 rm -rf pidgin-facebookchat +libfacebook.macport.so: ${FACEBOOK_SOURCES} + ${MACPORT_COMPILER} ${MACPORT_CFLAGS} -Wall -I. -g -O2 -pipe ${FACEBOOK_SOURCES} -o libfacebook.macport.so -shared + libfacebook.so: ${FACEBOOK_SOURCES} ${LINUX32_COMPILER} ${LIBPURPLE_CFLAGS} -Wall ${GLIB_CFLAGS} -I. -g -O2 -pipe ${FACEBOOK_SOURCES} -o libfacebook.so -shared -fPIC -DPIC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/facebook.nsi new/pidgin-facebookchat/facebook.nsi --- old/pidgin-facebookchat/facebook.nsi 2009-12-04 02:29:49.000000000 +0100 +++ new/pidgin-facebookchat/facebook.nsi 2010-02-24 08:43:19.000000000 +0100 @@ -6,7 +6,7 @@ ; todo: SetBrandingImage ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "pidgin-facebookchat" -!define PRODUCT_VERSION "1.64" +!define PRODUCT_VERSION "1.65" !define PRODUCT_PUBLISHER "Eion Robb" !define PRODUCT_WEB_SITE "http://pidgin-facebookchat.googlecode.com/" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/fb_blist.c new/pidgin-facebookchat/fb_blist.c --- old/pidgin-facebookchat/fb_blist.c 2009-11-27 06:44:42.000000000 +0100 +++ new/pidgin-facebookchat/fb_blist.c 2010-02-24 06:12:51.000000000 +0100 @@ -110,23 +110,18 @@ return buddies; } -static void process_buddy_icon(FacebookAccount *fba, PurpleBuddy *buddy, - JsonObject *userInfo) +static void process_buddy_icon(FacebookAccount *fba, FacebookBuddy *fbuddy, + const gchar *buddy_icon_url) { - FacebookBuddy *fbuddy; - gchar *buddy_icon_url; + PurpleBuddy *buddy; gchar *icon_host; gchar *icon_path, *real_path; gchar *search_tmp; - fbuddy = buddy->proto_data; + buddy = fbuddy->buddy; - /* Set the buddy icon (if it hasn't changed) */ - buddy_icon_url = g_strdup(json_node_get_string(json_object_get_member( - userInfo, "thumbSrc"))); /* Seperate the URL into pieces */ purple_url_parse(buddy_icon_url, &icon_host, NULL, &icon_path, NULL, NULL); - g_free(buddy_icon_url); if (icon_path != NULL && icon_path[0] != '/') { @@ -155,7 +150,13 @@ /* bigger icon at /profile6/1845/74/n800753867_2878.jpg */ search_tmp = strstr(icon_path, "/q"); if (search_tmp) - *(search_tmp + 1) = 'n'; + *(search_tmp + 1) = 'n'; + else + { + search_tmp = strstr(icon_path, "_q.jpg"); + if (search_tmp) + *(search_tmp + 1) = 'n'; + } purple_debug_info("facebook", "buddy %s has a new buddy icon at http://%s%s\n", buddy->name, icon_host, icon_path); /* Fetch their icon */ fb_post_or_get(fba, FB_METHOD_GET, icon_host, @@ -215,10 +216,13 @@ for (cur = buddies; cur != NULL; cur = cur->next) { PurpleBuddy *buddy; + FacebookBuddy *fbuddy; buddy = (PurpleBuddy *)cur->data; + fbuddy = buddy->proto_data; - process_buddy_icon(fba, buddy, userInfo); + process_buddy_icon(fba, fbuddy, json_node_get_string( + json_object_get_member(userInfo, "thumbSrc"))); purple_presence_set_idle(purple_buddy_get_presence(buddy), idle, 0); @@ -531,6 +535,85 @@ return TRUE; } +static void got_full_buddy_list(FacebookAccount *fba, gchar *data, + gsize data_len, gpointer userdata) +{ + int i; + PurpleGroup *fb_group; + JsonParser *parser; + gchar *error = NULL; + JsonObject *objnode, *node; + JsonArray *entries; + + purple_debug_info("facebook", "parsing full buddy list\n"); + + if (fba == NULL) + return; + + parser = fb_get_parser(data, data_len); + if (parser == NULL) + return; + + purple_debug_misc("facebook", "full buddy list\n%s\n", data); + + objnode = fb_get_json_object(parser, &error); + if (!json_object_has_member(objnode, "payload")) + { + json_parser_free(parser); + return; + } + objnode = json_node_get_object(json_object_get_member( + objnode, "payload")); + if (!json_object_has_member(objnode, "entries")) + { + json_parser_free(parser); + return; + } + entries = json_node_get_array(json_object_get_member( + objnode, "entries")); + + fb_group = purple_find_group(DEFAULT_GROUP_NAME); + if (fb_group == NULL) + { + fb_group = purple_group_new(DEFAULT_GROUP_NAME); + purple_blist_add_group(fb_group, NULL); + } + for(i = 0; i < json_array_get_length(entries); i++) + { + node = json_node_get_object(json_array_get_element(entries, i)); + const gchar *type = json_node_get_string(json_object_get_member(node, "ty")); + if (type[0] != 'u') + continue; + const gchar *uid = json_node_get_string(json_object_get_member(node, "i")); + if (purple_find_buddy(fba->account, uid)) + continue; + + const gchar *name = json_node_get_string(json_object_get_member(node, "t")); + PurpleBuddy *buddy = purple_buddy_new(fba->account, uid, name); + purple_blist_add_buddy(buddy, NULL, fb_group, NULL); + FacebookBuddy *fbuddy = g_new0(FacebookBuddy, 1); + fbuddy->buddy = buddy; + fbuddy->fba = fba; + fbuddy->uid = atoll(uid); + fbuddy->name = g_strdup(name); + buddy->proto_data = fbuddy; + + const gchar *thumb_url = json_node_get_string(json_object_get_member(node, "it")); + process_buddy_icon(fba, fbuddy, thumb_url); + } + + json_parser_free(parser); +} + +void fb_get_full_buddy_list(FacebookAccount *fba) +{ + gchar *url; + + url = g_strdup_printf("/ajax/typeahead_search.php?u=%" G_GINT64_FORMAT "&__a=1", fba->uid); + fb_post_or_get(fba, FB_METHOD_GET, NULL, url, NULL, got_full_buddy_list, NULL, FALSE); + g_free(url); +} + void fb_blist_poke_buddy(PurpleBlistNode *node, gpointer data) { PurpleBuddy *buddy; @@ -594,6 +677,7 @@ fba->buddy_list_timer = purple_timeout_add_seconds(60, fb_get_buddy_list, fba); + fb_get_full_buddy_list(fba); } void fb_blist_destroy(FacebookAccount *fba) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/fb_blist.h new/pidgin-facebookchat/fb_blist.h --- old/pidgin-facebookchat/fb_blist.h 2009-07-07 23:15:08.000000000 +0200 +++ new/pidgin-facebookchat/fb_blist.h 2010-02-24 04:58:55.000000000 +0100 @@ -32,4 +32,6 @@ void fb_blist_init(FacebookAccount *fba); void fb_blist_destroy(FacebookAccount *fba); +void fb_get_full_buddy_list(FacebookAccount *fba); + #endif /* FACEBOOK_BLIST_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/libfacebook.c new/pidgin-facebookchat/libfacebook.c --- old/pidgin-facebookchat/libfacebook.c 2009-12-03 23:30:26.000000000 +0100 +++ new/pidgin-facebookchat/libfacebook.c 2010-01-15 01:48:09.000000000 +0100 @@ -457,6 +457,7 @@ fb_cancel_resending_messages(fba); } + g_hash_table_destroy(fba->sent_messages_hash); g_hash_table_destroy(fba->cookie_table); g_hash_table_destroy(fba->hostname_ip_cache); g_hash_table_destroy(fba->auth_buddies); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pidgin-facebookchat/libfacebook.h new/pidgin-facebookchat/libfacebook.h --- old/pidgin-facebookchat/libfacebook.h 2009-12-04 02:30:07.000000000 +0100 +++ new/pidgin-facebookchat/libfacebook.h 2010-02-24 08:43:30.000000000 +0100 @@ -21,7 +21,7 @@ #ifndef LIBFACEBOOK_H #define LIBFACEBOOK_H -#define FACEBOOK_PLUGIN_VERSION "1.64" +#define FACEBOOK_PLUGIN_VERSION "1.65" #define FACEBOOK_PLUGIN_ID "prpl-bigbrownchunx-facebookim" #define FACEBOOK_CAPTCHA_SITE "6LezHAAAAAAAADqVjseQ3ctG3ocfQs2Elo1FTa_a" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org