diff options
Diffstat (limited to 'protocols/YAMN/src')
| -rw-r--r-- | protocols/YAMN/src/main.cpp | 1 | ||||
| -rw-r--r-- | protocols/YAMN/src/main.h | 1 | ||||
| -rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3opt.cpp | 4 | ||||
| -rw-r--r-- | protocols/YAMN/src/resource.h | 1 | ||||
| -rw-r--r-- | protocols/YAMN/src/services.cpp | 27 | ||||
| -rw-r--r-- | protocols/YAMN/src/stdafx.h | 2 | ||||
| -rw-r--r-- | protocols/YAMN/src/yamn.cpp | 3 | 
7 files changed, 7 insertions, 32 deletions
diff --git a/protocols/YAMN/src/main.cpp b/protocols/YAMN/src/main.cpp index 3d370d9a44..d165acd93e 100644 --- a/protocols/YAMN/src/main.cpp +++ b/protocols/YAMN/src/main.cpp @@ -28,7 +28,6 @@ CMPlugin	g_plugin;  HANDLE hNewMailHook;
  HANDLE NoWriterEV;
 -HANDLE hTTButton;
  UINT SecTimer;
 diff --git a/protocols/YAMN/src/main.h b/protocols/YAMN/src/main.h index 79c56fefe0..d60f1f7fc7 100644 --- a/protocols/YAMN/src/main.h +++ b/protocols/YAMN/src/main.h @@ -16,7 +16,6 @@  #define YAMN_DBMSGSIZEX    "MailMessageWinW"
  #define YAMN_DBMSGSIZEY    "MailMessageWinH"
  #define YAMN_DBMSGPOSSPLIT "MailMessageSplitY"
 -#define YAMN_TTBFCHECK     "ForceCheckTTB"
  #define YAMN_CLOSEDELETE   "CloseOnDelete"
  #define YAMN_DBTIMEOPTIONS "MailBrowserTimeOpts"
 diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp index 8f36604033..2828fb232e 100644 --- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp @@ -143,7 +143,6 @@ struct CGeneralOptDlg : public CBaseOptionsDlg  	bool OnInitDialog() override
  	{
 -		CheckDlgButton(m_hwnd, IDC_CHECKTTB, g_plugin.getByte(YAMN_TTBFCHECK, 1) ? BST_CHECKED : BST_UNCHECKED);
  		CheckDlgButton(m_hwnd, IDC_LONGDATE, (optDateTime & SHOWDATELONG) ? BST_CHECKED : BST_UNCHECKED);
  		CheckDlgButton(m_hwnd, IDC_SMARTDATE, (optDateTime & SHOWDATENOTODAY) ? BST_UNCHECKED : BST_CHECKED);
  		CheckDlgButton(m_hwnd, IDC_SECONDS, (optDateTime & SHOWDATENOSECONDS) ? BST_UNCHECKED : BST_CHECKED);
 @@ -154,9 +153,6 @@ struct CGeneralOptDlg : public CBaseOptionsDlg  	bool OnApply() override
  	{
  		g_plugin.setByte(YAMN_CLOSEDELETE, IsDlgButtonChecked(m_hwnd, IDC_CLOSEONDELETE));
 -		g_plugin.setByte(YAMN_TTBFCHECK, IsDlgButtonChecked(m_hwnd, IDC_CHECKTTB));
 -
 -		AddTopToolbarIcon(0, 0);
  		optDateTime = 0;
  		if (IsDlgButtonChecked(m_hwnd, IDC_LONGDATE)) optDateTime |= SHOWDATELONG;
 diff --git a/protocols/YAMN/src/resource.h b/protocols/YAMN/src/resource.h index 8351dd2885..81894659cc 100644 --- a/protocols/YAMN/src/resource.h +++ b/protocols/YAMN/src/resource.h @@ -78,7 +78,6 @@  #define IDC_GBNONEWMAIL                 1095
  #define IDC_GBBADCONNECT                1096
  #define IDC_STSTATUS                    1102
 -#define IDC_CHECKTTB                    1117
  #define IDC_CHECKSSL                    1117
  #define IDC_CHECKNMSGP                  1118
  #define IDC_CHECKNOTLS                  1120
 diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp index 3ada411646..7f733cb666 100644 --- a/protocols/YAMN/src/services.cpp +++ b/protocols/YAMN/src/services.cpp @@ -215,25 +215,14 @@ HBITMAP LoadBmpFromIcon(HICON hIcon)  	return hBmp;
  }
 -int AddTopToolbarIcon(WPARAM, LPARAM)
 +static int AddTopToolbarIcon(WPARAM, LPARAM)
  {
 -	if (g_plugin.getByte(YAMN_TTBFCHECK, 1)) {
 -		if (ServiceExists(MS_TTB_REMOVEBUTTON) && hTTButton == nullptr) {
 -			TTBButton btn = {};
 -			btn.pszService = MS_YAMN_FORCECHECK;
 -			btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
 -			btn.hIconHandleUp = btn.hIconHandleDn = g_plugin.getIconHandle(IDI_CHECKMAIL);
 -			btn.name = btn.pszTooltipUp = LPGEN("Check mail");
 -			hTTButton = g_plugin.addTTB(&btn);
 -		}
 -	}
 -	else {
 -		if (hTTButton != nullptr) {
 -			CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0);
 -			hTTButton = nullptr;
 -		}
 -	}
 -
 +	TTBButton btn = {};
 +	btn.pszService = MS_YAMN_FORCECHECK;
 +	btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
 +	btn.hIconHandleUp = btn.hIconHandleDn = g_plugin.getIconHandle(IDI_CHECKMAIL);
 +	btn.name = btn.pszTooltipUp = LPGEN("Check mail");
 +	g_plugin.addTTB(&btn);
  	return 0;
  }
 @@ -241,8 +230,6 @@ int AddTopToolbarIcon(WPARAM, LPARAM)  int Shutdown(WPARAM, LPARAM)
  {
 -	CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0);
 -
  	g_plugin.setDword(YAMN_DBMSGPOSX, HeadPosX);
  	g_plugin.setDword(YAMN_DBMSGPOSY, HeadPosY);
  	g_plugin.setDword(YAMN_DBMSGSIZEX, HeadSizeX);
 diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h index 9369f2a418..ab27af87ee 100644 --- a/protocols/YAMN/src/stdafx.h +++ b/protocols/YAMN/src/stdafx.h @@ -145,14 +145,12 @@ int YAMNOptInitSvc(WPARAM, LPARAM);  //From main.cpp
  int PostLoad(WPARAM, LPARAM);				//Executed after all plugins loaded YAMN reads mails from file and notify every protocol it should set its functions
  int Shutdown(WPARAM, LPARAM);				//Executed before Miranda is going to shutdown
 -int AddTopToolbarIcon(WPARAM, LPARAM);	//Executed when TopToolBar plugin loaded Adds bitmap to toolbar
  extern wchar_t UserDirectory[];		//e.g. "F:\WINNT\Profiles\UserXYZ"
  extern wchar_t ProfileName[];		//e.g. "majvan"
  extern SWMRG *AccountBrowserSO;
  extern YAMN_VARIABLES YAMNVar;
  extern HANDLE hNewMailHook;
 -extern HANDLE hTTButton;
  extern HCURSOR hCurSplitNS, hCurSplitWE;
  extern UINT SecTimer;
 diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp index e4ad646694..b607c7cb80 100644 --- a/protocols/YAMN/src/yamn.cpp +++ b/protocols/YAMN/src/yamn.cpp @@ -149,8 +149,5 @@ INT_PTR ForceCheckSvc(WPARAM, LPARAM)  	}
  	CloseHandle(ThreadRunningEV);
 -
 -	if (hTTButton)
 -		CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, 0);
  	return 1;
  }
  | 
