Changeset 58f4fb2 for functions.c


Ignore:
Timestamp:
Jun 22, 2011, 12:37:21 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
074bdaa
Parents:
72146c7
git-author:
David Benjamin <davidben@mit.edu> (05/24/11 00:33:34)
git-committer:
David Benjamin <davidben@mit.edu> (06/22/11 00:37:21)
Message:
Drop show timers feature

It was useful to access programmatically and probably not hugely useful.
We can restore something like it later if it's really needed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r259e60a8 r58f4fb2  
    9292  owl_function_popless_fmtext(&fm);
    9393  owl_list_cleanup(&l, g_free);
    94   owl_fmtext_cleanup(&fm);
    95 }
    96 
    97 static void _owl_function_timer_append_fmtext(gpointer data, gpointer user_data) {
    98   owl_fmtext *fm = user_data;
    99   owl_timer *timer = data;
    100   char *str = g_strdup_printf("- %s: in %d seconds",
    101                               timer->name ? timer->name : "(unnamed)",
    102                               (int)(timer->time - time(NULL)));
    103   owl_fmtext_append_normal(fm, str);
    104   g_free(str);
    105   if (timer->interval) {
    106     str = g_strdup_printf(", repeat every %d seconds", timer->interval);
    107     owl_fmtext_append_normal(fm, str);
    108     g_free(str);
    109   }
    110   owl_fmtext_append_normal(fm, "\n");
    111 }
    112 
    113 void owl_function_show_timers(void) {
    114   owl_fmtext fm;
    115   GList **timers;
    116 
    117   owl_fmtext_init_null(&fm);
    118   owl_fmtext_append_bold(&fm, "Active timers:\n");
    119 
    120   timers = owl_global_get_timerlist(&g);
    121   g_list_foreach(*timers, _owl_function_timer_append_fmtext, &fm);
    122 
    123   owl_function_popless_fmtext(&fm);
    12494  owl_fmtext_cleanup(&fm);
    12595}
Note: See TracChangeset for help on using the changeset viewer.