Changeset 5e0b690
- Timestamp:
- Apr 10, 2004, 10:47:40 AM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 405d5e6
- Parents:
- f84bca8
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rf84bca8 r5e0b690 1 1 $Id$ 2 2 3 2.1.7-pre-1 4 The colorclass command is added, to make colorization easy 5 3 6 2.1.6 4 7 Fixed three bugs found by Valgrind. -
commands.c
rd4b84c0 r5e0b690 546 546 "The color of messages in the current filter will be changed\n" 547 547 "to <color>. Use the 'show colors' command for a list\n" 548 "of valid colors.\n\n" 549 "SEE ALSO: 'show colors'\n"), 550 551 OWLCMD_ARGS("colorclass", owl_command_colorclass, OWL_CTX_INTERACTIVE, 552 "create a filter to color messages of the given class name", 553 "colorclass <class> <color>", 554 "A filter will be created to color messages in <class>" 555 "in <color>. Use the 'show colors' command for a list\n" 548 556 "of valid colors.\n\n" 549 557 "SEE ALSO: 'show colors'\n"), … … 2232 2240 } 2233 2241 2242 char *owl_command_colorclass(int argc, char **argv, char *buff) 2243 { 2244 char *filtname; 2245 2246 if (argc!=3) { 2247 owl_function_makemsg("Wrong number of arguments to colorclass command"); 2248 return NULL; 2249 } 2250 2251 filtname=owl_function_classinstfilt(argv[1], NULL); 2252 (void) owl_function_color_filter(filtname, argv[2]); 2253 return NULL; 2254 } 2255 2234 2256 char *owl_command_zpunt(int argc, char **argv, char *buff) 2235 2257 { -
functions.c
rfe1f605 r5e0b690 2301 2301 } 2302 2302 2303 /* Change the filter associated with the current view. 2304 * This also figures out which message in the new filter 2305 * should have the pointer. 2306 */ 2303 2307 void owl_function_change_currentview_filter(char *filtname) 2304 2308 { … … 2346 2350 } 2347 2351 2352 /* Create a new filter, or replace an existing one 2353 * with a new definition. 2354 */ 2348 2355 void owl_function_create_filter(int argc, char **argv) 2349 2356 { … … 2839 2846 } 2840 2847 2848 /* Set the color of the current view's filter to 2849 * be 'color' 2850 */ 2841 2851 void owl_function_color_current_filter(char *color) 2842 2852 { 2853 char *name; 2854 2855 name=owl_view_get_filtname(owl_global_get_current_view(&g)); 2856 owl_function_color_filter(name, color); 2857 } 2858 2859 /* Set the color of the filter 'filter' to be 'color'. If the color 2860 * name does not exist, return -1, if the filter does not exist or is 2861 * the "all" filter, return -2. Return 0 on success 2862 */ 2863 int owl_function_color_filter(char *filtname, char *color) 2864 { 2843 2865 owl_filter *f; 2844 char *name; 2845 2846 name=owl_view_get_filtname(owl_global_get_current_view(&g)); 2847 f=owl_global_get_filter(&g, name); 2866 2867 f=owl_global_get_filter(&g, filtname); 2848 2868 if (!f) { 2849 2869 owl_function_error("Unknown filter"); 2850 return ;2870 return(-2); 2851 2871 } 2852 2872 2853 2873 /* don't touch the all filter */ 2854 if (!strcmp( name, "all")) {2874 if (!strcmp(filtname, "all")) { 2855 2875 owl_function_error("You may not change the 'all' filter."); 2856 return; 2857 } 2858 2859 /* deal with the case of trying change the filter color */ 2876 return(-2); 2877 } 2878 2860 2879 if (owl_util_string_to_color(color)==-1) { 2861 2880 owl_function_error("No color named '%s' avilable."); 2862 return ;2881 return(-1); 2863 2882 } 2864 2883 owl_filter_set_color(f, owl_util_string_to_color(color)); 2865 2884 owl_global_set_needrefresh(&g); 2866 2885 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 2886 return(0); 2867 2887 } 2868 2888 -
owl.h
rf84bca8 r5e0b690 59 59 static const char owl_h_fileIdent[] = "$Id$"; 60 60 61 #define OWL_VERSION 2.1. 662 #define OWL_VERSION_STRING "2.1. 6"61 #define OWL_VERSION 2.1.7-pre-1 62 #define OWL_VERSION_STRING "2.1.7-pre-1" 63 63 64 64 /* Feature that is being tested to redirect stderr through a pipe.
Note: See TracChangeset
for help on using the changeset viewer.