summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/win_util.cc9
-rw-r--r--app/win_util.h8
2 files changed, 7 insertions, 10 deletions
diff --git a/app/win_util.cc b/app/win_util.cc
index 4f4f14f..70e6ecc 100644
--- a/app/win_util.cc
+++ b/app/win_util.cc
@@ -162,7 +162,7 @@ bool ShouldUseVistaFrame() {
// Open an item via a shell execute command. Error code checking and casting
// explanation: http://msdn2.microsoft.com/en-us/library/ms647732.aspx
-bool OpenItemViaShell(const FilePath& full_path, bool ask_for_app) {
+bool OpenItemViaShell(const FilePath& full_path) {
HINSTANCE h = ::ShellExecuteW(
NULL, NULL, full_path.value().c_str(), NULL,
full_path.DirName().value().c_str(), SW_SHOWNORMAL);
@@ -171,14 +171,13 @@ bool OpenItemViaShell(const FilePath& full_path, bool ask_for_app) {
if (error > 32)
return true;
- if ((error == SE_ERR_NOASSOC) && ask_for_app)
+ if ((error == SE_ERR_NOASSOC))
return OpenItemWithExternalApp(full_path.value());
return false;
}
-bool OpenItemViaShellNoZoneCheck(const FilePath& full_path,
- bool ask_for_app) {
+bool OpenItemViaShellNoZoneCheck(const FilePath& full_path) {
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.fMask = SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_DDEWAIT;
sei.nShow = SW_SHOWNORMAL;
@@ -187,7 +186,7 @@ bool OpenItemViaShellNoZoneCheck(const FilePath& full_path,
if (::ShellExecuteExW(&sei))
return true;
LONG_PTR error = reinterpret_cast<LONG_PTR>(sei.hInstApp);
- if ((error == SE_ERR_NOASSOC) && ask_for_app)
+ if ((error == SE_ERR_NOASSOC))
return OpenItemWithExternalApp(full_path.value());
return false;
}
diff --git a/app/win_util.h b/app/win_util.h
index 19bbba7..be5f325 100644
--- a/app/win_util.h
+++ b/app/win_util.h
@@ -117,16 +117,14 @@ bool ShouldUseVistaFrame();
// Open or run a file via the Windows shell. In the event that there is no
// default application registered for the file specified by 'full_path',
-// ask the user, via the Windows "Open With" dialog, for an application to use
-// if 'ask_for_app' is true.
+// ask the user, via the Windows "Open With" dialog.
// Returns 'true' on successful open, 'false' otherwise.
-bool OpenItemViaShell(const FilePath& full_path, bool ask_for_app);
+bool OpenItemViaShell(const FilePath& full_path);
// The download manager now writes the alternate data stream with the
// zone on all downloads. This function is equivalent to OpenItemViaShell
// without showing the zone warning dialog.
-bool OpenItemViaShellNoZoneCheck(const FilePath& full_path,
- bool ask_for_app);
+bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
// Ask the user, via the Windows "Open With" dialog, for an application to use
// to open the file specified by 'full_path'.