pidgin: b341289e: Revert this change that was accidentally...

kstange at pidgin.im kstange at pidgin.im
Wed Sep 10 15:55:30 EDT 2008


-----------------------------------------------------------------
Revision: b341289e9194564cc4f7250228a66b854c2ec3c5
Ancestor: fedd8495d3e49df957ae842bc5fa289452d048f8
Author: kstange at pidgin.im
Date: 2008-09-10T19:51:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b341289e9194564cc4f7250228a66b854c2ec3c5

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

Revert this change that was accidentally committed in f5ca7968 to remove
the weird zoomy login and logout animation.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	9b429c29e0faaddb00b41ab78da82b269c107ff9
+++ pidgin/gtkblist.c	dce4cddeaa374bf1bd0768b9c3e3ed12a5cfe9f7
@@ -67,7 +67,6 @@
 #include <gdk/gdk.h>
 
 #define HEADLINE_CLOSE_SIZE 12
-#define STEPS 50
 
 typedef struct
 {
@@ -168,18 +167,11 @@ typedef enum {
 	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 @@ pidgin_blist_get_status_icon(PurpleBlist
 		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 @@ static void buddy_node(PurpleBuddy *budd
 	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 @@ static void buddy_node(PurpleBuddy *budd
 	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 @@ static void pidgin_blist_update_contact(
 					   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_
 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 @@ static void buddy_signonoff_cb(PurpleBud
 
 	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 @@ pidgin_blist_update_accounts_menu(void)
 			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;


More information about the Commits mailing list