aboutsummaryrefslogtreecommitdiffstats
path: root/po/cs.po
diff options
context:
space:
mode:
authorSARL ENR 68 <david@david.david>2015-10-06 09:09:32 +0200
committerSARL ENR 68 <david@david.david>2015-10-06 09:09:32 +0200
commit568110a09114f09269357d1e9b4615a86c382d6a (patch)
treeb04e5d3849c05e77801b8d90d8fa1fe1799fca3e /po/cs.po
parentc44c1610fa8a09f5724627a8599e7e11e8f1721c (diff)
downloadisodumper-568110a09114f09269357d1e9b4615a86c382d6a.tar
isodumper-568110a09114f09269357d1e9b4615a86c382d6a.tar.gz
isodumper-568110a09114f09269357d1e9b4615a86c382d6a.tar.bz2
isodumper-568110a09114f09269357d1e9b4615a86c382d6a.tar.xz
isodumper-568110a09114f09269357d1e9b4615a86c382d6a.zip
po formatting updates with sh po-update.sh script
- for future 0.43 release
Diffstat (limited to 'po/cs.po')
-rw-r--r--po/cs.po121
1 files changed, 45 insertions, 76 deletions
diff --git a/po/cs.po b/po/cs.po
index d3c9405..8b1023d 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: isodumper\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-03-08 09:28+0100\n"
+"POT-Creation-Date: 2015-10-06 08:24+0200\n"
"PO-Revision-Date: 2015-04-27 13:45+0000\n"
"Last-Translator: fri\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/mageia/language/"
@@ -26,169 +26,146 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: lib/isodumper.py:103
+#: lib/isodumper.py:91
#, python-format
msgid "%r not known to UDisks2"
msgstr "%r neznámé UDisks2"
-#: lib/isodumper.py:263
+#: lib/isodumper.py:210
msgid "UDisks2 is not available on your system"
msgstr "UDisks2 není ve vašem systému dostupný"
-#: lib/isodumper.py:284
+#: lib/isodumper.py:231
msgid "Mb"
msgstr "Mb"
-#: lib/isodumper.py:300 lib/isodumper.py:466
+#: lib/isodumper.py:247 lib/isodumper.py:410
msgid "Target Device: "
msgstr "Cílové zařízení: "
-#: lib/isodumper.py:324
+#: lib/isodumper.py:271
msgid "Backup in: "
msgstr "Záloha za: "
-#: lib/isodumper.py:362 lib/isodumper.py:504
+#: lib/isodumper.py:309
msgid "The device was formatted successfully."
msgstr "Zařízení bylo úspěšně naformátováno."
-#: lib/isodumper.py:366 lib/isodumper.py:496
+#: lib/isodumper.py:313
msgid "An error occurred while creating a partition."
msgstr "Při vytváření diskového oddílu se vyskytla chyba."
-#: lib/isodumper.py:370 lib/isodumper.py:500
+#: lib/isodumper.py:317
msgid "Authentication error."
msgstr "Chyba při ověření."
-#: lib/isodumper.py:374 lib/isodumper.py:540
+#: lib/isodumper.py:321
msgid "An error occurred."
msgstr "Stala se chyba."
-#: lib/isodumper.py:438
+#: lib/isodumper.py:385
#, python-format
msgid ""
"The destination directory is too small to receive the backup (%s Mb needed)"
msgstr "Cílový adresář je na přijetí zálohy příliš malý (potřeba %s MB)"
-#: lib/isodumper.py:443 share/isodumper/isodumper.glade.h:52
+#: lib/isodumper.py:390 share/isodumper/isodumper.glade.h:50
msgid "Backup in:"
msgstr "Záloha za:"
-#: lib/isodumper.py:469
+#: lib/isodumper.py:413
msgid "The device is too small to contain the ISO file."
msgstr "Zařízení je příliš malé, aby mohlo obsahovat soubor ISO."
-#: lib/isodumper.py:476
+#: lib/isodumper.py:420
msgid "The device is bigger than 32 Gbytes. Are you sure you want use it?"
msgstr ""
"Zařízení je větší než 32 GB. Jste si jisti, že ho chcete opravdu použít?"
-#: lib/isodumper.py:519 lib/isodumper.py:537
-#, python-format
-msgid "Error mounting the partition %s"
-msgstr "Chyba při připojování oddílu %s"
-
-#: lib/isodumper.py:523
-msgid "Mounted in: "
-msgstr "Připojeno k:"
-
-#: lib/isodumper.py:533
-msgid "Error copying files"
-msgstr "Chyba při kopírování souborů"
-
-#: lib/isodumper.py:565
+#: lib/isodumper.py:454
msgid "Unmounting all partitions of "
msgstr "Odpojují se všechny oddíly "
-#: lib/isodumper.py:567
+#: lib/isodumper.py:456
msgid "Trying to unmount "
msgstr "Pokouší se odpojit "
-#: lib/isodumper.py:573
+#: lib/isodumper.py:462
msgid " was terminated by signal "
msgstr " bylo přerušeno signálem "
-#: lib/isodumper.py:573 lib/isodumper.py:579
+#: lib/isodumper.py:462 lib/isodumper.py:468
msgid "Error, umount "
msgstr "Chyba, odpojení "
-#: lib/isodumper.py:577
+#: lib/isodumper.py:466
msgid " successfully unmounted"
msgstr " úspěšně odpojen"
-#: lib/isodumper.py:579
+#: lib/isodumper.py:468
msgid " returned "
msgstr " vrátilo "
-#: lib/isodumper.py:582
+#: lib/isodumper.py:471
msgid "Execution failed: "
msgstr "Spuštění selhalo: "
-#: lib/isodumper.py:590
+#: lib/isodumper.py:479
msgid "Could not read mtab !"
msgstr "Nelze přečíst mtab!"
-#: lib/isodumper.py:600 lib/isodumper.py:629
+#: lib/isodumper.py:489 lib/isodumper.py:518
msgid "Reading error."
msgstr "Chyba při čtení."
-#: lib/isodumper.py:607
+#: lib/isodumper.py:496
msgid "You have not the rights for writing on the device"
msgstr "Nemáte práva pro zápis na zařízení"
-#: lib/isodumper.py:613 lib/isodumper.py:614 lib/isodumper.py:726
-#: lib/isodumper.py:727
+#: lib/isodumper.py:502 lib/isodumper.py:503
msgid " to "
msgstr " do "
-#: lib/isodumper.py:613 lib/isodumper.py:726
+#: lib/isodumper.py:502
msgid "Writing "
msgstr "Zapisuje se "
-#: lib/isodumper.py:614 lib/isodumper.py:727
+#: lib/isodumper.py:503
msgid "Executing copy from "
msgstr "Kopíruje se z "
-#: lib/isodumper.py:635 lib/isodumper.py:651 lib/isodumper.py:661
+#: lib/isodumper.py:524 lib/isodumper.py:540 lib/isodumper.py:550
msgid "Writing error."
msgstr "Chyba při zápisu."
-#: lib/isodumper.py:641
+#: lib/isodumper.py:530
msgid "Wrote: "
msgstr "Zapsáno: "
-#: lib/isodumper.py:656 lib/isodumper.py:766
+#: lib/isodumper.py:545
msgid " successfully written to "
msgstr " byl úspěšně zapsán do "
-#: lib/isodumper.py:656 lib/isodumper.py:766 lib/isodumper.py:854
+#: lib/isodumper.py:545 lib/isodumper.py:674
msgid "Image "
msgstr "Obraz "
-#: lib/isodumper.py:657
+#: lib/isodumper.py:546
msgid "Bytes written: "
msgstr "Zapsáno bytů: "
-#: lib/isodumper.py:670
+#: lib/isodumper.py:559
msgid "Checking "
msgstr "Ověřuje se"
-#: lib/isodumper.py:697
+#: lib/isodumper.py:586
msgid "SHA1 sum: "
msgstr "Kontrolní součet SHA1: "
-#: lib/isodumper.py:698
+#: lib/isodumper.py:587
msgid "MD5 sum: "
msgstr "Kontrolní součet MD5: "
-#: lib/isodumper.py:723
-msgid "ISO image mounted in "
-msgstr "Obraz ISO připojen k"
-
-#: lib/isodumper.py:731
-#, python-format
-msgid "%s file(s) to copy."
-msgstr "%s soubor(y) ke kopírování."
-
#: polkit/org.mageia.isodumper.policy.in.h:1
msgid "Run Isodumper"
msgstr "Spustit Isodumper"
@@ -358,50 +335,42 @@ msgid "Select Image"
msgstr "Zvolte obraz"
#: share/isodumper/isodumper.glade.h:48
-msgid "For UEFI boot"
-msgstr "Pro zavádění UEFI"
-
-#: share/isodumper/isodumper.glade.h:49
-msgid "Use FAT32 format with MGALIVE as volume name."
-msgstr "Použít formát FAT32 s MGALIVE jako název svazku."
-
-#: share/isodumper/isodumper.glade.h:50
msgid "Write to device"
msgstr "Zapsat na zařízení"
-#: share/isodumper/isodumper.glade.h:51
+#: share/isodumper/isodumper.glade.h:49
msgid "Create a backup of the device as image to restore it later"
msgstr "Vytvořit zálohu zařízení jako obraz pro jeho pozdější obnovení"
-#: share/isodumper/isodumper.glade.h:54
+#: share/isodumper/isodumper.glade.h:52
msgid "(None)"
msgstr "(žádná)"
-#: share/isodumper/isodumper.glade.h:55
+#: share/isodumper/isodumper.glade.h:53
msgid "Select a folder in which to write the backup image"
msgstr "Zvolte složku, do které se má zapsat obraz se zálohou"
-#: share/isodumper/isodumper.glade.h:56
+#: share/isodumper/isodumper.glade.h:54
msgid "Backup the device"
msgstr "Zálohovat zařízení"
-#: share/isodumper/isodumper.glade.h:57
+#: share/isodumper/isodumper.glade.h:55
msgid "Format the device in FAT, NTFS or ext:"
msgstr "Formátovat zařízení na FAT, NTFS nebo ext:"
-#: share/isodumper/isodumper.glade.h:58
+#: share/isodumper/isodumper.glade.h:56
msgid "Choose the format. The device will be formatted in one partition"
msgstr "Zvolte formát. Zařízení bude zformátováno do jednoho diskového oddílu"
-#: share/isodumper/isodumper.glade.h:59
+#: share/isodumper/isodumper.glade.h:57
msgid "Format the device"
msgstr "Formátovat zařízení"
-#: share/isodumper/isodumper.glade.h:60
+#: share/isodumper/isodumper.glade.h:58
msgid "Details"
msgstr "Podrobnosti"
-#: share/isodumper/isodumper.glade.h:61
+#: share/isodumper/isodumper.glade.h:59
msgid ""
"<b>Warning</b>\n"
" No target devices were found. \n"
@@ -415,7 +384,7 @@ msgstr ""
" Je potřeba, abyste zastrčili zařízení USB,\n"
" na které lze obraz zapsat."
-#: share/isodumper/isodumper.glade.h:66
+#: share/isodumper/isodumper.glade.h:64
msgid ""
"<b>Success</b>\n"
" The operation was successfully performed.\n"
id='n497' href='#n497'>497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
#include <slang.h>
#include <stdlib.h>
#include <string.h>

#include "newt.h"
#include "newt_pr.h"

struct items {
    char * text;
    const void *data;
    unsigned char selected;
    struct items *next;
    struct items *prev;
    struct items *branch;
    int flags;
    int depth;
};

struct CheckboxTree {
    newtComponent sb;
    int curWidth;	/* size of text w/o scrollbar or border*/
    int curHeight;	/* size of text w/o border */
    struct items * itemlist;
    struct items ** flatList, ** currItem, ** firstItem;
    int flatCount;
    int flags;
    int pad;
    char * seq;
    char * result;
};

static void ctDraw(newtComponent c);
static void ctDestroy(newtComponent co);
static void ctPlace(newtComponent co, int newLeft, int newTop);
struct eventResult ctEvent(newtComponent co, struct event ev);
static void ctMapped(newtComponent co, int isMapped);
static struct items * findItem(struct items * items, const void * data);
static void buildFlatList(newtComponent co);
static void doBuildFlatList(struct CheckboxTree * ct, struct items * item);
enum countWhat { COUNT_EXPOSED=0, COUNT_SELECTED=1 };
static int countItems(struct items * item, enum countWhat justExposed);

static struct componentOps ctOps = {
    ctDraw,
    ctEvent,
    ctDestroy,
    ctPlace,
    ctMapped,
} ;

static int countItems(struct items * item, enum countWhat what) {
    int count = 0;

    while (item) {
        if ((!item->branch && item->selected == what) || (what == COUNT_EXPOSED))
	    count++;
	if (item->branch || (what == COUNT_EXPOSED && item->selected))
	    count += countItems(item->branch, what);
	item = item->next;
    }

    return count;
}

static void doBuildFlatList(struct CheckboxTree * ct, struct items * item) {
    while (item) {
    	ct->flatList[ct->flatCount++] = item;
	if (item->branch && item->selected) doBuildFlatList(ct, item->branch);
	item = item->next;
    }
}

static void buildFlatList(newtComponent co) {
    struct CheckboxTree * ct = co->data;

    if (ct->flatList) free(ct->flatList);
    ct->flatCount = countItems(ct->itemlist, COUNT_EXPOSED);

    ct->flatList = malloc(sizeof(*ct->flatList) * (ct->flatCount+1));
    ct->flatCount = 0;
    doBuildFlatList(ct, ct->itemlist);
    ct->flatList[ct->flatCount] = NULL;
}

int newtCheckboxTreeAddItem(newtComponent co, 
			    const char * text, const void * data,
			    int flags, int index, ...) {
    va_list argList;
    int numIndexes;
    int * indexes;
    int i;

    va_start(argList, index);
    numIndexes = 0;
    i = index;
    while (i != NEWT_ARG_LAST) {
	numIndexes++;
	i = va_arg(argList, int);
    }

    va_end(argList);

    indexes = alloca(sizeof(*indexes) * (numIndexes + 1));
    va_start(argList, index);
    numIndexes = 0;
    i = index;
    va_start(argList, index);
    while (i != NEWT_ARG_LAST) {
	indexes[numIndexes++] = i;
	i = va_arg(argList, int);
    }
    va_end(argList);

    indexes[numIndexes++] = NEWT_ARG_LAST;

    return newtCheckboxTreeAddArray(co, text, data, flags, indexes);
}

static int doFindItemPath(struct items * items, void * data, int * path, 
			  int * len) {
    int where = 0;

    while (items) {
	if (items->data == data) {
	    if (path) path[items->depth] = where;
	    if (len) *len = items->depth + 1;
	    return 1;
	}

	if (items->branch && doFindItemPath(items->branch, data, path, len)) {
	    if (path) path[items->depth] = where;
	    return 1;
	}

	items = items->next;
	where++;
    }

    return 0;
}

int * newtCheckboxTreeFindItem(newtComponent co, void * data) {
    int len;
    int * path;
    struct CheckboxTree * ct = co->data;

    if (!doFindItemPath(ct->itemlist, data, NULL, &len)) return NULL;

    path = malloc(sizeof(*path) * (len + 1));
    doFindItemPath(ct->itemlist, data, path, NULL);
    path[len] = NEWT_ARG_LAST;

    return path;
}

int newtCheckboxTreeAddArray(newtComponent co, 
			    const char * text, const void * data,
			    int flags, int * indexes) {
    struct items * curList, * newNode, * item = NULL;
    struct items ** listPtr = NULL;
    int i, index, numIndexes;
    struct CheckboxTree * ct = co->data;

    numIndexes = 0;
    while (indexes[numIndexes] != NEWT_ARG_LAST) numIndexes++;

    if (!ct->itemlist) {
	if (numIndexes > 1) return -1;

    	ct->itemlist = malloc(sizeof(*ct->itemlist));
    	item = ct->itemlist;
	item->prev = NULL;
	item->next = NULL;
    } else {
	curList = ct->itemlist;
	listPtr = &ct->itemlist;

	i = 0;
	index = indexes[i];
	while (i < numIndexes) {
	    item = curList;

	    if (index == NEWT_ARG_APPEND) {
	    	item = NULL;
	    } else {
		while (index && item) 
		    item = item->next, index--;
	    }

	    i++;
	    if (i < numIndexes) {
		curList = item->branch;
		listPtr = &item->branch;
		if (!curList && (i + 1 != numIndexes)) return -1;

		index = indexes[i];
	    }
	}

	if (!curList) { 			/* create a new branch */
	    item = malloc(sizeof(*curList->prev));
	    item->next = item->prev = NULL;
	    *listPtr = item;
	} else if (!item) {			/* append to end */
	    item = curList;
	    while (item->next) item = item->next;
	    item->next = malloc(sizeof(*curList->prev));
	    item->next->prev = item;
	    item = item->next;
	    item->next = NULL;
	} else { 
	    newNode = malloc(sizeof(*newNode));
	    newNode->prev = item->prev;
	    newNode->next = item;

	    if (item->prev) item->prev->next = newNode;
	    item->prev = newNode;
	    item = newNode;
	    if (!item->prev) *listPtr = item;
	}
    }
    	
    item->text = strdup(text);
    item->data = data;
    if (flags & NEWT_FLAG_SELECTED) {
    	item->selected = 1;
    } else {
	item->selected = 0;
    }
    item->flags = flags;
    item->branch = NULL;
    item->depth = numIndexes - 1;

    i = 4 + (3 * item->depth);

    if ((strlen(text) + i + ct->pad) > (size_t)co->width) {
	co->width = strlen(text) + i + ct->pad;
    }

    return 0;
}

static struct items * findItem(struct items * items, const void * data) {
    struct items * i;

    while (items) {
	if (items->data == data) return items;
    	if (items->branch) {
	    i = findItem(items->branch, data);
	    if (i) return i;
	}

	items = items->next;
    }

    return NULL;
}

static void listSelected(struct items * items, int * num, const void ** list, int seqindex) {
    while (items) {
	    if ((seqindex ? items->selected==seqindex : items->selected) && !items->branch)
	    list[(*num)++] = (void *) items->data;
	if (items->branch)
	    listSelected(items->branch, num, list, seqindex);
	items = items->next;
    }
}

const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems)
{
    return newtCheckboxTreeGetMultiSelection(co, numitems, 0);
}

const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum)
{
    struct CheckboxTree * ct;
    const void **retval;
    int seqindex=0;

    if(!co || !numitems) return NULL;

    ct = co->data;
	
    if (seqnum) {
	    while( ct->seq[seqindex] && ( ct->seq[seqindex] != seqnum )) seqindex++;
    } else {
	    seqindex = 0;
    }

    *numitems = countItems(ct->itemlist, (seqindex ? seqindex : COUNT_SELECTED));
    if (!*numitems) return NULL;
    
    retval = malloc(*numitems * sizeof(void *));
    *numitems = 0;
    listSelected(ct->itemlist, numitems, retval, seqindex);

    return retval;
}

newtComponent newtCheckboxTree(int left, int top, int height, int flags) {
	return newtCheckboxTreeMulti(left, top, height, NULL, flags);
}

newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags) {
    newtComponent co;
    struct CheckboxTree * ct;

    co = malloc(sizeof(*co));
    ct = malloc(sizeof(struct CheckboxTree));
    co->callback = NULL;
    co->data = ct;
    co->ops = &ctOps;
    co->takesFocus = 1;
    co->height = height;
    co->width = 0;
    co->isMapped = 0;
    ct->itemlist = NULL;
    ct->firstItem = NULL;
    ct->currItem = NULL;
    ct->flatList = NULL;
	if (seq)
	  ct->seq = strdup(seq);
	else
	  ct->seq = strdup(" *");
    if (flags & NEWT_FLAG_SCROLL) {
	ct->sb = newtVerticalScrollbar(left, top, height,
				       COLORSET_LISTBOX, COLORSET_ACTLISTBOX);
	ct->pad = 2;
    } else {
	ct->sb = NULL;
	ct->pad = 0;
    }
    
    return co;
}

static void ctMapped(newtComponent co, int isMapped) {
    struct CheckboxTree * ct = co->data;

    co->isMapped = isMapped;
    if (ct->sb)
	ct->sb->ops->mapped(ct->sb, isMapped);
}

static void ctPlace(newtComponent co, int newLeft, int newTop) {
    struct CheckboxTree * ct = co->data;

    co->top = newTop;
    co->left = newLeft;

    if (ct->sb)
	ct->sb->ops->place(ct->sb, co->left + co->width - 1, co->top);
}

int ctSetItem(newtComponent co, struct items *item, enum newtFlagsSense sense)
{
    struct CheckboxTree * ct = co->data;
    struct items * currItem;
    struct items * firstItem;
    
    if (!item)
	return 1;
    
    switch(sense) {
	case NEWT_FLAGS_RESET:
	    item->selected = 0;
	    break;
	case NEWT_FLAGS_SET:
	    item->selected = 1;
	    break;
	case NEWT_FLAGS_TOGGLE:
	    if (item->branch)
	      item->selected = !item->selected;
	    else {
		    item->selected++;
		    if (item->selected==strlen(ct->seq))
		      item->selected = 0;
	    }
	    break;
    }

    if (item->branch) {
    	currItem = *ct->currItem;
	firstItem = *ct->firstItem;

    	buildFlatList(co);

    	ct->currItem = ct->flatList;
	while (*ct->currItem != currItem) ct->currItem++;

    	ct->firstItem = ct->flatList;
    	if (ct->flatCount > co->height) {
		struct items ** last = ct->flatList + ct->flatCount - co->height;
		while (*ct->firstItem != firstItem && ct->firstItem != last)
		    ct->firstItem++;
	}
    }

    return 0;
}

static void ctSetItems(struct items *item, int selected)
{
    for (; item; item = item->next) {
	if (!item->branch)
	    item->selected = selected;
	else
	    ctSetItems(item->branch, selected);
    }
}

static void ctDraw(newtComponent co) {
    struct CheckboxTree * ct = co->data;
    struct items ** item; 
    int i, j;
    char * spaces = NULL;
    int currRow = -1;

    if (!co->isMapped) return ;

    if (!ct->firstItem) {
	buildFlatList(co);
	ct->firstItem = ct->currItem = ct->flatList;
    }

    item = ct->firstItem;
    
    i = 0;
    while (*item && i < co->height) {
	newtGotorc(co->top + i, co->left);
	if (*item == *ct->currItem) {
	    SLsmg_set_color(NEWT_COLORSET_ACTLISTBOX);
	    currRow = co->top + i;
	} else
	    SLsmg_set_color(NEWT_COLORSET_LISTBOX);

	for (j = 0; j < (*item)->depth; j++)
	    SLsmg_write_string("   ");

	if ((*item)->branch) {
	    if ((*item)->selected) 
		SLsmg_write_string("<-> ");
	    else
		SLsmg_write_string("<+> ");
	} else {
	    char tmp[5];
	    snprintf(tmp,5,"[%c] ",ct->seq[(*item)->selected]);
	    SLsmg_write_string(tmp);
	}

	SLsmg_write_nstring((*item)->text, co->width - 4 - 
					   (3 * (*item)->depth));
	item++;
	i++;
    }

    /* There could be empty lines left (i.e. if the user closes an expanded
       list which is the last thing in the tree, and whose elements are
       displayed at the bottom of the screen */
    if (i < co->height) {
	spaces = alloca(co->width);
	memset(spaces, ' ', co->width);
	SLsmg_set_color(NEWT_COLORSET_LISTBOX);
    }
    while (i < co->height) {
	newtGotorc(co->top + i, co->left);
	SLsmg_write_nstring(spaces, co->width);
	i++;
    }
    
    if(ct->sb) {
	newtScrollbarSet(ct->sb, ct->currItem - ct->flatList, 
			 ct->flatCount - 1);
	ct->sb->ops->draw(ct->sb);
    }

    newtGotorc(currRow, co->left + 1);
}

static void ctDestroy(newtComponent co) {
    struct CheckboxTree * ct = co->data;
    struct items * item, * nextitem;

    nextitem = item = ct->itemlist;

    while (item != NULL) {
	nextitem = item->next;
	free(item->text);
	free(item);
	item = nextitem;
    }

    free(ct->seq);
    free(ct);
    free(co);
}

struct eventResult ctEvent(newtComponent co, struct event ev) {
    struct CheckboxTree * ct = co->data;
    struct eventResult er;
    struct items ** listEnd, ** lastItem;
    int key, selnum = 1;

    er.result = ER_IGNORED;

    if(ev.when == EV_EARLY || ev.when == EV_LATE) {
	return er;
    }

    switch(ev.event) {
    case EV_KEYPRESS:
	key = ev.u.key;
	if (key == (char) key && key != ' ') {
	    for (selnum = 0; ct->seq[selnum]; selnum++)
	    if (key == ct->seq[selnum])
		break;
	    if (!ct->seq[selnum])
		switch (key) {