Changeset 72146c7 for variable.c


Ignore:
Timestamp:
Jun 22, 2011, 12:37:21 AM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
58f4fb2
Parents:
6b0b4f4
git-author:
David Benjamin <davidben@mit.edu> (05/23/11 23:50:21)
git-committer:
David Benjamin <davidben@mit.edu> (06/22/11 00:37:21)
Message:
Convert pseudologins timer to glib timers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    r9efc154 r72146c7  
    504504int owl_variable_pseudologins_set(owl_variable *v, const void *newval)
    505505{
    506   static owl_timer *timer = NULL;
     506  static guint timer = 0;
    507507  if (newval) {
    508508    if (*(const int*)newval == 1) {
    509509      owl_function_zephyr_buddy_check(0);
    510       if (timer == NULL) {
    511         timer = owl_select_add_timer("owl_zephyr_buddycheck_timer",
    512                                      180, 180, owl_zephyr_buddycheck_timer, NULL, NULL);
     510      if (timer == 0) {
     511        timer = g_timeout_add_seconds(180, owl_zephyr_buddycheck_timer, NULL);
    513512      }
    514513    } else {
    515       if (timer != NULL) {
    516         owl_select_remove_timer(timer);
    517         timer = NULL;
     514      if (timer != 0) {
     515        g_source_remove(timer);
     516        timer = 0;
    518517      }
    519518    }
Note: See TracChangeset for help on using the changeset viewer.