Shell integration idea
Ulrich Czekalla
ulrich.czekalla at utoronto.ca
Fri Jun 2 10:21:33 CDT 2006
I think the general approach is good.
The way you handle the built in implementation seems odd to me. I think
setting the registry key to make the freedesktop.org version as the default
would be good enough.
I'm not convinced we need IWineShellIntegration. I think it would be
cleaner to directly create an IWineTrash object.
/Ulrich
On Thu, Jun 01, 2006 at 10:12:12PM +0200, Miko??aj Zalewski wrote:
> As a SoC project I'll try to improve the integration of wine with the
> Unix shells. My first step will be to implement the freedesktop.org
> Trash. I've written some code that doesn't add any new features but
> shows how I want to add it. I'd like to know if this is a good design?
> The main idea is not to hard-code one implementation of things like
> the Trash into shell32 - not everything is standardized by the
> freedesktop and even if it would this might not work on other systems
> like MacOS X. We should allow for many implementations. The correct one
> is loaded depending on a registry settings (so that a winecfg entry can
> be added). My implementation uses COM objects as it's standard dlls
> provides support for such tasks. Currently there is one interface
> (IWineShellIntegration) that acts as a factory for specialized objects.
> That could also be implemented using COM Aggregation - when we do that
> we could use QueryInterface instead of GetIntegrationObejct.
> Some COM objects can run in the address space of the calling process -
> e.g. the trash can be implemented like that. For others it would be a
> waist of resources (e.g. there is no need for every process to watch is
> the file associations have changed) - it's enough to load them only
> once. The explorer seems to be a good candidate to create such objects.
> In the attached patch there is one specialized interface - the
> IWineTrash. The SHELL_DeleteFile[AW] is patched to use it - it shows a
> different icon if the file can be trashed (these are not the correct
> icons as wine's shell32 uses a message box instead of a special dialog)
> and calls the trash method then. Currently there is only one built-in
> trash that can't trash anything. (note that SHELL_DeleteFile is called
> in the folders that are decendents of My Computer. If choose delete on a
> file that is a decendent of the '/', it will be deleted without a warning).
>
> Mikolaj Zalewski
>
More information about the wine-devel
mailing list