]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) #3930: Add drag-and-drop support for info hashes.
authorJordan Lee <jordan@transmissionbt.com>
Fri, 21 Jan 2011 21:35:11 +0000 (21:35 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 21 Jan 2011 21:35:11 +0000 (21:35 +0000)
The "Add URL" dialog accepts URLs, magnet links, and infohashes, but only copyies urls and magnet links from the clipboard. Patch by cantabile.

gtk/util.c

index c6c3749dd08fa29d19ed468a33a22680366a1011..1e09f7c3975aba0bd5ad4918846021be597fad18 100644 (file)
@@ -930,7 +930,8 @@ gtr_paste_clipboard_url_into_entry( GtkWidget * e )
 
   for( i=0; i<G_N_ELEMENTS(text); ++i ) {
       char * s = text[i];
-      if( s && ( gtr_is_supported_url( s ) || gtr_is_magnet_link( s ) ) ) {
+      if( s && ( gtr_is_supported_url( s ) || gtr_is_magnet_link( s )
+                                           || gtr_is_hex_hashcode( s ) ) ) {
           gtk_entry_set_text( GTK_ENTRY( e ), s );
           break;
       }