summaryrefslogtreecommitdiff
path: root/plugins/Watrack/myshows
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-06 17:14:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-06 17:14:47 +0300
commitc09a65cb4153f151ec2eb074614b4ccfe7c22bdb (patch)
tree171522c9a9aaf456bd68484008e7692a6b7d8361 /plugins/Watrack/myshows
parent000d773f687e5931699fc4de4d4b472b6325f3fb (diff)
popups: pascal code cleaning
Diffstat (limited to 'plugins/Watrack/myshows')
-rw-r--r--plugins/Watrack/myshows/i_myshows_api.inc38
-rw-r--r--plugins/Watrack/myshows/i_myshows_opt.inc4
2 files changed, 17 insertions, 25 deletions
diff --git a/plugins/Watrack/myshows/i_myshows_api.inc b/plugins/Watrack/myshows/i_myshows_api.inc
index 25593311d7..f92df86b50 100644
--- a/plugins/Watrack/myshows/i_myshows_api.inc
+++ b/plugins/Watrack/myshows/i_myshows_api.inc
@@ -36,10 +36,7 @@ begin
end;
StrCopyW(StrCopyEW(buf,'MyShows: '),TranslateW(ppc));
- if ServiceExists(MS_POPUP_SHOWMESSAGEW) then
- CallService(MS_POPUP_SHOWMESSAGEW,TWPARAM(@buf),SM_WARNING)
- else
- MessageBoxW(0,@buf,'ERROR',MB_ICONERROR)
+ PUShowMessage(@buf,SM_WARNING);
end;
function GetMD5Str(const digest:TMD5Hash; buf:pAnsiChar):PAnsiChar;
@@ -199,28 +196,25 @@ begin
if SendMSRequest(buf,show) then
begin
//!! add option to show it??
- if ServiceExists(MS_POPUP_SHOWMESSAGEW) then
- begin
- jn:=json_get(jroot,'show');
- shId:=json_as_string(json_get(jn,'title'));
+ jn:=json_get(jroot,'show');
+ shId:=json_as_string(json_get(jn,'title'));
- jn:=json_get(jn,'episodes');
- jn:=json_get(jn,'episodes');
- pWideChar(epId):=json_as_string(json_get(jn,'title'));
+ jn:=json_get(jn,'episodes');
+ jn:=json_get(jn,'episodes');
+ pWideChar(epId):=json_as_string(json_get(jn,'title'));
- mGetMem(pc,1024);
- StrCopyW(
+ mGetMem(pc,1024);
+ StrCopyW(
+ StrCopyEW(
StrCopyEW(
StrCopyEW(
- StrCopyEW(
- StrCopyEW(pWideChar(pc),'Show "'),
- shId),
- '"'#13#10'episode "'),
- pWideChar(epId)),
- '" checked');
- CallService(MS_POPUP_SHOWMESSAGEW,TWPARAM(pc),SM_NOTIFY);
- mFreeMem(pc);
- end;
+ StrCopyEW(pWideChar(pc),'Show "'),
+ shId),
+ '"'#13#10'episode "'),
+ pWideChar(epId)),
+ '" checked');
+ PUShowMessage(pc,SM_NOTIFY);
+ mFreeMem(pc);
result:=true;
end;
end;
diff --git a/plugins/Watrack/myshows/i_myshows_opt.inc b/plugins/Watrack/myshows/i_myshows_opt.inc
index 125d4deda5..c5696771c6 100644
--- a/plugins/Watrack/myshows/i_myshows_opt.inc
+++ b/plugins/Watrack/myshows/i_myshows_opt.inc
@@ -26,9 +26,7 @@ begin
mFreeMem(msh_login ); msh_login :=DBReadString(0,PluginShort,optLogin);
mFreeMem(msh_password); msh_password:=DBReadString(0,PluginShort,optPassword);
if (msh_login=nil) or (msh_password=nil) then
- CallService(MS_POPUP_SHOWMESSAGEW,
- WPARAM(TranslateW('Don''t forget to enter Login and Password to use MyShows service')),
- SM_WARNING);
+ PUShowMessageW(TranslateW('Don''t forget to enter Login and Password to use MyShows service'), SM_WARNING);
end;
procedure FreeOpt;