Ticket #64: boxsize.patch
File boxsize.patch, 1.8 KB (added by slavazanko, 16 years ago) |
---|
-
ChangeLog
1 2007-03-19 Martin Petricek <tux@centrum.cz> 2 3 * src/boxes.c: Dialog for selecting listing mode is up to 15 4 characters wider if size of the screen allows it. 5 -
src/boxes.c
143 143 const char *cancel_button = _("&Cancel"); 144 144 145 145 static int button_start = 30; 146 int extra_x = 0; 146 147 147 148 displays_status = _status; 148 149 … … 182 183 183 184 i18n_displays_flag = 1; 184 185 } 185 dd = create_dlg (0, 0, DISPLAY_Y, DISPLAY_X, dialog_colors, 186 187 /* Widen the dialog by up to 15 characters if screen is large enough */ 188 if (COLS > DISPLAY_X) { 189 extra_x = COLS - DISPLAY_X; 190 if (extra_x > 15) extra_x = 15; 191 } 192 193 dd = create_dlg (0, 0, DISPLAY_Y, DISPLAY_X + extra_x, dialog_colors, 186 194 display_callback, "[Listing Mode...]", display_title, 187 195 DLG_CENTER | DLG_REVERSE); 188 196 189 197 add_widget (dd, 190 button_new (4, button_start , B_CANCEL, NORMAL_BUTTON,198 button_new (4, button_start + extra_x, B_CANCEL, NORMAL_BUTTON, 191 199 cancel_button, 0)); 192 200 193 201 add_widget (dd, 194 button_new (3, button_start , B_ENTER, DEFPUSH_BUTTON,202 button_new (3, button_start + extra_x, B_ENTER, DEFPUSH_BUTTON, 195 203 ok_button, 0)); 196 204 197 205 status = 198 input_new (10, 9, INPUT_COLOR, DISPLAY_X - 14, _status[radio_sel],206 input_new (10, 9, INPUT_COLOR, DISPLAY_X + extra_x - 14, _status[radio_sel], 199 207 "mini-input"); 200 208 add_widget (dd, status); 201 209 input_set_point (status, 0); … … 205 213 add_widget (dd, check_status); 206 214 207 215 user = 208 input_new (7, 9, INPUT_COLOR, DISPLAY_X - 14, init_text,216 input_new (7, 9, INPUT_COLOR, DISPLAY_X + extra_x - 14, init_text, 209 217 "user-fmt-input"); 210 218 add_widget (dd, user); 211 219 input_set_point (user, 0);