Ticket #1556: search_title_2.diff
File search_title_2.diff, 3.7 KB (added by dmartina, 15 years ago) |
---|
-
edit/editcmd_dialogs.c
136 136 editcmd_dialog_search_show (WEdit * edit, char **search_text) 137 137 { 138 139 138 if (*search_text == '\0') 140 139 *search_text = INPUT_LAST_TEXT; 141 140 142 141 { 142 int i; 143 143 gchar **list_of_types = mc_search_get_types_strings_array(); 144 144 int SEARCH_DLG_HEIGHT = SEARCH_DLG_MIN_HEIGHT + g_strv_length (list_of_types) - SEARCH_DLG_HEIGHT_SUPPLY; 145 145 146 int i;147 int btn_pos, dlg_width;148 146 int dialog_result; 149 147 … … 179 177 }; 180 178 179 #ifdef HAVE_CHARSET 180 int last_checkbox = 7; 181 #else 182 int last_checkbox = 6; 183 #endif 184 181 185 QuickDialog Quick_input = 182 186 { … … 187 191 188 192 #ifdef ENABLE_NLS 189 /* butons */ 193 /* header title */ 194 Quick_input.title = _(Quick_input.title); 195 /* buttons */ 190 196 for (i = 0; i < 3; i++) 191 197 quick_widgets[i].u.button.text = _(quick_widgets[i].u.button.text); 192 198 /* checkboxes */ 193 for (i = 3; i < 8; i++)199 for (i = 3; i <= last_checkbox; i++) 194 200 quick_widgets[i].u.checkbox.text = _(quick_widgets[i].u.checkbox.text); 195 201 /* label */ 196 202 quick_widgets[10].u.label.text = _(quick_widgets[10].u.label.text); 197 203 #endif 198 /* calculate button positions */ 199 btn_pos = 7; 200 201 for (i = 2; i >= 0; i--) { 202 quick_widgets[i].relative_x = btn_pos; 203 btn_pos += str_term_width1 (quick_widgets[i].u.button.text) + 7; 204 if (i == 2) /* default button */ 205 btn_pos += 2; 204 205 /* calculate widget coordinates */ 206 { 207 int len = 0; 208 int dlg_width; 209 gchar **radio = list_of_types; 210 int button_gap, b0_len, b1_len, b2_len; 211 212 /* length of radiobuttons */ 213 while (*radio != NULL) { 214 len = max (len, str_term_width1 (*radio)); 215 radio++; 216 } 217 /* length of checkboxes */ 218 for (i = 3; i <= last_checkbox; i++) 219 len = max (len, str_term_width1 (quick_widgets[i].u.checkbox.text) + 4); 220 221 /* preliminary dialog width */ 222 dlg_width = max (len * 2, str_term_width1 (Quick_input.title)) + 4; 223 224 /* length of buttons */ 225 b0_len = str_term_width1 (quick_widgets[0].u.button.text) + 3; 226 b1_len = str_term_width1 (quick_widgets[1].u.button.text) + 3; 227 b2_len = str_term_width1 (quick_widgets[2].u.button.text) + 5; 228 len = b0_len + b1_len + b2_len + 8; 229 230 /* dialog width */ 231 Quick_input.xlen = max (SEARCH_DLG_WIDTH, max (dlg_width, len)); 232 233 /* correct widget coordinates */ 234 for (i = 0; i < sizeof (quick_widgets)/sizeof (quick_widgets[0]); i++) 235 quick_widgets[i].x_divisions = Quick_input.xlen; 236 237 quick_widgets[9].u.input.len = Quick_input.xlen - 6; 238 239 /* checkbox positions */ 240 for (i = 3; i <= last_checkbox; i++) 241 quick_widgets[i].relative_x = Quick_input.xlen/2 + 2; 242 243 /* button positions */ 244 button_gap = ( Quick_input.xlen - len)/4; 245 quick_widgets[2].relative_x = 4 + button_gap; 246 quick_widgets[1].relative_x = 4 + button_gap*2 + b2_len; 247 quick_widgets[0].relative_x = Quick_input.xlen - 4 - button_gap - b0_len; 206 248 } 207 208 dlg_width = btn_pos + 2;209 210 /* correct widget coordinates */211 for (i = 0; i < sizeof (quick_widgets)/sizeof (quick_widgets[0]); i++)212 quick_widgets[i].x_divisions = dlg_width;213 249 214 250 dialog_result = quick_dialog (&Quick_input); -
po/ru.po
362 362 msgstr " Введите строку для поиска:" 363 363 364 #, fuzzy365 364 msgid "&Find all" 366 msgstr " Поиск файла"365 msgstr "На&йти всё" 367 366 368 367 msgid "Cancel"