Changeset 89fe67e


Ignore:
Timestamp:
Jun 11, 2011, 6:31:32 PM (7 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
b9d22f7
Parents:
6dc3757
git-author:
David Benjamin <davidben@mit.edu> (05/23/11 23:50:21)
git-committer:
David Benjamin <davidben@mit.edu> (06/11/11 18:31:32)
Message:
Convert pseudologins timer to glib timers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    r4c7c21f r89fe67e  
    495495int owl_variable_pseudologins_set(owl_variable *v, const void *newval)
    496496{
    497   static owl_timer *timer = NULL;
     497  static guint timer = 0;
    498498  if (newval) {
    499499    if (*(const int*)newval == 1) {
    500500      owl_function_zephyr_buddy_check(0);
    501       if (timer == NULL) {
    502         timer = owl_select_add_timer("owl_zephyr_buddycheck_timer",
    503                                      180, 180, owl_zephyr_buddycheck_timer, NULL, NULL);
     501      if (timer == 0) {
     502        timer = g_timeout_add_seconds(180, owl_zephyr_buddycheck_timer, NULL);
    504503      }
    505504    } else {
    506       if (timer != NULL) {
    507         owl_select_remove_timer(timer);
    508         timer = NULL;
     505      if (timer != 0) {
     506        g_source_remove(timer);
     507        timer = 0;
    509508      }
    510509    }
  • zephyr.c

    rb848e30 r89fe67e  
    14321432#endif
    14331433
    1434 void owl_zephyr_buddycheck_timer(owl_timer *t, void *data)
     1434gboolean owl_zephyr_buddycheck_timer(void *data)
    14351435{
    14361436  if (owl_global_is_pseudologins(&g)) {
     
    14401440    owl_function_debugmsg("Warning: owl_zephyr_buddycheck_timer call pointless; timer should have been disabled");
    14411441  }
     1442  return TRUE;
    14421443}
    14431444
Note: See TracChangeset for help on using the changeset viewer.