author | Michael Krelin <hacker@klever.net> | 2005-07-25 22:45:28 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-07-25 22:45:28 (UTC) |
commit | d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee (patch) (unidiff) | |
tree | 1b5ddc636cee876fac8e90eb78ca3546a1a631b1 | |
parent | 10639b71121a3fe7de24fe141d8dbe399fa283ff (diff) | |
download | dipstick-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
-rw-r--r-- | COPYING | 2 | ||||
-rw-r--r-- | DipstickDlg.cpp | 62 | ||||
-rw-r--r-- | DipstickDlg.h | 2 | ||||
-rw-r--r-- | dipstick.rc | 24 | ||||
-rw-r--r-- | help/dipstick.rtf | 4 | ||||
-rw-r--r-- | help/dipstick.xml | 5 | ||||
-rw-r--r-- | install/install.cpp | 2 | ||||
-rw-r--r-- | install/install.rc | 10 | ||||
-rw-r--r-- | resource.h | 1 | ||||
-rw-r--r-- | stdafx.h | 3 |
10 files changed, 83 insertions, 32 deletions
@@ -1,3 +1,3 @@ | |||
1 | Copyright (c) 1996-2004 Klever Group (http://www.klever.net/) | 1 | Copyright (c) 1996-2005 Klever Group (http://www.klever.net/) |
2 | 2 | ||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of |
diff --git a/DipstickDlg.cpp b/DipstickDlg.cpp index ace2aff..f27b219 100644 --- a/DipstickDlg.cpp +++ b/DipstickDlg.cpp | |||
@@ -106,4 +106,6 @@ CString tmp; | |||
106 | VERIFY(tmp.LoadString(IDS_REGEX_HTMLURL)); | 106 | VERIFY(tmp.LoadString(IDS_REGEX_HTMLURL)); |
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 | } |
109 | 111 | ||
@@ -136,4 +138,5 @@ BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog) | |||
136 | ON_WM_DESTROY() | 138 | ON_WM_DESTROY() |
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) |
139 | ON_MESSAGE(WM_DNP_ACTIVITYCOUNT, OnActivityCount) | 142 | ON_MESSAGE(WM_DNP_ACTIVITYCOUNT, OnActivityCount) |
@@ -1186,4 +1189,5 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format"); | |||
1186 | }else{ | 1189 | }else{ |
1187 | PostMessage(WM_DNP_HTML,0,(LPARAM)xf); | 1190 | PostMessage(WM_DNP_HTML,0,(LPARAM)xf); |
1191 | rv = TRUE; | ||
1188 | } | 1192 | } |
1189 | }while(FALSE); | 1193 | }while(FALSE); |
@@ -1211,14 +1215,26 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format"); | |||
1211 | } | 1215 | } |
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 | } |
1224 | return FALSE; | 1240 | return FALSE; |
@@ -1258,4 +1274,30 @@ CSelectURLsDlg su; | |||
1258 | } | 1274 | } |
1259 | 1275 | ||
1276 | LRESULT CDipstickDlg::OnURLSPing(WPARAM wP,LPARAM lP) | ||
1277 | { | ||
1278 | CString *sel = (CString*)lP; | ||
1279 | TRACE1("URLS: %s\n",(LPCTSTR)*sel); | ||
1280 | CSelectURLsDlg 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 | |||
1260 | UINT CPingyHost::PingProc(LPVOID pParam) | 1302 | UINT CPingyHost::PingProc(LPVOID pParam) |
1261 | { | 1303 | { |
@@ -1584,3 +1626,3 @@ CSingleLock sl(&pThis->m_mutex); | |||
1584 | delete pThis; | 1626 | delete pThis; |
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 | |||
@@ -44,4 +44,6 @@ class CDipstickDlg : public CDialog | |||
44 | }; | 44 | }; |
45 | public: | 45 | public: |
46 | LRESULT OnURLSPing(WPARAM wP,LPARAM lP); | ||
47 | CRegEx m_reURL; | ||
46 | BOOL ExportLocations(LPCTSTR file); | 48 | BOOL ExportLocations(LPCTSTR file); |
47 | CString m_impexPath; | 49 | CString m_impexPath; |
diff --git a/dipstick.rc b/dipstick.rc index 55f9fde..8797946 100644 --- a/dipstick.rc +++ b/dipstick.rc | |||
@@ -83,8 +83,7 @@ FONT 8, "MS Sans Serif" | |||
83 | BEGIN | 83 | 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 |
90 | PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,40,40,91,14 | 89 | PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,40,40,91,14 |
@@ -95,5 +94,5 @@ STYLE DS_3DLOOK | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | |||
95 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP | | 94 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP | |
96 | WS_EX_APPWINDOW | 95 | WS_EX_APPWINDOW |
97 | CAPTION " Dipstick 3.0" | 96 | CAPTION " Dipstick 3.1-trunk" |
98 | FONT 8, "MS Sans Serif", 0, 0, 0x1 | 97 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
99 | BEGIN | 98 | BEGIN |
@@ -264,6 +263,6 @@ END | |||
264 | 263 | ||
265 | VS_VERSION_INFO VERSIONINFO | 264 | VS_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 |
269 | #ifdef _DEBUG | 268 | #ifdef _DEBUG |
@@ -282,11 +281,11 @@ BEGIN | |||
282 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" | 281 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" |
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" |
288 | VALUE "OriginalFilename", "DIPSTICK.EXE\0" | 287 | VALUE "OriginalFilename", "DIPSTICK.EXE\0" |
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 |
292 | END | 291 | END |
@@ -461,5 +460,5 @@ BEGIN | |||
461 | IDS_ABEST_NONEFOUND "No reachable locations were found." | 460 | IDS_ABEST_NONEFOUND "No reachable locations were found." |
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)" |
465 | IDS_REGEX_HTMLURL "<A[^[:alpha:]][^>]*href[[:space:]]*=[[:space:]]*""?([^[:space:]>""]+)""?[^>]*>" | 464 | IDS_REGEX_HTMLURL "<A[^[:alpha:]][^>]*href[[:space:]]*=[[:space:]]*""?([^[:space:]>""]+)""?[^>]*>" |
@@ -481,5 +480,5 @@ END | |||
481 | STRINGTABLE DISCARDABLE | 480 | STRINGTABLE DISCARDABLE |
482 | BEGIN | 481 | BEGIN |
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" |
485 | END | 484 | END |
@@ -538,4 +537,5 @@ STRINGTABLE DISCARDABLE | |||
538 | BEGIN | 537 | 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]*)?" | ||
540 | END | 540 | END |
541 | 541 | ||
diff --git a/help/dipstick.rtf b/help/dipstick.rtf index c91b3f4..839d331 100644 --- a/help/dipstick.rtf +++ b/help/dipstick.rtf | |||
@@ -19,5 +19,5 @@ K{\footnote about} | |||
19 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}} | 19 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}} |
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: |
23 | \par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | 23 | \par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
@@ -32,4 +32,6 @@ K{\footnote about} | |||
32 | ${\footnote What's new} | 32 | ${\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 |
35 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source. | 37 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source. |
diff --git a/help/dipstick.xml b/help/dipstick.xml index 4754e47..8ed0383 100644 --- a/help/dipstick.xml +++ b/help/dipstick.xml | |||
@@ -6,9 +6,12 @@ | |||
6 | <p/> | 6 | <p/> |
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/> |
10 | </topic> | 10 | </topic> |
11 | <topic id="News" title="What's new"> | 11 | <topic id="News" title="What's new"> |
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"> |
14 | <ni>Change of <a href="#About">license</a> and opening the source.</ni> | 17 | <ni>Change of <a href="#About">license</a> and opening the source.</ni> |
diff --git a/install/install.cpp b/install/install.cpp index 296f3a3..1d91bc2 100644 --- a/install/install.cpp +++ b/install/install.cpp | |||
@@ -4,5 +4,5 @@ | |||
4 | #define KINNAME "Dipstick" | 4 | #define KINNAME "Dipstick" |
5 | #define KINSHORT KINNAME | 5 | #define KINSHORT KINNAME |
6 | #define VERSION "3.0" | 6 | #define VERSION "3.1-trunk" |
7 | 7 | ||
8 | BOOL Install(void) | 8 | BOOL Install(void) |
diff --git a/install/install.rc b/install/install.rc index 016c554..2bdee9c 100644 --- a/install/install.rc +++ b/install/install.rc | |||
@@ -132,6 +132,6 @@ IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico | |||
132 | 132 | ||
133 | VS_VERSION_INFO VERSIONINFO | 133 | VS_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 |
137 | #ifdef _DEBUG | 137 | #ifdef _DEBUG |
@@ -150,11 +150,11 @@ BEGIN | |||
150 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" | 150 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" |
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" |
156 | VALUE "OriginalFilename", "INSTALL.EXE\0" | 156 | VALUE "OriginalFilename", "INSTALL.EXE\0" |
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 |
160 | END | 160 | END |
@@ -20,4 +20,5 @@ | |||
20 | #define IDS_REGEX_HTMLURL 111 | 20 | #define IDS_REGEX_HTMLURL 111 |
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 |
23 | #define IDD_DRAGPAD 129 | 24 | #define IDD_DRAGPAD 129 |
@@ -30,5 +30,6 @@ enum { | |||
30 | WM_DNP_URLPING, | 30 | WM_DNP_URLPING, |
31 | WM_DNP_UPDATEHOSTDATA, | 31 | WM_DNP_UPDATEHOSTDATA, |
32 | WM_DNP_HTML | 32 | WM_DNP_HTML, |
33 | WM_DNP_URLSPING | ||
33 | }; | 34 | }; |
34 | #include <MMSystem.h> | 35 | #include <MMSystem.h> |