summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_dialogs.cpp
diff options
context:
space:
mode:
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;