Update of /cvsroot/audacity/lib-src/FileDialog/win
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv4004
Modified Files:
FileDialog.hpp
Log Message:
Fix focus problem when returning from options dialog
Index: FileDialog.hpp
===================================================================
RCS file: /cvsroot/audacity/lib-src/FileDialog/win/FileDialog.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- FileDialog.hpp 12 Apr 2007 00:15:37 -0000 1.3
+++ FileDialog.hpp 26 Apr 2007 04:05:23 -0000 1.4
@@ -141,13 +141,14 @@
GetWindowLongPtr(hDlg, GWLP_USERDATA);
FileDialog *me = (FileDialog *)
ofn->lCustData;
-
+ HWND w = GetFocus();
int index = SendDlgItemMessage(hwndDialog,
cmb1,
CB_GETCURSEL,
0,
0);
me->ClickButton(index);
+ SetFocus(w);
}
}
break;
@@ -298,7 +299,7 @@
}
// if wxCHANGE_DIR flag is not given we shouldn't change the CWD which the
- // standard dialog does by default (notice that under NT it does it
anyhow,
+ // standard dialog does by default (notice that under NT it does it
anyhow,
// OFN_NOCHANGEDIR or not, see below)
if ( !(m_dialogStyle & wxCHANGE_DIR) )
{
@@ -435,8 +436,8 @@
}
}
- // store off before the standard windows dialog can possibly change it
- const wxString cwdOrig = wxGetCwd();
+ // store off before the standard windows dialog can possibly change it
+ const wxString cwdOrig = wxGetCwd();
//== Execute FileDialog >>=================================================
@@ -448,18 +449,18 @@
#else
DWORD errCode = CommDlgExtendedError();
- // GetOpenFileName will always change the current working directory on
- // (according to MSDN) "Windows NT 4.0/2000/XP" because the flag
- // OFN_NOCHANGEDIR has no effect. If the user did not specify
wxCHANGE_DIR
- // let's restore the current working directory to what it was before the
- // dialog was shown (assuming this behavior extends to Windows Server 2003
- // seems safe).
- if ( success &&
- (msw_flags & OFN_NOCHANGEDIR) &&
- wxGetOsVersion() == wxWINDOWS_NT )
- {
- wxSetWorkingDirectory(cwdOrig);
- }
+ // GetOpenFileName will always change the current working directory on
+ // (according to MSDN) "Windows NT 4.0/2000/XP" because the flag
+ // OFN_NOCHANGEDIR has no effect. If the user did not specify
wxCHANGE_DIR
+ // let's restore the current working directory to what it was before the
+ // dialog was shown (assuming this behavior extends to Windows Server 2003
+ // seems safe).
+ if ( success &&
+ (msw_flags & OFN_NOCHANGEDIR) &&
+ wxGetOsVersion() == wxWINDOWS_NT )
+ {
+ wxSetWorkingDirectory(cwdOrig);
+ }
#ifdef __WIN32__
if (!success && (errCode == CDERR_STRUCTSIZE))
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs