Changeset 72146c7


Ignore:
Timestamp:
Jun 22, 2011, 12:37:21 AM (10 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
Files:
2 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    }
  • zephyr.c

    rb848e30 r72146c7  
    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.