aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--libsylph/prefs_common.c4
-rw-r--r--libsylph/utils.c5
-rw-r--r--src/prefs_common_dialog.c5
4 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 49376e8f..fea36eca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;