# HG changeset patch # User Nathan Walp # Date 1178203709 0 # Node ID c6ca9e25814bb2844c4c261a18f41e3cb0b452b1 # Parent a77901ef0ebb6ed12f29a599160bc7a84a8c7996# Parent 02867a4346344d79f879d3d1420096daa284a7a6 merge of '57b4e954f5830e1dddd9bffb697deb057fb35943' and 'f547527e8c477535955c53e6a25dabe2b71bf876' diff -r a77901ef0ebb -r c6ca9e25814b finch/libgnt/Makefile.am --- a/finch/libgnt/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/finch/libgnt/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -64,12 +64,12 @@ gntmarshal.h \ gntmarshal.c -gntmarshal.c: genmarshal gntmarshal.h +gntmarshal.c: $(srcdir)/genmarshal gntmarshal.h echo "#include \"gntmarshal.h\"" > $@ - cat genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --body >> $@ + cat $(srcdir)/genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --body >> $@ -gntmarshal.h: genmarshal - cat genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --header > $@ +gntmarshal.h: $(srcdir)/genmarshal + cat $(srcdir)/genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --header > $@ libgnt_laincludedir=$(includedir)/gnt libgnt_lainclude_HEADERS = \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/Makefile.am --- a/libpurple/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -131,6 +131,8 @@ xmlnode.h \ whiteboard.h +BUILT_SOURCES = version.h + if ENABLE_DBUS CLEANFILES = \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/blist.c --- a/libpurple/blist.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/blist.c Thu May 03 14:48:29 2007 +0000 @@ -1825,7 +1825,6 @@ /* Delete the node */ purple_buddy_icon_unref(buddy->icon); g_hash_table_destroy(buddy->node.settings); - purple_presence_remove_buddy(buddy->presence, buddy); purple_presence_destroy(buddy->presence); g_free(buddy->name); g_free(buddy->alias); diff -r a77901ef0ebb -r c6ca9e25814b libpurple/buddyicon.c --- a/libpurple/buddyicon.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/buddyicon.c Thu May 03 14:48:29 2007 +0000 @@ -372,7 +372,7 @@ PurpleAccount *account; const char *username; PurpleBuddyIcon *icon_to_set; - GSList *sl, *list; + GSList *buddies; g_return_if_fail(icon != NULL); @@ -386,11 +386,10 @@ * the icon when they realize it has no data. */ icon_to_set = icon->img ? icon : NULL; - for (list = sl = purple_find_buddies(account, username); - sl != NULL; - sl = sl->next) + buddies = purple_find_buddies(account, username); + while (buddies != NULL) { - PurpleBuddy *buddy = (PurpleBuddy *)sl->data; + PurpleBuddy *buddy = (PurpleBuddy *)buddies->data; char *old_icon; purple_buddy_set_icon(buddy, icon_to_set); @@ -425,10 +424,10 @@ } unref_filename(old_icon); g_free(old_icon); + + buddies = g_slist_delete_link(buddies, buddies); } - g_slist_free(list); - conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, username, account); if (conv != NULL) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/connection.c --- a/libpurple/connection.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/connection.c Thu May 03 14:48:29 2007 +0000 @@ -161,7 +161,7 @@ purple_connection_destroy(PurpleConnection *gc) { PurpleAccount *account; - GSList *buddies, *tmp; + GSList *buddies; #if 0 GList *wins; #endif @@ -197,11 +197,11 @@ /* Clear out the proto data that was freed in the prpl close method*/ buddies = purple_find_buddies(account, NULL); - for (tmp = buddies; tmp; tmp = tmp->next) { - PurpleBuddy *buddy = tmp->data; + while (buddies != NULL) { + PurpleBuddy *buddy = buddies->data; buddy->proto_data = NULL; + buddies = g_slist_delete_link(buddies, buddies); } - g_slist_free(buddies); connections = g_list_remove(connections, gc); diff -r a77901ef0ebb -r c6ca9e25814b libpurple/gaim-compat.h --- a/libpurple/gaim-compat.h Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/gaim-compat.h Thu May 03 14:48:29 2007 +0000 @@ -115,7 +115,6 @@ #define gaim_account_add_buddy purple_account_add_buddy #define gaim_account_add_buddies purple_account_add_buddies #define gaim_account_remove_buddy purple_account_remove_buddy -#define gaim_account_remove_buddies purple_account_remove_buddies #define gaim_account_remove_group purple_account_remove_group @@ -1997,7 +1996,6 @@ #define gaim_presence_get_account purple_presence_get_account #define gaim_presence_get_conversation purple_presence_get_conversation #define gaim_presence_get_chat_user purple_presence_get_chat_user -#define gaim_presence_get_buddies purple_presence_get_buddies #define gaim_presence_get_statuses purple_presence_get_statuses #define gaim_presence_get_status purple_presence_get_status #define gaim_presence_get_active_status purple_presence_get_active_status diff -r a77901ef0ebb -r c6ca9e25814b libpurple/plugins/Makefile.am --- a/libpurple/plugins/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/plugins/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -130,6 +130,7 @@ -DVERSION=\"$(VERSION)\" \ -I$(top_builddir)/libpurple \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(PLUGIN_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/plugins/perl/Makefile.am --- a/libpurple/plugins/perl/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/plugins/perl/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -77,10 +77,14 @@ # common/fallback/const-c.inc \ # common/fallback/const-xs.inc +perl_scripts = \ + scripts/function_list.pl + EXTRA_DIST = \ Makefile.mingw \ common/Makefile.mingw \ - $(common_sources) + $(common_sources) \ + $(perl_scripts) common/Makefile: common/Makefile.PL @if test "x${top_srcdir}" != "x${top_builddir}"; then \ @@ -151,6 +155,7 @@ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir) \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(PLUGIN_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/plugins/ssl/Makefile.am --- a/libpurple/plugins/ssl/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/plugins/ssl/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -28,6 +28,7 @@ -DDATADIR=\"$(datadir)\" \ -DLIBDIR=\"$(libdir)/libpurple\" \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(PLUGIN_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/plugins/ssl/ssl-nss.c --- a/libpurple/plugins/ssl/ssl-nss.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-nss.c Thu May 03 14:48:29 2007 +0000 @@ -108,7 +108,7 @@ { char *lib; PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); - NSS_NoDB_Init(NULL); + NSS_NoDB_Init("."); /* TODO: Fix this so autoconf does the work trying to find this lib. */ #ifndef _WIN32 diff -r a77901ef0ebb -r c6ca9e25814b libpurple/plugins/tcl/Makefile.am --- a/libpurple/plugins/tcl/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/plugins/tcl/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -15,6 +15,7 @@ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir) \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(PLUGIN_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/privacy.c --- a/libpurple/privacy.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/privacy.c Thu May 03 14:48:29 2007 +0000 @@ -206,7 +206,8 @@ static void add_buddies_in_permit(PurpleAccount *account, gboolean local) { - GSList *list, *iter; + GSList *list; + /* Remove anyone in the permit list who is not in the buddylist */ for (list = account->permit; list != NULL; ) { char *person = list->data; @@ -214,13 +215,16 @@ if (!purple_find_buddy(account, person)) purple_privacy_permit_remove(account, person, local); } + /* Now make sure everyone in the buddylist is in the permit list */ - for (iter = list = purple_find_buddies(account, NULL); iter; iter = iter->next) { - PurpleBuddy *buddy = iter->data; + list = purple_find_buddies(account, NULL); + while (list != NULL) + { + PurpleBuddy *buddy = list->data; if (!g_slist_find_custom(account->permit, buddy->name, (GCompareFunc)g_utf8_collate)) purple_privacy_permit_add(account, buddy->name, local); + list = g_slist_delete_link(list, list); } - g_slist_free(list); } void diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/bonjour/Makefile.am --- a/libpurple/protocols/bonjour/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/bonjour/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -37,6 +37,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) \ $(HOWL_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/gg/Makefile.am --- a/libpurple/protocols/gg/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/gg/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -72,6 +72,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(INTGG_CFLAGS) \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/irc/Makefile.am --- a/libpurple/protocols/irc/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/irc/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -30,5 +30,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/jabber/Makefile.am --- a/libpurple/protocols/jabber/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/jabber/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -68,6 +68,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \ $(LIBXML_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/msn/Makefile.am --- a/libpurple/protocols/msn/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/msn/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -85,5 +85,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/novell/Makefile.am --- a/libpurple/protocols/novell/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/novell/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -52,5 +52,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/oscar/Makefile.am --- a/libpurple/protocols/oscar/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/oscar/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -79,5 +79,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/oscar/family_feedbag.c --- a/libpurple/protocols/oscar/family_feedbag.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Thu May 03 14:48:29 2007 +0000 @@ -139,13 +139,13 @@ } } while (exists); } - } else if (new->gid == 0x0000) { + } else if (type == AIM_SSI_TYPE_ICONINFO) { if (new->bid == 0xFFFF) { do { new->bid += 0x0001; exists = FALSE; for (cur = *list; cur != NULL; cur = cur->next) - if (((cur->bid == new->bid) && (cur->gid == new->gid)) || (cur->gid == new->bid)) { + if ((cur->bid >= new->bid) || (cur->gid >= new->bid)) { exists = TRUE; break; } diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu May 03 14:48:29 2007 +0000 @@ -1343,7 +1343,7 @@ purple_connection_error(gc, _("The AOL Instant Messenger service is temporarily unavailable.")); break; case 0x18: - /* connecting too frequently */ + /* screen name connecting too frequently */ gc->wants_to_die = TRUE; purple_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); break; @@ -1353,6 +1353,11 @@ g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), PURPLE_WEBSITE); purple_connection_error(gc, buf); break; + case 0x1d: + /* IP address connecting too frequently */ + gc->wants_to_die = TRUE; + purple_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); + break; default: purple_connection_error(gc, _("Authentication failed")); break; @@ -1770,7 +1775,7 @@ info->status, info->status_len); } - if (info->flags & AIM_FLAG_WIRELESS || info->capabilities & OSCAR_CAPABILITY_HIPTOP) + if (info->flags & AIM_FLAG_WIRELESS) { purple_prpl_got_user_status(account, info->sn, OSCAR_STATUS_ID_MOBILE, NULL); } else { @@ -5428,8 +5433,8 @@ return "admin"; if (userinfo->flags & AIM_FLAG_ACTIVEBUDDY) return "bot"; - if (userinfo->flags & AIM_FLAG_AOL) - return "aol-client"; + if (userinfo->capabilities & OSCAR_CAPABILITY_HIPTOP) + return "hiptop"; if (userinfo->capabilities & OSCAR_CAPABILITY_SECUREIM) return "secure"; } diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/qq/Makefile.am --- a/libpurple/protocols/qq/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/qq/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -93,6 +93,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -DVERSION=\"$(VERSION)\" \ -DQQ_BUDDY_ICON_DIR=\"$(datadir)/pixmaps/purple/buddy_icons/qq\" \ $(DEBUG_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/sametime/Makefile.am --- a/libpurple/protocols/sametime/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/sametime/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -34,7 +34,8 @@ AM_CFLAGS = \ $(GLIB_CFLAGS) $(MEANWHILE_CFLAGS) \ $(DEBUG_CFLAGS) \ - -I$(top_srcdir)/libpurple + -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple AM_CPPFLAGS = \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/silc/Makefile.am --- a/libpurple/protocols/silc/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/silc/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -31,5 +31,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/simple/Makefile.am --- a/libpurple/protocols/simple/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/simple/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -31,5 +31,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/toc/Makefile.am --- a/libpurple/protocols/toc/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/toc/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -27,5 +27,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/yahoo/Makefile.am --- a/libpurple/protocols/yahoo/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/yahoo/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -49,5 +49,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ $(DEBUG_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b libpurple/protocols/zephyr/Makefile.am --- a/libpurple/protocols/zephyr/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/protocols/zephyr/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -102,6 +102,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/libpurple/protocols \ -DCONFDIR=\"$(confdir)\" \ $(GLIB_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b libpurple/server.c --- a/libpurple/server.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/server.c Thu May 03 14:48:29 2007 +0000 @@ -210,22 +210,24 @@ serv_got_alias(PurpleConnection *gc, const char *who, const char *alias) { PurpleAccount *account = purple_connection_get_account(gc); - GSList *buds, *buddies = purple_find_buddies(account, who); + GSList *buddies = purple_find_buddies(account, who); PurpleBuddy *b; PurpleConversation *conv; - for (buds = buddies; buds; buds = buds->next) + while (buddies != NULL) { - b = buds->data; + b = buddies->data; + buddies = g_slist_delete_link(buddies, buddies); + if ((b->server_alias == NULL && alias == NULL) || (b->server_alias && alias && !strcmp(b->server_alias, alias))) { continue; } + purple_blist_server_alias_buddy(b, alias); conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, b->name, account); - if (conv != NULL && alias != NULL && strcmp(alias, who)) { char *tmp = g_strdup_printf(_("%s is now known as %s.\n"), @@ -237,7 +239,6 @@ g_free(tmp); } } - g_slist_free(buddies); } /* diff -r a77901ef0ebb -r c6ca9e25814b libpurple/sound.c --- a/libpurple/sound.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/sound.c Thu May 03 14:48:29 2007 +0000 @@ -31,6 +31,8 @@ #define STATUS_AVAILABLE 1 #define STATUS_AWAY 2 +static time_t last_played[PURPLE_NUM_SOUNDS]; + static gboolean purple_sound_play_required(const PurpleAccount *account) { @@ -77,6 +79,10 @@ if (!purple_sound_play_required(account)) return; + if (time(NULL) - last_played[event] < 2) + return; + last_played[event] = time(NULL); + if(sound_ui_ops && sound_ui_ops->play_event) { int plugin_return; @@ -127,6 +133,7 @@ purple_prefs_add_none("/purple/sound"); purple_prefs_add_int("/purple/sound/while_status", STATUS_AVAILABLE); + memset(last_played, 0, sizeof(last_played)); } void diff -r a77901ef0ebb -r c6ca9e25814b libpurple/status.c --- a/libpurple/status.c Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/status.c Thu May 03 14:48:29 2007 +0000 @@ -91,8 +91,7 @@ { PurpleAccount *account; char *name; - size_t ref_count; - GList *buddies; + PurpleBuddy *buddy; } buddy; @@ -131,13 +130,15 @@ -200, /* extended away */ -400, /* mobile */ -10, /* idle, special case. */ - -5 /* idle time, special case. */ + -5, /* idle time, special case. */ + 10 /* Offline messageable */ }; static GHashTable *buddy_presences = NULL; #define SCORE_IDLE 8 #define SCORE_IDLE_TIME 9 +#define SCORE_OFFLINE_MESSAGE 10 /************************************************************************** * PurpleStatusPrimitive API @@ -658,13 +659,8 @@ } else if (context == PURPLE_PRESENCE_CONTEXT_BUDDY) { - const GList *l; - - for (l = purple_presence_get_buddies(presence); l != NULL; l = l->next) - { - notify_buddy_status_update((PurpleBuddy *)l->data, presence, + notify_buddy_status_update(purple_presence_get_buddy(presence), presence, old_status, new_status); - } } } @@ -1148,10 +1144,7 @@ g_free(key->name); g_free(key); } - - presence->u.buddy.ref_count++; - presence->u.buddy.buddies = g_list_append(presence->u.buddy.buddies, - buddy); + presence->u.buddy.buddy = buddy; return presence; } @@ -1165,9 +1158,6 @@ { PurpleStatusBuddyKey key; - if(presence->u.buddy.ref_count != 0) - return; - key.account = presence->u.buddy.account; key.name = presence->u.buddy.name; @@ -1189,27 +1179,6 @@ g_free(presence); } -/* - * TODO: Maybe we should cal purple_presence_destroy() after we - * decrement the ref count? I don't see why we should - * make other places do it manually when we can do it here. - */ -void -purple_presence_remove_buddy(PurplePresence *presence, PurpleBuddy *buddy) -{ - g_return_if_fail(presence != NULL); - g_return_if_fail(buddy != NULL); - g_return_if_fail(purple_presence_get_context(presence) == - PURPLE_PRESENCE_CONTEXT_BUDDY); - - if (g_list_find(presence->u.buddy.buddies, buddy) != NULL) - { - presence->u.buddy.buddies = g_list_remove(presence->u.buddy.buddies, - buddy); - presence->u.buddy.ref_count--; - } -} - void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status) { @@ -1345,11 +1314,8 @@ const GList *l; time_t current_time = time(NULL); - for (l = purple_presence_get_buddies(presence); l != NULL; l = l->next) - { - update_buddy_idle((PurpleBuddy *)l->data, presence, current_time, - old_idle, idle); - } + update_buddy_idle(purple_presence_get_buddy(presence), presence, current_time, + old_idle, idle); } else if(purple_presence_get_context(presence) == PURPLE_PRESENCE_CONTEXT_ACCOUNT) { @@ -1443,14 +1409,14 @@ return presence->u.chat.user; } -const GList * -purple_presence_get_buddies(const PurplePresence *presence) +PurpleBuddy * +purple_presence_get_buddy(const PurplePresence *presence) { g_return_val_if_fail(presence != NULL, NULL); g_return_val_if_fail(purple_presence_get_context(presence) == PURPLE_PRESENCE_CONTEXT_BUDDY, NULL); - return presence->u.buddy.buddies; + return presence->u.buddy.buddy; } const GList * @@ -1607,8 +1573,14 @@ PurpleStatus *status = (PurpleStatus *)l->data; PurpleStatusType *type = purple_status_get_type(status); - if (purple_status_is_active(status)) + if (purple_status_is_active(status)) { score1 += primitive_scores[purple_status_type_get_primitive(type)]; + if (!purple_status_is_online(status)) { + PurpleBuddy *b = purple_presence_get_buddy(presence1); + if (b && purple_account_supports_offline_message(purple_buddy_get_account(b),b)) + score1 += primitive_scores[SCORE_OFFLINE_MESSAGE]; + } + } } score1 += purple_account_get_int(purple_presence_get_account(presence1), "score", 0); @@ -1618,8 +1590,15 @@ PurpleStatus *status = (PurpleStatus *)l->data; PurpleStatusType *type = purple_status_get_type(status); - if (purple_status_is_active(status)) + if (purple_status_is_active(status)) { score2 += primitive_scores[purple_status_type_get_primitive(type)]; + if (!purple_status_is_online(status)) { + PurpleBuddy *b = purple_presence_get_buddy(presence2); + if (b && purple_account_supports_offline_message(purple_buddy_get_account(b),b)) + score2 += primitive_scores[SCORE_OFFLINE_MESSAGE]; + } + + } } score2 += purple_account_get_int(purple_presence_get_account(presence2), "score", 0); @@ -1723,6 +1702,8 @@ primitive_scores[PURPLE_STATUS_EXTENDED_AWAY]); purple_prefs_add_int("/purple/status/scores/idle", primitive_scores[SCORE_IDLE]); + purple_prefs_add_int("/purple/status/scores/offline_msg", + primitive_scores[SCORE_OFFLINE_MESSAGE]); purple_prefs_connect_callback(handle, "/purple/status/scores/offline", score_pref_changed_cb, @@ -1742,6 +1723,9 @@ purple_prefs_connect_callback(handle, "/purple/status/scores/idle", score_pref_changed_cb, GINT_TO_POINTER(SCORE_IDLE)); + purple_prefs_connect_callback(handle, "/purple/status/scores/offline_msg", + score_pref_changed_cb, + GINT_TO_POINTER(SCORE_OFFLINE_MESSAGE)); buddy_presences = g_hash_table_new_full(purple_buddy_presences_hash, purple_buddy_presences_equal, diff -r a77901ef0ebb -r c6ca9e25814b libpurple/status.h --- a/libpurple/status.h Thu May 03 12:04:04 2007 +0000 +++ b/libpurple/status.h Thu May 03 14:48:29 2007 +0000 @@ -760,16 +760,6 @@ void purple_presence_destroy(PurplePresence *presence); /** - * Removes a buddy from a presence. - * - * This must be done before destroying a buddy in a presence. - * - * @param presence The presence. - * @param buddy The buddy. - */ -void purple_presence_remove_buddy(PurplePresence *presence, PurpleBuddy *buddy); - -/** * Adds a status to a presence. * * @param presence The presence. @@ -869,13 +859,13 @@ const char *purple_presence_get_chat_user(const PurplePresence *presence); /** - * Returns a presence's list of buddies. + * Returns the presence's buddy. * * @param presence The presence. * - * @return The presence's list of buddies. + * @return The presence's buddy. */ -const GList *purple_presence_get_buddies(const PurplePresence *presence); +PurpleBuddy *purple_presence_get_buddy(const PurplePresence *presence); /** * Returns all the statuses in a presence. diff -r a77901ef0ebb -r c6ca9e25814b pidgin/gtkconv.c --- a/pidgin/gtkconv.c Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/gtkconv.c Thu May 03 14:48:29 2007 +0000 @@ -3389,7 +3389,7 @@ for (iter = g_list_last(list); iter != NULL; iter = iter->prev) { PurplePresence *pre = iter->data; - PurpleBuddy *buddy = purple_presence_get_buddies(pre)->data; + PurpleBuddy *buddy = purple_presence_get_buddy(pre); create_sendto_item(menu, sg, &group, buddy, purple_buddy_get_account(buddy), purple_buddy_get_name(buddy)); } diff -r a77901ef0ebb -r c6ca9e25814b pidgin/gtkrequest.c --- a/pidgin/gtkrequest.c Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/gtkrequest.c Thu May 03 14:48:29 2007 +0000 @@ -1547,7 +1547,7 @@ if ((filename != NULL) && (*filename != '\0')) { if (savedialog) gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(filesel), filename); - else + else if (g_file_test(filename, G_FILE_TEST_EXISTS)) gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(filesel), filename); } if ((filename == NULL || *filename == '\0' || !g_file_test(filename, G_FILE_TEST_EXISTS)) && diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emblems/16/Makefile.am --- a/pidgin/pixmaps/emblems/16/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/pixmaps/emblems/16/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -9,6 +9,7 @@ free-for-chat.png \ game.png \ half-operator.png \ + hiptop.png \ male.png \ mobile.png \ not-authorized.png \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emblems/16/hiptop.png Binary file pidgin/pixmaps/emblems/16/hiptop.png has changed diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emotes/default/22/Makefile.am --- a/pidgin/pixmaps/emotes/default/22/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -136,6 +136,7 @@ sigarette.png \ silly.png \ skeleton.png \ + skywalker.png \ sleepy.png \ smile-big.png \ smile.png \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emotes/default/22/scalable/Makefile.am --- a/pidgin/pixmaps/emotes/default/22/scalable/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/scalable/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -126,6 +126,7 @@ sigarette.svg \ silly.svg \ skeleton.svg \ + skywalker.svg \ sleepy.svg \ smile-big.svg \ smile.svg \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emotes/default/22/scalable/skywalker.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/emotes/default/22/scalable/skywalker.svg Thu May 03 14:48:29 2007 +0000 @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emotes/default/22/skywalker.png Binary file pidgin/pixmaps/emotes/default/22/skywalker.png has changed diff -r a77901ef0ebb -r c6ca9e25814b pidgin/pixmaps/emotes/default/22/theme --- a/pidgin/pixmaps/emotes/default/22/theme Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/theme Thu May 03 14:48:29 2007 +0000 @@ -1,5 +1,5 @@ Name=Default -Description=Pidgin smileys (default) +Description=Pidgin smileys Icon=smile.png Author=Hylke Bons @@ -21,6 +21,8 @@ moneymouth.png :-$ foot-in-mouth.png :-! shout.png >:o >:O +! skywalker.png C:-) +! monkey.png :-(|) ### Following AIM 6.1 [AIM] @@ -62,7 +64,7 @@ msn.png (M) (m) cat.png (@) dog.png (&) -moon.png (S) (s) +moon.png (S) star.png (*) film.png (~) musical-note.png (8) @@ -86,7 +88,7 @@ good.png (Y) (y) bad.png (N) (n) vampire.png :[ :-[ -#goat.png (nah) (NAH) +#goat.png (nah) sun.png (#) rainbow.png (R) (r) quiet.png :-# @@ -95,26 +97,26 @@ sarcastic.png ^o) secret.png :-* sick.png +o( -snail.png (sn) (SN) -turtle.png (tu) (TU) -plate.png (pl) (PL) +snail.png (sn) +turtle.png (tu) +plate.png (pl) bowl.png (||) -pizza.png (pi) (PI) -soccerball.png (so) (SO) -car.png (au) (AU) -airplane.png (ap) (AP) -umbrella.png (um) (UM) -island.png (ip) (IP) -computer.png (co) (CO) -mobile.png (mp) (MP) -brb.png (brb) (BRB) -rain.png (st) (ST) -highfive.png (h5) (H5) -coins.png (mo) (MO) -sheep.png (bah) (BAH) +pizza.png (pi) +soccerball.png (so) +car.png (au) +airplane.png (ap) +umbrella.png (um) +island.png (ip) +computer.png (co) +mobile.png (mp) +brb.png (brb) +rain.png (st) +highfive.png (h5) +coins.png (mo) +sheep.png (bah) dont-know.png :^) thinking.png *-) -thunder.png (li) (LI) +thunder.png (li) party.png <:o) eyeroll.png 8-) yawn.png |-) diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/Makefile.am --- a/pidgin/plugins/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -108,7 +108,7 @@ AM_CPPFLAGS = \ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ - -I$(top_builddir)/src \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/libpurple \ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/cap/Makefile.am --- a/pidgin/plugins/cap/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/cap/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -21,6 +21,7 @@ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/crazychat/Makefile.am --- a/pidgin/plugins/crazychat/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/crazychat/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -33,6 +33,7 @@ AM_CPPFLAGS = -DPURPLE_PLUGINS \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(GTK_CFLAGS) \ $(GTKGLEXT_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/gestures/Makefile.am --- a/pidgin/plugins/gestures/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/gestures/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -21,6 +21,7 @@ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/gevolution/Makefile.am --- a/pidgin/plugins/gevolution/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/gevolution/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -23,6 +23,7 @@ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ $(DEBUG_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/perl/Makefile.am --- a/pidgin/plugins/perl/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/perl/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -98,6 +98,7 @@ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir) \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) \ diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/ticker/Makefile.am --- a/pidgin/plugins/ticker/Makefile.am Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/ticker/Makefile.am Thu May 03 14:48:29 2007 +0000 @@ -22,6 +22,7 @@ -DDATADIR=\"$(datadir)\" \ -DVERSION=\"$(VERSION)\" \ -I$(top_srcdir)/libpurple \ + -I$(top_builddir)/libpurple \ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) diff -r a77901ef0ebb -r c6ca9e25814b pidgin/plugins/timestamp_format.c --- a/pidgin/plugins/timestamp_format.c Thu May 03 12:04:04 2007 +0000 +++ b/pidgin/plugins/timestamp_format.c Thu May 03 14:48:29 2007 +0000 @@ -58,7 +58,8 @@ time_t t, gboolean show_date, gboolean force, - const char *dates) + const char *dates, + gboolean parens) { g_return_val_if_fail(dates != NULL, NULL); @@ -68,15 +69,15 @@ { struct tm *tm = localtime(&t); if (force) - return g_strdup(purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm), parens ? ")" : ""); else - return g_strdup(purple_date_format_long(tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_date_format_long(tm), parens ? ")" : ""); } if (force) { struct tm *tm = localtime(&t); - return g_strdup(purple_utf8_strftime("%H:%M:%S", tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%H:%M:%S", tm), parens ? ")" : ""); } return NULL; @@ -92,7 +93,7 @@ g_return_val_if_fail(conv != NULL, NULL); - return timestamp_cb_common(conv, t, show_date, force, dates); + return timestamp_cb_common(conv, t, show_date, force, dates, TRUE); } static char *log_timestamp_cb(PurpleLog *log, time_t t, gboolean show_date, gpointer data) @@ -104,7 +105,7 @@ g_return_val_if_fail(log != NULL, NULL); - return timestamp_cb_common(log->conv, t, show_date, force, dates); + return timestamp_cb_common(log->conv, t, show_date, force, dates, FALSE); } static gboolean