Browse Source

Remove 'All charsets' checkbox from all search dialogs when specified '--disable-charsets' configure option

Slava Zanko 16 years ago
parent
commit
17343149d6
3 changed files with 14 additions and 1 deletions
  1. 4 0
      edit/editcmd_dialogs.c
  2. 8 1
      src/find.c
  3. 2 0
      src/view.c

+ 4 - 0
edit/editcmd_dialogs.c

@@ -106,8 +106,10 @@ editcmd_dialog_replace_show (WEdit * edit, const char *search_default, const cha
         {quick_radio, 33, REPLACE_DLG_WIDTH, 10, REPLACE_DLG_HEIGHT, "", 2, treplace_mode,
          &treplace_mode, const_cast (char **, replace_mode_str), NULL, NULL, NULL},
 
+#ifdef HAVE_CHARSET
         {quick_checkbox, 33, REPLACE_DLG_WIDTH, 9, REPLACE_DLG_HEIGHT, N_("All charsets"), 0, 0,
          &tall_codepages, 0, NULL, NULL, NULL},
+#endif
 
         {quick_checkbox, 33, REPLACE_DLG_WIDTH, 8, REPLACE_DLG_HEIGHT, N_("&Backwards"), 0, 0,
          &treplace_backwards, 0, NULL, NULL, NULL},
@@ -184,8 +186,10 @@ editcmd_dialog_search_show (WEdit * edit, char **search_text)
         {quick_button, 2, 10, 9, SEARCH_DLG_HEIGHT, N_("&OK"), 0, B_ENTER, 0,
          0, NULL, NULL, NULL},
 
+#ifdef HAVE_CHARSET
         {quick_checkbox, 33, SEARCH_DLG_WIDTH, 7, SEARCH_DLG_HEIGHT, N_("All charsets"), 0, 0,
          &tall_codepages, 0, NULL, NULL, NULL},
+#endif
 
         {quick_checkbox, 33, SEARCH_DLG_WIDTH, 6, SEARCH_DLG_HEIGHT, N_("&Backwards"), 0, 0,
          &tsearch_backwards, 0, NULL, NULL, NULL},

+ 8 - 1
src/find.c

@@ -285,22 +285,29 @@ find_parameters (char **start_dir, char **pattern, char **content)
     file_regexp_cbox = check_new (6, 3, file_regexp_flag, file_regexp_label);
     recursively_cbox = check_new (7, 3, find_recursively, recurs_label);
     skip_hidden_cbox = check_new (6, 33, skip_hidden_flag, skip_hidden_label);
+#ifdef HAVE_CHARSET
     file_all_charsets_cbox = check_new (7, 33, file_all_charsets_flag, all_charsets_label);
-
+#endif
 
     find_regex_cbox = check_new (11, 3, content_regexp_flag, regexp_label);
     case_sense = check_new (10, 3, content_case_sensitive, case_label);
+#ifdef HAVE_CHARSET
     content_all_charsets_cbox = check_new (10, 33, content_all_charsets_flag, all_charsets_label);
+#endif
 
     in_with = input_new (9, istart, INPUT_COLOR, ilen, in_contents, "content", INPUT_COMPLETE_DEFAULT);
     in_name = input_new (5, istart, INPUT_COLOR, ilen, in_start_name, "name", INPUT_COMPLETE_DEFAULT);
     in_start = input_new (3, istart, INPUT_COLOR, ilen, in_start_dir, "start", INPUT_COMPLETE_DEFAULT);
 
+#ifdef HAVE_CHARSET
     add_widget (find_dlg, content_all_charsets_cbox);
+#endif
     add_widget (find_dlg, find_regex_cbox);
     add_widget (find_dlg, case_sense);
     add_widget (find_dlg, in_with);
+#ifdef HAVE_CHARSET
     add_widget (find_dlg, file_all_charsets_cbox);
+#endif
     add_widget (find_dlg, skip_hidden_cbox);
     add_widget (find_dlg, recursively_cbox);
     add_widget (find_dlg, file_regexp_cbox);

+ 2 - 0
src/view.c

@@ -3241,8 +3241,10 @@ view_search_cmd (WView *view)
 	{quick_button, 2, 10, SEARCH_DLG_HEIGHT - 3, SEARCH_DLG_HEIGHT , N_("&OK"), 0, B_ENTER,
 	 0, 0, NULL, NULL, NULL},
 
+#ifdef HAVE_CHARSET
         {quick_checkbox, SEARCH_DLG_WIDTH/2 + 3, SEARCH_DLG_WIDTH, 6, SEARCH_DLG_HEIGHT, N_("All charsets"), 0, 0,
          &tall_codepages, 0, NULL, NULL, NULL},
+#endif
 
 	{quick_checkbox, SEARCH_DLG_WIDTH/2 + 3, SEARCH_DLG_WIDTH, 5, SEARCH_DLG_HEIGHT,
 	 N_("&Backwards"), 0, 0, &tsearch_backwards, 0, NULL, NULL, NULL},