diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-23 13:28:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-23 13:28:20 +0000 |
commit | 20a19cd84f00a2235e1ab000921ae58ace13faa9 (patch) | |
tree | d6477be5e1ce781398c9c69a8065112427da1a82 /protocols/FacebookRM/src/dialogs.cpp | |
parent | 12d981da28a6a35dbdcd4d207dc4497f902f287d (diff) |
Facebook: proper default group's name handling
git-svn-id: http://svn.miranda-ng.org/main/trunk@11595 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/dialogs.cpp')
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index d6a94a4f1a..36774e2ca5 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -370,9 +370,8 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp SendDlgItemMessage(hwnd, IDC_GROUP, EM_LIMITTEXT, FACEBOOK_GROUP_NAME_LIMIT, 0); - ptrT group(db_get_tsa(NULL, proto->ModuleName(), FACEBOOK_KEY_DEF_GROUP)); - if (group != NULL) - SetDlgItemText(hwnd, IDC_GROUP, group); + if (proto->m_tszDefaultGroup != NULL) + SetDlgItemText(hwnd, IDC_GROUP, proto->m_tszDefaultGroup); LoadDBCheckState(proto, hwnd, IDC_SET_IGNORE_STATUS, FACEBOOK_KEY_DISABLE_STATUS_NOTIFY, DEFAULT_DISABLE_STATUS_NOTIFY); LoadDBCheckState(proto, hwnd, IDC_BIGGER_AVATARS, FACEBOOK_KEY_BIG_AVATARS, DEFAULT_BIG_AVATARS); @@ -419,10 +418,14 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp GetDlgItemText(hwnd, IDC_GROUP, tstr, SIZEOF(tstr)); if (tstr[0] != '\0') { + proto->m_tszDefaultGroup = mir_tstrdup(tstr); proto->setTString(FACEBOOK_KEY_DEF_GROUP, tstr); Clist_CreateGroup(0, tstr); } - else proto->delSetting(FACEBOOK_KEY_DEF_GROUP); + else { + proto->delSetting(FACEBOOK_KEY_DEF_GROUP); + proto->m_tszDefaultGroup = NULL; + } StoreDBCheckState(proto, hwnd, IDC_SET_IGNORE_STATUS, FACEBOOK_KEY_DISABLE_STATUS_NOTIFY); StoreDBCheckState(proto, hwnd, IDC_BIGGER_AVATARS, FACEBOOK_KEY_BIG_AVATARS); |