Browse Source

- fixed named copy/paste
- changed installed for 3.15 for normal install and portable
[SAB]


git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@391 595ec19a-5cb4-439b-94a8-42fb3063c22c

sabrogden 18 years ago
parent
commit
176c494418
4 changed files with 62 additions and 9 deletions
  1. 4 4
      CP_Main.rc
  2. 2 2
      DittoSetup/DittoSetup.iss
  3. 2 2
      DittoSetup/Portable DittoSetup.iss
  4. 54 1
      MainFrm.cpp

+ 4 - 4
CP_Main.rc

@@ -913,8 +913,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,14,0,0
- PRODUCTVERSION 3,14,0,0
+ FILEVERSION 3,15,0,0
+ PRODUCTVERSION 3,15,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -930,12 +930,12 @@ BEGIN
         BLOCK "040904b0"
         BEGIN
             VALUE "FileDescription", "Ditto"
-            VALUE "FileVersion", "3, 14, 0, 0"
+            VALUE "FileVersion", "3, 15, 0, 0"
             VALUE "InternalName", "CP_Main"
             VALUE "LegalCopyright", "Copyright (C) 2003"
             VALUE "OriginalFilename", "Ditto"
             VALUE "ProductName", "Ditto"
-            VALUE "ProductVersion", "3, 14, 0, 0"
+            VALUE "ProductVersion", "3, 15, 0, 0"
         END
     END
     BLOCK "VarFileInfo"

+ 2 - 2
DittoSetup/DittoSetup.iss

@@ -3,8 +3,8 @@
 
 [Setup]
 AppName=Ditto
-AppVerName=Ditto 3.14.0.0
-OutputBaseFilename=DittoSetup_3_14_0_0
+AppVerName=Ditto 3.15.0.0
+OutputBaseFilename=DittoSetup_3_15_0_0
 AppPublisher=Scott Brogden
 AppPublisherURL=ditto-cp.sourceforge.net
 AppSupportURL=ditto-cp.sourceforge.net

+ 2 - 2
DittoSetup/Portable DittoSetup.iss

@@ -3,8 +3,8 @@
 
 [Setup]
 AppName=Portable Ditto
-AppVerName=Ditto Portable 3.14.0.0
-OutputBaseFilename=DittoPortableSetup_3_14_0_0
+AppVerName=Ditto Portable 3.15.0.0
+OutputBaseFilename=DittoPortableSetup_3_15_0_0
 AppPublisher=Scott Brogden
 AppPublisherURL=ditto-cp.sourceforge.net
 AppSupportURL=ditto-cp.sourceforge.net

+ 54 - 1
MainFrm.cpp

@@ -255,7 +255,35 @@ LRESULT CMainFrame::OnHotKey(WPARAM wParam, LPARAM lParam)
 		{
 			if(theApp.m_QuickPasteMode == CCP_MainApp::NONE_QUICK_PASTE)
 			{
-				
+				theApp.m_QuickPasteMode = CCP_MainApp::ADDING_QUICK_PASTE;
+
+				theApp.SendCopy();
+
+				m_pTypingToolTip = new CToolTipEx;
+				m_pTypingToolTip->Create(this);
+
+				csTypeToolTipTitle = theApp.m_Language.GetString("Named_Copy_Title", "Ditto - Named Copy");
+
+				m_pTypingToolTip->SetToolTipText(csTypeToolTipTitle);
+
+				CRect rcScreen;
+				GetMonitorRect(0, &rcScreen);
+
+				m_ToolTipPoint = GetFocusedCaretPos();
+				if(m_ToolTipPoint.x < 0 || m_ToolTipPoint.y < 0)
+				{
+					CRect cr;
+					::GetWindowRect(theApp.m_hTargetWnd, cr);
+					m_ToolTipPoint = cr.CenterPoint();
+				}
+				m_ToolTipPoint.Offset(-15, 15);
+				m_pTypingToolTip->Show(m_ToolTipPoint);
+
+				//If they don't type anything for 2 seconds stop looking
+				SetTimer(STOP_LOOKING_FOR_KEYBOARD, 20000, NULL);
+
+				MonitorKeyboardChanges(m_hWnd, WM_FOCUS_CHANGED+1);
+				SetCaptureKeys(true);
 			}
 		}
 	}
@@ -265,6 +293,31 @@ LRESULT CMainFrame::OnHotKey(WPARAM wParam, LPARAM lParam)
 		{
 			if(theApp.m_QuickPasteMode == CCP_MainApp::NONE_QUICK_PASTE)
 			{
+				theApp.m_QuickPasteMode = CCP_MainApp::PASTING_QUICK_PASTE;
+
+				m_pTypingToolTip = new CToolTipEx;
+				m_pTypingToolTip->Create(this);
+
+				csTypeToolTipTitle = theApp.m_Language.GetString("Named_Paste_Title", "Ditto - Named Paste");
+				m_pTypingToolTip->SetToolTipText(csTypeToolTipTitle);
+
+				CRect rcScreen;
+
+				m_ToolTipPoint = GetFocusedCaretPos();
+				if(m_ToolTipPoint.x < 0 || m_ToolTipPoint.y < 0)
+				{
+					CRect cr;
+					::GetWindowRect(theApp.m_hTargetWnd, cr);
+					m_ToolTipPoint = cr.CenterPoint();
+				}
+				m_ToolTipPoint.Offset(-15, 15);
+				m_pTypingToolTip->Show(m_ToolTipPoint);
+
+				//If they don't type anything for 2 seconds stop looking
+				SetTimer(STOP_LOOKING_FOR_KEYBOARD, 20000, NULL);
+
+				MonitorKeyboardChanges(m_hWnd, WM_FOCUS_CHANGED+1);
+				SetCaptureKeys(true);
 			}
 		}
 	}