Huw Davies : oledlg: Update the source text.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 20 04:46:05 CDT 2006
Module: wine
Branch: master
Commit: feeaf9c238d7de41139f671695235bd0a1cee48c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=feeaf9c238d7de41139f671695235bd0a1cee48c
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Oct 19 11:45:24 2006 +0100
oledlg: Update the source text.
---
dlls/oledlg/pastespl.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c
index b4d5f97..08b7f95 100644
--- a/dlls/oledlg/pastespl.c
+++ b/dlls/oledlg/pastespl.c
@@ -364,6 +364,29 @@ static void init_lists(HWND hdlg, ps_str
EnableWindow(GetDlgItem(hdlg, IDOK), 0);
}
+static void update_src_text(HWND hdlg, ps_struct_t *ps_struct)
+{
+ WCHAR *str;
+
+ if(ps_struct->flags & PSF_SELECTPASTE)
+ {
+ if(ps_struct->source_name)
+ str = ps_struct->source_name;
+ else
+ str = ps_struct->link_source_name;
+
+ }
+ else
+ {
+ if(ps_struct->link_source_name)
+ str = ps_struct->link_source_name;
+ else
+ str = ps_struct->source_name;
+
+ }
+ SetDlgItemTextW(hdlg, IDC_PS_SOURCETEXT, str);
+}
+
static void update_as_icon(HWND hdlg, ps_struct_t *ps_struct)
{
HWND icon_display = GetDlgItem(hdlg, IDC_PS_ICONDISPLAY);
@@ -449,6 +472,7 @@ static void mode_change(HWND hdlg, ps_st
ps_struct->flags |= PSF_SELECTPASTELINK;
}
+ update_src_text(hdlg, ps_struct);
update_display_list(hdlg, id == IDC_PS_PASTE ? IDC_PS_PASTELIST : IDC_PS_PASTELINKLIST);
selection_change(hdlg, ps_struct);
}
@@ -537,6 +561,8 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
init_lists(hdlg, ps_struct);
+ update_src_text(hdlg, ps_struct);
+
selection_change(hdlg, ps_struct);
SetFocus(GetDlgItem(hdlg, IDC_PS_DISPLAYLIST));
More information about the wine-cvs
mailing list