Changeset ef56a67 for functions.c
- Timestamp:
- Jun 22, 2003, 9:38:21 AM (21 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:
- f1cbb7a
- Parents:
- 3723f31
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r9381782 ref56a67 59 59 owl_fmtext_free(&fm); 60 60 } 61 62 63 void owl_function_show_view(char *viewname) 64 { 65 owl_view *v; 66 owl_fmtext fm; 67 68 /* we only have the one view right now */ 69 v=owl_global_get_current_view(&g); 70 if (viewname && strcmp(viewname, owl_view_get_name(v))) { 71 owl_function_makemsg("No view named '%s'", viewname); 72 return; 73 } 74 75 owl_fmtext_init_null(&fm); 76 owl_view_to_fmtext(v, &fm); 77 owl_function_popless_fmtext(&fm); 78 owl_fmtext_free(&fm); 79 } 80 61 81 62 82 char *owl_function_cmd_describe(void *name) … … 3019 3039 } 3020 3040 3041 3042 void owl_function_change_style(owl_view *v, char *stylename) 3043 { 3044 owl_view_set_style(v, owl_global_get_style_by_name(&g, stylename)); 3045 owl_messagelist_invalidate_formats(owl_global_get_msglist(&g)); 3046 owl_function_calculate_topmsg(OWL_DIRECTION_DOWNWARDS); 3047 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 3048 3049 } 3050 3021 3051 void owl_function_toggleoneline() 3022 3052 { 3023 char *style; 3024 3025 style=owl_global_get_style(&g); 3026 3027 if (strcmp(style, "oneline")) { 3028 owl_global_set_style(&g, "oneline"); 3053 owl_view *v; 3054 owl_style *s; 3055 3056 v=owl_global_get_current_view(&g); 3057 s=owl_view_get_style(v); 3058 3059 if (!owl_style_matches_name(s, "oneline")) { 3060 owl_function_change_style(v, "oneline"); 3029 3061 } else { 3030 owl_global_set_style(&g, owl_global_get_default_style(&g)); 3031 } 3032 } 3062 owl_function_change_style(v, owl_global_get_default_style(&g)); 3063 } 3064 3065 owl_messagelist_invalidate_formats(owl_global_get_msglist(&g)); 3066 owl_function_calculate_topmsg(OWL_DIRECTION_DOWNWARDS); 3067 owl_mainwin_redisplay(owl_global_get_mainwin(&g)); 3068 }
Note: See TracChangeset
for help on using the changeset viewer.