Changeset 89fe67e for variable.c


Ignore:
Timestamp:
Jun 11, 2011, 6:31:32 PM (10 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
File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.