junk 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. const packagelist::infotype packagelist::helpinfos[]= {
  2. { itr_nonrecursive, itd_mainwelcome },
  3. { itr_recursive, itd_recurwelcome },
  4. { 0, itd_keys },
  5. { 0, itd_explaindisplay },
  6. { 0, 0 }
  7. };
  8. int packagelist::itr_nonrecursive() { return !recursive; }
  9. void packagelist::itd_mainwelcome() {
  10. whatinfovb("main welcome page");
  11. varbuf vb;
  12. vb("This is dselect's main package listing screen.");
  13. if (!readwrite) vb(" (read-only access.)");
  14. vb("\n\n"
  15. "Please press `");
  16. vb(bindings->find("help"));
  17. vb("' repeatedly to show more help, including the list of "
  18. "keystrokes and an explanation of the display; use `");
  19. vb(bindings->find("iscrollon"));
  20. vb("' and `");
  21. vb(bindings->find("iscrollback"));
  22. vb("' to scroll this help screen. Press `");
  23. vb(bindings->find("info"));
  24. vb("' repeatedly to see more information about the highlighted package(s).\n"
  25. "\n");
  26. if (readwrite) {
  27. vb("Move the highlight and use `");
  28. vb(bindings->find("select"));
  29. vb("' and `");
  30. vb(bindings->find("deselect"));
  31. vb("' to select and deselect packages for "
  32. "installation. Press `");
  33. vb(bindings->find("quit"));
  34. vb("' to confirm your changes and quit, or `");
  35. vb(bindings->find("abortnocheck"));
  36. vb("' to abort without making changes.\n"
  37. "\n"
  38. "Deselecting a package that is currently "
  39. "installed will arrange for it to be deinstalled later. If you "
  40. "select a package for purging its configuration files will be "
  41. "deleted when the package is; usually they are kept.\n");
  42. } else {
  43. vb("You do not have read/write access to the package administration "
  44. "area, so you may only examine the state of packages.\n");
  45. }
  46. wordwrapinfo(0,vb.string());
  47. }
  48. void packagelist::itd_explaindisplay() {
  49. whatinfovb("explanation of the display");
  50. varbuf vb;
  51. vb("The top half of the screen shows a list of packages. For each "
  52. "package its status (explained in more detail below), class, "
  53. "section, name and a summary of its description is shown.\n"
  54. "\n"
  55. "In the middle of the screen is a status line containing a description "
  56. "of the status of the currently highlighted package (or a description "
  57. "of which packages are highlighted if this is more than one package).\n"
  58. "\n"
  59. "The bottom half of the screen is used to display more extended "
  60. "information about the highlighed package(s), and for help displays "
  61. "like this one.\n"
  62. "\n"
  63. "The four characters at the start of each package's entry in the list "
  64. "show its status: Error, Installed, Old, Wanted.\n"
  65. "\n"
  66. "`Wanted' is whether it is currently "
  67. "selected or not (ie, its desired state as currently being edited); "
  68. "`Old', immediately to the left of that, gives the desired state before "
  69. "this package list was entered, if different (or a space if not)."
  70. "\n"
  71. "`Installed' shows the package's current actual state on "
  72. "the system; the `Error' column is used to mark packages for which "
  73. "installation or removal errors have occurred.\n");
  74. wordwrapinfo(0,vb.string());
  75. }
  76. void packagelist::itd_recurwelcome() {
  77. whatinfovb("recursive package listing welcome page");
  78. varbuf vb;
  79. vb("Some of the packages you have selected require or recommend "
  80. "the installation of other packages you haven't selected, or "
  81. "some of them conflict with packages you have selected.\n"
  82. "Details of problems for each package are available by pressing `");
  83. vb(bindings->find("info"));
  84. vb("'.\n"
  85. "This sub-list of packages is to allow you to resolve these "
  86. "dependencies and conflicts. You may accept my suggestions "
  87. "about which related packages to select or deselect by pressing `");
  88. vb(bindings->find("quitcheck"));
  89. vb("'.\n"
  90. "\n"
  91. "Alternatively, you can edit the setup I have suggested, or use `");
  92. vb(bindings->find("revertdirect"));
  93. vb("' to reject my suggestions, before using `");
  94. vb(bindings->find("quitcheck"));
  95. vb("'.\n"
  96. "\n"
  97. "For a list of the keys available, consult the keymap "
  98. "help screen (available by pressing `");
  99. vb(bindings->find("help"));
  100. vb("'); see the manual for detailed information.\n"
  101. "\n"
  102. "If you wish to replace a package on which many others depend with "
  103. "a conflicting one you'll probably find it easier to try selecting "
  104. "the new one rather than deselecting the old one first, as doing "
  105. "the latter will cause me to suggest deselecting all that depend on it.");
  106. wordwrapinfo(0,vb.string());
  107. }
  108. void methodlist::kd_info() {
  109. showinghelp=0;
  110. redrawinfo();
  111. }
  112. void methodlist::kd_help() {
  113. if (showinghelp) ifhelpthenkeys= !ifhelpthenkeys;
  114. showinghelp=1;
  115. redrawinfo();
  116. }
  117. void methodlist::itd_welcome() {
  118. whatinfovb("method selection welcome page");
  119. varbuf vb;
  120. vb("This is dselect's access method selection screen.");
  121. vb("\n\n"
  122. "Please press `");
  123. vb(bindings->find("help"));
  124. vb("' to show more help; in particular, you should read the list of "
  125. "keystrokes; use `");
  126. vb(bindings->find("iscrollon"));
  127. vb("' and `");
  128. vb(bindings->find("iscrollback"));
  129. vb("' to scroll this help screen. Press `");
  130. vb(bindings->find("info"));
  131. vb("' to see more information about the highlighted method.\n"
  132. "\n");
  133. vb("Move the highlight and use `");
  134. vb(bindings->find("select-and-quit"));
  135. vb("' to select the highlighted method. Press `");
  136. vb(bindings->find("abort"));
  137. vb("' to abort without changing the access method.\n"
  138. "\n"
  139. "When you have selected the access method you will "
  140. "be prompted for the information it requires to do the "
  141. "installation.\n");
  142. wordwrapinfo(0,vb.string());
  143. }
  144. if (showinghelp)
  145. if (ifhelpthenkeys)
  146. itd_keys();
  147. else
  148. itd_welcome();
  149. else