# HG changeset patch # User Jeffrey Connelly # Date 1178766031 0 # Node ID 2f9e5cde6f973485a1ce2e2c339455eb11da5a6f # Parent 34d9037a228c4da934e66b5deb7b1f12fc9bb47e# Parent 667a5a24781c25a867acc599431d433d16ce878a merge of '493a2b4859d71c992634fcaf587a2df730d6c43d' and 'a819b8c53725b23320edf69c32888cb5a5ffa764' diff -r 34d9037a228c -r 2f9e5cde6f97 COPYRIGHT --- a/COPYRIGHT Thu May 10 02:58:35 2007 +0000 +++ b/COPYRIGHT Thu May 10 03:00:31 2007 +0000 @@ -88,6 +88,7 @@ Jeramey Crawford Michael Culbertson Martijn Dekker +Vinicius Depizzol Philip Derrin Taso N. Devetzis Balwinder Singh Dheeman diff -r 34d9037a228c -r 2f9e5cde6f97 ChangeLog --- a/ChangeLog Thu May 10 02:58:35 2007 +0000 +++ b/ChangeLog Thu May 10 03:00:31 2007 +0000 @@ -3,14 +3,25 @@ version 2.0.1 (??/??/????): * Buddy list update speedups when buddy icons are not being displayed. (Scott Wolchok) - * Custom smileys on MSN can be saved by right-clicking on them. + * Fix icons on docklet change status menu to match the status selector + * Custom smileys on MSN can be saved by right-clicking on them + * Fix a crash deleting a buddy that is in the Buddy List more than once + * Compile fixes for Solaris + * Fix GTalk formatting when there's a space before/after a */_ + * Fix Log viewer crash when the filename is not in the expected format + * Get User Info now provides immediate feedback, and is updated when the + user information is available + * Make the choose buddy icon dialog correctly list the current directory + * Fix for buddy icons disappearing + * Timestamps are always on in debug output (-d) and Debug Window now + * Don't escape html entities in Yahoo! system messages Finch: * Userlist in chat windows, which can be turned on or off using - "/users" command. - * Menus in the conversation windows. - * Improved tab completion support. - * Ctrl+c prompts with a dialog before exiting. + "/users" command + * Menus in the conversation windows + * Improved tab completion support + * Ctrl+c prompts with a dialog before exiting version 2.0.0 (5/3/2007): * The project has new names - libpurple for the core, Pidgin for the diff -r 34d9037a228c -r 2f9e5cde6f97 doc/finch.1.in --- a/doc/finch.1.in Thu May 10 02:58:35 2007 +0000 +++ b/doc/finch.1.in Thu May 10 03:00:31 2007 +0000 @@ -29,11 +29,12 @@ .SH DESCRIPTION .PP -\fBfinch\fR is a console-based modular messaging client capable of using -AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, Novell GroupWise, Lotus Sametime, -Zephyr, Gadu-Gadu, and QQ all at once. It has many common features found in -other clients, as well as many unique features. Finch is not endorsed by or -affiliated with America Online, ICQ, Microsoft, or Yahoo. +\fBfinch\fR is a console-based modular messaging client based on libpurple +which is capable of connecting to AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, +Novell GroupWise, Lotus Sametime, Zephyr, Gadu-Gadu, and QQ all at once. It has +many common features found in other clients, as well as many unique features. +Finch is not endorsed by or affiliated with America Online, ICQ, Microsoft, or +Yahoo. .SH OPTIONS The following options are provided by \fBfinch\fR using the standard GNU diff -r 34d9037a228c -r 2f9e5cde6f97 doc/pidgin.1.in --- a/doc/pidgin.1.in Thu May 10 02:58:35 2007 +0000 +++ b/doc/pidgin.1.in Thu May 10 03:00:31 2007 +0000 @@ -28,11 +28,12 @@ .SH DESCRIPTION .PP -Pidgin is a modular messaging client capable of using AIM, MSN, Yahoo!, XMPP, -ICQ, IRC, SILC, SIP/SIMPLE Novell GroupWise, Lotus Sametime, Bonjour, -Zephyr, Gadu-Gadu, and QQ all at once. It has many common features found in -other clients, as well as many unique features. Pidgin is not endorsed by or -affiliated with America Online, ICQ, Microsoft, or Yahoo. +\fBpidgin\fR is a graphical modular messaging client based on libpurple +which is capable of connecting to AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, +Novell GroupWise, Lotus Sametime, Zephyr, Gadu-Gadu, and QQ all at once. It has +many common features found in other clients, as well as many unique features. +Finch is not endorsed by or affiliated with America Online, ICQ, Microsoft, or +Yahoo. .SH OPTIONS The following options are provided by Pidgin using the standard GNU diff -r 34d9037a228c -r 2f9e5cde6f97 finch/gntconv.c --- a/finch/gntconv.c Thu May 10 02:58:35 2007 +0000 +++ b/finch/gntconv.c Thu May 10 03:00:31 2007 +0000 @@ -303,6 +303,11 @@ get_info_cb(GntMenuItem *item, gpointer ggconv) { FinchConv *ggc = ggconv; + PurpleNotifyUserInfo *info = purple_notify_user_info_new(); + purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving...")); + purple_notify_userinfo(ggc->active_conv->account->gc, purple_conversation_get_name(ggc->active_conv), info, NULL, NULL); + purple_notify_user_info_destroy(info); + serv_get_info(purple_conversation_get_gc(ggc->active_conv), purple_conversation_get_name(ggc->active_conv)); } diff -r 34d9037a228c -r 2f9e5cde6f97 finch/gntdebug.c --- a/finch/gntdebug.c Thu May 10 02:58:35 2007 +0000 +++ b/finch/gntdebug.c Thu May 10 03:00:31 2007 +0000 @@ -43,7 +43,6 @@ GntWidget *window; GntWidget *tview; gboolean paused; - gboolean timestamps; } debug; static void @@ -54,14 +53,11 @@ { int pos = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(debug.tview)); GntTextFormatFlags flag = GNT_TEXT_FLAG_NORMAL; - - if (debug.timestamps) { - const char *mdate; - time_t mtime = time(NULL); - mdate = purple_utf8_strftime("%H:%M:%S ", localtime(&mtime)); - gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), - mdate, flag); - } + const char *mdate; + time_t mtime = time(NULL); + mdate = purple_utf8_strftime("%H:%M:%S ", localtime(&mtime)); + gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), + mdate, flag); gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(debug.tview), category, GNT_TEXT_FLAG_BOLD); @@ -137,13 +133,6 @@ debug.paused = !debug.paused; } -static void -toggle_timestamps(GntWidget *w, gpointer n) -{ - debug.timestamps = !debug.timestamps; - purple_prefs_set_bool("/purple/debug/timestamps", debug.timestamps); -} - /* Xerox */ static void purple_glib_log_handler(const gchar *domain, GLogLevelFlags flags, @@ -202,7 +191,6 @@ void finch_debug_window_show() { debug.paused = FALSE; - debug.timestamps = purple_prefs_get_bool("/purple/debug/timestamps"); if (debug.window == NULL) { GntWidget *wid, *box; @@ -239,12 +227,6 @@ GNT_WIDGET_SET_FLAGS(wid, GNT_WIDGET_GROW_Y); gnt_box_add_widget(GNT_BOX(box), wid); - wid = gnt_check_box_new(_("Timestamps")); - gnt_check_box_set_checked(GNT_CHECK_BOX(wid), debug.timestamps); - g_signal_connect(G_OBJECT(wid), "toggled", G_CALLBACK(toggle_timestamps), NULL); - GNT_WIDGET_SET_FLAGS(wid, GNT_WIDGET_GROW_Y); - gnt_box_add_widget(GNT_BOX(box), wid); - gnt_box_add_widget(GNT_BOX(debug.window), box); GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_GROW_Y); diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/buddyicon.c --- a/libpurple/buddyicon.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/buddyicon.c Thu May 10 03:00:31 2007 +0000 @@ -416,7 +416,7 @@ } ref_filename(filename); } - else + else if (!icon->img) { purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon"); purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum"); diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/debug.c --- a/libpurple/debug.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/debug.c Thu May 10 03:00:31 2007 +0000 @@ -61,18 +61,12 @@ if (debug_enabled) { gchar *ts_s; - - if ((category != NULL) && - (purple_prefs_exists("/purple/debug/timestamps")) && - (purple_prefs_get_bool("/purple/debug/timestamps"))) { - const char *mdate; + const char *mdate; + time_t mtime = time(NULL); - time_t mtime = time(NULL); - mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); - ts_s = g_strdup_printf("(%s) ", mdate); - } else { - ts_s = g_strdup(""); - } + + mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); + ts_s = g_strdup_printf("(%s) ", mdate); if (category == NULL) g_print("%s%s", ts_s, arg_s); @@ -189,11 +183,4 @@ void purple_debug_init(void) { - purple_prefs_add_none("/purple/debug"); - - /* - * This pref is currently used by both the console - * output and the debug window output. - */ - purple_prefs_add_bool("/purple/debug/timestamps", FALSE); } diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/prefs.c --- a/libpurple/prefs.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/prefs.c Thu May 10 03:00:31 2007 +0000 @@ -1355,6 +1355,7 @@ purple_prefs_remove("/plugins/core/autorecon/hide_reconnecting_dialog"); purple_prefs_remove("/plugins/core/autorecon/restore_state"); purple_prefs_remove("/plugins/core/autorecon"); + purple_prefs_remove("/purple/debug/timestamps"); /* Convert old sounds while_away pref to new 3-way pref. */ if (purple_prefs_exists("/purple/sound/while_away") && diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/protocols/jabber/buddy.c Thu May 10 03:00:31 2007 +0000 @@ -1118,6 +1118,24 @@ return FALSE; } +static gboolean _client_is_blacklisted(JabberBuddyResource *jbr, const char *ns) +{ + /* can't be blacklisted if we don't know what you're running yet */ + if(!jbr->client.name) + return FALSE; + + if(!strcmp(ns, "jabber:iq:last")) { + if(!strcmp(jbr->client.name, "Trillian")) { + if(!strcmp(jbr->client.version, "3.1.0.121")) { + /* verified by nwalp 2007/05/09 */ + return TRUE; + } + } + } + + return FALSE; +} + static void jabber_buddy_get_info_for_jid(JabberStream *js, const char *jid) { JabberIq *iq; @@ -1175,11 +1193,18 @@ jabber_iq_send(iq); } - iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:last"); - xmlnode_set_attrib(iq->node, "to", full_jid); - jabber_iq_set_callback(iq, jabber_last_parse, jbi); - jbi->ids = g_slist_prepend(jbi->ids, g_strdup(iq->id)); - jabber_iq_send(iq); + /* this is to fix the feeling of irritation I get when trying + * to get info on a friend running Trillian, which doesn't + * respont (with an error or otherwise) to jabber:iq:last + * requests. There are a number of Trillian users in my + * office. */ + if(!_client_is_blacklisted(jbr, "jabber:iq:last")) { + iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:last"); + xmlnode_set_attrib(iq->node, "to", full_jid); + jabber_iq_set_callback(iq, jabber_last_parse, jbi); + jbi->ids = g_slist_prepend(jbi->ids, g_strdup(iq->id)); + jabber_iq_send(iq); + } g_free(full_jid); } diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/protocols/jabber/libxmpp.c --- a/libpurple/protocols/jabber/libxmpp.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Thu May 10 03:00:31 2007 +0000 @@ -192,7 +192,7 @@ PurpleAccountOption *option; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ - split = purple_account_user_split_new(_("Domain"), "gmail.com", '@'); + split = purple_account_user_split_new(_("Domain"), NULL, '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), "Home", '/'); diff -r 34d9037a228c -r 2f9e5cde6f97 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Thu May 10 02:58:35 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Thu May 10 03:00:31 2007 +0000 @@ -906,7 +906,7 @@ static void yahoo_process_sysmessage(PurpleConnection *gc, struct yahoo_packet *pkt) { GSList *l = pkt->hash; - char *prim, *me = NULL, *msg = NULL, *escmsg = NULL; + char *prim, *me = NULL, *msg = NULL; while (l) { struct yahoo_pair *pair = l->data; @@ -922,14 +922,10 @@ if (!msg || !g_utf8_validate(msg, -1, NULL)) return; - /* TODO: Does this really need to be escaped? It seems like it doesn't. */ - escmsg = g_markup_escape_text(msg, -1); - prim = g_strdup_printf(_("Yahoo! system message for %s:"), me?me:purple_connection_get_display_name(gc)); - purple_notify_info(NULL, NULL, prim, escmsg); + purple_notify_info(NULL, NULL, prim, msg); g_free(prim); - g_free(escmsg); } struct yahoo_add_request { diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkaccount.c Thu May 10 03:00:31 2007 +0000 @@ -385,12 +385,20 @@ add_login_options(AccountPrefsDialog *dialog, GtkWidget *parent) { GtkWidget *frame; + GtkWidget *hbox; GtkWidget *vbox; GtkWidget *entry; GList *user_splits; GList *l, *l2; char *username = NULL; + if (dialog->protocol_menu != NULL) + { + gtk_widget_ref(dialog->protocol_menu); + hbox = g_object_get_data(G_OBJECT(dialog->protocol_menu), "container"); + gtk_container_remove(GTK_CONTAINER(hbox), dialog->protocol_menu); + } + if (dialog->login_frame != NULL) gtk_widget_destroy(dialog->login_frame); @@ -409,10 +417,17 @@ gtk_widget_show(vbox); /* Protocol */ - dialog->protocol_menu = pidgin_protocol_option_menu_new( - dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog); - - add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu); + if (dialog->protocol_menu == NULL) + { + dialog->protocol_menu = pidgin_protocol_option_menu_new( + dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog); + gtk_widget_ref(dialog->protocol_menu); + } + + hbox = add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu); + g_object_set_data(G_OBJECT(dialog->protocol_menu), "container", hbox); + + gtk_widget_unref(dialog->protocol_menu); /* Screen name */ dialog->screenname_entry = gtk_entry_new(); diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkblist.c Thu May 10 03:00:31 2007 +0000 @@ -274,6 +274,11 @@ static void gtk_blist_menu_info_cb(GtkWidget *w, PurpleBuddy *b) { + PurpleNotifyUserInfo *info = purple_notify_user_info_new(); + purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving...")); + purple_notify_userinfo(b->account->gc, purple_buddy_get_name(b), info, NULL, NULL); + purple_notify_user_info_destroy(info); + serv_get_info(b->account->gc, b->name); } diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkconv.c Thu May 10 03:00:31 2007 +0000 @@ -672,6 +672,11 @@ PurpleConversation *conv = gtkconv->active_conv; if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { + PurpleNotifyUserInfo *info = purple_notify_user_info_new(); + purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving...")); + purple_notify_userinfo(conv->account->gc, purple_conversation_get_name(conv), info, NULL, NULL); + purple_notify_user_info_destroy(info); + serv_get_info(purple_conversation_get_gc(conv), purple_conversation_get_name(conv)); @@ -3111,7 +3116,7 @@ } if (gtkwin->menu.typing_icon == NULL) { gtkwin->menu.typing_icon = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); - pidgin_menu_tray_append(PIDGIN_MENU_TRAY(gtkwin->menu.tray), + pidgin_menu_tray_append(PIDGIN_MENU_TRAY(gtkwin->menu.tray), gtkwin->menu.typing_icon, _("User is typing...")); } else { @@ -3143,8 +3148,10 @@ return; if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) { - if (gtkconv->u.im->typing_timer != 0) + if (gtkconv->u.im->typing_timer != 0) { g_source_remove(gtkconv->u.im->typing_timer); + gtkconv->u.im->typing_timer = 0; + } return; } diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkdebug.c --- a/pidgin/gtkdebug.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkdebug.c Thu May 10 03:00:31 2007 +0000 @@ -49,7 +49,6 @@ GtkListStore *store; - gboolean timestamps; gboolean paused; #ifdef HAVE_REGEX_H @@ -261,21 +260,6 @@ #endif /* HAVE_REGEX_H */ } -static void -timestamps_cb(GtkWidget *w, DebugWindow *win) -{ - win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); - - purple_prefs_set_bool("/purple/debug/timestamps", win->timestamps); -} - -static void -timestamps_pref_cb(const char *name, PurplePrefType type, - gconstpointer value, gpointer data) -{ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), GPOINTER_TO_INT(value)); -} - /****************************************************************************** * regex stuff *****************************************************************************/ @@ -691,7 +675,6 @@ GtkWidget *vbox; GtkWidget *toolbar; GtkWidget *frame; - GtkWidget *button; GtkWidget *image; gint width, height; void *handle; @@ -779,20 +762,6 @@ NULL, image, G_CALLBACK(pause_cb), win); - /* Timestamps */ - button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, - NULL, _("Timestamps"), - _("Timestamps"), NULL, NULL, - G_CALLBACK(timestamps_cb), - win); - - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), - purple_prefs_get_bool("/purple/debug/timestamps")); - - purple_prefs_connect_callback(handle, "/purple/debug/timestamps", - timestamps_pref_cb, button); - #ifdef HAVE_REGEX_H /* regex stuff */ gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); @@ -1044,9 +1013,10 @@ #ifdef HAVE_REGEX_H GtkTreeIter iter; #endif /* HAVE_REGEX_H */ - gboolean timestamps; gchar *ts_s; gchar *esc_s, *cat_s, *tmp, *s; + const char *mdate; + time_t mtime; if (debug_win == NULL || !purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")) @@ -1054,22 +1024,9 @@ return; } - timestamps = purple_prefs_get_bool("/purple/debug/timestamps"); - - /* - * For some reason we only print the timestamp if category is - * not NULL. Why the hell do we do that? --Mark - */ - if ((category != NULL) && (timestamps)) { - const char *mdate; - - time_t mtime = time(NULL); - mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); - ts_s = g_strdup_printf("(%s) ", mdate); - } else { - ts_s = g_strdup(""); - } - + mtime = time(NULL); + mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); + ts_s = g_strdup_printf("(%s) ", mdate); if (category == NULL) cat_s = g_strdup(""); else diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkdialogs.c --- a/pidgin/gtkdialogs.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkdialogs.c Thu May 10 03:00:31 2007 +0000 @@ -362,7 +362,8 @@ str = g_string_sized_new(4096); g_string_append_printf(str, - _("%s is a modular messaging client capable of using " + _("%s is a graphical modular messaging client based on " + "libpurple which is capable of connecting to " "AIM, MSN, Yahoo!, XMPP, ICQ, IRC, SILC, SIP/SIMPLE, " "Novell GroupWise, Lotus Sametime, Bonjour, Zephyr, " "Gadu-Gadu, and QQ all at once. " diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtknotify.c --- a/pidgin/gtknotify.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtknotify.c Thu May 10 03:00:31 2007 +0000 @@ -549,6 +549,21 @@ return FALSE; } +static GtkIMHtmlOptions +notify_imhtml_options() +{ + GtkIMHtmlOptions options = 0; + + if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting")) + options |= GTK_IMHTML_NO_COLOURS | GTK_IMHTML_NO_FONTS | GTK_IMHTML_NO_SIZES; + + options |= GTK_IMHTML_NO_COMMENTS; + options |= GTK_IMHTML_NO_TITLE; + options |= GTK_IMHTML_NO_NEWLINE; + options |= GTK_IMHTML_NO_SCROLL; + return options; +} + static void * pidgin_notify_formatted(const char *title, const char *primary, const char *secondary, const char *text) @@ -559,7 +574,6 @@ GtkWidget *button; GtkWidget *imhtml; GtkWidget *frame; - int options = 0; char label_text[2048]; char *linked_text, *primary_esc, *secondary_esc; @@ -614,20 +628,13 @@ g_signal_connect(G_OBJECT(window), "key_press_event", G_CALLBACK(formatted_input_cb), NULL); - /* Add the text to the gtkimhtml */ - if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting")) - options |= GTK_IMHTML_NO_COLOURS | GTK_IMHTML_NO_FONTS | GTK_IMHTML_NO_SIZES; - - options |= GTK_IMHTML_NO_COMMENTS; - options |= GTK_IMHTML_NO_TITLE; - options |= GTK_IMHTML_NO_NEWLINE; - options |= GTK_IMHTML_NO_SCROLL; - /* Make sure URLs are clickable */ linked_text = purple_markup_linkify(text); - gtk_imhtml_append_text(GTK_IMHTML(imhtml), linked_text, options); + gtk_imhtml_append_text(GTK_IMHTML(imhtml), linked_text, notify_imhtml_options()); g_free(linked_text); + g_object_set_data(G_OBJECT(window), "info-widget", imhtml); + /* Show the window */ gtk_widget_show(window); @@ -856,18 +863,53 @@ return data; } +/** Xerox'ed from Finch! How the tables have turned!! ;) **/ +/** User information. **/ +static GHashTable *userinfo; + +static char * +userinfo_hash(PurpleAccount *account, const char *who) +{ + char key[256]; + snprintf(key, sizeof(key), "%s - %s", purple_account_get_username(account), purple_normalize(account, who)); + return g_utf8_strup(key, -1); +} + +static void +remove_userinfo(GtkWidget *widget, gpointer key) +{ + g_hash_table_remove(userinfo, key); +} + static void * pidgin_notify_userinfo(PurpleConnection *gc, const char *who, PurpleNotifyUserInfo *user_info) { - char *primary, *info; + char *info; void *ui_handle; + char *key = userinfo_hash(purple_connection_get_account(gc), who); + + if (!userinfo) { + userinfo = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + } - primary = g_strdup_printf(_("Info for %s"), who); info = purple_notify_user_info_get_text_with_newline(user_info, "
"); - ui_handle = pidgin_notify_formatted(_("Buddy Information"), primary, NULL, info); + ui_handle = g_hash_table_lookup(userinfo, key); + if (ui_handle != NULL) { + GtkIMHtml *imhtml = g_object_get_data(G_OBJECT(ui_handle), "info-widget"); + char *linked_text = purple_markup_linkify(info); + gtk_imhtml_clear(imhtml); + gtk_imhtml_append_text(imhtml, linked_text, notify_imhtml_options()); + g_free(linked_text); + g_free(key); + } else { + char *primary = g_strdup_printf(_("Info for %s"), who); + ui_handle = pidgin_notify_formatted(_("Buddy Information"), primary, NULL, info); + g_hash_table_insert(userinfo, key, ui_handle); + g_signal_connect(G_OBJECT(ui_handle), "destroy", G_CALLBACK(remove_userinfo), key); + g_free(primary); + } g_free(info); - g_free(primary); return ui_handle; } diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/gtkutils.c Thu May 10 03:00:31 2007 +0000 @@ -103,17 +103,17 @@ if (purple_running_gnome()) { char *path, *font; PangoFontDescription *desc = NULL; - + if ((path = g_find_program_in_path("gconftool-2"))) { g_free(path); if (!g_spawn_command_line_sync( - "gconftool-2 -g /desktop/gnome/interface/document_font_name", + "gconftool-2 -g /desktop/gnome/interface/document_font_name", &font, NULL, NULL, NULL)) return; } desc = pango_font_description_from_string(font); g_free(font); - + if (desc) { gtk_widget_modify_font(imhtml, desc); pango_font_description_free(desc); @@ -444,13 +444,13 @@ protocol = g_object_get_data(G_OBJECT(item), "protocol"); if (!strcmp(protocol, "prpl-fake")) - { - guint index = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(item), "real_index")); - gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), index); + protocol = g_object_get_data(G_OBJECT(item), "real_protocol"); + + if (!strcmp(protocol, g_object_get_data(G_OBJECT(optmenu), "last_protocol"))) return; - } user_data = (g_object_get_data(G_OBJECT(optmenu), "user_data")); + g_object_set_data(G_OBJECT(optmenu), "last_protocol", (gpointer)protocol); if (cb != NULL) ((void (*)(GtkWidget *, const char *, gpointer))cb)(item, protocol, @@ -545,18 +545,33 @@ pidgin_protocol_option_menu_item(menu, sg, image, plugin->info->name, plugin->info->id); if (id != NULL && !strcmp(plugin->info->id, id)) + { + g_object_set_data(G_OBJECT(optmenu), "last_protocol", plugin->info->id); selected_index = i; + } + else if (i == 0) + { + /* Ensure we set the protocol even if id is NULL or can't be found. */ + g_object_set_data(G_OBJECT(optmenu), "last_protocol", plugin->info->id); + } if (!strcmp(plugin->info->id, "prpl-jabber")) { GtkWidget *gtalk_item; + + filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols", + "16", "google-talk.png", NULL); + pixbuf = gdk_pixbuf_new_from_file(filename, NULL); + g_free(filename); + + if (pixbuf) image = gtk_image_new_from_pixbuf(pixbuf); else image = gtk_image_new(); - gtalk_item = pidgin_protocol_option_menu_item(menu, sg, image, _("Google Talk (XMPP)"), "prpl-fake"); - g_object_set_data(G_OBJECT(gtalk_item), "real_index", GUINT_TO_POINTER(i)); + gtalk_item = pidgin_protocol_option_menu_item(menu, sg, image, _("Google Talk"), "prpl-fake"); + g_object_set_data(G_OBJECT(gtalk_item), "real_protocol", plugin->info->id); i++; } @@ -2308,20 +2323,10 @@ GTK_FILE_SELECTION(dialog->icon_filesel))); #endif /* FILECHOOSER */ - if (!filename || g_stat(filename, &st)) + if (!filename || g_stat(filename, &st) || !(pixbuf = gdk_pixbuf_new_from_file(filename, NULL))) { - g_free(filename); - return; - } - - pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - if (!pixbuf) { gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_preview), NULL); gtk_label_set_markup(GTK_LABEL(dialog->icon_text), ""); -#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ - gtk_file_chooser_set_preview_widget_active( - GTK_FILE_CHOOSER(dialog->icon_filesel), FALSE); -#endif /* FILECHOOSER */ g_free(filename); return; } @@ -2338,10 +2343,6 @@ scale = gdk_pixbuf_scale_simple(pixbuf, width * 50 / height, 50, GDK_INTERP_BILINEAR); gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_preview), scale); -#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ - gtk_file_chooser_set_preview_widget_active( - GTK_FILE_CHOOSER(dialog->icon_filesel), TRUE); -#endif /* FILECHOOSER */ gtk_label_set_markup(GTK_LABEL(dialog->icon_text), markup); g_object_unref(G_OBJECT(pixbuf)); @@ -2356,7 +2357,9 @@ GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) { struct _icon_chooser *dialog = g_new0(struct _icon_chooser, 1); -#if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ +#if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ + GtkWidget *vbox; +#else GtkWidget *hbox; GtkWidget *tv; GtkTreeSelection *sel; @@ -2387,9 +2390,17 @@ dialog->icon_preview = gtk_image_new(); dialog->icon_text = gtk_label_new(NULL); - gtk_widget_set_size_request(GTK_WIDGET(dialog->icon_preview), -1, 50); - gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(dialog->icon_filesel), - GTK_WIDGET(dialog->icon_preview)); + + vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gtk_widget_set_size_request(GTK_WIDGET(vbox), -1, 50); + gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(dialog->icon_preview), TRUE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(vbox), GTK_WIDGET(dialog->icon_text), FALSE, FALSE, 0); + gtk_widget_show_all(vbox); + + gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(dialog->icon_filesel), vbox); + gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(dialog->icon_filesel), TRUE); + gtk_file_chooser_set_use_preview_label(GTK_FILE_CHOOSER(dialog->icon_filesel), FALSE); + g_signal_connect(G_OBJECT(dialog->icon_filesel), "update-preview", G_CALLBACK(icon_preview_change_cb), dialog); g_signal_connect(G_OBJECT(dialog->icon_filesel), "response", @@ -2403,7 +2414,7 @@ gtk_file_selection_set_filename(GTK_FILE_SELECTION(dialog->icon_filesel), current_folder); - gtk_widget_set_size_request(GTK_WIDGET(dialog->icon_preview), -1, 50); + gtk_widget_set_size_request(GTK_WIDGET(dialog->icon_preview),-1, 50); hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); gtk_box_pack_start( GTK_BOX(GTK_FILE_SELECTION(dialog->icon_filesel)->main_vbox), diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/emotes/default/22/theme --- a/pidgin/pixmaps/emotes/default/22/theme Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/theme Thu May 10 03:00:31 2007 +0000 @@ -21,7 +21,7 @@ moneymouth.png :-$ foot-in-mouth.png :-! shout.png >:o >:O -! skywalker.png C:-) c:-) C:) c:) +! skywalker.png C:-) c:-) C:) c:) ! monkey.png :-(|) ### Following AIM 6.1 @@ -42,6 +42,8 @@ crying.png :'( shut-mouth.png :-X glasses-cool.png 8-) +! skywalker.png C:-) c:-) C:) c:) +! monkey.png :-(|) ### Following Windows Live Messenger 8.1 [MSN] @@ -121,6 +123,14 @@ eyeroll.png 8-) yawn.png |-) goat.png (nah) +! skywalker.png C:-) c:-) C:) c:) +! monkey.png :-(|) + +### Hidden MSN emotes +sigarette.png (ci) (CI) +handcuffs.png (%) +console.png (xx) (XX) +fingers-crossed.png (yn) (YN) ### Following QQ 2006 [QQ] @@ -217,6 +227,8 @@ star.png /星星 /<*> /xixing /star girl.png /女 /<00> /nv /woman boy.png /ç”· /<11> /nan /man +! skywalker.png C:-) c:-) C:) c:) +! monkey.png :-(|) ### Following ICQ 5.1 [ICQ] @@ -248,6 +260,8 @@ good.png *THUMBS\ UP* beer.png *DRINK* in-love.png *IN\ LOVE* +! skywalker.png C:-) c:-) C:) c:) +! monkey.png :-(|) ### Following Yahoo! Messenger 8.1 [Yahoo] @@ -294,7 +308,7 @@ eyeroll.png 8-| silly.png 8-} clap.png =D> =d> -#phbbbt >:P >:p MISSING/YAHOO 6: "You are dumb! - No you are!!" => tongue on pissed of smily +mad-tongue.png >:P >:p #timeout :-t :-T MISSING: "Let's have a break." hug-left.png >:D< >:d< love-over.png =(( @@ -302,8 +316,13 @@ rotfl.png =)) #loser L-) l-) MISSING/YAHOO 6: "Loser!" party.png <:-P <:-p +nailbiting.png :-SS :-Ss :-sS :-ss cowboy.png <):) desire.png 8-> +! skywalker.png C:-) c:-) C:) c:) +! monkey.png :-(|) + +### Hidden Yahoo emotes alien.png =:) >-) beat-up.png b-( B-( chicken.png ~:> @@ -324,17 +343,16 @@ flag.png **== clover.png %%- musical-note.png :-" -nailbiting.png :-SS :-ss giggle.png ;)) worship.png ^:)^ star.png (*) -mad-tongue.png >:p -#yahoo_waving.gif >:/ TODO -#yahoo_talktohand.gif :-@ TODO -#yahoo_youkiddingme.gif :-j :-J TODO +#waving.png >:/ +#talktohand.png :-@ +#youkiddingme.png :-j :-J ### These only work in a certain IMvironment -#yahoo_malefighter1.gif o-> O-> -#yahoo_malefighter2.gif o=> O=> -#yahoo_femalefighter.gif o-+ O-+ +#malefighter1.png o-> O-> +#malefighter2.png o=> O=> +#femalefighter.png o-+ O-+ yin-yang.png (%) + diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/16/Makefile.am --- a/pidgin/pixmaps/protocols/16/Makefile.am Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/pixmaps/protocols/16/Makefile.am Thu May 10 03:00:31 2007 +0000 @@ -3,6 +3,7 @@ EXTRA_DIST = aim.png \ bonjour.png \ gadu-gadu.png \ + google-talk.png \ novell.png \ icq.png \ irc.png \ diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/16/google-talk.png Binary file pidgin/pixmaps/protocols/16/google-talk.png has changed diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/22/Makefile.am --- a/pidgin/pixmaps/protocols/22/Makefile.am Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/pixmaps/protocols/22/Makefile.am Thu May 10 03:00:31 2007 +0000 @@ -3,6 +3,7 @@ EXTRA_DIST = aim.png \ bonjour.png \ gadu-gadu.png \ + google-talk.png \ novell.png \ icq.png \ irc.png \ diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/22/google-talk.png Binary file pidgin/pixmaps/protocols/22/google-talk.png has changed diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/48/scalable/Makefile.am --- a/pidgin/pixmaps/protocols/48/scalable/Makefile.am Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/pixmaps/protocols/48/scalable/Makefile.am Thu May 10 03:00:31 2007 +0000 @@ -1,6 +1,7 @@ EXTRA_DIST = aim.svg \ bonjour.svg \ gadu-gadu.svg \ + google-talk.svg \ novell.svg \ icq.svg \ irc.svg \ diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/pixmaps/protocols/48/scalable/google-talk.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/protocols/48/scalable/google-talk.svg Thu May 10 03:00:31 2007 +0000 @@ -0,0 +1,301 @@ + + + + + + + image/svg+xml + + Google Talk Icon + 2006-12-03 + + + Vinicius Scopel Depizzol + + + vdepizzol@gmail.com + + + Google Talk + GTalk + VOIP + Protocol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 34d9037a228c -r 2f9e5cde6f97 pidgin/plugins/extplacement.c --- a/pidgin/plugins/extplacement.c Thu May 10 02:58:35 2007 +0000 +++ b/pidgin/plugins/extplacement.c Thu May 10 03:00:31 2007 +0000 @@ -101,6 +101,11 @@ ppref = purple_plugin_pref_new_with_label(_("Conversation Placement")); purple_plugin_pref_frame_add(frame, ppref); + /* Translators: "New conversations" should match the text in the preferences dialog and "By conversation count" should be the same text used above */ + ppref = purple_plugin_pref_new_with_label(_("Note: The preference for \"New conversations\" must be set to \"By conversation count\".")); + purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_INFO); + purple_plugin_pref_frame_add(frame, ppref); + ppref = purple_plugin_pref_new_with_name_and_label( "/plugins/gtk/extplacement/placement_number", _("Number of conversations per window")); diff -r 34d9037a228c -r 2f9e5cde6f97 po/th.po --- a/po/th.po Thu May 10 02:58:35 2007 +0000 +++ b/po/th.po Thu May 10 03:00:31 2007 +0000 @@ -3065,7 +3065,7 @@ #: ../src/gtkconv.c:4958 ../src/gtkconv.c:5067 #, c-format msgid "%d person in room" -msgstr "ã¹ËéͧÁÕ %s ¤¹" +msgstr "ã¹ËéͧÁÕ %d ¤¹" #: ../src/gtkconv.c:5624 ../src/gtkstatusbox.c:366 msgid "Typing"