summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-04 14:13:16 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-04 14:13:16 +0000
commite08dd78ccf05f9d5d768e5436fcfc5e8126356fe (patch)
tree3101fdefff844854ea77e2220d62d0cba26cb6b8 /protocols/Steam/src/steam_proto.cpp
parent13a0838f7641f80e3dd166f4a67e6fd43f073456 (diff)
Steam: some improvements
git-svn-id: http://svn.miranda-ng.org/main/trunk@8848 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r--protocols/Steam/src/steam_proto.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 187b9f577b..97a11c8d62 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -6,6 +6,26 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) :
CreateProtoService(PS_CREATEACCMGRUI, &CSteamProto::OnAccountManagerInit);
InitializeCriticalSection(&this->contact_search_lock);
+
+ // icons
+ wchar_t filePath[MAX_PATH];
+ GetModuleFileName(g_hInstance, filePath, MAX_PATH);
+
+ wchar_t sectionName[100];
+ mir_sntprintf(sectionName, SIZEOF(sectionName), _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE));
+
+ char settingName[100];
+ mir_snprintf(settingName, SIZEOF(settingName), "%s_%s", MODULE, "main");
+
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.ptszDefaultFile = filePath;
+ sid.pszName = settingName;
+ sid.ptszSection = sectionName;
+ sid.ptszDescription = LPGENT("Protocol icon");
+ sid.iDefaultIndex = -IDI_STEAM;
+ Skin_AddIcon(&sid);
}
CSteamProto::~CSteamProto()
@@ -149,6 +169,8 @@ int CSteamProto::SetStatus(int new_status)
{
m_bTerminated = true;
+ ForkThread(&CSteamProto::LogOutThread, NULL);
+
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
@@ -164,17 +186,12 @@ int CSteamProto::SetStatus(int new_status)
{
if (old_status == ID_STATUS_OFFLINE/* && !this->IsOnline()*/)
{
-
m_iStatus = ID_STATUS_CONNECTING;
ForkThread(&CSteamProto::LogInThread, NULL);
-
- //ptrA steamId(getStringA("SteamID"));
- //Steam::FriendList(m_hNetlibUser/*, token*/)
- // .LoadAsync(steamId, CallbackConverter<Steam::FriendList::Result, &CSteamProto::OnContactListLoadedAsync>, this);
}
else
{
- /*if ( this->account->IsOnline())
+ /*if (IsOnline())
{
SetServerStatus(new_status);
return 0;