diff src/server.c @ 2131:acc11216ec5d

[gaim-migrate @ 2141] changing some gtk_timeout stuff to g_timeout (since it's likely that these will be used in core rather than gtk-ui). also fixed a small buddy pounce bug. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 06 Aug 2001 23:38:48 +0000
parents 56c4382f2909
children edf8c5a70e5b
line wrap: on
line diff
--- a/src/server.c	Mon Aug 06 21:47:17 2001 +0000
+++ b/src/server.c	Mon Aug 06 23:38:48 2001 +0000
@@ -69,11 +69,11 @@
 	}
 
 	if (gc->idle_timer > 0)
-		gtk_timeout_remove(gc->idle_timer);
+		g_source_remove(gc->idle_timer);
 	gc->idle_timer = 0;
 
 	if (gc->keepalive > 0)
-		gtk_timeout_remove(gc->keepalive);
+		g_source_remove(gc->keepalive);
 	gc->keepalive = 0;
 
 	if (gc->prpl && gc->prpl->close)
@@ -105,9 +105,9 @@
 	}
 
 	if (gc->idle_timer > 0)
-		gtk_timeout_remove(gc->idle_timer);
+		g_source_remove(gc->idle_timer);
 
-	gc->idle_timer = gtk_timeout_add(20000, (GtkFunction)check_idle, gc);
+	gc->idle_timer = g_timeout_add(20000, (GtkFunction)check_idle, gc);
 	serv_touch_idle(gc);
 
 	time(&gc->login_time);
@@ -651,7 +651,7 @@
 		system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE);
 	}
 	if (b->idle && !idle) {
-		do_pounce(b->name, OPT_POUNCE_UNIDLE);
+		do_pounce(gc, b->name, OPT_POUNCE_UNIDLE);
 		plugin_event(event_buddy_unidle, gc, b->name, 0, 0);
 		system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE);
 	}
@@ -660,7 +660,7 @@
 	b->evil = evil;
 
 	if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) {
-		do_pounce(b->name, OPT_POUNCE_UNAWAY);
+		do_pounce(gc, b->name, OPT_POUNCE_UNAWAY);
 		plugin_event(event_buddy_back, gc, b->name, 0, 0);
 		system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY);
 	} else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) {
@@ -677,7 +677,7 @@
 	if (loggedin) {
 		if (!b->present) {
 			b->present = 1;
-			do_pounce(b->name, OPT_POUNCE_SIGNON);
+			do_pounce(gc, b->name, OPT_POUNCE_SIGNON);
 			plugin_event(event_buddy_signon, gc, b->name, 0, 0);
 			system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON);
 		}
@@ -931,10 +931,10 @@
 {
 	if (on && !gc->keepalive && blist) {
 		debug_printf("allowing NOP\n");
-		gc->keepalive = gtk_timeout_add(60000, (GtkFunction)send_keepalive, gc);
+		gc->keepalive = g_timeout_add(60000, (GtkFunction)send_keepalive, gc);
 	} else if (!on && gc->keepalive > 0) {
 		debug_printf("removing NOP\n");
-		gtk_timeout_remove(gc->keepalive);
+		g_source_remove(gc->keepalive);
 		gc->keepalive = 0;
 	}
 }