# HG changeset patch # User Richard Laager # Date 1139461847 0 # Node ID 307a259d6f6c098539526ffc4b9dafca6a4996ac # Parent 1455bbb38194e263c350927214b4665596a27954 [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 diff -r 1455bbb38194 -r 307a259d6f6c src/gtkprefs.c --- 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);