diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-05-17 15:09:28 +0800 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-05-17 15:13:06 +0800 |
commit | bcfb28ff6784143ab8472023e7471d9203da714e (patch) | |
tree | 6985466cc6b78bdd129314336a29279e8a56c006 /e-util | |
parent | ba5a33b6f19d2cdb747757408b08c5ae4ade3d86 (diff) | |
download | gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar.gz gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar.bz2 gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar.lz gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar.xz gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.tar.zst gsoc2013-evolution-bcfb28ff6784143ab8472023e7471d9203da714e.zip |
[win32] Make Evolution actually appear in "Set Program Access and
Defaults" dialogue and use quoted string instead of short path, since
this is how the "Hotmail" e-mail provider is doing it (unlike what
documentation says)
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-win32-defaults.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/e-util/e-win32-defaults.c b/e-util/e-win32-defaults.c index 3d919a017d..eca924936e 100644 --- a/e-util/e-win32-defaults.c +++ b/e-util/e-win32-defaults.c @@ -104,8 +104,6 @@ _e_win32_register_mailer_impl (WINBOOL system) DWORD i, dwDisposition; gchar *defaultIcon = NULL; gchar *dllPath = NULL; - gchar *dllShortPath = NULL; - DWORD dllShortPathLength; gchar *evolutionBinary = NULL; gchar *openCommand = NULL; gchar *setDefaultCommand = NULL; @@ -166,28 +164,24 @@ _e_win32_register_mailer_impl (WINBOOL system) return; dllPath = _e_win32_sanitize_path (g_build_path(G_DIR_SEPARATOR_S, _e_get_bindir (), EUTILDLL, NULL)); - dllShortPathLength = GetShortPathNameA (dllPath, NULL, 0); - dllShortPath = g_new0 (char, dllShortPathLength); - GetShortPathNameA (dllPath, dllShortPath, dllShortPathLength); - g_free (dllPath); - setDefaultCommand = g_strconcat ("rundll32 ", dllShortPath, ",_e_win32_set_default_mailer", NULL); - unsetDefaultCommand = g_strconcat ("rundll32 ", dllShortPath, ",_e_win32_set_default_mailer", NULL); - g_free (dllShortPath); + setDefaultCommand = g_strconcat ("%SystemRoot%\\system32\\rundll32.exe \"", dllPath, "\",_e_win32_set_default_mailer", NULL); + unsetDefaultCommand = g_strconcat ("%SystemRoot%\\system32\\rundll32.exe \"", dllPath, "\",_e_win32_unset_default_mailer", NULL); + g_free (dllPath); - if ((returnValue = RegSetValueExA (reg_subkey, "ReinstallCommand", 0, REG_SZ, (const BYTE *)setDefaultCommand, strlen (setDefaultCommand) + 1))) { + if ((returnValue = RegSetValueExA (reg_subkey, "ReinstallCommand", 0, REG_EXPAND_SZ, (const BYTE *)setDefaultCommand, strlen (setDefaultCommand) + 1))) { g_free (setDefaultCommand); g_free (unsetDefaultCommand); return; } - if ((returnValue = RegSetValueExA (reg_subkey, "ShowIconsCommand", 0, REG_SZ, (const BYTE *)setDefaultCommand, strlen (setDefaultCommand) + 1))) { + if ((returnValue = RegSetValueExA (reg_subkey, "ShowIconsCommand", 0, REG_EXPAND_SZ, (const BYTE *)setDefaultCommand, strlen (setDefaultCommand) + 1))) { g_free (setDefaultCommand); g_free (unsetDefaultCommand); return; } - if ((returnValue = RegSetValueExA (reg_subkey, "HideIconsCommand", 0, REG_SZ, (const BYTE *)unsetDefaultCommand, strlen (unsetDefaultCommand) + 1))) { + if ((returnValue = RegSetValueExA (reg_subkey, "HideIconsCommand", 0, REG_EXPAND_SZ, (const BYTE *)unsetDefaultCommand, strlen (unsetDefaultCommand) + 1))) { g_free (setDefaultCommand); g_free (unsetDefaultCommand); return; |