Mercurial > hg > forks > yadex
comparison src/entry.cc @ 107:20aa5a515896
Reformat one line /* */ comments to //
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 06 Oct 2014 12:42:55 +0300 |
parents | 76ad709ed3c6 |
children |
comparison
equal
deleted
inserted
replaced
106:093497110727 | 107:20aa5a515896 |
---|---|
179 int entry_text_y1; | 179 int entry_text_y1; |
180 | 180 |
181 for (l = strlen(filename) + 1; l <= maxlen; l++) | 181 for (l = strlen(filename) + 1; l <= maxlen; l++) |
182 filename[l] = '\0'; | 182 filename[l] = '\0'; |
183 | 183 |
184 /* compute the width of the input box */ | 184 // compute the width of the input box |
185 if (maxlen > 20) | 185 if (maxlen > 20) |
186 boxlen = 20; | 186 boxlen = 20; |
187 else | 187 else |
188 boxlen = maxlen; | 188 boxlen = maxlen; |
189 | 189 |
197 if (y0 < 0) | 197 if (y0 < 0) |
198 y0 = (cfg.ScrMaxY - 2 * BOX_BORDER | 198 y0 = (cfg.ScrMaxY - 2 * BOX_BORDER |
199 - 2 * WIDE_VSPACING | 199 - 2 * WIDE_VSPACING |
200 - (int) (2.5 * FONTH) | 200 - (int) (2.5 * FONTH) |
201 - 2 * HOLLOW_BORDER - 2 * NARROW_VSPACING) / 2; | 201 - 2 * HOLLOW_BORDER - 2 * NARROW_VSPACING) / 2; |
202 /* draw the dialog box */ | 202 // draw the dialog box |
203 entry_out_x0 = x0 + BOX_BORDER + WIDE_HSPACING; | 203 entry_out_x0 = x0 + BOX_BORDER + WIDE_HSPACING; |
204 entry_text_x0 = entry_out_x0 + HOLLOW_BORDER + NARROW_HSPACING; | 204 entry_text_x0 = entry_out_x0 + HOLLOW_BORDER + NARROW_HSPACING; |
205 entry_text_x1 = entry_text_x0 + boxlen * FONTW - 1; | 205 entry_text_x1 = entry_text_x0 + boxlen * FONTW - 1; |
206 entry_out_x1 = entry_text_x1 + NARROW_HSPACING + HOLLOW_BORDER; | 206 entry_out_x1 = entry_text_x1 + NARROW_HSPACING + HOLLOW_BORDER; |
207 title_y0 = y0 + BOX_BORDER + WIDE_VSPACING; | 207 title_y0 = y0 + BOX_BORDER + WIDE_VSPACING; |
244 filename[l + 1] = '\0'; | 244 filename[l + 1] = '\0'; |
245 } | 245 } |
246 else if (l > 0 && key == YK_BACKSPACE) | 246 else if (l > 0 && key == YK_BACKSPACE) |
247 filename[l - 1] = '\0'; | 247 filename[l - 1] = '\0'; |
248 else if (key == YK_RETURN) | 248 else if (key == YK_RETURN) |
249 break; /* return "filename" */ | 249 break; // return "filename" |
250 else if (key == YK_ESC) | 250 else if (key == YK_ESC) |
251 { | 251 { |
252 filename[0] = '\0'; /* return an empty string */ | 252 filename[0] = '\0'; // return an empty string |
253 break; | 253 break; |
254 } | 254 } |
255 else | 255 else |
256 Beep(); | 256 Beep(); |
257 } | 257 } |