Mercurial > pidgin.yaz
changeset 8363:19459d9eead2
[gaim-migrate @ 9088]
Nice patch from nosnilmot to make AIM icons work better.
My testing made me realize 2 things still don't work well:
Gaim doesn't clear icons when someone else sets their icon to nothing
Gaim doesn't show some icons. Maybe the official ones?
With the shorter, constant checksum thing?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 28 Feb 2004 22:45:34 +0000 |
parents | 1976914caa51 |
children | faf86e506ebe |
files | ChangeLog src/gtkaccount.c src/gtkimhtml.c src/gtkutils.c src/protocols/oscar/oscar.c |
diffstat | 5 files changed, 18 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Feb 28 21:14:51 2004 +0000 +++ b/ChangeLog Sat Feb 28 22:45:34 2004 +0000 @@ -33,6 +33,9 @@ * Tabs now stay green when they are supposed to (Etan Reisner) * Fixed a bug where only the first user in a chat room list was removed sometimes when trying to remove a group of users (Tim Ringenbach) + * Clearing an AIM buddy icon actually removes it from the server, + icons changes in the account editor do not take effect if the + canel button is used (Stu Tomlinson) * Improved chat parting logic (Tim Ringenbach) * Yet Another IRC channel user duplication bugfix (Tim Ringenbach) * TCL Plugin API changed
--- a/src/gtkaccount.c Sat Feb 28 21:14:51 2004 +0000 +++ b/src/gtkaccount.c Sat Feb 28 22:45:34 2004 +0000 @@ -252,9 +252,6 @@ return; } - if (dialog->account != NULL) - gaim_account_set_buddy_icon(dialog->account, filename); - gtk_entry_set_text(GTK_ENTRY(dialog->buddy_icon_entry), filename); gtk_widget_destroy(dialog->buddy_icon_filesel); } @@ -349,8 +346,6 @@ buddy_icon_reset_cb(GtkWidget *button, AccountPrefsDialog *dialog) { gtk_entry_set_text(GTK_ENTRY(dialog->buddy_icon_entry), ""); - if (dialog->account) - gaim_account_set_buddy_icon(dialog->account, NULL); } static void
--- a/src/gtkimhtml.c Sat Feb 28 21:14:51 2004 +0000 +++ b/src/gtkimhtml.c Sat Feb 28 22:45:34 2004 +0000 @@ -1377,7 +1377,6 @@ g_return_val_if_fail (imhtml != NULL, NULL); g_return_val_if_fail (GTK_IS_IMHTML (imhtml), NULL); g_return_val_if_fail (text != NULL, NULL); - printf("Appending: %s\n", text); c = text; len = strlen(text); ws = g_malloc(len + 1); @@ -1913,7 +1912,6 @@ if (url) gtk_imhtml_insert_link(imhtml, url, ws); else { - printf("Inserting %s\n", ws); gtk_text_buffer_insert(imhtml->text_buffer, &iter, ws, wpos); } wpos = g_snprintf (ws, smilelen + 1, "%s", c); @@ -2885,7 +2883,6 @@ closers = g_list_remove(closers, span); } - printf("Gotten: %s\n", str->str); return g_string_free(str, FALSE); }
--- a/src/gtkutils.c Sat Feb 28 21:14:51 2004 +0000 +++ b/src/gtkutils.c Sat Feb 28 22:45:34 2004 +0000 @@ -282,14 +282,12 @@ if (gaim_gtk_check_if_dir(f, GTK_FILE_SELECTION(gtkconv->u.im->save_icon))) return; - if ((file = fopen(f, "w")) != NULL) { - GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); - size_t len; - const void *data = gaim_buddy_icon_get_data(icon, &len); + GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c)); + size_t len; + const void *data = gaim_buddy_icon_get_data(icon, &len); - if (data) - fwrite(data, 1, len, file); - + if ((len > 0) && (data != NULL) && (file = fopen(f, "wb")) != NULL) { + fwrite(data, 1, len, file); fclose(file); } else { gaim_notify_error(NULL, NULL,
--- a/src/protocols/oscar/oscar.c Sat Feb 28 21:14:51 2004 +0000 +++ b/src/protocols/oscar/oscar.c Sat Feb 28 22:45:34 2004 +0000 @@ -3616,7 +3616,7 @@ struct stat st; const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); if (iconfile == NULL) { - /* Set an empty icon, or something */ + aim_ssi_delicon(od->sess); } else if (!stat(iconfile, &st)) { char *buf = g_malloc(st.st_size); FILE *file = fopen(iconfile, "rb"); @@ -5792,7 +5792,7 @@ struct stat st; const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); if (iconfile == NULL) { - /* Set an empty icon, or something */ + aim_ssi_delicon(od->sess); } else if (!stat(iconfile, &st)) { char *buf = g_malloc(st.st_size); FILE *file = fopen(iconfile, "rb"); @@ -5811,8 +5811,13 @@ "Can't stat buddy icon file!\n"); } } - } else if (flags == 0x81) - aim_ssi_seticon(od->sess, md5, length); + } else if (flags == 0x81) { + const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); + if (iconfile == NULL) + aim_ssi_delicon(od->sess); + else + aim_ssi_seticon(od->sess, md5, length); + } } break; case 0x0002: { /* We just set an "available" message? */ @@ -6684,7 +6689,7 @@ struct stat st; if (iconfile == NULL) { - /* Set an empty icon, or something */ + aim_ssi_delicon(od->sess); } else if (!stat(iconfile, &st)) { char *buf = g_malloc(st.st_size); file = fopen(iconfile, "rb");