Mercurial > pidgin
diff src/buddy.c @ 4168:ebfb80bbe1ed
[gaim-migrate @ 4397]
(00:16:51) faceprint: apply my g-signal patch too! </whine>
(00:17:02) ChipX86: the what?
(00:17:20) faceprint: sorry
(00:17:23) faceprint: g-timeout, rather
(00:17:28) ChipX86: ah good
(00:17:33) faceprint: http://faceprint.com/code/gaim/g-timeout.20030101.1301.diff
(00:17:33) ChipX86: yes, APPLY THAT
(00:17:38) ChipX86: I need that
(00:17:40) LSchiere: one at a time
(00:17:51) faceprint: ChipX86: you need that?
(00:17:56) ChipX86: for the conversation rewrite
(00:17:59) faceprint: ahh
(00:18:08) faceprint: it also fixes a memleak for msn users
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Thu, 02 Jan 2003 05:20:55 +0000 |
| parents | 7002b6f16bdf |
| children | 88ebcfcc3217 |
line wrap: on
line diff
--- a/src/buddy.c Thu Jan 02 05:18:16 2003 +0000 +++ b/src/buddy.c Thu Jan 02 05:20:55 2003 +0000 @@ -145,7 +145,7 @@ if (!bs->connlist) { gs->members = g_slist_remove(gs->members, bs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); + g_source_remove(bs->log_timer); bs->log_timer = 0; remove_buddy_show(gs, bs); g_free(bs->show); @@ -199,7 +199,7 @@ if (!bs->connlist) { gs->members = g_slist_remove(gs->members, bs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); + g_source_remove(bs->log_timer); bs->log_timer = 0; remove_buddy_show(gs, bs); g_free(bs->show); @@ -274,7 +274,7 @@ if (!bs->connlist) { gs->members = g_slist_remove(gs->members, bs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); + g_source_remove(bs->log_timer); bs->log_timer = 0; remove_buddy_show(gs, bs); g_free(bs->show); @@ -303,7 +303,7 @@ debug_printf("buddy_show still exists: %s\n", b->name); m = g_slist_remove(m, b); if (b->log_timer > 0) - gtk_timeout_remove(b->log_timer); + g_source_remove(b->log_timer); b->log_timer = 0; gtk_tree_remove_item(GTK_TREE(g->tree), b->item); g_free(b->show); @@ -904,7 +904,7 @@ if (!g_slist_length(bs->connlist)) { gs->members = g_slist_remove(gs->members, bs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); + g_source_remove(bs->log_timer); bs->log_timer = 0; remove_buddy_show(gs, bs); g_free(bs->show); @@ -1012,7 +1012,7 @@ bs = (struct buddy_show *)m->data; m = g_slist_remove(m, bs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); + g_source_remove(bs->log_timer); g_free(bs->show); g_free(bs->name); g_free(bs); @@ -2099,8 +2099,9 @@ } } -static gint log_timeout(struct buddy_show *b) +static gboolean log_timeout(gpointer data) { + struct buddy_show *b = data; /* this part is really just a bad hack because of a bug I can't find */ GSList *s = shows; while (s) { @@ -2116,7 +2117,7 @@ s = s->next; } if (!s) - return 0; + return FALSE; /* this is the real part. */ if (!b->connlist) { @@ -2133,7 +2134,7 @@ g_free(g->name); g_free(g); } - gtk_timeout_remove(b->log_timer); + g_source_remove(b->log_timer); b->log_timer = 0; g_free(b->name); g_free(b->show); @@ -2157,11 +2158,11 @@ gtk_widget_hide(b->pix); gdk_pixmap_unref(pm); gdk_bitmap_unref(bm); - gtk_timeout_remove(b->log_timer); + g_source_remove(b->log_timer); b->log_timer = 0; b->sound = 0; } - return 0; + return FALSE; } static char *caps_string(guint caps) @@ -2390,8 +2391,8 @@ gdk_bitmap_unref(bm); b->present = 2; if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); - bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); + g_source_remove(bs->log_timer); + bs->log_timer = g_timeout_add(10000, log_timeout, bs); if ((bs->sound != 2) && (im_options & OPT_IM_LOGON)) { struct conversation *c = find_conversation(b->name); if (c) { @@ -2443,8 +2444,8 @@ bs->connlist = g_slist_remove(bs->connlist, gc); update_num_group(gs); if (bs->log_timer > 0) - gtk_timeout_remove(bs->log_timer); - bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); + g_source_remove(bs->log_timer); + bs->log_timer = g_timeout_add(10000, log_timeout, bs); pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, logout_icon_xpm); gtk_widget_hide(bs->pix); gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm);
