On Wed, 2013-07-24 at 13:40 +0300, Jiergir Ogoerg wrote:
> Hi,
> 
> The question is about the C++ (mm) backend.
> 
> 
> Gtk::Clipboard has 2 options: (1) store data which is available also
> after the app quits until someone cleans up the clipboard, or (2)
> provide a function to be called to fill in the clipboard on request.

Unless this is for very small amounts of data, I think you should want
to always provide a function, and call set_can_store() if you want that
function to be called when the application quits. Otherwise, you'd be
copying large amounts of data when calling the set_*() convenience
methods.

> I need to use the 1st option since the URIs must stay in clipboard
> after the app exits, but there are only methods for text and images:
> set_text() or set_image(), then set_can_store() then store().
> 
> 
> So how do I store() as URIs?
> 
> 
> Use case: I (need to) put the string as URI with a "cut\n" or "copy\n"
> in front of it so that nautilus provides a "paste" option in the
> right-click menu.

gtk_clipboard_set_text() just copies the text and uses
gtk_clipboard_set_with_data() (Gtk::Clipboard::set() in gtkmm) to
provide that copied data in future.


-- 
Murray Cumming
[email protected]
www.murrayc.com
www.openismus.com

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to