home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-12-07 | 38.6 KB | 1,393 lines |
- *** Imakefile Thu Nov 15 13:04:24 1990
- --- ../v2.2/Imakefile Fri Nov 9 15:59:45 1990
- ***************
- *** 14,21 ****
- # patching ol_button.c. see README for details.
- # LOCAL_LIBRARIES = -lxview -lolgx
-
- SRCS = main.c panel.c cards.c popup.c
- ! OBJS = main.o panel.o cards.o popup.o
- INCLUDES = -I$$OPENWINHOME/include
- DEFINES = -DSTANDALONE
-
- --- 14,22 ----
- # patching ol_button.c. see README for details.
- # LOCAL_LIBRARIES = -lxview -lolgx
-
- + CDEBUGFLAGS = -g
- SRCS = main.c panel.c cards.c popup.c
- ! OBJS = main.o panel.o cards.o popup.o
- INCLUDES = -I$$OPENWINHOME/include
- DEFINES = -DSTANDALONE
-
- *** Patchlevel Thu Nov 15 13:04:26 1990
- --- ../v2.2/Patchlevel Thu Nov 15 13:01:10 1990
- ***************
- *** 1,4 ****
- ! Rolo, release 2.0, patch level 1
-
- Patch 1:
- main.c:
- --- 1,27 ----
- ! Rolo, release 2.0, patch level 2
- !
- ! Patch 2:
- ! this version only runs under X and the XView toolkit or
- ! OpenWindows version 1.1 and up.
- !
- ! Added print button and X resource to set default print command.
- !
- ! Fixed problems with selection service.
- !
- ! Added file name query panel for Save/Load to/from named file.
- ! The old method of using the selection service to enter file
- ! names is still supported. Query Panel only appears if there is
- ! no text in the selection service.
- !
- ! Added ability to go to selection in list by clicking on the
- ! entry and <SHIFT>-click on listbutton.
- !
- ! Added capital insensitive search and X resource to set the
- ! default search mode.
- !
- ! Changed the find button icon.
- !
- ! Changed panel layout to be more space efficient.
-
- Patch 1:
- main.c:
- *** buttons1.icon Thu Nov 15 13:04:29 1990
- --- ../v2.2/buttons1.icon Wed Nov 7 10:20:34 1990
- ***************
- *** 1,34 ****
- /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
- ! 0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
- ! 0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
- ! 0xC001,0x8003,0xC000,0x0003,0xC003,0xC003,0xC000,0x0003,
- ! 0xC007,0xE003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
- ! 0xC01F,0xF803,0xC000,0x0003,0xC03F,0xFC03,0xC000,0x0003,
- ! 0xC07F,0xFE03,0xC7FF,0xFFF3,0xC0FF,0xFF03,0xC400,0x0013,
- ! 0xC1FF,0xFF83,0xC400,0x0013,0xC3FF,0xFFC3,0xC400,0x0013,
- ! 0xC7FF,0xFFE3,0xC4A1,0x8893,0xCFFF,0xFFF3,0xC4D2,0x4893,
- ! 0xCFFF,0xFFF3,0xC493,0x8A93,0xCFFF,0xFFF3,0xC492,0x0A93,
- ! 0xC00F,0xF003,0xC491,0xC513,0xC00F,0xF003,0xC400,0x0013,
- ! 0xC00F,0xF003,0xC470,0x0713,0xC00F,0xF003,0xC400,0x0013,
- ! 0xC00F,0xF003,0xC7FF,0xFFF3,0xC00F,0xF003,0xC000,0x0003,
- ! 0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
- ! 0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
- ! 0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
- ! 0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
- ! 0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
- ! 0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
- ! 0xC00F,0xF003,0xC00F,0xF003,0xC00F,0xF003,0xC030,0x0C03,
- ! 0xC00F,0xF003,0xC043,0xC203,0xC00F,0xF003,0xC082,0x4103,
- ! 0xC00F,0xF003,0xC060,0x0603,0xC00F,0xF003,0xC05F,0xFA03,
- ! 0xC00F,0xF003,0xC040,0x0203,0xC00F,0xF003,0xC04A,0x5203,
- ! 0xC00F,0xF003,0xC04A,0x5203,0xC00F,0xF003,0xC04A,0x5203,
- ! 0xCFFF,0xFFF3,0xC04A,0x5203,0xCFFF,0xFFF3,0xC04A,0x5203,
- ! 0xCFFF,0xFFF3,0xC04A,0x5203,0xC7FF,0xFFE3,0xC04A,0x5203,
- ! 0xC3FF,0xFFC3,0xC04A,0x5203,0xC1FF,0xFF83,0xC04A,0x5203,
- ! 0xC0FF,0xFF03,0xC04A,0x5203,0xC07F,0xFE03,0xC04A,0x5203,
- ! 0xC03F,0xFC03,0xC04A,0x5203,0xC01F,0xF803,0xC04E,0x7203,
- ! 0xC00F,0xF003,0xC040,0x0203,0xC007,0xE003,0xC060,0x0603,
- ! 0xC003,0xC003,0xC01F,0xF803,0xC001,0x8003,0xC000,0x0003,
- ! 0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
- ! 0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
- --- 1,66 ----
- /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0001,0x8000,0x0000,0x0000,
- ! 0x0003,0xC000,0x0000,0x0000,
- ! 0x0007,0xE000,0x0000,0x0000,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x001F,0xF800,0x0000,0x0000,
- ! 0x003F,0xFC00,0x0000,0x0000,
- ! 0x007F,0xFE00,0x07FF,0xFFF0,
- ! 0x00FF,0xFF00,0x0400,0x0010,
- ! 0x01FF,0xFF80,0x0400,0x0010,
- ! 0x03FF,0xFFC0,0x0400,0x0010,
- ! 0x07FF,0xFFE0,0x04A1,0x8890,
- ! 0x0FFF,0xFFF0,0x04D2,0x4890,
- ! 0x0FFF,0xFFF0,0x0493,0x8A90,
- ! 0x0FFF,0xFFF0,0x0492,0x0A90,
- ! 0x000F,0xF000,0x0491,0xC510,
- ! 0x000F,0xF000,0x0400,0x0010,
- ! 0x000F,0xF000,0x0470,0x0710,
- ! 0x000F,0xF000,0x0400,0x0010,
- ! 0x000F,0xF000,0x07FF,0xFFF0,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x000F,0xF000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x000F,0xF000,0x000F,0xF000,
- ! 0x000F,0xF000,0x0030,0x0C00,
- ! 0x000F,0xF000,0x0043,0xC200,
- ! 0x000F,0xF000,0x0082,0x4100,
- ! 0x000F,0xF000,0x0060,0x0600,
- ! 0x000F,0xF000,0x005F,0xFA00,
- ! 0x000F,0xF000,0x0040,0x0200,
- ! 0x000F,0xF000,0x004A,0x5200,
- ! 0x000F,0xF000,0x004A,0x5200,
- ! 0x000F,0xF000,0x004A,0x5200,
- ! 0x0FFF,0xFFF0,0x004A,0x5200,
- ! 0x0FFF,0xFFF0,0x004A,0x5200,
- ! 0x0FFF,0xFFF0,0x004A,0x5200,
- ! 0x07FF,0xFFE0,0x004A,0x5200,
- ! 0x03FF,0xFFC0,0x004A,0x5200,
- ! 0x01FF,0xFF80,0x004A,0x5200,
- ! 0x00FF,0xFF00,0x004A,0x5200,
- ! 0x007F,0xFE00,0x004A,0x5200,
- ! 0x003F,0xFC00,0x004A,0x5200,
- ! 0x001F,0xF800,0x004E,0x7200,
- ! 0x000F,0xF000,0x0040,0x0200,
- ! 0x0007,0xE000,0x0060,0x0600,
- ! 0x0003,0xC000,0x001F,0xF800,
- ! 0x0001,0x8000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000
- *** buttons2.icon Thu Nov 15 13:04:29 1990
- --- ../v2.2/buttons2.icon Wed Nov 7 10:37:05 1990
- ***************
- *** 1,34 ****
- /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
- ! 0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
- ! 0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
- ! 0xC000,0x5403,0xC00F,0xE003,0xC000,0xAA03,0xC03F,0xF803,
- ! 0xC001,0x5103,0xC03F,0xF803,0xC002,0xA083,0xC07F,0xFC03,
- ! 0xC005,0x4043,0xC07C,0x7C03,0xC00A,0x8023,0xC078,0x3C03,
- ! 0xC015,0x0013,0xC030,0x3C03,0xC02A,0x0023,0xC000,0x3C03,
- ! 0xC054,0x0043,0xC000,0x7C03,0xC0A8,0x0083,0xC001,0xF803,
- ! 0xC054,0x0103,0xC003,0xF003,0xC02A,0x0203,0xC003,0xE003,
- ! 0xCFFF,0xFFF3,0xC007,0xC003,0xC800,0x0013,0xC007,0x8003,
- ! 0xC800,0x0013,0xC007,0x8003,0xC80F,0xF013,0xC007,0x8003,
- ! 0xC808,0x1013,0xC007,0x8003,0xC808,0x1013,0xC003,0x0003,
- ! 0xC80F,0xF013,0xC000,0x0003,0xC800,0x0013,0xC000,0x0003,
- ! 0xC810,0x0813,0xC003,0x0003,0xC80F,0xF013,0xC007,0x8003,
- ! 0xC800,0x0013,0xC007,0x8003,0xCFFF,0xFFF3,0xC003,0x0003,
- ! 0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
- ! 0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
- ! 0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
- ! 0xE000,0x0007,0xE000,0x0003,0xC000,0x0003,0xC000,0x0003,
- ! 0xCC00,0x0003,0xC000,0x0003,0xCFFC,0x0003,0xC000,0x0003,
- ! 0xCF1F,0xFC03,0xCFFF,0xFFC3,0xCF1C,0xE3E3,0xCC00,0x0043,
- ! 0xCF1C,0xE323,0xCFFF,0xFFE3,0xCCE0,0xE323,0xCE00,0x0023,
- ! 0xCCE3,0x1F23,0xCFFF,0xFFF3,0xCCE3,0x1CE3,0xCF00,0x0013,
- ! 0xCF1F,0x1CE3,0xCFFF,0xFFFB,0xCF1C,0xE0E3,0xCF00,0x000B,
- ! 0xCF1C,0xE323,0xCF00,0x000B,0xCCE0,0xE323,0xCF22,0x010B,
- ! 0xCCE3,0x1F23,0xCF20,0x3BCB,0xCCE3,0x1CE3,0xCF26,0x410B,
- ! 0xCF1F,0x1CE3,0xCF22,0x310B,0xCF1C,0xE0E3,0xCF22,0x090B,
- ! 0xCFFC,0xE323,0xC722,0x70CB,0xCC03,0xFF23,0xC700,0x000B,
- ! 0xCC00,0x03E3,0xC300,0x000B,0xCC00,0x0003,0xC318,0x018B,
- ! 0xCC00,0x0003,0xC100,0x000B,0xCC00,0x0003,0xC1FF,0xFFFB,
- ! 0xCC00,0x0003,0xC000,0x0003,0xCC00,0x0003,0xC000,0x0003,
- ! 0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
- ! 0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
- --- 1,66 ----
- /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- */
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x5400,0x000F,0xE000,
- ! 0x0000,0xAA00,0x003F,0xF800,
- ! 0x0001,0x5100,0x003F,0xF800,
- ! 0x0002,0xA080,0x007F,0xFC00,
- ! 0x0005,0x4040,0x007C,0x7C00,
- ! 0x000A,0x8020,0x0078,0x3C00,
- ! 0x0015,0x0010,0x0030,0x3C00,
- ! 0x002A,0x0020,0x0000,0x3C00,
- ! 0x0054,0x0040,0x0000,0x7C00,
- ! 0x00A8,0x0080,0x0001,0xF800,
- ! 0x0054,0x0100,0x0003,0xF000,
- ! 0x002A,0x0200,0x0003,0xE000,
- ! 0x0FFF,0xFFF0,0x0007,0xC000,
- ! 0x0800,0x0010,0x0007,0x8000,
- ! 0x0800,0x0010,0x0007,0x8000,
- ! 0x080F,0xF010,0x0007,0x8000,
- ! 0x0808,0x1010,0x0007,0x8000,
- ! 0x0808,0x1010,0x0003,0x0000,
- ! 0x080F,0xF010,0x0000,0x0000,
- ! 0x0800,0x0010,0x0000,0x0000,
- ! 0x0810,0x0810,0x0003,0x0000,
- ! 0x080F,0xF010,0x0007,0x8000,
- ! 0x0800,0x0010,0x0007,0x8000,
- ! 0x0FFF,0xFFF0,0x0003,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0C00,0x0000,0x0000,0x0000,
- ! 0x0FFC,0x0000,0x0000,0x0000,
- ! 0x0F1F,0xFC00,0x07FF,0xFFC0,
- ! 0x0F1C,0xE3E0,0x0400,0x0040,
- ! 0x0F1C,0xE320,0x07FF,0xFFE0,
- ! 0x0CE0,0xE320,0x0600,0x0020,
- ! 0x0CE3,0x1F20,0x07FF,0xFFF0,
- ! 0x0CE3,0x1CE0,0x0700,0x0010,
- ! 0x0F1F,0x1CE0,0x07FF,0xFFF8,
- ! 0x0F1C,0xE0E0,0x0700,0x0008,
- ! 0x0F1C,0xE320,0x0700,0x0008,
- ! 0x0CE0,0xE320,0x0722,0x0108,
- ! 0x0CE3,0x1F20,0x0720,0x3BC8,
- ! 0x0CE3,0x1CE0,0x0726,0x4108,
- ! 0x0F1F,0x1CE0,0x0722,0x3108,
- ! 0x0F1C,0xE0E0,0x0722,0x0908,
- ! 0x0FFC,0xE320,0x0722,0x70C8,
- ! 0x0C03,0xFF20,0x0700,0x0008,
- ! 0x0C00,0x03E0,0x0300,0x0008,
- ! 0x0C00,0x0000,0x0318,0x0188,
- ! 0x0C00,0x0000,0x0100,0x0008,
- ! 0x0C00,0x0000,0x01FF,0xFFF8,
- ! 0x0C00,0x0000,0x0000,0x0000,
- ! 0x0C00,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000,
- ! 0x0000,0x0000,0x0000,0x0000
- *** help.h Thu Nov 15 13:04:31 1990
- --- ../v2.2/help.h Thu Nov 15 13:22:25 1990
- ***************
- *** 56,62 ****
- on this button deletes the card which is\n\
- currently displayed. Deleted cards are not\n\
- lost, they are saved on a stack of deleted\n\
- ! cards and may be retreived any time before\n\
- Rolo exits. The alternate selections on the\n\
- menu for the Trash button may be used to\n\
- undelete any card which was previously deleted.\n\
- --- 56,62 ----
- on this button deletes the card which is\n\
- currently displayed. Deleted cards are not\n\
- lost, they are saved on a stack of deleted\n\
- ! cards and may be retrieved any time before\n\
- Rolo exits. The alternate selections on the\n\
- menu for the Trash button may be used to\n\
- undelete any card which was previously deleted.\n\
- ***************
- *** 92,97 ****
- --- 92,101 ----
- your cards. The card numbers to the left of\n\
- each line can be used to jump directly to that\n\
- card with the slider in the control panel.\n\
- + Alternately, the user can click on the \n\
- + desired entry followed by a <SHIFT>-click \n\
- + on the list button (or use the list button \n\
- + menu) to bring up the selected card.\n\
- \n\
- FILE BUTTON\n\
- This button loads and saves your rolodex\n\
- ***************
- *** 132,137 ****
- --- 136,152 ----
- \n",
-
- "\
- + PRINT BUTTON\n\
- + This button is used to print. A normal click\n\
- + causes Rolo to print the current record. \n\
- + Alternate selections will cause Rolo to print\n\
- + all the entries in the current sorted order\n\
- + or set the print command. The default print\n\
- + command is \"lpr\". A user can customize\n\
- + the default printer command by creating an\n\
- + X resource entry called\n\
- + \"xrolo.PrintCommand\".\n\
- + \n\
- FIND BUTTON\n\
- This button searches for a regular expression\n\
- in your cards. This can be used to find any\n\
- ***************
- *** 151,157 ****
- a card, only the text of the card as a whole.\n\
- Note: \"Regular expressions\" are the kind used\n\
- by egrep(1), which are not the same as the\n\
- ! shell meta-characters.\n\
- \n\
- SLIDER\n\
- The slider item on the control panel may\n\
- --- 166,179 ----
- a card, only the text of the card as a whole.\n\
- Note: \"Regular expressions\" are the kind used\n\
- by egrep(1), which are not the same as the\n\
- ! shell meta-characters. By default xrolo will\n\
- ! do a case insensitive (or \"sloppy\") regular\n\
- ! regular expression search. The deafult search\n\
- ! mode may be changed by selecting \"Egrep Regex\n\
- ! Match\" from the find menu or by setting the X\n\
- ! resource \n\
- ! xrolo.SloppyRegexMatch\n\
- ! to 1 or 0\n\
- \n\
- SLIDER\n\
- The slider item on the control panel may\n\
- ***************
- *** 159,165 ****
- drag the bar back and forth until the number\n\
- of the card you wish to see is displayed to\n\
- the left of the slider, then release the\n\
- ! mouse button.\n\
- \n\
- \n",
-
- --- 181,189 ----
- drag the bar back and forth until the number\n\
- of the card you wish to see is displayed to\n\
- the left of the slider, then release the\n\
- ! mouse button. Alternately, the record number\n\
- ! may be entered directly by typing in the\n\
- ! current record field\n\
- \n\
- \n",
-
- ***************
- *** 170,175 ****
- --- 194,202 ----
- \n\
- March 1987, version 1.0\n\
- August 1988, version 2.0\n\
- + \n\
- + Ported to OpenWindows by Luis Soltero\n\
- + (luis@rice.edu) November 1990\n\
- \n\
- Thanks to S. Page (spage@sun.com) and\n\
- Mike Ekberg (mae@sun.com) at Sun for changes\n\
- *** main.c Thu Nov 15 13:04:32 1990
- --- ../v2.2/main.c Thu Nov 8 17:24:57 1990
- ***************
- *** 140,145 ****
- --- 140,148 ----
- TEXTSW_CONTENTS, "Rolo - by Ron Hitchens",
- 0);
-
- + /* clear the X cut buffer */
- + textsw_set_selection(rolocard, 0, 0, 1);
- +
- window_fit (frame);
-
- p = check_args (argc, argv);
- *** panel.c Thu Nov 15 13:04:42 1990
- --- ../v2.2/panel.c Thu Nov 15 12:40:52 1990
- ***************
- *** 40,47 ****
- --- 40,49 ----
- #include <xview/panel.h>
- #include <xview/textsw.h>
- #include <xview/seln.h>
- + #include <xview/notice.h>
- #include <sys/param.h>
- #include <ctype.h>
- + #include <alloca.h>
-
- #include "defs.h"
- #include "help.h"
- ***************
- *** 104,114 ****
-
- done_button (), done_n_save(), done_n_save_exit(), done_n_exit(),
- find_button (), find_button_forward(), find_button_reverse(),
-
- ! list_button (), help_button (),
- slider_proc (), button_event(), goto_card (),
- no_comprendo ();
-
- static char *get_selection ();
-
-
- --- 106,120 ----
-
- done_button (), done_n_save(), done_n_save_exit(), done_n_exit(),
- find_button (), find_button_forward(), find_button_reverse(),
- + turn_on_sloppy(), turn_off_sloppy(),
-
- ! print_button(), print_entry(), print_all(), set_print_command(),
- !
- ! list_button_main(), list_goto_button(), list_button (), help_button (),
- slider_proc (), button_event(), goto_card (),
- no_comprendo ();
-
- + static Menu_item list_menu, find_menu;
- static char *get_selection ();
-
-
- ***************
- *** 117,122 ****
- --- 123,136 ----
- #include "buttons1.icon"
- };
-
- + static u_short printer_image[] = {
- + #include "print.icon"
- + };
- +
- + static u_short find_image[] = {
- + #include "find.icon"
- + };
- +
- /* drawer (file), "?" (help), flag (finished) and list */
- static u_short buttons2_image [] = {
- #include "buttons2.icon"
- ***************
- *** 166,175 ****
-
- frame = _frame;
- panel = xv_create (frame, PANEL,
- ! PANEL_LAYOUT, PANEL_HORIZONTAL,
- ! /* PANEL_EVENT_PROC, button_event, */
- ! PANEL_ITEM_X_GAP, 10,
- ! PANEL_ITEM_Y_GAP, 9,
- 0);
-
- /* 1st row */
- --- 180,188 ----
-
- frame = _frame;
- panel = xv_create (frame, PANEL,
- ! PANEL_LAYOUT, PANEL_HORIZONTAL,
- ! WIN_COLUMN_GAP, 15,
- ! WIN_ROW_GAP, 25,
- 0);
-
- /* 1st row */
- ***************
- *** 195,200 ****
- --- 208,214 ----
- PANEL_LABEL_IMAGE, pr_region(buttons1_image, 64, 0, 0, 32, 32),
- PANEL_ITEM_MENU, tmpmenu,
- PANEL_NOTIFY_PROC, prev_button,
- + XV_Y, xv_row(panel, 0),
- 0);
-
- tmpmenu = menu_create (
- ***************
- *** 205,210 ****
- --- 219,225 ----
- PANEL_LABEL_IMAGE, pr_region (buttons1_image, 64, 32, 0, 32, 32),
- PANEL_ITEM_MENU, tmpmenu,
- PANEL_NOTIFY_PROC, new_button,
- + XV_Y, xv_row(panel, 0),
- 0);
-
- tmpmenu = xv_create (NULL, MENU,
- ***************
- *** 237,250 ****
- PANEL_LABEL_IMAGE, pr_region (buttons1_image, 64, 32, 32, 32, 32),
- PANEL_ITEM_MENU, tmpmenu,
- PANEL_NOTIFY_PROC, delete_button,
- 0);
-
- ! tmpmenu = menu_create (
- MENU_ACTION_ITEM, "Show Index List of Cards", list_button,
- NULL);
- (void) xv_create (panel, PANEL_BUTTON,
- PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 32, 32, 32, 32),
- ! PANEL_ITEM_MENU, tmpmenu,
- 0);
-
- tmpmenu = menu_create (
- --- 252,275 ----
- PANEL_LABEL_IMAGE, pr_region (buttons1_image, 64, 32, 32, 32, 32),
- PANEL_ITEM_MENU, tmpmenu,
- PANEL_NOTIFY_PROC, delete_button,
- + XV_Y, xv_row(panel, 0),
- 0);
-
- ! list_menu = menu_create (
- MENU_ACTION_ITEM, "Show Index List of Cards", list_button,
- +
- + MENU_ITEM,
- + MENU_STRING, "(S) Go to Selected Entry",
- + MENU_NOTIFY_PROC, list_goto_button,
- + MENU_INACTIVE, TRUE,
- + NULL,
- +
- NULL);
- (void) xv_create (panel, PANEL_BUTTON,
- PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 32, 32, 32, 32),
- ! PANEL_ITEM_MENU, list_menu,
- ! PANEL_NOTIFY_PROC, list_button_main,
- ! XV_Y, xv_row(panel, 0),
- 0);
-
- tmpmenu = menu_create (
- ***************
- *** 274,283 ****
- NULL);
-
- (void) xv_create (panel, PANEL_BUTTON,
- ! PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 0, 0, 32, 32),
- ! PANEL_NOTIFY_PROC, file_button,
- ! PANEL_ITEM_MENU, tmpmenu,
- ! 0);
-
- tmpmenu = menu_create (
- MENU_ACTION_ITEM, "Display Help Message", help_button,
- --- 299,310 ----
- NULL);
-
- (void) xv_create (panel, PANEL_BUTTON,
- ! PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 0, 0, 32, 32),
- ! PANEL_NOTIFY_PROC, file_button,
- ! PANEL_ITEM_MENU, tmpmenu,
- ! XV_X, xv_col(panel, 0),
- ! XV_Y, xv_row(panel, 1),
- ! 0);
-
- tmpmenu = menu_create (
- MENU_ACTION_ITEM, "Display Help Message", help_button,
- ***************
- *** 286,291 ****
- --- 313,319 ----
- (void) xv_create (panel, PANEL_BUTTON,
- PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 32, 0, 32, 32),
- PANEL_ITEM_MENU, tmpmenu,
- + XV_Y, xv_row(panel, 1),
- 0);
-
- tmpmenu = menu_create (
- ***************
- *** 305,312 ****
- --- 333,367 ----
- PANEL_LABEL_IMAGE, pr_region(buttons2_image, 64, 0, 32, 32, 32),
- PANEL_NOTIFY_PROC, done_button,
- PANEL_ITEM_MENU, tmpmenu,
- + XV_Y, xv_row(panel, 1),
- 0);
-
- + tmpmenu = menu_create(
- + MENU_ACTION_ITEM,
- + "Print Entry",
- + print_entry,
- +
- + MENU_ACTION_ITEM,
- + "Print All",
- + print_all,
- +
- + MENU_ACTION_ITEM,
- + "Set Print Command",
- + set_print_command,
- + NULL);
- +
- + (void) xv_create(panel, PANEL_BUTTON,
- + PANEL_LABEL_IMAGE, xv_create(NULL, SERVER_IMAGE,
- + XV_WIDTH, 32,
- + XV_HEIGHT, 32,
- + SERVER_IMAGE_BITS,
- + printer_image,
- + NULL),
- + PANEL_NOTIFY_PROC, print_button,
- + PANEL_ITEM_MENU, tmpmenu,
- + XV_Y, xv_row(panel, 1),
- +
- + NULL);
- /*
- * Tighten up the window around the buttons in the first row, this
- * will be the width of the panel window, so we save that size for
- ***************
- *** 323,351 ****
- */
- xv_set (panel, PANEL_ITEM_X_GAP, 8, 0);
-
- ! tmpmenu = menu_create (
- ! MENU_ACTION_ITEM,
- ! " Find Regular Expression, Forward",
- ! find_button_forward,
-
- ! MENU_ACTION_ITEM,
- ! "(S) Find Regular Expression, Reverse",
- ! find_button_reverse,
- NULL);
-
- (void) xv_create (panel, PANEL_BUTTON,
- ! PANEL_LABEL_STRING, "Find",
- ! PANEL_ITEM_MENU, tmpmenu,
- ! PANEL_NOTIFY_PROC, find_button,
- ! 0);
-
- regex_item = xv_create (panel, PANEL_TEXT,
- ! PANEL_BLINK_CARET, TRUE,
- ! PANEL_LABEL_STRING, "",
- ! PANEL_VALUE_DISPLAY_LENGTH, panel_columns - 10,
- ! PANEL_VALUE_STORED_LENGTH, 80,
- ! PANEL_NOTIFY_PROC, find_button,
- ! 0);
-
- /*
- * Begin the third row, squeeze the inter-item gap back down so that
- --- 378,450 ----
- */
- xv_set (panel, PANEL_ITEM_X_GAP, 8, 0);
-
- ! #define SLOPPY_EXPR_STR "Sloppy Regex Match"
- ! #define EGREP_EXPR_STR "Egrep(1) Regex Match"
- !
- ! tmpmenu = menu_create(
- ! MENU_ITEM,
- ! MENU_STRING,
- ! SLOPPY_EXPR_STR,
- ! MENU_NOTIFY_PROC,
- ! turn_on_sloppy,
- ! NULL,
- !
- ! MENU_ITEM,
- ! MENU_STRING,
- ! EGREP_EXPR_STR,
- ! MENU_NOTIFY_PROC,
- ! turn_off_sloppy,
- ! NULL,
- !
- ! NULL);
- !
- ! find_menu = menu_create (
- ! MENU_ACTION_ITEM,
- ! " Find Regular Expression, Forward",
- ! find_button_forward,
-
- ! MENU_ACTION_ITEM,
- ! "(S) Find Regular Expression, Reverse",
- ! find_button_reverse,
- !
- ! MENU_CLIENT_DATA,
- ! defaults_get_integer("xrolo.sloppyregexmatch",
- ! "xrolo.SloppyRegexMatch",
- ! 1), /* sloppy regex by */
- ! /* default */
- !
- ! MENU_ITEM,
- ! MENU_STRING,
- ! defaults_get_integer("xrolo.sloppyregexmatch",
- ! "xrolo.SloppyRegexMatch",
- ! 1)
- ! ? SLOPPY_EXPR_STR : EGREP_EXPR_STR,
- ! MENU_CLIENT_DATA, 1,
- ! MENU_PULLRIGHT, tmpmenu,
- ! NULL,
- !
- NULL);
-
- (void) xv_create (panel, PANEL_BUTTON,
- ! PANEL_LABEL_IMAGE, xv_create(NULL, SERVER_IMAGE,
- ! XV_WIDTH, 32,
- ! XV_HEIGHT, 32,
- ! SERVER_IMAGE_BITS,
- ! find_image,
- ! NULL),
- ! PANEL_ITEM_MENU, find_menu,
- ! PANEL_NOTIFY_PROC, find_button,
- ! NULL);
-
- regex_item = xv_create (panel, PANEL_TEXT,
- ! PANEL_BLINK_CARET, TRUE,
- ! PANEL_LABEL_STRING, "Find Expression:",
- ! PANEL_VALUE_DISPLAY_LENGTH, panel_width - 344,
- ! XV_X, xv_col(panel, 0),
- ! XV_Y, xv_row(panel, 2),
- ! PANEL_VALUE_STORED_LENGTH, 80,
- ! PANEL_NOTIFY_PROC, find_button,
- ! 0);
-
- /*
- * Begin the third row, squeeze the inter-item gap back down so that
- ***************
- *** 361,377 ****
- 0);
-
- slider_item = xv_create (panel, PANEL_SLIDER,
- ! PANEL_MIN_VALUE, 0,
- ! PANEL_MAX_VALUE, 1,
- ! PANEL_VALUE, 1,
- ! /* This slider width is temp, recomputed later */
- ! PANEL_SLIDER_WIDTH, 500,
- ! PANEL_SHOW_RANGE, FALSE,
- ! PANEL_SHOW_VALUE, TRUE,
- ! PANEL_NOTIFY_LEVEL, PANEL_DONE,
- ! PANEL_NOTIFY_PROC, slider_proc,
- ! PANEL_ITEM_MENU, tmpmenu,
- ! 0);
-
- /*
- * Adjust the position of the text item slightly for better aesthetic
- --- 460,475 ----
- 0);
-
- slider_item = xv_create (panel, PANEL_SLIDER,
- ! PANEL_MIN_VALUE, 0,
- ! PANEL_MAX_VALUE, 1,
- ! PANEL_VALUE, 1,
- ! PANEL_SLIDER_WIDTH, panel_width - 80,
- ! PANEL_SHOW_RANGE, FALSE,
- ! PANEL_SHOW_VALUE, TRUE,
- ! PANEL_NOTIFY_LEVEL, PANEL_DONE,
- ! PANEL_NOTIFY_PROC, slider_proc,
- ! PANEL_ITEM_MENU, tmpmenu,
- ! 0);
-
- /*
- * Adjust the position of the text item slightly for better aesthetic
- ***************
- *** 757,762 ****
- --- 855,920 ----
- need_save = TRUE;
- }
-
- + static Frame file_frame;
- + static Panel file_panel;
- + static Panel_item file_item;
- + static char FileName[256];
- + static int FileLoad;
- + static void file_ok_proc()
- + {
- + strcpy(FileName, xv_get(file_item, PANEL_VALUE));
- + xv_set(file_frame, WIN_SHOW, FALSE, NULL);
- + FileLoad ? do_read_rolo(FileName) : do_write_rolo(FileName);
- + }
- + static void file_cancel_proc()
- + {
- + xv_set(file_frame, WIN_SHOW, FALSE, NULL);
- + }
- +
- + static void do_create_file_frame(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + file_frame = xv_create(frame, FRAME,
- + XV_LABEL, "Set File Name",
- + FRAME_SHOW_LABEL, TRUE,
- + NULL);
- + file_panel = xv_create(file_frame, PANEL, NULL);
- + file_item = xv_create(file_panel, PANEL_TEXT,
- + XV_X, 4,
- + XV_Y, 4,
- + PANEL_LABEL_STRING, "File Name:",
- + PANEL_VALUE_STORED_LENGTH, 256,
- + PANEL_VALUE_DISPLAY_LENGTH, 40,
- + NULL);
- + xv_create(file_panel, PANEL_BUTTON,
- + PANEL_LABEL_STRING, " OK ",
- + XV_X, 450,
- + XV_Y, 4,
- + PANEL_NOTIFY_PROC, file_ok_proc,
- + NULL);
- + xv_create(file_panel, PANEL_BUTTON,
- + PANEL_LABEL_STRING, "Cancel",
- + XV_X, 450,
- + XV_Y, 35,
- + PANEL_NOTIFY_PROC, file_cancel_proc,
- + NULL);
- + window_fit(file_panel);
- + window_fit(file_frame);
- + }
- +
- + static void get_file_name(fileload)
- + int fileload;
- + {
- + static int firsttime = 1;
- + if (firsttime) {
- + do_create_file_frame();
- + firsttime = 0;
- + }
- + FileLoad = fileload;
- + xv_set(file_frame, WIN_SHOW, TRUE, NULL);
- + }
- +
- static void file_button_load (item, event)
- Panel_item item;
- Event *event;
- ***************
- *** 768,777 ****
- }
- save_card (current);
- filename = get_selection ();
- ! if (filename == NULL) {
- msg ("No active selection, need a filename to load from");
- return;
- }
- if (filename_ok (filename) == FALSE) {
- return;
- }
- --- 926,948 ----
- }
- save_card (current);
- filename = get_selection ();
- ! if ( filename == NULL ) {
- ! get_file_name(1);
- ! return;
- ! } else if ( !confirm("Load from file %s?", filename) ) {
- ! return;
- ! }
- !
- ! if (filename == NULL || filename[0] == '\0' ) {
- msg ("No active selection, need a filename to load from");
- return;
- }
- + do_read_rolo(filename);
- + }
- +
- + do_read_rolo(filename)
- + char *filename;
- + {
- if (filename_ok (filename) == FALSE) {
- return;
- }
- ***************
- *** 781,786 ****
- --- 952,965 ----
- read_rolo (filename);
- }
-
- + do_write_rolo(filename)
- + char *filename;
- + {
- + if (filename_ok (filename) == FALSE) {
- + return;
- + }
- + write_rolo (filename);
- + }
- static void file_button_save_to_file (item, event)
- Panel_item item;
- Event *event;
- ***************
- *** 792,805 ****
- }
- save_card (current);
- filename = get_selection ();
- ! if (filename == NULL) {
- ! msg ("No active selection, need a filename to save to");
- return;
- }
- ! if (filename_ok (filename) == FALSE) {
- return;
- }
- ! write_rolo (filename);
- }
-
- /*ARGSUSED*/
- --- 971,987 ----
- }
- save_card (current);
- filename = get_selection ();
- ! if (filename == NULL ) {
- ! get_file_name(0);
- return;
- + } else if ( !confirm("Save to file %s?", filename) ) {
- + return;
- }
- ! if (filename == NULL || filename[0] == '\0' ) {
- ! msg ("No active selection, need a filename to save to");
- return;
- }
- ! do_write_rolo(filename);
- }
-
- /*ARGSUSED*/
- ***************
- *** 925,930 ****
- --- 1107,1214 ----
-
-
- /*
- + * Notification proc for print.
- + */
- + static char Print_Command[256] = "lpr";
- + static int First_Print_Call = 1;
- +
- + get_print_resource()
- + {
- + strcpy(Print_Command,
- + defaults_get_string("xrolo.printcommand","xrolo.PrintCommand", Print_Command));
- + First_Print_Call = 0;
- + }
- +
- + static void print_button(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + }
- +
- + static void print_entry(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + FILE *fp = popen(Print_Command, "w");
- + if (First_Print_Call)
- + get_print_resource();
- + save_card(current);
- + fprintf(fp, "%s\n", current->c_text);
- + pclose(fp);
- + }
- +
- + static void print_all(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + struct card *p;
- + int i;
- + FILE *fp = popen(Print_Command, "w");
- + if (First_Print_Call)
- + get_print_resource();
- + save_card(current);
- + for (p = first, i =0; p != NULL_CARD; i++, p=p->c_next)
- + fprintf(fp, "Record # %d \n%s\n\n", i, p->c_text);
- + pclose(fp);
- + }
- +
- + static Frame print_frame;
- + static Panel print_panel;
- + static Panel_item Command_item;
- +
- + static void ok_proc()
- + {
- + strcpy(Print_Command, xv_get(Command_item,PANEL_VALUE));
- + xv_set(print_frame, WIN_SHOW, FALSE, NULL);
- + }
- +
- + static void cancel_proc()
- + {
- + xv_set(print_frame, WIN_SHOW, FALSE, NULL);
- + }
- +
- + static void set_print_command(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + static int firsttime = 1;
- + if ( firsttime ) {
- + firsttime = 0;
- + if (First_Print_Call)
- + get_print_resource();
- + print_frame = xv_create(frame, FRAME,
- + XV_LABEL, "Set Print Command",
- + FRAME_SHOW_LABEL, TRUE,
- + NULL);
- + print_panel = xv_create(print_frame, PANEL, NULL);
- + Command_item = xv_create(print_panel, PANEL_TEXT,
- + XV_X, 4,
- + XV_Y, 4,
- + PANEL_LABEL_STRING, "Print Command:",
- + PANEL_VALUE, Print_Command,
- + PANEL_VALUE_STORED_LENGTH, 256,
- + PANEL_VALUE_DISPLAY_LENGTH, 40,
- + NULL);
- + xv_create(print_panel, PANEL_BUTTON,
- + PANEL_LABEL_STRING, " OK ",
- + XV_X, 450,
- + XV_Y, 4,
- + PANEL_NOTIFY_PROC, ok_proc,
- + NULL);
- + xv_create(print_panel, PANEL_BUTTON,
- + PANEL_LABEL_STRING, "Cancel",
- + XV_X, 450,
- + XV_Y, 35,
- + PANEL_NOTIFY_PROC, cancel_proc,
- + NULL);
- + window_fit(print_panel);
- + window_fit(print_frame);
- + }
- + xv_set(Command_item, PANEL_VALUE, Print_Command);
- + xv_set(print_frame, WIN_SHOW, TRUE, 0);
- + }
- +
- + /*
- * Notification proc for both the "Find" button and text item for
- * the search pattern. This proc will be called from the pattern item
- * if you type return. If this proc is called, and there is an active
- ***************
- *** 931,936 ****
- --- 1215,1240 ----
- * selection, that will be used as the search pattern. The selection
- * will also be inserted into the pattern item if it is currently empty.
- */
- + static void to_sloppy(str)
- + char *str;
- + {
- + char tmpstr[MAX_SELN_LEN];
- + char *ptr1 = str;
- + char *ptr2 = tmpstr;
- + while ( *ptr1 != '\0' ) {
- + if ( isalpha(*ptr1) ) {
- + *ptr2++ = '[';
- + *ptr2++ = isupper(*ptr1) ?
- + tolower(*ptr1) : toupper(*ptr1);
- + *ptr2++ = *ptr1++;
- + *ptr2++ = ']';
- + } else {
- + *ptr2++ = *ptr1++;
- + }
- + }
- + *ptr2 ='\0';
- + strcpy(str, tmpstr);
- + }
-
- static int in_find_button;
- static char *e, regbuf [MAX_SELN_LEN];
- ***************
- *** 938,943 ****
- --- 1242,1249 ----
- init_find_button()
- {
- static int bozo = 0;
- + int sloppy;
- +
- save_card (current);
-
- /* if selection active, use it */
- ***************
- *** 954,959 ****
- --- 1260,1268 ----
- (void) strcpy (regbuf, (char *) xv_get(regex_item, PANEL_VALUE));
- }
-
- + /* clear the X cut buffer */
- + textsw_set_selection(rolocard, 0, 0, 1);
- +
- if (strlen (regbuf) == 0) {
- if (bozo) {
- msg ("Enter an expression to search for");
- ***************
- *** 965,970 ****
- --- 1274,1284 ----
- }
-
- bozo = 0;
- +
- + sloppy = xv_get(find_menu, MENU_CLIENT_DATA);
- + if ( sloppy ) {
- + to_sloppy(regbuf);
- + }
- e = re_comp (regbuf);
- if (e != NULL) {
- msg ("Regular Expression error: %s", e);
- ***************
- *** 1029,1055 ****
-
- if (value_from_mask(event) == SHIFT_CLICK) { /* search backwards */
- find_button_reverse(item,event);
- ! } else {
- ! find_button_forward(item,event);
- }
- - in_find_button = 1;
- }
-
-
- /*
- * Notification proc for the "List" button. The text window is used
- * to display the first non-blank line of each card.
- */
-
- /*ARGSUSED*/
- ! static
- ! void
- ! list_button (item, event)
- Panel_item item;
- Event *event;
- {
- struct card *p;
-
- save_card (current); /* save off pending changes */
-
- textsw_reset (rolocard, 0, 0); /* clear the text window */
- --- 1343,1426 ----
-
- if (value_from_mask(event) == SHIFT_CLICK) { /* search backwards */
- find_button_reverse(item,event);
- ! in_find_button = 1;
- }
- }
-
- + static void turn_on_sloppy(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + Menu_item find_item = xv_find(find_menu, MENUITEM,
- + MENU_CLIENT_DATA, 1, NULL);
- + if ( find_item == NULL ) {
- + confirm("turn_on_sloppy: Bad news!");
- + return;
- + }
- + xv_set(find_item, MENU_STRING, SLOPPY_EXPR_STR, NULL);
- + xv_set(find_menu, MENU_CLIENT_DATA, 1);
- + }
-
- + static void turn_off_sloppy(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + Menu_item find_item = xv_find(find_menu, MENUITEM,
- + MENU_CLIENT_DATA, 1, NULL);
- + if ( find_item == NULL ) {
- + confirm("turn_off_sloppy: Bad news!");
- + return;
- + }
- + xv_set(find_item, MENU_STRING, EGREP_EXPR_STR, NULL);
- + xv_set(find_menu, MENU_CLIENT_DATA, 0);
- + }
- +
- /*
- * Notification proc for the "List" button. The text window is used
- * to display the first non-blank line of each card.
- */
-
- + static void (*def_notify_proc)() = NULL;
- + static int in_list_button;
- +
- + static void list_button_main(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + Menu_item list_item = xv_find(list_menu, MENUITEM,
- + MENU_NOTIFY_PROC, list_goto_button, NULL);
- + if (event_action(event) == ACTION_MENU )
- + return;
- +
- + if (value_from_mask (event) == SHIFT_CLICK ) {
- + if (xv_get(list_item, MENU_INACTIVE) == FALSE) {
- + list_goto_button(item, event);
- + in_list_button = 1;
- + return;
- + }
- + }
- + }
- +
- /*ARGSUSED*/
- ! static void list_button (item, event)
- Panel_item item;
- Event *event;
- {
- struct card *p;
- + void notify_proc();
- + Menu_item list_item;
-
- + if (in_list_button || def_notify_proc != NULL) {
- + in_list_button = 0;
- + return;
- + }
- + if (def_notify_proc == NULL )
- + def_notify_proc = (void (*)())xv_get(rolocard, TEXTSW_NOTIFY_PROC);
- +
- + list_item = xv_find(list_menu, MENUITEM, MENU_NOTIFY_PROC,
- + list_goto_button, NULL);
- + xv_set(list_item, MENU_INACTIVE, FALSE, NULL);
- +
- save_card (current); /* save off pending changes */
-
- textsw_reset (rolocard, 0, 0); /* clear the text window */
- ***************
- *** 1076,1085 ****
- --- 1447,1502 ----
-
- current = NULL_CARD; /* indicate no card displayed */
- update_num_display (LISTALLCARDS);
- +
- + xv_set(rolocard, TEXTSW_NOTIFY_PROC, notify_proc, NULL);
- +
- }
-
- + static void list_goto_button(item, event)
- + Panel_item item;
- + Event *event;
- + {
- + int i = xv_get(rolocard, TEXTSW_INSERTION_POINT);
- + int len = xv_get(rolocard, TEXTSW_LENGTH);
- + int cardindex;
- + char *c = (char *)alloca(len+1);
- +
- + xv_get(rolocard, TEXTSW_CONTENTS, 0, c, len);
- + if (c[i] == '\n') i--;
- + while ( c[i] != '\n' && i != 0 )
- + i--;
- + if (c[i] == '\n' ) i++;
- + sscanf(c+i,"%d", &cardindex);
- + turn_off_goto_button();
- + goto_card(cardindex);
- + }
-
- + void notify_proc(textsw, attributes)
- + Textsw textsw;
- + Attr_avlist attributes;
- + {
- + Attr_avlist attrs;
- + void (*def_not_proc)() = def_notify_proc;
- + for ( attrs = attributes; *attrs; attrs = attr_next(attrs) ) {
- + if ( *attrs == TEXTSW_ACTION_USING_MEMORY ) {
- + turn_off_goto_button();
- + }
- + }
- + def_not_proc(rolocard, attributes);
- + }
-
- + turn_off_goto_button()
- + {
- + Menu_item item = xv_find(list_menu, MENUITEM,
- + MENU_NOTIFY_PROC, list_goto_button, NULL);
- + if ( def_notify_proc != NULL ) {
- + xv_set(rolocard, TEXTSW_NOTIFY_PROC, def_notify_proc, NULL);
- + def_notify_proc = NULL;
- + }
- + xv_set(item, MENU_INACTIVE, TRUE, NULL);
- + }
- +
- +
- /*
- * Notification proc for the "Help" button. The text window is used to
- * display a help message. The text of the help message is defined
- ***************
- *** 1110,1115 ****
- --- 1527,1533 ----
-
- current = NULL_CARD; /* indicate no card displayed */
- update_num_display (HELPDISPLAYED); /* set title bar */
- +
- }
-
-
- ***************
- *** 1163,1169 ****
- xv_set (slider_item,
- PANEL_MIN_VALUE, 1,
- PANEL_MAX_VALUE, i,
- - /* PANEL_SLIDER_WIDTH, panel_width - 15 + xv_cols (-delta), */
- 0);
- }
-
- --- 1581,1586 ----
- ***************
- *** 1376,1389 ****
- * current primary selection to get.
- */
-
- ! static
- ! char *
- get_selection()
- {
- ! Seln_holder holder;
- Seln_request *buffer;
- static char sel_text [MAX_SELN_LEN + 1];
- - static notfirsttime = 0;
- Xv_server server = (Xv_server)xv_get(xv_get(frame, XV_SCREEN), SCREEN_SERVER);
-
- holder = selection_inquire (server, SELN_PRIMARY);
- --- 1793,1804 ----
- * current primary selection to get.
- */
-
- ! static char *
- get_selection()
- {
- ! static Seln_holder holder;
- Seln_request *buffer;
- static char sel_text [MAX_SELN_LEN + 1];
- Xv_server server = (Xv_server)xv_get(xv_get(frame, XV_SCREEN), SCREEN_SERVER);
-
- holder = selection_inquire (server, SELN_PRIMARY);
- ***************
- *** 1391,1397 ****
-
- (void) strcpy (sel_text, buffer->data + sizeof (SELN_REQ_CONTENTS_ASCII));
-
- ! if (strlen (sel_text) == 0 || !notfirsttime++) {
- /* empty string is no sel. */
- return (NULL);
- }
- --- 1806,1812 ----
-
- (void) strcpy (sel_text, buffer->data + sizeof (SELN_REQ_CONTENTS_ASCII));
-
- ! if (strlen (sel_text) == 0 ) {
- /* empty string is no sel. */
- return (NULL);
- }
- *** xrolo.man Thu Nov 15 13:04:35 1990
- --- ../v2.2/xrolo.man Thu Nov 15 13:25:44 1990
- ***************
- *** 96,101 ****
- --- 96,105 ----
- your cards. The card numbers to the left of
- each line can be used to jump directly to that
- card with the slider in the control panel.
- + Alternately, the user can click on the
- + desired entry followed by a <SHIFT>-click
- + on the list button (or use the list button
- + menu) to bring up the selected card.
- .TP
- FILE BUTTON
- This button loads and saves your rolodex
- ***************
- *** 148,153 ****
- --- 152,170 ----
- saves any pending changes if SunTools
- forces it to exit.
- .TP
- + PRINT BUTTON
- + This button is used to print. A normal click
- + causes
- + .I Rolo
- + to print the current record.
- + Alternate selections will cause Rolo to print
- + all the entries in the current sorted order
- + or set the print command. The default print
- + command is "lpr". A user can customize
- + the default printer command by creating an
- + X resource entry called
- + xrolo.PrintCommand.
- + .TP
- FIND BUTTON
- This button searches for a regular expression
- in your cards. This can be used to find any
- ***************
- *** 168,174 ****
- .br
- Note: "Regular expressions" are the kind used
- by egrep(1), which are not the same as the
- ! shell meta-characters.
- .TP
- SLIDER
- The slider item on the control panel may
- --- 185,198 ----
- .br
- Note: "Regular expressions" are the kind used
- by egrep(1), which are not the same as the
- ! shell meta-characters. By default xrolo will
- ! do a case insensitive (or "sloppy") regular
- ! regular expression search. The deafult search
- ! mode may be changed by selecting "Egrep Regex
- ! Match" from the find menu or by setting the X
- ! resource
- ! xrolo.SloppyRegexMatch
- ! to 1 or 0.
- .TP
- SLIDER
- The slider item on the control panel may
- ***************
- *** 194,199 ****
- --- 218,226 ----
- .br
- Version 1.0, March 1987
- Version 2.0, August 1988
- +
- + Ported to OpenWindows by Luis Soltero
- + (luis@rice.edu) November 1990
-
- Thanks to S. Page (spage@sun.com) and
- Mike Ekberg (mae@sun.com) at Sun for
-