summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-05-22 18:28:59 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-05-22 18:28:59 +0000
commit8fceb2db2ea58d7d105194b4e03a80ddd566ad6e (patch)
treee34c5ea97eb81391c836916feb0a0938f79d4681 /plugins
parent2091bf8b8faa00b04515677ddde7cf6817196b59 (diff)
GMailNotifier:
-Fixed hangup in options (fixes #675) -Fixed Apply button -ressource fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@9280 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/GmailNotifier/res/options.rc165
-rw-r--r--plugins/GmailNotifier/src/check.cpp2
-rw-r--r--plugins/GmailNotifier/src/gmail.h4
-rw-r--r--plugins/GmailNotifier/src/main.cpp8
-rw-r--r--plugins/GmailNotifier/src/notify.cpp6
-rw-r--r--plugins/GmailNotifier/src/options.cpp62
-rw-r--r--plugins/GmailNotifier/src/resource.h15
7 files changed, 138 insertions, 124 deletions
diff --git a/plugins/GmailNotifier/res/options.rc b/plugins/GmailNotifier/res/options.rc
index c8458a0cfb..7105e7b592 100644
--- a/plugins/GmailNotifier/res/options.rc
+++ b/plugins/GmailNotifier/res/options.rc
@@ -1,14 +1,13 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
+#include "..\src\resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "../src/resource.h"
-#include "winres.h"
-
+#include <winres.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -16,77 +15,78 @@
// Neutral (Sys. Default) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
-#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
-#pragma code_page(936)
-#endif //_WIN32
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "..\\src\\resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include <winres.h>\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
-IDD_OPT DIALOGEX 0, 0, 260, 227
-STYLE DS_CENTER | WS_CHILD
+IDD_OPT DIALOGEX 0, 0, 309, 227
+STYLE DS_SETFONT | DS_CENTER | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "Tahoma"
+FONT 8, "Tahoma", 0, 0, 0x1
BEGIN
- LTEXT "Name:",IDC_STATIC,20,19,36,9,NOT WS_GROUP
- LTEXT "Password:",IDC_STATIC,20,35,36,9,NOT WS_GROUP
- LTEXT "Check Gmail inbox every",IDC_STATIC,20,78,81,9
- LTEXT "minutes",IDC_STATIC,127,78,46,9
- LTEXT "Notifier on:",IDC_STATIC,20,93,51,9
- LTEXT "<",IDC_STATIC_LESS,127,105,8,10,NOT WS_VISIBLE | NOT
- WS_GROUP
- LTEXT "Duration:",IDC_STATIC_DURATION,134,100,50,9,NOT
- WS_VISIBLE | NOT WS_GROUP
- LTEXT "Text|Background:",IDC_STATIC_COLOR,134,110,57,9,NOT WS_VISIBLE |
- NOT WS_GROUP
- LTEXT "custom program",IDC_STATIC_CUSTOM,121,146,79,9,NOT
- WS_GROUP
- LTEXT "seconds",IDC_STATIC_SEC,206,100,40,9,NOT WS_VISIBLE
- LTEXT "On double click:",IDC_STATIC,20,123,51,9
- COMBOBOX IDC_NAME,57,17,130,50,CBS_DROPDOWN | CBS_AUTOHSCROLL |
- WS_VSCROLL | WS_TABSTOP | 0x8000
- EDITTEXT IDC_PASS,57,33,130,11,ES_PASSWORD | ES_AUTOHSCROLL | NOT
- WS_BORDER,WS_EX_STATICEDGE
- PUSHBUTTON "Add",IDC_BTNADD,197,13,43,11,0,WS_EX_STATICEDGE
- PUSHBUTTON "Save",IDC_BTNSAV,197,26,43,11,0,WS_EX_STATICEDGE
- PUSHBUTTON "Delete",IDC_BTNDEL,197,39,43,11,0,WS_EX_STATICEDGE
- EDITTEXT IDC_CIRCLE,105,77,18,10,NOT WS_BORDER,WS_EX_STATICEDGE
- CONTROL "System tray",IDC_OPTTRAY,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,72,93,56,10
- CONTROL "Popup plugin",IDC_OPTPOP,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,72,104,54,10
- CONTROL "Login using default browser",IDC_SYSDEF,"Button",
- BS_AUTORADIOBUTTON,72,123,145,10
- CONTROL "Login using Internet Explorer",IDC_USEIE,"Button",
- BS_AUTORADIOBUTTON,72,134,145,10
- CONTROL "Run",IDC_STARTPRG,"Button",BS_AUTORADIOBUTTON,72,145,47,
- 10
- EDITTEXT IDC_PRG,121,145,107,10,ES_AUTOHSCROLL | NOT WS_VISIBLE |
- NOT WS_BORDER,WS_EX_STATICEDGE
- PUSHBUTTON "...",IDC_PRGBROWSE,228,145,12,10,NOT WS_VISIBLE,
- WS_EX_STATICEDGE
- CONTROL "Use online contacts when no new mail",IDC_ONLINE,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,20,160,186,10
- CONTROL "Enable icon selection and icon in status bar (restart)",
- IDC_SHOWICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,
- 172,186,10
- CONTROL "This is a shared computer so disable auto login",
- IDC_AUTOLOGIN,"Button",BS_AUTO3STATE | WS_TABSTOP,20,184,
- 186,10
- CONTROL "Log unread threads into database (enable history)",
- IDC_LOGTHREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,
- 196,186,10
- GROUPBOX "Gmail account",IDC_GROUPMAIN,5,2,250,56
- GROUPBOX "Configuration",IDC_CONFIG,5,65,250,148
- EDITTEXT IDC_DURATION,188,100,14,8,NOT WS_VISIBLE | NOT WS_BORDER,
- WS_EX_STATICEDGE
- CONTROL "",IDC_TEXTCOLOR,"ColourPicker",NOT WS_VISIBLE |
- WS_TABSTOP,194,110,9,9
- CONTROL "",IDC_BGCOLOR,"ColourPicker",NOT WS_VISIBLE |
- WS_TABSTOP,204,110,9,9
+ GROUPBOX "Gmail account",IDC_GROUPMAIN,4,2,291,56
+ LTEXT "Name:",IDC_STATIC,8,19,68,9,NOT WS_GROUP,WS_EX_RIGHT
+ COMBOBOX IDC_NAME,82,17,145,50,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | 0x8000
+ LTEXT "Password:",IDC_STATIC,8,35,68,9,NOT WS_GROUP,WS_EX_RIGHT
+ EDITTEXT IDC_PASS,82,33,145,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT WS_BORDER,WS_EX_STATICEDGE
+ PUSHBUTTON "Add",IDC_BTNADD,231,13,57,11,0,WS_EX_STATICEDGE
+ PUSHBUTTON "Save",IDC_BTNSAV,231,26,57,11,0,WS_EX_STATICEDGE
+ PUSHBUTTON "Delete",IDC_BTNDEL,231,39,57,11,0,WS_EX_STATICEDGE
+ GROUPBOX "Configuration",IDC_CONFIG,4,65,291,157
+ LTEXT "Check Gmail inbox every",IDC_STATIC,8,78,149,9,0,WS_EX_RIGHT
+ LTEXT "minutes",IDC_STATIC,185,79,46,9
+ LTEXT "Notify using:",IDC_STATIC,8,93,68,9,0,WS_EX_RIGHT
+ LTEXT "Duration:",IDC_STATIC_DURATION,169,97,58,9,NOT WS_VISIBLE | NOT WS_GROUP,WS_EX_RIGHT
+ EDITTEXT IDC_DURATION,231,96,14,12,NOT WS_VISIBLE | NOT WS_BORDER,WS_EX_STATICEDGE
+ LTEXT "seconds",IDC_STATIC_SEC,251,97,37,9,NOT WS_VISIBLE
+ LTEXT "Text|Background:",IDC_STATIC_COLOR,137,110,90,9,NOT WS_VISIBLE | NOT WS_GROUP,WS_EX_RIGHT
+ CONTROL "",IDC_TEXTCOLOR,"ColourPicker",NOT WS_VISIBLE | WS_TABSTOP,231,111,21,9
+ CONTROL "",IDC_BGCOLOR,"ColourPicker",NOT WS_VISIBLE | WS_TABSTOP,259,111,21,9
+ LTEXT "On double click:",IDC_STATIC,8,123,68,9,0,WS_EX_RIGHT
+ EDITTEXT IDC_CIRCLE,164,76,18,12,NOT WS_BORDER,WS_EX_STATICEDGE
+ CONTROL "System tray",IDC_OPTTRAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,82,93,56,10
+ CONTROL "Popup plugin",IDC_OPTPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,82,104,54,10
+ CONTROL "Login using default browser",IDC_SYSDEF,"Button",BS_AUTORADIOBUTTON,82,123,206,10
+ CONTROL "Login using Internet Explorer",IDC_USEIE,"Button",BS_AUTORADIOBUTTON,82,134,206,10
+ CONTROL "Run custom program",IDC_STARTPRG,"Button",BS_AUTORADIOBUTTON,82,145,206,10
+ EDITTEXT IDC_PRG,82,156,189,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | NOT WS_BORDER,WS_EX_STATICEDGE
+ PUSHBUTTON "...",IDC_PRGBROWSE,276,158,12,10,NOT WS_VISIBLE,WS_EX_STATICEDGE
+ CONTROL "Use online contacts when no new mail",IDC_ONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,169,280,10
+ CONTROL "Enable icon selection and icon in status bar (restart)",IDC_SHOWICON,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,181,280,10
+ CONTROL "This is a shared computer so disable auto login",IDC_AUTOLOGIN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,194,280,10
+ CONTROL "Log unread threads into database (enable history)",IDC_LOGTHREADS,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,207,280,10
END
@@ -97,29 +97,30 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICONNEW ICON DISCARDABLE "iconnew.ico"
-IDI_ICONERR ICON DISCARDABLE "error.ico"
-IDI_ICONEPT ICON DISCARDABLE "empty.ico"
+IDI_ICONNEW ICON "iconnew.ico"
+IDI_ICONERR ICON "error.ico"
+IDI_ICONEPT ICON "empty.ico"
-#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// TEXTINCLUDE
+// DESIGNINFO
//
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""resource.h""\r\n"
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
BEGIN
- "\r\n"
- "\0"
+ IDD_OPT, DIALOG
+ BEGIN
+ RIGHTMARGIN, 295
+ VERTGUIDE, 4
+ VERTGUIDE, 8
+ VERTGUIDE, 76
+ VERTGUIDE, 82
+ VERTGUIDE, 227
+ VERTGUIDE, 231
+ VERTGUIDE, 288
+ END
END
-
#endif // APSTUDIO_INVOKED
#endif // Neutral (Sys. Default) resources
diff --git a/plugins/GmailNotifier/src/check.cpp b/plugins/GmailNotifier/src/check.cpp
index 06f73d6326..b3821cb7cf 100644
--- a/plugins/GmailNotifier/src/check.cpp
+++ b/plugins/GmailNotifier/src/check.cpp
@@ -128,7 +128,7 @@ error_handle:
curAcc->IsChecking = FALSE;
}
-void __cdecl Check_ThreadFunc(LPVOID lpParam)
+void __cdecl Check_ThreadFunc(void *lpParam)
{
InternetSetCookieA("https://mail.google.com/mail/", "GX", "");
if (lpParam) {
diff --git a/plugins/GmailNotifier/src/gmail.h b/plugins/GmailNotifier/src/gmail.h
index 4f95173141..67e5eeda85 100644
--- a/plugins/GmailNotifier/src/gmail.h
+++ b/plugins/GmailNotifier/src/gmail.h
@@ -85,8 +85,8 @@ BOOL GetBrowser(char *);
void CheckMailInbox(Account *);
void NotifyUser(Account *);
int OptInit(WPARAM, LPARAM);
-void Check_ThreadFunc(LPVOID);
-void Login_ThreadFunc(LPVOID);
+void Check_ThreadFunc(void *);
+void Login_ThreadFunc(void *);
int OpenBrowser(WPARAM , LPARAM);
int ParsePage(char *, resultLink *);
void DeleteResults(resultLink *);
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index 6428e1f151..06760df072 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -61,12 +61,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
-void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
+void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
{
PluginMenuCommand(0, 0);
}
-INT_PTR PluginMenuCommand(WPARAM hContact, LPARAM lParam)
+INT_PTR PluginMenuCommand(WPARAM hContact, LPARAM)
{
if (!optionWindowIsOpen)
mir_forkthread(Check_ThreadFunc, GetAccountByContact(hContact));
@@ -74,7 +74,7 @@ INT_PTR PluginMenuCommand(WPARAM hContact, LPARAM lParam)
return 0;
}
-static int OnMirandaStart(WPARAM wParam, LPARAM lParam)
+static int OnMirandaStart(WPARAM, LPARAM)
{
PluginMenuCommand(0, 0);
return 0;
@@ -87,7 +87,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load()
{
- SkinAddNewSoundEx("Gmail", "Other", "Gmail: New Thread(s)");
+ SkinAddNewSoundEx("Gmail", LPGEN("Other"), LPGEN("Gmail: New Thread(s)"));
HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp
index cce1dccc07..a684e5ff0c 100644
--- a/plugins/GmailNotifier/src/notify.cpp
+++ b/plugins/GmailNotifier/src/notify.cpp
@@ -21,7 +21,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam)
return FALSE;
}
-INT_PTR Notifying(WPARAM wParam, LPARAM lParam)
+INT_PTR Notifying(WPARAM, LPARAM lParam)
{
OpenBrowser(((CLISTEVENT*)lParam)->hContact, 0);
return 0;
@@ -116,7 +116,7 @@ void NotifyUser(Account *curAcc)
ppd.PluginData = NULL;
ppd.iSeconds = opt.popupDuration;
PUDeletePopup(curAcc->popUpHwnd);
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ PUAddPopup(&ppd);
}
if (newMails > 0)
SkinPlaySound("Gmail");
@@ -135,7 +135,7 @@ void DeleteResults(resultLink *prst)
}
}
-void __cdecl Login_ThreadFunc(LPVOID lpParam)
+void __cdecl Login_ThreadFunc(void *lpParam)
{
if (lpParam == NULL)
return;
diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp
index 7700c140ca..9d23d99357 100644
--- a/plugins/GmailNotifier/src/options.cpp
+++ b/plugins/GmailNotifier/src/options.cpp
@@ -22,7 +22,6 @@ LRESULT WINAPI FlatComboProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- int i;
int ShowControl;
char str[MAX_PATH] = { 0 };
char *tail;
@@ -52,8 +51,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
// Perform the subclass
SetWindowLongPtr(hwndCombo, GWLP_WNDPROC, (LONG_PTR)FlatComboProc);
- for (i = 0; i < acc_num; i++)
- SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LONG)(LPSTR)acc[i].name);
+ for (int i = 0; i < acc_num; i++)
+ SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LONG)acc[i].name);
SendMessage(hwndCombo, CB_SETCURSEL, curIndex, 0);
if (curIndex < acc_num)
SetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass);
@@ -110,13 +109,16 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
return TRUE;
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_SYSDEF || LOWORD(wParam) == IDC_USEIE || LOWORD(wParam) == IDC_STARTPRG) {
+ switch (LOWORD(wParam)) {
+ case IDC_SYSDEF:
+ case IDC_USEIE:
+ case IDC_STARTPRG:
ShowControl = IsDlgButtonChecked(hwndDlg, IDC_STARTPRG) ? SW_SHOW : SW_HIDE;
ShowWindow(GetDlgItem(hwndDlg, IDC_PRG), ShowControl);
ShowWindow(GetDlgItem(hwndDlg, IDC_PRGBROWSE), ShowControl);
- }
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
- switch (LOWORD(wParam)) {
case IDC_OPTPOP:
ShowControl = IsDlgButtonChecked(hwndDlg, IDC_OPTPOP) ? SW_SHOW : SW_HIDE;
ShowWindow(GetDlgItem(hwndDlg, IDC_DURATION), ShowControl);
@@ -126,6 +128,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
ShowWindow(GetDlgItem(hwndDlg, IDC_STATIC_COLOR), ShowControl);
ShowWindow(GetDlgItem(hwndDlg, IDC_STATIC_LESS), ShowControl);
ShowWindow(GetDlgItem(hwndDlg, IDC_STATIC_SEC), ShowControl);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_PRGBROWSE:
@@ -140,35 +143,39 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
OpenFileName.lpstrFile = szName;
OpenFileName.nMaxFile = _MAX_PATH;
OpenFileName.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
- if (!GetOpenFileName((LPOPENFILENAME)&OpenFileName))
+ if (!GetOpenFileName(&OpenFileName))
return 0;
SetDlgItemText(hwndDlg, IDC_PRG, szName);
}
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_BTNADD:
acc_num++;
acc = (Account *)realloc(acc, acc_num * sizeof(Account));
- curIndex = SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LONG)(LPSTR)"");
+ curIndex = SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LONG)"");
memset(&acc[curIndex], 0, sizeof(Account));
SendMessage(hwndCombo, CB_SETCURSEL, curIndex, 0);
SetDlgItemTextA(hwndDlg, IDC_PASS, "");
SetFocus(hwndCombo);
acc[curIndex].hContact = CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)acc[curIndex].hContact, (LPARAM)pluginName);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_BTNSAV:
- GetDlgItemTextA(hwndDlg, IDC_NAME, acc[curIndex].name, 64);
- tail = strstr(acc[curIndex].name, "@");
- if (tail && lstrcmpA(tail + 1, "gmail.com") != 0)
- lstrcpyA(acc[curIndex].hosted, tail + 1);
- SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0);
- SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LONG)(LPSTR)acc[curIndex].name);
- SendMessageA(hwndCombo, CB_SETCURSEL, curIndex, 0);
- db_set_s(acc[curIndex].hContact, pluginName, "name", acc[curIndex].name);
- db_set_s(acc[curIndex].hContact, pluginName, "Nick", acc[curIndex].name);
- GetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass, 64);
- db_set_s(acc[curIndex].hContact, pluginName, "Password", acc[curIndex].pass);
+ if (GetDlgItemTextA(hwndDlg, IDC_NAME, acc[curIndex].name, 64)) {
+ tail = strstr(acc[curIndex].name, "@");
+ if (tail && lstrcmpA(tail + 1, "gmail.com") != 0)
+ lstrcpyA(acc[curIndex].hosted, tail + 1);
+ SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0);
+ SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LONG_PTR)acc[curIndex].name);
+ SendMessageA(hwndCombo, CB_SETCURSEL, curIndex, 0);
+ db_set_s(acc[curIndex].hContact, pluginName, "name", acc[curIndex].name);
+ db_set_s(acc[curIndex].hContact, pluginName, "Nick", acc[curIndex].name);
+ GetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass, 64);
+ db_set_s(acc[curIndex].hContact, pluginName, "Password", acc[curIndex].pass);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
break;
case IDC_BTNDEL:
@@ -176,22 +183,29 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendMessage(hwndCombo, CB_DELETESTRING, curIndex, 0);
DeleteResults(acc[curIndex].results.next);
acc[curIndex].results.next = NULL;
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)(HANDLE)acc[curIndex].hContact, 0);
- for (i = curIndex; i < acc_num; i++)
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)acc[curIndex].hContact, 0);
+ for (int i = curIndex; i < acc_num; i++)
acc[i] = acc[i + 1];
curIndex = 0;
SendMessage(hwndCombo, CB_SETCURSEL, 0, 0);
SetDlgItemTextA(hwndDlg, IDC_PASS, acc[0].pass);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_NAME:
if (HIWORD(wParam) == CBN_SELCHANGE) {
curIndex = SendMessage(hwndCombo, CB_GETCURSEL, 0, 0);
SetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
+ break;
+ case IDC_ONLINE:
+ case IDC_SHOWICON:
+ case IDC_AUTOLOGIN:
+ case IDC_LOGTHREADS:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
return TRUE;
case WM_NOTIFY:
@@ -244,7 +258,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
db_set_dw(NULL, pluginName, "LogThreads", opt.LogThreads);
ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
- for (i = 0; i < acc_num; i++)
+ for (int i = 0; i < acc_num; i++)
db_set_w(acc[i].hContact, pluginName, "Status", ID_STATUS_NONEW);
}
return TRUE;
@@ -256,7 +270,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
return FALSE;
}
-int OptInit(WPARAM wParam, LPARAM lParam)
+int OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp;
diff --git a/plugins/GmailNotifier/src/resource.h b/plugins/GmailNotifier/src/resource.h
index 7fdf98e866..8a66a02e96 100644
--- a/plugins/GmailNotifier/src/resource.h
+++ b/plugins/GmailNotifier/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by options.rc
+// Microsoft Visual C++ generated include file.
+// Used by C:\Users\xx\Documents\Visual Studio 2010\Projects\miranda-ng\plugins\GmailNotifier\res\options.rc
//
#define IDD_OPT 101
#define IDI_ICONNEW 106
@@ -12,6 +12,7 @@
#define IDC_OPTTRAY 1002
#define IDC_OPTPOP 1003
#define IDC_USEIE 1004
+#define IDC_STATIC_DURATION 1006
#define IDC_BGCOLOR 1007
#define IDC_TEXTCOLOR 1008
#define IDC_PRG 1009
@@ -19,22 +20,20 @@
#define IDC_STARTPRG 1011
#define IDC_PRGBROWSE 1012
#define IDC_STATIC_COLOR 1014
-#define IDC_STATIC_DURATION 1006
#define IDC_STATIC_LESS 1016
#define IDC_STATIC_SEC 1017
#define IDC_STATIC_CUSTOM 1018
+#define IDC_BTNADD 1019
#define IDC_PASS 1020
+#define IDC_BTNSAV 1021
#define IDC_NAME 1022
#define IDC_CIRCLE 1023
#define IDC_DURATION 1024
#define IDC_SHOWICON 1025
+#define IDC_BTNDEL 1026
#define IDC_AUTOLOGIN 1028
#define IDC_LOGTHREADS 1029
-#define IDC_BTNADD 1019
-#define IDC_BTNSAV 1021
-#define IDC_BTNDEL 1026
-#define IDC_ONLINE 1036
-
+#define IDC_ONLINE 1036
// Next default values for new objects
//