diff options
author | Guillem Jover <guillem@debian.org> | 2012-03-21 20:41:26 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2012-03-27 20:10:09 +0200 |
commit | cb059163c2d975c2a3a8ac23cc7900ac325fe20b (patch) | |
tree | 613e7e1095f772bf783972522cbf785b30b7a092 | |
parent | c594b0dc8ae68913e8a391feabc77a7a34d91ce3 (diff) | |
download | dpkg-cb059163c2d975c2a3a8ac23cc7900ac325fe20b.tar.gz |
dselect: Move total_width initialization from derived classes to baselist
-rw-r--r-- | dselect/baselist.cc | 3 | ||||
-rw-r--r-- | dselect/methlist.cc | 4 | ||||
-rw-r--r-- | dselect/pkgdisplay.cc | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/dselect/baselist.cc b/dselect/baselist.cc index 0756a7c12..35c45f300 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -243,6 +243,9 @@ baselist::baselist(keybindings *kb) { nitems= 0; gap_width = 1; + total_width = TOTAL_LIST_WIDTH; + if (total_width < COLS) + total_width = COLS; xmax= -1; list_height=0; info_height=0; diff --git a/dselect/methlist.cc b/dselect/methlist.cc index a4147d347..e6c105425 100644 --- a/dselect/methlist.cc +++ b/dselect/methlist.cc @@ -63,10 +63,6 @@ void methodlist::setwidths() { name_width= 14; name_column= status_width + gap_width; description_column= name_column + name_width + gap_width; - - total_width= TOTAL_LIST_WIDTH; - if (total_width < COLS) - total_width= COLS; description_width= total_width - description_column; } diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc index 4d8a25706..bf1f6aacb 100644 --- a/dselect/pkgdisplay.cc +++ b/dselect/pkgdisplay.cc @@ -181,9 +181,6 @@ void packagelist::setwidths() { internerr("unknown versiondisplayopt %d in setwidths", versiondisplayopt); } - total_width= TOTAL_LIST_WIDTH; - if (total_width < COLS) - total_width= COLS; description_width= total_width - description_column; } |