Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1107)

Unified Diff: chrome/common/win_util.cc

Issue 42666: Modify the save as code to be able to display the new enhanced... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/win_util.cc
===================================================================
--- chrome/common/win_util.cc (revision 12593)
+++ chrome/common/win_util.cc (working copy)
@@ -376,11 +376,17 @@
save_as.lpstrInitialDir = directory.c_str();
save_as.lpstrTitle = NULL;
save_as.Flags = OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_ENABLESIZING |
- OFN_ENABLEHOOK | OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST;
+ OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST;
save_as.lpstrDefExt = &def_ext[0];
save_as.lCustData = NULL;
- save_as.lpfnHook = &SaveAsDialogHook;
+ if (win_util::GetWinVersion() <= win_util::WINVERSION_VISTA) {
+ // The save as on Windows XP and Windows Vista remembers its last position,
+ // and if the screen resolution changed, it will be off screen.
+ save_as.Flags |= OFN_ENABLEHOOK;
+ save_as.lpfnHook = &SaveAsDialogHook;
+ }
+
// Must be NULL or 0.
save_as.pvReserved = NULL;
save_as.dwReserved = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698