summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_dialogs.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-04-25 07:02:52 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-04-25 07:02:52 +0000
commitdd0192c8e5c6916fd16623322bd45ba5152d7b6c (patch)
tree2a5bd952365207fe98882898d5e268c0ac6d0a3d /protocols/Skype/src/skype_dialogs.cpp
parent6e0844cc399384a786171bfb98025aae84e44e15 (diff)
try to add default group for contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@4528 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_dialogs.cpp')
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index d08131a3d7..584bdf91d2 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -52,6 +52,12 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR
{
EnableWindow(GetDlgItem(hwnd, IDC_REGISTER), FALSE);
}
+
+ SendDlgItemMessage(hwnd, IDC_GROUP, EM_LIMITTEXT, SKYPE_GROUP_NAME_LIMIT, 0);
+
+ wchar_t *defgroup = db_get_wsa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_DEF_GROUP);
+ SetDlgItemText(hwnd, IDC_GROUP, defgroup);
+ ::mir_free(defgroup);
}
return TRUE;
@@ -86,6 +92,14 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR
}
break;
+ case IDC_GROUP:
+ {
+ if ((HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
+ return 0;
+ else
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ }
+
case IDC_PORT:
case IDC_USE_ALT_PORTS:
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
@@ -155,6 +169,16 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR
proto->SetSettingByte("UseAlternativePorts", (BYTE)IsDlgButtonChecked(hwnd, IDC_USE_ALT_PORTS));
}
+ wchar_t tstr[128];
+ GetDlgItemText(hwnd, IDC_GROUP, tstr, SIZEOF(tstr));
+ if (lstrlen(tstr) > 0)
+ {
+ db_set_ts(NULL, proto->m_szModuleName, SKYPE_SETTINGS_DEF_GROUP, tstr);
+ CallService(MS_CLIST_GROUPCREATE, 0, (LPARAM)tstr);
+ }
+ else
+ db_unset(NULL, proto->m_szModuleName, SKYPE_SETTINGS_DEF_GROUP);
+
return TRUE;
}
break;