changeset 24016:f869a6e43a12

Revert this change that was accidentally committed in f5ca7968 to remove the weird zoomy login and logout animation.
author Kevin Stange <kevin@simguy.net>
date Wed, 10 Sep 2008 19:51:41 +0000
parents 3ab88169a2c2
children ad88d875cdd8 d9d31ff2e7f8
files pidgin/gtkblist.c
diffstat 1 files changed, 11 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Wed Sep 10 19:20:30 2008 +0000
+++ b/pidgin/gtkblist.c	Wed Sep 10 19:51:41 2008 +0000
@@ -67,7 +67,6 @@
 #include <gdk/gdk.h>
 
 #define HEADLINE_CLOSE_SIZE 12
-#define STEPS 50
 
 typedef struct
 {
@@ -168,18 +167,11 @@
 	PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE    =  1 << 0,  /* Whether there's pending message in a conversation */
 } PidginBlistNodeFlags;
 
-typedef enum {
-	RECENT_STATUS_NONE = 0,
-	RECENT_STATUS_SIGN_ON,
-	RECENT_STATUS_SIGN_OFF
-} RecentStatus;
-
 typedef struct _pidgin_blist_node {
 	GtkTreeRowReference *row;
 	gboolean contact_expanded;
-	RecentStatus recent_signonoff;
+	gboolean recent_signonoff;
 	gint recent_signonoff_timer;
-	gint recent_signonoff_steps;
 	struct {
 		PurpleConversation *conv;
 		time_t last_message;          /* timestamp for last displayed message */
@@ -3746,11 +3738,11 @@
 		p = purple_buddy_get_presence(buddy);
 		trans = purple_presence_is_idle(p);
 
-		/*if (PURPLE_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff)
+		if (PURPLE_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff)
 			icon = PIDGIN_STOCK_STATUS_LOGIN;
 		else if (gtkbuddynode && gtkbuddynode->recent_signonoff)
 			icon = PIDGIN_STOCK_STATUS_LOGOUT;
-		else */if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_UNAVAILABLE))
+		else if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_UNAVAILABLE))
 			if (trans)
 				icon = PIDGIN_STOCK_STATUS_BUSY_I;
 			else
@@ -6046,11 +6038,9 @@
 	GdkPixbuf *status, *avatar, *emblem, *prpl_icon;
 	char *mark;
 	char *idle = NULL;
-	struct _pidgin_blist_node *gtknode = ((PurpleBlistNode*)buddy)->ui_data;
 	gboolean expanded = ((struct _pidgin_blist_node *)(node->parent->ui_data))->contact_expanded;
 	gboolean selected = (gtkblist->selected_node == node);
 	gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
-	int size;
 	presence = purple_buddy_get_presence(buddy);
 
 	if (editing_blist)
@@ -6059,14 +6049,6 @@
 	status = pidgin_blist_get_status_icon((PurpleBlistNode*)buddy,
 						biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL);
 
-	size = biglist ? 16 : 11;
-	if (gtknode->recent_signonoff == RECENT_STATUS_SIGN_ON) {
-		size = size / 2 + (size / 2 + (STEPS - gtknode->recent_signonoff_steps)) % (size / 2);
-	} else if (gtknode->recent_signonoff == RECENT_STATUS_SIGN_OFF) {
-		size = size - (STEPS - gtknode->recent_signonoff_steps) % (size / 2);
-	}
-	status = gdk_pixbuf_scale_simple(status, size, size, GDK_INTERP_BILINEAR);
-
 	/* Speed it up if we don't want buddy icons. */
 	if(biglist)
 		avatar = pidgin_blist_get_buddy_icon((PurpleBlistNode *)buddy, TRUE, TRUE);
@@ -6198,7 +6180,7 @@
 					   BUDDY_ICON_COLUMN, NULL,
 					   CONTACT_EXPANDER_COLUMN, TRUE,
 					   CONTACT_EXPANDER_VISIBLE_COLUMN, TRUE,
-					   GROUP_EXPANDER_VISIBLE_COLUMN, FALSE,
+				  	   GROUP_EXPANDER_VISIBLE_COLUMN, FALSE,
 					-1);
 			g_free(mark);
 			if(status)
@@ -7150,17 +7132,13 @@
 static gboolean buddy_signonoff_timeout_cb(PurpleBuddy *buddy)
 {
 	struct _pidgin_blist_node *gtknode = ((PurpleBlistNode*)buddy)->ui_data;
-	gboolean cont = TRUE;
-
-	if (--gtknode->recent_signonoff_steps == 0) {
-		gtknode->recent_signonoff = RECENT_STATUS_NONE;
-		gtknode->recent_signonoff_timer = 0;
-		cont = FALSE;
-	}
+
+	gtknode->recent_signonoff = FALSE;
+	gtknode->recent_signonoff_timer = 0;
 
 	pidgin_blist_update(NULL, (PurpleBlistNode*)buddy);
 
-	return cont;
+	return FALSE;
 }
 
 static void buddy_signonoff_cb(PurpleBuddy *buddy)
@@ -7173,12 +7151,11 @@
 
 	gtknode = ((PurpleBlistNode*)buddy)->ui_data;
 
-	gtknode->recent_signonoff = PURPLE_BUDDY_IS_ONLINE(buddy) ? RECENT_STATUS_SIGN_ON : RECENT_STATUS_SIGN_OFF;
+	gtknode->recent_signonoff = TRUE;
 
 	if(gtknode->recent_signonoff_timer > 0)
 		purple_timeout_remove(gtknode->recent_signonoff_timer);
-	gtknode->recent_signonoff_steps = STEPS;
-	gtknode->recent_signonoff_timer = purple_timeout_add(100,
+	gtknode->recent_signonoff_timer = purple_timeout_add(10000,
 			(GSourceFunc)buddy_signonoff_timeout_cb, buddy);
 }
 
@@ -7655,10 +7632,7 @@
 			gtk_widget_destroy(menuitem);
 	}
 
-	if (!(accounts = purple_accounts_get_all()))
-		return;
-
-	for (; accounts; accounts = accounts->next) {
+	for (accounts = purple_accounts_get_all(); accounts; accounts = accounts->next) {
 		char *buf = NULL;
 		GtkWidget *image = NULL;
 		PurpleAccount *account = NULL;