Changeset b9d22f7


Ignore:
Timestamp:
Jun 11, 2011, 6:31:32 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
7df7be2
Parents:
89fe67e
git-author:
David Benjamin <davidben@mit.edu> (05/24/11 00:33:34)
git-committer:
David Benjamin <davidben@mit.edu> (06/11/11 18:31:32)
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

    r697221f rb9d22f7  
    654654              "show subscriptions / show subs\n"
    655655              "show terminal\n"
    656               "show timers\n"
    657656              "show variables\n"
    658657              "show variable <variable>\n"
     
    22252224  } else if (!strcmp(argv[1], "styles")) {
    22262225    owl_function_show_styles();
    2227   } else if (!strcmp(argv[1], "timers")) {
    2228     owl_function_show_timers();
    22292226  } else if (!strcmp(argv[1], "subs") || !strcmp(argv[1], "subscriptions")) {
    22302227    owl_function_getsubs();
  • functions.c

    r259e60a8 rb9d22f7  
    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 rb9d22f7  
    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.