Mercurial > pidgin.yaz
diff src/gtkprefs.c @ 13204:307a259d6f6c
[gaim-migrate @ 15567]
Make drag-n-drop from the SourceForge smiley theme tracker work. This is a hack, but it does the job...
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 09 Feb 2006 05:10:47 +0000 |
parents | d0ae6489a0fb |
children | 3de53fe8345f |
line wrap: on
line diff
--- a/src/gtkprefs.c Thu Feb 09 04:42:07 2006 +0000 +++ b/src/gtkprefs.c Thu Feb 09 05:10:47 2006 +0000 @@ -527,6 +527,9 @@ FILE *f; gchar *path; + if (len == 0) + return; + f = gaim_mkstemp(&path, TRUE); fwrite(themedata, len, 1, f); fclose(f); @@ -561,14 +564,18 @@ } else if (!g_ascii_strncasecmp(name, "http://", 7)) { /* Oo, a web drag and drop. This is where things * will start to get interesting */ - gchar *tail; - - if ((tail = strrchr(name, '.')) == NULL) - return; - - /* We'll check this just to make sure. This also lets us do something different on - * other platforms, if need be */ gaim_url_fetch(name, TRUE, NULL, FALSE, theme_got_url, ".tgz"); + } else if (!g_ascii_strncasecmp(name, "https://", 8)) { + /* gaim_url_fetch() doesn't support HTTPS, but we want users + * to be able to drag and drop links from the SF trackers, so + * we'll try it as an HTTP URL. */ + char *tmp = g_strdup(name + 1); + tmp[0] = 'h'; + tmp[1] = 't'; + tmp[2] = 't'; + tmp[3] = 'p'; + gaim_url_fetch(tmp, TRUE, NULL, FALSE, theme_got_url, ".tgz"); + g_free(tmp); } gtk_drag_finish(dc, TRUE, FALSE, t);