Changeset 5b85d19


Ignore:
Timestamp:
Jul 3, 2003, 10:46:22 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9ceee9d
Parents:
de03334
Message:
Idle time reported in minutes, not seconds
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rde03334 r5b85d19  
    11$Id$
    22
     32.0.7-pre-2
     4        Don't allow zwrite if zephyr isn't present
     5       
    362.0.7-pre-1
    47        Owl should build now without zephyr, enabling it to act as a
  • buddylist.c

    rde03334 r5b85d19  
    125125 * screenname is not on the buddy list do nothing
    126126 */
    127 void owl_buddylist_set_idletime(owl_buddylist *b, char *screenname, int seconds)
     127void owl_buddylist_set_idletime(owl_buddylist *b, char *screenname, int minutes)
    128128{
    129129  int i, j, *idle;
     
    134134      owl_free(owl_list_get_element(&(b->idletimes), i));
    135135      idle=owl_malloc(sizeof(int));
    136       *idle=seconds;
     136      *idle=minutes;
    137137      owl_list_replace_element(&(b->idletimes), i, idle);
    138138      return;
  • commands.c

    r453bd70 r5b85d19  
    16101610  owl_zwrite z;
    16111611
     1612  if (!owl_global_is_havezephyr(&g)) {
     1613    owl_function_makemsg("Zephyr is not available");
     1614    return(NULL);
     1615  }
    16121616  /* check for a zwrite -m */
    16131617  owl_zwrite_create_from_line(&z, buff);
  • functions.c

    rde03334 r5b85d19  
    28652865      idle=owl_buddylist_get_idletime(b, i);
    28662866      if (idle!=0) {
    2867         timestr=owl_util_seconds_to_timestr(idle);
     2867        timestr=owl_util_minutes_to_timestr(idle);
    28682868      } else {
    28692869        timestr=owl_strdup("");
    28702870      }
    2871       foo=owl_sprintf("  %-10.10s %-15.15s\n",
     2871      foo=owl_sprintf("  %-10.10s %-10.10s\n",
    28722872                      owl_buddylist_get_buddy(b, i),
    28732873                      timestr);
  • owl.h

    rde03334 r5b85d19  
    2121static const char owl_h_fileIdent[] = "$Id$";
    2222
    23 #define OWL_VERSION         2.0.7-pre-1
    24 #define OWL_VERSION_STRING "2.0.7-pre-1"
     23#define OWL_VERSION         2.0.7-pre-2
     24#define OWL_VERSION_STRING "2.0.7-pre-2"
    2525
    2626#define OWL_DEBUG 0
  • util.c

    rde03334 r5b85d19  
    281281
    282282/* caller must free the return */
    283 char *owl_util_seconds_to_timestr(int seconds)
     283char *owl_util_minutes_to_timestr(int in)
    284284{
    285285  int days, minutes, hours;
     
    287287  char *out;
    288288
    289   run=seconds;
    290 
    291   days=run/86400;
    292   run-=days*86400;
    293   hours=run/3600;
    294   run-=hours*3600;
    295   minutes=run/60;
    296   run-=minutes*60;
     289  run=in;
     290
     291  days=run/1440;
     292  run-=days*1440;
     293  hours=run/60;
     294  run-=hours*60;
    297295
    298296  if (days>0) {
    299     out=owl_sprintf("%i d %2.2i:%2.2i:%2.2li", days, hours, minutes, run);
     297    out=owl_sprintf("%i d %2.2i:%2.2i", days, hours, run);
    300298  } else {
    301     out=owl_sprintf("     %2.2i:%2.2i:%2.2li", hours, minutes, run);
     299    out=owl_sprintf("     %2.2i:%2.2i", hours, run);
    302300  }
    303301  return(out);
Note: See TracChangeset for help on using the changeset viewer.