home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume10 / xrolo / patch1 / xrolo.patch1 < prev   
Encoding:
Text File  |  1990-12-07  |  38.6 KB  |  1,393 lines

  1. *** Imakefile    Thu Nov 15 13:04:24 1990
  2. --- ../v2.2/Imakefile    Fri Nov  9 15:59:45 1990
  3. ***************
  4. *** 14,21 ****
  5.   # patching ol_button.c. see README for details.
  6.   # LOCAL_LIBRARIES = -lxview -lolgx
  7.   
  8.              SRCS = main.c panel.c cards.c popup.c
  9. !            OBJS = main.o panel.o cards.o popup.o
  10.          INCLUDES = -I$$OPENWINHOME/include
  11.           DEFINES = -DSTANDALONE
  12.   
  13. --- 14,22 ----
  14.   # patching ol_button.c. see README for details.
  15.   # LOCAL_LIBRARIES = -lxview -lolgx
  16.   
  17. +         CDEBUGFLAGS = -g
  18.              SRCS = main.c panel.c cards.c popup.c
  19. !            OBJS = main.o panel.o cards.o popup.o 
  20.          INCLUDES = -I$$OPENWINHOME/include
  21.           DEFINES = -DSTANDALONE
  22.   
  23. *** Patchlevel    Thu Nov 15 13:04:26 1990
  24. --- ../v2.2/Patchlevel    Thu Nov 15 13:01:10 1990
  25. ***************
  26. *** 1,4 ****
  27. ! Rolo, release 2.0, patch level 1
  28.   
  29.   Patch 1:
  30.     main.c:
  31. --- 1,27 ----
  32. ! Rolo, release 2.0, patch level 2
  33. ! Patch 2:
  34. !     this version only runs under X and the XView toolkit or
  35. !     OpenWindows version 1.1 and up.
  36. !     Added print button and X resource to set default print command.
  37. !     Fixed problems with selection service.
  38. !     Added file name query panel for Save/Load to/from named file.
  39. !     The old method of using the selection service to enter file
  40. !     names is still supported.  Query Panel only appears if there is
  41. !     no text in the selection service.
  42. !     Added ability to go to selection in list by clicking on the
  43. !     entry and <SHIFT>-click on listbutton.
  44. !     Added capital insensitive search and X resource to set the
  45. !     default search mode.
  46. !     Changed the find button icon.
  47. !     Changed panel layout to be more space efficient.
  48.   
  49.   Patch 1:
  50.     main.c:
  51. *** buttons1.icon    Thu Nov 15 13:04:29 1990
  52. --- ../v2.2/buttons1.icon    Wed Nov  7 10:20:34 1990
  53. ***************
  54. *** 1,34 ****
  55.   /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  56.    */
  57. !     0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
  58. !     0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
  59. !     0xC001,0x8003,0xC000,0x0003,0xC003,0xC003,0xC000,0x0003,
  60. !     0xC007,0xE003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
  61. !     0xC01F,0xF803,0xC000,0x0003,0xC03F,0xFC03,0xC000,0x0003,
  62. !     0xC07F,0xFE03,0xC7FF,0xFFF3,0xC0FF,0xFF03,0xC400,0x0013,
  63. !     0xC1FF,0xFF83,0xC400,0x0013,0xC3FF,0xFFC3,0xC400,0x0013,
  64. !     0xC7FF,0xFFE3,0xC4A1,0x8893,0xCFFF,0xFFF3,0xC4D2,0x4893,
  65. !     0xCFFF,0xFFF3,0xC493,0x8A93,0xCFFF,0xFFF3,0xC492,0x0A93,
  66. !     0xC00F,0xF003,0xC491,0xC513,0xC00F,0xF003,0xC400,0x0013,
  67. !     0xC00F,0xF003,0xC470,0x0713,0xC00F,0xF003,0xC400,0x0013,
  68. !     0xC00F,0xF003,0xC7FF,0xFFF3,0xC00F,0xF003,0xC000,0x0003,
  69. !     0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
  70. !     0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
  71. !     0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
  72. !     0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
  73. !     0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
  74. !     0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
  75. !     0xC00F,0xF003,0xC00F,0xF003,0xC00F,0xF003,0xC030,0x0C03,
  76. !     0xC00F,0xF003,0xC043,0xC203,0xC00F,0xF003,0xC082,0x4103,
  77. !     0xC00F,0xF003,0xC060,0x0603,0xC00F,0xF003,0xC05F,0xFA03,
  78. !     0xC00F,0xF003,0xC040,0x0203,0xC00F,0xF003,0xC04A,0x5203,
  79. !     0xC00F,0xF003,0xC04A,0x5203,0xC00F,0xF003,0xC04A,0x5203,
  80. !     0xCFFF,0xFFF3,0xC04A,0x5203,0xCFFF,0xFFF3,0xC04A,0x5203,
  81. !     0xCFFF,0xFFF3,0xC04A,0x5203,0xC7FF,0xFFE3,0xC04A,0x5203,
  82. !     0xC3FF,0xFFC3,0xC04A,0x5203,0xC1FF,0xFF83,0xC04A,0x5203,
  83. !     0xC0FF,0xFF03,0xC04A,0x5203,0xC07F,0xFE03,0xC04A,0x5203,
  84. !     0xC03F,0xFC03,0xC04A,0x5203,0xC01F,0xF803,0xC04E,0x7203,
  85. !     0xC00F,0xF003,0xC040,0x0203,0xC007,0xE003,0xC060,0x0603,
  86. !     0xC003,0xC003,0xC01F,0xF803,0xC001,0x8003,0xC000,0x0003,
  87. !     0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
  88. !     0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
  89. --- 1,66 ----
  90.   /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  91.    */
  92. !     0x0000,0x0000,0x0000,0x0000,
  93. !     0x0000,0x0000,0x0000,0x0000,
  94. !     0x0000,0x0000,0x0000,0x0000,
  95. !     0x0000,0x0000,0x0000,0x0000,
  96. !     0x0001,0x8000,0x0000,0x0000,
  97. !     0x0003,0xC000,0x0000,0x0000,
  98. !     0x0007,0xE000,0x0000,0x0000,
  99. !     0x000F,0xF000,0x0000,0x0000,
  100. !     0x001F,0xF800,0x0000,0x0000,
  101. !     0x003F,0xFC00,0x0000,0x0000,
  102. !     0x007F,0xFE00,0x07FF,0xFFF0,
  103. !     0x00FF,0xFF00,0x0400,0x0010,
  104. !     0x01FF,0xFF80,0x0400,0x0010,
  105. !     0x03FF,0xFFC0,0x0400,0x0010,
  106. !     0x07FF,0xFFE0,0x04A1,0x8890,
  107. !     0x0FFF,0xFFF0,0x04D2,0x4890,
  108. !     0x0FFF,0xFFF0,0x0493,0x8A90,
  109. !     0x0FFF,0xFFF0,0x0492,0x0A90,
  110. !     0x000F,0xF000,0x0491,0xC510,
  111. !     0x000F,0xF000,0x0400,0x0010,
  112. !     0x000F,0xF000,0x0470,0x0710,
  113. !     0x000F,0xF000,0x0400,0x0010,
  114. !     0x000F,0xF000,0x07FF,0xFFF0,
  115. !     0x000F,0xF000,0x0000,0x0000,
  116. !     0x000F,0xF000,0x0000,0x0000,
  117. !     0x000F,0xF000,0x0000,0x0000,
  118. !     0x000F,0xF000,0x0000,0x0000,
  119. !     0x000F,0xF000,0x0000,0x0000,
  120. !     0x0000,0x0000,0x0000,0x0000,
  121. !     0x0000,0x0000,0x0000,0x0000,
  122. !     0x0000,0x0000,0x0000,0x0000,
  123. !     0x0000,0x0000,0x0000,0x0000,
  124. !     0x0000,0x0000,0x0000,0x0000,
  125. !     0x0000,0x0000,0x0000,0x0000,
  126. !     0x0000,0x0000,0x0000,0x0000,
  127. !     0x0000,0x0000,0x0000,0x0000,
  128. !     0x000F,0xF000,0x000F,0xF000,
  129. !     0x000F,0xF000,0x0030,0x0C00,
  130. !     0x000F,0xF000,0x0043,0xC200,
  131. !     0x000F,0xF000,0x0082,0x4100,
  132. !     0x000F,0xF000,0x0060,0x0600,
  133. !     0x000F,0xF000,0x005F,0xFA00,
  134. !     0x000F,0xF000,0x0040,0x0200,
  135. !     0x000F,0xF000,0x004A,0x5200,
  136. !     0x000F,0xF000,0x004A,0x5200,
  137. !     0x000F,0xF000,0x004A,0x5200,
  138. !     0x0FFF,0xFFF0,0x004A,0x5200,
  139. !     0x0FFF,0xFFF0,0x004A,0x5200,
  140. !     0x0FFF,0xFFF0,0x004A,0x5200,
  141. !     0x07FF,0xFFE0,0x004A,0x5200,
  142. !     0x03FF,0xFFC0,0x004A,0x5200,
  143. !     0x01FF,0xFF80,0x004A,0x5200,
  144. !     0x00FF,0xFF00,0x004A,0x5200,
  145. !     0x007F,0xFE00,0x004A,0x5200,
  146. !     0x003F,0xFC00,0x004A,0x5200,
  147. !     0x001F,0xF800,0x004E,0x7200,
  148. !     0x000F,0xF000,0x0040,0x0200,
  149. !     0x0007,0xE000,0x0060,0x0600,
  150. !     0x0003,0xC000,0x001F,0xF800,
  151. !     0x0001,0x8000,0x0000,0x0000,
  152. !     0x0000,0x0000,0x0000,0x0000,
  153. !     0x0000,0x0000,0x0000,0x0000,
  154. !     0x0000,0x0000,0x0000,0x0000,
  155. !     0x0000,0x0000,0x0000,0x0000
  156. *** buttons2.icon    Thu Nov 15 13:04:29 1990
  157. --- ../v2.2/buttons2.icon    Wed Nov  7 10:37:05 1990
  158. ***************
  159. *** 1,34 ****
  160.   /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  161.    */
  162. !     0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
  163. !     0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
  164. !     0xC000,0x5403,0xC00F,0xE003,0xC000,0xAA03,0xC03F,0xF803,
  165. !     0xC001,0x5103,0xC03F,0xF803,0xC002,0xA083,0xC07F,0xFC03,
  166. !     0xC005,0x4043,0xC07C,0x7C03,0xC00A,0x8023,0xC078,0x3C03,
  167. !     0xC015,0x0013,0xC030,0x3C03,0xC02A,0x0023,0xC000,0x3C03,
  168. !     0xC054,0x0043,0xC000,0x7C03,0xC0A8,0x0083,0xC001,0xF803,
  169. !     0xC054,0x0103,0xC003,0xF003,0xC02A,0x0203,0xC003,0xE003,
  170. !     0xCFFF,0xFFF3,0xC007,0xC003,0xC800,0x0013,0xC007,0x8003,
  171. !     0xC800,0x0013,0xC007,0x8003,0xC80F,0xF013,0xC007,0x8003,
  172. !     0xC808,0x1013,0xC007,0x8003,0xC808,0x1013,0xC003,0x0003,
  173. !     0xC80F,0xF013,0xC000,0x0003,0xC800,0x0013,0xC000,0x0003,
  174. !     0xC810,0x0813,0xC003,0x0003,0xC80F,0xF013,0xC007,0x8003,
  175. !     0xC800,0x0013,0xC007,0x8003,0xCFFF,0xFFF3,0xC003,0x0003,
  176. !     0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
  177. !     0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
  178. !     0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
  179. !     0xE000,0x0007,0xE000,0x0003,0xC000,0x0003,0xC000,0x0003,
  180. !     0xCC00,0x0003,0xC000,0x0003,0xCFFC,0x0003,0xC000,0x0003,
  181. !     0xCF1F,0xFC03,0xCFFF,0xFFC3,0xCF1C,0xE3E3,0xCC00,0x0043,
  182. !     0xCF1C,0xE323,0xCFFF,0xFFE3,0xCCE0,0xE323,0xCE00,0x0023,
  183. !     0xCCE3,0x1F23,0xCFFF,0xFFF3,0xCCE3,0x1CE3,0xCF00,0x0013,
  184. !     0xCF1F,0x1CE3,0xCFFF,0xFFFB,0xCF1C,0xE0E3,0xCF00,0x000B,
  185. !     0xCF1C,0xE323,0xCF00,0x000B,0xCCE0,0xE323,0xCF22,0x010B,
  186. !     0xCCE3,0x1F23,0xCF20,0x3BCB,0xCCE3,0x1CE3,0xCF26,0x410B,
  187. !     0xCF1F,0x1CE3,0xCF22,0x310B,0xCF1C,0xE0E3,0xCF22,0x090B,
  188. !     0xCFFC,0xE323,0xC722,0x70CB,0xCC03,0xFF23,0xC700,0x000B,
  189. !     0xCC00,0x03E3,0xC300,0x000B,0xCC00,0x0003,0xC318,0x018B,
  190. !     0xCC00,0x0003,0xC100,0x000B,0xCC00,0x0003,0xC1FF,0xFFFB,
  191. !     0xCC00,0x0003,0xC000,0x0003,0xCC00,0x0003,0xC000,0x0003,
  192. !     0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
  193. !     0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
  194. --- 1,66 ----
  195.   /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  196.    */
  197. !     0x0000,0x0000,0x0000,0x0000,
  198. !     0x0000,0x0000,0x0000,0x0000,
  199. !     0x0000,0x0000,0x0000,0x0000,
  200. !     0x0000,0x0000,0x0000,0x0000,
  201. !     0x0000,0x5400,0x000F,0xE000,
  202. !     0x0000,0xAA00,0x003F,0xF800,
  203. !     0x0001,0x5100,0x003F,0xF800,
  204. !     0x0002,0xA080,0x007F,0xFC00,
  205. !     0x0005,0x4040,0x007C,0x7C00,
  206. !     0x000A,0x8020,0x0078,0x3C00,
  207. !     0x0015,0x0010,0x0030,0x3C00,
  208. !     0x002A,0x0020,0x0000,0x3C00,
  209. !     0x0054,0x0040,0x0000,0x7C00,
  210. !     0x00A8,0x0080,0x0001,0xF800,
  211. !     0x0054,0x0100,0x0003,0xF000,
  212. !     0x002A,0x0200,0x0003,0xE000,
  213. !     0x0FFF,0xFFF0,0x0007,0xC000,
  214. !     0x0800,0x0010,0x0007,0x8000,
  215. !     0x0800,0x0010,0x0007,0x8000,
  216. !     0x080F,0xF010,0x0007,0x8000,
  217. !     0x0808,0x1010,0x0007,0x8000,
  218. !     0x0808,0x1010,0x0003,0x0000,
  219. !     0x080F,0xF010,0x0000,0x0000,
  220. !     0x0800,0x0010,0x0000,0x0000,
  221. !     0x0810,0x0810,0x0003,0x0000,
  222. !     0x080F,0xF010,0x0007,0x8000,
  223. !     0x0800,0x0010,0x0007,0x8000,
  224. !     0x0FFF,0xFFF0,0x0003,0x0000,
  225. !     0x0000,0x0000,0x0000,0x0000,
  226. !     0x0000,0x0000,0x0000,0x0000,
  227. !     0x0000,0x0000,0x0000,0x0000,
  228. !     0x0000,0x0000,0x0000,0x0000,
  229. !     0x0000,0x0000,0x0000,0x0000,
  230. !     0x0000,0x0000,0x0000,0x0000,
  231. !     0x0000,0x0000,0x0000,0x0000,
  232. !     0x0000,0x0000,0x0000,0x0000,
  233. !     0x0C00,0x0000,0x0000,0x0000,
  234. !     0x0FFC,0x0000,0x0000,0x0000,
  235. !     0x0F1F,0xFC00,0x07FF,0xFFC0,
  236. !     0x0F1C,0xE3E0,0x0400,0x0040,
  237. !     0x0F1C,0xE320,0x07FF,0xFFE0,
  238. !     0x0CE0,0xE320,0x0600,0x0020,
  239. !     0x0CE3,0x1F20,0x07FF,0xFFF0,
  240. !     0x0CE3,0x1CE0,0x0700,0x0010,
  241. !     0x0F1F,0x1CE0,0x07FF,0xFFF8,
  242. !     0x0F1C,0xE0E0,0x0700,0x0008,
  243. !     0x0F1C,0xE320,0x0700,0x0008,
  244. !     0x0CE0,0xE320,0x0722,0x0108,
  245. !     0x0CE3,0x1F20,0x0720,0x3BC8,
  246. !     0x0CE3,0x1CE0,0x0726,0x4108,
  247. !     0x0F1F,0x1CE0,0x0722,0x3108,
  248. !     0x0F1C,0xE0E0,0x0722,0x0908,
  249. !     0x0FFC,0xE320,0x0722,0x70C8,
  250. !     0x0C03,0xFF20,0x0700,0x0008,
  251. !     0x0C00,0x03E0,0x0300,0x0008,
  252. !     0x0C00,0x0000,0x0318,0x0188,
  253. !     0x0C00,0x0000,0x0100,0x0008,
  254. !     0x0C00,0x0000,0x01FF,0xFFF8,
  255. !     0x0C00,0x0000,0x0000,0x0000,
  256. !     0x0C00,0x0000,0x0000,0x0000,
  257. !     0x0000,0x0000,0x0000,0x0000,
  258. !     0x0000,0x0000,0x0000,0x0000,
  259. !     0x0000,0x0000,0x0000,0x0000,
  260. !     0x0000,0x0000,0x0000,0x0000
  261. *** help.h    Thu Nov 15 13:04:31 1990
  262. --- ../v2.2/help.h    Thu Nov 15 13:22:25 1990
  263. ***************
  264. *** 56,62 ****
  265.   on this button deletes the card which is\n\
  266.   currently displayed.  Deleted cards are not\n\
  267.   lost, they are saved on a stack of deleted\n\
  268. ! cards and may be retreived any time before\n\
  269.   Rolo exits.  The alternate selections on the\n\
  270.   menu for the Trash button may be used to\n\
  271.   undelete any card which was previously deleted.\n\
  272. --- 56,62 ----
  273.   on this button deletes the card which is\n\
  274.   currently displayed.  Deleted cards are not\n\
  275.   lost, they are saved on a stack of deleted\n\
  276. ! cards and may be retrieved any time before\n\
  277.   Rolo exits.  The alternate selections on the\n\
  278.   menu for the Trash button may be used to\n\
  279.   undelete any card which was previously deleted.\n\
  280. ***************
  281. *** 92,97 ****
  282. --- 92,101 ----
  283.   your cards.  The card numbers to the left of\n\
  284.   each line can be used to jump directly to that\n\
  285.   card with the slider in the control panel.\n\
  286. + Alternately, the user can click on the \n\
  287. + desired entry followed by a <SHIFT>-click \n\
  288. + on the list button (or use the list button \n\
  289. + menu) to bring up the selected card.\n\
  290.   \n\
  291.   FILE BUTTON\n\
  292.      This button loads and saves your rolodex\n\
  293. ***************
  294. *** 132,137 ****
  295. --- 136,152 ----
  296.   \n",
  297.   
  298.   "\
  299. + PRINT BUTTON\n\
  300. +    This button is used to print. A normal click\n\
  301. + causes Rolo to print the current record. \n\
  302. + Alternate selections will cause Rolo to print\n\
  303. + all the entries in the current sorted order\n\
  304. + or set the print command. The default print\n\
  305. + command is \"lpr\".  A user can customize\n\
  306. + the default printer command by creating an\n\
  307. + X resource entry called\n\
  308. +      \"xrolo.PrintCommand\".\n\
  309. + \n\
  310.   FIND BUTTON\n\
  311.      This button searches for a regular expression\n\
  312.   in your cards.  This can be used to find any\n\
  313. ***************
  314. *** 151,157 ****
  315.   a card, only the text of the card as a whole.\n\
  316.   Note: \"Regular expressions\" are the kind used\n\
  317.   by egrep(1), which are not the same as the\n\
  318. ! shell meta-characters.\n\
  319.   \n\
  320.   SLIDER\n\
  321.      The slider item on the control panel may\n\
  322. --- 166,179 ----
  323.   a card, only the text of the card as a whole.\n\
  324.   Note: \"Regular expressions\" are the kind used\n\
  325.   by egrep(1), which are not the same as the\n\
  326. ! shell meta-characters. By default xrolo will\n\
  327. ! do a case insensitive (or \"sloppy\") regular\n\
  328. ! regular expression search.  The deafult search\n\
  329. ! mode may be changed by selecting \"Egrep Regex\n\
  330. ! Match\" from the find menu or by setting the X\n\
  331. ! resource \n\
  332. !     xrolo.SloppyRegexMatch\n\
  333. ! to 1 or 0\n\
  334.   \n\
  335.   SLIDER\n\
  336.      The slider item on the control panel may\n\
  337. ***************
  338. *** 159,165 ****
  339.   drag the bar back and forth until the number\n\
  340.   of the card you wish to see is displayed to\n\
  341.   the left of the slider, then release the\n\
  342. ! mouse button.\n\
  343.   \n\
  344.   \n",
  345.   
  346. --- 181,189 ----
  347.   drag the bar back and forth until the number\n\
  348.   of the card you wish to see is displayed to\n\
  349.   the left of the slider, then release the\n\
  350. ! mouse button. Alternately, the record number\n\
  351. ! may be entered directly by typing in the\n\
  352. ! current record field\n\
  353.   \n\
  354.   \n",
  355.   
  356. ***************
  357. *** 170,175 ****
  358. --- 194,202 ----
  359.   \n\
  360.      March  1987, version 1.0\n\
  361.      August 1988, version 2.0\n\
  362. + \n\
  363. +    Ported to OpenWindows by  Luis Soltero\n\
  364. +    (luis@rice.edu) November 1990\n\
  365.   \n\
  366.      Thanks to S. Page (spage@sun.com) and\n\
  367.   Mike Ekberg (mae@sun.com) at Sun for changes\n\
  368. *** main.c    Thu Nov 15 13:04:32 1990
  369. --- ../v2.2/main.c    Thu Nov  8 17:24:57 1990
  370. ***************
  371. *** 140,145 ****
  372. --- 140,148 ----
  373.           TEXTSW_CONTENTS,    "Rolo - by Ron Hitchens",
  374.           0);
  375.   
  376. +     /* clear the X cut buffer */
  377. +     textsw_set_selection(rolocard, 0, 0, 1);
  378.       window_fit (frame);
  379.   
  380.       p = check_args (argc, argv);
  381. *** panel.c    Thu Nov 15 13:04:42 1990
  382. --- ../v2.2/panel.c    Thu Nov 15 12:40:52 1990
  383. ***************
  384. *** 40,47 ****
  385. --- 40,49 ----
  386.   #include <xview/panel.h>
  387.   #include <xview/textsw.h>
  388.   #include <xview/seln.h>
  389. + #include <xview/notice.h>
  390.   #include <sys/param.h>
  391.   #include <ctype.h>
  392. + #include <alloca.h>
  393.   
  394.   #include "defs.h"
  395.   #include "help.h"
  396. ***************
  397. *** 104,114 ****
  398.   
  399.     done_button (), done_n_save(), done_n_save_exit(), done_n_exit(),
  400.     find_button (), find_button_forward(), find_button_reverse(),
  401.   
  402. ! list_button (), help_button (),
  403.     slider_proc (), button_event(), goto_card (),
  404.     no_comprendo ();
  405.   
  406.   static char        *get_selection ();
  407.   
  408.   
  409. --- 106,120 ----
  410.   
  411.     done_button (), done_n_save(), done_n_save_exit(), done_n_exit(),
  412.     find_button (), find_button_forward(), find_button_reverse(),
  413. +   turn_on_sloppy(), turn_off_sloppy(),
  414.   
  415. !   print_button(), print_entry(), print_all(), set_print_command(),
  416. !   list_button_main(), list_goto_button(), list_button (), help_button (),
  417.     slider_proc (), button_event(), goto_card (),
  418.     no_comprendo ();
  419.   
  420. + static Menu_item list_menu, find_menu;
  421.   static char        *get_selection ();
  422.   
  423.   
  424. ***************
  425. *** 117,122 ****
  426. --- 123,136 ----
  427.   #include "buttons1.icon"
  428.   };
  429.   
  430. + static u_short printer_image[] = {
  431. + #include "print.icon"   
  432. + };
  433. + static u_short find_image[] = {
  434. + #include "find.icon"
  435. + };
  436.   /* drawer (file), "?" (help), flag (finished) and list */
  437.   static u_short        buttons2_image [] = {
  438.   #include "buttons2.icon"
  439. ***************
  440. *** 166,175 ****
  441.   
  442.       frame = _frame;
  443.       panel = xv_create (frame, PANEL,
  444. !         PANEL_LAYOUT,        PANEL_HORIZONTAL,
  445. ! /*        PANEL_EVENT_PROC,    button_event, */
  446. !         PANEL_ITEM_X_GAP,    10,
  447. !         PANEL_ITEM_Y_GAP,    9,
  448.           0);
  449.   
  450.       /* 1st row */
  451. --- 180,188 ----
  452.   
  453.       frame = _frame;
  454.       panel = xv_create (frame, PANEL,
  455. !                        PANEL_LAYOUT, PANEL_HORIZONTAL,
  456. !                        WIN_COLUMN_GAP, 15,
  457. !                        WIN_ROW_GAP, 25,
  458.           0);
  459.   
  460.       /* 1st row */
  461. ***************
  462. *** 195,200 ****
  463. --- 208,214 ----
  464.           PANEL_LABEL_IMAGE,    pr_region(buttons1_image, 64, 0, 0, 32, 32),
  465.           PANEL_ITEM_MENU,    tmpmenu,
  466.           PANEL_NOTIFY_PROC,    prev_button,
  467. +         XV_Y, xv_row(panel, 0),
  468.           0);
  469.   
  470.       tmpmenu = menu_create (
  471. ***************
  472. *** 205,210 ****
  473. --- 219,225 ----
  474.           PANEL_LABEL_IMAGE,    pr_region (buttons1_image, 64, 32, 0, 32, 32),
  475.           PANEL_ITEM_MENU,    tmpmenu,
  476.           PANEL_NOTIFY_PROC,    new_button,
  477. +         XV_Y, xv_row(panel, 0),
  478.           0);
  479.   
  480.       tmpmenu =  xv_create (NULL, MENU,
  481. ***************
  482. *** 237,250 ****
  483.           PANEL_LABEL_IMAGE,    pr_region (buttons1_image, 64, 32, 32, 32, 32),
  484.           PANEL_ITEM_MENU, tmpmenu,
  485.           PANEL_NOTIFY_PROC,    delete_button,
  486.           0);
  487.   
  488. !     tmpmenu = menu_create (
  489.                              MENU_ACTION_ITEM, "Show Index List of Cards",  list_button,
  490.                              NULL);
  491.       (void) xv_create (panel, PANEL_BUTTON,
  492.           PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 32, 32, 32, 32),
  493. !         PANEL_ITEM_MENU,    tmpmenu,
  494.           0);
  495.   
  496.       tmpmenu = menu_create (
  497. --- 252,275 ----
  498.           PANEL_LABEL_IMAGE,    pr_region (buttons1_image, 64, 32, 32, 32, 32),
  499.           PANEL_ITEM_MENU, tmpmenu,
  500.           PANEL_NOTIFY_PROC,    delete_button,
  501. +         XV_Y, xv_row(panel, 0),
  502.           0);
  503.   
  504. !     list_menu = menu_create (
  505.                              MENU_ACTION_ITEM, "Show Index List of Cards",  list_button,
  506. +                             
  507. +                             MENU_ITEM,
  508. +                             MENU_STRING, "(S) Go to Selected Entry",
  509. +                             MENU_NOTIFY_PROC, list_goto_button,
  510. +                             MENU_INACTIVE, TRUE,
  511. +                             NULL,
  512.                              NULL);
  513.       (void) xv_create (panel, PANEL_BUTTON,
  514.           PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 32, 32, 32, 32),
  515. !         PANEL_ITEM_MENU,    list_menu,
  516. !         PANEL_NOTIFY_PROC, list_button_main,
  517. !         XV_Y, xv_row(panel, 0),
  518.           0);
  519.   
  520.       tmpmenu = menu_create (
  521. ***************
  522. *** 274,283 ****
  523.                              NULL);
  524.   
  525.       (void) xv_create (panel, PANEL_BUTTON,
  526. !         PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 0, 0, 32, 32),
  527. !         PANEL_NOTIFY_PROC,    file_button,
  528. !         PANEL_ITEM_MENU, tmpmenu,
  529. !         0);
  530.   
  531.       tmpmenu = menu_create (
  532.                              MENU_ACTION_ITEM, "Display Help Message", help_button, 
  533. --- 299,310 ----
  534.                              NULL);
  535.   
  536.       (void) xv_create (panel, PANEL_BUTTON,
  537. !                       PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 0, 0, 32, 32),
  538. !                       PANEL_NOTIFY_PROC,    file_button,
  539. !                       PANEL_ITEM_MENU, tmpmenu,
  540. !                       XV_X, xv_col(panel, 0),
  541. !                       XV_Y, xv_row(panel, 1),
  542. !                       0);
  543.   
  544.       tmpmenu = menu_create (
  545.                              MENU_ACTION_ITEM, "Display Help Message", help_button, 
  546. ***************
  547. *** 286,291 ****
  548. --- 313,319 ----
  549.       (void) xv_create (panel, PANEL_BUTTON,
  550.           PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 32, 0, 32, 32),
  551.           PANEL_ITEM_MENU,    tmpmenu,
  552. +         XV_Y, xv_row(panel, 1),
  553.           0);
  554.   
  555.       tmpmenu = menu_create (
  556. ***************
  557. *** 305,312 ****
  558. --- 333,367 ----
  559.           PANEL_LABEL_IMAGE,    pr_region(buttons2_image, 64, 0, 32, 32, 32),
  560.           PANEL_NOTIFY_PROC,    done_button,
  561.           PANEL_ITEM_MENU,    tmpmenu,
  562. +         XV_Y, xv_row(panel, 1),
  563.           0);
  564.   
  565. +     tmpmenu = menu_create(
  566. +                           MENU_ACTION_ITEM, 
  567. +                           "Print Entry",
  568. +                           print_entry,
  569. +                           MENU_ACTION_ITEM, 
  570. +                           "Print All",
  571. +                           print_all,
  572. +                           MENU_ACTION_ITEM,
  573. +                           "Set Print Command",
  574. +                           set_print_command,
  575. +                           NULL);
  576. +     (void) xv_create(panel, PANEL_BUTTON,
  577. +                      PANEL_LABEL_IMAGE, xv_create(NULL, SERVER_IMAGE,
  578. +                                                   XV_WIDTH, 32,
  579. +                                                   XV_HEIGHT, 32,
  580. +                                                   SERVER_IMAGE_BITS,
  581. +                                                   printer_image,
  582. +                                                   NULL),
  583. +                      PANEL_NOTIFY_PROC, print_button,
  584. +                      PANEL_ITEM_MENU, tmpmenu,
  585. +                      XV_Y, xv_row(panel, 1),
  586. +                      NULL);
  587.       /*
  588.        * Tighten up the window around the buttons in the first row, this
  589.        * will be the width of the panel window, so we save that size for
  590. ***************
  591. *** 323,351 ****
  592.        */
  593.       xv_set (panel, PANEL_ITEM_X_GAP, 8, 0);
  594.   
  595. !     tmpmenu = menu_create (
  596. !                            MENU_ACTION_ITEM,
  597. !                            "    Find Regular Expression, Forward",
  598. !                            find_button_forward,
  599.                              
  600. !                            MENU_ACTION_ITEM,
  601. !                            "(S) Find Regular Expression, Reverse", 
  602. !                            find_button_reverse, 
  603.                              NULL);
  604.   
  605.       (void) xv_create (panel, PANEL_BUTTON,
  606. !         PANEL_LABEL_STRING, "Find", 
  607. !         PANEL_ITEM_MENU,    tmpmenu, 
  608. !         PANEL_NOTIFY_PROC,    find_button,
  609. !         0);
  610.   
  611.       regex_item = xv_create (panel, PANEL_TEXT,
  612. !         PANEL_BLINK_CARET,        TRUE,
  613. !         PANEL_LABEL_STRING,        "",
  614. !         PANEL_VALUE_DISPLAY_LENGTH,    panel_columns - 10,
  615. !         PANEL_VALUE_STORED_LENGTH,    80,
  616. !         PANEL_NOTIFY_PROC,    find_button,
  617. !         0);
  618.   
  619.       /*
  620.        * Begin the third row, squeeze the inter-item gap back down so that
  621. --- 378,450 ----
  622.        */
  623.       xv_set (panel, PANEL_ITEM_X_GAP, 8, 0);
  624.   
  625. ! #define SLOPPY_EXPR_STR      "Sloppy Regex Match"
  626. ! #define EGREP_EXPR_STR      "Egrep(1) Regex Match"
  627. !     tmpmenu = menu_create(
  628. !                           MENU_ITEM,
  629. !                           MENU_STRING,
  630. !                           SLOPPY_EXPR_STR,
  631. !                           MENU_NOTIFY_PROC,
  632. !                           turn_on_sloppy,
  633. !                           NULL,
  634. !                           
  635. !                           MENU_ITEM,
  636. !                           MENU_STRING,
  637. !                           EGREP_EXPR_STR,
  638. !                           MENU_NOTIFY_PROC,
  639. !                           turn_off_sloppy,
  640. !                           NULL,
  641. !                           NULL);
  642. !     find_menu = menu_create (
  643. !                              MENU_ACTION_ITEM,
  644. !                              "    Find Regular Expression, Forward",
  645. !                              find_button_forward,
  646.                              
  647. !                              MENU_ACTION_ITEM,
  648. !                              "(S) Find Regular Expression, Reverse", 
  649. !                              find_button_reverse, 
  650. !                              
  651. !                              MENU_CLIENT_DATA, 
  652. !                              defaults_get_integer("xrolo.sloppyregexmatch",
  653. !                                                   "xrolo.SloppyRegexMatch",
  654. !                                                   1), /* sloppy regex by */
  655. !                                                       /* default */
  656. !                              MENU_ITEM,
  657. !                              MENU_STRING, 
  658. !                              defaults_get_integer("xrolo.sloppyregexmatch",
  659. !                                                   "xrolo.SloppyRegexMatch",
  660. !                                                   1) 
  661. !                              ? SLOPPY_EXPR_STR : EGREP_EXPR_STR,
  662. !                              MENU_CLIENT_DATA, 1, 
  663. !                              MENU_PULLRIGHT, tmpmenu,
  664. !                              NULL,
  665. !                            
  666.                              NULL);
  667.   
  668.       (void) xv_create (panel, PANEL_BUTTON,
  669. !                       PANEL_LABEL_IMAGE, xv_create(NULL, SERVER_IMAGE,
  670. !                                                    XV_WIDTH, 32,
  671. !                                                    XV_HEIGHT, 32,
  672. !                                                    SERVER_IMAGE_BITS,
  673. !                                                    find_image,
  674. !                                                    NULL),
  675. !                       PANEL_ITEM_MENU,    find_menu, 
  676. !                       PANEL_NOTIFY_PROC,    find_button,
  677. !                       NULL);
  678.   
  679.       regex_item = xv_create (panel, PANEL_TEXT,
  680. !                             PANEL_BLINK_CARET,        TRUE,
  681. !                             PANEL_LABEL_STRING,        "Find Expression:",
  682. !                             PANEL_VALUE_DISPLAY_LENGTH,    panel_width - 344,
  683. !                             XV_X, xv_col(panel, 0),
  684. !                             XV_Y, xv_row(panel, 2),
  685. !                             PANEL_VALUE_STORED_LENGTH,    80,
  686. !                             PANEL_NOTIFY_PROC,    find_button,
  687. !                             0);
  688.   
  689.       /*
  690.        * Begin the third row, squeeze the inter-item gap back down so that
  691. ***************
  692. *** 361,377 ****
  693.                   0);
  694.   
  695.       slider_item = xv_create (panel, PANEL_SLIDER,
  696. !         PANEL_MIN_VALUE,    0,
  697. !         PANEL_MAX_VALUE,    1,
  698. !         PANEL_VALUE,        1,
  699. !         /* This slider width is temp, recomputed later */
  700. !         PANEL_SLIDER_WIDTH, 500,
  701. !         PANEL_SHOW_RANGE,    FALSE,
  702. !         PANEL_SHOW_VALUE,    TRUE,
  703. !         PANEL_NOTIFY_LEVEL,    PANEL_DONE,
  704. !         PANEL_NOTIFY_PROC,    slider_proc,
  705. !         PANEL_ITEM_MENU, tmpmenu,
  706. !         0);
  707.   
  708.       /*
  709.        * Adjust the position of the text item slightly for better aesthetic
  710. --- 460,475 ----
  711.                   0);
  712.   
  713.       slider_item = xv_create (panel, PANEL_SLIDER,
  714. !                              PANEL_MIN_VALUE,    0,
  715. !                              PANEL_MAX_VALUE,    1,
  716. !                              PANEL_VALUE,        1,
  717. !                              PANEL_SLIDER_WIDTH, panel_width - 80, 
  718. !                              PANEL_SHOW_RANGE,    FALSE,
  719. !                              PANEL_SHOW_VALUE,    TRUE,
  720. !                              PANEL_NOTIFY_LEVEL,    PANEL_DONE,
  721. !                              PANEL_NOTIFY_PROC,    slider_proc,
  722. !                              PANEL_ITEM_MENU, tmpmenu,
  723. !                              0);
  724.   
  725.       /*
  726.        * Adjust the position of the text item slightly for better aesthetic
  727. ***************
  728. *** 757,762 ****
  729. --- 855,920 ----
  730.       need_save = TRUE;
  731.   }
  732.   
  733. + static Frame file_frame;
  734. + static Panel file_panel;
  735. + static Panel_item file_item;
  736. + static char FileName[256];
  737. + static int FileLoad;
  738. + static void file_ok_proc()
  739. + {
  740. +     strcpy(FileName, xv_get(file_item, PANEL_VALUE));
  741. +     xv_set(file_frame, WIN_SHOW, FALSE, NULL);
  742. +     FileLoad ? do_read_rolo(FileName) : do_write_rolo(FileName);
  743. + }
  744. + static void file_cancel_proc()
  745. + {
  746. +     xv_set(file_frame, WIN_SHOW, FALSE, NULL);
  747. + }
  748. + static void do_create_file_frame(item, event)
  749. + Panel_item item;
  750. + Event      *event;
  751. + {
  752. +     file_frame = xv_create(frame, FRAME,
  753. +                             XV_LABEL, "Set File Name",
  754. +                             FRAME_SHOW_LABEL, TRUE,
  755. +                             NULL);
  756. +     file_panel = xv_create(file_frame, PANEL, NULL);
  757. +     file_item = xv_create(file_panel, PANEL_TEXT,
  758. +                              XV_X, 4,
  759. +                              XV_Y, 4,
  760. +                              PANEL_LABEL_STRING, "File Name:", 
  761. +                              PANEL_VALUE_STORED_LENGTH, 256,
  762. +                              PANEL_VALUE_DISPLAY_LENGTH, 40,
  763. +                              NULL);
  764. +     xv_create(file_panel, PANEL_BUTTON,
  765. +               PANEL_LABEL_STRING, "   OK   ",
  766. +               XV_X, 450,
  767. +               XV_Y, 4,
  768. +               PANEL_NOTIFY_PROC, file_ok_proc,
  769. +               NULL);
  770. +     xv_create(file_panel, PANEL_BUTTON,
  771. +               PANEL_LABEL_STRING, "Cancel",
  772. +               XV_X, 450,
  773. +               XV_Y, 35,
  774. +               PANEL_NOTIFY_PROC, file_cancel_proc,
  775. +               NULL);
  776. +     window_fit(file_panel);
  777. +     window_fit(file_frame);
  778. + }
  779. + static void get_file_name(fileload)
  780. + int fileload;
  781. + {
  782. +     static int firsttime = 1;
  783. +     if (firsttime) {
  784. +         do_create_file_frame();
  785. +         firsttime = 0;
  786. +     }
  787. +     FileLoad = fileload;
  788. +     xv_set(file_frame, WIN_SHOW, TRUE, NULL);
  789. + }
  790.   static void file_button_load (item, event)
  791.   Panel_item    item;
  792.   Event        *event;
  793. ***************
  794. *** 768,777 ****
  795.       }
  796.       save_card (current);
  797.       filename = get_selection ();
  798. !     if (filename == NULL) {
  799.           msg ("No active selection, need a filename to load from");
  800.           return;
  801.       }
  802.       if (filename_ok (filename) == FALSE) {
  803.           return;
  804.       }
  805. --- 926,948 ----
  806.       }
  807.       save_card (current);
  808.       filename = get_selection ();
  809. !     if ( filename == NULL ) {
  810. !         get_file_name(1);
  811. !         return;
  812. !     } else if ( !confirm("Load from file %s?", filename) ) {
  813. !         return;
  814. !     }
  815. !     
  816. !     if (filename == NULL || filename[0] == '\0' ) {
  817.           msg ("No active selection, need a filename to load from");
  818.           return;
  819.       }
  820. +     do_read_rolo(filename);
  821. + }
  822. + do_read_rolo(filename)
  823. + char *filename;
  824. + {
  825.       if (filename_ok (filename) == FALSE) {
  826.           return;
  827.       }
  828. ***************
  829. *** 781,786 ****
  830. --- 952,965 ----
  831.       read_rolo (filename);
  832.   }
  833.   
  834. + do_write_rolo(filename)
  835. + char *filename;
  836. + {
  837. +     if (filename_ok (filename) == FALSE) {
  838. +         return;
  839. +     }
  840. +     write_rolo (filename);
  841. + }
  842.   static void file_button_save_to_file (item, event)
  843.   Panel_item    item;
  844.   Event        *event;
  845. ***************
  846. *** 792,805 ****
  847.       }
  848.       save_card (current);
  849.       filename = get_selection ();
  850. !     if (filename == NULL) {
  851. !         msg ("No active selection, need a filename to save to");
  852.           return;
  853.       }
  854. !     if (filename_ok (filename) == FALSE) {
  855.           return;
  856.       }
  857. !     write_rolo (filename);
  858.   }
  859.   
  860.   /*ARGSUSED*/
  861. --- 971,987 ----
  862.       }
  863.       save_card (current);
  864.       filename = get_selection ();
  865. !     if (filename == NULL ) {
  866. !         get_file_name(0);
  867.           return;
  868. +     } else if ( !confirm("Save to file %s?", filename) ) {
  869. +         return;
  870.       }
  871. !     if (filename == NULL || filename[0] == '\0' ) {
  872. !         msg ("No active selection, need a filename to save to");
  873.           return;
  874.       }
  875. !     do_write_rolo(filename);
  876.   }
  877.   
  878.   /*ARGSUSED*/
  879. ***************
  880. *** 925,930 ****
  881. --- 1107,1214 ----
  882.   
  883.   
  884.   /*
  885. +  * Notification proc for print.
  886. +  */
  887. + static char Print_Command[256] = "lpr";
  888. + static int First_Print_Call = 1;
  889. + get_print_resource()
  890. + {
  891. +     strcpy(Print_Command, 
  892. +            defaults_get_string("xrolo.printcommand","xrolo.PrintCommand", Print_Command));
  893. +     First_Print_Call = 0;
  894. + }
  895. + static void print_button(item, event)
  896. + Panel_item item;
  897. + Event      *event;
  898. + {
  899. + }
  900. + static void print_entry(item, event)
  901. + Panel_item item;
  902. + Event      *event;
  903. + {
  904. +     FILE *fp = popen(Print_Command, "w");
  905. +     if (First_Print_Call)
  906. +       get_print_resource();
  907. +     save_card(current);
  908. +     fprintf(fp, "%s\n", current->c_text);
  909. +     pclose(fp);
  910. + }
  911. + static void print_all(item, event)
  912. + Panel_item item;
  913. + Event      *event;
  914. + {
  915. +     struct card *p;
  916. +     int i;
  917. +     FILE *fp = popen(Print_Command, "w");
  918. +     if (First_Print_Call)
  919. +       get_print_resource();
  920. +     save_card(current);
  921. +     for (p = first, i =0; p != NULL_CARD; i++, p=p->c_next)
  922. +       fprintf(fp, "Record # %d \n%s\n\n", i, p->c_text);
  923. +     pclose(fp);
  924. + }
  925. + static Frame print_frame;
  926. + static Panel print_panel;
  927. + static Panel_item Command_item;
  928. + static void ok_proc()
  929. + {
  930. +     strcpy(Print_Command, xv_get(Command_item,PANEL_VALUE));
  931. +     xv_set(print_frame, WIN_SHOW, FALSE, NULL);
  932. + }
  933. + static void cancel_proc()
  934. + {
  935. +     xv_set(print_frame, WIN_SHOW, FALSE, NULL);
  936. + }
  937. + static void set_print_command(item, event)
  938. + Panel_item item;
  939. + Event      *event;
  940. + {
  941. +     static int firsttime = 1;
  942. +     if ( firsttime ) {
  943. +         firsttime = 0;
  944. +         if (First_Print_Call)
  945. +           get_print_resource();
  946. +         print_frame = xv_create(frame, FRAME,
  947. +                                 XV_LABEL, "Set Print Command",
  948. +                                 FRAME_SHOW_LABEL, TRUE,
  949. +                                 NULL);
  950. +         print_panel = xv_create(print_frame, PANEL, NULL);
  951. +         Command_item = xv_create(print_panel, PANEL_TEXT,
  952. +                                  XV_X, 4,
  953. +                                  XV_Y, 4,
  954. +                                  PANEL_LABEL_STRING, "Print Command:", 
  955. +                                  PANEL_VALUE, Print_Command,
  956. +                                  PANEL_VALUE_STORED_LENGTH, 256,
  957. +                                  PANEL_VALUE_DISPLAY_LENGTH, 40,
  958. +                                  NULL);
  959. +         xv_create(print_panel, PANEL_BUTTON,
  960. +                   PANEL_LABEL_STRING, "   OK   ",
  961. +                   XV_X, 450,
  962. +                   XV_Y, 4,
  963. +                   PANEL_NOTIFY_PROC, ok_proc,
  964. +                   NULL);
  965. +         xv_create(print_panel, PANEL_BUTTON,
  966. +                   PANEL_LABEL_STRING, "Cancel",
  967. +                   XV_X, 450,
  968. +                   XV_Y, 35,
  969. +                   PANEL_NOTIFY_PROC, cancel_proc,
  970. +                   NULL);
  971. +         window_fit(print_panel);
  972. +         window_fit(print_frame);
  973. +     }
  974. +     xv_set(Command_item, PANEL_VALUE, Print_Command);
  975. +     xv_set(print_frame, WIN_SHOW, TRUE, 0);
  976. + }
  977. + /*
  978.    *    Notification proc for both the "Find" button and text item for
  979.    *    the search pattern.  This proc will be called from the pattern item
  980.    *    if you type return.  If this proc is called, and there is an active
  981. ***************
  982. *** 931,936 ****
  983. --- 1215,1240 ----
  984.    *    selection, that will be used as the search pattern.  The selection
  985.    *    will also be inserted into the pattern item if it is currently empty.
  986.    */
  987. + static void to_sloppy(str)
  988. + char *str;
  989. + {
  990. +     char tmpstr[MAX_SELN_LEN];
  991. +     char *ptr1 = str;
  992. +     char *ptr2 = tmpstr;
  993. +     while ( *ptr1 != '\0' ) {
  994. +         if ( isalpha(*ptr1) ) {
  995. +             *ptr2++ = '[';
  996. +             *ptr2++ = isupper(*ptr1) ? 
  997. +               tolower(*ptr1) : toupper(*ptr1);
  998. +             *ptr2++ = *ptr1++;
  999. +             *ptr2++ = ']';
  1000. +         } else {
  1001. +             *ptr2++ = *ptr1++;
  1002. +         }
  1003. +     }
  1004. +     *ptr2 ='\0';
  1005. +     strcpy(str, tmpstr);
  1006. + }
  1007.   
  1008.   static  int in_find_button;
  1009.   static    char    *e, regbuf [MAX_SELN_LEN];
  1010. ***************
  1011. *** 938,943 ****
  1012. --- 1242,1249 ----
  1013.   init_find_button()
  1014.   {
  1015.       static        int bozo = 0;
  1016. +     int sloppy;
  1017.       save_card (current);
  1018.   
  1019.       /* if selection active, use it */
  1020. ***************
  1021. *** 954,959 ****
  1022. --- 1260,1268 ----
  1023.           (void) strcpy (regbuf, (char *) xv_get(regex_item, PANEL_VALUE));
  1024.       }
  1025.   
  1026. +     /* clear the X cut buffer */
  1027. +     textsw_set_selection(rolocard, 0, 0, 1);
  1028.       if (strlen (regbuf) == 0) {
  1029.           if (bozo) {
  1030.               msg ("Enter an expression to search for");
  1031. ***************
  1032. *** 965,970 ****
  1033. --- 1274,1284 ----
  1034.       }
  1035.   
  1036.       bozo = 0;
  1037. +     sloppy = xv_get(find_menu, MENU_CLIENT_DATA);
  1038. +     if ( sloppy ) {
  1039. +         to_sloppy(regbuf);
  1040. +     }
  1041.       e = re_comp (regbuf);
  1042.       if (e != NULL) {
  1043.           msg ("Regular Expression error: %s", e);
  1044. ***************
  1045. *** 1029,1055 ****
  1046.   
  1047.       if (value_from_mask(event) == SHIFT_CLICK) {        /* search backwards */
  1048.           find_button_reverse(item,event);
  1049. !     } else {
  1050. !         find_button_forward(item,event);
  1051.       }
  1052. -     in_find_button = 1;
  1053.   }
  1054.   
  1055.   
  1056.   /*
  1057.    *    Notification proc for the "List" button.  The text window is used
  1058.    *    to display the first non-blank line of each card.
  1059.    */
  1060.   
  1061.   /*ARGSUSED*/
  1062. ! static
  1063. ! void
  1064. ! list_button (item, event)
  1065.       Panel_item    item;
  1066.       Event        *event;
  1067.   {
  1068.       struct card     *p;
  1069.   
  1070.       save_card (current);            /* save off pending changes */
  1071.   
  1072.       textsw_reset (rolocard, 0, 0);        /* clear the text window */
  1073. --- 1343,1426 ----
  1074.   
  1075.       if (value_from_mask(event) == SHIFT_CLICK) {        /* search backwards */
  1076.           find_button_reverse(item,event);
  1077. !         in_find_button = 1;
  1078.       }
  1079.   }
  1080.   
  1081. + static void turn_on_sloppy(item, event)
  1082. + Panel_item    item;
  1083. + Event        *event;
  1084. + {
  1085. +     Menu_item find_item = xv_find(find_menu, MENUITEM, 
  1086. +                                   MENU_CLIENT_DATA, 1, NULL);
  1087. +     if ( find_item == NULL ) {
  1088. +         confirm("turn_on_sloppy: Bad news!");
  1089. +         return;
  1090. +     }
  1091. +     xv_set(find_item, MENU_STRING, SLOPPY_EXPR_STR, NULL);
  1092. +     xv_set(find_menu, MENU_CLIENT_DATA, 1);
  1093. + }
  1094.   
  1095. + static void turn_off_sloppy(item, event)
  1096. + Panel_item    item;
  1097. + Event        *event;
  1098. + {
  1099. +     Menu_item find_item = xv_find(find_menu, MENUITEM, 
  1100. +                                   MENU_CLIENT_DATA, 1, NULL);
  1101. +     if ( find_item == NULL ) {
  1102. +         confirm("turn_off_sloppy: Bad news!");
  1103. +         return;
  1104. +     }
  1105. +     xv_set(find_item, MENU_STRING, EGREP_EXPR_STR, NULL);
  1106. +     xv_set(find_menu, MENU_CLIENT_DATA, 0);
  1107. + }
  1108.   /*
  1109.    *    Notification proc for the "List" button.  The text window is used
  1110.    *    to display the first non-blank line of each card.
  1111.    */
  1112.   
  1113. + static void (*def_notify_proc)() = NULL; 
  1114. + static int in_list_button;
  1115. + static void list_button_main(item, event)
  1116. + Panel_item item;
  1117. + Event *event;
  1118. + {
  1119. +     Menu_item  list_item = xv_find(list_menu, MENUITEM, 
  1120. +                              MENU_NOTIFY_PROC, list_goto_button, NULL);
  1121. +     if (event_action(event) == ACTION_MENU )
  1122. +       return;
  1123. +     if (value_from_mask (event) == SHIFT_CLICK ) {
  1124. +         if (xv_get(list_item, MENU_INACTIVE) == FALSE) {
  1125. +             list_goto_button(item, event);
  1126. +             in_list_button = 1;
  1127. +             return;
  1128. +         }
  1129. +     }
  1130. + }
  1131.   /*ARGSUSED*/
  1132. ! static void list_button (item, event)
  1133.       Panel_item    item;
  1134.       Event        *event;
  1135.   {
  1136.       struct card     *p;
  1137. +     void notify_proc();
  1138. +     Menu_item list_item;
  1139.   
  1140. +     if (in_list_button || def_notify_proc != NULL) {
  1141. +         in_list_button = 0;
  1142. +         return;
  1143. +     }
  1144. +     if (def_notify_proc == NULL )
  1145. +       def_notify_proc = (void (*)())xv_get(rolocard, TEXTSW_NOTIFY_PROC);
  1146. +     
  1147. +     list_item = xv_find(list_menu, MENUITEM, MENU_NOTIFY_PROC,
  1148. +                         list_goto_button, NULL);    
  1149. +     xv_set(list_item, MENU_INACTIVE, FALSE, NULL);
  1150.       save_card (current);            /* save off pending changes */
  1151.   
  1152.       textsw_reset (rolocard, 0, 0);        /* clear the text window */
  1153. ***************
  1154. *** 1076,1085 ****
  1155. --- 1447,1502 ----
  1156.   
  1157.       current = NULL_CARD;            /* indicate no card displayed */
  1158.       update_num_display (LISTALLCARDS);
  1159. +     xv_set(rolocard, TEXTSW_NOTIFY_PROC, notify_proc, NULL);
  1160. +     
  1161.   }
  1162.   
  1163. + static void list_goto_button(item, event)
  1164. + Panel_item item;
  1165. + Event      *event;
  1166. + {
  1167. +     int i = xv_get(rolocard, TEXTSW_INSERTION_POINT);
  1168. +     int len = xv_get(rolocard, TEXTSW_LENGTH);
  1169. +     int cardindex;
  1170. +     char *c = (char *)alloca(len+1);
  1171. +     
  1172. +     xv_get(rolocard, TEXTSW_CONTENTS, 0, c, len);
  1173. +     if (c[i] == '\n') i--;
  1174. +     while ( c[i] != '\n'  && i != 0 )
  1175. +       i--;
  1176. +     if (c[i] == '\n' ) i++;
  1177. +     sscanf(c+i,"%d", &cardindex);
  1178. +     turn_off_goto_button();
  1179. +     goto_card(cardindex);
  1180. + }
  1181.   
  1182. + void notify_proc(textsw, attributes)
  1183. + Textsw textsw;
  1184. + Attr_avlist attributes;
  1185. + {
  1186. +     Attr_avlist attrs;
  1187. +     void (*def_not_proc)() = def_notify_proc;
  1188. +     for ( attrs = attributes; *attrs; attrs = attr_next(attrs) ) {
  1189. +         if ( *attrs == TEXTSW_ACTION_USING_MEMORY ) {
  1190. +             turn_off_goto_button();
  1191. +         }
  1192. +     }
  1193. +     def_not_proc(rolocard, attributes);
  1194. + }
  1195.   
  1196. + turn_off_goto_button()
  1197. + {
  1198. +     Menu_item item = xv_find(list_menu, MENUITEM, 
  1199. +                              MENU_NOTIFY_PROC, list_goto_button, NULL);
  1200. +     if ( def_notify_proc != NULL ) {
  1201. +         xv_set(rolocard, TEXTSW_NOTIFY_PROC, def_notify_proc, NULL);
  1202. +         def_notify_proc = NULL;
  1203. +     }
  1204. +     xv_set(item, MENU_INACTIVE, TRUE, NULL);
  1205. + }
  1206.   /*
  1207.    *    Notification proc for the "Help" button.  The text window is used to
  1208.    *    display a help message.  The text of the help message is defined
  1209. ***************
  1210. *** 1110,1115 ****
  1211. --- 1527,1533 ----
  1212.   
  1213.         current = NULL_CARD;            /* indicate no card displayed */
  1214.         update_num_display (HELPDISPLAYED);    /* set title bar */
  1215.   }
  1216.   
  1217.   
  1218. ***************
  1219. *** 1163,1169 ****
  1220.       xv_set (slider_item,
  1221.           PANEL_MIN_VALUE,    1,
  1222.           PANEL_MAX_VALUE,    i,
  1223. - /*        PANEL_SLIDER_WIDTH,    panel_width - 15 + xv_cols (-delta), */
  1224.           0);
  1225.   }
  1226.   
  1227. --- 1581,1586 ----
  1228. ***************
  1229. *** 1376,1389 ****
  1230.    *    current primary selection to get.
  1231.    */
  1232.   
  1233. ! static
  1234. ! char *
  1235.   get_selection()
  1236.   {
  1237. !     Seln_holder    holder;
  1238.       Seln_request    *buffer;
  1239.       static char     sel_text [MAX_SELN_LEN + 1];
  1240. -     static notfirsttime = 0;
  1241.       Xv_server server = (Xv_server)xv_get(xv_get(frame, XV_SCREEN), SCREEN_SERVER);
  1242.       
  1243.       holder = selection_inquire (server, SELN_PRIMARY);
  1244. --- 1793,1804 ----
  1245.    *    current primary selection to get.
  1246.    */
  1247.   
  1248. ! static char *
  1249.   get_selection()
  1250.   {
  1251. !     static Seln_holder    holder;
  1252.       Seln_request    *buffer;
  1253.       static char     sel_text [MAX_SELN_LEN + 1];
  1254.       Xv_server server = (Xv_server)xv_get(xv_get(frame, XV_SCREEN), SCREEN_SERVER);
  1255.       
  1256.       holder = selection_inquire (server, SELN_PRIMARY);
  1257. ***************
  1258. *** 1391,1397 ****
  1259.   
  1260.       (void) strcpy (sel_text, buffer->data + sizeof (SELN_REQ_CONTENTS_ASCII));
  1261.   
  1262. !     if (strlen (sel_text) == 0 || !notfirsttime++) {
  1263.           /* empty string is no sel. */
  1264.           return (NULL);
  1265.       }
  1266. --- 1806,1812 ----
  1267.   
  1268.       (void) strcpy (sel_text, buffer->data + sizeof (SELN_REQ_CONTENTS_ASCII));
  1269.   
  1270. !     if (strlen (sel_text) == 0 ) {
  1271.           /* empty string is no sel. */
  1272.           return (NULL);
  1273.       }
  1274. *** xrolo.man    Thu Nov 15 13:04:35 1990
  1275. --- ../v2.2/xrolo.man    Thu Nov 15 13:25:44 1990
  1276. ***************
  1277. *** 96,101 ****
  1278. --- 96,105 ----
  1279.   your cards.  The card numbers to the left of
  1280.   each line can be used to jump directly to that
  1281.   card with the slider in the control panel.
  1282. + Alternately, the user can click on the 
  1283. + desired entry followed by a <SHIFT>-click
  1284. + on the list button (or use the list button 
  1285. + menu) to bring up the selected card.
  1286.   .TP
  1287.   FILE BUTTON
  1288.   This button loads and saves your rolodex
  1289. ***************
  1290. *** 148,153 ****
  1291. --- 152,170 ----
  1292.   saves any pending changes if SunTools
  1293.   forces it to exit.
  1294.   .TP
  1295. + PRINT BUTTON
  1296. + This button is used to print. A normal click
  1297. + causes 
  1298. + .I Rolo 
  1299. + to print the current record. 
  1300. + Alternate selections will cause Rolo to print
  1301. + all the entries in the current sorted order
  1302. + or set the print command. The default print
  1303. + command is "lpr".  A user can customize
  1304. + the default printer command by creating an
  1305. + X resource entry called
  1306. +      xrolo.PrintCommand.
  1307. + .TP
  1308.   FIND BUTTON
  1309.   This button searches for a regular expression
  1310.   in your cards.  This can be used to find any
  1311. ***************
  1312. *** 168,174 ****
  1313.   .br
  1314.   Note: "Regular expressions" are the kind used
  1315.   by egrep(1), which are not the same as the
  1316. ! shell meta-characters.
  1317.   .TP
  1318.   SLIDER
  1319.   The slider item on the control panel may
  1320. --- 185,198 ----
  1321.   .br
  1322.   Note: "Regular expressions" are the kind used
  1323.   by egrep(1), which are not the same as the
  1324. ! shell meta-characters. By default xrolo will
  1325. ! do a case insensitive (or "sloppy") regular
  1326. ! regular expression search.  The deafult search
  1327. ! mode may be changed by selecting "Egrep Regex
  1328. ! Match" from the find menu or by setting the X
  1329. ! resource
  1330. !     xrolo.SloppyRegexMatch
  1331. ! to 1 or 0.
  1332.   .TP
  1333.   SLIDER
  1334.   The slider item on the control panel may
  1335. ***************
  1336. *** 194,199 ****
  1337. --- 218,226 ----
  1338.   .br
  1339.      Version 1.0, March  1987
  1340.      Version 2.0, August 1988
  1341. +    Ported to OpenWindows by  Luis Soltero
  1342. +    (luis@rice.edu) November 1990
  1343.   
  1344.   Thanks to S. Page (spage@sun.com) and
  1345.   Mike Ekberg (mae@sun.com) at Sun for
  1346.