aboutsummaryrefslogtreecommitdiff
path: root/src/update_check.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-01-11 04:38:52 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-01-11 04:38:52 +0000
commite1223a1b57cc9fc0024c7b471c19ecba1817363e (patch)
treefaad0b80134149fcedf60ae0ba6d8fdd928de412 /src/update_check.c
parent67dafc6d14d604ae87eb060763a7364f8b58e462 (diff)
win32: properly set the parameter of default download URL.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2783 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/update_check.c')
-rw-r--r--src/update_check.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/update_check.c b/src/update_check.c
index defb4aeb..ff9e1fdf 100644
--- a/src/update_check.c
+++ b/src/update_check.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2010 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2011 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -223,6 +223,32 @@ finish:
#endif /* USE_UPDATE_CHECK_PLUGIN */
#endif /* G_OS_WIN32 */
+#ifdef G_OS_WIN32
+static void set_default_download_url(void)
+{
+ gchar buf[1024];
+ const gchar *os;
+
+#ifdef G_OS_WIN32
+ os = "win";
+#else
+ if (strstr(TARGET_ALIAS, "linux"))
+ os = "linux";
+ else
+ os = "other";
+#endif
+
+#ifdef DEVEL_VERSION
+ g_snprintf(buf, sizeof(buf), "%s?ver=%s&os=%s&dev=t",
+ DOWNLOAD_URI, VERSION, os);
+#else
+ g_snprintf(buf, sizeof(buf), "%s?ver=%s&os=%s",
+ DOWNLOAD_URI, VERSION, os);
+#endif
+ update_check_set_download_url(buf);
+}
+#endif
+
static void update_dialog(const gchar *new_ver, const gchar *disp_ver,
gboolean manual)
{
@@ -256,7 +282,7 @@ static void update_dialog(const gchar *new_ver, const gchar *disp_ver,
if ((val & G_ALERT_VALUE_MASK) == G_ALERTDEFAULT) {
#ifdef G_OS_WIN32
if (!download_url)
- update_check_set_download_url(DOWNLOAD_URI);
+ set_default_download_url();
if (!spawn_update_manager())
open_uri(jump_url, prefs_common.uri_cmd);
#else