Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 2130:50c7a704ee56 | 2131:acc11216ec5d |
|---|---|
| 67 gc->buddy_chats = g_slist_remove(gc->buddy_chats, b); | 67 gc->buddy_chats = g_slist_remove(gc->buddy_chats, b); |
| 68 b->gc = NULL; | 68 b->gc = NULL; |
| 69 } | 69 } |
| 70 | 70 |
| 71 if (gc->idle_timer > 0) | 71 if (gc->idle_timer > 0) |
| 72 gtk_timeout_remove(gc->idle_timer); | 72 g_source_remove(gc->idle_timer); |
| 73 gc->idle_timer = 0; | 73 gc->idle_timer = 0; |
| 74 | 74 |
| 75 if (gc->keepalive > 0) | 75 if (gc->keepalive > 0) |
| 76 gtk_timeout_remove(gc->keepalive); | 76 g_source_remove(gc->keepalive); |
| 77 gc->keepalive = 0; | 77 gc->keepalive = 0; |
| 78 | 78 |
| 79 if (gc->prpl && gc->prpl->close) | 79 if (gc->prpl && gc->prpl->close) |
| 80 (*gc->prpl->close)(gc); | 80 (*gc->prpl->close)(gc); |
| 81 | 81 |
| 103 serv_set_info(gc, gc->user->user_info); | 103 serv_set_info(gc, gc->user->user_info); |
| 104 /* g_free(buf); */ | 104 /* g_free(buf); */ |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (gc->idle_timer > 0) | 107 if (gc->idle_timer > 0) |
| 108 gtk_timeout_remove(gc->idle_timer); | 108 g_source_remove(gc->idle_timer); |
| 109 | 109 |
| 110 gc->idle_timer = gtk_timeout_add(20000, (GtkFunction)check_idle, gc); | 110 gc->idle_timer = g_timeout_add(20000, (GtkFunction)check_idle, gc); |
| 111 serv_touch_idle(gc); | 111 serv_touch_idle(gc); |
| 112 | 112 |
| 113 time(&gc->login_time); | 113 time(&gc->login_time); |
| 114 | 114 |
| 115 if (gc->prpl->options & OPT_PROTO_CORRECT_TIME) | 115 if (gc->prpl->options & OPT_PROTO_CORRECT_TIME) |
| 649 if (!b->idle && idle) { | 649 if (!b->idle && idle) { |
| 650 plugin_event(event_buddy_idle, gc, b->name, 0, 0); | 650 plugin_event(event_buddy_idle, gc, b->name, 0, 0); |
| 651 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE); | 651 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE); |
| 652 } | 652 } |
| 653 if (b->idle && !idle) { | 653 if (b->idle && !idle) { |
| 654 do_pounce(b->name, OPT_POUNCE_UNIDLE); | 654 do_pounce(gc, b->name, OPT_POUNCE_UNIDLE); |
| 655 plugin_event(event_buddy_unidle, gc, b->name, 0, 0); | 655 plugin_event(event_buddy_unidle, gc, b->name, 0, 0); |
| 656 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE); | 656 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE); |
| 657 } | 657 } |
| 658 | 658 |
| 659 b->idle = idle; | 659 b->idle = idle; |
| 660 b->evil = evil; | 660 b->evil = evil; |
| 661 | 661 |
| 662 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { | 662 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { |
| 663 do_pounce(b->name, OPT_POUNCE_UNAWAY); | 663 do_pounce(gc, b->name, OPT_POUNCE_UNAWAY); |
| 664 plugin_event(event_buddy_back, gc, b->name, 0, 0); | 664 plugin_event(event_buddy_back, gc, b->name, 0, 0); |
| 665 system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY); | 665 system_log(log_back, gc, b, OPT_LOG_BUDDY_AWAY); |
| 666 } else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) { | 666 } else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) { |
| 667 plugin_event(event_buddy_away, gc, b->name, 0, 0); | 667 plugin_event(event_buddy_away, gc, b->name, 0, 0); |
| 668 system_log(log_away, gc, b, OPT_LOG_BUDDY_AWAY); | 668 system_log(log_away, gc, b, OPT_LOG_BUDDY_AWAY); |
| 675 b->signon = signon; | 675 b->signon = signon; |
| 676 | 676 |
| 677 if (loggedin) { | 677 if (loggedin) { |
| 678 if (!b->present) { | 678 if (!b->present) { |
| 679 b->present = 1; | 679 b->present = 1; |
| 680 do_pounce(b->name, OPT_POUNCE_SIGNON); | 680 do_pounce(gc, b->name, OPT_POUNCE_SIGNON); |
| 681 plugin_event(event_buddy_signon, gc, b->name, 0, 0); | 681 plugin_event(event_buddy_signon, gc, b->name, 0, 0); |
| 682 system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); | 682 system_log(log_signon, gc, b, OPT_LOG_BUDDY_SIGNON); |
| 683 } | 683 } |
| 684 } else { | 684 } else { |
| 685 if (b->present) { | 685 if (b->present) { |
| 929 | 929 |
| 930 void update_keepalive(struct gaim_connection *gc, gboolean on) | 930 void update_keepalive(struct gaim_connection *gc, gboolean on) |
| 931 { | 931 { |
| 932 if (on && !gc->keepalive && blist) { | 932 if (on && !gc->keepalive && blist) { |
| 933 debug_printf("allowing NOP\n"); | 933 debug_printf("allowing NOP\n"); |
| 934 gc->keepalive = gtk_timeout_add(60000, (GtkFunction)send_keepalive, gc); | 934 gc->keepalive = g_timeout_add(60000, (GtkFunction)send_keepalive, gc); |
| 935 } else if (!on && gc->keepalive > 0) { | 935 } else if (!on && gc->keepalive > 0) { |
| 936 debug_printf("removing NOP\n"); | 936 debug_printf("removing NOP\n"); |
| 937 gtk_timeout_remove(gc->keepalive); | 937 g_source_remove(gc->keepalive); |
| 938 gc->keepalive = 0; | 938 gc->keepalive = 0; |
| 939 } | 939 } |
| 940 } | 940 } |
