From 386a1ba30eeedbd958738e1aa349bfc1874fffeb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 8 Feb 2022 10:54:08 +0100 Subject: [PATCH] cc_frm_header: use more plausible parameter name in addContextButton() --- src/gui/components/cc_frm_header.cpp | 10 +++++----- src/gui/components/cc_frm_header.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 67e72e653..84d7afe4a 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -393,16 +393,16 @@ void CComponentsHeader::initLogo() } } -void CComponentsHeader::addContextButton(const std::string& button_name) +void CComponentsHeader::addContextButton(const std::string& icon_name) { - v_cch_btn.push_back(button_name); + v_cch_btn.push_back(icon_name); dprintf(DEBUG_DEBUG, "[CComponentsHeader] %s added %d default buttons...\n", __func__, (int)v_cch_btn.size()); } -void CComponentsHeader::addContextButton(const std::vector& v_button_names) +void CComponentsHeader::addContextButton(const std::vector& v_icon_names) { - for (size_t i= 0; i< v_button_names.size(); i++) - addContextButton(v_button_names[i]); + for (size_t i= 0; i< v_icon_names.size(); i++) + addContextButton(v_icon_names[i]); } void CComponentsHeader::addContextButton(const int& buttons) diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 7f2ac9bad..25bba7ce3 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -252,18 +252,18 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT ///context buttons are to find on the right part of header ///add a single context button icon to the header object, arg as string, icon will just add, existing icons are preserved - void addContextButton(const std::string& button_name); + void addContextButton(const std::string& icon_name); ///add a group of context button icons to the header object, arg as string vector, icons will just add, existing icons are preserved - void addContextButton(const std::vector& v_button_names); + void addContextButton(const std::vector& v_icon_names); ///add a single context button icon or combined button icons to the header object, possible types are for example: CC_BTN_HELP, CC_BTN_INFO, CC_BTN_MENU, CC_BTN_EXIT ///icons will just add, existing icons are preserved void addContextButton(const int& buttons); ///remove context buttons from context button object void removeContextButtons(); ///sets a single context button icon to the header object, arg as string, existing buttons are removed - void setContextButton(const std::string& button_name){removeContextButtons(); addContextButton(button_name);}; + void setContextButton(const std::string& icon_name){removeContextButtons(); addContextButton(icon_name);}; ///sets a group of context button icons to the header object, arg as string vector, existing buttons are removed - void setContextButton(const std::vector& v_button_names){removeContextButtons(); addContextButton(v_button_names);}; + void setContextButton(const std::vector& v_icon_names){removeContextButtons(); addContextButton(v_icon_names);}; ///sets a single context button icon or combined button icons to the header object, possible types are for example: CC_BTN_HELP, CC_BTN_INFO, CC_BTN_MENU, CC_BTN_EXIT ///existing buttons are removed void setContextButton(const int& buttons){removeContextButtons(); addContextButton(buttons);};