diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-15 22:25:27 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-28 15:13:58 +0100 |
commit | bbbd08694b025d62faad878bfd210e24f85f8c04 (patch) | |
tree | 63e5da3dcd4b3e999b252b05688ef7acde16cb1e /src/gui | |
parent | 5434f4f9694965ca6d07e6f26be95d2e932d1097 (diff) | |
download | weechat-bbbd08694b025d62faad878bfd210e24f85f8c04.zip |
core: make get/set object properties case sensitive (issue #1872)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-bar.c | 30 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 224 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 6 | ||||
-rw-r--r-- | src/gui/gui-nicklist.c | 34 | ||||
-rw-r--r-- | src/gui/gui-window.c | 32 |
5 files changed, 163 insertions, 163 deletions
diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index 99e676fa5..6047ed07e 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -1219,76 +1219,76 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value) if (!bar || !property || !value) return 0; - if (string_strcasecmp (property, "name") == 0) + if (string_strcmp (property, "name") == 0) { gui_bar_set_name (bar, value); return 1; } - else if (string_strcasecmp (property, "hidden") == 0) + else if (string_strcmp (property, "hidden") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_HIDDEN], value, 1); return 1; } - else if (string_strcasecmp (property, "priority") == 0) + else if (string_strcmp (property, "priority") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_PRIORITY], value, 1); return 1; } - else if (string_strcasecmp (property, "conditions") == 0) + else if (string_strcmp (property, "conditions") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_CONDITIONS], value, 1); return 1; } - else if (string_strcasecmp (property, "position") == 0) + else if (string_strcmp (property, "position") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_POSITION], value, 1); return 1; } - else if (string_strcasecmp (property, "filling_top_bottom") == 0) + else if (string_strcmp (property, "filling_top_bottom") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_FILLING_TOP_BOTTOM], value, 1); return 1; } - else if (string_strcasecmp (property, "filling_left_right") == 0) + else if (string_strcmp (property, "filling_left_right") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_FILLING_LEFT_RIGHT], value, 1); return 1; } - else if (string_strcasecmp (property, "size") == 0) + else if (string_strcmp (property, "size") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE], value, 1); return 1; } - else if (string_strcasecmp (property, "size_max") == 0) + else if (string_strcmp (property, "size_max") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_SIZE_MAX], value, 1); return 1; } - else if (string_strcasecmp (property, "color_fg") == 0) + else if (string_strcmp (property, "color_fg") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_COLOR_FG], value, 1); gui_bar_refresh (bar); return 1; } - else if (string_strcasecmp (property, "color_delim") == 0) + else if (string_strcmp (property, "color_delim") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_COLOR_DELIM], value, 1); gui_bar_refresh (bar); return 1; } - else if (string_strcasecmp (property, "color_bg") == 0) + else if (string_strcmp (property, "color_bg") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_COLOR_BG], value, 1); gui_bar_refresh (bar); return 1; } - else if (string_strcasecmp (property, "color_bg_inactive") == 0) + else if (string_strcmp (property, "color_bg_inactive") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_COLOR_BG_INACTIVE], value, 1); gui_bar_refresh (bar); return 1; } - else if (string_strcasecmp (property, "separator") == 0) + else if (string_strcmp (property, "separator") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_SEPARATOR], (strcmp (value, "1") == 0) ? "on" : "off", @@ -1296,7 +1296,7 @@ gui_bar_set (struct t_gui_bar *bar, const char *property, const char *value) gui_bar_refresh (bar); return 1; } - else if (string_strcasecmp (property, "items") == 0) + else if (string_strcmp (property, "items") == 0) { config_file_option_set (bar->options[GUI_BAR_OPTION_ITEMS], value, 1); gui_bar_draw (bar); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 9130068df..40fc82177 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1233,91 +1233,91 @@ gui_buffer_get_integer (struct t_gui_buffer *buffer, const char *property) if (!buffer || !property) return 0; - if (string_strcasecmp (property, "number") == 0) + if (string_strcmp (property, "number") == 0) return buffer->number; - else if (string_strcasecmp (property, "layout_number") == 0) + else if (string_strcmp (property, "layout_number") == 0) return buffer->layout_number; - else if (string_strcasecmp (property, "layout_number_merge_order") == 0) + else if (string_strcmp (property, "layout_number_merge_order") == 0) return buffer->layout_number_merge_order; - else if (string_strcasecmp (property, "short_name_is_set") == 0) + else if (string_strcmp (property, "short_name_is_set") == 0) return (buffer->short_name) ? 1 : 0; - else if (string_strcasecmp (property, "type") == 0) + else if (string_strcmp (property, "type") == 0) return buffer->type; - else if (string_strcasecmp (property, "notify") == 0) + else if (string_strcmp (property, "notify") == 0) return buffer->notify; - else if (string_strcasecmp (property, "num_displayed") == 0) + else if (string_strcmp (property, "num_displayed") == 0) return buffer->num_displayed; - else if (string_strcasecmp (property, "active") == 0) + else if (string_strcmp (property, "active") == 0) return buffer->active; - else if (string_strcasecmp (property, "hidden") == 0) + else if (string_strcmp (property, "hidden") == 0) return buffer->hidden; - else if (string_strcasecmp (property, "zoomed") == 0) + else if (string_strcmp (property, "zoomed") == 0) return buffer->zoomed; - else if (string_strcasecmp (property, "print_hooks_enabled") == 0) + else if (string_strcmp (property, "print_hooks_enabled") == 0) return buffer->print_hooks_enabled; - else if (string_strcasecmp (property, "day_change") == 0) + else if (string_strcmp (property, "day_change") == 0) return buffer->day_change; - else if (string_strcasecmp (property, "clear") == 0) + else if (string_strcmp (property, "clear") == 0) return buffer->clear; - else if (string_strcasecmp (property, "filter") == 0) + else if (string_strcmp (property, "filter") == 0) return buffer->filter; - else if (string_strcasecmp (property, "closing") == 0) + else if (string_strcmp (property, "closing") == 0) return buffer->closing; - else if (string_strcasecmp (property, "lines_hidden") == 0) + else if (string_strcmp (property, "lines_hidden") == 0) return buffer->lines->lines_hidden; - else if (string_strcasecmp (property, "prefix_max_length") == 0) + else if (string_strcmp (property, "prefix_max_length") == 0) return buffer->lines->prefix_max_length; - else if (string_strcasecmp (property, "next_line_id") == 0) + else if (string_strcmp (property, "next_line_id") == 0) return buffer->next_line_id; - else if (string_strcasecmp (property, "time_for_each_line") == 0) + else if (string_strcmp (property, "time_for_each_line") == 0) return buffer->time_for_each_line; - else if (string_strcasecmp (property, "nicklist") == 0) + else if (string_strcmp (property, "nicklist") == 0) return buffer->nicklist; - else if (string_strcasecmp (property, "nicklist_case_sensitive") == 0) + else if (string_strcmp (property, "nicklist_case_sensitive") == 0) return buffer->nicklist_case_sensitive; - else if (string_strcasecmp (property, "nicklist_max_length") == 0) + else if (string_strcmp (property, "nicklist_max_length") == 0) return buffer->nicklist_max_length; - else if (string_strcasecmp (property, "nicklist_display_groups") == 0) + else if (string_strcmp (property, "nicklist_display_groups") == 0) return buffer->nicklist_display_groups; - else if (string_strcasecmp (property, "nicklist_count") == 0) + else if (string_strcmp (property, "nicklist_count") == 0) return buffer->nicklist_count; - else if (string_strcasecmp (property, "nicklist_visible_count") == 0) + else if (string_strcmp (property, "nicklist_visible_count") == 0) return buffer->nicklist_visible_count; - else if (string_strcasecmp (property, "nicklist_groups_count") == 0) + else if (string_strcmp (property, "nicklist_groups_count") == 0) return buffer->nicklist_groups_count; - else if (string_strcasecmp (property, "nicklist_groups_visible_count") == 0) + else if (string_strcmp (property, "nicklist_groups_visible_count") == 0) return buffer->nicklist_groups_visible_count; - else if (string_strcasecmp (property, "nicklist_nicks_count") == 0) + else if (string_strcmp (property, "nicklist_nicks_count") == 0) return buffer->nicklist_nicks_count; - else if (string_strcasecmp (property, "nicklist_nicks_visible_count") == 0) + else if (string_strcmp (property, "nicklist_nicks_visible_count") == 0) return buffer->nicklist_nicks_visible_count; - else if (string_strcasecmp (property, "input") == 0) + else if (string_strcmp (property, "input") == 0) return buffer->input; - else if (string_strcasecmp (property, "input_get_unknown_commands") == 0) + else if (string_strcmp (property, "input_get_unknown_commands") == 0) return buffer->input_get_unknown_commands; - else if (string_strcasecmp (property, "input_get_empty") == 0) + else if (string_strcmp (property, "input_get_empty") == 0) return buffer->input_get_empty; - else if (string_strcasecmp (property, "input_multiline") == 0) + else if (string_strcmp (property, "input_multiline") == 0) return buffer->input_multiline; - else if (string_strcasecmp (property, "input_size") == 0) + else if (string_strcmp (property, "input_size") == 0) return buffer->input_buffer_size; - else if (string_strcasecmp (property, "input_length") == 0) + else if (string_strcmp (property, "input_length") == 0) return buffer->input_buffer_length; - else if (string_strcasecmp (property, "input_pos") == 0) + else if (string_strcmp (property, "input_pos") == 0) return buffer->input_buffer_pos; - else if (string_strcasecmp (property, "input_1st_display") == 0) + else if (string_strcmp (property, "input_1st_display") == 0) return buffer->input_buffer_1st_display; - else if (string_strcasecmp (property, "num_history") == 0) + else if (string_strcmp (property, "num_history") == 0) return buffer->num_history; - else if (string_strcasecmp (property, "text_search") == 0) + else if (string_strcmp (property, "text_search") == 0) return buffer->text_search; - else if (string_strcasecmp (property, "text_search_exact") == 0) + else if (string_strcmp (property, "text_search_exact") == 0) return buffer->text_search_exact; - else if (string_strcasecmp (property, "text_search_regex") == 0) + else if (string_strcmp (property, "text_search_regex") == 0) return buffer->text_search_regex; - else if (string_strcasecmp (property, "text_search_where") == 0) + else if (string_strcmp (property, "text_search_where") == 0) return buffer->text_search_where; - else if (string_strcasecmp (property, "text_search_found") == 0) + else if (string_strcmp (property, "text_search_found") == 0) return buffer->text_search_found; return 0; @@ -1335,35 +1335,35 @@ gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property) if (!buffer || !property) return NULL; - if (string_strcasecmp (property, "plugin") == 0) + if (string_strcmp (property, "plugin") == 0) return gui_buffer_get_plugin_name (buffer); - else if (string_strcasecmp (property, "name") == 0) + else if (string_strcmp (property, "name") == 0) return buffer->name; - else if (string_strcasecmp (property, "full_name") == 0) + else if (string_strcmp (property, "full_name") == 0) return buffer->full_name; - else if (string_strcasecmp (property, "old_full_name") == 0) + else if (string_strcmp (property, "old_full_name") == 0) return buffer->old_full_name; - else if (string_strcasecmp (property, "short_name") == 0) + else if (string_strcmp (property, "short_name") == 0) return gui_buffer_get_short_name (buffer); - else if (string_strcasecmp (property, "title") == 0) + else if (string_strcmp (property, "title") == 0) return buffer->title; - else if (string_strcasecmp (property, "input") == 0) + else if (string_strcmp (property, "input") == 0) return buffer->input_buffer; - else if (string_strcasecmp (property, "text_search_input") == 0) + else if (string_strcmp (property, "text_search_input") == 0) return buffer->text_search_input; - else if (string_strcasecmp (property, "highlight_words") == 0) + else if (string_strcmp (property, "highlight_words") == 0) return buffer->highlight_words; - else if (string_strcasecmp (property, "highlight_disable_regex") == 0) + else if (string_strcmp (property, "highlight_disable_regex") == 0) return buffer->highlight_disable_regex; - else if (string_strcasecmp (property, "highlight_regex") == 0) + else if (string_strcmp (property, "highlight_regex") == 0) return buffer->highlight_regex; - else if (string_strcasecmp (property, "highlight_tags_restrict") == 0) + else if (string_strcmp (property, "highlight_tags_restrict") == 0) return buffer->highlight_tags_restrict; - else if (string_strcasecmp (property, "highlight_tags") == 0) + else if (string_strcmp (property, "highlight_tags") == 0) return buffer->highlight_tags; - else if (string_strcasecmp (property, "hotlist_max_level_nicks") == 0) + else if (string_strcmp (property, "hotlist_max_level_nicks") == 0) return hashtable_get_string (buffer->hotlist_max_level_nicks, "keys_values"); - else if (string_strncasecmp (property, "localvar_", 9) == 0) + else if (string_strncmp (property, "localvar_", 9) == 0) { ptr_value = (const char *)hashtable_get (buffer->local_variables, property + 9); @@ -1384,13 +1384,13 @@ gui_buffer_get_pointer (struct t_gui_buffer *buffer, const char *property) if (!buffer || !property) return NULL; - if (string_strcasecmp (property, "plugin") == 0) + if (string_strcmp (property, "plugin") == 0) return buffer->plugin; - else if (string_strcasecmp (property, "text_search_regex_compiled") == 0) + else if (string_strcmp (property, "text_search_regex_compiled") == 0) return buffer->text_search_regex_compiled; - else if (string_strcasecmp (property, "highlight_disable_regex_compiled") == 0) + else if (string_strcmp (property, "highlight_disable_regex_compiled") == 0) return buffer->highlight_disable_regex_compiled; - else if (string_strcasecmp (property, "highlight_regex_compiled") == 0) + else if (string_strcmp (property, "highlight_regex_compiled") == 0) return buffer->highlight_regex_compiled; return NULL; @@ -2157,7 +2157,7 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, return; /* properties with optional buffer */ - if (string_strcasecmp (property, "hotlist") == 0) + if (string_strcmp (property, "hotlist") == 0) { if (strcmp (value, "-") == 0) gui_add_hotlist = 0; @@ -2184,7 +2184,7 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, } } } - else if (string_strcasecmp (property, "completion_freeze") == 0) + else if (string_strcmp (property, "completion_freeze") == 0) { gui_completion_freeze = (strcmp (value, "1") == 0) ? 1 : 0; } @@ -2193,12 +2193,12 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, return; /* properties that need a buffer */ - if (string_strcasecmp (property, "unread") == 0) + if (string_strcmp (property, "unread") == 0) { remove_marker = (strcmp (value, "0") == 0); gui_buffer_set_unread (buffer, remove_marker); } - else if (string_strcasecmp (property, "display") == 0) + else if (string_strcmp (property, "display") == 0) { /* * if it is auto-switch to a buffer, then we don't set read marker, @@ -2206,10 +2206,10 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, * switch */ gui_window_switch_to_buffer (gui_current_window, buffer, - (string_strcasecmp (value, "auto") == 0) ? + (string_strcmp (value, "auto") == 0) ? 0 : 1); } - else if (string_strcasecmp (property, "hidden") == 0) + else if (string_strcmp (property, "hidden") == 0) { error = NULL; number = strtol (value, &error, 10); @@ -2221,14 +2221,14 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_buffer_unhide (buffer); } } - else if (string_strcasecmp (property, "print_hooks_enabled") == 0) + else if (string_strcmp (property, "print_hooks_enabled") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) buffer->print_hooks_enabled = (number) ? 1 : 0; } - else if (string_strcasecmp (property, "day_change") == 0) + else if (string_strcmp (property, "day_change") == 0) { error = NULL; number = strtol (value, &error, 10); @@ -2238,14 +2238,14 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_buffer_ask_chat_refresh (buffer, 2); } } - else if (string_strcasecmp (property, "clear") == 0) + else if (string_strcmp (property, "clear") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) buffer->clear = (number) ? 1 : 0; } - else if (string_strcasecmp (property, "filter") == 0) + else if (string_strcmp (property, "filter") == 0) { error = NULL; number = strtol (value, &error, 10); @@ -2255,29 +2255,29 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_filter_buffer (buffer, NULL); } } - else if (string_strcasecmp (property, "number") == 0) + else if (string_strcmp (property, "number") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0] && (number >= 1)) gui_buffer_move_to_number (buffer, number); } - else if (string_strcasecmp (property, "name") == 0) + else if (string_strcmp (property, "name") == 0) { gui_buffer_set_name (buffer, value); } - else if (string_strcasecmp (property, "short_name") == 0) + else if (string_strcmp (property, "short_name") == 0) { gui_buffer_set_short_name (buffer, value); } - else if (string_strcasecmp (property, "type") == 0) + else if (string_strcmp (property, "type") == 0) { - if (string_strcasecmp (value, "formatted") == 0) + if (string_strcmp (value, "formatted") == 0) gui_buffer_set_type (buffer, GUI_BUFFER_TYPE_FORMATTED); - else if (string_strcasecmp (value, "free") == 0) + else if (string_strcmp (value, "free") == 0) gui_buffer_set_type (buffer, GUI_BUFFER_TYPE_FREE); } - else if (string_strcasecmp (property, "notify") == 0) + else if (string_strcmp (property, "notify") == 0) { ptr_notify = NULL; error = NULL; @@ -2303,83 +2303,83 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, gui_chat_mute = gui_chat_mute_old; } } - else if (string_strcasecmp (property, "title") == 0) + else if (string_strcmp (property, "title") == 0) { gui_buffer_set_title (buffer, value); } - else if (string_strcasecmp (property, "time_for_each_line") == 0) + else if (string_strcmp (property, "time_for_each_line") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_time_for_each_line (buffer, number); } - else if (string_strcasecmp (property, "nicklist") == 0) + else if (string_strcmp (property, "nicklist") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_nicklist (buffer, number); } - else if (string_strcasecmp (property, "nicklist_case_sensitive") == 0) + else if (string_strcmp (property, "nicklist_case_sensitive") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_nicklist_case_sensitive (buffer, number); } - else if (string_strcasecmp (property, "nicklist_display_groups") == 0) + else if (string_strcmp (property, "nicklist_display_groups") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_nicklist_display_groups (buffer, number); } - else if (string_strcasecmp (property, "highlight_words") == 0) + else if (string_strcmp (property, "highlight_words") == 0) { gui_buffer_set_highlight_words (buffer, value); } - else if (string_strcasecmp (property, "highlight_words_add") == 0) + else if (string_strcmp (property, "highlight_words_add") == 0) { gui_buffer_add_highlight_words (buffer, value); } - else if (string_strcasecmp (property, "highlight_words_del") == 0) + else if (string_strcmp (property, "highlight_words_del") == 0) { gui_buffer_remove_highlight_words (buffer, value); } - else if (string_strcasecmp (property, "highlight_disable_regex") == 0) + else if (string_strcmp (property, "highlight_disable_regex") == 0) { gui_buffer_set_highlight_disable_regex (buffer, value); } - else if (string_strcasecmp (property, "highlight_regex") == 0) + else if (string_strcmp (property, "highlight_regex") == 0) { gui_buffer_set_highlight_regex (buffer, value); } - else if (string_strcasecmp (property, "highlight_tags_restrict") == 0) + else if (string_strcmp (property, "highlight_tags_restrict") == 0) { gui_buffer_set_highlight_tags_restrict (buffer, value); } - else if (string_strcasecmp (property, "highlight_tags") == 0) + else if (string_strcmp (property, "highlight_tags") == 0) { gui_buffer_set_highlight_tags (buffer, value); } - else if (string_strcasecmp (property, "hotlist_max_level_nicks") == 0) + else if (string_strcmp (property, "hotlist_max_level_nicks") == 0) { gui_buffer_set_hotlist_max_level_nicks (buffer, value); } - else if (string_strcasecmp (property, "hotlist_max_level_nicks_add") == 0) + else if (string_strcmp (property, "hotlist_max_level_nicks_add") == 0) { gui_buffer_add_hotlist_max_level_nicks (buffer, value); } - else if (string_strcasecmp (property, "hotlist_max_level_nicks_del") == 0) + else if (string_strcmp (property, "hotlist_max_level_nicks_del") == 0) { gui_buffer_remove_hotlist_max_level_nicks (buffer, value); } - else if (string_strncasecmp (property, "key_bind_", 9) == 0) + else if (string_strncmp (property, "key_bind_", 9) == 0) { gui_key_bind (buffer, 0, property + 9, value); } - else if (string_strncasecmp (property, "key_unbind_", 11) == 0) + else if (string_strncmp (property, "key_unbind_", 11) == 0) { if (strcmp (property + 11, "*") == 0) { @@ -2389,7 +2389,7 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, else gui_key_unbind (buffer, 0, property + 11); } - else if (string_strcasecmp (property, "input") == 0) + else if (string_strcmp (property, "input") == 0) { gui_buffer_undo_snap (buffer); gui_input_replace_input (buffer, value); @@ -2397,40 +2397,40 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, 1, /* save undo */ 1); /* stop completion */ } - else if (string_strcasecmp (property, "input_pos") == 0) + else if (string_strcmp (property, "input_pos") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_input_set_pos (buffer, number); } - else if (string_strcasecmp (property, "input_get_unknown_commands") == 0) + else if (string_strcmp (property, "input_get_unknown_commands") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_input_get_unknown_commands (buffer, number); } - else if (string_strcasecmp (property, "input_get_empty") == 0) + else if (string_strcmp (property, "input_get_empty") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_input_get_empty (buffer, number); } - else if (string_strcasecmp (property, "input_multiline") == 0) + else if (string_strcmp (property, "input_multiline") == 0) { error = NULL; number = strtol (value, &error, 10); if (error && !error[0]) gui_buffer_set_input_multiline (buffer, number); } - else if (string_strncasecmp (property, "localvar_set_", 13) == 0) + else if (string_strncmp (property, "localvar_set_", 13) == 0) { if (value) gui_buffer_local_var_add (buffer, property + 13, value); } - else if (string_strncasecmp (property, "localvar_del_", 13) == 0) + else if (string_strncmp (property, "localvar_del_", 13) == 0) { gui_buffer_local_var_remove (buffer, property + 13); } @@ -2447,39 +2447,39 @@ gui_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property, if (!buffer || !property) return; - if (string_strcasecmp (property, "close_callback") == 0) + if (string_strcmp (property, "close_callback") == 0) { buffer->close_callback = pointer; } - else if (string_strcasecmp (property, "close_callback_pointer") == 0) + else if (string_strcmp (property, "close_callback_pointer") == 0) { buffer->close_callback_pointer = pointer; } - else if (string_strcasecmp (property, "close_callback_data") == 0) + else if (string_strcmp (property, "close_callback_data") == 0) { buffer->close_callback_data = pointer; } - else if (string_strcasecmp (property, "nickcmp_callback") == 0) + else if (string_strcmp (property, "nickcmp_callback") == 0) { buffer->nickcmp_callback = pointer; } - else if (string_strcasecmp (property, "nickcmp_callback_pointer") == 0) + else if (string_strcmp (property, "nickcmp_callback_pointer") == 0) { buffer->nickcmp_callback_pointer = pointer; } - else if (string_strcasecmp (property, "nickcmp_callback_data") == 0) + else if (string_strcmp (property, "nickcmp_callback_data") == 0) { buffer->nickcmp_callback_data = pointer; } - else if (string_strcasecmp (property, "input_callback") == 0) + else if (string_strcmp (property, "input_callback") == 0) { buffer->input_callback = pointer; } - else if (string_strcasecmp (property, "input_callback_pointer") == 0) + else if (string_strcmp (property, "input_callback_pointer") == 0) { buffer->input_callback_pointer = pointer; } - else if (string_strcasecmp (property, "input_callback_data") == 0) + else if (string_strcmp (property, "input_callback_data") == 0) { buffer->input_callback_data = pointer; } diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index fde406f20..1b3f61e96 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -1497,11 +1497,11 @@ gui_completion_get_string (struct t_gui_completion *completion, { if (completion) { - if (string_strcasecmp (property, "base_command") == 0) + if (string_strcmp (property, "base_command") == 0) return completion->base_command; - else if (string_strcasecmp (property, "base_word") == 0) + else if (string_strcmp (property, "base_word") == 0) return completion->base_word; - else if (string_strcasecmp (property, "args") == 0) + else if (string_strcmp (property, "args") == 0) return completion->args; } diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index 0c6946778..4b400775b 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -834,9 +834,9 @@ gui_nicklist_group_get_integer (struct t_gui_buffer *buffer, if (group && property) { - if (string_strcasecmp (property, "visible") == 0) + if (string_strcmp (property, "visible") == 0) return group->visible; - else if (string_strcasecmp (property, "level") == 0) + else if (string_strcmp (property, "level") == 0) return group->level; } @@ -857,9 +857,9 @@ gui_nicklist_group_get_string (struct t_gui_buffer *buffer, if (group && property) { - if (string_strcasecmp (property, "name") == 0) + if (string_strcmp (property, "name") == 0) return group->name; - else if (string_strcasecmp (property, "color") == 0) + else if (string_strcmp (property, "color") == 0) return group->color; } @@ -880,7 +880,7 @@ gui_nicklist_group_get_pointer (struct t_gui_buffer *buffer, if (group && property) { - if (string_strcasecmp (property, "parent") == 0) + if (string_strcmp (property, "parent") == 0) return group->parent; } @@ -905,14 +905,14 @@ gui_nicklist_group_set (struct t_gui_buffer *buffer, group_changed = 0; - if (string_strcasecmp (property, "color") == 0) + if (string_strcmp (property, "color") == 0) { if (group->color) string_shared_free (group->color); group->color = (value[0]) ? (char *)string_shared_get (value) : NULL; group_changed = 1; } - else if (string_strcasecmp (property, "visible") == 0) + else if (string_strcmp (property, "visible") == 0) { error = NULL; number = strtol (value, &error, 10); @@ -943,7 +943,7 @@ gui_nicklist_nick_get_integer (struct t_gui_buffer *buffer, if (nick && property) { - if (string_strcasecmp (property, "visible") == 0) + if (string_strcmp (property, "visible") == 0) return nick->visible; } @@ -964,13 +964,13 @@ gui_nicklist_nick_get_string (struct t_gui_buffer *buffer, if (nick && property) { - if (string_strcasecmp (property, "name") == 0) + if (string_strcmp (property, "name") == 0) return nick->name; - else if (string_strcasecmp (property, "color") == 0) + else if (string_strcmp (property, "color") == 0) return nick->color; - else if (string_strcasecmp (property, "prefix") == 0) + else if (string_strcmp (property, "prefix") == 0) return nick->prefix; - else if (string_strcasecmp (property, "prefix_color") == 0) + else if (string_strcmp (property, "prefix_color") == 0) return nick->prefix_color; } @@ -991,7 +991,7 @@ gui_nicklist_nick_get_pointer (struct t_gui_buffer *buffer, if (nick && property) { - if (string_strcasecmp (property, "group") == 0) + if (string_strcmp (property, "group") == 0) return nick->group; } @@ -1016,28 +1016,28 @@ gui_nicklist_nick_set (struct t_gui_buffer *buffer, nick_changed = 0; - if (string_strcasecmp (property, "color") == 0) + if (string_strcmp (property, "color") == 0) { if (nick->color) string_shared_free (nick->color); nick->color = (value[0]) ? (char *)string_shared_get (value) : NULL; nick_changed = 1; } - else if (string_strcasecmp (property, "prefix") == 0) + else if (string_strcmp (property, "prefix") == 0) { if (nick->prefix) string_shared_free (nick->prefix); nick->prefix = (value[0]) ? (char *)string_shared_get (value) : NULL; nick_changed = 1; } - else if (string_strcasecmp (property, "prefix_color") == 0) + else if (string_strcmp (property, "prefix_color") == 0) { if (nick->prefix_color) string_shared_free (nick->prefix_color); nick->prefix_color = (value[0]) ? (char *)string_shared_get (value) : NULL; nick_changed = 1; } - else if (string_strcasecmp (property, "visible") == 0) + else if (string_strcmp (property, "visible") == 0) { error = NULL; number = strtol (value, &error, 10); diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 0f2009eaf..6abd65584 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -771,33 +771,33 @@ gui_window_get_integer (struct t_gui_window *window, const char *property) if (!window || !property) return 0; - if (string_strcasecmp (property, "number") == 0) + if (string_strcmp (property, "number") == 0) return window->number; - if (string_strcasecmp (property, "win_x") == 0) + if (string_strcmp (property, "win_x") == 0) return window->win_x; - if (string_strcasecmp (property, "win_y") == 0) + if (string_strcmp (property, "win_y") == 0) return window->win_y; - if (string_strcasecmp (property, "win_width") == 0) + if (string_strcmp (property, "win_width") == 0) return window->win_width; - if (string_strcasecmp (property, "win_height") == 0) + if (string_strcmp (property, "win_height") == 0) return window->win_height; - if (string_strcasecmp (property, "win_width_pct") == 0) + if (string_strcmp (property, "win_width_pct") == 0) return window->win_width_pct; - if (string_strcasecmp (property, "win_height_pct") == 0) + if (string_strcmp (property, "win_height_pct") == 0) return window->win_height_pct; - if (string_strcasecmp (property, "win_chat_x") == 0) + if (string_strcmp (property, "win_chat_x") == 0) return window->win_chat_x; - if (string_strcasecmp (property, "win_chat_y") == 0) + if (string_strcmp (property, "win_chat_y") == 0) return window->win_chat_y; - if (string_strcasecmp (property, "win_chat_width") == 0) + if (string_strcmp (property, "win_chat_width") == 0) return window->win_chat_width; - if (string_strcasecmp (property, "win_chat_height") == 0) + if (string_strcmp (property, "win_chat_height") == 0) return window->win_chat_height; - if (string_strcasecmp (property, "first_line_displayed") == 0) + if (string_strcmp (property, "first_line_displayed") == 0) return window->scroll->first_line_displayed; - if (string_strcasecmp (property, "scrolling") == 0) + if (string_strcmp (property, "scrolling") == 0) return window->scroll->scrolling; - if (string_strcasecmp (property, "lines_after") == 0) + if (string_strcmp (property, "lines_after") == 0) return window->scroll->lines_after; return 0; @@ -825,12 +825,12 @@ gui_window_get_pointer (struct t_gui_window *window, const char *property) { if (property) { - if (string_strcasecmp (property, "current") == 0) + if (string_strcmp (property, "current") == 0) return gui_current_window; if (window) { - if (string_strcasecmp (property, "buffer") == 0) + if (string_strcmp (property, "buffer") == 0) return window->buffer; } } |