Changeset 5eb392f
- Timestamp:
- Mar 25, 2011, 3:46:46 AM (14 years ago)
- Children:
- cd28517
- Parents:
- 7b2686d
- git-author:
- David Benjamin <davidben@mit.edu> (02/25/11 22:06:45)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/25/11 03:46:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r7b2686d r5eb392f 166 166 * was ignored due to user settings or otherwise. 167 167 */ 168 int owl_process_message(owl_message *m) {168 static int owl_process_message(owl_message *m) { 169 169 const owl_filter *f; 170 170 /* if this message it on the puntlist, nuke it and continue */ … … 251 251 } 252 252 253 static gboolean owl_process_messages_prepare(GSource *source, int *timeout) { 254 *timeout = -1; 255 return owl_global_messagequeue_pending(&g); 256 } 257 258 static gboolean owl_process_messages_check(GSource *source) { 259 return owl_global_messagequeue_pending(&g); 260 } 261 253 262 /* 254 263 * Process any new messages we have waiting in the message queue. 255 * Returns 1 if any messages were added to the message list, and 0 otherwise.256 264 */ 257 int owl_process_messages(owl_ps_action *d, void *p) 258 { 265 static gboolean owl_process_messages_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { 259 266 int newmsgs=0; 260 267 int followlast = owl_global_should_followlast(&g); … … 280 287 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 281 288 } 282 return newmsgs; 283 } 289 return TRUE; 290 } 291 292 static GSourceFuncs owl_process_messages_funcs = { 293 owl_process_messages_prepare, 294 owl_process_messages_check, 295 owl_process_messages_dispatch, 296 NULL 297 }; 284 298 285 299 void owl_process_input(const owl_io_dispatch *d, void *data) … … 573 587 g_source_unref(source); 574 588 575 owl_select_add_pre_select_action(owl_process_messages, NULL, NULL); 589 source = g_source_new(&owl_process_messages_funcs, sizeof(GSource)); 590 g_source_attach(source, NULL); 591 g_source_unref(source); 592 576 593 owl_select_add_pre_select_action(owl_errsignal_pre_select_action, NULL, NULL); 577 594
Note: See TracChangeset
for help on using the changeset viewer.