[1/3] winedbg: Remove unused debug menu (try 3)
André Hentschel
nerv at dawncrow.de
Thu Dec 22 10:49:51 CST 2011
---
programs/winedbg/crashdlg.c | 29 ++++-------------------------
programs/winedbg/debugger.h | 2 +-
programs/winedbg/resource.h | 4 ----
programs/winedbg/tgt_active.c | 6 +-----
programs/winedbg/winedbg.rc | 8 --------
5 files changed, 6 insertions(+), 43 deletions(-)
diff --git a/programs/winedbg/crashdlg.c b/programs/winedbg/crashdlg.c
index ebf2ca1..89082b4 100644
--- a/programs/winedbg/crashdlg.c
+++ b/programs/winedbg/crashdlg.c
@@ -84,7 +84,6 @@ static WCHAR *get_program_name(HANDLE hProcess)
static LPWSTR g_ProgramName;
static HFONT g_hBoldFont;
-static HMENU g_hDebugMenu = NULL;
static void set_bold_font(HWND hDlg)
{
@@ -128,18 +127,6 @@ static INT_PTR WINAPI DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE;
}
- case WM_RBUTTONDOWN:
- {
- POINT mousePos;
- if (!(wParam & MK_SHIFT))
- return FALSE;
- if (g_hDebugMenu == NULL)
- g_hDebugMenu = LoadMenuW(GetModuleHandleW(NULL), MAKEINTRESOURCEW(IDM_DEBUG_POPUP));
- GetCursorPos(&mousePos);
- TrackPopupMenu(GetSubMenu(g_hDebugMenu, 0), TPM_RIGHTBUTTON, mousePos.x, mousePos.y,
- 0, hwnd, NULL);
- return TRUE;
- }
case WM_NOTIFY:
switch (((NMHDR *)lParam)->code)
{
@@ -156,7 +143,6 @@ static INT_PTR WINAPI DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
case IDOK:
case IDCANCEL:
- case ID_DEBUG:
EndDialog(hwnd, LOWORD(wParam));
return TRUE;
}
@@ -165,27 +151,20 @@ static INT_PTR WINAPI DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE;
}
-BOOL display_crash_dialog(void)
+void display_crash_dialog(void)
{
static const WCHAR winedeviceW[] = {'w','i','n','e','d','e','v','i','c','e','.','e','x','e',0};
static const INITCOMMONCONTROLSEX init = { sizeof(init), ICC_LINK_CLASS };
- INT_PTR result;
/* dbg_curr_process->handle is not set */
HANDLE hProcess;
- if (!DBG_IVAR(ShowCrashDialog))
- return TRUE;
+ if (!DBG_IVAR(ShowCrashDialog)) return;
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dbg_curr_pid);
g_ProgramName = get_program_name(hProcess);
CloseHandle(hProcess);
- if (!strcmpW( g_ProgramName, winedeviceW )) return TRUE;
+ if (!strcmpW( g_ProgramName, winedeviceW )) return;
InitCommonControlsEx( &init );
- result = DialogBoxW(GetModuleHandleW(NULL), MAKEINTRESOURCEW(IDD_CRASH_DLG), NULL, DlgProc);
- if (result == ID_DEBUG) {
- AllocConsole();
- return FALSE;
- }
- return TRUE;
+ DialogBoxW(GetModuleHandleW(NULL), MAKEINTRESOURCEW(IDD_CRASH_DLG), NULL, DlgProc);
}
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index 9c72916..fc3aada 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -308,7 +308,7 @@ extern void break_restart_execution(int count);
extern int break_add_condition(int bpnum, struct expr* exp);
/* crashdlg.c */
-extern BOOL display_crash_dialog(void);
+extern void display_crash_dialog(void);
extern int msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UINT uType);
/* dbg.y */
diff --git a/programs/winedbg/resource.h b/programs/winedbg/resource.h
index 11c2cb9..fcf0416 100644
--- a/programs/winedbg/resource.h
+++ b/programs/winedbg/resource.h
@@ -27,10 +27,6 @@
#define IDC_STATIC_TXT1 101
#define IDC_STATIC_TXT2 102
-#define IDM_DEBUG_POPUP 100
-
-#define ID_DEBUG 200
-
#define IDS_AUTO_CAPTION 16
#define IDS_INVALID_PARAMS 17
#define IDS_UNIDENTIFIED 18
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index 376ee22..099b353 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -766,11 +766,7 @@ enum dbg_start dbg_active_auto(int argc, char* argv[])
msgbox_res_id(NULL, IDS_INVALID_PARAMS, IDS_AUTO_CAPTION, MB_OK);
return ds;
}
- if (!display_crash_dialog()) {
- dbg_init_console();
- dbg_start_interactive(INVALID_HANDLE_VALUE);
- return start_ok;
- }
+ display_crash_dialog();
hFile = parser_generate_command_file("echo Modules:", "info share",
"echo Threads:", "info threads",
diff --git a/programs/winedbg/winedbg.rc b/programs/winedbg/winedbg.rc
index 6f3d8a6..539fdcb 100644
--- a/programs/winedbg/winedbg.rc
+++ b/programs/winedbg/winedbg.rc
@@ -22,14 +22,6 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
-IDM_DEBUG_POPUP MENU
-BEGIN
- POPUP ""
- BEGIN
- MENUITEM "&Debug", ID_DEBUG
- END
-END
-
STRINGTABLE
BEGIN
IDS_AUTO_CAPTION "Wine program crash"
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20111222/19ef2920/attachment-0001.ksh>
More information about the wine-patches
mailing list