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) (side-by-side diff)
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) (show whitespace changes)
-rw-r--r--COPYING2
-rw-r--r--DipstickDlg.cpp48
-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, 76 insertions, 25 deletions
diff --git a/COPYING b/COPYING
index 427b0ba..fa23ff9 100644
--- a/COPYING
+++ b/COPYING
@@ -1,2 +1,2 @@
-Copyright (c) 1996-2004 Klever Group (http://www.klever.net/)
+Copyright (c) 1996-2005 Klever Group (http://www.klever.net/)
diff --git a/DipstickDlg.cpp b/DipstickDlg.cpp
index ace2aff..f27b219 100644
--- a/DipstickDlg.cpp
+++ b/DipstickDlg.cpp
@@ -107,2 +107,4 @@ CString tmp;
VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
+ VERIFY(tmp.LoadString(IDS_REGEX_URL));
+ VERIFY(m_reURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
}
@@ -137,2 +139,3 @@ BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog)
ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
+ ON_MESSAGE(WM_DNP_URLSPING, OnURLSPing)
ON_MESSAGE(WM_DNP_URLPING, OnUrlPing)
@@ -1187,2 +1190,3 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
PostMessage(WM_DNP_HTML,0,(LPARAM)xf);
+ rv = TRUE;
}
@@ -1212,3 +1216,3 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
if(pDO->IsDataAvailable(CF_TEXT)){
- if(!bTestOnly){
+ BOOL rv = FALSE;
HGLOBAL hg = pDO->GetGlobalData(CF_TEXT);
@@ -1217,7 +1221,19 @@ UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
ASSERT(lpv);
+ if(bTestOnly){
+ rv = m_reURL.Match((LPCSTR)lpv);
+ }else{
+ CString sel = (LPCSTR)lpv;
+ if(m_reURL.Match(sel)) {
+ rv = TRUE;
+ CString tmp = m_reURL.GetMatch(CRegEx::matchPostMatch);
+ if(m_reURL.Match(tmp)) {
+ PostMessage(WM_DNP_URLSPING,0,(LPARAM)new CString((LPCSTR)lpv));
+ }else{
PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
+ }
+ }
+ }
GlobalUnlock(hg);
GlobalFree(hg);
- }
- return TRUE;
+ return rv;
}
@@ -1259,2 +1275,28 @@ CSelectURLsDlg su;
+LRESULT CDipstickDlg::OnURLSPing(WPARAM wP,LPARAM lP)
+{
+CString *sel = (CString*)lP;
+TRACE1("URLS: %s\n",(LPCTSTR)*sel);
+CSelectURLsDlg su;
+ su.m_bAdjust = m_bSmartAdjust;
+ su.m_bAdjustInnermost = m_bAdjustInnermost;
+ BeginWaitCursor();
+ while(m_reURL.Match(*sel)){
+ CString url = m_reURL.GetMatch(CRegEx::matchMatch);
+ (*sel) = m_reURL.GetMatch(CRegEx::matchPostMatch);
+ if(!su.m_URLs.Find(url))
+ VERIFY(su.m_URLs.AddTail(url));
+ }
+ EndWaitCursor();
+ delete sel;
+ if(su.DoModal()==IDOK){
+ POSITION p = su.m_URLs.GetHeadPosition();
+ while(p){
+ CString url = su.m_URLs.GetNext(p);
+ PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
+ }
+ }
+ return 0;
+}
+
UINT CPingyHost::PingProc(LPVOID pParam)
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
public:
+ LRESULT OnURLSPing(WPARAM wP,LPARAM lP);
+ CRegEx m_reURL;
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
ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20
- LTEXT "Dipstick, Version 3.0",IDC_STATIC,40,7,89,8,
- SS_NOPREFIX
- LTEXT "Copyright © 1996-2004 Klever Group",
- IDC_STATIC,40,25,166,8
+ LTEXT "Dipstick, Version 3.1-trunk",IDC_STATIC,40,7,89,8,SS_NOPREFIX
+ LTEXT "Copyright © 1996-2005 Klever Group",IDC_STATIC,40,25,
+ 166,8
DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP
@@ -96,3 +95,3 @@ EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP |
WS_EX_APPWINDOW
-CAPTION " Dipstick 3.0"
+CAPTION " Dipstick 3.1-trunk"
FONT 8, "MS Sans Serif", 0, 0, 0x1
@@ -265,4 +264,4 @@ END
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
FILEFLAGSMASK 0x3fL
@@ -283,5 +282,5 @@ BEGIN
VALUE "FileDescription", "Dipstick, mirror locator\0"
- VALUE "FileVersion", "3, 0, 0, 0\0"
+ VALUE "FileVersion", "3, 1, 0, 0\0"
VALUE "InternalName", "DIPSTICK\0"
- VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0"
+ VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
@@ -289,3 +288,3 @@ BEGIN
VALUE "ProductName", "Dipstick\0"
- VALUE "ProductVersion", "3, 0, 0, 0\0"
+ VALUE "ProductVersion", "3, 1, 0, 0\0"
END
@@ -462,3 +461,3 @@ BEGIN
IDS_ABEST_TITLE " Dipstick - report"
- IDS_DRAGPAD_TITLE " Dipstick 3.0"
+ IDS_DRAGPAD_TITLE " Dipstick 3.1-trunk"
IDS_DRAGPAD_URLS " %d/%d URL(s)"
@@ -482,3 +481,3 @@ STRINGTABLE DISCARDABLE
BEGIN
- IDC_DNDTARGET "Dipstick 3.0, click the right mouse button to display main window, left mouse button for menu"
+ IDC_DNDTARGET "Dipstick 3.1-trunk, click the right mouse button to display main window, left mouse button for menu"
IDC_HOST "Host name as specified or resolved by Dipstick"
@@ -539,2 +538,3 @@ BEGIN
IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||"
+ IDS_REGEX_URL "([a-zA-Z]+://)?[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]*)+(/[^ \t\r\n\\f]*)?"
END
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}
{
-\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/")}
+\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/")}
\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}
{ \f1\fs18\b\sb120 What's New}
+\par\pard\plain\f1\fs24\qc\cf2\b 3.1 - July 26th, 2005
+\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to parse multiple URLs from plaintext selection
\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 @@
<p><b><i>Enjoy!</i></b></p>
- <license years="1996-2004"/>
+ <license years="1996-2005"/>
<credits/>
@@ -12,2 +12,5 @@
<heading scroll="no">What's New</heading>
+ <newsfor version="3.1" date="July 26th, 2005">
+ <ni>Ability to parse multiple URLs from plaintext selection</ni>
+ </newsfor>
<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 @@
#define KINSHORT KINNAME
-#define VERSION "3.0"
+#define VERSION "3.1-trunk"
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
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
FILEFLAGSMASK 0x3fL
@@ -151,5 +151,5 @@ BEGIN
VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0"
- VALUE "FileVersion", "3, 0, 0, 0\0"
+ VALUE "FileVersion", "3, 1, 0, 0\0"
VALUE "InternalName", "INSTALL\0"
- VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0"
+ VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
@@ -157,3 +157,3 @@ BEGIN
VALUE "ProductName", "Dipstick\0"
- VALUE "ProductVersion", "3, 0, 0, 0\0"
+ VALUE "ProductVersion", "3, 1, 0, 0\0"
END
diff --git a/resource.h b/resource.h
index 2af32cb..2f7b81e 100644
--- a/resource.h
+++ b/resource.h
@@ -21,2 +21,3 @@
#define IDS_CSVFILTER 112
+#define IDS_REGEX_URL 113
#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 {
WM_DNP_UPDATEHOSTDATA,
- WM_DNP_HTML
+ WM_DNP_HTML,
+ WM_DNP_URLSPING
};