summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-07-25 22:45:28 (UTC)
committer Michael Krelin <hacker@klever.net>2005-07-25 22:45:28 (UTC)
commitd2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee (patch) (unidiff)
tree1b5ddc636cee876fac8e90eb78ca3546a1a631b1
parent10639b71121a3fe7de24fe141d8dbe399fa283ff (diff)
downloaddipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.zip
dipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.tar.gz
dipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.tar.bz2
added ability to parse multiple urls from plaintext selection and bumped versions
git-svn-id: http://svn.klever.net/kin/dipstick/trunk@126 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--COPYING2
-rw-r--r--DipstickDlg.cpp62
-rw-r--r--DipstickDlg.h2
-rw-r--r--dipstick.rc24
-rw-r--r--help/dipstick.rtf4
-rw-r--r--help/dipstick.xml5
-rw-r--r--install/install.cpp2
-rw-r--r--install/install.rc10
-rw-r--r--resource.h1
-rw-r--r--stdafx.h3
10 files changed, 83 insertions, 32 deletions
diff --git a/COPYING b/COPYING
index 427b0ba..fa23ff9 100644
--- a/COPYING
+++ b/COPYING
@@ -1,2 +1,2 @@
1Copyright (c) 1996-2004 Klever Group (http://www.klever.net/) 1Copyright (c) 1996-2005 Klever Group (http://www.klever.net/)
2 2
diff --git a/DipstickDlg.cpp b/DipstickDlg.cpp
index ace2aff..f27b219 100644
--- a/DipstickDlg.cpp
+++ b/DipstickDlg.cpp
@@ -107,2 +107,4 @@ CString tmp;
107 VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase)); 107 VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
108 VERIFY(tmp.LoadString(IDS_REGEX_URL));
109 VERIFY(m_reURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
108} 110}
@@ -137,2 +139,3 @@ BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog)
137 ON_BN_CLICKED(IDC_OPTIONS, OnOptions) 139 ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
140 ON_MESSAGE(WM_DNP_URLSPING, OnURLSPing)
138 ON_MESSAGE(WM_DNP_URLPING, OnUrlPing) 141 ON_MESSAGE(WM_DNP_URLPING, OnUrlPing)
@@ -1187,2 +1190,3 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
1187 PostMessage(WM_DNP_HTML,0,(LPARAM)xf); 1190 PostMessage(WM_DNP_HTML,0,(LPARAM)xf);
1191 rv = TRUE;
1188 } 1192 }
@@ -1212,12 +1216,24 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
1212 if(pDO->IsDataAvailable(CF_TEXT)){ 1216 if(pDO->IsDataAvailable(CF_TEXT)){
1213 if(!bTestOnly){ 1217 BOOL rv = FALSE;
1214 HGLOBAL hg = pDO->GetGlobalData(CF_TEXT); 1218 HGLOBAL hg = pDO->GetGlobalData(CF_TEXT);
1215 ASSERT(hg); 1219 ASSERT(hg);
1216 LPVOID lpv = GlobalLock(hg); 1220 LPVOID lpv = GlobalLock(hg);
1217 ASSERT(lpv); 1221 ASSERT(lpv);
1218 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv)); 1222 if(bTestOnly){
1219 GlobalUnlock(hg); 1223 rv = m_reURL.Match((LPCSTR)lpv);
1220 GlobalFree(hg); 1224 }else{
1225 CString sel = (LPCSTR)lpv;
1226 if(m_reURL.Match(sel)) {
1227 rv = TRUE;
1228 CString tmp = m_reURL.GetMatch(CRegEx::matchPostMatch);
1229 if(m_reURL.Match(tmp)) {
1230 PostMessage(WM_DNP_URLSPING,0,(LPARAM)new CString((LPCSTR)lpv));
1231 }else{
1232 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
1233 }
1234 }
1221 } 1235 }
1222 return TRUE; 1236 GlobalUnlock(hg);
1237 GlobalFree(hg);
1238 return rv;
1223 } 1239 }
@@ -1259,2 +1275,28 @@ CSelectURLsDlg su;
1259 1275
1276LRESULT CDipstickDlg::OnURLSPing(WPARAM wP,LPARAM lP)
1277{
1278CString *sel = (CString*)lP;
1279TRACE1("URLS: %s\n",(LPCTSTR)*sel);
1280CSelectURLsDlg su;
1281 su.m_bAdjust = m_bSmartAdjust;
1282 su.m_bAdjustInnermost = m_bAdjustInnermost;
1283 BeginWaitCursor();
1284 while(m_reURL.Match(*sel)){
1285 CString url = m_reURL.GetMatch(CRegEx::matchMatch);
1286 (*sel) = m_reURL.GetMatch(CRegEx::matchPostMatch);
1287 if(!su.m_URLs.Find(url))
1288 VERIFY(su.m_URLs.AddTail(url));
1289 }
1290 EndWaitCursor();
1291 delete sel;
1292 if(su.DoModal()==IDOK){
1293 POSITION p = su.m_URLs.GetHeadPosition();
1294 while(p){
1295 CString url = su.m_URLs.GetNext(p);
1296 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
1297 }
1298 }
1299 return 0;
1300}
1301
1260UINT CPingyHost::PingProc(LPVOID pParam) 1302UINT CPingyHost::PingProc(LPVOID pParam)
@@ -1585,2 +1627,2 @@ CSingleLock sl(&pThis->m_mutex);
1585 return 0; 1627 return 0;
1586} 1628} \ No newline at end of file
diff --git a/DipstickDlg.h b/DipstickDlg.h
index ce9ed22..47c3e01 100644
--- a/DipstickDlg.h
+++ b/DipstickDlg.h
@@ -45,2 +45,4 @@ class CDipstickDlg : public CDialog
45public: 45public:
46 LRESULT OnURLSPing(WPARAM wP,LPARAM lP);
47 CRegEx m_reURL;
46 BOOL ExportLocations(LPCTSTR file); 48 BOOL ExportLocations(LPCTSTR file);
diff --git a/dipstick.rc b/dipstick.rc
index 55f9fde..8797946 100644
--- a/dipstick.rc
+++ b/dipstick.rc
@@ -84,6 +84,5 @@ BEGIN
84 ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20 84 ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20
85 LTEXT "Dipstick, Version 3.0",IDC_STATIC,40,7,89,8, 85 LTEXT "Dipstick, Version 3.1-trunk",IDC_STATIC,40,7,89,8,SS_NOPREFIX
86 SS_NOPREFIX 86 LTEXT "Copyright © 1996-2005 Klever Group",IDC_STATIC,40,25,
87 LTEXT "Copyright © 1996-2004 Klever Group", 87 166,8
88 IDC_STATIC,40,25,166,8
89 DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP 88 DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP
@@ -96,3 +95,3 @@ EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP |
96 WS_EX_APPWINDOW 95 WS_EX_APPWINDOW
97CAPTION " Dipstick 3.0" 96CAPTION " Dipstick 3.1-trunk"
98FONT 8, "MS Sans Serif", 0, 0, 0x1 97FONT 8, "MS Sans Serif", 0, 0, 0x1
@@ -265,4 +264,4 @@ END
265VS_VERSION_INFO VERSIONINFO 264VS_VERSION_INFO VERSIONINFO
266 FILEVERSION 3,0,0,0 265 FILEVERSION 3,1,0,0
267 PRODUCTVERSION 3,0,0,0 266 PRODUCTVERSION 3,1,0,0
268 FILEFLAGSMASK 0x3fL 267 FILEFLAGSMASK 0x3fL
@@ -283,5 +282,5 @@ BEGIN
283 VALUE "FileDescription", "Dipstick, mirror locator\0" 282 VALUE "FileDescription", "Dipstick, mirror locator\0"
284 VALUE "FileVersion", "3, 0, 0, 0\0" 283 VALUE "FileVersion", "3, 1, 0, 0\0"
285 VALUE "InternalName", "DIPSTICK\0" 284 VALUE "InternalName", "DIPSTICK\0"
286 VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0" 285 VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
287 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" 286 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
@@ -289,3 +288,3 @@ BEGIN
289 VALUE "ProductName", "Dipstick\0" 288 VALUE "ProductName", "Dipstick\0"
290 VALUE "ProductVersion", "3, 0, 0, 0\0" 289 VALUE "ProductVersion", "3, 1, 0, 0\0"
291 END 290 END
@@ -462,3 +461,3 @@ BEGIN
462 IDS_ABEST_TITLE " Dipstick - report" 461 IDS_ABEST_TITLE " Dipstick - report"
463 IDS_DRAGPAD_TITLE " Dipstick 3.0" 462 IDS_DRAGPAD_TITLE " Dipstick 3.1-trunk"
464 IDS_DRAGPAD_URLS " %d/%d URL(s)" 463 IDS_DRAGPAD_URLS " %d/%d URL(s)"
@@ -482,3 +481,3 @@ STRINGTABLE DISCARDABLE
482BEGIN 481BEGIN
483 IDC_DNDTARGET "Dipstick 3.0, click the right mouse button to display main window, left mouse button for menu" 482 IDC_DNDTARGET "Dipstick 3.1-trunk, click the right mouse button to display main window, left mouse button for menu"
484 IDC_HOST "Host name as specified or resolved by Dipstick" 483 IDC_HOST "Host name as specified or resolved by Dipstick"
@@ -539,2 +538,3 @@ BEGIN
539 IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||" 538 IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||"
539 IDS_REGEX_URL "([a-zA-Z]+://)?[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]*)+(/[^ \t\r\n\\f]*)?"
540END 540END
diff --git a/help/dipstick.rtf b/help/dipstick.rtf
index c91b3f4..839d331 100644
--- a/help/dipstick.rtf
+++ b/help/dipstick.rtf
@@ -20,3 +20,3 @@ K{\footnote about}
20{ 20{
21\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1996-2004 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")} 21\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1996-2005 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")}
22\par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 22\par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -33,2 +33,4 @@ ${\footnote What's new}
33{ \f1\fs18\b\sb120 What's New} 33{ \f1\fs18\b\sb120 What's New}
34\par\pard\plain\f1\fs24\qc\cf2\b 3.1 - July 26th, 2005
35\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to parse multiple URLs from plaintext selection
34\par\pard\plain\f1\fs24\qc\cf2\b 3.0 - July 11th, 2004 36\par\pard\plain\f1\fs24\qc\cf2\b 3.0 - July 11th, 2004
diff --git a/help/dipstick.xml b/help/dipstick.xml
index 4754e47..8ed0383 100644
--- a/help/dipstick.xml
+++ b/help/dipstick.xml
@@ -7,3 +7,3 @@
7 <p><b><i>Enjoy!</i></b></p> 7 <p><b><i>Enjoy!</i></b></p>
8 <license years="1996-2004"/> 8 <license years="1996-2005"/>
9 <credits/> 9 <credits/>
@@ -12,2 +12,5 @@
12 <heading scroll="no">What's New</heading> 12 <heading scroll="no">What's New</heading>
13 <newsfor version="3.1" date="July 26th, 2005">
14 <ni>Ability to parse multiple URLs from plaintext selection</ni>
15 </newsfor>
13 <newsfor version="3.0" date="July 11th, 2004"> 16 <newsfor version="3.0" date="July 11th, 2004">
diff --git a/install/install.cpp b/install/install.cpp
index 296f3a3..1d91bc2 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -5,3 +5,3 @@
5#define KINSHORT KINNAME 5#define KINSHORT KINNAME
6#define VERSION "3.0" 6#define VERSION "3.1-trunk"
7 7
diff --git a/install/install.rc b/install/install.rc
index 016c554..2bdee9c 100644
--- a/install/install.rc
+++ b/install/install.rc
@@ -133,4 +133,4 @@ IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico
133VS_VERSION_INFO VERSIONINFO 133VS_VERSION_INFO VERSIONINFO
134 FILEVERSION 3,0,0,0 134 FILEVERSION 3,1,0,0
135 PRODUCTVERSION 3,0,0,0 135 PRODUCTVERSION 3,1,0,0
136 FILEFLAGSMASK 0x3fL 136 FILEFLAGSMASK 0x3fL
@@ -151,5 +151,5 @@ BEGIN
151 VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0" 151 VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0"
152 VALUE "FileVersion", "3, 0, 0, 0\0" 152 VALUE "FileVersion", "3, 1, 0, 0\0"
153 VALUE "InternalName", "INSTALL\0" 153 VALUE "InternalName", "INSTALL\0"
154 VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0" 154 VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
155 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" 155 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
@@ -157,3 +157,3 @@ BEGIN
157 VALUE "ProductName", "Dipstick\0" 157 VALUE "ProductName", "Dipstick\0"
158 VALUE "ProductVersion", "3, 0, 0, 0\0" 158 VALUE "ProductVersion", "3, 1, 0, 0\0"
159 END 159 END
diff --git a/resource.h b/resource.h
index 2af32cb..2f7b81e 100644
--- a/resource.h
+++ b/resource.h
@@ -21,2 +21,3 @@
21#define IDS_CSVFILTER 112 21#define IDS_CSVFILTER 112
22#define IDS_REGEX_URL 113
22#define IDR_MAINFRAME 128 23#define IDR_MAINFRAME 128
diff --git a/stdafx.h b/stdafx.h
index 06ef43f..ed0fe4e 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -31,3 +31,4 @@ enum {
31 WM_DNP_UPDATEHOSTDATA, 31 WM_DNP_UPDATEHOSTDATA,
32 WM_DNP_HTML 32 WM_DNP_HTML,
33 WM_DNP_URLSPING
33}; 34};