comparison plugins/chkmail.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 1330d0c8b1ff
children c081a81ee013
comparison
equal deleted inserted replaced
4167:7002b6f16bdf 4168:ebfb80bbe1ed
143 lastnum = orig; 143 lastnum = orig;
144 144
145 gaim_signal_connect(handle, event_blist_update, setup_mail_list, NULL); 145 gaim_signal_connect(handle, event_blist_update, setup_mail_list, NULL);
146 setup_mail_list(); 146 setup_mail_list();
147 147
148 mytimer = gtk_timeout_add(30000, (GtkFunction)check_mail, NULL); 148 mytimer = g_timeout_add(30000, check_mail, NULL);
149 } 149 }
150 150
151 void check_mail() { 151 void check_mail() {
152 pthread_t mail_thread; 152 pthread_t mail_thread;
153 pthread_attr_t attr; 153 pthread_attr_t attr;
165 165
166 void update_mail () { 166 void update_mail () {
167 int newnum; 167 int newnum;
168 168
169 printf("um\n"); 169 printf("um\n");
170 gtk_timeout_remove(mytimer); 170 g_source_remove(mytimer);
171 171
172 printf("nm1\n"); 172 printf("nm1\n");
173 newnum = num_msgs(); 173 newnum = num_msgs();
174 174
175 printf("nm2\n"); 175 printf("nm2\n");
182 if (newnum < lastnum) { 182 if (newnum < lastnum) {
183 orig = lastnum; 183 orig = lastnum;
184 } 184 }
185 185
186 lastnum = newnum; 186 lastnum = newnum;
187 mytimer = gtk_timeout_add(30000, (GtkFunction)check_mail, NULL); 187 mytimer = g_timeout_add(30000, check_mail, NULL);
188 printf("sml1\n"); 188 printf("sml1\n");
189 setup_mail_list(); 189 setup_mail_list();
190 printf("sml2\n"); 190 printf("sml2\n");
191 state = 0; 191 state = 0;
192 } 192 }
193 193
194 194
195 void gaim_plugin_remove() { 195 void gaim_plugin_remove() {
196 gtk_timeout_remove(mytimer); 196 g_source_remove(mytimer);
197 while (state == 1) { } 197 while (state == 1) { }
198 destroy_mail_list(); 198 destroy_mail_list();
199 handle = NULL; 199 handle = NULL;
200 } 200 }
201 201