| 296 gtk_drag_finish(dc, FALSE, FALSE, t); |
296 gtk_drag_finish(dc, FALSE, FALSE, t); |
| 297 } |
297 } |
| 298 |
298 |
| 299 static void |
299 static void |
| 300 statusbox_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data, |
300 statusbox_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data, |
| 301 const gchar *themedata, size_t len, const gchar *error_message, |
301 const gchar *themedata, size_t len, const gchar *error_message) |
| 302 PidginStatusBox *status_box) |
302 { |
| 303 { |
303 FILE *f; |
| 304 FILE *f; |
304 gchar *path; |
| 305 gchar *path; |
305 |
| 306 |
306 if ((error_message != NULL) || (len == 0)) |
| 307 if ((error_message != NULL) || (len == 0)) |
307 return; |
| 308 return; |
308 |
| 309 |
309 f = purple_mkstemp(&path, TRUE); |
| 310 f = purple_mkstemp(&path, TRUE); |
310 fwrite(themedata, len, 1, f); |
| 311 fwrite(themedata, len, 1, f); |
311 fclose(f); |
| 312 fclose(f); |
312 |
| 313 |
313 icon_choose_cb(path, user_data); |
| 314 icon_choose_cb(path, status_box); |
314 |
| 315 |
315 g_unlink(path); |
| 316 g_unlink(path); |
316 g_free(path); |
| 317 g_free(path); |
|
| 318 } |
317 } |
| 319 |
318 |
| 320 |
319 |
| 321 static gboolean |
320 static gboolean |
| 322 statusbox_uri_handler(const char *proto, const char *cmd, GHashTable *params, void *data) |
321 statusbox_uri_handler(const char *proto, const char *cmd, GHashTable *params, void *data) |
| 323 { |
322 { |
| 324 const char *src; |
323 const char *src; |
| 325 printf("%s %s\n", proto, cmd); |
324 |
| 326 if (g_ascii_strcasecmp(proto, "aim")) |
325 if (g_ascii_strcasecmp(proto, "aim")) |
| 327 return FALSE; |
326 return FALSE; |
| 328 |
327 |
| 329 if (g_ascii_strcasecmp(cmd, "buddyicon")) |
328 if (g_ascii_strcasecmp(cmd, "buddyicon")) |
| 330 return FALSE; |
329 return FALSE; |