Changeset de03334 for functions.c


Ignore:
Timestamp:
Jul 3, 2003, 9:31:03 PM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
5b85d19
Parents:
210c261
Message:
Idletimes now appear in the buddylist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    re6449bc rde03334  
    28442844void owl_function_buddylist(int aim, int zephyr, char *file)
    28452845{
    2846   int i, j;
     2846  int i, j, idle;
    28472847  owl_fmtext fm;
    28482848  owl_buddylist *b;
     2849  char *foo, *timestr;
    28492850#ifdef HAVE_LIBZEPHYR
    28502851  char *ourfile, *tmp, buff[LINE], *line;
     
    28622863    j=owl_buddylist_get_size(b);
    28632864    for (i=0; i<j; i++) {
    2864       owl_fmtext_append_normal(&fm, "  ");
    2865       owl_fmtext_append_normal(&fm, owl_buddylist_get_buddy(b, i));
    2866       owl_fmtext_append_normal(&fm, "\n");
     2865      idle=owl_buddylist_get_idletime(b, i);
     2866      if (idle!=0) {
     2867        timestr=owl_util_seconds_to_timestr(idle);
     2868      } else {
     2869        timestr=owl_strdup("");
     2870      }
     2871      foo=owl_sprintf("  %-10.10s %-15.15s\n",
     2872                      owl_buddylist_get_buddy(b, i),
     2873                      timestr);
     2874      owl_fmtext_append_normal(&fm, foo);
     2875      owl_free(timestr);
     2876      owl_free(foo);
    28672877    }
    28682878  }
Note: See TracChangeset for help on using the changeset viewer.