diff options
author | Hiro <Hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-16 14:06:29 +0000 |
---|---|---|
committer | Hiro <Hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-16 14:06:29 +0000 |
commit | 5c0a3497e9d19f1fc1b26c1ec335d82b1f3ac2f1 (patch) | |
tree | c790650b9765ef8b120e83246a03f8e237a30d1c | |
parent | d45214240a9d326147576f03171d2a84cb9e624f (diff) |
win32: use ShellExecute() to open URI.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@652 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libsylph/prefs_common.c | 4 | ||||
-rw-r--r-- | libsylph/utils.c | 5 | ||||
-rw-r--r-- | src/prefs_common_dialog.c | 5 |
4 files changed, 21 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2005-10-16 + * libsylph/utils.c: open_uri(): win32: use ShellExecute() to open URI. + libsylph/prefs_common.c + src/prefs_common_dialog.c: win32: made the default URI command empty + which means to use the default browser. + +2005-10-16 + * src/mimeview.c: win32: restrict launching of executable files. 2005-10-14 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, '%')) diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c index 37fae722..6b9201ca 100644 --- a/src/prefs_common_dialog.c +++ b/src/prefs_common_dialog.c @@ -1997,8 +1997,12 @@ static void prefs_other_create(void) gtk_table_attach (GTK_TABLE (ext_table), uri_combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtkut_combo_set_items (GTK_COMBO (uri_combo), +#ifdef G_OS_WIN32 + "", +#else DEFAULT_BROWSER_CMD, "mozilla-firefox '%s'", + "firefox '%s'", "mozilla -remote 'openURL(%s,new-window)'", "mozilla '%s'", "netscape -remote 'openURL(%s,new-window)'", @@ -2006,6 +2010,7 @@ static void prefs_other_create(void) "gnome-moz-remote --newwin '%s'", "rxvt -e w3m '%s'", "rxvt -e lynx '%s'", +#endif NULL); uri_entry = GTK_COMBO (uri_combo)->entry; |