Re: RFE #833097
"Jerzy Kaczorowski" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Hiroaki, >While not only modal dialogs are open, but also >graph views are open, I think it is not really necessary >to refresh views. It may be good idea to slow down the refresh rate rather than stopping it completely. We have the flag to indicate that we are "in the background" and it should be enought to set it appropriate. I am not sure about the modal dialog detection code - I will have to make some testing first. I don't feel comfortable using timer for that, perhaps WM_ACTIVATE message handler or similiar will be better. On more option would be to try using NT-specific API ReadDirectoryChangesW for changes detection. It seems more detailed and we could reduce the refreshing because we could ignore not important changes which we can't do now using FindFirstChangeNotification. Of course we have to keep both methods and detect the system we are running on and select as appropriate. >By the way, which should I post like this to sf.net or >cvsgui-dev? Are there any guidlines? Most of the time you can post in both places - we will discuss it here but it's good to have the code together with bug or features request so it will not get lost or forgotted. If the code is big it's better to make a zip file and post it to the files area of cvsgui-dev list or attach to the bug at SF. Best Regards, Jerzy ----- Original Message ----- From: Hiroaki Itoh To: [email protected] Sent: Sunday, January 18, 2004 8:47 Subject: [cvsgui-dev] RFE #833097 I always feel unpleasant that behaviour(#833097), too. So I'm glad if response to the problem will come earlier. (Though keeping priority is no problem for me.) While not only modal dialogs are open, but also graph views are open, I think it is not really necessary to refresh views. We can take various approaches to fix: In these situations, 1) KoWatcher stops detection. 2) KoWatcher stops notify. 3) CBrowseFileView kills timer. 4) CBrowseFileView ignore the notify. I think 4) is the best way, and easy. Though I don't know that the detection manner if modal dialogs are open is safety(--- Is it to be possible that any except modal dialogs can be detected as modal dialogs? ---), following code is at least good for me: ========================================================= void CBrowseFileView::OnTimer(UINT nIDEvent) { /*__*/if( nIDEvent == m_uiFilechangeTimer ) /*__*/{ /*______*/CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd(); /*______*/CWnd* pActive = pMainFrame->GetActiveWindow(); /*______*/LONG style = ::GetWindowLong(pActive->GetSafeHwnd(), GWL_STYLE); /*______*/CMDIChildWnd* pMaybeMyParent = pMainFrame->MDIGetActive(); /*______*/CWincvsApp* app = (CWincvsApp*)AfxGetApp(); /*______*/if( ( !(style & DS_MODALFRAME) && pMaybeMyParent- >GetSafeHwnd() == GetParent()->GetSafeHwnd() ) && !app->IsCvsRunning () ) /*______*/{ ========================================================= Evaluation on this fix may depend on whether if you use graph as maximized or not. By the way, which should I post like this to sf.net or cvsgui-dev? Are there any guidlines? Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui-dev/ To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/