[2/2] winefile: Remove the format disk command.

Francois Gouget fgouget at free.fr
Wed Mar 30 09:47:58 CDT 2011


SHFormatDrive() is unimplemented in Wine and a format command seems useless in winefile.
---

This one is logically independent from the previous patch but needs to 
be applied after it to avoid conflicts.

 programs/winefile/resource.h  |    1 -
 programs/winefile/winefile.c  |    7 -------
 programs/winefile/winefile.h  |    2 +-
 programs/winefile/winefile.rc |    2 --
 4 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/programs/winefile/resource.h b/programs/winefile/resource.h
index cac8364..da6d69d 100644
--- a/programs/winefile/resource.h
+++ b/programs/winefile/resource.h
@@ -48,7 +48,6 @@
 #define ID_FILE_COPY                    107
 #define ID_FILE_DELETE                  108
 #define ID_FILE_EXIT                    115
-#define ID_FORMAT_DISK                  203
 #define ID_CONNECT_NETWORK_DRIVE        252
 #define ID_DISCONNECT_NETWORK_DRIVE     253
 #define ID_VIEW_NAME                    401
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 7df5015..2bad75c 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -2277,13 +2277,6 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
 					}
 					break;}
 
-				case ID_FORMAT_DISK: {
-					UINT sem_org = SetErrorMode(0); /* Get the current Error Mode settings. */
-					SetErrorMode(sem_org & ~SEM_FAILCRITICALERRORS); /* Force O/S to handle */
-					SHFormatDrive(hwnd, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
-					SetErrorMode(sem_org); /* Put it back the way it was. */
-					break;}
-
 				case ID_HELP:
 					WinHelpW(hwnd, RS(b1,IDS_WINEFILE), HELP_INDEX, 0);
 					break;
diff --git a/programs/winefile/winefile.h b/programs/winefile/winefile.h
index ab294c1..82a3161 100644
--- a/programs/winefile/winefile.h
+++ b/programs/winefile/winefile.h
@@ -44,7 +44,7 @@
 #include <time.h>
 
 #include <shellapi.h>   /* for ShellExecuteW() */
-#include <shlobj.h>     /* for SHFormatDrive() */
+#include <shlobj.h>
 
 #ifndef _NO_EXTENSIONS
 #define _SHELL_FOLDERS
diff --git a/programs/winefile/winefile.rc b/programs/winefile/winefile.rc
index a060a84..7da2d02 100644
--- a/programs/winefile/winefile.rc
+++ b/programs/winefile/winefile.rc
@@ -42,8 +42,6 @@ IDM_WINEFILE MENU
     }
 
     POPUP "&Disk"  {
-        MENUITEM "&Format Disk...",             ID_FORMAT_DISK
-        MENUITEM SEPARATOR
         MENUITEM "Connect &Network Drive",      ID_CONNECT_NETWORK_DRIVE
         MENUITEM "&Disconnect Network Drive",   ID_DISCONNECT_NETWORK_DRIVE
     }
-- 
1.7.4.1




More information about the wine-patches mailing list