winedbg: Add a debug button on crash dialog, get rid of shift + right click magic (try2)

Running chliu027028 at gmail.com
Wed Jan 6 02:05:50 CST 2016


Superseded patch 117581

Try 2:
1,  Change '&Debug' to 'Debug' to resolve '&Debug" and 'Show &Details' use
a same shortcut key here.

2, Arrange button layout as this:  [Show &Details] [Debug] [Close]



-- 
Regards,
Changhui Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20160106/6f02d38b/attachment.html>
-------------- next part --------------
From 857b65386daadb41443011d36fabac203af6ac68 Mon Sep 17 00:00:00 2001
From: Changhui Liu <liuchanghui at linuxdeepin.com>
Date: Wed, 6 Jan 2016 15:54:41 +0800
Subject: winedbg: Add a debug button on crash dialog, get rid of shift + right
 click magic
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>

Signed-off-by: Changhui Liu <liuchanghui at linuxdeepin.com>
---
 programs/winedbg/crashdlg.c | 13 -------------
 programs/winedbg/winedbg.rc | 11 ++---------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/programs/winedbg/crashdlg.c b/programs/winedbg/crashdlg.c
index 4e02a4b..c2f54da 100644
--- a/programs/winedbg/crashdlg.c
+++ b/programs/winedbg/crashdlg.c
@@ -86,7 +86,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)
 {
@@ -216,18 +215,6 @@ static INT_PTR WINAPI crash_dlg_proc(HWND hwnd, UINT msg, WPARAM wParam, 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)
         {
diff --git a/programs/winedbg/winedbg.rc b/programs/winedbg/winedbg.rc
index 7514f9d..6aad0ee 100644
--- a/programs/winedbg/winedbg.rc
+++ b/programs/winedbg/winedbg.rc
@@ -24,14 +24,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"
@@ -57,7 +49,8 @@ BEGIN
                     for tips about running this application.",
                     IDC_STATIC_TXT2,"SysLink",0,27,60,224,100
     DEFPUSHBUTTON   "Close", IDOK, 205, 151, 60, 16, WS_TABSTOP
-    PUSHBUTTON      "Show &Details", ID_DETAILS, 140, 151, 60, 16, WS_TABSTOP
+    PUSHBUTTON      "Debug", ID_DEBUG, 140, 151, 60, 16, WS_TABSTOP
+    PUSHBUTTON      "Show &Details", ID_DETAILS, 75, 151, 60, 16, WS_TABSTOP
 END
 
 IDD_DETAILS_DLG DIALOGEX 100, 100, 400, 340
-- 
1.9.1



More information about the wine-patches mailing list