soc.2009.vulture: 82059915: Main page of account properties is now m...
gdick at soc.pidgin.im
gdick at soc.pidgin.im
Mon Sep 7 11:05:46 EDT 2009
-----------------------------------------------------------------
Revision: 820599157e9694212894f8fa5255959a80319bf9
Ancestor: bc6948cc0c971dede313d00b996c0ef0eb9b239a
Author: gdick at soc.pidgin.im
Date: 2009-09-07T15:02:10
Branch: im.pidgin.soc.2009.vulture
URL: http://d.pidgin.im/viewmtn/revision/info/820599157e9694212894f8fa5255959a80319bf9
Modified files:
vulture/acctmanager.c vulture/acctmanager.h
vulture/purpleacct.c vulture/resource.h
vulture/vulture-res.rc vulture/vultureblist.c
ChangeLog:
Main page of account properties is now mostly functional, and saves.
-------------- next part --------------
============================================================
--- vulture/acctmanager.c 60aa32ed92c3eea5fbab784cbe6d3f0c596109c0
+++ vulture/acctmanager.c d40f3a5536c6fb1455a13b7efedc29d9feeb5d64
@@ -40,6 +40,7 @@ static INT_PTR CALLBACK AccountAccountPr
static void EditAccount(HWND hwndParent, VULTURE_ACCOUNT *lpvac);
static void EditAccountByIndex(HWND hwndDlg, int iItem);
static INT_PTR CALLBACK AccountAccountPropPageProc(HWND hwndDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam);
+static void EnableDisableBIconSelectControls(HWND hwndPropPage);
#define CCH_ACCMGR_HEADER 64
@@ -60,15 +61,19 @@ enum ENUM_ACCOUNT_PROP_PAGES
* reflect the user's changes, but the caller needs to inform libpurple.
*
* @param hwndParent Parent window handle.
- * @param[in/out] lpglistAccounts List of VULTURE_ACCOUNTs.
+ * @param[in/out] lplpglistAccounts List of VULTURE_ACCOUNTs.
*
- * @return TRUE iff the dialogue was OK-ed. The list may have been modified
- * even if FALSE is returned.
+ * @return TRUE iff the dialogue was OK-ed. The returned list is derived from a
+ * shallow copy of the list passed in. The caller must therefore free its
+ * original list shallowly and the returned list deeply. This is the case even
+ * when FALSE is returned.
*/
-BOOL VultureAccountManagerDlg(HWND hwndParent, GList *lpglistAccounts)
+BOOL VultureAccountManagerDlg(HWND hwndParent, GList **lplpglistAccounts)
{
- ACCMGRDATA amd = {lpglistAccounts};
- return DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_ACCOUNTS), hwndParent, AccountManagerDlgProc, (LPARAM)&amd);
+ ACCMGRDATA amd = {g_list_copy(*lplpglistAccounts)};
+ BOOL bRet = DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_ACCOUNTS), hwndParent, AccountManagerDlgProc, (LPARAM)&amd);
+ *lplpglistAccounts = amd.lpglistAccounts;
+ return bRet;
}
@@ -287,6 +292,7 @@ static void EditAccountByIndex(HWND hwnd
LVITEM lvitem;
lvitem.iItem = iItem;
+ lvitem.iSubItem = 0;
lvitem.mask = LVIF_PARAM;
ListView_GetItem(GetDlgItem(hwndDlg, IDC_LIST_ACCOUNTS), &lvitem);
@@ -306,14 +312,177 @@ static void EditAccountByIndex(HWND hwnd
* @return Usually TRUE if message processed and FALSE otherwise. There are
* some exceptions for particular messages.
*/
-static INT_PTR CALLBACK AccountAccountPropPageProc(HWND hwndDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK AccountAccountPropPageProc(HWND hwndPropPage, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
+ VULTURE_ACCOUNT *lpvac;
+
switch(uiMsg)
{
case WM_INITDIALOG:
+
+ lpvac = (VULTURE_ACCOUNT*)((PROPSHEETPAGE*)lParam)->lParam;
+ SetWindowLongPtr(hwndPropPage, GWLP_USERDATA, (LONG_PTR)lpvac);
+
+ SetDlgItemText(hwndPropPage, IDC_EDIT_USERNAME, lpvac->szUsername);
+
+ if(lpvac->protooptions & OPT_PROTO_NO_PASSWORD)
+ {
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_EDIT_PASSWORD), FALSE);
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_CHECK_REMEMBERPASS), FALSE);
+ }
+ else
+ {
+ if(lpvac->szPassword && lpvac->bRememberPass) SetDlgItemText(hwndPropPage, IDC_EDIT_PASSWORD, lpvac->szPassword);
+ CheckDlgButton(hwndPropPage, IDC_CHECK_REMEMBERPASS, lpvac->bRememberPass ? BST_CHECKED : BST_UNCHECKED);
+ }
+
+ /* Disable username controls if connected. */
+ if(lpvac->bConnected)
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_EDIT_USERNAME), FALSE);
+
+ if(lpvac->szAlias) SetDlgItemText(hwndPropPage, IDC_EDIT_ALIAS, lpvac->szAlias);
+ CheckDlgButton(hwndPropPage, IDC_CHECK_MAIL, lpvac->bMail ? BST_CHECKED : BST_UNCHECKED);
+
+ if(lpvac->bSupportsBIcon)
+ {
+ if(lpvac->szBIcon) SetDlgItemText(hwndPropPage, IDC_EDIT_BICON, lpvac->szBIcon);
+ CheckRadioButton(hwndPropPage, IDC_RADIO_BICONGLOBAL, IDC_RADIO_BICONNONE, lpvac->bOverrideBIcon ? (lpvac->szBIcon ? IDC_RADIO_BICONOVERRIDE : IDC_RADIO_BICONNONE) : IDC_RADIO_BICONGLOBAL);
+ }
+ else
+ {
+ /* We don't support buddy icons, so disable the radio
+ * buttons. The other controls will be disabled later.
+ */
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_RADIO_BICONGLOBAL), FALSE);
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_RADIO_BICONOVERRIDE), FALSE);
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_RADIO_BICONNONE), FALSE);
+ }
+
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_CHECK_MAIL), lpvac->protooptions & OPT_PROTO_MAIL_CHECK);
+
+ EnableDisableBIconSelectControls(hwndPropPage);
+
/* Let the system set the focus. */
return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDC_RADIO_BICONGLOBAL:
+ case IDC_RADIO_BICONOVERRIDE:
+ case IDC_RADIO_BICONNONE:
+ EnableDisableBIconSelectControls(hwndPropPage);
+ return TRUE;
+ }
+
+ break;
+
+ case WM_NOTIFY:
+ if(((LPNMHDR)lParam)->code == PSN_APPLY)
+ {
+ VULTURE_ACCOUNT *lpvac = (VULTURE_ACCOUNT*)GetWindowLongPtr(hwndPropPage, GWLP_USERDATA);
+ int cch;
+ HWND hwndEdit;
+
+ /* Username. */
+ if(!lpvac->bConnected)
+ {
+ g_free(lpvac->szUsername);
+
+ hwndEdit = GetDlgItem(hwndPropPage, IDC_EDIT_USERNAME);
+ cch = GetWindowTextLength(hwndEdit) + 1;
+ lpvac->szUsername = g_new(TCHAR, cch);
+ GetWindowText(hwndEdit, lpvac->szUsername, cch);
+ }
+
+ if(lpvac->szPassword)
+ g_free(lpvac->szPassword);
+
+ /* Password. */
+ if(!(lpvac->protooptions & OPT_PROTO_NO_PASSWORD))
+ {
+ hwndEdit = GetDlgItem(hwndPropPage, IDC_EDIT_PASSWORD);
+ cch = GetWindowTextLength(hwndEdit) + 1;
+ lpvac->szPassword = g_new(TCHAR, cch);
+ GetWindowText(hwndEdit, lpvac->szPassword, cch);
+
+ lpvac->bRememberPass = IsDlgButtonChecked(hwndPropPage, IDC_CHECK_REMEMBERPASS);
+ }
+ else
+ lpvac->szPassword = NULL;
+
+
+ /* Alias. */
+
+ if(lpvac->szAlias)
+ g_free(lpvac->szAlias);
+
+ hwndEdit = GetDlgItem(hwndPropPage, IDC_EDIT_ALIAS);
+ cch = GetWindowTextLength(hwndEdit) + 1;
+
+ if(cch > 1)
+ {
+ lpvac->szAlias = g_new(TCHAR, cch);
+ GetWindowText(hwndEdit, lpvac->szAlias, cch);
+ }
+ else
+ lpvac->szAlias = NULL;
+
+ /* Mail. */
+ if(lpvac->protooptions & OPT_PROTO_MAIL_CHECK)
+ lpvac->bMail = IsDlgButtonChecked(hwndPropPage, IDC_CHECK_MAIL);
+
+ /* Buddy icon. */
+ if(lpvac->bSupportsBIcon)
+ {
+ if(IsDlgButtonChecked(hwndPropPage, IDC_RADIO_BICONGLOBAL))
+ lpvac->bOverrideBIcon = FALSE;
+ else
+ {
+ lpvac->bOverrideBIcon = TRUE;
+
+ if(lpvac->szBIcon)
+ g_free(lpvac->szBIcon);
+
+ /* Assume this for starters. */
+ lpvac->szBIcon = NULL;
+
+ if(IsDlgButtonChecked(hwndPropPage, IDC_RADIO_BICONOVERRIDE))
+ {
+ hwndEdit = GetDlgItem(hwndPropPage, IDC_EDIT_BICON);
+ cch = GetWindowTextLength(hwndEdit) + 1;
+
+ if(cch > 1)
+ {
+ lpvac->szBIcon = g_new(TCHAR, cch);
+ GetWindowText(hwndEdit, lpvac->szBIcon, cch);
+ }
+ }
+ }
+ }
+
+ SetWindowLong(hwndPropPage, DWL_MSGRESULT, PSNRET_NOERROR);
+ return TRUE;
+ }
+
+ break;
}
return FALSE;
}
+
+
+/**
+ * Enables or disables the buddy-icon selection controls, according to the
+ * selected radio button.
+ *
+ * @param hwndPropPage Property-page window handle.
+ */
+static void EnableDisableBIconSelectControls(HWND hwndPropPage)
+{
+ BOOL bEnable = IsDlgButtonChecked(hwndPropPage, IDC_RADIO_BICONOVERRIDE);
+
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_STATIC_BICON), bEnable);
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_EDIT_BICON), bEnable);
+ EnableWindow(GetDlgItem(hwndPropPage, IDC_BUTTON_BICONBROWSE), bEnable);
+}
============================================================
--- vulture/acctmanager.h dd7aeaa4c06dcaf84ec094c14bbd94b779a93699
+++ vulture/acctmanager.h cb137369907b86ee984b99f8423d5e824dca5e2f
@@ -30,10 +30,19 @@ typedef struct _VULTURE_ACCOUNT
typedef struct _VULTURE_ACCOUNT
{
- PurpleAccount *lppac;
- BOOL bEnabled;
- LPTSTR szUsername;
- LPTSTR szProtocolID;
+ PurpleAccount *lppac;
+ BOOL bEnabled;
+ LPTSTR szUsername;
+ LPTSTR szProtocolID;
+ LPTSTR szPassword;
+ LPTSTR szAlias;
+ BOOL bMail;
+ BOOL bOverrideBIcon;
+ LPTSTR szBIcon;
+ PurpleProtocolOptions protooptions;
+ BOOL bRememberPass;
+ BOOL bConnected;
+ BOOL bSupportsBIcon;
} VULTURE_ACCOUNT;
@@ -44,7 +53,7 @@ typedef struct _VULTURE_GET_ACCOUNTS
} VULTURE_GET_ACCOUNTS;
-BOOL VultureAccountManagerDlg(HWND hwndParent, GList *lpglistAccounts);
+BOOL VultureAccountManagerDlg(HWND hwndParent, GList **lplpglistAccounts);
#endif
============================================================
--- vulture/purpleacct.c 827a025e2cd490839f873fda408b5f52e6bbd7bb
+++ vulture/purpleacct.c 741fb5362bd61f03043314c83af2441f6a38ebaf
@@ -49,13 +49,56 @@ void PurpleGetAccounts(BOOL bOnlineOnly,
if(!bOnlineOnly || purple_account_is_connected((PurpleAccount*)lpglistPurpleAcc->data))
{
VULTURE_ACCOUNT *lpvac = g_new(VULTURE_ACCOUNT, 1);
+ const gchar *szAlias;
+ PurplePlugin *lppluginPrpl;
+ PurplePluginProtocolInfo *lpprplinfo;
lpvac->lppac = (PurpleAccount*)lpglistPurpleAcc->data;
lpvac->bEnabled = purple_account_get_enabled(lpvac->lppac, VULTURE_ID);
+ lppluginPrpl = purple_find_prpl(purple_account_get_protocol_id(lpvac->lppac));
+ lpprplinfo = lppluginPrpl ? PURPLE_PLUGIN_PROTOCOL_INFO(lppluginPrpl) : NULL;
+ lpvac->protooptions = lpprplinfo ? lpprplinfo->options : 0;
+
lpvac->szUsername = VultureUTF8ToTCHAR(purple_account_get_username(lpvac->lppac));
lpvac->szProtocolID = VultureUTF8ToTCHAR(purple_account_get_protocol_id(lpvac->lppac));
+ lpvac->bRememberPass = FALSE;
+ lpvac->szPassword = NULL;
+
+ if(!(lpprplinfo->options & OPT_PROTO_NO_PASSWORD))
+ {
+ lpvac->bRememberPass = purple_account_get_remember_password(lpvac->lppac);
+ if(lpvac->bRememberPass)
+ {
+ const gchar *szPassword = purple_account_get_password(lpvac->lppac);
+
+ if(szPassword)
+ lpvac->szPassword = VultureUTF8ToTCHAR(szPassword);
+ }
+ }
+
+ szAlias = purple_account_get_alias(lpvac->lppac);
+ lpvac->szAlias = szAlias ? VultureUTF8ToTCHAR(szAlias) : NULL;
+
+ if(lpprplinfo->options & OPT_PROTO_MAIL_CHECK)
+ lpvac->bMail = purple_account_get_check_mail(lpvac->lppac);
+
+ lpvac->szBIcon = NULL;
+
+ lpvac->bSupportsBIcon = lpprplinfo ? lpprplinfo->icon_spec.format != NULL : FALSE;
+ if(lpvac->bSupportsBIcon)
+ {
+ lpvac->bOverrideBIcon = !purple_account_get_bool(lpvac->lppac, "use-global-buddyicon", TRUE);
+ if(lpvac->bOverrideBIcon)
+ {
+ const gchar *szBIcon = purple_account_get_buddy_icon_path(lpvac->lppac);
+ lpvac->szBIcon = szBIcon ? VultureUTF8ToTCHAR(szBIcon) : NULL;
+ }
+ }
+
+ lpvac->bConnected = purple_account_is_connected(lpvac->lppac);
+
*lplpglistAccounts = g_list_prepend(*lplpglistAccounts, lpvac);
}
}
@@ -79,6 +122,9 @@ void VultureFreeAccountList(GList *lpgli
g_free(lpvac->szUsername);
g_free(lpvac->szProtocolID);
+ g_free(lpvac->szPassword);
+ g_free(lpvac->szAlias);
+ g_free(lpvac->szBIcon);
g_free(lpvac);
}
@@ -94,17 +140,53 @@ void PurpleApplyVultureAccount(VULTURE_A
*/
void PurpleApplyVultureAccount(VULTURE_ACCOUNT *lpvac)
{
- char *szUsername, *szProtocolID;
+ char *szUTF8;
- szUsername = VultureTCHARToUTF8(lpvac->szUsername);
- szProtocolID = VultureTCHARToUTF8(lpvac->szProtocolID);
+ szUTF8 = VultureTCHARToUTF8(lpvac->szUsername);
+ purple_account_set_username(lpvac->lppac, szUTF8);
+ g_free(szUTF8);
- purple_account_set_username(lpvac->lppac, szUsername);
- purple_account_set_protocol_id(lpvac->lppac, szProtocolID);
- purple_account_set_enabled(lpvac->lppac, VULTURE_ID, lpvac->bEnabled);
+ szUTF8 = VultureTCHARToUTF8(lpvac->szProtocolID);
+ purple_account_set_protocol_id(lpvac->lppac, szUTF8);
+ g_free(szUTF8);
- g_free(szProtocolID);
- g_free(szUsername);
+ purple_account_set_remember_password(lpvac->lppac, lpvac->bRememberPass);
+
+ if(lpvac->bRememberPass && lpvac->szPassword)
+ {
+ szUTF8 = VultureTCHARToUTF8(lpvac->szPassword);
+ purple_account_set_password(lpvac->lppac, szUTF8);
+ g_free(szUTF8);
+ }
+ else
+ purple_account_set_password(lpvac->lppac, NULL);
+
+ if(lpvac->szAlias)
+ {
+ szUTF8 = VultureTCHARToUTF8(lpvac->szAlias);
+ purple_account_set_alias(lpvac->lppac, szUTF8);
+ g_free(szUTF8);
+ }
+ else
+ purple_account_set_alias(lpvac->lppac, NULL);
+
+ purple_account_set_check_mail(lpvac->lppac, lpvac->bMail);
+
+ if(lpvac->bSupportsBIcon)
+ {
+ if(!lpvac->bOverrideBIcon)
+ purple_account_set_bool(lpvac->lppac, "use-global-buddyicon", TRUE);
+ else
+ {
+ purple_account_set_bool(lpvac->lppac, "use-global-buddyicon", FALSE);
+
+ szUTF8 = lpvac->szBIcon ? VultureTCHARToUTF8(lpvac->szBIcon) : NULL;
+ purple_account_set_buddy_icon_path(lpvac->lppac, szUTF8);
+ g_free(szUTF8);
+ }
+ }
+
+ purple_account_set_enabled(lpvac->lppac, VULTURE_ID, lpvac->bEnabled);
}
============================================================
--- vulture/resource.h 7fafa51aa101e29d2ae32aea5b90bed3c7aac7a9
+++ vulture/resource.h 7268f6c20040de2fe025eeb603466f7a43eb57c3
@@ -51,13 +51,13 @@
#define IDC_CHECK_REMEMBERPASS 1023
#define IDC_CHECK_MAIL 1024
#define IDC_RADIO_BICONGLOBAL 1025
-#define IDC_EDIT_PASSWORD 1026
-#define IDC_STATIC_BICON 1027
+#define IDC_RADIO_BICONOVERRIDE 1026
+#define IDC_RADIO_BICONNONE 1027
#define IDC_STATIC_PROTOICON 1028
#define IDC_EDIT_BICON 1029
#define IDC_BUTTON_BICONBROWSE 1030
-#define IDC_RADIO_BICONOVERRIDE 1031
-#define IDC_RADIO_BICONNONE 1032
+#define IDC_EDIT_PASSWORD 1031
+#define IDC_STATIC_BICON 1032
#define IDC_STATIC_PROTOCOL 1033
============================================================
--- vulture/vulture-res.rc a1209ea5d5b503c32c8484c49df20fd3c001acf9
+++ vulture/vulture-res.rc 4e3fcc80965fbaab6b26676ed954e5b2c17e2e9d
@@ -179,28 +179,28 @@ FONT 8, "Ms Shell Dlg"
CAPTION "Account"
FONT 8, "Ms Shell Dlg"
{
- GROUPBOX "Login options", IDC_STATIC, 5, 5, 235, 100
- LTEXT "Chose the settings used to log into this account.", IDC_STATIC, 15, 20, 220, 9, SS_LEFT
- LTEXT "Protocol:", IDC_STATIC, 15, 42, 55, 8, SS_LEFT
- LTEXT "", IDC_STATIC_PROTOCOL, 125, 42, 110, 10, SS_LEFT
- CONTROL "", IDC_STATIC_PROTOICON, "Static", SS_CENTERIMAGE, 105, 42, 12, 9
- LTEXT "&Username:", IDC_STATIC, 15, 57, 55, 8, SS_LEFT
- EDITTEXT IDC_EDIT_USERNAME, 75, 55, 160, 12, ES_AUTOHSCROLL
- LTEXT "&Password:", IDC_STATIC, 15, 72, 55, 8, SS_LEFT
- EDITTEXT IDC_EDIT_PASSWORD, 75, 70, 160, 12, ES_AUTOHSCROLL | ES_PASSWORD
- AUTOCHECKBOX "&Remember password", IDC_CHECK_REMEMBERPASS, 75, 88, 130, 8
- GROUPBOX "User options", IDC_STATIC, 5, 110, 235, 50
- LTEXT "&Local alias:", IDC_STATIC, 15, 127, 55, 8, SS_LEFT
- EDITTEXT IDC_EDIT_ALIAS, 75, 125, 160, 12, ES_AUTOHSCROLL
- AUTOCHECKBOX "Show &new mail notifications for this account", IDC_CHECK_MAIL, 15, 143, 220, 10
- GROUPBOX "Buddy-icon options", IDC_STATIC, 5, 165, 235, 110
- RADIOBUTTON "Use &global buddy-icon settings", IDC_RADIO_BICONGLOBAL, 15, 195, 215, 10
- LTEXT "Buddy icons can be set on a per-account basis if desired.", IDC_STATIC, 15, 180, 220, 10, SS_LEFT
- RADIOBUTTON "Use the &following buddy icon:", IDC_RADIO_BICONOVERRIDE, 15, 210, 215, 10
- CONTROL "", IDC_STATIC_BICON, "Static", SS_ETCHEDFRAME, 28, 225, 35, 30
- EDITTEXT IDC_EDIT_BICON, 75, 226, 160, 12, ES_AUTOHSCROLL
- PUSHBUTTON "&Browse...", IDC_BUTTON_BICONBROWSE, 75, 240, 65, 15
- RADIOBUTTON "&Don't show a buddy icon for this account", IDC_RADIO_BICONNONE, 15, 260, 215, 10
+ GROUPBOX "Login options", IDC_STATIC, 5, 5, 235, 100
+ LTEXT "Chose the settings used to log into this account.", IDC_STATIC, 15, 20, 220, 9, SS_LEFT
+ LTEXT "Protocol:", IDC_STATIC, 15, 42, 55, 8, SS_LEFT
+ LTEXT "", IDC_STATIC_PROTOCOL, 125, 42, 110, 10, SS_LEFT
+ CONTROL "", IDC_STATIC_PROTOICON, "Static", SS_CENTERIMAGE, 105, 42, 12, 9
+ LTEXT "&Username:", IDC_STATIC, 15, 57, 55, 8, SS_LEFT
+ EDITTEXT IDC_EDIT_USERNAME, 75, 55, 160, 12, ES_AUTOHSCROLL
+ LTEXT "&Password:", IDC_STATIC, 15, 72, 55, 8, SS_LEFT
+ EDITTEXT IDC_EDIT_PASSWORD, 75, 70, 160, 12, ES_AUTOHSCROLL | ES_PASSWORD
+ AUTOCHECKBOX "&Remember password", IDC_CHECK_REMEMBERPASS, 75, 88, 130, 8
+ GROUPBOX "User options", IDC_STATIC, 5, 110, 235, 50
+ LTEXT "&Local alias:", IDC_STATIC, 15, 127, 55, 8, SS_LEFT
+ EDITTEXT IDC_EDIT_ALIAS, 75, 125, 160, 12, ES_AUTOHSCROLL
+ AUTOCHECKBOX "Show &new mail notifications for this account", IDC_CHECK_MAIL, 15, 143, 220, 10
+ GROUPBOX "Buddy-icon options", IDC_STATIC, 5, 165, 235, 110
+ AUTORADIOBUTTON "Use &global buddy-icon settings", IDC_RADIO_BICONGLOBAL, 15, 195, 215, 10
+ AUTORADIOBUTTON "Use the &following buddy icon:", IDC_RADIO_BICONOVERRIDE, 15, 210, 215, 10
+ AUTORADIOBUTTON "&Don't show a buddy icon for this account", IDC_RADIO_BICONNONE, 15, 260, 215, 10
+ LTEXT "Buddy icons can be set on a per-account basis if desired.", IDC_STATIC, 15, 180, 220, 10, SS_LEFT
+ CONTROL "", IDC_STATIC_BICON, "Static", SS_ETCHEDFRAME, 28, 225, 35, 30
+ EDITTEXT IDC_EDIT_BICON, 75, 226, 160, 12, ES_AUTOHSCROLL
+ PUSHBUTTON "&Browse...", IDC_BUTTON_BICONBROWSE, 75, 240, 65, 15
}
============================================================
--- vulture/vultureblist.c b401e092f692e492071ae21e5a67156efc498f7c
+++ vulture/vultureblist.c db21140446ba7401194200d61deafd0bf747fe96
@@ -986,12 +986,16 @@ static void ManageAccounts(HWND hwndPare
static void ManageAccounts(HWND hwndParent)
{
VULTURE_GET_ACCOUNTS vgetaccounts;
+ GList *lpglistOrig;
vgetaccounts.bOnlineOnly = FALSE;
VultureSingleSyncPurpleCall(PC_GETACCOUNTS, &vgetaccounts);
+ /* We need to free this later. */
+ lpglistOrig = vgetaccounts.lpglistAccounts;
+
/* Show the dialogue and check whether the user OKs. */
- if(VultureAccountManagerDlg(hwndParent, vgetaccounts.lpglistAccounts))
+ if(VultureAccountManagerDlg(hwndParent, &vgetaccounts.lpglistAccounts))
{
GList *lpglistRover;
GArray *lpgarrayWaitContext = VultureAllocPurpleWaitContext();
@@ -1002,6 +1006,7 @@ static void ManageAccounts(HWND hwndPare
VulturePurpleWait(lpgarrayWaitContext);
}
+ g_list_free(lpglistOrig);
VultureFreeAccountList(vgetaccounts.lpglistAccounts);
}
More information about the Commits
mailing list