Logo Search packages:      
Sourcecode: vdr-plugin-svdrposd version File versions  Download package

bool cPluginSvdrpOsd::AppendItems ( const char *  Option ) [private]

Appends item list for OSDI and LSTO to buffer.

Definition at line 193 of file svdrposd.c.

{
  bool ok = true;
  int maxitems = (*Option) ? strtol(Option, NULL, 10) : -1;

  // columns
  for (int i = 0; ok && i < status->MaxTabs && status->tabs[i] != 0; i++)
        ok = Append("C:%hu\r\n", status->tabs[i]);

  // items
  int current = 0;
  if (maxitems > 0 && status->selected > 0) {
        // pagewise scrolling
        current = status->selected - (status->selected % maxitems);
  }

  cSvdrpOsdItem *item = status->items.Get(current);
  while (ok && item && maxitems != 0) {
        ok = Append("%c:%s\r\n", current == status->selected ? 'S' : 'I', item->Text());
        current++;
        maxitems--;
        item = status->items.Next(item);
  }
  return ok;
}

Generated by  Doxygen 1.6.0   Back to index