Changeset 58f4fb2


Ignore:
Timestamp:
Jun 22, 2011, 12:37:21 AM (6 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, 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.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r117c21c r58f4fb2  
    656656              "show subscriptions / show subs\n"
    657657              "show terminal\n"
    658               "show timers\n"
    659658              "show variables\n"
    660659              "show variable <variable>\n"
     
    22342233  } else if (!strcmp(argv[1], "styles")) {
    22352234    owl_function_show_styles();
    2236   } else if (!strcmp(argv[1], "timers")) {
    2237     owl_function_show_timers();
    22382235  } else if (!strcmp(argv[1], "subs") || !strcmp(argv[1], "subscriptions")) {
    22392236    owl_function_getsubs();
  • 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}
  • perl/lib/BarnOwl/Complete/Client.pm

    rc6adf17 r58f4fb2  
    3737    subs        => undef,
    3838    terminal    => undef,
    39     timers      => undef,
    4039    variables   => undef,
    4140    variable    => \&complete_variable,
Note: See TracChangeset for help on using the changeset viewer.