mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: make get/set object properties case sensitive (issue #1872)
This commit is contained in:
+19
-19
@@ -2106,17 +2106,17 @@ config_file_option_get_string (struct t_config_option *option,
|
||||
if (!option || !property)
|
||||
return NULL;
|
||||
|
||||
if (string_strcasecmp (property, "config_name") == 0)
|
||||
if (string_strcmp (property, "config_name") == 0)
|
||||
return option->config_file->name;
|
||||
else if (string_strcasecmp (property, "section_name") == 0)
|
||||
else if (string_strcmp (property, "section_name") == 0)
|
||||
return option->section->name;
|
||||
else if (string_strcasecmp (property, "name") == 0)
|
||||
else if (string_strcmp (property, "name") == 0)
|
||||
return option->name;
|
||||
else if (string_strcasecmp (property, "parent_name") == 0)
|
||||
else if (string_strcmp (property, "parent_name") == 0)
|
||||
return option->parent_name;
|
||||
else if (string_strcasecmp (property, "type") == 0)
|
||||
else if (string_strcmp (property, "type") == 0)
|
||||
return config_option_type_string[option->type];
|
||||
else if (string_strcasecmp (property, "description") == 0)
|
||||
else if (string_strcmp (property, "description") == 0)
|
||||
return option->description;
|
||||
|
||||
return NULL;
|
||||
@@ -2133,31 +2133,31 @@ config_file_option_get_pointer (struct t_config_option *option,
|
||||
if (!option || !property)
|
||||
return NULL;
|
||||
|
||||
if (string_strcasecmp (property, "config_file") == 0)
|
||||
if (string_strcmp (property, "config_file") == 0)
|
||||
return option->config_file;
|
||||
else if (string_strcasecmp (property, "section") == 0)
|
||||
else if (string_strcmp (property, "section") == 0)
|
||||
return option->section;
|
||||
else if (string_strcasecmp (property, "name") == 0)
|
||||
else if (string_strcmp (property, "name") == 0)
|
||||
return option->name;
|
||||
else if (string_strcasecmp (property, "parent_name") == 0)
|
||||
else if (string_strcmp (property, "parent_name") == 0)
|
||||
return option->parent_name;
|
||||
else if (string_strcasecmp (property, "type") == 0)
|
||||
else if (string_strcmp (property, "type") == 0)
|
||||
return &option->type;
|
||||
else if (string_strcasecmp (property, "description") == 0)
|
||||
else if (string_strcmp (property, "description") == 0)
|
||||
return option->description;
|
||||
else if (string_strcasecmp (property, "string_values") == 0)
|
||||
else if (string_strcmp (property, "string_values") == 0)
|
||||
return option->string_values;
|
||||
else if (string_strcasecmp (property, "min") == 0)
|
||||
else if (string_strcmp (property, "min") == 0)
|
||||
return &option->min;
|
||||
else if (string_strcasecmp (property, "max") == 0)
|
||||
else if (string_strcmp (property, "max") == 0)
|
||||
return &option->max;
|
||||
else if (string_strcasecmp (property, "default_value") == 0)
|
||||
else if (string_strcmp (property, "default_value") == 0)
|
||||
return option->default_value;
|
||||
else if (string_strcasecmp (property, "value") == 0)
|
||||
else if (string_strcmp (property, "value") == 0)
|
||||
return option->value;
|
||||
else if (string_strcasecmp (property, "prev_option") == 0)
|
||||
else if (string_strcmp (property, "prev_option") == 0)
|
||||
return option->prev_option;
|
||||
else if (string_strcasecmp (property, "next_option") == 0)
|
||||
else if (string_strcmp (property, "next_option") == 0)
|
||||
return option->next_option;
|
||||
|
||||
return NULL;
|
||||
|
||||
+11
-11
@@ -749,9 +749,9 @@ hashtable_get_integer (struct t_hashtable *hashtable, const char *property)
|
||||
{
|
||||
if (hashtable && property)
|
||||
{
|
||||
if (string_strcasecmp (property, "size") == 0)
|
||||
if (string_strcmp (property, "size") == 0)
|
||||
return hashtable->size;
|
||||
else if (string_strcasecmp (property, "items_count") == 0)
|
||||
else if (string_strcmp (property, "items_count") == 0)
|
||||
return hashtable->items_count;
|
||||
}
|
||||
|
||||
@@ -1005,19 +1005,19 @@ hashtable_get_string (struct t_hashtable *hashtable, const char *property)
|
||||
{
|
||||
if (hashtable && property)
|
||||
{
|
||||
if (string_strcasecmp (property, "type_keys") == 0)
|
||||
if (string_strcmp (property, "type_keys") == 0)
|
||||
return hashtable_type_string[hashtable->type_keys];
|
||||
else if (string_strcasecmp (property, "type_values") == 0)
|
||||
else if (string_strcmp (property, "type_values") == 0)
|
||||
return hashtable_type_string[hashtable->type_values];
|
||||
else if (string_strcasecmp (property, "keys") == 0)
|
||||
else if (string_strcmp (property, "keys") == 0)
|
||||
return hashtable_get_keys_values (hashtable, 1, 0, 0);
|
||||
else if (string_strcasecmp (property, "keys_sorted") == 0)
|
||||
else if (string_strcmp (property, "keys_sorted") == 0)
|
||||
return hashtable_get_keys_values (hashtable, 1, 1, 0);
|
||||
else if (string_strcasecmp (property, "values") == 0)
|
||||
else if (string_strcmp (property, "values") == 0)
|
||||
return hashtable_get_keys_values (hashtable, 0, 0, 1);
|
||||
else if (string_strcasecmp (property, "keys_values") == 0)
|
||||
else if (string_strcmp (property, "keys_values") == 0)
|
||||
return hashtable_get_keys_values (hashtable, 1, 0, 1);
|
||||
else if (string_strcasecmp (property, "keys_values_sorted") == 0)
|
||||
else if (string_strcmp (property, "keys_values_sorted") == 0)
|
||||
return hashtable_get_keys_values (hashtable, 1, 1, 1);
|
||||
}
|
||||
|
||||
@@ -1034,9 +1034,9 @@ hashtable_set_pointer (struct t_hashtable *hashtable, const char *property,
|
||||
{
|
||||
if (hashtable && property)
|
||||
{
|
||||
if (string_strcasecmp (property, "callback_free_key") == 0)
|
||||
if (string_strcmp (property, "callback_free_key") == 0)
|
||||
hashtable->callback_free_key = pointer;
|
||||
else if (string_strcasecmp (property, "callback_free_value") == 0)
|
||||
else if (string_strcmp (property, "callback_free_value") == 0)
|
||||
hashtable->callback_free_value = pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1207,21 +1207,21 @@ hdata_get_string (struct t_hdata *hdata, const char *property)
|
||||
if (!hdata || !property)
|
||||
return NULL;
|
||||
|
||||
if (string_strcasecmp (property, "var_keys") == 0)
|
||||
if (string_strcmp (property, "var_keys") == 0)
|
||||
return hashtable_get_string (hdata->hash_var, "keys");
|
||||
else if (string_strcasecmp (property, "var_values") == 0)
|
||||
else if (string_strcmp (property, "var_values") == 0)
|
||||
return hashtable_get_string (hdata->hash_var, "values");
|
||||
else if (string_strcasecmp (property, "var_keys_values") == 0)
|
||||
else if (string_strcmp (property, "var_keys_values") == 0)
|
||||
return hashtable_get_string (hdata->hash_var, "keys_values");
|
||||
else if (string_strcasecmp (property, "var_prev") == 0)
|
||||
else if (string_strcmp (property, "var_prev") == 0)
|
||||
return hdata->var_prev;
|
||||
else if (string_strcasecmp (property, "var_next") == 0)
|
||||
else if (string_strcmp (property, "var_next") == 0)
|
||||
return hdata->var_next;
|
||||
else if (string_strcasecmp (property, "list_keys") == 0)
|
||||
else if (string_strcmp (property, "list_keys") == 0)
|
||||
return hashtable_get_string (hdata->hash_list, "keys");
|
||||
else if (string_strcasecmp (property, "list_values") == 0)
|
||||
else if (string_strcmp (property, "list_values") == 0)
|
||||
return hashtable_get_string (hdata->hash_list, "values");
|
||||
else if (string_strcasecmp (property, "list_keys_values") == 0)
|
||||
else if (string_strcmp (property, "list_keys_values") == 0)
|
||||
return hashtable_get_string (hdata->hash_list, "keys_values");
|
||||
|
||||
return NULL;
|
||||
|
||||
+4
-4
@@ -454,13 +454,13 @@ hook_set (struct t_hook *hook, const char *property, const char *value)
|
||||
if (!hook_valid (hook))
|
||||
return;
|
||||
|
||||
if (string_strcasecmp (property, "subplugin") == 0)
|
||||
if (string_strcmp (property, "subplugin") == 0)
|
||||
{
|
||||
if (hook->subplugin)
|
||||
free (hook->subplugin);
|
||||
hook->subplugin = strdup (value);
|
||||
}
|
||||
else if (string_strcasecmp (property, "stdin") == 0)
|
||||
else if (string_strcmp (property, "stdin") == 0)
|
||||
{
|
||||
if (!hook->deleted
|
||||
&& (hook->type == HOOK_TYPE_PROCESS)
|
||||
@@ -472,7 +472,7 @@ hook_set (struct t_hook *hook, const char *property, const char *value)
|
||||
(void) num_written;
|
||||
}
|
||||
}
|
||||
else if (string_strcasecmp (property, "stdin_close") == 0)
|
||||
else if (string_strcmp (property, "stdin_close") == 0)
|
||||
{
|
||||
if (!hook->deleted
|
||||
&& (hook->type == HOOK_TYPE_PROCESS)
|
||||
@@ -483,7 +483,7 @@ hook_set (struct t_hook *hook, const char *property, const char *value)
|
||||
HOOK_PROCESS(hook, child_write[HOOK_PROCESS_STDIN]) = -1;
|
||||
}
|
||||
}
|
||||
else if (string_strcasecmp (property, "signal") == 0)
|
||||
else if (string_strcmp (property, "signal") == 0)
|
||||
{
|
||||
if (!hook->deleted
|
||||
&& (hook->type == HOOK_TYPE_PROCESS)
|
||||
|
||||
@@ -203,37 +203,37 @@ proxy_set (struct t_proxy *proxy, const char *property, const char *value)
|
||||
if (!proxy || !property || !value)
|
||||
return 0;
|
||||
|
||||
if (string_strcasecmp (property, "name") == 0)
|
||||
if (string_strcmp (property, "name") == 0)
|
||||
{
|
||||
proxy_set_name (proxy, value);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "type") == 0)
|
||||
else if (string_strcmp (property, "type") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_TYPE], value, 1);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "ipv6") == 0)
|
||||
else if (string_strcmp (property, "ipv6") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_IPV6], value, 1);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "address") == 0)
|
||||
else if (string_strcmp (property, "address") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_ADDRESS], value, 1);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "port") == 0)
|
||||
else if (string_strcmp (property, "port") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_PORT], value, 1);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "username") == 0)
|
||||
else if (string_strcmp (property, "username") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_USERNAME], value, 1);
|
||||
return 1;
|
||||
}
|
||||
else if (string_strcasecmp (property, "password") == 0)
|
||||
else if (string_strcmp (property, "password") == 0)
|
||||
{
|
||||
config_file_option_set (proxy->options[PROXY_OPTION_PASSWORD], value, 1);
|
||||
return 1;
|
||||
|
||||
+15
-15
@@ -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);
|
||||
|
||||
+112
-112
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -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);
|
||||
|
||||
+16
-16
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user