Skip to content

Commit

Permalink
RLogin-2.26.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kmiya-culti committed Jun 27, 2021
1 parent 02efef3 commit 7ea5e78
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 45 deletions.
15 changes: 13 additions & 2 deletions RLogin/CertKeyDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ BOOL CCertKeyDlg::OnInitDialog()
SetTimer(1028, 1000, NULL);
m_Counter = 0;

if ( (pWnd = GetDlgItem(IDC_DIGEST)) != NULL && m_DigestFont.CreatePointFont(
MulDiv(9 * 10, m_NowDpi.cy, SYSTEM_DPI_Y), _T("Consolas")) )
if ( (pWnd = GetDlgItem(IDC_DIGEST)) != NULL && m_DigestFont.CreatePointFont(MulDiv(9 * 10, m_NowDpi.cy, SYSTEM_DPI_Y), _T("Consolas")) )
pWnd->SetFont(&m_DigestFont);

m_SaveKeyFlag = ::AfxGetApp()->GetProfileInt(_T("CCertKeyDlg"), _T("SaveKeyFlag"), TRUE);
UpdateData(FALSE);

return TRUE;
}

Expand All @@ -67,3 +69,12 @@ void CCertKeyDlg::OnTimer(UINT_PTR nIDEvent)
}
CDialogExt::OnTimer(nIDEvent);
}


void CCertKeyDlg::OnOK()
{
UpdateData(TRUE);
::AfxGetApp()->WriteProfileInt(_T("CCertKeyDlg"), _T("SaveKeyFlag"), m_SaveKeyFlag);

CDialogExt::OnOK();
}
1 change: 1 addition & 0 deletions RLogin/CertKeyDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ class CCertKeyDlg : public CDialogExt
protected:
afx_msg void OnTimer(UINT_PTR nIDEvent);
DECLARE_MESSAGE_MAP()
virtual void OnOK();
};
7 changes: 6 additions & 1 deletion RLogin/ColParaDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CColParaDlg メッセージ ハンドラ

const COLORREF ColSetTab[10][16] = {
const COLORREF ColSetTab[11][16] = {
{ RGB( 0, 0, 0), RGB(196, 64, 64), RGB( 64, 196, 64), RGB(196, 196, 64),
RGB( 64, 64, 196), RGB(196, 64, 196), RGB( 64, 196, 196), RGB(196, 196, 196),
RGB(128, 128, 128), RGB(255, 96, 96), RGB( 96, 255, 96), RGB(255, 255, 96),
Expand Down Expand Up @@ -141,6 +141,11 @@ const COLORREF ColSetTab[10][16] = {
RGB( 0, 55, 218), RGB(136, 23, 152), RGB( 58, 150, 221), RGB(204, 204, 204),
RGB(118, 118, 118), RGB(231, 72, 86), RGB( 22, 198, 12), RGB(249, 241, 165),
RGB( 59, 120, 255), RGB(180, 0, 158), RGB( 97, 214, 214), RGB(242, 242, 242) }, // Windows

{ RGB( 0, 0, 0), RGB(255, 75, 0), RGB( 3, 175, 122), RGB(255, 241, 0),
RGB( 0, 90, 255), RGB(153, 0, 153), RGB( 77, 196, 255), RGB(200, 200, 203),
RGB(132, 145, 158), RGB(255, 202, 128), RGB(119, 217, 168), RGB(255, 255, 128),
RGB(90, 180, 255), RGB(201, 172, 230), RGB(191, 228, 255), RGB(255, 255, 255) }, // CUD
};

void CColParaDlg::DoInit()
Expand Down
2 changes: 1 addition & 1 deletion RLogin/ColParaDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/////////////////////////////////////////////////////////////////////////////
// CColParaDlg ダイアログ

extern const COLORREF ColSetTab[10][16];
extern const COLORREF ColSetTab[11][16];

class CColParaDlg : public CTreePage
{
Expand Down
3 changes: 2 additions & 1 deletion RLogin/Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5647,7 +5647,7 @@ const CKeyNodeTab & CKeyNodeTab::operator = (CKeyNodeTab &data)
return *this;
}

#define CMDSKEYTABMAX 142
#define CMDSKEYTABMAX 143
static const struct _CmdsKeyTab {
int code;
LPCWSTR name;
Expand Down Expand Up @@ -5695,6 +5695,7 @@ static const struct _CmdsKeyTab {
{ ID_MACRO_HIS5, L"$KEY_HIS5" },
{ ID_MACRO_PLAY, L"$KEY_PLAY" },
{ ID_MACRO_REC, L"$KEY_REC" },
{ IDM_KNOWNHOSTDEL, L"$KNOWNHOST_DELETE"},
{ ID_LOG_OPEN, L"$LOG_OPEN" },
{ IDM_LOOKCAST, L"$LOOKCAST" },
{ ID_MOUSE_EVENT, L"$MOUSE_EVENT" },
Expand Down
9 changes: 9 additions & 0 deletions RLogin/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "richedit.h"
#include "TraceDlg.h"
#include "AnyPastDlg.h"
#include "TtyModeDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
Expand Down Expand Up @@ -882,6 +883,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_COMMAND(IDM_SPEAKALL, &CMainFrame::OnSpeakText)
ON_UPDATE_COMMAND_UI(IDM_SPEAKALL, &CMainFrame::OnUpdateSpeakText)

ON_COMMAND(IDM_KNOWNHOSTDEL, &CMainFrame::OnKnownhostdel)
END_MESSAGE_MAP()

static const UINT indicators[] =
Expand Down Expand Up @@ -4564,6 +4566,13 @@ afx_msg void CMainFrame::OnUpdateHistoryDlg(CCmdUI *pCmdUI)
pCmdUI->SetCheck(m_pHistoryDlg != NULL ? 1 : 0);
}

void CMainFrame::OnKnownhostdel()
{
CKnownHostsDlg dlg;

dlg.DoModal();
}

/////////////////////////////////////////////////////////////////////////////
// CDockContextEx

Expand Down
1 change: 1 addition & 0 deletions RLogin/MainFrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ class CMainFrame : public CMDIFrameWnd
afx_msg void OnUpdateTabmultiline(CCmdUI *pCmdUI);
afx_msg void OnQuickConnect();
afx_msg void OnUpdateConnect(CCmdUI *pCmdUI);
afx_msg void OnKnownhostdel();

afx_msg LRESULT OnWinSockSelect(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnGetHostAddr(WPARAM wParam, LPARAM lParam);
Expand Down
22 changes: 16 additions & 6 deletions RLogin/RLogin.rc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ BEGIN
MENUITEM "�v���C�x�[�g�v���t�@�C���쐬(&P)", IDM_CREATEPROFILE
MENUITEM "���W�X�g�����t�@�C���ɕۑ�(&B)", IDM_SAVEREGFILE
MENUITEM "���\�[�X���t�@�C���ɕۑ�(&R)", IDM_SAVERESFILE
MENUITEM SEPARATOR
MENUITEM "�o�^���ꂽ�z�X�g���̍폜(&H)", IDM_KNOWNHOSTDEL
MENUITEM "�p�X���[�h���b�N(&K)", IDM_PASSWORDLOCK
END
END
Expand Down Expand Up @@ -375,6 +377,8 @@ BEGIN
MENUITEM "�v���C�x�[�g�v���t�@�C���쐬(&P)", IDM_CREATEPROFILE
MENUITEM "���W�X�g�����t�@�C���ɕۑ�(&B)", IDM_SAVEREGFILE
MENUITEM "���\�[�X���t�@�C���ɕۑ�(&R)", IDM_SAVERESFILE
MENUITEM SEPARATOR
MENUITEM "�o�^���ꂽ�z�X�g���̍폜(&H)", IDM_KNOWNHOSTDEL
MENUITEM "�p�X���[�h���b�N(&K)", IDM_PASSWORDLOCK
END
END
Expand Down Expand Up @@ -429,6 +433,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "�t�@�C������C���|�[�g(&I)", IDM_SERV_INPORT
MENUITEM "�t�@�C���ɃG�N�X�|�[�g(&X)", IDM_SERV_EXPORT
MENUITEM "���ׂăt�@�C���ɕۑ�(&A)", IDM_ALL_EXPORT
MENUITEM SEPARATOR
MENUITEM "�ŐV�̏��ɍX�V(&U)", ID_EDIT_CHECK
END
Expand Down Expand Up @@ -626,8 +631,8 @@ BEGIN
CONTROL "<a href=""https://1023world.net/"">https://1023world.net/</a>",IDC_SYSLINK1,
"SysLink",WS_TABSTOP,44,204,189,8
DEFPUSHBUTTON "OK",IDOK,91,223,60,14,WS_GROUP
ICON IDR_MAINFRAME,IDC_STATIC,7,7,18,21
LTEXT "RLogin (%s) Version 2.26.1 (2021/05/06)",IDC_VERSIONSTR,44,7,189,8,SS_NOPREFIX
ICON IDR_MAINFRAME,IDC_STATIC,7,7,20,20
LTEXT "RLogin (%s) Version 2.26.2 (2021/06/28)",IDC_VERSIONSTR,44,7,189,8,SS_NOPREFIX
LTEXT "Copyright (C) 1998-2021 Culti",IDC_STATIC,44,16,189,8
LTEXT "OpenSSL 1.1.1k 25 Mar 2021",IDC_STATIC,44,52,189,8
LTEXT "Copyright (c) 1998-2021 The OpenSSL Project",IDC_STATIC,44,61,189,8
Expand Down Expand Up @@ -2154,8 +2159,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,26,1,0
PRODUCTVERSION 2,26,1,0
FILEVERSION 2,26,2,0
PRODUCTVERSION 2,26,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -2172,12 +2177,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Culti"
VALUE "FileDescription", "RLogin MFC �A�v���P�[�V����"
VALUE "FileVersion", "2.26.1.0"
VALUE "FileVersion", "2.26.2.0"
VALUE "InternalName", "RLogin.exe"
VALUE "LegalCopyright", "Copyright (C) 2019 Culti All rights reserved."
VALUE "OriginalFilename", "RLogin.exe"
VALUE "ProductName", "RLogin �A�v���P�[�V����"
VALUE "ProductVersion", "2.26.1.0"
VALUE "ProductVersion", "2.26.2.0"
END
END
BLOCK "VarFileInfo"
Expand Down Expand Up @@ -3090,6 +3095,8 @@ BEGIN
0x6154, 0x676e, 0x006f,
IDC_COLSET, 0x403, 8, 0
0x6957, 0x646e, 0x776f, 0x0073,
IDC_COLSET, 0x403, 4, 0
0x5543, 0x0044,
IDC_WAKEUPSLEEP, 0x403, 5, 0
0x6f4e, 0x656e, "\000"
IDC_WAKEUPSLEEP, 0x403, 5, 0
Expand Down Expand Up @@ -4447,6 +4454,7 @@ BEGIN
IDS_ANYPASTVIEWMSG "�Ăяo�����ڑ��ƈႤ�ڑ��Ƀy�[�X�g���܂����H"
IDS_VERSIONCHECKURL2 "https://kmiya-culti.github.io/RLogin/version.txt"
IDS_SCRIPTDLGSTEP "�X�e�b�v"
IDS_KNOWNHOSTDELMSG "�o�^����Ă���z�X�g��%d�‚��폜���܂����H"
END

STRINGTABLE
Expand Down Expand Up @@ -4930,6 +4938,8 @@ BEGIN
IDM_CMDHIS_SCRM "�X�N���[�����[�h�̒��ւ�\n�X�N���[�����[�h"
IDM_HISTORYDLG "�q�X�g���[�E�B���h�E��\���E��\��\n�q�X�g���[�E�B���h�E"
IDM_SPEAKALL "�\������Ă����ʂ������œǂݏグ�܂�\n�����œǂݏグ"
IDM_KNOWNHOSTDEL "�o�^����Ă���z�X�g���̍폜\n�z�X�g���̍폜"
IDM_ALL_EXPORT "���ׂẴG���g���[���t�@�C���ɕۑ����܂�\n���ׂĕۑ�"
END

#endif // ���{�� (���{) resources
Expand Down
45 changes: 44 additions & 1 deletion RLogin/ServerSelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ BEGIN_MESSAGE_MAP(CServerSelect, CDialogExt)
ON_NOTIFY(TVN_ITEMEXPANDED, IDC_SERVERTREE, &CServerSelect::OnTvnItemexpandedServertree)
ON_NOTIFY(NM_RCLICK, IDC_SERVERTREE, &CServerSelect::OnNMRClickServertree)
ON_NOTIFY(TVN_BEGINLABELEDIT, IDC_SERVERTREE, &CServerSelect::OnTvnBeginlabeleditServertree)
ON_COMMAND(IDM_ALL_EXPORT, &CServerSelect::OnAllExport)
END_MESSAGE_MAP()

void CServerSelect::TreeExpandUpdate(HTREEITEM hTree, BOOL bExpand)
Expand Down Expand Up @@ -1032,6 +1033,49 @@ void CServerSelect::OnServExport()
File.Close();
}

void CServerSelect::OnAllExport()
{
int n;
CFile File;
CStringIndex index;
CServerEntry Entry;
CFileDialog dlg(FALSE, _T("rlg"), _T(""), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, CStringLoad(IDS_FILEDLGRLOGIN), this);

if ( DpiAwareDoModal(dlg) != IDOK )
return;

if ( !File.Open(dlg.GetPathName(), CFile::modeCreate | CFile::modeReadWrite | CFile::shareExclusive) ) {
MessageBox(_T("File Crate Error"));
return;
}

CWaitCursor wait;
CArchive Archive(&File, CArchive::store | CArchive::bNoFlushOnDelete);

TRY {
for ( n = 0 ; n < m_pData->GetSize() ; n++ ) {
Entry = m_pData->GetAt(n);
CRLoginDoc::LoadOption(Entry, *m_pTextRam, *m_pKeyTab, *m_pKeyMac, *m_pParamTab);

index.RemoveAll();
index.SetNoCase(TRUE);
index.SetNoSort(TRUE);

CRLoginDoc::SaveIndex(Entry, *m_pTextRam, *m_pKeyTab, *m_pKeyMac, *m_pParamTab, index);

Archive.Write("RLG310\r\n", 8);
index.Serialize(Archive, NULL);
Archive.Write("ENDOF\r\n", 7);
}

} CATCH_ALL(e) {
MessageBox(_T("File Write Error"));
} END_CATCH_ALL

Archive.Close();
File.Close();
}

void CServerSelect::OnServExchng()
{
CFileDialog dlg(TRUE, _T("rlg"), _T(""), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, CStringLoad(IDS_FILEDLGRLOGIN), this);
Expand Down Expand Up @@ -2063,4 +2107,3 @@ void CServerSelect::OnTvnItemexpandedServertree(NMHDR *pNMHDR, LRESULT *pResult)
break;
}
}

1 change: 1 addition & 0 deletions RLogin/ServerSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class CServerSelect : public CDialogExt
afx_msg void OnCheckEntry();
afx_msg void OnServInport();
afx_msg void OnServExport();
afx_msg void OnAllExport();
afx_msg void OnServProto();
afx_msg void OnSaveDefault();
afx_msg void OnServExchng();
Expand Down
Loading

0 comments on commit 7ea5e78

Please sign in to comment.