Changeset 217a43e for variable.c
- Timestamp:
- Jul 3, 2002, 6:28:46 PM (22 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:
- 8df36cc
- Parents:
- 83a9b63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
variable.c
r039213e r217a43e 42 42 NULL } 43 43 44 #define OWLVAR_ENUM_FULL(name,default,docstring,validset,validate, set, get) \ 45 { name, OWL_VARIABLE_INT, NULL, default, validset, docstring, NULL, \ 46 validate, \ 47 set, owl_variable_enum_set_fromstring, \ 48 get, owl_variable_enum_get_tostring, \ 49 NULL } 50 44 51 static owl_variable variables_to_init[] = { 45 52 … … 78 85 "turn class logging on or off" ), 79 86 80 OWLVAR_ BOOL_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 0,81 "don't send zephyrs on C-d ",87 OWLVAR_ENUM_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 1, 88 "don't send zephyrs on C-d (or disable if in the middle of the message if set to 'middle')", "off,middle,on", 82 89 NULL, owl_variable_disable_ctrl_d_set, NULL), 83 90 … … 186 193 * any user setting of this */ 187 194 int owl_variable_disable_ctrl_d_set(owl_variable *v, void *newval) { 188 if (newval && !owl_context_is_startup(owl_global_get_context(&g)) 189 && (*(int*)newval == 1 || *(int*)newval == 0)) { 190 if (*(int*)newval) { 195 if (newval && !owl_context_is_startup(owl_global_get_context(&g))) { 196 if (*(int*)newval == 2) { 191 197 owl_function_command_norv("bindkey editmulti C-d command edit:delete-next-char"); 198 } else if (*(int*)newval == 1) { 199 owl_function_command_norv("bindkey editmulti C-d command editmulti:done-or-delete"); 192 200 } else { 193 201 owl_function_command_norv("bindkey editmulti C-d command editmulti:done"); 194 202 } 195 203 } 196 return owl_variable_ bool_set_default(v, newval);204 return owl_variable_int_set_default(v, newval); 197 205 } 198 206
Note: See TracChangeset
for help on using the changeset viewer.