im.pidgin.pidgin: eaa01cc61dc67594e3f946e2b119f01ef4177d3e
seanegan at pidgin.im
seanegan at pidgin.im
Mon Jan 7 20:20:37 EST 2008
-----------------------------------------------------------------
Revision: eaa01cc61dc67594e3f946e2b119f01ef4177d3e
Ancestor: ef9c88dc14e24a79a981a7aa3abb869e17ffb03a
Author: seanegan at pidgin.im
Date: 2008-01-08T01:18:10
Branch: im.pidgin.pidgin
Modified files:
pidgin/gtkconv.c
ChangeLog:
shorted the 'typing then stopped' message
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c 47e40acc55ce54bbd4860dc87ae0631a1a711732
+++ pidgin/gtkconv.c eee45d09164454c03c6af47cd169f3abd5746ff0
@@ -153,9 +153,7 @@ static void gtkconv_set_unseen(PidginCon
static void pidgin_conv_updated(PurpleConversation *conv, PurpleConvUpdateType type);
static void conv_set_unseen(PurpleConversation *gtkconv, PidginUnseenState state);
static void gtkconv_set_unseen(PidginConversation *gtkconv, PidginUnseenState state);
-#if 0
static void update_typing_icon(PidginConversation *gtkconv);
-#endif
static void update_typing_message(PidginConversation *gtkconv, const char *message);
static const char *item_factory_translate_func (const char *path, gpointer func_data);
gboolean pidgin_conv_has_focus(PurpleConversation *conv);
@@ -2247,9 +2245,7 @@ pidgin_conv_switch_active_conversation(P
purple_signal_emit(pidgin_conversations_get_handle(), "conversation-switched", conv);
gray_stuff_out(gtkconv);
-#if 0
update_typing_icon(gtkconv);
-#endif
g_object_set_data(G_OBJECT(entry), "transient_buddy", NULL);
regenerate_options_items(gtkconv->win);
@@ -3438,15 +3434,12 @@ update_typing_message(PidginConversation
}
}
-#if 0
static void
update_typing_icon(PidginConversation *gtkconv)
{
PidginWindow *gtkwin;
PurpleConvIm *im = NULL;
PurpleConversation *conv = gtkconv->active_conv;
- char *stock_id;
- const char *tooltip;
char *message = NULL;
gtkwin = gtkconv->win;
@@ -3454,59 +3447,23 @@ update_typing_icon(PidginConversation *g
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;
- }
+ message = g_strdup_printf(_("\n%s has stopped typing"), purple_conversation_get_title(conv));
}
-
- 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);
update_typing_message(gtkconv, message);
g_free(message);
}
-#endif
static gboolean
update_send_to_selection(PidginWindow *win)
@@ -6602,10 +6559,10 @@ pidgin_conv_update_fields(PurpleConversa
pango_attr_list_unref(list);
} else
gtk_label_set_attributes(GTK_LABEL(gtkconv->tab_label), NULL);
-#if 0
+
if (pidgin_conv_window_is_active_conversation(conv))
update_typing_icon(gtkconv);
-#endif
+
gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title);
if (pidgin_conv_window_is_active_conversation(conv))
gtk_window_set_title(GTK_WINDOW(win->window), title);
More information about the Commits
mailing list