Huw Davies : oledlg: Handle paste / link mode change.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 20 04:46:03 CDT 2006


Module: wine
Branch: master
Commit: 1d9e48c77e575b7f968785f252e7358e981187fa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1d9e48c77e575b7f968785f252e7358e981187fa

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Oct 19 11:21:38 2006 +0100

oledlg: Handle paste / link mode change.

---

 dlls/oledlg/pastespl.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c
index 26f91e8..d0c0e4c 100644
--- a/dlls/oledlg/pastespl.c
+++ b/dlls/oledlg/pastespl.c
@@ -362,6 +362,23 @@ static void selection_change(HWND hdlg, 
     update_result_text(hdlg, ps_struct);
 }
 
+static void mode_change(HWND hdlg, ps_struct_t *ps_struct, UINT id)
+{
+    if(id == IDC_PS_PASTE)
+    {
+        ps_struct->flags &= ~PSF_SELECTPASTELINK;
+        ps_struct->flags |= PSF_SELECTPASTE;
+    }
+    else
+    {
+        ps_struct->flags &= ~PSF_SELECTPASTE;
+        ps_struct->flags |= PSF_SELECTPASTELINK;
+    }
+
+    update_display_list(hdlg, id == IDC_PS_PASTE ? IDC_PS_PASTELIST : IDC_PS_PASTELINKLIST);
+    selection_change(hdlg, ps_struct);
+}
+
 static void post_help_msg(HWND hdlg, ps_struct_t *ps_struct)
 {
     PostMessageW(ps_struct->ps->hWndOwner, oleui_msg_help, (WPARAM)hdlg, IDD_PASTESPECIAL);
@@ -437,6 +454,17 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
             default:
                 return FALSE;
             }
+        case IDC_PS_PASTE:
+        case IDC_PS_PASTELINK:
+            switch(HIWORD(wp))
+            {
+            case BN_CLICKED:
+                mode_change(hdlg, ps_struct, LOWORD(wp));
+                return FALSE;
+
+            default:
+                return FALSE;
+            }
         case IDC_OLEUIHELP:
             switch(HIWORD(wp))
             {




More information about the wine-cvs mailing list