# HG changeset patch # User Stu Tomlinson # Date 1199761220 0 # Node ID 9c367aabb49e8643dfc08c4554e0649774dccebe # Parent 0b297184de17745e0c7f61d565963b81c7408ce0# Parent 13d290879e0aa1b1b2632a78071a7586f1f6447e merge of 'a5456268d56c1a4745ac4abb84a176ecc6f68109' and 'eaa01cc61dc67594e3f946e2b119f01ef4177d3e' diff -r 0b297184de17 -r 9c367aabb49e pidgin/gtkconv.c --- a/pidgin/gtkconv.c Tue Jan 08 02:47:51 2008 +0000 +++ b/pidgin/gtkconv.c Tue Jan 08 03:00:20 2008 +0000 @@ -3365,6 +3365,7 @@ } } +#if 0 static gboolean typing_animation(gpointer data) { PidginConversation *gtkconv = data; @@ -3403,6 +3404,7 @@ gtk_widget_show(gtkwin->menu.typing_icon); return TRUE; } +#endif static void update_typing_message(PidginConversation *gtkconv, const char *message) @@ -3438,8 +3440,6 @@ PidginWindow *gtkwin; PurpleConvIm *im = NULL; PurpleConversation *conv = gtkconv->active_conv; - char *stock_id; - const char *tooltip; char *message = NULL; gtkwin = gtkconv->win; @@ -3447,55 +3447,20 @@ if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) im = PURPLE_CONV_IM(conv); - if (gtkwin->menu.typing_icon) { - gtk_widget_hide(gtkwin->menu.typing_icon); - } - if (im == NULL) return; if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) { - if (gtkconv->u.im->typing_timer != 0) { - g_source_remove(gtkconv->u.im->typing_timer); - gtkconv->u.im->typing_timer = 0; - } update_typing_message(gtkconv, "\n"); return; } if (purple_conv_im_get_typing_state(im) == PURPLE_TYPING) { - if (gtkconv->u.im->typing_timer == 0) { - gtkconv->u.im->typing_timer = g_timeout_add(250, typing_animation, gtkconv); - } - stock_id = PIDGIN_STOCK_ANIMATION_TYPING1; - tooltip = _("User is typing..."); message = g_strdup_printf(_("\n%s is typing..."), purple_conversation_get_title(conv)); } else { - stock_id = PIDGIN_STOCK_ANIMATION_TYPING5; - tooltip = _("User has typed something and stopped"); - message = g_strdup_printf(_("\n%s has typed something and stopped"), purple_conversation_get_title(conv)); - if (gtkconv->u.im->typing_timer != 0) { - g_source_remove(gtkconv->u.im->typing_timer); - gtkconv->u.im->typing_timer = 0; - } - } - - 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), - gtkwin->menu.typing_icon, - tooltip); - } - else - { - gtk_image_set_from_stock(GTK_IMAGE(gtkwin->menu.typing_icon), stock_id, GTK_ICON_SIZE_MENU); - pidgin_menu_tray_set_tooltip(PIDGIN_MENU_TRAY(gtkwin->menu.tray), - gtkwin->menu.typing_icon, - tooltip); - } - - gtk_widget_show(gtkwin->menu.typing_icon); + message = g_strdup_printf(_("\n%s has stopped typing"), purple_conversation_get_title(conv)); + } + update_typing_message(gtkconv, message); g_free(message); } @@ -6594,7 +6559,7 @@ pango_attr_list_unref(list); } else gtk_label_set_attributes(GTK_LABEL(gtkconv->tab_label), NULL); - + if (pidgin_conv_window_is_active_conversation(conv)) update_typing_icon(gtkconv);