[Bug 32852] BioEdit: changing the install directory doesn't show the change in the GUI

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Dec 6 11:49:46 CST 2013


http://bugs.winehq.org/show_bug.cgi?id=32852

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net

--- Comment #4 from Anastasius Focht <focht at gmx.net> 2013-12-06 11:49:46 CST ---
Hello folks,

some recap before analysis:
http://kb.flexerasoftware.com/selfservice/viewContent.do?externalId=Q212622&sliceId=1

--- quote ---
Controls and Events on DestinationFolder

On the DestinationFolder dialog, the PushButton control named ChangeFolder has
two events associated with it. You can view these events by highlighting
ChangeFolder in DestinationFolder's Dialog Behavior view. The first event,
SpawnDialog, spawns the InstallChangeFolder dialog.

The other event is [_BrowseProperty] and its argument is INSTALLDIR. If a
property in brackets is specified in the place of an event, that property will
be set to the value given in the argument field. When ChangeFolder is clicked,
_BrowseProperty will be set to INSTALLDIR. At the same time,
InstallChangeFolder will be spawned, as mentioned above.

Controls and Events on InstallChangeFolder

It is necessary to set _BrowseProperty because there are three controls on
InstallChangeFolder that use _BrowseProperty: a DirectoryCombo, a
DirectoryList, and a PathEdit. Although all of these controls look and interact
with the user in different ways, they all do the same thing: display the path
specified in their Property and allow the user to change the value of that
Property. In this case, the property is _BrowseProperty (which was set to
INSTALLDIR). When the user selects directories with any of these controls, the
associated property, in this case INSTALLDIR (via _BrowseProperty) will be
changed.

After users finish changing the value of the property to their liking, they
will click OK. The OK button not only has an EndDialog ControlEvent associated
with it, but also a SetTargetPath ControlEvent. SetTargetPath is given
_BrowseProperty as an argument. It will check the path given by its argument to
see if it is valid and writable. If it is not, it will block further events
associated with its control.
--- quote ---

For this installer I selected a new folder "C:\\BioEdit\\xxx" to make it more
visible in trace log output.

--- snip ---
...
0023:trace:msi:MSIPathEdit_WndProc 0x10098 0008 00010096 00000000 
...
0023:trace:msi:msi_get_property returning L"INSTALLDIR" for property
L"_BrowseProperty" 
...
0023:trace:msi:msi_set_property 0x14b7e8 L"INSTALLDIR" L"C:\\BioEdit\\xxx" -1 
...
0023:Call user32.SetWindowTextW(00010098,00495778 L"C:\\BioEdit\\xxx")
ret=7ed02db4
0023:Call window proc 0x7ed02fd9
(hwnd=0x10098,msg=WM_SETTEXT,wp=00000000,lp=00495778)
0023:Call user32.GetPropW(00010098,7ed71f5c L"MSIDATA") ret=7ed0300d
0023:Ret  user32.GetPropW() retval=001e2810 ret=7ed0300d
0023:trace:msi:MSIPathEdit_WndProc 0x10098 000c 00000000 00495778
0023:Call user32.CallWindowProcW(7e97f812,00010098,0000000c,00000000,00495778)
ret=7ed030cf
0023:Call window proc 0x7e97f812
(hwnd=0x10098,msg=WM_SETTEXT,wp=00000000,lp=00495778) 
...
0023:trace:msi:MSIDialog_WndProc 0x0111
0023:trace:msi:msi_dialog_oncommand 0x1e23c8 0x10096 00000000
...
0023:trace:msi:MSI_DatabaseOpenViewW L"SELECT * FROM ControlEvent WHERE
`Dialog_` = 'InstallChangeFolder' AND `Control_` = 'OK' ORDER BY `Ordering`"
0x33e980 
...
0023:trace:msi:MSI_EvaluateConditionW 1 <- L"1"
0023:trace:msi:msi_dialog_send_event Sending control event L"SetTargetPath"
L"[_BrowseProperty]" 
...
0023:trace:msi:dialog_event_handler handling event L"SetTargetPath"
...
0023:trace:msi:msi_get_property returning L"C:\\BioEdit\\xxx" for property
L"INSTALLDIR"
...
0023:trace:msi:msi_event_fire firing event L"SelectionPath"
...
0023:Call user32.SetWindowTextW(00050070,0020eb78 L"_BrowseProperty")
ret=7ecfee0d
0023:Call window proc 0x7ecff31e
(hwnd=0x50070,msg=WM_SETTEXT,wp=00000000,lp=0020eb78)
0023:trace:msi:MSIText_WndProc 0x50070 000c 00000000 0020eb78
...
0023:trace:msi:MSI_SetTargetPathW 0x1546d8 L"INSTALLDIR" L"C:\\BioEdit\\xxx"
...
0023:trace:msi:msi_set_property 0x14b7e8 L"INSTALLDIR" L"C:\\BioEdit\\xxx\\" -1 
...
--- snip ---

The control in question doesn't have 'indirect' attribute set hence in the
event handler for "SetTargetPath" control event the property is displayed as-is
-> "_BrowseProperty"

Debugging session for the relevant control event:

--- snip ---
Wine-dbg>bt
Backtrace:
=>0 0x7ecfe8a2 dialog_handle_event(dialog=0x1d6330, control="Location",
attribute="SelectionPath", rec=0x21c2c0)
[/home/focht/projects/wine/wine-git/dlls/msi/dialog.c:622] in msi (0x0033e8b8)
  1 0x7ed08e7b event_set_target_path+0x79(dialog=0x1d1890,
argument="INSTALLDIR")
[/home/focht/projects/wine/wine-git/dlls/msi/dialog.c:4502] in msi (0x0033e8e8)

...

Wine-dbg>p *ctrl
{entry={next=0x1b7d70, prev=0x1584b0}, hwnd=0x5004e, handler=(nil),
update=(nil), property="_BrowseProperty", value=0x0(nil), hBitmap=(nil),
hIcon=(nil), tabnext=0x0(nil), type="Text", hDll=(nil),
progress_current=0.000000, progress_max=100.000000, progress_backwards=0,
attributes=0x3, name={0x4c}}
--- snip ---

Source:
http://source.winehq.org/git/wine.git/blob/3271b982632e7730d6cee373f4c9a4af37012036:/dlls/msi/dialog.c#l705

--- snip ---
620 static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control,
621 const WCHAR *attribute, MSIRECORD *rec )
622 {
...
705     else if ( !strcmpW( attribute, szSelectionPath ) )
706     {
707          BOOL indirect = ctrl->attributes & msidbControlAttributesIndirect;
708          LPWSTR path = msi_dialog_dup_property( dialog, ctrl->property,
indirect );
709          if (!path) return;
710          SetWindowTextW( ctrl->hwnd, path );
711          msi_free(path);
712     }
...
718 }
--- snip ---

$ wine --version
wine-1.7.7-326-ged89525

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list