Skip to content

Commit

Permalink
[cleanup] followup to f86b9d2
Browse files Browse the repository at this point in the history
  • Loading branch information
mkortstiege committed Jul 6, 2014
1 parent 687ac52 commit 99da529
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion xbmc/AppParamParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ void CAppParamParser::PlayPlaylist()
g_playlistPlayer.SetCurrentPlaylist(0);
}

ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (DWORD) -1};
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, -1};
CApplicationMessenger::Get().SendMessage(tMsg, false);
}
16 changes: 8 additions & 8 deletions xbmc/ApplicationMessenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,20 +983,20 @@ void CApplicationMessenger::MediaRestart(bool bWait)

void CApplicationMessenger::PlayListPlayerPlay()
{
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (unsigned int) -1};
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, -1};
SendMessage(tMsg, true);
}

void CApplicationMessenger::PlayListPlayerPlay(int iSong)
{
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (unsigned int)iSong};
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, iSong};
SendMessage(tMsg, true);
}

bool CApplicationMessenger::PlayListPlayerPlaySongId(int songId)
{
bool returnState;
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY_SONG_ID, (unsigned int)songId};
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY_SONG_ID, songId};
tMsg.lpVoid = (void *)&returnState;
SendMessage(tMsg, true);
return returnState;
Expand Down Expand Up @@ -1052,7 +1052,7 @@ void CApplicationMessenger::PlayListPlayerInsert(int playlist, const CFileItemLi

void CApplicationMessenger::PlayListPlayerRemove(int playlist, int position)
{
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_REMOVE, (unsigned int)playlist, (unsigned int)position};
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_REMOVE, playlist, position};
SendMessage(tMsg, true);
}

Expand Down Expand Up @@ -1171,7 +1171,7 @@ void CApplicationMessenger::RestartApp()

void CApplicationMessenger::InhibitIdleShutdown(bool inhibit)
{
ThreadMessage tMsg = {TMSG_INHIBITIDLESHUTDOWN, (unsigned int)inhibit};
ThreadMessage tMsg = {TMSG_INHIBITIDLESHUTDOWN, inhibit};
SendMessage(tMsg);
}

Expand All @@ -1181,7 +1181,7 @@ void CApplicationMessenger::ActivateScreensaver()
SendMessage(tMsg);
}

void CApplicationMessenger::NetworkMessage(unsigned int dwMessage, unsigned int dwParam)
void CApplicationMessenger::NetworkMessage(int dwMessage, int dwParam)
{
ThreadMessage tMsg = {TMSG_NETWORKMESSAGE, dwMessage, dwParam};
SendMessage(tMsg);
Expand Down Expand Up @@ -1234,15 +1234,15 @@ void CApplicationMessenger::Show(CGUIDialog *pDialog)

void CApplicationMessenger::Close(CGUIWindow *window, bool forceClose, bool waitResult /*= true*/, int nextWindowID /*= 0*/, bool enableSound /*= true*/)
{
ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, (unsigned int)nextWindowID};
ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, nextWindowID};
tMsg.param2 = (forceClose ? 0x01 : 0) | (enableSound ? 0x02 : 0);
tMsg.lpVoid = window;
SendMessage(tMsg, waitResult);
}

void CApplicationMessenger::ActivateWindow(int windowID, const vector<string> &params, bool swappingWindows)
{
ThreadMessage tMsg = {TMSG_GUI_ACTIVATE_WINDOW, (unsigned int)windowID, swappingWindows ? 1u : 0u};
ThreadMessage tMsg = {TMSG_GUI_ACTIVATE_WINDOW, windowID, swappingWindows ? 1 : 0};
tMsg.params = params;
SendMessage(tMsg, true);
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/ApplicationMessenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class CApplicationMessenger
int SetResponse(CStdString response);
void ExecBuiltIn(const CStdString &command, bool wait = false);

void NetworkMessage(unsigned int dwMessage, unsigned int dwParam = 0);
void NetworkMessage(int dwMessage, int dwParam = 0);

void DoModal(CGUIDialog *pDialog, int iWindowID, const CStdString &param = "");
void Show(CGUIDialog *pDialog);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/addons/AddonCallbacksGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ bool CGUIAddonWindowDialog::OnMessage(CGUIMessage &message)
void CGUIAddonWindowDialog::Show(bool show /* = true */)
{
unsigned int iCount = g_graphicsContext.exit();
ThreadMessage tMsg = {TMSG_GUI_ADDON_DIALOG, 1, show ? 1u : 0u};
ThreadMessage tMsg = {TMSG_GUI_ADDON_DIALOG, 1, show ? 1 : 0};
tMsg.lpVoid = this;
CApplicationMessenger::Get().SendMessage(tMsg, true);
g_graphicsContext.restore(iCount);
Expand Down
8 changes: 4 additions & 4 deletions xbmc/addons/AddonStatusHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void CAddonStatusHandler::Process()
pDialog->SetLine(2, 24073);

//send message and wait for user input
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow()};
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow()};
CApplicationMessenger::Get().SendMessage(tMsg, true);

if (pDialog->IsConfirmed())
Expand All @@ -120,7 +120,7 @@ void CAddonStatusHandler::Process()
pDialog->SetLine(1, 24074);

//send message and wait for user input
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, (unsigned int)g_windowManager.GetActiveWindow()};
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, g_windowManager.GetActiveWindow()};
CApplicationMessenger::Get().SendMessage(tMsg, true);

CAddonMgr::Get().GetCallbackForType(m_addon->Type())->RequestRestart(m_addon, true);
Expand All @@ -137,7 +137,7 @@ void CAddonStatusHandler::Process()
pDialogYesNo->SetLine(3, m_message);

//send message and wait for user input
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow()};
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow()};
CApplicationMessenger::Get().SendMessage(tMsg, true);

if (!pDialogYesNo->IsConfirmed()) return;
Expand Down Expand Up @@ -165,7 +165,7 @@ void CAddonStatusHandler::Process()
pDialog->SetLine(3, m_message);

//send message and wait for user input
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, (unsigned int)g_windowManager.GetActiveWindow()};
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, g_windowManager.GetActiveWindow()};
CApplicationMessenger::Get().SendMessage(tMsg, true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/dialogs/GUIDialogKeyboardGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ bool CGUIDialogKeyboardGeneric::ShowAndGetInput(char_callback_t pCallback, const
pKeyboard->SetHiddenInput(bHiddenInput);
pKeyboard->SetText(initialString);
// do this using a thread message to avoid render() conflicts
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, (unsigned int)g_windowManager.GetActiveWindow()};
ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, g_windowManager.GetActiveWindow()};
CApplicationMessenger::Get().SendMessage(tMsg, true);
pKeyboard->Close();

Expand Down
2 changes: 1 addition & 1 deletion xbmc/interfaces/legacy/Dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace XBMCAddon
{
static void XBMCWaitForThreadMessage(int message, int param1, int param2)
{
ThreadMessage tMsg = {(DWORD)message, (DWORD)param1, (DWORD)param2};
ThreadMessage tMsg = {(DWORD)message, param1, param2};
CApplicationMessenger::Get().SendMessage(tMsg, true);
}

Expand Down
2 changes: 1 addition & 1 deletion xbmc/interfaces/legacy/WindowDialogMixin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace XBMCAddon
void WindowDialogMixin::show()
{
XBMC_TRACE;
ThreadMessage tMsg = {TMSG_GUI_PYTHON_DIALOG, HACK_CUSTOM_ACTION_OPENING, 0u};
ThreadMessage tMsg = {TMSG_GUI_PYTHON_DIALOG, HACK_CUSTOM_ACTION_OPENING, 0};
tMsg.lpVoid = w->window->get();
CApplicationMessenger::Get().SendMessage(tMsg, true);
}
Expand Down
4 changes: 2 additions & 2 deletions xbmc/interfaces/legacy/WindowDialogMixin.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// These messages are a side effect of the way dialogs work through the
// main ApplicationMessenger. At some point it would be nice to remove
// the messenger and have direct (or even drive) communications.
#define HACK_CUSTOM_ACTION_CLOSING -3u
#define HACK_CUSTOM_ACTION_OPENING -4u
#define HACK_CUSTOM_ACTION_CLOSING -3
#define HACK_CUSTOM_ACTION_OPENING -4

namespace XBMCAddon
{
Expand Down
2 changes: 1 addition & 1 deletion xbmc/video/VideoDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8225,7 +8225,7 @@ std::vector<int> CVideoDatabase::CleanMediaType(const std::string &mediaType, co
pDialog->SetChoice(1, 15014);

//send message and wait for user input
ThreadMessage tMsg = { TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow() };
ThreadMessage tMsg = { TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow() };
CApplicationMessenger::Get().SendMessage(tMsg, true);

del = !pDialog->IsConfirmed();
Expand Down

0 comments on commit 99da529

Please sign in to comment.