static void gui_vfslist_percent ( struct gui_vfslist gv  )  [static]

Recalculate the percentage string.

Definition at line 125 of file gui_vfslist.c.

00126 {
00127         unsigned int bottom, length;
00128 
00129         length = gv->list != NULL ? vfs_list_items(gv->list) : 0;
00130         bottom = gv->idx_top + gv->winheight - 1;
00131 
00132         if (bottom >= length) {
00133                 /* We can see the end */
00134                 if (gv->idx_top <= 1)
00135                         strcpy(gv->percent, " (all) ");
00136                 else
00137                         strcpy(gv->percent, " (end) ");
00138         } else {
00139                 /* Write back a percentage */
00140                 sprintf(gv->percent, " (%d%%) ", (bottom * 100) / length);
00141         }
00142 }

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:36 2010 for herrie by  doxygen 1.6.3