From 5c0a3497e9d19f1fc1b26c1ec335d82b1f3ac2f1 Mon Sep 17 00:00:00 2001 From: Hiro Date: Sun, 16 Oct 2005 14:06:29 +0000 Subject: win32: use ShellExecute() to open URI. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@652 ee746299-78ed-0310-b773-934348b2243d --- libsylph/prefs_common.c | 4 ++++ libsylph/utils.c | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'libsylph') diff --git a/libsylph/prefs_common.c b/libsylph/prefs_common.c index 9b8af6e8..aaf50707 100644 --- a/libsylph/prefs_common.c +++ b/libsylph/prefs_common.c @@ -302,8 +302,12 @@ static PrefParam param[] = { #endif /* Other */ +#ifdef G_OS_WIN32 + {"uri_open_command", NULL, &prefs_common.uri_cmd, +#else {"uri_open_command", DEFAULT_BROWSER_CMD, &prefs_common.uri_cmd, P_STRING}, +#endif {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING}, {"ext_editor_command", "gedit %s", &prefs_common.ext_editor_cmd, P_STRING}, diff --git a/libsylph/utils.c b/libsylph/utils.c index b06cae6e..95e1e7c0 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -3142,6 +3142,11 @@ gint open_uri(const gchar *uri, const gchar *cmdline) g_return_val_if_fail(uri != NULL, -1); +#ifdef G_OS_WIN32 + if (!cmdline || cmdline[0] == '\0') + return execute_open_file(uri, NULL); +#endif + if (cmdline && (p = strchr(cmdline, '%')) && *(p + 1) == 's' && !strchr(p + 2, '%')) -- cgit v1.2.3