// ENCODING: Gtk::Clipboard returns UTF-8, we assume that the backend
// wants ISO-8859-1 and convert it to that.
+// FIXME: Wrong!
string const GuiClipboard::get() const
{
Glib::RefPtr<Gtk::Clipboard> clipboard =
- Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
+ Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
string const str = Glib::convert_with_fallback(
clipboard->wait_for_text(), "ISO-8859-1", "UTF-8");
lyxerr[Debug::ACTION] << "GuiClipboard::get: " << str << endl;
// ENCODING: we assume that the backend passes us ISO-8859-1 and
// convert from that to UTF-8 before passing to GTK
+// FIXME: Wrong!
void GuiClipboard::put(string const & str)
{
lyxerr[Debug::ACTION] << "GuiClipboard::put: " << str << endl;
Glib::RefPtr<Gtk::Clipboard> clipboard =
- Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
+ Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
clipboard->set_text(Glib::convert(str, "UTF-8", "ISO-8859-1"));
}