diff options
author | René Schümann <white06tiger@gmail.com> | 2014-08-21 11:42:41 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-08-21 11:42:41 +0000 |
commit | 572b645362aff573399cf65a5faa735415d1ab65 (patch) | |
tree | ce1e551f65fd71bf0500c01b133d8956d4e7e5d3 /plugins | |
parent | 2ae4a360da9638ecaaa68bbb683187ef8e1faf35 (diff) |
IEHistory: v0.0.1.6
* improved IDC_IEVIEW_PLACEHOLDER control
- removed border around IEView control to fit entire window
* improved name of system history dialog (IEView still doesn't show all events.. so it's mostly useless)
+ added ability to focus and bring to top old history window if it were already open
git-svn-id: http://svn.miranda-ng.org/main/trunk@10254 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/IEHistory/res/IEHistory.rc | 2 | ||||
-rw-r--r-- | plugins/IEHistory/src/dlgHandlers.cpp | 27 | ||||
-rw-r--r-- | plugins/IEHistory/src/services.cpp | 3 | ||||
-rw-r--r-- | plugins/IEHistory/src/version.h | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/plugins/IEHistory/res/IEHistory.rc b/plugins/IEHistory/res/IEHistory.rc index 0ebfd2b760..e617080feb 100644 --- a/plugins/IEHistory/res/IEHistory.rc +++ b/plugins/IEHistory/res/IEHistory.rc @@ -59,7 +59,7 @@ CAPTION "Dialog" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN PUSHBUTTON "Close",IDC_CLOSE,362,283,50,14 - CONTROL "",IDC_IEVIEW_PLACEHOLDER,"Static",SS_BLACKFRAME,4,4,408,275,WS_EX_TRANSPARENT + LTEXT "",IDC_IEVIEW_PLACEHOLDER,0,0,416,282,NOT WS_VISIBLE PUSHBUTTON "&Prev",IDC_PREV,4,283,50,14 PUSHBUTTON "&Next",IDC_NEXT,58,283,50,14 PUSHBUTTON "&Search",IDC_SEARCH,310,283,50,14 diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp index 3f44cac49a..abc185cac5 100644 --- a/plugins/IEHistory/src/dlgHandlers.cpp +++ b/plugins/IEHistory/src/dlgHandlers.cpp @@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "math.h" #include <commctrl.h> -#define GAP_SIZE 2 +//#define GAP_SIZE 2 +#define GAP_SIZE 0 #define MIN_HISTORY_WIDTH 350 #define MIN_HISTORY_HEIGHT 100 @@ -45,24 +46,30 @@ int ScrollToBottom(HWND hWnd); void RefreshButtonStates(HWND hWnd); -HANDLE GetNeededEvent(HANDLE hLastFirstEvent, int index, int direction); +HANDLE GetNeededEvent(HANDLE hLastFirstEvent, int num, int direction); int CalcIEViewPos(IEVIEWWINDOW *ieWnd, HWND hMainWindow) { RECT rect; - GetWindowRect(GetDlgItem(hMainWindow, IDC_IEVIEW_PLACEHOLDER), &rect); - ScreenToClient(hMainWindow, &rect); - - ieWnd->x = rect.left + GAP_SIZE; - ieWnd->y = rect.top + GAP_SIZE; - ieWnd->cx = rect.right - rect.left - (2 * GAP_SIZE); - ieWnd->cy = rect.bottom - rect.top - (2 * GAP_SIZE); + GetWindowRect(GetDlgItem(hMainWindow,IDC_IEVIEW_PLACEHOLDER), &rect); + rect.right-=rect.left; rect.bottom-=rect.top; + ScreenToClient(hMainWindow, (POINT*)&rect); + + /// @todo : find out why -1/+1 is required... or why IEView uses a border... + ieWnd->x = -1+rect.left + GAP_SIZE; + ieWnd->y = -1+rect.top + GAP_SIZE; + ieWnd->cx = 2+rect.right - (2 * GAP_SIZE); + ieWnd->cy = 2+rect.bottom - (2 * GAP_SIZE); return 0; } void LoadName(HWND hWnd) { HistoryWindowData *data = (HistoryWindowData *) GetWindowLongPtr(hWnd, DWLP_USER); + if(!data->contact){ + SetWindowText(hWnd, TranslateT("System History")); + return; + } TCHAR *szOther = GetContactName(data->contact); TCHAR buffer[1024]; sntprintf(buffer, 1024, _T("'%s' - IEHistory"), szOther); @@ -82,8 +89,6 @@ int LoadIEView(HWND hWnd) CallService(MS_IEVIEW_WINDOW, 0, (LPARAM) &ieWnd); HistoryWindowData *data = (HistoryWindowData *) GetWindowLongPtr(hWnd, DWLP_USER); data->hIEView = ieWnd.hwnd; - SetWindowPos(GetDlgItem(hWnd, IDC_IEVIEW_PLACEHOLDER), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); - //ShowWindow(GetDlgItem(hWnd, IDC_IEVIEW_PLACEHOLDER), SW_HIDE); return 0; } diff --git a/plugins/IEHistory/src/services.cpp b/plugins/IEHistory/src/services.cpp index 0cbd957e0a..75d16a6e1d 100644 --- a/plugins/IEHistory/src/services.cpp +++ b/plugins/IEHistory/src/services.cpp @@ -55,7 +55,8 @@ INT_PTR ShowContactHistoryService(WPARAM wParam, LPARAM lParam) SetWindowLongPtr(historyDlg, DWLP_USER, (LONG_PTR)data); WindowList_Add(hOpenWindowsList, historyDlg, (MCONTACT) wParam); - } + }else + SetForegroundWindow(historyDlg); ShowWindow(historyDlg, SW_SHOWNORMAL); return 0; } diff --git a/plugins/IEHistory/src/version.h b/plugins/IEHistory/src/version.h index a9f8e10311..2a080a1a15 100644 --- a/plugins/IEHistory/src/version.h +++ b/plugins/IEHistory/src/version.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __MAJOR_VERSION 0 #define __MINOR_VERSION 0 #define __RELEASE_NUM 1 -#define __BUILD_NUM 5 +#define __BUILD_NUM 6 #include <stdver.h> |