From 3ef7cde92ef3f5223b7eeab38cba62f6a3b10858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Sun, 12 Oct 2014 12:31:22 +0200 Subject: [PATCH] Removed twc_config_profile_write_callback. --- src/twc-config.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/twc-config.c b/src/twc-config.c index 1c03bb6..f8adbec 100644 --- a/src/twc-config.c +++ b/src/twc-config.c @@ -151,34 +151,6 @@ twc_config_profile_read_callback(void *data, return rc; } -/** - * Called when profile options should be written. - */ -int -twc_config_profile_write_callback(void *data, - struct t_config_file *config_file, - const char *section_name) -{ - if (!weechat_config_write_line (config_file, section_name, NULL)) - return WEECHAT_CONFIG_WRITE_ERROR; - - size_t index; - struct t_twc_list_item *item; - twc_list_foreach(twc_profiles, index, item) - { - for (int i = 0; i < TWC_PROFILE_NUM_OPTIONS; ++i) - { - if (!weechat_config_write_option(twc_config_file, - item->profile->options[i])) - { - return WEECHAT_CONFIG_WRITE_ERROR; - } - } - } - - return WEECHAT_CONFIG_WRITE_OK; -} - /** * Callback for checking an option value being set. */ @@ -308,7 +280,7 @@ twc_config_init() weechat_config_new_section(twc_config_file, "profile", 0, 0, twc_config_profile_read_callback, NULL, - twc_config_profile_write_callback, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);