PIM/MS Windows

From KDE Community Wiki

This page covers topics related to the MS Windows port of the KDE PIM suite.

Note

This page is work in progress started by jstaniek.


Problem points

Maildir implementation in KMail

It is to be expected, that the maildir implementation in kmail does not work on Windows' file system, since it uses the ":" (forbidden on windows) character in file names. It also relies (as does maildir in general) on the atomicity of making a hardlink and then unlinking the original, to implement an atomic move. The implementation used by akonadi (kdepim/maildir) relies on QFile in that regard, but it's unclear if rename is atomic on all platforms.

  • jstaniek 12:50, 7 January 2008 (CET): Hard/soft links could be handled on Windows by altering the source code so that the "link" file is a text file itself and contains the target path. If we need atomic renames, Windows apparently lacks them, I have found a pre-Vista blog which contains description on how to perform them in a messy but honest way (look at the very last "Write process (on Foo.txt)" version). There's also a way to recover from application/system crash during the pseudo-atomic operations (see the very last "Recovery from a crash during write" checklist).
  • jstaniek 12:42, 24 January 2008 (CET): We will most probably benefit from maildir suport on Windows as Thunderbird (ver. <3) apparently lacks support for this storage, despite many wishes and plans.
  • jstaniek 12:42, 24 January 2008 (CET): regarding replacing ":" character on windows:
    • We cannot use ":" in any way (Wikipedia note), so we have to rename it to something other:
      • The proposed replace character is "!". Not "-" (see this for explanation).
      • We may want to add support for user-defined character, to allow reuse maildirs of apps like mutt (which uses "-"), but it should be clearly noted in the handbook that the setting is only for integration with existing maildirs.
      • The rename makes the implementation incompatible with the specification (which is informal anyway and says nothing about the replacement character).
    • The ability of sharing a single maildir structure on dual boot machines (e.g., using the IFS Ext2 driver or Ext2fsd: way less crashy than IFS Ext2 (no blue screen of the death) and actively maintained) is affected by the problem with ":" character.
      • Windows FS layer apparently returns "file not found" error for files having the ":" character on a linux filesystem. So if there is a need for storing the maildir at linux side, ":" should be renamed even if Linux itself does work with ":".
      • Conversely, if the maildir has to be stored at windows side, ":" characters have to be renamed, do Linux build of KMail (and KDE-PIM in general) should support this rename too in order to access the storage.

Integration into the Windows Explorer & Desktop

Note

jstaniek 22:01, 14 January 2008 (CET): TortoiseSVN is GPLed SVN client which is nicely integrated with Windows Explorer. Perhaps we can use its source code as a reference...


Registry settings for default apps and services

Introduction: We can detect whether KMail is the default e-mail client. If set as default, KMail should act as a default mailer, and thus be invoked automatically for actions like RMB "Send To -> E-mail Recipient". This shall be also reused by others for KOrganizer and Konqueror. The solution is relatively simple modifications to the Windows Registry. See mozilla's solution and [1].

First, we can use HKLM node for system-global settings or HKCU node for current-user-only settings. If the attempt to set the value in HKLM fails, usually because of unsufficient permissions, HKCU should be used. See KB297878. Below we'll use HKCU.

  • HKCU\Software\Clients\StartMenuInternet\app.exe\shell\open\command key is used for "Internet" start menu shortcut, can be set to Konqueror. Note from the KB - "The command might open the browser on the users home page, for example. However, it might launch some other introductory user interface that the ISV feels is appropriate." So this is not the same as 'default browser' setting.
  • HKCU\Software\Clients\StartMenuInternet key is used to specify default web browser
  • HKCU\Software\Clients\Calendar key is used for "Calendar" settings, points to Windows Calendar on Vista; can be set to KOrganizer
  • [HKCU\Software\Clients\Mail] - default email

From the KB: After updating the registry keys, the application broadcasts the WM_SETTINGCHANGE message with wParam = 0 and lParam pointing to the null-terminated string "Software\Clients\StartMenuInternet" to notify the operating system that the default client has changed.

KDE-related notes:

  • KDElibs executes default web browser or email client for protocols like http(s): and mailto:. This is a general rule of KDE/win: not to duplicate registry settings in any rc file.

Drag&drop support

Support drag&drop from/to composer and from received mails into the file system (Windows Explorer and the Desktop)

Copy&paste support

Support pasting files copied (in Windows Explorer or the Desktop) as attachments.

Notes

  • The branches/work/kdab-post-4.0 branch (kdepimlibs, kdepim modules) have been closed and merged into trunk. KDE PIM for Windows development happens in trunk again now.

Links

External Links