diff options
82 files changed, 277 insertions, 284 deletions
diff --git a/guilib/GUIAudioManager.cpp b/guilib/GUIAudioManager.cpp index 51f9d18a3f..3eeaa008fd 100644 --- a/guilib/GUIAudioManager.cpp +++ b/guilib/GUIAudioManager.cpp @@ -174,7 +174,7 @@ void CGUIAudioManager::PlayActionSound(const CAction& action) CSingleLock lock(m_cs); - actionSoundMap::iterator it=m_actionSoundMap.find(action.id); + actionSoundMap::iterator it=m_actionSoundMap.find(action.actionId); if (it==m_actionSoundMap.end()) return; diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp index de8de4c371..cf54a64b1c 100644 --- a/guilib/GUIBaseContainer.cpp +++ b/guilib/GUIBaseContainer.cpp @@ -197,13 +197,13 @@ void CGUIBaseContainer::RenderItem(float posX, float posY, CGUIListItem *item, b bool CGUIBaseContainer::OnAction(const CAction &action) { - if (action.id >= KEY_ASCII) + if (action.actionId >= KEY_ASCII) { - OnJumpLetter((char)(action.id & 0xff)); + OnJumpLetter((char)(action.actionId & 0xff)); return true; } - switch (action.id) + switch (action.actionId) { case ACTION_MOVE_LEFT: case ACTION_MOVE_RIGHT: @@ -212,15 +212,15 @@ bool CGUIBaseContainer::OnAction(const CAction &action) { if (!HasFocus()) return false; if (action.holdTime > HOLD_TIME_START && - ((m_orientation == VERTICAL && (action.id == ACTION_MOVE_UP || action.id == ACTION_MOVE_DOWN)) || - (m_orientation == HORIZONTAL && (action.id == ACTION_MOVE_LEFT || action.id == ACTION_MOVE_RIGHT)))) + ((m_orientation == VERTICAL && (action.actionId == ACTION_MOVE_UP || action.actionId == ACTION_MOVE_DOWN)) || + (m_orientation == HORIZONTAL && (action.actionId == ACTION_MOVE_LEFT || action.actionId == ACTION_MOVE_RIGHT)))) { // action is held down - repeat a number of times float speed = std::min(1.0f, (float)(action.holdTime - HOLD_TIME_START) / (HOLD_TIME_END - HOLD_TIME_START)); unsigned int itemsPerFrame = 1; if (m_lastHoldTime) // number of rows/10 items/second max speed itemsPerFrame = std::max((unsigned int)1, (unsigned int)(speed * 0.0001f * GetRows() * (CTimeUtils::GetFrameTime() - m_lastHoldTime))); m_lastHoldTime = CTimeUtils::GetFrameTime(); - if (action.id == ACTION_MOVE_LEFT || action.id == ACTION_MOVE_UP) + if (action.actionId == ACTION_MOVE_LEFT || action.actionId == ACTION_MOVE_UP) while (itemsPerFrame--) MoveUp(false); else while (itemsPerFrame--) MoveDown(false); @@ -264,15 +264,15 @@ bool CGUIBaseContainer::OnAction(const CAction &action) case ACTION_JUMP_SMS8: case ACTION_JUMP_SMS9: { - OnJumpSMS(action.id - ACTION_JUMP_SMS2 + 2); + OnJumpSMS(action.actionId - ACTION_JUMP_SMS2 + 2); return true; } break; default: - if (action.id) + if (action.actionId) { - return OnClick(action.id); + return OnClick(action.actionId); } } return false; diff --git a/guilib/GUIButtonControl.cpp b/guilib/GUIButtonControl.cpp index cf2d8f2b8a..2ab710472b 100644 --- a/guilib/GUIButtonControl.cpp +++ b/guilib/GUIButtonControl.cpp @@ -134,7 +134,7 @@ void CGUIButtonControl::RenderText() bool CGUIButtonControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { OnClick(); return true; @@ -242,7 +242,7 @@ bool CGUIButtonControl::OnMouseEvent(const CPoint &point, const CMouseEvent &eve if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { CAction action; - action.id = ACTION_SELECT_ITEM; + action.actionId = ACTION_SELECT_ITEM; OnAction(action); return true; } diff --git a/guilib/GUIButtonScroller.cpp b/guilib/GUIButtonScroller.cpp index 7466c8f83a..63170ff3a0 100644 --- a/guilib/GUIButtonScroller.cpp +++ b/guilib/GUIButtonScroller.cpp @@ -114,7 +114,7 @@ CGUIButtonScroller::~CGUIButtonScroller(void) bool CGUIButtonScroller::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // send the appropriate message to the parent window vector<CGUIActionDescriptor> actions = m_vecButtons[GetActiveButton()]->clickActions; @@ -127,13 +127,13 @@ bool CGUIButtonScroller::OnAction(const CAction &action) } return true; } - if (action.id == ACTION_CONTEXT_MENU) + if (action.actionId == ACTION_CONTEXT_MENU) { // send a click message to our parent - SEND_CLICK_MESSAGE(GetID(), GetParentID(), action.id); + SEND_CLICK_MESSAGE(GetID(), GetParentID(), action.actionId); return true; } // smooth scrolling (for analog controls) - if (action.id == ACTION_SCROLL_UP) + if (action.actionId == ACTION_SCROLL_UP) { m_fAnalogScrollSpeed += action.amount1 * action.amount1; bool handled = false; @@ -147,7 +147,7 @@ bool CGUIButtonScroller::OnAction(const CAction &action) } return handled; } - if (action.id == ACTION_SCROLL_DOWN) + if (action.actionId == ACTION_SCROLL_DOWN) { m_fAnalogScrollSpeed += action.amount1 * action.amount1; bool handled = false; @@ -900,7 +900,7 @@ bool CGUIButtonScroller::OnMouseEvent(const CPoint &point, const CMouseEvent &ev else m_iCurrentSlot = (int)((point.y - m_posY) / (m_imgFocus.GetHeight() + m_buttonGap)); CAction action; - action.id = ACTION_SELECT_ITEM; + action.actionId = ACTION_SELECT_ITEM; OnAction(action); return true; } diff --git a/guilib/GUICheckMarkControl.cpp b/guilib/GUICheckMarkControl.cpp index eaa04d14c2..b76aaef366 100644 --- a/guilib/GUICheckMarkControl.cpp +++ b/guilib/GUICheckMarkControl.cpp @@ -81,10 +81,10 @@ void CGUICheckMarkControl::Render() bool CGUICheckMarkControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { m_bSelected = !m_bSelected; - CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID(), action.id); + CGUIMessage msg(GUI_MSG_CLICKED, GetID(), GetParentID(), action.actionId); SendWindowMessage(msg); return true; } @@ -148,7 +148,7 @@ bool CGUICheckMarkControl::OnMouseEvent(const CPoint &point, const CMouseEvent & if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { CAction action; - action.id = ACTION_SELECT_ITEM; + action.actionId = ACTION_SELECT_ITEM; OnAction(action); return true; } diff --git a/guilib/GUIControl.cpp b/guilib/GUIControl.cpp index cad227bdca..af5dad0e34 100644 --- a/guilib/GUIControl.cpp +++ b/guilib/GUIControl.cpp @@ -160,7 +160,7 @@ void CGUIControl::Render() bool CGUIControl::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_MOVE_DOWN: if (!HasFocus()) return false; diff --git a/guilib/GUIDialog.cpp b/guilib/GUIDialog.cpp index 6ef696cfd4..eb70a21f27 100644 --- a/guilib/GUIDialog.cpp +++ b/guilib/GUIDialog.cpp @@ -68,7 +68,7 @@ void CGUIDialog::OnWindowLoaded() bool CGUIDialog::OnAction(const CAction &action) { - if (action.id == ACTION_CLOSE_DIALOG || action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_CLOSE_DIALOG || action.actionId == ACTION_PREVIOUS_MENU) { Close(); return true; diff --git a/guilib/GUIEditControl.cpp b/guilib/GUIEditControl.cpp index bf3f3cf349..e18efff51c 100644 --- a/guilib/GUIEditControl.cpp +++ b/guilib/GUIEditControl.cpp @@ -97,7 +97,7 @@ bool CGUIEditControl::OnAction(const CAction &action) { ValidateCursor(); - if (action.id == ACTION_BACKSPACE) + if (action.actionId == ACTION_BACKSPACE) { // backspace if (m_cursorPos) @@ -107,7 +107,7 @@ bool CGUIEditControl::OnAction(const CAction &action) } return true; } - else if (action.id == ACTION_MOVE_LEFT) + else if (action.actionId == ACTION_MOVE_LEFT) { if (m_cursorPos > 0) { @@ -116,7 +116,7 @@ bool CGUIEditControl::OnAction(const CAction &action) return true; } } - else if (action.id == ACTION_MOVE_RIGHT) + else if (action.actionId == ACTION_MOVE_RIGHT) { if ((unsigned int) m_cursorPos < m_text2.size()) { @@ -125,14 +125,14 @@ bool CGUIEditControl::OnAction(const CAction &action) return true; } } - else if (action.id == ACTION_PASTE) + else if (action.actionId == ACTION_PASTE) { OnPasteClipboard(); } - else if (action.id >= KEY_VKEY && action.id < KEY_ASCII) + else if (action.actionId >= KEY_VKEY && action.actionId < KEY_ASCII) { // input from the keyboard (vkey, not ascii) - BYTE b = action.id & 0xFF; + BYTE b = action.actionId & 0xFF; if (b == 0x24) // home { m_cursorPos = 0; @@ -176,7 +176,7 @@ bool CGUIEditControl::OnAction(const CAction &action) return true; } } - else if (action.id >= KEY_ASCII) + else if (action.actionId >= KEY_ASCII) { // input from the keyboard switch (action.unicode) @@ -212,15 +212,15 @@ bool CGUIEditControl::OnAction(const CAction &action) UpdateText(); return true; } - else if (action.id >= REMOTE_0 && action.id <= REMOTE_9) + else if (action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) { // input from the remote if (m_inputType == INPUT_TYPE_FILTER) { // filtering - use single number presses - m_text2.insert(m_text2.begin() + m_cursorPos++, L'0' + (action.id - REMOTE_0)); + m_text2.insert(m_text2.begin() + m_cursorPos++, L'0' + (action.actionId - REMOTE_0)); UpdateText(); } else - OnSMSCharacter(action.id - REMOTE_0); + OnSMSCharacter(action.actionId - REMOTE_0); return true; } return CGUIButtonControl::OnAction(action); diff --git a/guilib/GUIFixedListContainer.cpp b/guilib/GUIFixedListContainer.cpp index 4adaabf3a8..ba00782660 100644 --- a/guilib/GUIFixedListContainer.cpp +++ b/guilib/GUIFixedListContainer.cpp @@ -40,7 +40,7 @@ CGUIFixedListContainer::~CGUIFixedListContainer(void) bool CGUIFixedListContainer::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PAGE_UP: { diff --git a/guilib/GUIListContainer.cpp b/guilib/GUIListContainer.cpp index c127760ae7..4f4a7b1b94 100644 --- a/guilib/GUIListContainer.cpp +++ b/guilib/GUIListContainer.cpp @@ -37,7 +37,7 @@ CGUIListContainer::~CGUIListContainer(void) bool CGUIListContainer::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PAGE_UP: { diff --git a/guilib/GUIMoverControl.cpp b/guilib/GUIMoverControl.cpp index 8d305c316b..cf0fd93379 100644 --- a/guilib/GUIMoverControl.cpp +++ b/guilib/GUIMoverControl.cpp @@ -85,14 +85,14 @@ void CGUIMoverControl::Render() bool CGUIMoverControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // button selected - send message to parent CGUIMessage message(GUI_MSG_CLICKED, GetID(), GetParentID()); SendWindowMessage(message); return true; } - if (action.id == ACTION_ANALOG_MOVE) + if (action.actionId == ACTION_ANALOG_MOVE) { // if (m_dwAllowedDirections == ALLOWED_DIRECTIONS_UPDOWN) // Move(0, (int)(-m_fAnalogSpeed*action.amount2)); diff --git a/guilib/GUIMultiSelectText.cpp b/guilib/GUIMultiSelectText.cpp index 17a5eae8a2..3becc5f533 100644 --- a/guilib/GUIMultiSelectText.cpp +++ b/guilib/GUIMultiSelectText.cpp @@ -156,7 +156,7 @@ void CGUIMultiSelectTextControl::UpdateInfo(const CGUIListItem *item) bool CGUIMultiSelectTextControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // item is clicked - see if we have a clickaction CStdString clickAction; @@ -252,7 +252,7 @@ bool CGUIMultiSelectTextControl::OnMouseEvent(const CPoint &point, const CMouseE { m_selectedItem = GetItemFromPoint(point); CAction action; - action.id = ACTION_SELECT_ITEM; + action.actionId = ACTION_SELECT_ITEM; OnAction(action); return true; } diff --git a/guilib/GUIPanelContainer.cpp b/guilib/GUIPanelContainer.cpp index 17b73b99d2..50d493efb6 100644 --- a/guilib/GUIPanelContainer.cpp +++ b/guilib/GUIPanelContainer.cpp @@ -119,7 +119,7 @@ void CGUIPanelContainer::Render() bool CGUIPanelContainer::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PAGE_UP: { diff --git a/guilib/GUIRadioButtonControl.cpp b/guilib/GUIRadioButtonControl.cpp index ed43caab56..c928ad8ce5 100644 --- a/guilib/GUIRadioButtonControl.cpp +++ b/guilib/GUIRadioButtonControl.cpp @@ -60,7 +60,7 @@ void CGUIRadioButtonControl::Render() bool CGUIRadioButtonControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { m_bSelected = !m_bSelected; } diff --git a/guilib/GUIResizeControl.cpp b/guilib/GUIResizeControl.cpp index 11de2b70be..8ca728ef5c 100644 --- a/guilib/GUIResizeControl.cpp +++ b/guilib/GUIResizeControl.cpp @@ -84,14 +84,14 @@ void CGUIResizeControl::Render() bool CGUIResizeControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // button selected - send message to parent CGUIMessage message(GUI_MSG_CLICKED, GetID(), GetParentID()); SendWindowMessage(message); return true; } - if (action.id == ACTION_ANALOG_MOVE) + if (action.actionId == ACTION_ANALOG_MOVE) { Resize(m_fAnalogSpeed*action.amount1, -m_fAnalogSpeed*action.amount2); return true; diff --git a/guilib/GUIScrollBarControl.cpp b/guilib/GUIScrollBarControl.cpp index 7bab89df70..a4b1a39bb0 100644 --- a/guilib/GUIScrollBarControl.cpp +++ b/guilib/GUIScrollBarControl.cpp @@ -89,7 +89,7 @@ bool CGUIScrollBar::OnMessage(CGUIMessage& message) bool CGUIScrollBar::OnAction(const CAction &action) { - switch ( action.id ) + switch ( action.actionId ) { case ACTION_MOVE_LEFT: if (m_orientation == HORIZONTAL) diff --git a/guilib/GUISelectButtonControl.cpp b/guilib/GUISelectButtonControl.cpp index 354987bc32..689ebcde55 100644 --- a/guilib/GUISelectButtonControl.cpp +++ b/guilib/GUISelectButtonControl.cpp @@ -190,7 +190,7 @@ bool CGUISelectButtonControl::OnAction(const CAction &action) { if (!m_bShowSelect) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // Enter selection mode m_bShowSelect = true; @@ -206,7 +206,7 @@ bool CGUISelectButtonControl::OnAction(const CAction &action) } else { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { // User has selected an item, disable selection mode... m_bShowSelect = false; @@ -216,7 +216,7 @@ bool CGUISelectButtonControl::OnAction(const CAction &action) SendWindowMessage(message); return true; } - if (action.id == ACTION_MOVE_UP || action.id == ACTION_MOVE_DOWN ) + if (action.actionId == ACTION_MOVE_UP || action.actionId == ACTION_MOVE_DOWN ) { // Disable selection mode when moving up or down m_bShowSelect = false; diff --git a/guilib/GUISliderControl.cpp b/guilib/GUISliderControl.cpp index d4f2cb8938..59a6474bbd 100644 --- a/guilib/GUISliderControl.cpp +++ b/guilib/GUISliderControl.cpp @@ -128,7 +128,7 @@ bool CGUISliderControl::OnMessage(CGUIMessage& message) bool CGUISliderControl::OnAction(const CAction &action) { - switch ( action.id ) + switch ( action.actionId ) { case ACTION_MOVE_LEFT: //case ACTION_OSD_SHOW_VALUE_MIN: diff --git a/guilib/GUISpinControl.cpp b/guilib/GUISpinControl.cpp index a16fca38c0..2f1e7aba27 100644 --- a/guilib/GUISpinControl.cpp +++ b/guilib/GUISpinControl.cpp @@ -63,7 +63,7 @@ CGUISpinControl::~CGUISpinControl(void) bool CGUISpinControl::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case REMOTE_0: case REMOTE_1: @@ -81,7 +81,7 @@ bool CGUISpinControl::OnAction(const CAction &action) m_iTypedPos = 0; strcpy(m_szTyped, ""); } - int iNumber = action.id - REMOTE_0; + int iNumber = action.actionId - REMOTE_0; m_szTyped[m_iTypedPos] = iNumber + '0'; m_iTypedPos++; @@ -166,7 +166,7 @@ bool CGUISpinControl::OnAction(const CAction &action) break; } /* static float m_fSmoothScrollOffset = 0.0f; - if (action.id == ACTION_SCROLL_UP) + if (action.actionId == ACTION_SCROLL_UP) { m_fSmoothScrollOffset += action.amount1 * action.amount1; bool handled = false; diff --git a/guilib/GUIStandardWindow.cpp b/guilib/GUIStandardWindow.cpp index 671e3e378b..05aa97b09d 100644 --- a/guilib/GUIStandardWindow.cpp +++ b/guilib/GUIStandardWindow.cpp @@ -34,13 +34,13 @@ CGUIStandardWindow::~CGUIStandardWindow(void) bool CGUIStandardWindow::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; } - if (action.id == ACTION_PARENT_DIR && g_advancedSettings.m_bUseEvilB) + if (action.actionId == ACTION_PARENT_DIR && g_advancedSettings.m_bUseEvilB) { g_windowManager.PreviousWindow(); return true; diff --git a/guilib/GUIToggleButtonControl.cpp b/guilib/GUIToggleButtonControl.cpp index 0cb79b4ad2..be669c79ba 100644 --- a/guilib/GUIToggleButtonControl.cpp +++ b/guilib/GUIToggleButtonControl.cpp @@ -63,7 +63,7 @@ void CGUIToggleButtonControl::Render() bool CGUIToggleButtonControl::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { m_bSelected = !m_bSelected; } diff --git a/guilib/GUIVisualisationControl.cpp b/guilib/GUIVisualisationControl.cpp index b5971135fb..290b4eada6 100644 --- a/guilib/GUIVisualisationControl.cpp +++ b/guilib/GUIVisualisationControl.cpp @@ -351,17 +351,17 @@ bool CGUIVisualisationControl::OnAction(const CAction &action) { if (!m_pVisualisation) return false; enum CVisualisation::VIS_ACTION visAction = CVisualisation::VIS_ACTION_NONE; - if (action.id == ACTION_VIS_PRESET_NEXT) + if (action.actionId == ACTION_VIS_PRESET_NEXT) visAction = CVisualisation::VIS_ACTION_NEXT_PRESET; - else if (action.id == ACTION_VIS_PRESET_PREV) + else if (action.actionId == ACTION_VIS_PRESET_PREV) visAction = CVisualisation::VIS_ACTION_PREV_PRESET; - else if (action.id == ACTION_VIS_PRESET_LOCK) + else if (action.actionId == ACTION_VIS_PRESET_LOCK) visAction = CVisualisation::VIS_ACTION_LOCK_PRESET; - else if (action.id == ACTION_VIS_PRESET_RANDOM) + else if (action.actionId == ACTION_VIS_PRESET_RANDOM) visAction = CVisualisation::VIS_ACTION_RANDOM_PRESET; - else if (action.id == ACTION_VIS_RATE_PRESET_PLUS) + else if (action.actionId == ACTION_VIS_RATE_PRESET_PLUS) visAction = CVisualisation::VIS_ACTION_RATE_PRESET_PLUS; - else if (action.id == ACTION_VIS_RATE_PRESET_MINUS) + else if (action.actionId == ACTION_VIS_RATE_PRESET_MINUS) visAction = CVisualisation::VIS_ACTION_RATE_PRESET_MINUS; return m_pVisualisation->OnAction(visAction); @@ -407,7 +407,7 @@ bool CGUIVisualisationControl::OnMessage(CGUIMessage &message) else if (message.GetMessage() == GUI_MSG_VISUALISATION_ACTION) { CAction action; - action.id = message.GetParam1(); + action.actionId = message.GetParam1(); return OnAction(action); } else if (message.GetMessage() == GUI_MSG_PLAYBACK_STARTED) diff --git a/guilib/GUIWindow.cpp b/guilib/GUIWindow.cpp index 90ca9cffb5..f35d6b64e5 100644 --- a/guilib/GUIWindow.cpp +++ b/guilib/GUIWindow.cpp @@ -336,7 +336,7 @@ void CGUIWindow::Close(bool forceClose) bool CGUIWindow::OnAction(const CAction &action) { - if (action.id == ACTION_MOUSE) + if (action.actionId == ACTION_MOUSE) return OnMouseAction(); CGUIControl *focusedControl = GetFocusedControl(); @@ -405,7 +405,7 @@ bool CGUIWindow::OnMouseEvent(const CPoint &point, const CMouseEvent &event) if (event.m_id == ACTION_MOUSE_RIGHT_CLICK) { // no control found to absorb this click - go to previous menu CAction action; - action.id = ACTION_PREVIOUS_MENU; + action.actionId = ACTION_PREVIOUS_MENU; return OnAction(action); } return false; diff --git a/guilib/GUIWindowManager.cpp b/guilib/GUIWindowManager.cpp index 7cf12f73c3..e28eab5bef 100644 --- a/guilib/GUIWindowManager.cpp +++ b/guilib/GUIWindowManager.cpp @@ -456,7 +456,7 @@ bool CGUIWindowManager::OnAction(const CAction &action) } // music or video overlay are handled as a special case, as they're modeless, but we allow // clicking on them with the mouse. - if (action.id == ACTION_MOUSE && (dialog->GetID() == WINDOW_VIDEO_OVERLAY || + if (action.actionId == ACTION_MOUSE && (dialog->GetID() == WINDOW_VIDEO_OVERLAY || dialog->GetID() == WINDOW_MUSIC_OVERLAY)) { if (dialog->OnAction(action)) diff --git a/guilib/GUIWrappingListContainer.cpp b/guilib/GUIWrappingListContainer.cpp index 87a2a5b375..a9b972a6d3 100644 --- a/guilib/GUIWrappingListContainer.cpp +++ b/guilib/GUIWrappingListContainer.cpp @@ -48,7 +48,7 @@ void CGUIWrappingListContainer::UpdatePageControl(int offset) bool CGUIWrappingListContainer::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PAGE_UP: Scroll(-m_itemsPerPage); diff --git a/guilib/Key.h b/guilib/Key.h index e301a35ce3..55195437f2 100644 --- a/guilib/Key.h +++ b/guilib/Key.h @@ -397,15 +397,8 @@ class CAction { public: - CAction() - { - id = 0; - amount1 = amount2 = repeat = 0; - buttonCode = 0; - unicode = 0; - holdTime = 0; - }; - int id; + CAction():actionId(0),amount1(0), amount2(amount1), repeat(0), buttonCode(0), unicode(0), holdTime(0){}; + int actionId; float amount1; float amount2; float repeat; diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index bd10366a46..fca548948e 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -404,7 +404,7 @@ bool CApplication::OnEvent(XBMC_Event& newEvent) // XBMC translates WM_APPCOMMAND to XBMC_APPCOMMAND events. // Set .amount1 = 1 for APPCOMMANDS like VOL_UP and DOWN that need to know how much to change the volume CAction action; - action.id = newEvent.appcommand.action; + action.actionId = newEvent.appcommand.action; g_application.OnAction(action); } break; @@ -2378,51 +2378,51 @@ bool CApplication::OnKey(CKey& key) } if (useKeyboard) { - action.id = 0; + action.actionId = 0; if (g_guiSettings.GetBool("input.remoteaskeyboard")) { // users remote is executing keyboard commands, so use the virtualkeyboard section of keymap.xml // and send those rather than actual keyboard presses. Only for navigation-type commands though CButtonTranslator::GetInstance().GetAction(WINDOW_DIALOG_KEYBOARD, key, action); - if (!(action.id == ACTION_MOVE_LEFT || - action.id == ACTION_MOVE_RIGHT || - action.id == ACTION_MOVE_UP || - action.id == ACTION_MOVE_DOWN || - action.id == ACTION_SELECT_ITEM || - action.id == ACTION_ENTER || - action.id == ACTION_PREVIOUS_MENU || - action.id == ACTION_CLOSE_DIALOG)) + if (!(action.actionId == ACTION_MOVE_LEFT || + action.actionId == ACTION_MOVE_RIGHT || + action.actionId == ACTION_MOVE_UP || + action.actionId == ACTION_MOVE_DOWN || + action.actionId == ACTION_SELECT_ITEM || + action.actionId == ACTION_ENTER || + action.actionId == ACTION_PREVIOUS_MENU || + action.actionId == ACTION_CLOSE_DIALOG)) { // the action isn't plain navigation - check for a keyboard-specific keymap CButtonTranslator::GetInstance().GetAction(WINDOW_DIALOG_KEYBOARD, key, action, false); - if (!(action.id >= REMOTE_0 && action.id <= REMOTE_9) || - action.id == ACTION_BACKSPACE || - action.id == ACTION_SHIFT || - action.id == ACTION_SYMBOLS || - action.id == ACTION_CURSOR_LEFT || - action.id == ACTION_CURSOR_RIGHT) - action.id = 0; // don't bother with this action + if (!(action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) || + action.actionId == ACTION_BACKSPACE || + action.actionId == ACTION_SHIFT || + action.actionId == ACTION_SYMBOLS || + action.actionId == ACTION_CURSOR_LEFT || + action.actionId == ACTION_CURSOR_RIGHT) + action.actionId = 0; // don't bother with this action } } - if (!action.id) + if (!action.actionId) { // keyboard entry - pass the keys through directly if (key.GetFromHttpApi()) { if (key.GetButtonCode() != KEY_INVALID) - action.id = key.GetButtonCode(); + action.actionId = key.GetButtonCode(); action.unicode = key.GetUnicode(); } else { // see if we've got an ascii key if (g_Keyboard.GetUnicode()) { - action.id = g_Keyboard.GetAscii() | KEY_ASCII; // Only for backwards compatibility + action.actionId = g_Keyboard.GetAscii() | KEY_ASCII; // Only for backwards compatibility action.unicode = g_Keyboard.GetUnicode(); } else { - action.id = g_Keyboard.GetVKey() | KEY_VKEY; + action.actionId = g_Keyboard.GetVKey() | KEY_VKEY; action.unicode = 0; } } @@ -2438,7 +2438,7 @@ bool CApplication::OnKey(CKey& key) { if (key.GetButtonCode() != KEY_INVALID) { - action.id = key.GetButtonCode(); + action.actionId = key.GetButtonCode(); CButtonTranslator::GetInstance().GetAction(iWin, key, action); } } @@ -2446,7 +2446,7 @@ bool CApplication::OnKey(CKey& key) CButtonTranslator::GetInstance().GetAction(iWin, key, action); } if (!key.IsAnalogButton()) - CLog::Log(LOGDEBUG, "%s: %i pressed, action is %i", __FUNCTION__, (int) key.GetButtonCode(), action.id); + CLog::Log(LOGDEBUG, "%s: %i pressed, action is %i", __FUNCTION__, (int) key.GetButtonCode(), action.actionId); // Play a sound based on the action g_audioManager.PlayActionSound(action); @@ -2463,13 +2463,13 @@ bool CApplication::OnAction(CAction &action) if (m_pXbmcHttp && g_settings.m_HttpApiBroadcastLevel>=2) { CStdString tmp; - tmp.Format("%i",action.id); + tmp.Format("%i",action.actionId); getApplicationMessenger().HttpApi("broadcastlevel; OnAction:"+tmp+";2"); } #endif // special case for switching between GUI & fullscreen mode. - if (action.id == ACTION_SHOW_GUI) + if (action.actionId == ACTION_SHOW_GUI) { // Switch to fullscreen mode if we can if (SwitchToFullScreen()) { @@ -2478,7 +2478,7 @@ bool CApplication::OnAction(CAction &action) } } - if (action.id == ACTION_TOGGLE_FULLSCREEN) + if (action.actionId == ACTION_TOGGLE_FULLSCREEN) { g_graphicsContext.ToggleFullScreenRoot(); return true; @@ -2495,13 +2495,13 @@ bool CApplication::OnAction(CAction &action) // handle extra global presses // screenshot : take a screenshot :) - if (action.id == ACTION_TAKE_SCREENSHOT) + if (action.actionId == ACTION_TAKE_SCREENSHOT) { CUtil::TakeScreenshot(); return true; } // built in functions : execute the built-in - if (action.id == ACTION_BUILT_IN_FUNCTION) + if (action.actionId == ACTION_BUILT_IN_FUNCTION) { CBuiltins::Execute(action.strAction); m_navigationTimer.StartZero(); @@ -2509,27 +2509,27 @@ bool CApplication::OnAction(CAction &action) } // reload keymaps - if (action.id == ACTION_RELOAD_KEYMAPS) + if (action.actionId == ACTION_RELOAD_KEYMAPS) { CButtonTranslator::GetInstance().Clear(); CButtonTranslator::GetInstance().Load(); } // show info : Shows the current video or song information - if (action.id == ACTION_SHOW_INFO) + if (action.actionId == ACTION_SHOW_INFO) { g_infoManager.ToggleShowInfo(); return true; } // codec info : Shows the current song, video or picture codec information - if (action.id == ACTION_SHOW_CODEC) + if (action.actionId == ACTION_SHOW_CODEC) { g_infoManager.ToggleShowCodec(); return true; } - if ((action.id == ACTION_INCREASE_RATING || action.id == ACTION_DECREASE_RATING) && IsPlayingAudio()) + if ((action.actionId == ACTION_INCREASE_RATING || action.actionId == ACTION_DECREASE_RATING) && IsPlayingAudio()) { const CMusicInfoTag *tag = g_infoManager.GetCurrentSongTag(); if (tag) @@ -2537,12 +2537,12 @@ bool CApplication::OnAction(CAction &action) *m_itemCurrentFile->GetMusicInfoTag() = *tag; char rating = tag->GetRating(); bool needsUpdate(false); - if (rating > '0' && action.id == ACTION_DECREASE_RATING) + if (rating > '0' && action.actionId == ACTION_DECREASE_RATING) { m_itemCurrentFile->GetMusicInfoTag()->SetRating(rating - 1); needsUpdate = true; } - else if (rating < '5' && action.id == ACTION_INCREASE_RATING) + else if (rating < '5' && action.actionId == ACTION_INCREASE_RATING) { m_itemCurrentFile->GetMusicInfoTag()->SetRating(rating + 1); needsUpdate = true; @@ -2564,14 +2564,14 @@ bool CApplication::OnAction(CAction &action) } // stop : stops playing current audio song - if (action.id == ACTION_STOP) + if (action.actionId == ACTION_STOP) { StopPlaying(); return true; } // previous : play previous song from playlist - if (action.id == ACTION_PREV_ITEM) + if (action.actionId == ACTION_PREV_ITEM) { // first check whether we're within 3 seconds of the start of the track // if not, we just revert to the start of the track @@ -2588,7 +2588,7 @@ bool CApplication::OnAction(CAction &action) } // next : play next song from playlist - if (action.id == ACTION_NEXT_ITEM) + if (action.actionId == ACTION_NEXT_ITEM) { if (IsPlaying() && m_pPlayer->SkipNext()) return true; @@ -2601,7 +2601,7 @@ bool CApplication::OnAction(CAction &action) if ( IsPlaying()) { // OSD toggling - if (action.id == ACTION_SHOW_OSD) + if (action.actionId == ACTION_SHOW_OSD) { if (IsPlayingVideo() && IsPlayingFullScreenVideo()) { @@ -2618,7 +2618,7 @@ bool CApplication::OnAction(CAction &action) } // pause : pauses current audio song - if (action.id == ACTION_PAUSE && m_iPlaySpeed == 1) + if (action.actionId == ACTION_PAUSE && m_iPlaySpeed == 1) { m_pPlayer->Pause(); #ifdef HAS_KARAOKE @@ -2635,7 +2635,7 @@ bool CApplication::OnAction(CAction &action) { // if we do a FF/RW in my music then map PLAY action togo back to normal speed // if we are playing at normal speed, then allow play to pause - if (action.id == ACTION_PLAYER_PLAY || action.id == ACTION_PAUSE) + if (action.actionId == ACTION_PLAYER_PLAY || action.actionId == ACTION_PAUSE) { if (m_iPlaySpeed != 1) { @@ -2647,19 +2647,19 @@ bool CApplication::OnAction(CAction &action) } return true; } - if (action.id == ACTION_PLAYER_FORWARD || action.id == ACTION_PLAYER_REWIND) + if (action.actionId == ACTION_PLAYER_FORWARD || action.actionId == ACTION_PLAYER_REWIND) { int iPlaySpeed = m_iPlaySpeed; - if (action.id == ACTION_PLAYER_REWIND && iPlaySpeed == 1) // Enables Rewinding + if (action.actionId == ACTION_PLAYER_REWIND && iPlaySpeed == 1) // Enables Rewinding iPlaySpeed *= -2; - else if (action.id == ACTION_PLAYER_REWIND && iPlaySpeed > 1) //goes down a notch if you're FFing + else if (action.actionId == ACTION_PLAYER_REWIND && iPlaySpeed > 1) //goes down a notch if you're FFing iPlaySpeed /= 2; - else if (action.id == ACTION_PLAYER_FORWARD && iPlaySpeed < 1) //goes up a notch if you're RWing + else if (action.actionId == ACTION_PLAYER_FORWARD && iPlaySpeed < 1) //goes up a notch if you're RWing iPlaySpeed /= 2; else iPlaySpeed *= 2; - if (action.id == ACTION_PLAYER_FORWARD && iPlaySpeed == -1) //sets iSpeed back to 1 if -1 (didn't plan for a -1) + if (action.actionId == ACTION_PLAYER_FORWARD && iPlaySpeed == -1) //sets iSpeed back to 1 if -1 (didn't plan for a -1) iPlaySpeed = 1; if (iPlaySpeed > 32 || iPlaySpeed < -32) iPlaySpeed = 1; @@ -2667,13 +2667,13 @@ bool CApplication::OnAction(CAction &action) SetPlaySpeed(iPlaySpeed); return true; } - else if ((action.amount1 || GetPlaySpeed() != 1) && (action.id == ACTION_ANALOG_REWIND || action.id == ACTION_ANALOG_FORWARD)) + else if ((action.amount1 || GetPlaySpeed() != 1) && (action.actionId == ACTION_ANALOG_REWIND || action.actionId == ACTION_ANALOG_FORWARD)) { // calculate the speed based on the amount the button is held down int iPower = (int)(action.amount1 * MAX_FFWD_SPEED + 0.5f); // returns 0 -> MAX_FFWD_SPEED int iSpeed = 1 << iPower; - if (iSpeed != 1 && action.id == ACTION_ANALOG_REWIND) + if (iSpeed != 1 && action.actionId == ACTION_ANALOG_REWIND) iSpeed = -iSpeed; g_application.SetPlaySpeed(iSpeed); if (iSpeed == 1) @@ -2684,7 +2684,7 @@ bool CApplication::OnAction(CAction &action) // allow play to unpause else { - if (action.id == ACTION_PLAYER_PLAY) + if (action.actionId == ACTION_PLAYER_PLAY) { // unpause, and set the playspeed back to normal m_pPlayer->Pause(); @@ -2695,13 +2695,13 @@ bool CApplication::OnAction(CAction &action) } } } - if (action.id == ACTION_MUTE) + if (action.actionId == ACTION_MUTE) { Mute(); return true; } - if (action.id == ACTION_TOGGLE_DIGITAL_ANALOG) + if (action.actionId == ACTION_TOGGLE_DIGITAL_ANALOG) { if(g_guiSettings.GetInt("audiooutput.mode")==AUDIO_DIGITAL) g_guiSettings.SetInt("audiooutput.mode", AUDIO_ANALOG); @@ -2717,7 +2717,7 @@ bool CApplication::OnAction(CAction &action) } // Check for global volume control - if (action.amount1 && (action.id == ACTION_VOLUME_UP || action.id == ACTION_VOLUME_DOWN)) + if (action.amount1 && (action.actionId == ACTION_VOLUME_UP || action.actionId == ACTION_VOLUME_DOWN)) { if (!m_pPlayer || !m_pPlayer->IsPassthrough()) { @@ -2733,12 +2733,12 @@ bool CApplication::OnAction(CAction &action) if (g_settings.m_bMute) { // only unmute if volume is to be increased, otherwise leave muted - if (action.id == ACTION_VOLUME_DOWN) + if (action.actionId == ACTION_VOLUME_DOWN) return true; Mute(); return true; } - if (action.id == ACTION_VOLUME_UP) + if (action.actionId == ACTION_VOLUME_UP) { volume += (int)((float)fabs(action.amount1) * action.amount1 * speed); } @@ -2760,13 +2760,13 @@ bool CApplication::OnAction(CAction &action) return true; } // Check for global seek control - if (IsPlaying() && action.amount1 && (action.id == ACTION_ANALOG_SEEK_FORWARD || action.id == ACTION_ANALOG_SEEK_BACK)) + if (IsPlaying() && action.amount1 && (action.actionId == ACTION_ANALOG_SEEK_FORWARD || action.actionId == ACTION_ANALOG_SEEK_BACK)) { if (!m_pPlayer->CanSeek()) return false; m_guiDialogSeekBar.OnAction(action); return true; } - if (action.id == ACTION_GUIPROFILE_BEGIN) + if (action.actionId == ACTION_GUIPROFILE_BEGIN) { CGUIControlProfiler::Instance().SetOutputFile(_P("special://home/guiprofiler.xml")); CGUIControlProfiler::Instance().Start(); @@ -2865,7 +2865,7 @@ bool CApplication::ProcessGamepad(float frameTime) CAction action; bool fullrange; string jname = g_Joystick.GetJoystick(); - if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_BUTTON, action.id, action.strAction, fullrange)) + if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_BUTTON, action.actionId, action.strAction, fullrange)) { action.amount1 = 1.0f; action.repeat = 0.0f; @@ -2891,7 +2891,7 @@ bool CApplication::ProcessGamepad(float frameTime) { bid = -bid; } - if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_AXIS, action.id, action.strAction, fullrange)) + if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_AXIS, action.actionId, action.strAction, fullrange)) { ResetScreenSaver(); if (WakeUpScreenSaverAndDPMS()) @@ -2928,7 +2928,7 @@ bool CApplication::ProcessGamepad(float frameTime) string jname = g_Joystick.GetJoystick(); bid = position<<16|bid; - if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_HAT, action.id, action.strAction, fullrange)) + if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, jname.c_str(), bid, JACTIVE_HAT, action.actionId, action.strAction, fullrange)) { action.amount1 = 1.0f; action.repeat = 0.0f; @@ -2974,7 +2974,7 @@ bool CApplication::ProcessMouse() // call OnAction with ACTION_MOUSE CAction action; - action.id = ACTION_MOUSE; + action.actionId = ACTION_MOUSE; action.amount1 = (float) m_guiPointer.GetXPosition(); action.amount2 = (float) m_guiPointer.GetYPosition(); @@ -3034,7 +3034,7 @@ bool CApplication::ProcessHTTPApiButtons() if (keyHttp.GetButtonCode() == KEY_VMOUSE) //virtual mouse { CAction action; - action.id = ACTION_MOUSE; + action.actionId = ACTION_MOUSE; g_Mouse.SetLocation(CPoint(keyHttp.GetLeftThumbX(), keyHttp.GetLeftThumbY())); if (keyHttp.GetLeftTrigger()!=0) g_Mouse.bClick[keyHttp.GetLeftTrigger()-1]=true; @@ -3131,7 +3131,7 @@ bool CApplication::ProcessEventServer(float frameTime) { CAction action; - action.id = ACTION_MOUSE; + action.actionId = ACTION_MOUSE; if (es->GetMousePos(action.amount1, action.amount2) && g_Mouse.IsEnabled()) { CPoint point; @@ -3183,7 +3183,7 @@ bool CApplication::ProcessJoystickEvent(const std::string& joystickName, int wKe // wKeyID = -wKeyID; // Translate using regular joystick translator. - if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, action.id, action.strAction, fullRange)) + if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, action.actionId, action.strAction, fullRange)) { action.repeat = 0.0f; g_audioManager.PlayActionSound(action); @@ -4774,7 +4774,7 @@ bool CApplication::ExecuteXBMCAction(std::string actionStr) if (CButtonTranslator::TranslateActionString(actionStr.c_str(), actionID)) { CAction action; - action.id = actionID; + action.actionId = actionID; action.amount1 = 1.0f; OnAction(action); return true; diff --git a/xbmc/ButtonTranslator.cpp b/xbmc/ButtonTranslator.cpp index 00d436b8e5..8d61a812f0 100644 --- a/xbmc/ButtonTranslator.cpp +++ b/xbmc/ButtonTranslator.cpp @@ -636,7 +636,7 @@ void CButtonTranslator::GetAction(int window, const CKey &key, CAction &action, if (actionID == 0 && fallback) actionID = GetActionCode( -1, key, strAction); // Now fill our action structure - action.id = actionID; + action.actionId = actionID; action.strAction = strAction; action.amount1 = 1; // digital button (could change this for repeat acceleration) action.amount2 = 0; diff --git a/xbmc/GUIDialogAccessPoints.cpp b/xbmc/GUIDialogAccessPoints.cpp index fda1c30ce4..79ad54c148 100644 --- a/xbmc/GUIDialogAccessPoints.cpp +++ b/xbmc/GUIDialogAccessPoints.cpp @@ -43,7 +43,7 @@ CGUIDialogAccessPoints::~CGUIDialogAccessPoints(void) bool CGUIDialogAccessPoints::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), CONTROL_ACCESS_POINTS); OnMessage(msg); diff --git a/xbmc/GUIDialogFileBrowser.cpp b/xbmc/GUIDialogFileBrowser.cpp index 0155f5be98..0368192926 100644 --- a/xbmc/GUIDialogFileBrowser.cpp +++ b/xbmc/GUIDialogFileBrowser.cpp @@ -79,7 +79,7 @@ CGUIDialogFileBrowser::~CGUIDialogFileBrowser() bool CGUIDialogFileBrowser::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { if (m_vecItems->IsVirtualDirectoryRoot() && g_advancedSettings.m_bUseEvilB) Close(); @@ -87,7 +87,7 @@ bool CGUIDialogFileBrowser::OnAction(const CAction &action) GoParentFolder(); return true; } - if ((action.id == ACTION_CONTEXT_MENU || action.id == ACTION_MOUSE_RIGHT_CLICK) && m_Directory->m_strPath.IsEmpty()) + if ((action.actionId == ACTION_CONTEXT_MENU || action.actionId == ACTION_MOUSE_RIGHT_CLICK) && m_Directory->m_strPath.IsEmpty()) { int iItem = m_viewControl.GetSelectedItem(); if ((!m_addSourceType.IsEmpty() && iItem != m_vecItems->Size()-1)) diff --git a/xbmc/GUIDialogGamepad.cpp b/xbmc/GUIDialogGamepad.cpp index 24f3cd0720..94d518318e 100644 --- a/xbmc/GUIDialogGamepad.cpp +++ b/xbmc/GUIDialogGamepad.cpp @@ -72,7 +72,7 @@ bool CGUIDialogGamepad::OnAction(const CAction &action) SetLine(2, strHiddenInput); return true; } - else if (action.buttonCode == KEY_BUTTON_BACK || action.id == ACTION_CLOSE_DIALOG || action.id == ACTION_PREVIOUS_MENU || action.id == ACTION_PARENT_DIR) + else if (action.buttonCode == KEY_BUTTON_BACK || action.actionId == ACTION_CLOSE_DIALOG || action.actionId == ACTION_PREVIOUS_MENU || action.actionId == ACTION_PARENT_DIR) { m_bConfirmed = false; m_bCanceled = true; @@ -115,7 +115,7 @@ bool CGUIDialogGamepad::OnAction(const CAction &action) Close(); return true; } - else if (action.id >= REMOTE_0 && action.id <= REMOTE_9) + else if (action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) { return true; // unhandled } diff --git a/xbmc/GUIDialogKeyboard.cpp b/xbmc/GUIDialogKeyboard.cpp index 47f024ddb9..71c2713672 100644 --- a/xbmc/GUIDialogKeyboard.cpp +++ b/xbmc/GUIDialogKeyboard.cpp @@ -103,19 +103,19 @@ void CGUIDialogKeyboard::OnInitWindow() bool CGUIDialogKeyboard::OnAction(const CAction &action) { bool handled(true); - if (action.id == ACTION_BACKSPACE) + if (action.actionId == ACTION_BACKSPACE) { Backspace(); } - else if (action.id == ACTION_ENTER) + else if (action.actionId == ACTION_ENTER) { OnOK(); } - else if (action.id == ACTION_CURSOR_LEFT) + else if (action.actionId == ACTION_CURSOR_LEFT) { MoveCursor( -1); } - else if (action.id == ACTION_CURSOR_RIGHT) + else if (action.actionId == ACTION_CURSOR_RIGHT) { if ((unsigned int) GetCursorPos() == m_strEdit.size() && (m_strEdit.size() == 0 || m_strEdit[m_strEdit.size() - 1] != ' ')) { // add a space @@ -124,21 +124,21 @@ bool CGUIDialogKeyboard::OnAction(const CAction &action) else MoveCursor(1); } - else if (action.id == ACTION_SHIFT) + else if (action.actionId == ACTION_SHIFT) { OnShift(); } - else if (action.id == ACTION_SYMBOLS) + else if (action.actionId == ACTION_SYMBOLS) { OnSymbols(); } - else if (action.id >= REMOTE_0 && action.id <= REMOTE_9) + else if (action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) { - OnRemoteNumberClick(action.id); + OnRemoteNumberClick(action.actionId); } - else if (action.id >= KEY_VKEY && action.id < KEY_ASCII) + else if (action.actionId >= KEY_VKEY && action.actionId < KEY_ASCII) { // input from the keyboard (vkey, not ascii) - uint8_t b = action.id & 0xFF; + uint8_t b = action.actionId & 0xFF; if (b == 0x24) // home { MoveCursor(-GetCursorPos()); @@ -170,9 +170,9 @@ bool CGUIDialogKeyboard::OnAction(const CAction &action) else if (b == 0x08) Backspace(); // backspace else if (b == 0x1B) Close(); // escape } - else if (action.id >= KEY_ASCII) + else if (action.actionId >= KEY_ASCII) { // input from the keyboard - //char ch = action.id & 0xFF; + //char ch = action.actionId & 0xFF; switch (action.unicode) { case 13: // enter diff --git a/xbmc/GUIDialogMediaSource.cpp b/xbmc/GUIDialogMediaSource.cpp index 0b7b855ead..dcc07f9b55 100644 --- a/xbmc/GUIDialogMediaSource.cpp +++ b/xbmc/GUIDialogMediaSource.cpp @@ -61,7 +61,7 @@ CGUIDialogMediaSource::~CGUIDialogMediaSource() bool CGUIDialogMediaSource::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { m_confirmed = false; } diff --git a/xbmc/GUIDialogMusicOSD.cpp b/xbmc/GUIDialogMusicOSD.cpp index 5c21d87031..2f8a3ca3bb 100644 --- a/xbmc/GUIDialogMusicOSD.cpp +++ b/xbmc/GUIDialogMusicOSD.cpp @@ -68,7 +68,7 @@ bool CGUIDialogMusicOSD::OnMessage(CGUIMessage &message) SET_CONTROL_FOCUS(CONTROL_VIS_CHOOSER, 0); // fire off an event that we've pressed this button... CAction action; - action.id = ACTION_SELECT_ITEM; + action.actionId = ACTION_SELECT_ITEM; OnAction(action); } else if (iControl == CONTROL_LOCK_BUTTON) @@ -118,7 +118,7 @@ void CGUIDialogMusicOSD::OnInitWindow() bool CGUIDialogMusicOSD::OnAction(const CAction &action) { // keyboard or controller movement should prevent autoclosing - if (action.id != ACTION_MOUSE && m_autoClosing) + if (action.actionId != ACTION_MOUSE && m_autoClosing) SetAutoClose(3000); return CGUIDialog::OnAction(action); } @@ -128,7 +128,7 @@ bool CGUIDialogMusicOSD::OnMouseEvent(const CPoint &point, const CMouseEvent &ev if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { // pause CAction action; - action.id = ACTION_PAUSE; + action.actionId = ACTION_PAUSE; return g_application.OnAction(action); } return CGUIDialog::OnMouseEvent(point, event); diff --git a/xbmc/GUIDialogNetworkSetup.cpp b/xbmc/GUIDialogNetworkSetup.cpp index 000440c80b..bf610a6b5d 100644 --- a/xbmc/GUIDialogNetworkSetup.cpp +++ b/xbmc/GUIDialogNetworkSetup.cpp @@ -53,7 +53,7 @@ CGUIDialogNetworkSetup::~CGUIDialogNetworkSetup() bool CGUIDialogNetworkSetup::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) m_confirmed = false; return CGUIDialog::OnAction(action); } diff --git a/xbmc/GUIDialogNumeric.cpp b/xbmc/GUIDialogNumeric.cpp index 289dbe268b..55e51f8c84 100644 --- a/xbmc/GUIDialogNumeric.cpp +++ b/xbmc/GUIDialogNumeric.cpp @@ -55,28 +55,28 @@ CGUIDialogNumeric::~CGUIDialogNumeric(void) bool CGUIDialogNumeric::OnAction(const CAction &action) { - if (action.id == ACTION_CLOSE_DIALOG || action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_CLOSE_DIALOG || action.actionId == ACTION_PREVIOUS_MENU) OnCancel(); - else if (action.id == ACTION_NEXT_ITEM) + else if (action.actionId == ACTION_NEXT_ITEM) OnNext(); - else if (action.id == ACTION_PREV_ITEM) + else if (action.actionId == ACTION_PREV_ITEM) OnPrevious(); - else if (action.id == ACTION_BACKSPACE) + else if (action.actionId == ACTION_BACKSPACE) OnBackSpace(); - else if (action.id == ACTION_ENTER) + else if (action.actionId == ACTION_ENTER) OnOK(); - else if (action.id >= REMOTE_0 && action.id <= REMOTE_9) - OnNumber(action.id - REMOTE_0); - else if (action.id >= KEY_VKEY && action.id < KEY_ASCII) + else if (action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) + OnNumber(action.actionId - REMOTE_0); + else if (action.actionId >= KEY_VKEY && action.actionId < KEY_ASCII) { // input from the keyboard (vkey, not ascii) - BYTE b = action.id & 0xFF; + BYTE b = action.actionId & 0xFF; if (b == 0x25) OnPrevious(); // left else if (b == 0x27) OnNext(); // right else if (b == 0x0D) OnOK(); // enter else if (b == 0x08) OnBackSpace(); // backspace else if (b == 0x1B) OnCancel(); // escape } - else if (action.id >= KEY_ASCII) // FIXME make it KEY_UNICODE + else if (action.actionId >= KEY_ASCII) // FIXME make it KEY_UNICODE { // input from the keyboard if (action.unicode == 10 || action.unicode == 13) OnOK(); // enter else if (action.unicode == 8) OnBackSpace(); // backspace diff --git a/xbmc/GUIDialogPictureInfo.cpp b/xbmc/GUIDialogPictureInfo.cpp index 021c43fb08..a1297c4128 100644 --- a/xbmc/GUIDialogPictureInfo.cpp +++ b/xbmc/GUIDialogPictureInfo.cpp @@ -53,7 +53,7 @@ void CGUIDialogPictureInfo::OnInitWindow() bool CGUIDialogPictureInfo::OnAction(const CAction& action) { - switch (action.id) + switch (action.actionId) { // if we're running from slideshow mode, drop the "next picture" and "previous picture" actions through. case ACTION_NEXT_PICTURE: diff --git a/xbmc/GUIDialogProgress.cpp b/xbmc/GUIDialogProgress.cpp index 07498942d2..67807282cc 100644 --- a/xbmc/GUIDialogProgress.cpp +++ b/xbmc/GUIDialogProgress.cpp @@ -138,7 +138,7 @@ bool CGUIDialogProgress::OnMessage(CGUIMessage& message) bool CGUIDialogProgress::OnAction(const CAction &action) { - if (action.id == ACTION_CLOSE_DIALOG || action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_CLOSE_DIALOG || action.actionId == ACTION_PREVIOUS_MENU) { if (m_bCanCancel) { diff --git a/xbmc/GUIDialogSeekBar.cpp b/xbmc/GUIDialogSeekBar.cpp index 17f662ba7b..31535b1032 100644 --- a/xbmc/GUIDialogSeekBar.cpp +++ b/xbmc/GUIDialogSeekBar.cpp @@ -47,7 +47,7 @@ CGUIDialogSeekBar::~CGUIDialogSeekBar(void) bool CGUIDialogSeekBar::OnAction(const CAction &action) { - if (action.id == ACTION_ANALOG_SEEK_FORWARD || action.id == ACTION_ANALOG_SEEK_BACK) + if (action.actionId == ACTION_ANALOG_SEEK_FORWARD || action.actionId == ACTION_ANALOG_SEEK_BACK) { if (!m_bRequireSeek) { // start of seeking @@ -72,7 +72,7 @@ bool CGUIDialogSeekBar::OnAction(const CAction &action) else speed /= g_infoManager.GetFPS(); - if (action.id == ACTION_ANALOG_SEEK_FORWARD) + if (action.actionId == ACTION_ANALOG_SEEK_FORWARD) m_fSeekPercentage += action.amount1 * action.amount1 * speed; else m_fSeekPercentage -= action.amount1 * action.amount1 * speed; diff --git a/xbmc/GUIDialogSettings.cpp b/xbmc/GUIDialogSettings.cpp index 64b70471ad..5871f11716 100644 --- a/xbmc/GUIDialogSettings.cpp +++ b/xbmc/GUIDialogSettings.cpp @@ -203,7 +203,7 @@ void CGUIDialogSettings::UpdateSetting(unsigned int id) bool CGUIDialogSettings::OnAction(const CAction& action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { OnCancel(); Close(); diff --git a/xbmc/GUIDialogSlider.cpp b/xbmc/GUIDialogSlider.cpp index eec9cfbf00..d578699711 100644 --- a/xbmc/GUIDialogSlider.cpp +++ b/xbmc/GUIDialogSlider.cpp @@ -41,7 +41,7 @@ CGUIDialogSlider::~CGUIDialogSlider(void) bool CGUIDialogSlider::OnAction(const CAction &action) { - if (action.id == ACTION_SELECT_ITEM) + if (action.actionId == ACTION_SELECT_ITEM) { Close(); return true; diff --git a/xbmc/GUIDialogSmartPlaylistEditor.cpp b/xbmc/GUIDialogSmartPlaylistEditor.cpp index 37efc04500..c08e932d8d 100644 --- a/xbmc/GUIDialogSmartPlaylistEditor.cpp +++ b/xbmc/GUIDialogSmartPlaylistEditor.cpp @@ -79,7 +79,7 @@ CGUIDialogSmartPlaylistEditor::~CGUIDialogSmartPlaylistEditor() bool CGUIDialogSmartPlaylistEditor::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) m_cancelled = true; return CGUIDialog::OnAction(action); } diff --git a/xbmc/GUIDialogSmartPlaylistRule.cpp b/xbmc/GUIDialogSmartPlaylistRule.cpp index bcb86680bc..238f6210d8 100644 --- a/xbmc/GUIDialogSmartPlaylistRule.cpp +++ b/xbmc/GUIDialogSmartPlaylistRule.cpp @@ -51,7 +51,7 @@ CGUIDialogSmartPlaylistRule::~CGUIDialogSmartPlaylistRule() bool CGUIDialogSmartPlaylistRule::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) m_cancelled = true; return CGUIDialog::OnAction(action); } diff --git a/xbmc/GUIDialogSongInfo.cpp b/xbmc/GUIDialogSongInfo.cpp index 08ed15e305..403a12a5a9 100644 --- a/xbmc/GUIDialogSongInfo.cpp +++ b/xbmc/GUIDialogSongInfo.cpp @@ -126,19 +126,19 @@ bool CGUIDialogSongInfo::OnMessage(CGUIMessage& message) bool CGUIDialogSongInfo::OnAction(const CAction &action) { char rating = m_song->GetMusicInfoTag()->GetRating(); - if (action.id == ACTION_INCREASE_RATING) + if (action.actionId == ACTION_INCREASE_RATING) { if (rating < '5') SetRating(rating + 1); return true; } - else if (action.id == ACTION_DECREASE_RATING) + else if (action.actionId == ACTION_DECREASE_RATING) { if (rating > '0') SetRating(rating - 1); return true; } - else if (action.id == ACTION_PREVIOUS_MENU) + else if (action.actionId == ACTION_PREVIOUS_MENU) m_cancelled = true; return CGUIDialog::OnAction(action); } diff --git a/xbmc/GUIDialogTeletext.cpp b/xbmc/GUIDialogTeletext.cpp index 682a8e4497..9a034ab101 100644 --- a/xbmc/GUIDialogTeletext.cpp +++ b/xbmc/GUIDialogTeletext.cpp @@ -45,7 +45,7 @@ CGUIDialogTeletext::~CGUIDialogTeletext() bool CGUIDialogTeletext::OnAction(const CAction& action) { - if (action.id == ACTION_PREVIOUS_MENU || action.id == ACTION_CLOSE_DIALOG) + if (action.actionId == ACTION_PREVIOUS_MENU || action.actionId == ACTION_CLOSE_DIALOG) { m_bClose = true; return true; diff --git a/xbmc/GUIDialogVolumeBar.cpp b/xbmc/GUIDialogVolumeBar.cpp index a9f2873177..544e37dbb8 100644 --- a/xbmc/GUIDialogVolumeBar.cpp +++ b/xbmc/GUIDialogVolumeBar.cpp @@ -36,7 +36,7 @@ CGUIDialogVolumeBar::~CGUIDialogVolumeBar(void) bool CGUIDialogVolumeBar::OnAction(const CAction &action) { - if (action.id == ACTION_VOLUME_UP || action.id == ACTION_VOLUME_DOWN) + if (action.actionId == ACTION_VOLUME_UP || action.actionId == ACTION_VOLUME_DOWN) { // reset the timer, as we've changed the volume level ResetTimer(); return true; diff --git a/xbmc/GUIDialogYesNo.cpp b/xbmc/GUIDialogYesNo.cpp index 697404f22b..d6101895cc 100644 --- a/xbmc/GUIDialogYesNo.cpp +++ b/xbmc/GUIDialogYesNo.cpp @@ -63,7 +63,7 @@ bool CGUIDialogYesNo::OnMessage(CGUIMessage& message) bool CGUIDialogYesNo::OnAction(const CAction& action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { m_bCanceled = true; m_bConfirmed = false; diff --git a/xbmc/GUIMediaWindow.cpp b/xbmc/GUIMediaWindow.cpp index f183fea52d..324a41e418 100644 --- a/xbmc/GUIMediaWindow.cpp +++ b/xbmc/GUIMediaWindow.cpp @@ -137,7 +137,7 @@ CFileItemPtr CGUIMediaWindow::GetCurrentListItem(int offset) bool CGUIMediaWindow::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { if (m_vecItems->IsVirtualDirectoryRoot() && g_advancedSettings.m_bUseEvilB) g_windowManager.PreviousWindow(); @@ -146,14 +146,14 @@ bool CGUIMediaWindow::OnAction(const CAction &action) return true; } - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; } // the non-contextual menu can be called at any time - if (action.id == ACTION_CONTEXT_MENU && !m_viewControl.HasControl(GetFocusedControlID())) + if (action.actionId == ACTION_CONTEXT_MENU && !m_viewControl.HasControl(GetFocusedControlID())) { OnPopupMenu(-1); return true; @@ -163,7 +163,7 @@ bool CGUIMediaWindow::OnAction(const CAction &action) return true; // live filtering - if (action.id == ACTION_FILTER_CLEAR) + if (action.actionId == ACTION_FILTER_CLEAR) { CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_FILTER_ITEMS); message.SetStringParam(""); @@ -171,17 +171,17 @@ bool CGUIMediaWindow::OnAction(const CAction &action) return true; } - if (action.id == ACTION_BACKSPACE) + if (action.actionId == ACTION_BACKSPACE) { CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_FILTER_ITEMS, 2); // 2 for delete OnMessage(message); return true; } - if (action.id >= ACTION_FILTER_SMS2 && action.id <= ACTION_FILTER_SMS9) + if (action.actionId >= ACTION_FILTER_SMS2 && action.actionId <= ACTION_FILTER_SMS9) { CStdString filter; - filter.Format("%i", (int)(action.id - ACTION_FILTER_SMS2 + 2)); + filter.Format("%i", (int)(action.actionId - ACTION_FILTER_SMS2 + 2)); CGUIMessage message(GUI_MSG_NOTIFY_ALL, GetID(), 0, GUI_MSG_FILTER_ITEMS, 1); // 1 for append message.SetStringParam(filter); OnMessage(message); diff --git a/xbmc/GUIWindowFileManager.cpp b/xbmc/GUIWindowFileManager.cpp index 36bda9bcdd..d158dff8c0 100644 --- a/xbmc/GUIWindowFileManager.cpp +++ b/xbmc/GUIWindowFileManager.cpp @@ -117,12 +117,12 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) if (list >= 0 && list <= 1) { // the non-contextual menu can be called at any time - if (action.id == ACTION_CONTEXT_MENU && m_vecItems[list]->Size() == 0) + if (action.actionId == ACTION_CONTEXT_MENU && m_vecItems[list]->Size() == 0) { OnPopupMenu(list,-1, false); return true; } - if (action.id == ACTION_DELETE_ITEM) + if (action.actionId == ACTION_DELETE_ITEM) { if (CanDelete(list)) { @@ -132,7 +132,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) } return true; } - if (action.id == ACTION_COPY_ITEM) + if (action.actionId == ACTION_COPY_ITEM) { if (CanCopy(list)) { @@ -142,7 +142,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) } return true; } - if (action.id == ACTION_MOVE_ITEM) + if (action.actionId == ACTION_MOVE_ITEM) { if (CanMove(list)) { @@ -152,7 +152,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) } return true; } - if (action.id == ACTION_RENAME_ITEM) + if (action.actionId == ACTION_RENAME_ITEM) { if (CanRename(list)) { @@ -162,7 +162,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) } return true; } - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { if (m_vecItems[list]->IsVirtualDirectoryRoot()) g_windowManager.PreviousWindow(); @@ -170,7 +170,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) GoParentFolder(list); return true; } - if (action.id == ACTION_PLAYER_PLAY) + if (action.actionId == ACTION_PLAYER_PLAY) { #ifdef HAS_DVD_DRIVE if (m_vecItems[list]->Get(GetSelectedItem(list))->IsDVD()) @@ -178,7 +178,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action) #endif } } - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/GUIWindowFullScreen.cpp b/xbmc/GUIWindowFullScreen.cpp index 0bf519d2b6..f118c2d0c2 100644 --- a/xbmc/GUIWindowFullScreen.cpp +++ b/xbmc/GUIWindowFullScreen.cpp @@ -190,7 +190,7 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action) if (g_application.m_pPlayer != NULL && g_application.m_pPlayer->OnAction(action)) return true; - switch (action.id) + switch (action.actionId) { case ACTION_SHOW_GUI: @@ -304,13 +304,13 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action) case ACTION_SUBTITLE_DELAY: CGUIDialogSlider::ShowAndGetInput(g_localizeStrings.Get(22006), g_settings.m_currentVideoSettings.m_SubtitleDelay, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, - g_advancedSettings.m_videoSubsDelayRange, this, (void *)&action.id); + g_advancedSettings.m_videoSubsDelayRange, this, (void *)&action.actionId); return true; break; case ACTION_AUDIO_DELAY: CGUIDialogSlider::ShowAndGetInput(g_localizeStrings.Get(297), g_settings.m_currentVideoSettings.m_AudioDelay, -g_advancedSettings.m_videoAudioDelayRange, 0.025f, - g_advancedSettings.m_videoAudioDelayRange, this, (void *)&action.id); + g_advancedSettings.m_videoAudioDelayRange, this, (void *)&action.actionId); return true; break; case ACTION_AUDIO_DELAY_MIN: @@ -363,21 +363,21 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action) int channelNr = -1; CStdString strChannel; - strChannel.Format("%i", action.id - REMOTE_0); + strChannel.Format("%i", action.actionId - REMOTE_0); if (CGUIDialogNumeric::ShowAndGetNumber(strChannel, g_localizeStrings.Get(19000))) channelNr = atoi(strChannel.c_str()); if (channelNr > 0) { CAction action; - action.id = ACTION_CHANNEL_SWITCH; + action.actionId = ACTION_CHANNEL_SWITCH; action.amount1 = (float)channelNr; OnAction(action); } } else { - ChangetheTimeCode(action.id); + ChangetheTimeCode(action.actionId); } return true; } @@ -544,14 +544,14 @@ bool CGUIWindowFullScreen::OnMouseEvent(const CPoint &point, const CMouseEvent & if (event.m_id == ACTION_MOUSE_RIGHT_CLICK) { // no control found to absorb this click - go back to GUI CAction action; - action.id = ACTION_SHOW_GUI; + action.actionId = ACTION_SHOW_GUI; OnAction(action); return true; } if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { // no control found to absorb this click - pause video CAction action; - action.id = ACTION_PAUSE; + action.actionId = ACTION_PAUSE; return g_application.OnAction(action); } if (event.m_id == ACTION_MOUSE_WHEEL) @@ -559,7 +559,7 @@ bool CGUIWindowFullScreen::OnMouseEvent(const CPoint &point, const CMouseEvent & int wheel = abs(event.m_wheel); CAction action; action.amount1 = 0.5f * (float)wheel; - action.id = event.m_wheel > 0 ? ACTION_ANALOG_SEEK_FORWARD : ACTION_ANALOG_SEEK_BACK; + action.actionId = event.m_wheel > 0 ? ACTION_ANALOG_SEEK_FORWARD : ACTION_ANALOG_SEEK_BACK; return g_application.OnAction(action); } if (event.m_id || event.m_offsetX || event.m_offsetY) diff --git a/xbmc/GUIWindowLoginScreen.cpp b/xbmc/GUIWindowLoginScreen.cpp index 13b17618e5..451b6e2c37 100644 --- a/xbmc/GUIWindowLoginScreen.cpp +++ b/xbmc/GUIWindowLoginScreen.cpp @@ -137,7 +137,7 @@ bool CGUIWindowLoginScreen::OnAction(const CAction &action) { // don't allow any built in actions to act here. // this forces only navigation type actions to be performed. - if (action.id == ACTION_BUILT_IN_FUNCTION) + if (action.actionId == ACTION_BUILT_IN_FUNCTION) return true; // pretend we handled it return CGUIWindow::OnAction(action); } diff --git a/xbmc/GUIWindowMusicBase.cpp b/xbmc/GUIWindowMusicBase.cpp index ad8b006e52..53d83817d1 100644 --- a/xbmc/GUIWindowMusicBase.cpp +++ b/xbmc/GUIWindowMusicBase.cpp @@ -86,7 +86,7 @@ CGUIWindowMusicBase::~CGUIWindowMusicBase () /// \param action Action that can be reacted on. bool CGUIWindowMusicBase::OnAction(const CAction& action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { CGUIDialogMusicScan *musicScan = (CGUIDialogMusicScan *)g_windowManager.GetWindow(WINDOW_DIALOG_MUSIC_SCAN); if (musicScan && !musicScan->IsDialogRunning()) @@ -96,7 +96,7 @@ bool CGUIWindowMusicBase::OnAction(const CAction& action) } } - if (action.id == ACTION_SHOW_PLAYLIST) + if (action.actionId == ACTION_SHOW_PLAYLIST) { g_windowManager.ActivateWindow(WINDOW_MUSIC_PLAYLIST); return true; diff --git a/xbmc/GUIWindowMusicNav.cpp b/xbmc/GUIWindowMusicNav.cpp index f7e4989dec..e2a432dc1e 100644 --- a/xbmc/GUIWindowMusicNav.cpp +++ b/xbmc/GUIWindowMusicNav.cpp @@ -296,7 +296,7 @@ bool CGUIWindowMusicNav::OnMessage(CGUIMessage& message) bool CGUIWindowMusicNav::OnAction(const CAction& action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { if (g_advancedSettings.m_bUseEvilB && m_vecItems->m_strPath == m_startDirectory) { @@ -304,7 +304,7 @@ bool CGUIWindowMusicNav::OnAction(const CAction& action) return true; } } - if (action.id == ACTION_SCAN_ITEM) + if (action.actionId == ACTION_SCAN_ITEM) { int item = m_viewControl.GetSelectedItem(); CMusicDatabaseDirectory dir; diff --git a/xbmc/GUIWindowMusicPlaylist.cpp b/xbmc/GUIWindowMusicPlaylist.cpp index d2f7b239bd..a5427a0129 100644 --- a/xbmc/GUIWindowMusicPlaylist.cpp +++ b/xbmc/GUIWindowMusicPlaylist.cpp @@ -210,23 +210,23 @@ bool CGUIWindowMusicPlayList::OnMessage(CGUIMessage& message) bool CGUIWindowMusicPlayList::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { // Playlist has no parent dirs return true; } - if (action.id == ACTION_SHOW_PLAYLIST) + if (action.actionId == ACTION_SHOW_PLAYLIST) { g_windowManager.ChangeActiveWindow(WINDOW_MUSIC); return true; } - if ((action.id == ACTION_MOVE_ITEM_UP) || (action.id == ACTION_MOVE_ITEM_DOWN)) + if ((action.actionId == ACTION_MOVE_ITEM_UP) || (action.actionId == ACTION_MOVE_ITEM_DOWN)) { int iItem = -1; int iFocusedControl = GetFocusedControlID(); if (m_viewControl.HasControl(iFocusedControl)) iItem = m_viewControl.GetSelectedItem(); - OnMove(iItem, action.id); + OnMove(iItem, action.actionId); return true; } return CGUIWindowMusicBase::OnAction(action); diff --git a/xbmc/GUIWindowMusicPlaylistEditor.cpp b/xbmc/GUIWindowMusicPlaylistEditor.cpp index 77ee25d731..ae97980a68 100644 --- a/xbmc/GUIWindowMusicPlaylistEditor.cpp +++ b/xbmc/GUIWindowMusicPlaylistEditor.cpp @@ -63,7 +63,7 @@ CGUIWindowMusicPlaylistEditor::~CGUIWindowMusicPlaylistEditor(void) bool CGUIWindowMusicPlaylistEditor::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR && !m_viewControl.HasControl(GetFocusedControlID())) + if (action.actionId == ACTION_PARENT_DIR && !m_viewControl.HasControl(GetFocusedControlID())) { // don't go to parent folder unless we're on the list in question g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/GUIWindowMusicSongs.cpp b/xbmc/GUIWindowMusicSongs.cpp index ef9d70295c..4149a1e090 100644 --- a/xbmc/GUIWindowMusicSongs.cpp +++ b/xbmc/GUIWindowMusicSongs.cpp @@ -225,7 +225,7 @@ bool CGUIWindowMusicSongs::OnMessage(CGUIMessage& message) bool CGUIWindowMusicSongs::OnAction(const CAction& action) { - if (action.id == ACTION_SCAN_ITEM) + if (action.actionId == ACTION_SCAN_ITEM) { int item = m_viewControl.GetSelectedItem(); if (item > -1 && m_vecItems->Get(item)->m_bIsFolder) diff --git a/xbmc/GUIWindowOSD.cpp b/xbmc/GUIWindowOSD.cpp index ef8dbc216f..231a7d897a 100644 --- a/xbmc/GUIWindowOSD.cpp +++ b/xbmc/GUIWindowOSD.cpp @@ -57,10 +57,10 @@ void CGUIWindowOSD::Render() bool CGUIWindowOSD::OnAction(const CAction &action) { // keyboard or controller movement should prevent autoclosing - if (action.id != ACTION_MOUSE && m_autoClosing) + if (action.actionId != ACTION_MOUSE && m_autoClosing) SetAutoClose(3000); - if (action.id == ACTION_NEXT_ITEM || action.id == ACTION_PREV_ITEM) + if (action.actionId == ACTION_NEXT_ITEM || action.actionId == ACTION_PREV_ITEM) { // these could indicate next chapter if video supports it if (g_application.m_pPlayer != NULL && g_application.m_pPlayer->OnAction(action)) @@ -77,13 +77,13 @@ bool CGUIWindowOSD::OnMouseEvent(const CPoint &point, const CMouseEvent &event) int wheel = abs(event.m_wheel); CAction action; action.amount1 = 0.5f * (float)wheel; - action.id = event.m_wheel > 0 ? ACTION_ANALOG_SEEK_FORWARD : ACTION_ANALOG_SEEK_BACK; + action.actionId = event.m_wheel > 0 ? ACTION_ANALOG_SEEK_FORWARD : ACTION_ANALOG_SEEK_BACK; return g_application.OnAction(action); } if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { // pause CAction action; - action.id = ACTION_PAUSE; + action.actionId = ACTION_PAUSE; return g_application.OnAction(action); } diff --git a/xbmc/GUIWindowScripts.cpp b/xbmc/GUIWindowScripts.cpp index 1108b84d99..446d0b5ec9 100644 --- a/xbmc/GUIWindowScripts.cpp +++ b/xbmc/GUIWindowScripts.cpp @@ -59,7 +59,7 @@ CGUIWindowScripts::~CGUIWindowScripts() bool CGUIWindowScripts::OnAction(const CAction &action) { - if (action.id == ACTION_SHOW_INFO) + if (action.actionId == ACTION_SHOW_INFO) { OnInfo(); return true; diff --git a/xbmc/GUIWindowScriptsInfo.cpp b/xbmc/GUIWindowScriptsInfo.cpp index ef2aeae94d..5404922b95 100644 --- a/xbmc/GUIWindowScriptsInfo.cpp +++ b/xbmc/GUIWindowScriptsInfo.cpp @@ -33,7 +33,7 @@ CGUIWindowScriptsInfo::~CGUIWindowScriptsInfo(void) bool CGUIWindowScriptsInfo::OnAction(const CAction &action) { - if (action.id == ACTION_SHOW_INFO) + if (action.actionId == ACTION_SHOW_INFO) { // erase debug screen strInfo = ""; diff --git a/xbmc/GUIWindowSettings.cpp b/xbmc/GUIWindowSettings.cpp index f1bdda242b..e6bd2cc327 100644 --- a/xbmc/GUIWindowSettings.cpp +++ b/xbmc/GUIWindowSettings.cpp @@ -40,7 +40,7 @@ CGUIWindowSettings::~CGUIWindowSettings(void) bool CGUIWindowSettings::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/GUIWindowSettingsCategory.cpp b/xbmc/GUIWindowSettingsCategory.cpp index 67d398f96f..94abc64aa1 100644 --- a/xbmc/GUIWindowSettingsCategory.cpp +++ b/xbmc/GUIWindowSettingsCategory.cpp @@ -165,7 +165,7 @@ CGUIWindowSettingsCategory::~CGUIWindowSettingsCategory(void) bool CGUIWindowSettingsCategory::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_settings.Save(); if (m_iWindowBeforeJump!=WINDOW_INVALID) diff --git a/xbmc/GUIWindowSettingsProfile.cpp b/xbmc/GUIWindowSettingsProfile.cpp index fb2258d89e..ea42dfc3e5 100644 --- a/xbmc/GUIWindowSettingsProfile.cpp +++ b/xbmc/GUIWindowSettingsProfile.cpp @@ -55,7 +55,7 @@ CGUIWindowSettingsProfile::~CGUIWindowSettingsProfile(void) bool CGUIWindowSettingsProfile::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/GUIWindowSettingsScreenCalibration.cpp b/xbmc/GUIWindowSettingsScreenCalibration.cpp index 466aaf3dd9..9763766b38 100644 --- a/xbmc/GUIWindowSettingsScreenCalibration.cpp +++ b/xbmc/GUIWindowSettingsScreenCalibration.cpp @@ -57,7 +57,7 @@ CGUIWindowSettingsScreenCalibration::~CGUIWindowSettingsScreenCalibration(void) bool CGUIWindowSettingsScreenCalibration::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PREVIOUS_MENU: { diff --git a/xbmc/GUIWindowSlideShow.cpp b/xbmc/GUIWindowSlideShow.cpp index dbefb6c6ba..3c21f27772 100644 --- a/xbmc/GUIWindowSlideShow.cpp +++ b/xbmc/GUIWindowSlideShow.cpp @@ -458,7 +458,7 @@ bool CGUIWindowSlideShow::OnAction(const CAction &action) return true; } - switch (action.id) + switch (action.actionId) { case ACTION_SHOW_CODEC: { @@ -541,7 +541,7 @@ bool CGUIWindowSlideShow::OnAction(const CAction &action) case ACTION_ZOOM_LEVEL_7: case ACTION_ZOOM_LEVEL_8: case ACTION_ZOOM_LEVEL_9: - Zoom((action.id - ACTION_ZOOM_LEVEL_NORMAL) + 1); + Zoom((action.actionId - ACTION_ZOOM_LEVEL_NORMAL) + 1); break; case ACTION_ANALOG_MOVE: Move(action.amount1*PICTURE_MOVE_AMOUNT_ANALOG, -action.amount2*PICTURE_MOVE_AMOUNT_ANALOG); diff --git a/xbmc/GUIWindowSystemInfo.cpp b/xbmc/GUIWindowSystemInfo.cpp index 0d5d777dea..7f47517003 100644 --- a/xbmc/GUIWindowSystemInfo.cpp +++ b/xbmc/GUIWindowSystemInfo.cpp @@ -49,7 +49,7 @@ CGUIWindowSystemInfo::~CGUIWindowSystemInfo(void) } bool CGUIWindowSystemInfo::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/GUIWindowTestPattern.cpp b/xbmc/GUIWindowTestPattern.cpp index 7310922eca..887731be75 100644 --- a/xbmc/GUIWindowTestPattern.cpp +++ b/xbmc/GUIWindowTestPattern.cpp @@ -37,7 +37,7 @@ CGUIWindowTestPattern::~CGUIWindowTestPattern(void) bool CGUIWindowTestPattern::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_PREVIOUS_MENU: { diff --git a/xbmc/GUIWindowVideoBase.cpp b/xbmc/GUIWindowVideoBase.cpp index c2e1e42b00..02e79d6b07 100644 --- a/xbmc/GUIWindowVideoBase.cpp +++ b/xbmc/GUIWindowVideoBase.cpp @@ -93,13 +93,13 @@ CGUIWindowVideoBase::~CGUIWindowVideoBase() bool CGUIWindowVideoBase::OnAction(const CAction &action) { - if (action.id == ACTION_SHOW_PLAYLIST) + if (action.actionId == ACTION_SHOW_PLAYLIST) { OutputDebugString("activate guiwindowvideoplaylist!\n"); g_windowManager.ActivateWindow(WINDOW_VIDEO_PLAYLIST); return true; } - if (action.id == ACTION_SCAN_ITEM) + if (action.actionId == ACTION_SCAN_ITEM) return OnContextButton(m_viewControl.GetSelectedItem(),CONTEXT_BUTTON_SCAN); return CGUIMediaWindow::OnAction(action); diff --git a/xbmc/GUIWindowVideoFiles.cpp b/xbmc/GUIWindowVideoFiles.cpp index 3f4dab7b1b..9bd8705094 100644 --- a/xbmc/GUIWindowVideoFiles.cpp +++ b/xbmc/GUIWindowVideoFiles.cpp @@ -225,7 +225,7 @@ bool CGUIWindowVideoFiles::OnMessage(CGUIMessage& message) bool CGUIWindowVideoFiles::OnAction(const CAction &action) { - if (action.id == ACTION_TOGGLE_WATCHED) + if (action.actionId == ACTION_TOGGLE_WATCHED) { CFileItemPtr pItem = m_vecItems->Get(m_viewControl.GetSelectedItem()); diff --git a/xbmc/GUIWindowVideoNav.cpp b/xbmc/GUIWindowVideoNav.cpp index 1c1890b3fe..7528c00654 100644 --- a/xbmc/GUIWindowVideoNav.cpp +++ b/xbmc/GUIWindowVideoNav.cpp @@ -92,7 +92,7 @@ CGUIWindowVideoNav::~CGUIWindowVideoNav(void) bool CGUIWindowVideoNav::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { if (g_advancedSettings.m_bUseEvilB && m_vecItems->m_strPath == m_startDirectory) @@ -101,7 +101,7 @@ bool CGUIWindowVideoNav::OnAction(const CAction &action) return true; } } - if (action.id == ACTION_TOGGLE_WATCHED) + if (action.actionId == ACTION_TOGGLE_WATCHED) { CFileItemPtr pItem = m_vecItems->Get(m_viewControl.GetSelectedItem()); if (pItem && pItem->GetVideoInfoTag()->m_playCount == 0) diff --git a/xbmc/GUIWindowVideoPlaylist.cpp b/xbmc/GUIWindowVideoPlaylist.cpp index ee56a28572..1babc4577c 100644 --- a/xbmc/GUIWindowVideoPlaylist.cpp +++ b/xbmc/GUIWindowVideoPlaylist.cpp @@ -192,23 +192,23 @@ bool CGUIWindowVideoPlaylist::OnMessage(CGUIMessage& message) bool CGUIWindowVideoPlaylist::OnAction(const CAction &action) { - if (action.id == ACTION_PARENT_DIR) + if (action.actionId == ACTION_PARENT_DIR) { // Playlist has no parent dirs return true; } - if (action.id == ACTION_SHOW_PLAYLIST) + if (action.actionId == ACTION_SHOW_PLAYLIST) { g_windowManager.PreviousWindow(); return true; } - if ((action.id == ACTION_MOVE_ITEM_UP) || (action.id == ACTION_MOVE_ITEM_DOWN)) + if ((action.actionId == ACTION_MOVE_ITEM_UP) || (action.actionId == ACTION_MOVE_ITEM_DOWN)) { int iItem = -1; int iFocusedControl = GetFocusedControlID(); if (m_viewControl.HasControl(iFocusedControl)) iItem = m_viewControl.GetSelectedItem(); - OnMove(iItem, action.id); + OnMove(iItem, action.actionId); return true; } return CGUIWindowVideoBase::OnAction(action); diff --git a/xbmc/GUIWindowVisualisation.cpp b/xbmc/GUIWindowVisualisation.cpp index 13efdd3f67..0dae93909e 100644 --- a/xbmc/GUIWindowVisualisation.cpp +++ b/xbmc/GUIWindowVisualisation.cpp @@ -53,7 +53,7 @@ CGUIWindowVisualisation::~CGUIWindowVisualisation(void) bool CGUIWindowVisualisation::OnAction(const CAction &action) { - switch (action.id) + switch (action.actionId) { case ACTION_SHOW_INFO: { @@ -210,14 +210,14 @@ bool CGUIWindowVisualisation::OnMouseEvent(const CPoint &point, const CMouseEven if (event.m_id == ACTION_MOUSE_RIGHT_CLICK) { // no control found to absorb this click - go back to GUI CAction action; - action.id = ACTION_SHOW_GUI; + action.actionId = ACTION_SHOW_GUI; OnAction(action); return true; } if (event.m_id == ACTION_MOUSE_LEFT_CLICK) { // no control found to absorb this click - toggle the track INFO CAction action; - action.id = ACTION_PAUSE; + action.actionId = ACTION_PAUSE; return g_application.OnAction(action); } if (event.m_id || event.m_offsetX || event.m_offsetY) diff --git a/xbmc/GUIWindowWeather.cpp b/xbmc/GUIWindowWeather.cpp index 565d2fd715..1ba64a887a 100644 --- a/xbmc/GUIWindowWeather.cpp +++ b/xbmc/GUIWindowWeather.cpp @@ -78,7 +78,7 @@ CGUIWindowWeather::~CGUIWindowWeather(void) bool CGUIWindowWeather::OnAction(const CAction &action) { - if (action.id == ACTION_PREVIOUS_MENU) + if (action.actionId == ACTION_PREVIOUS_MENU) { g_windowManager.PreviousWindow(); return true; diff --git a/xbmc/WinEventsSDL.cpp b/xbmc/WinEventsSDL.cpp index 89a83b16f1..dc10c4a5e7 100644 --- a/xbmc/WinEventsSDL.cpp +++ b/xbmc/WinEventsSDL.cpp @@ -208,12 +208,12 @@ bool CWinEventsSDL::ProcessOSXShortcuts(SDL_Event& event) return true; case SDLK_f: // CMD-f to toggle fullscreen - action.id = ACTION_TOGGLE_FULLSCREEN; + action.actionId = ACTION_TOGGLE_FULLSCREEN; g_application.OnAction(action); return true; case SDLK_s: // CMD-3 to take a screenshot - action.id = ACTION_TAKE_SCREENSHOT; + action.actionId = ACTION_TAKE_SCREENSHOT; g_application.OnAction(action); return true; diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index 59c767b9b8..7d9734c747 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -2937,7 +2937,7 @@ bool CDVDPlayer::OnAction(const CAction &action) if( m_dvd.state == DVDSTATE_STILL && m_dvd.iDVDStillTime != 0 && pStream->GetTotalButtons() == 0 ) { - switch(action.id) + switch(action.actionId) { case ACTION_NEXT_ITEM: case ACTION_MOVE_RIGHT: @@ -2955,7 +2955,7 @@ bool CDVDPlayer::OnAction(const CAction &action) } - switch (action.id) + switch (action.actionId) { /* this code is disabled to allow switching playlist items (dvdimage "stacks") */ #if 0 @@ -2993,7 +2993,7 @@ bool CDVDPlayer::OnAction(const CAction &action) if (pStream->IsInMenu()) { - switch (action.id) + switch (action.actionId) { case ACTION_PREVIOUS_MENU: { @@ -3079,7 +3079,7 @@ bool CDVDPlayer::OnAction(const CAction &action) { THREAD_ACTION(action); // Offset from key codes back to button number - int button = action.id - REMOTE_0; + int button = action.actionId - REMOTE_0; CLog::Log(LOGDEBUG, " - button pressed %d", button); pStream->SelectButton(button); } @@ -3094,7 +3094,7 @@ bool CDVDPlayer::OnAction(const CAction &action) if (dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream)) { - switch (action.id) + switch (action.actionId) { case ACTION_NEXT_ITEM: case ACTION_PAGE_UP: @@ -3122,7 +3122,7 @@ bool CDVDPlayer::OnAction(const CAction &action) } } - switch (action.id) + switch (action.actionId) { case ACTION_NEXT_ITEM: case ACTION_PAGE_UP: diff --git a/xbmc/karaoke/GUIDialogKaraokeSongSelector.cpp b/xbmc/karaoke/GUIDialogKaraokeSongSelector.cpp index b86e6b5db9..2686ae6593 100644 --- a/xbmc/karaoke/GUIDialogKaraokeSongSelector.cpp +++ b/xbmc/karaoke/GUIDialogKaraokeSongSelector.cpp @@ -90,8 +90,8 @@ void CGUIDialogKaraokeSongSelector::OnButtonSelect() bool CGUIDialogKaraokeSongSelector::OnAction(const CAction & action) { - CLog::Log( LOGDEBUG, "CGUIDialogKaraokeSongSelector::OnAction %d" , action.id); - switch(action.id) + CLog::Log( LOGDEBUG, "CGUIDialogKaraokeSongSelector::OnAction %d" , action.actionId); + switch(action.actionId) { case REMOTE_0: case REMOTE_1: @@ -103,7 +103,7 @@ bool CGUIDialogKaraokeSongSelector::OnAction(const CAction & action) case REMOTE_7: case REMOTE_8: case REMOTE_9: - OnButtonNumeric( action.id - REMOTE_0 ); + OnButtonNumeric( action.actionId - REMOTE_0 ); return true; case ACTION_SELECT_ITEM: diff --git a/xbmc/karaoke/GUIWindowKaraokeLyrics.cpp b/xbmc/karaoke/GUIWindowKaraokeLyrics.cpp index eebf75c356..e0cdf5e347 100644 --- a/xbmc/karaoke/GUIWindowKaraokeLyrics.cpp +++ b/xbmc/karaoke/GUIWindowKaraokeLyrics.cpp @@ -54,7 +54,7 @@ bool CGUIWindowKaraokeLyrics::OnAction(const CAction &action) CGUIDialogKaraokeSongSelectorSmall * songSelector = (CGUIDialogKaraokeSongSelectorSmall *) g_windowManager.GetWindow( WINDOW_DIALOG_KARAOKE_SONGSELECT ); - switch(action.id) + switch(action.actionId) { case REMOTE_0: case REMOTE_1: @@ -68,7 +68,7 @@ bool CGUIWindowKaraokeLyrics::OnAction(const CAction &action) case REMOTE_9: // Offset from key codes back to button number if ( songSelector && !songSelector->IsActive() ) - songSelector->DoModal( action.id - REMOTE_0 ); + songSelector->DoModal( action.actionId - REMOTE_0 ); break; case ACTION_SUBTITLE_DELAY_MIN: diff --git a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.cpp b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.cpp index d95f2e1a78..da7d17d8a3 100644 --- a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.cpp +++ b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.cpp @@ -59,7 +59,7 @@ bool CGUIPythonWindow::OnAction(const CAction &action) // workaround - for scripts which try to access the active control (focused) when there is none. // for example - the case when the mouse enters the screen. CGUIControl *pControl = GetFocusedControl(); - if (action.id == ACTION_MOUSE && !pControl) + if (action.actionId == ACTION_MOUSE && !pControl) return ret; if(pCallbackWindow) diff --git a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindowXML.cpp b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindowXML.cpp index 6a7408f7f5..1f136e9883 100644 --- a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindowXML.cpp +++ b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindowXML.cpp @@ -190,7 +190,7 @@ bool CGUIPythonWindowXML::OnMessage(CGUIMessage& message) else if (controlClicked->IsContainer() && message.GetParam1() == ACTION_MOUSE_RIGHT_CLICK) { CAction action; - action.id = ACTION_CONTEXT_MENU; + action.actionId = ACTION_CONTEXT_MENU; PyXBMCAction* inf = new PyXBMCAction; inf->pObject = Action_FromAction(action); diff --git a/xbmc/lib/libPython/xbmcmodule/action.cpp b/xbmc/lib/libPython/xbmcmodule/action.cpp index 8d79fff59d..7ed590a8e5 100644 --- a/xbmc/lib/libPython/xbmcmodule/action.cpp +++ b/xbmc/lib/libPython/xbmcmodule/action.cpp @@ -66,7 +66,7 @@ namespace PYXBMC if (pyAction) { - pyAction->id = action.id; + pyAction->id = action.actionId; pyAction->buttonCode = action.buttonCode; pyAction->fAmount1 = action.amount1; pyAction->fAmount2 = action.amount2; @@ -171,7 +171,7 @@ namespace PYXBMC "Action class.\n" "\n" "For backwards compatibility reasons the == operator is extended so that it" - "can compare an action with other actions and action.id with numbers" + "can compare an action with other actions and action.actionId with numbers" " example: (action == ACTION_MOVE_LEFT)" ""); diff --git a/xbmc/utils/Builtins.cpp b/xbmc/utils/Builtins.cpp index 93f98adb01..1f6536f0e5 100644 --- a/xbmc/utils/Builtins.cpp +++ b/xbmc/utils/Builtins.cpp @@ -559,13 +559,13 @@ int CBuiltins::Execute(const CStdString& execString) else if (parameter.Equals("next")) { CAction action; - action.id = ACTION_NEXT_ITEM; + action.actionId = ACTION_NEXT_ITEM; g_application.OnAction(action); } else if (parameter.Equals("previous")) { CAction action; - action.id = ACTION_PREV_ITEM; + action.actionId = ACTION_PREV_ITEM; g_application.OnAction(action); } else if (parameter.Equals("bigskipbackward")) @@ -595,7 +595,7 @@ int CBuiltins::Execute(const CStdString& execString) CAction action; action.amount1 = action.amount2 = action.repeat = 0.0; action.buttonCode = 0; - action.id = ACTION_SHOW_VIDEOMENU; + action.actionId = ACTION_SHOW_VIDEOMENU; g_application.m_pPlayer->OnAction(action); } } @@ -702,7 +702,7 @@ int CBuiltins::Execute(const CStdString& execString) { g_application.m_eForcedNextPlayer = CPlayerCoreFactory::GetPlayerCore(parameter); CAction action; - action.id = ACTION_PLAYER_PLAY; + action.actionId = ACTION_PLAYER_PLAY; g_application.OnAction(action); } else if (execute.Equals("mute")) @@ -1256,7 +1256,7 @@ int CBuiltins::Execute(const CStdString& execString) if (CButtonTranslator::TranslateActionString(params[0].c_str(), actionID)) { CAction action; - action.id = actionID; + action.actionId = actionID; action.amount1 = 1.0f; int windowID = params.size() == 2 ? CButtonTranslator::TranslateWindowString(params[1].c_str()) : WINDOW_INVALID; g_application.getApplicationMessenger().SendAction(action, windowID); diff --git a/xbmc/utils/EventServer.cpp b/xbmc/utils/EventServer.cpp index dc7bdb2ed8..15d59f453e 100644 --- a/xbmc/utils/EventServer.cpp +++ b/xbmc/utils/EventServer.cpp @@ -351,7 +351,7 @@ bool CEventServer::ExecuteNextAction() break; case AT_BUTTON: - CButtonTranslator::TranslateActionString(actionEvent.actionName.c_str(), action.id); + CButtonTranslator::TranslateActionString(actionEvent.actionName.c_str(), action.actionId); action.strAction = actionEvent.actionName; action.repeat = 0.0f; action.amount1 = 1.0f; diff --git a/xbmc/utils/Teletext.cpp b/xbmc/utils/Teletext.cpp index 7d96a3340e..bf25480cec 100644 --- a/xbmc/utils/Teletext.cpp +++ b/xbmc/utils/Teletext.cpp @@ -447,7 +447,7 @@ bool CTeletextDecoder::HandleAction(const CAction &action) return false; } - if (action.id == ACTION_MOVE_UP) + if (action.actionId == ACTION_MOVE_UP) { if (m_RenderInfo.PageCatching) CatchNextPage(-1, -1); @@ -455,7 +455,7 @@ bool CTeletextDecoder::HandleAction(const CAction &action) GetNextPageOne(true); return true; } - else if (action.id == ACTION_MOVE_DOWN) + else if (action.actionId == ACTION_MOVE_DOWN) { if (m_RenderInfo.PageCatching) CatchNextPage(1, 1); @@ -463,7 +463,7 @@ bool CTeletextDecoder::HandleAction(const CAction &action) GetNextPageOne(false); return true; } - else if (action.id == ACTION_MOVE_RIGHT) + else if (action.actionId == ACTION_MOVE_RIGHT) { if (m_RenderInfo.PageCatching) CatchNextPage(0, 1); @@ -486,7 +486,7 @@ bool CTeletextDecoder::HandleAction(const CAction &action) } return true; } - else if (action.id == ACTION_MOVE_LEFT) + else if (action.actionId == ACTION_MOVE_LEFT) { if (m_RenderInfo.PageCatching) CatchNextPage(0, -1); @@ -510,12 +510,12 @@ bool CTeletextDecoder::HandleAction(const CAction &action) } return true; } - else if (action.id >= REMOTE_0 && action.id <= REMOTE_9) + else if (action.actionId >= REMOTE_0 && action.actionId <= REMOTE_9) { - PageInput(action.id - REMOTE_0); + PageInput(action.actionId - REMOTE_0); return true; } - else if (action.id >= KEY_ASCII) // FIXME make it KEY_UNICODE + else if (action.actionId >= KEY_ASCII) // FIXME make it KEY_UNICODE { // input from the keyboard if (action.unicode >= 48 && action.unicode < 58) { @@ -524,17 +524,17 @@ bool CTeletextDecoder::HandleAction(const CAction &action) } return false; } - else if (action.id == ACTION_PAGE_UP) + else if (action.actionId == ACTION_PAGE_UP) { SwitchZoomMode(); return true; } - else if (action.id == ACTION_PAGE_DOWN) + else if (action.actionId == ACTION_PAGE_DOWN) { SwitchTranspMode(); return true; } - else if (action.id == ACTION_SELECT_ITEM) + else if (action.actionId == ACTION_SELECT_ITEM) { if (m_txtCache->SubPageTable[m_txtCache->Page] == 0xFF) return false; @@ -554,27 +554,27 @@ bool CTeletextDecoder::HandleAction(const CAction &action) return true; } - if (action.id == ACTION_SHOW_INFO) + if (action.actionId == ACTION_SHOW_INFO) { SwitchHintMode(); return true; } - else if (action.id == ACTION_TELETEXT_RED) + else if (action.actionId == ACTION_TELETEXT_RED) { ColorKey(m_RenderInfo.Prev_100); return true; } - else if (action.id == ACTION_TELETEXT_GREEN) + else if (action.actionId == ACTION_TELETEXT_GREEN) { ColorKey(m_RenderInfo.Prev_10); return true; } - else if (action.id == ACTION_TELETEXT_YELLOW) + else if (action.actionId == ACTION_TELETEXT_YELLOW) { ColorKey(m_RenderInfo.Next_10); return true; } - else if (action.id == ACTION_TELETEXT_BLUE) + else if (action.actionId == ACTION_TELETEXT_BLUE) { ColorKey(m_RenderInfo.Next_100); return true; |