Skip to content

Commit

Permalink
1.3 commit - Added minimize to system tray. Added tab completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsm174 committed Feb 7, 2016
1 parent 591f570 commit e9d1518
Show file tree
Hide file tree
Showing 20 changed files with 672 additions and 193 deletions.
15 changes: 14 additions & 1 deletion AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
* 11/07/2005: Initial version J. Millard
* 11/17/2005: Added UNICODE support J. Millard
* 12/15/2005: Updated Help/F1 to go visit website J. Millard
*/

#include "stdafx.h"
Expand Down Expand Up @@ -69,9 +70,21 @@ BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)
//{{AFX_MSG_MAP(CAboutDialog)
ON_BN_CLICKED(IDC_VISITWEBSITE_BUTTON, OnVisitWebSiteButton)
ON_BN_CLICKED(IDC_CLOSE_BUTTON, OnOK)
//}}AFX_MSG_MAP
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/**
* CAboutDialog::OnHelpInfo()
*/

BOOL CAboutDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
OnVisitWebSiteButton();

return TRUE;
}

/**
* CAboutDialog::OnInitDialog()
*/
Expand Down
3 changes: 2 additions & 1 deletion AboutDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class CAboutDialog : public CDialog
//{{AFX_MSG(CAboutDialog)
virtual BOOL OnInitDialog();
afx_msg void OnVisitWebSiteButton();
//}}AFX_MSG
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

Expand Down
16 changes: 14 additions & 2 deletions CommandEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* REVISION HISTORY:
*
* 12/06/2005: Initial version J. Millard
* 12/15/2005: Added GetText() method J. Millard
*/

#include "stdafx.h"
Expand Down Expand Up @@ -64,6 +65,18 @@ BEGIN_MESSAGE_MAP(CCommandEdit, CEdit)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/**
* CCommandEdit::GetText()
*/

CString CCommandEdit::GetText()
{
CString csText;
GetWindowText(csText);

return csText;
}

/**
* CCommandEdit::SetText()
*/
Expand Down Expand Up @@ -103,8 +116,7 @@ void CCommandEdit::OnLButtonUp(UINT nFlags, CPoint point)
{
if ( OpenClipboard() )
{
CString csText;
GetWindowText(csText);
CString csText = GetText();

CString csCommand =
csText.Mid( iStart, (iEnd - iStart) );
Expand Down
2 changes: 2 additions & 0 deletions CommandEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* REVISION HISTORY:
*
* 12/06/2005: Initial version J. Millard
* 12/15/2005: Added GetText() method J. Millard
*/

#if !defined(AFX_COMMANDEDIT_H__309531A0_E385_4512_83CF_2A230314E589__INCLUDED_)
Expand All @@ -43,6 +44,7 @@ class CCommandEdit : public CEdit
public:
CCommandEdit();

CString GetText();
void SetText( CString csText );
void SetEmulateCopyPaste( int iEmulateCopyPaste );

Expand Down
13 changes: 9 additions & 4 deletions Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* Added AltGr support
* 11/18/2005: Fixed AltGr support J. Millard
* 12/06/2005: Added mouse Copy/Paste emulation J. Millard
* 12/15/2005: Added minimize to systray. J. Millard
* Added tab completion
*/

#if !defined(DEFINES_H__INCLUDED_)
Expand All @@ -42,12 +44,12 @@

#define PUTTYCS_WINDOW_CLASS_PUTTY _T( "PuTTY" )

#define PUTTYCS_WINDOW_TITLE_TOOL _T( "PuTTYCS 1.2 - PuTTY Command Sender")
#define PUTTYCS_WINDOW_TITLE_APP _T( "PuTTYCS 1.2")
#define PUTTYCS_WINDOW_TITLE_TOOL _T( "PuTTYCS 1.3 - PuTTY Command Sender")
#define PUTTYCS_WINDOW_TITLE_APP _T( "PuTTYCS 1.3")

#define PUTTYCS_WINDOW_TITLE_ABOUT _T( "About PuTTYCS 1.2")
#define PUTTYCS_WINDOW_TITLE_ABOUT _T( "About PuTTYCS...")

#define PUTTYCS_ABOUT_TEXT_LINE1 _T( "PuTTY Command Sender 1.2" )
#define PUTTYCS_ABOUT_TEXT_LINE1 _T( "PuTTY Command Sender 1.3" )
#define PUTTYCS_ABOUT_TEXT_LINE2 _T( "© 2005 Jason Millard. All rights reserved." )

#define PUTTYCS_WINDOW_TITLE_FILTER_ADD _T( "Add Filter" )
Expand Down Expand Up @@ -82,6 +84,7 @@

#define PUTTYCS_PREF_WINDOW_TOOL _T( "toolWindow" )
#define PUTTYCS_PREF_WINDOW_ALWAYS_ON_TOP _T( "alwaysOnTop" )
#define PUTTYCS_PREF_MINIMIZE_TO_SYSTRAY _T( "minimizeToSysTray" )
#define PUTTYCS_PREF_WINDOW_TRANSITION _T( "transition" )

#define PUTTYCS_PREF_AUTO_ARRANGE _T( "autoArrange" )
Expand All @@ -93,6 +96,7 @@
#define PUTTYCS_PREF_ARRANGE_ON_STARTUP _T( "arrangeOnStartup" )
#define PUTTYCS_PREF_UNHIDE_ON_EXIT _T( "unhideOnExit" )

#define PUTTYCS_PREF_TAB_COMPLETION _T( "tabCompletion" )
#define PUTTYCS_PREF_EMULATE_COPY_PASTE _T( "emulateCopyPaste" )

#define PUTTYCS_PREF_SEND_CR _T( "sendCR" )
Expand All @@ -109,6 +113,7 @@
#define PUTTYCS_SENDKEY_BUTTON_ENDTELNET _T( "^]" )

#define PUTTYCS_SENDKEY_BUTTON_ESCAPE _T( "{ESC}" )
#define PUTTYCS_SENDKEY_BUTTON_TAB _T( "{TAB}" )
#define PUTTYCS_SENDKEY_BUTTON_ENTER _T( "^m" )

#define PUTTYCS_SENDKEY_BUTTON_PLUS _T( "{PLUS}" )
Expand Down
22 changes: 20 additions & 2 deletions FilterDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
* 11/07/2005: Initial version J. Millard
* 11/17/2005: Added UNICODE support J. Millard
* 12/15/2005: Updated Help/F1 to go visit website J. Millard
*/

#include "stdafx.h"
Expand Down Expand Up @@ -70,9 +71,26 @@ BEGIN_MESSAGE_MAP(CFilterDialog, CDialog)
ON_EN_CHANGE(IDC_FILTERNAME_EDIT, OnChangeFilterName)
ON_EN_CHANGE(IDC_FILTERLIST_EDIT, OnChangeFilterList)
ON_BN_CLICKED(IDC_OK_BUTTON, OnOK)
//}}AFX_MSG_MAP
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/**
* CFiltersDialog::OnHelpInfo()
*/

BOOL CFilterDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
ShellExecute( NULL,
PUTTYCS_SHELL_EXECUTE_OPEN,
PUTTYCS_URL_HOMEPAGE,
NULL,
NULL,
SW_SHOWNORMAL );

return TRUE;
}

/**
* CFilterDialog::OnInitDialog()
*/
Expand Down Expand Up @@ -175,4 +193,4 @@ void CFilterDialog::OnChangeFilterList()
m_csFilterList.TrimRight();

RefreshDialog();
}
}
3 changes: 2 additions & 1 deletion FilterDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class CFilterDialog : public CDialog
virtual BOOL OnInitDialog();
afx_msg void OnChangeFilterName();
afx_msg void OnChangeFilterList();
//}}AFX_MSG
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

CString m_csFilterName;
Expand Down
30 changes: 24 additions & 6 deletions FiltersDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
* 11/07/2005: Initial version J. Millard
* 11/17/2005: Added UNICODE support J. Millard
* 12/15/2005: Updated Help/F1 to go visit website J. Millard
*/

#include "stdafx.h"
Expand Down Expand Up @@ -68,19 +69,20 @@ void CFiltersDialog::DoDataExchange(CDataExchange* pDX)

BEGIN_MESSAGE_MAP(CFiltersDialog, CDialog)
//{{AFX_MSG_MAP(CFiltersDialog)
ON_LBN_SELCHANGE(IDC_FILTERS_LISTBOX, RefreshDialog)
ON_LBN_DBLCLK(IDC_FILTERS_LISTBOX, OnEditButton)
ON_BN_CLICKED(IDC_ADD_BUTTON, OnAddButton)
ON_BN_CLICKED(IDC_EDIT_BUTTON, OnEditButton)
ON_LBN_DBLCLK(IDC_FILTERS_LISTBOX, OnEditButton)
ON_BN_CLICKED(IDC_COPY_BUTTON, OnCopyButton)
ON_BN_CLICKED(IDC_REMOVE_BUTTON, OnRemoveButton)
ON_BN_CLICKED(IDC_REMOVE_ALL_BUTTON, OnRemoveAllButton)
ON_BN_CLICKED(IDC_MOVEUP_BUTTON, OnMoveUpButton)
ON_BN_CLICKED(IDC_MOVEDOWN_BUTTON, OnMoveDownButton)
ON_BN_CLICKED(IDC_OK_BUTTON, OnOKButton)
ON_BN_CLICKED(IDC_CANCEL_BUTTON, OnCancel)
ON_BN_CLICKED(IDC_APPLY_BUTTON, OnApplyButton)
//}}AFX_MSG_MAP
ON_LBN_SELCHANGE(IDC_FILTERS_LISTBOX, RefreshDialog)
ON_BN_CLICKED(IDC_EDIT_BUTTON, OnEditButton)
ON_BN_CLICKED(IDC_CANCEL_BUTTON, OnCancel)
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/**
Expand Down Expand Up @@ -116,6 +118,22 @@ void CFiltersDialog::setFilter( int filter )
m_iFilter = filter;
}

/**
* CFiltersDialog::OnHelpInfo()
*/

BOOL CFiltersDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
ShellExecute( NULL,
PUTTYCS_SHELL_EXECUTE_OPEN,
PUTTYCS_URL_HOMEPAGE,
NULL,
NULL,
SW_SHOWNORMAL );

return TRUE;
}

/**
* CFiltersDialog::OnInitDialog()
*/
Expand Down Expand Up @@ -437,4 +455,4 @@ void CFiltersDialog::OnApplyButton()
m_bChanges = false;

RefreshDialog();
}
}
4 changes: 2 additions & 2 deletions FiltersDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ class CFiltersDialog : public CDialog
afx_msg void OnMoveUpButton();
afx_msg void OnMoveDownButton();
afx_msg void OnOKButton();
afx_msg void OnCancelButton();
afx_msg void OnApplyButton();
//}}AFX_MSG
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

Expand Down
20 changes: 19 additions & 1 deletion PasswordDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*
* 11/07/2005: Initial version J. Millard
* 11/17/2005: Added UNICODE support J. Millard
* 12/15/2005: Updated Help/F1 to go visit website J. Millard
*/

#include "stdafx.h"
Expand Down Expand Up @@ -69,7 +70,8 @@ void CPasswordDialog::DoDataExchange(CDataExchange* pDX)
BEGIN_MESSAGE_MAP(CPasswordDialog, CDialog)
//{{AFX_MSG_MAP(CPasswordDialog)
ON_BN_CLICKED(IDC_OK_BUTTON, OnOKButton)
//}}AFX_MSG_MAP
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/**
Expand All @@ -90,6 +92,22 @@ CString CPasswordDialog::getPassword()
return m_csPassword;
}

/**
* CPasswordDialog::OnHelpInfo()
*/

BOOL CPasswordDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
ShellExecute( NULL,
PUTTYCS_SHELL_EXECUTE_OPEN,
PUTTYCS_URL_HOMEPAGE,
NULL,
NULL,
SW_SHOWNORMAL );

return TRUE;
}

/**
* CPasswordDialog::OnInitDialog()
*/
Expand Down
3 changes: 2 additions & 1 deletion PasswordDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class CPasswordDialog : public CDialog
//{{AFX_MSG(CPasswordDialog)
virtual BOOL OnInitDialog();
afx_msg void OnOKButton();
//}}AFX_MSG
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

CString m_csPassword;
Expand Down
Loading

0 comments on commit e9d1518

Please sign in to comment.