Changeset 9688
- Timestamp:
- Dec 9, 2009, 1:42:04 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/main.c
r9685 r9688 1496 1496 char * magnet = tr_torrentGetMagnetLink( tor ); 1497 1497 GdkDisplay * display = gtk_widget_get_display( w ); 1498 GdkAtom selection = GDK_SELECTION_CLIPBOARD; 1499 GtkClipboard * clipboard = gtk_clipboard_get_for_display( display, selection ); 1498 GdkAtom selection; 1499 GtkClipboard * clipboard; 1500 1501 /* this is The Right Thing for copy/paste... */ 1502 selection = GDK_SELECTION_CLIPBOARD; 1503 clipboard = gtk_clipboard_get_for_display( display, selection ); 1500 1504 gtk_clipboard_set_text( clipboard, magnet, -1 ); 1505 1506 /* ...but people using plain ol' X need this instead */ 1507 selection = GDK_SELECTION_PRIMARY; 1508 clipboard = gtk_clipboard_get_for_display( display, selection ); 1509 gtk_clipboard_set_text( clipboard, magnet, -1 ); 1510 1511 /* cleanup */ 1501 1512 tr_free( magnet ); 1502 1513 }
Note: See TracChangeset
for help on using the changeset viewer.