diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
commit | 30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch) | |
tree | b1dae7a6d545cdf622a165ba4c576d3a41d71221 /plugins/ListeningTo | |
parent | 65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff) |
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed
- dynamically translated hot keys;
- checked correct LPGEN'ing of the sounds creation;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r-- | plugins/ListeningTo/commons.h | 10 | ||||
-rw-r--r-- | plugins/ListeningTo/listeningto.cpp | 14 | ||||
-rw-r--r-- | plugins/ListeningTo/players/itunes.cpp | 24 | ||||
-rw-r--r-- | plugins/ListeningTo/players/watrack.cpp | 2 |
4 files changed, 25 insertions, 25 deletions
diff --git a/plugins/ListeningTo/commons.h b/plugins/ListeningTo/commons.h index 3d8aeee91a..d0a9fc5b0c 100644 --- a/plugins/ListeningTo/commons.h +++ b/plugins/ListeningTo/commons.h @@ -85,7 +85,7 @@ extern BOOL loaded; #define MIR_FREE(_X_) { mir_free(_X_); _X_ = NULL; }
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define MIN_TIME_BEETWEEN_SETS 10000 // ms
@@ -119,10 +119,10 @@ static bool IsEmpty(const WCHAR *str) return str == NULL || str[0] == 0;
}
-#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_) )
-#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_) )
-#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_) )
-#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_) )
+#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_))
+#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_))
+#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_))
+#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_))
#endif // __COMMONS_H__
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp index 486a32b7a2..265c208c34 100644 --- a/plugins/ListeningTo/listeningto.cpp +++ b/plugins/ListeningTo/listeningto.cpp @@ -158,9 +158,9 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_HOTKEYS_TOGGLE, HotkeysToggle));
// Hooks
- hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded) );
- hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown) );
- hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged) );
+ hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded));
+ hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown));
+ hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged));
hEnableStateChangedEvent = CreateHookableEvent(ME_LISTENINGTO_ENABLE_STATE_CHANGED);
hListeningInfoChangedEvent = CreateHookableEvent(ME_LISTENINGTO_LISTENING_INFO_CHANGED);
@@ -354,7 +354,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) }
else if (hExtraIcon == NULL && ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
{
- hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild) );
+ hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild));
}
{
@@ -409,7 +409,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) RegisterProtocol(protos[i]->szModuleName, protos[i]->tszAccountName);
}
- hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged) );
+ hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged));
}
else
{
@@ -433,7 +433,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) RebuildMenu();
- hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded) );
+ hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded));
// Variables support
if (ServiceExists(MS_VARS_REGISTERTOKEN))
@@ -562,7 +562,7 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam) {
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick) );
+ hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick));
TTBButton ttb = {0};
ttb.cbSize = sizeof(ttb);
diff --git a/plugins/ListeningTo/players/itunes.cpp b/plugins/ListeningTo/players/itunes.cpp index b00e6e4189..4801b2c78f 100644 --- a/plugins/ListeningTo/players/itunes.cpp +++ b/plugins/ListeningTo/players/itunes.cpp @@ -77,20 +77,20 @@ BOOL ITunes::InitAndGetFilename() if (hwnd == NULL)
return FALSE;
- CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp) );
+ CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp));
ITPlayerState state;
- CALL( iTunesApp->get_PlayerState(&state) );
+ CALL( iTunesApp->get_PlayerState(&state));
if (state == ITPlayerStateStopped)
return FALSE;
- CALL( iTunesApp->get_CurrentTrack(&track) );
+ CALL( iTunesApp->get_CurrentTrack(&track));
if (track == NULL)
return FALSE;
- CALL( track->QueryInterface(__uuidof(file), (void **)&file) );
+ CALL( track->QueryInterface(__uuidof(file), (void **)&file));
- CALL( file->get_Location(&ret) );
+ CALL( file->get_Location(&ret));
return !IsEmpty(ret);
}
@@ -101,33 +101,33 @@ BOOL ITunes::FillCache() HRESULT hr;
long lret;
- CALL( track->get_Album(&ret) );
+ CALL( track->get_Album(&ret));
listening_info.ptszAlbum = U2T(ret);
- CALL( track->get_Artist(&ret) );
+ CALL( track->get_Artist(&ret));
listening_info.ptszArtist = U2T(ret);
- CALL( track->get_Name(&ret) );
+ CALL( track->get_Name(&ret));
listening_info.ptszTitle = U2T(ret);
- CALL( track->get_Year(&lret) );
+ CALL( track->get_Year(&lret));
if (lret > 0)
{
listening_info.ptszYear = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszYear, 10);
}
- CALL( track->get_TrackNumber(&lret) );
+ CALL( track->get_TrackNumber(&lret));
if (lret > 0)
{
listening_info.ptszTrack = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszTrack, 10);
}
- CALL( track->get_Genre(&ret) );
+ CALL( track->get_Genre(&ret));
listening_info.ptszGenre = U2T(ret);
- CALL( track->get_Duration(&lret) );
+ CALL( track->get_Duration(&lret));
if (lret > 0)
{
listening_info.ptszLength = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
diff --git a/plugins/ListeningTo/players/watrack.cpp b/plugins/ListeningTo/players/watrack.cpp index 133c97e57f..790613e856 100644 --- a/plugins/ListeningTo/players/watrack.cpp +++ b/plugins/ListeningTo/players/watrack.cpp @@ -101,7 +101,7 @@ void WATrack::GetData() if (playing != WAT_PLS_NORMAL
|| si == NULL
|| si->status != 1
- || ( IsEmpty(si->artist) && IsEmpty(si->title) ) )
+ || ( IsEmpty(si->artist) && IsEmpty(si->title)) )
{
return;
}
|