diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-21 23:14:20 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-21 23:14:20 +0000 |
commit | 6dfc36b35413c01e861ea75cfc8a3aa489c91c3c (patch) | |
tree | 1f9720e87938ccbe1186c18c322cf4c4bd045852 | |
parent | f594701e3387db38e768b122ec5a93fcf8a3b9d1 (diff) |
close tabs in reverse order (for e.g. 'last contact')
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@53 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | justtabs/justtabs.cpp | 2 | ||||
-rw-r--r-- | justtabs/win.cpp | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/justtabs/justtabs.cpp b/justtabs/justtabs.cpp index 7f266b4..6b76e8d 100644 --- a/justtabs/justtabs.cpp +++ b/justtabs/justtabs.cpp @@ -21,7 +21,7 @@ typedef LRESULT (CALLBACK *WNDPROC)(HWND, UINT, WPARAM, LPARAM); PLUGININFO pluginInfo={
sizeof(PLUGININFO),
MODULE,
- PLUGIN_MAKE_VERSION(0,0,2,1),
+ PLUGIN_MAKE_VERSION(0,0,2,2),
"Put SRMM windows into a single frame",
"Scott Ellis",
"mail@scottellis.com.au",
diff --git a/justtabs/win.cpp b/justtabs/win.cpp index b4a0461..e2f286c 100644 --- a/justtabs/win.cpp +++ b/justtabs/win.cpp @@ -336,7 +336,21 @@ BOOL CALLBACK FrameProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { Utils_SaveWindowPosition(hwnd, 0, MODULE, "MainWin");
active_window = 0;
SetFocus(tab_ctrl); // crash if focus is in typing window when srmm closed (EN_KILLFOCUS command, null dat)
- WindowList_Broadcast(window_list, WM_CLOSE, 0, 0);
+
+ // clost windows in reverse order (for e.g. 'last contact')
+ int l, i;
+ HWND hwndMsg;
+ TCITEM tci;
+ l = TabCtrl_GetItemCount(tab_ctrl);
+ for (i = l - 1; i >= 0; --i) {
+ tci.mask = TCIF_PARAM;
+ TabCtrl_GetItem(tab_ctrl, i, &tci);
+ hwndMsg = ((TabData *)tci.lParam)->hwndMsg;
+
+ SendMessage(hwndMsg, WM_CLOSE, 0, 0);
+ }
+ //WindowList_Broadcast(window_list, WM_CLOSE, 0, 0);
+
ShowWindow(hwnd, SW_HIDE);
}
return TRUE;
|