summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2014-12-26 19:05:09 +0000
committerRené Schümann <white06tiger@gmail.com>2014-12-26 19:05:09 +0000
commit710cc48c0b1c10edb78371e927873b4ddca72227 (patch)
treee442ca6f0c6c968e95d85499443ad8ade07cf6bc
parentd006d3d185bee123128899f9065c2412f5fe65a8 (diff)
SendSS:
+ added changelog to about screen, misc improvements ! fixed bug in resource loading of "about" and "copyright" text git-svn-id: http://svn.miranda-ng.org/main/trunk@11648 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/SendScreenshotPlus/docs/credits.txt40
-rw-r--r--plugins/SendScreenshotPlus/res/resource.rc14
-rw-r--r--plugins/SendScreenshotPlus/src/UAboutForm.cpp92
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/version.h2
5 files changed, 93 insertions, 57 deletions
diff --git a/plugins/SendScreenshotPlus/docs/credits.txt b/plugins/SendScreenshotPlus/docs/credits.txt
index 006c3db1f1..b78dc6b8da 100644
--- a/plugins/SendScreenshotPlus/docs/credits.txt
+++ b/plugins/SendScreenshotPlus/docs/credits.txt
@@ -3,8 +3,44 @@ for helping me with 1001 tips and suggestions
to design the program code.
http://www-user.tu-chemnitz.de/~kunmi/?dbx_tree&lang=de
-Thanks to the "UserinfoEx" programmers group
+Thanks to the "UserInfoEx" programmers group
for the nice button class code.
http://code.google.com/p/userinfoex/
-and special thanks to all beta-testers... \ No newline at end of file
+and special thanks to all beta-testers...
+
+
+Changelog:
+ 0.8.9 - 12/25/2014 (Xmas update)
++ changelog
+! fixed multi-monitor screen captures
+! fixed problems with UAC and window targeting
+* tuned user interface a bit
+* finalized basic editor support (Miranda no longer hangs :P)
+! fixed deletion of local files regarding editor
++ ESC now closes capture dialog as well as about dialog
+NOTE: this version changed the way icons are used, Iconpacks require update accordingly
+
+ 0.8.7 - 07/01/2014
+* improved window highlighter/finder, now stops at top-level windows and not at last owner, hold SHIFT/ALT to target childs
++ indirect capture option added for compatibility reasons (and our buggy capture implementation :P)
+* very basic editor support using default editor for selected file type (eg. paint)
+
+ 0.8.6 - 06/29/2014
++ imgur.com support added
+! fixed capture regression
+
+ 0.8.5 - 06/07/2014
++ new local file upload with Drag&Drop support
++ "Upload Pie" support added (stores files temporarily)
++ Dropbox support added (using Miranda Dropbox plugin)
++ added new "result window" when SendSS is called from main menu to easily get image links for misc. use
+* some icons improved
+
+ 0.8.3 - 11/17/2013
++ added basic hotkey support
++ new window highlighter/finder, hold SHIFT/ALT to target childs/controls
++ new target icon
+* faster window targeting
+
+ older NG and non NG versions
diff --git a/plugins/SendScreenshotPlus/res/resource.rc b/plugins/SendScreenshotPlus/res/resource.rc
index 8b48e82e0b..fac296540f 100644
--- a/plugins/SendScreenshotPlus/res/resource.rc
+++ b/plugins/SendScreenshotPlus/res/resource.rc
@@ -76,18 +76,18 @@ BEGIN
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,139,231,1
END
-IDD_UAboutForm DIALOGEX 0, 0, 214, 185
+IDD_UAboutForm DIALOGEX 0, 0, 240, 185
STYLE DS_3DLOOK | DS_CENTER | DS_SHELLFONT | WS_CAPTION | WS_MINIMIZEBOX | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_APPWINDOW
CAPTION "About"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "%s\nv%s",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,214,25
- CONTROL "Credits >",IDA_CONTRIBLINK,"UInfoButtonClass",WS_TABSTOP,5,166,61,14,WS_EX_NOACTIVATE | 0x10000000L
- PUSHBUTTON "&Close",IDA_btnClose,149,166,60,14
- EDITTEXT IDC_LICENSE,5,27,204,131,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
- EDITTEXT IDC_CREDIT,5,27,204,131,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,160,213,1
+ DEFPUSHBUTTON "Copyright",IDA_CONTRIBLINK,5,166,61,14
+ PUSHBUTTON "&Close",IDA_btnClose,175,166,60,14
+ CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,240,25
+ EDITTEXT IDC_LICENSE,0,25,240,135,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
+ EDITTEXT IDC_CREDIT,0,25,240,135,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL | WS_HSCROLL
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,160,242,1
END
IDD_UEditForm DIALOGEX 217, 152, 329, 285
diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
index 6b64f50203..ddb97052ac 100644
--- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
@@ -87,48 +87,39 @@ INT_PTR CALLBACK TfrmAbout::DlgTfrmAbout(HWND hWnd, UINT msg, WPARAM wParam, LPA
//---------------------------------------------------------------------------
//WM_INITDIALOG:
LRESULT TfrmAbout::wmInitdialog(WPARAM wParam, LPARAM lParam) {
- char* pszMsg = NULL;
- HRSRC hResInfo;
- DWORD ResSize;
- TCHAR oldTitle[256], newTitle[256];
- TCHAR* temp;
- TCHAR* pszTitle = NULL;
// Headerbar
- TCHAR* pszPlug = mir_a2t(__PLUGIN_NAME);
- TCHAR* pszVer = mir_a2t(__VERSION_STRING_DOTS);
- GetDlgItemText( m_hWnd, IDC_HEADERBAR, oldTitle, SIZEOF( oldTitle ));
- mir_sntprintf( newTitle, SIZEOF(newTitle), oldTitle, pszPlug, pszVer );
- mir_free(pszPlug);
- mir_free(pszVer);
- SetDlgItemText( m_hWnd, IDC_HEADERBAR, newTitle );
SendDlgItemMessage(m_hWnd, IDC_HEADERBAR, WM_SETICON, ICON_BIG, (LPARAM)GetIcon(ICO_MAIN));
//License
- { mir_tcsadd(pszTitle ,_T(__COPYRIGHT));
- mir_tcsadd(pszTitle ,_T("\r\n\r\n"));
-
- hResInfo = FindResource(g_hSendSS,MAKEINTRESOURCE(IDR_LICENSE),_T("TEXT"));
- ResSize = SizeofResource(g_hSendSS,hResInfo);
- pszMsg = (char*)LockResource(LoadResource(g_hSendSS,hResInfo));
- temp = mir_a2t(pszMsg);
- temp [ResSize] = 0; //LockResource is not NULL terminatet !!
- mir_tcsadd(pszTitle ,temp);
- mir_free(temp);
- SetDlgItemText(m_hWnd,IDC_LICENSE, pszTitle);
- mir_freeAndNil(pszTitle);
+ {
+ TCHAR* pszText = NULL;
+ mir_tcsadd(pszText, _T(__COPYRIGHT));
+ mir_tcsadd(pszText, _T("\r\n\r\n"));
+
+ HRSRC hRes = FindResource(g_hSendSS,MAKEINTRESOURCE(IDR_LICENSE),_T("TEXT"));
+ DWORD size = SizeofResource(g_hSendSS,hRes);
+ char* data = (char*)mir_alloc(size+1);
+ memcpy(data,LockResource(LoadResource(g_hSendSS,hRes)),size);
+ data[size] = '\0';
+ TCHAR* pszCopyright = mir_a2t(data);
+ mir_free(data);
+ mir_tcsadd(pszText, pszCopyright);
+ mir_free(pszCopyright);
+ SetDlgItemText(m_hWnd,IDC_LICENSE, pszText);
+ mir_free(pszText);
}
//Credit
{
- hResInfo = FindResource(g_hSendSS,MAKEINTRESOURCE(IDR_CREDIT),_T("TEXT"));
- ResSize = SizeofResource(g_hSendSS,hResInfo);
- pszMsg = (char*)LockResource(LoadResource(g_hSendSS,hResInfo));
- temp = mir_a2t(pszMsg);
- temp [ResSize] = 0; //LockResource is not NULL terminatet !!
- mir_tcsadd(pszTitle ,temp);
- mir_free(temp);
- SetDlgItemText(m_hWnd,IDC_CREDIT, pszTitle);
- mir_freeAndNil(pszTitle);
+ HRSRC hRes = FindResource(g_hSendSS,MAKEINTRESOURCE(IDR_CREDIT),_T("TEXT"));
+ DWORD size = SizeofResource(g_hSendSS,hRes);
+ char* data = (char*)mir_alloc(size+1);
+ memcpy(data,LockResource(LoadResource(g_hSendSS,hRes)),size);
+ data[size] = '\0';
+ TCHAR* pszText = mir_a2t(data);
+ mir_free(data);
+ SetDlgItemText(m_hWnd,IDC_CREDIT, pszText);
+ mir_free(pszText);
}
SendMessage(m_hWnd, WM_SETICON, ICON_BIG, (LPARAM)GetIcon(ICO_MAIN));
@@ -136,7 +127,6 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM wParam, LPARAM lParam) {
//init controls
btnPageClick();
- SendDlgItemMessage(m_hWnd, IDA_CONTRIBLINK, BUTTONSETDEFAULT, 1, NULL);
TranslateDialogDefault(m_hWnd);
return FALSE;
@@ -154,7 +144,7 @@ LRESULT TfrmAbout::wmCommand(WPARAM wParam, LPARAM lParam) {
Close();
break;
case IDA_CONTRIBLINK:
- m_Page = m_Page ? 0 : 1;
+ m_Page = !m_Page;
btnPageClick();
break;
default:
@@ -190,20 +180,30 @@ TfrmAbout::~TfrmAbout() {
//---------------------------------------------------------------------------
void TfrmAbout::btnPageClick() {
HWND hCtrl = GetDlgItem(m_hWnd, IDA_CONTRIBLINK);
+ const TCHAR* credits=TranslateT("Credits");
+ const TCHAR* copyright=TranslateT("Copyright");
+ const TCHAR* title;
+ const TCHAR* button;
if(!m_Page) {
ShowWindow(GetDlgItem(m_hWnd, IDC_CREDIT), SW_HIDE);
ShowWindow(GetDlgItem(m_hWnd, IDC_LICENSE), SW_SHOW);
- SendDlgItemMessage(m_hWnd, IDA_CONTRIBLINK, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Credits >"), MBBF_TCHAR);
- HICON hIcon = GetIconBtn(ICO_BTN_ARROWR);
- SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? TranslateT("Credits") : TranslateT("Credits >"));
- }
- else {
+ SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIconBtn(ICO_BTN_ARROWR));
+ title=copyright;
+ button=credits;
+ } else {
ShowWindow(GetDlgItem(m_hWnd, IDC_CREDIT), SW_SHOW);
ShowWindow(GetDlgItem(m_hWnd, IDC_LICENSE), SW_HIDE);
- SendDlgItemMessage(m_hWnd, IDA_CONTRIBLINK, BUTTONADDTOOLTIP, (WPARAM)TranslateT("< Copyright"), MBBF_TCHAR);
- HICON hIcon = GetIconBtn(ICO_BTN_ARROWL);
- SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? TranslateT("Copyright") : TranslateT("< Copyright"));
+ SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIconBtn(ICO_BTN_ARROWL));
+ title=credits;
+ button=copyright;
}
+ SetWindowText(hCtrl, button);
+ TCHAR newTitle[128];
+ TCHAR* pszPlug = mir_a2t(__PLUGIN_NAME);
+ TCHAR* pszVer = mir_a2t(__VERSION_STRING_DOTS);
+ mir_sntprintf(newTitle,SIZEOF(newTitle), _T("%s - %s\nv%s"), pszPlug, title , pszVer);
+ mir_free(pszPlug);
+ mir_free(pszVer);
+ SetDlgItemText(m_hWnd, IDC_HEADERBAR, newTitle);
+ InvalidateRect(GetDlgItem(m_hWnd,IDC_HEADERBAR),NULL,1);
}
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index b62ebb58d3..9be05d660e 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -361,7 +361,7 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) {
}
if (hCtrl = GetDlgItem(m_hWnd, ID_btnCapture)) {
- SendDlgItemMessage(m_hWnd, ID_btnCapture, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Capture"), MBBF_TCHAR);
+ SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Capture"), MBBF_TCHAR);
HICON hIcon = GetIconBtn(ICO_BTN_OK);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
SetWindowText(hCtrl, TranslateT("&Capture"));
diff --git a/plugins/SendScreenshotPlus/src/version.h b/plugins/SendScreenshotPlus/src/version.h
index cea87e90ff..48e45d8caf 100644
--- a/plugins/SendScreenshotPlus/src/version.h
+++ b/plugins/SendScreenshotPlus/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 8
#define __RELEASE_NUM 9
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>