aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-06-25 00:06:28 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-06-25 22:47:20 +0200
commit5506f4fccb00bc3bb87f84d4657d4e22056c52c6 (patch)
tree7807ad5056ee8a6b38164048bf0e76d5ee79be50
parentbc62f40ab9b5a8476c0887a03e06ab775661611a (diff)
[PVR] Cleanup: clang-format GUIDialogPVRGroupManager.(cpp|h).
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp58
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRGroupManager.h98
2 files changed, 77 insertions, 79 deletions
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
index 1a5f33644b..b5b9da79c0 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
@@ -42,19 +42,19 @@
using namespace KODI::MESSAGING;
using namespace PVR;
-#define CONTROL_LIST_CHANNELS_LEFT 11
-#define CONTROL_LIST_CHANNELS_RIGHT 12
-#define CONTROL_LIST_CHANNEL_GROUPS 13
-#define CONTROL_CURRENT_GROUP_LABEL 20
-#define CONTROL_UNGROUPED_LABEL 21
-#define CONTROL_IN_GROUP_LABEL 22
-#define BUTTON_HIDE_GROUP 25
-#define BUTTON_NEWGROUP 26
-#define BUTTON_RENAMEGROUP 27
-#define BUTTON_DELGROUP 28
-#define BUTTON_OK 29
-#define BUTTON_TOGGLE_RADIO_TV 34
-#define BUTTON_RECREATE_GROUP_THUMB 35
+#define CONTROL_LIST_CHANNELS_LEFT 11
+#define CONTROL_LIST_CHANNELS_RIGHT 12
+#define CONTROL_LIST_CHANNEL_GROUPS 13
+#define CONTROL_CURRENT_GROUP_LABEL 20
+#define CONTROL_UNGROUPED_LABEL 21
+#define CONTROL_IN_GROUP_LABEL 22
+#define BUTTON_HIDE_GROUP 25
+#define BUTTON_NEWGROUP 26
+#define BUTTON_RENAMEGROUP 27
+#define BUTTON_DELGROUP 28
+#define BUTTON_OK 29
+#define BUTTON_TOGGLE_RADIO_TV 34
+#define BUTTON_RECREATE_GROUP_THUMB 35
namespace
{
@@ -62,8 +62,8 @@ constexpr const char* PROPERTY_CLIENT_NAME = "ClientName";
} // namespace
-CGUIDialogPVRGroupManager::CGUIDialogPVRGroupManager() :
- CGUIDialog(WINDOW_DIALOG_PVR_GROUP_MANAGER, "DialogPVRGroupManager.xml")
+CGUIDialogPVRGroupManager::CGUIDialogPVRGroupManager()
+ : CGUIDialog(WINDOW_DIALOG_PVR_GROUP_MANAGER, "DialogPVRGroupManager.xml")
{
m_ungroupedChannels = new CFileItemList;
m_groupMembers = new CFileItemList;
@@ -160,7 +160,8 @@ bool CGUIDialogPVRGroupManager::ActionButtonNewGroup(const CGUIMessage& message)
if (iControl == BUTTON_NEWGROUP)
{
std::string strGroupName;
- if (CGUIKeyboardFactory::ShowAndGetInput(strGroupName, CVariant{g_localizeStrings.Get(19139)}, false))
+ if (CGUIKeyboardFactory::ShowAndGetInput(strGroupName, CVariant{g_localizeStrings.Get(19139)},
+ false))
{
if (!strGroupName.empty())
{
@@ -191,7 +192,9 @@ bool CGUIDialogPVRGroupManager::ActionButtonDeleteGroup(const CGUIMessage& messa
if (!m_selectedGroup)
return bReturn;
- CGUIDialogYesNo* pDialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogYesNo>(WINDOW_DIALOG_YES_NO);
+ CGUIDialogYesNo* pDialog =
+ CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogYesNo>(
+ WINDOW_DIALOG_YES_NO);
if (!pDialog)
return bReturn;
@@ -371,7 +374,8 @@ bool CGUIDialogPVRGroupManager::ActionButtonHideGroup(const CGUIMessage& message
if (message.GetSenderId() == BUTTON_HIDE_GROUP && m_selectedGroup)
{
- CGUIRadioButtonControl* button = static_cast<CGUIRadioButtonControl*>(GetControl(message.GetSenderId()));
+ CGUIRadioButtonControl* button =
+ static_cast<CGUIRadioButtonControl*>(GetControl(message.GetSenderId()));
if (button)
{
CServiceBroker::GetPVRManager()
@@ -418,16 +422,11 @@ bool CGUIDialogPVRGroupManager::ActionButtonRecreateThumbnail(const CGUIMessage&
bool CGUIDialogPVRGroupManager::OnMessageClick(const CGUIMessage& message)
{
- return ActionButtonOk(message) ||
- ActionButtonNewGroup(message) ||
- ActionButtonDeleteGroup(message) ||
- ActionButtonRenameGroup(message) ||
- ActionButtonUngroupedChannels(message) ||
- ActionButtonGroupMembers(message) ||
- ActionButtonChannelGroups(message) ||
- ActionButtonHideGroup(message) ||
- ActionButtonToggleRadioTV(message) ||
- ActionButtonRecreateThumbnail(message);
+ return ActionButtonOk(message) || ActionButtonNewGroup(message) ||
+ ActionButtonDeleteGroup(message) || ActionButtonRenameGroup(message) ||
+ ActionButtonUngroupedChannels(message) || ActionButtonGroupMembers(message) ||
+ ActionButtonChannelGroups(message) || ActionButtonHideGroup(message) ||
+ ActionButtonToggleRadioTV(message) || ActionButtonRecreateThumbnail(message);
}
bool CGUIDialogPVRGroupManager::OnMessage(CGUIMessage& message)
@@ -519,8 +518,7 @@ bool CGUIDialogPVRGroupManager::OnActionMove(const CAction& action)
bool CGUIDialogPVRGroupManager::OnAction(const CAction& action)
{
- return OnActionMove(action) ||
- CGUIDialog::OnAction(action);
+ return OnActionMove(action) || CGUIDialog::OnAction(action);
}
void CGUIDialogPVRGroupManager::OnInitWindow()
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.h b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.h
index 3c5716635c..2c8ef4fc82 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.h
+++ b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.h
@@ -19,61 +19,61 @@ class CGUIMessage;
namespace PVR
{
- class CPVRChannelGroup;
+class CPVRChannelGroup;
- class CGUIDialogPVRGroupManager : public CGUIDialog
- {
- public:
- CGUIDialogPVRGroupManager();
- ~CGUIDialogPVRGroupManager() override;
- bool OnMessage(CGUIMessage& message) override;
- bool OnAction(const CAction& action) override;
- void OnWindowLoaded() override;
- void OnWindowUnload() override;
+class CGUIDialogPVRGroupManager : public CGUIDialog
+{
+public:
+ CGUIDialogPVRGroupManager();
+ ~CGUIDialogPVRGroupManager() override;
+ bool OnMessage(CGUIMessage& message) override;
+ bool OnAction(const CAction& action) override;
+ void OnWindowLoaded() override;
+ void OnWindowUnload() override;
- void SetRadio(bool bIsRadio);
+ void SetRadio(bool bIsRadio);
- protected:
- void OnInitWindow() override;
- void OnDeinitWindow(int nextWindowID) override;
+protected:
+ void OnInitWindow() override;
+ void OnDeinitWindow(int nextWindowID) override;
- private:
- void Clear();
- void ClearSelectedGroupsThumbnail();
- void Update();
- bool PersistChanges();
- bool ActionButtonOk(const CGUIMessage& message);
- bool ActionButtonNewGroup(const CGUIMessage& message);
- bool ActionButtonDeleteGroup(const CGUIMessage& message);
- bool ActionButtonRenameGroup(const CGUIMessage& message);
- bool ActionButtonUngroupedChannels(const CGUIMessage& message);
- bool ActionButtonGroupMembers(const CGUIMessage& message);
- bool ActionButtonChannelGroups(const CGUIMessage& message);
- bool ActionButtonHideGroup(const CGUIMessage& message);
- bool ActionButtonToggleRadioTV(const CGUIMessage& message);
- bool ActionButtonRecreateThumbnail(const CGUIMessage& message);
- bool OnMessageClick(const CGUIMessage& message);
- bool OnPopupMenu(int itemNumber);
- bool OnContextButton(int itemNumber, int button);
- bool OnActionMove(const CAction& action);
+private:
+ void Clear();
+ void ClearSelectedGroupsThumbnail();
+ void Update();
+ bool PersistChanges();
+ bool ActionButtonOk(const CGUIMessage& message);
+ bool ActionButtonNewGroup(const CGUIMessage& message);
+ bool ActionButtonDeleteGroup(const CGUIMessage& message);
+ bool ActionButtonRenameGroup(const CGUIMessage& message);
+ bool ActionButtonUngroupedChannels(const CGUIMessage& message);
+ bool ActionButtonGroupMembers(const CGUIMessage& message);
+ bool ActionButtonChannelGroups(const CGUIMessage& message);
+ bool ActionButtonHideGroup(const CGUIMessage& message);
+ bool ActionButtonToggleRadioTV(const CGUIMessage& message);
+ bool ActionButtonRecreateThumbnail(const CGUIMessage& message);
+ bool OnMessageClick(const CGUIMessage& message);
+ bool OnPopupMenu(int itemNumber);
+ bool OnContextButton(int itemNumber, int button);
+ bool OnActionMove(const CAction& action);
- std::shared_ptr<CPVRChannelGroup> m_selectedGroup;
- bool m_bIsRadio;
- bool m_movingItem{false};
- bool m_allowReorder{false};
+ std::shared_ptr<CPVRChannelGroup> m_selectedGroup;
+ bool m_bIsRadio;
+ bool m_movingItem{false};
+ bool m_allowReorder{false};
- int m_iSelectedUngroupedChannel = 0;
- int m_iSelectedGroupMember = 0;
- int m_iSelectedChannelGroup = 0;
+ int m_iSelectedUngroupedChannel = 0;
+ int m_iSelectedGroupMember = 0;
+ int m_iSelectedChannelGroup = 0;
- CFileItemList * m_ungroupedChannels;
- CFileItemList * m_groupMembers;
- CFileItemList * m_channelGroups;
+ CFileItemList* m_ungroupedChannels;
+ CFileItemList* m_groupMembers;
+ CFileItemList* m_channelGroups;
- CGUIViewControl m_viewUngroupedChannels;
- CGUIViewControl m_viewGroupMembers;
- CGUIViewControl m_viewChannelGroups;
+ CGUIViewControl m_viewUngroupedChannels;
+ CGUIViewControl m_viewGroupMembers;
+ CGUIViewControl m_viewChannelGroups;
- CPVRThumbLoader m_thumbLoader;
- };
-}
+ CPVRThumbLoader m_thumbLoader;
+};
+} // namespace PVR